Offline
Jr. Member
Karma: 1
Posts: 53
|
 |
« on: January 30, 2013, 05:05:56 am » |
Hello,
I'm looking for a Basic interpreter which can run on the Arduino. I've seen many such as TinyBasic, but the problem I always had is that they are not very generic. They can be easily compiled to the Arduino, but I was rather looking for a 'library' where you could you know... Pass the code as string and the library executes it? I don't necessarily need the shell that many interpreters provide. I can do this myself. But in order to be able to implement other things, some structured code is needed.
I hope you know what I mean. Does anyone know a good interpreter language (not necessarily Basic), which can be easily included?
Thanks.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
UK
Offline
Brattain Member
Karma: 143
Posts: 19380
I don't think you connected the grounds, Dave.
|
 |
« Reply #1 on: January 30, 2013, 05:25:20 am » |
I've got to ask - Why?
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 226
Posts: 14106
Lua rocks!
|
 |
« Reply #2 on: January 30, 2013, 05:41:05 am » |
Is there a good Basic interpreter? No.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 1
Posts: 53
|
 |
« Reply #3 on: January 30, 2013, 06:29:44 am » |
I've got to ask - Why? I want to build a computer like the C64 including screen and keyboard. I want it to be completely programmable. Therefore I need a scripting language.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 114
Posts: 2205
|
 |
« Reply #4 on: January 30, 2013, 07:01:25 am » |
What's good is highly subjective. They can be easily compiled to the Arduino, but I was rather looking for a 'library' where you could you know.. How hard would it be for you to stripe out the "shell"?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 1
Posts: 53
|
 |
« Reply #5 on: January 30, 2013, 07:03:20 am » |
I guess it shouldn't be so hard. But as these sources evolve, I would have to change the code over and over again in order to make the new version fit.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
God Member
Karma: 37
Posts: 974
Get Bitlash: http://bitlash.net
|
 |
« Reply #6 on: January 30, 2013, 07:07:05 am » |
Bitlash might be a good fit for your application: http://bitlash.netBitlash is an iterpreter for a tiny language that runs entirely on the Arduino. It's easy to integrate into your Arduino application, and to extend the interpreter with functions you write in C and in the Bitlash language. -br
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 1
Posts: 53
|
 |
« Reply #7 on: January 30, 2013, 07:15:05 am » |
I've seen bitlash before and to be honest, I don't like it. It has a weird syntax and only allows variables 27 from a-z.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
God Member
Karma: 37
Posts: 974
Get Bitlash: http://bitlash.net
|
 |
« Reply #8 on: January 30, 2013, 07:20:56 am » |
De gustibus non disputandum est. Good luck with your project.  -br
|
|
|
|
|
Logged
|
|
|
|
|
Seattle, WA USA
Offline
Brattain Member
Karma: 336
Posts: 36476
Seattle, WA USA
|
 |
« Reply #9 on: January 30, 2013, 07:21:26 am » |
I've seen bitlash before and to be honest, I don't like it. It has a weird syntax and only allows variables 27 from a-z. You know, a reality check would be a good thing. Which Arduino are you using? Look at how much SRAM it has. The "code" to be interpreted has to fit in that space. Along with the interpreters variables.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 1
Posts: 53
|
 |
« Reply #10 on: January 30, 2013, 07:25:27 am » |
Currently, I'm using the Mega 2560. But I already ordered a Due.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 114
Posts: 2205
|
 |
« Reply #11 on: January 30, 2013, 07:31:19 am » |
But as these sources evolve, Life isn't supposed to be perfect.
|
|
|
|
|
Logged
|
|
|
|
|
East Anglia (UK)
Offline
Edison Member
Karma: 55
Posts: 1601
May all of your blinks be without delay
|
 |
« Reply #12 on: January 30, 2013, 08:31:23 am » |
I've seen bitlash before and to be honest, I don't like it. It has a weird syntax and only allows variables 27 from a-z.
27 variables from a-z. Clever !
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 1
Posts: 53
|
 |
« Reply #13 on: January 30, 2013, 10:32:22 am » |
Got another idea: What about an assembly compiler on the Arduino? Pass ASM code as string and get binary code as return and then execute it by setting the instruction pointer? Is that somehow possible or does it sound ridiculous?
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
UK
Offline
Brattain Member
Karma: 143
Posts: 19380
I don't think you connected the grounds, Dave.
|
 |
« Reply #14 on: January 30, 2013, 10:36:11 am » |
Is that somehow possible or does it sound ridiculous? Yes on both counts.
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
|