Pages: 1 2 [3] 4 5   Go Down
Author Topic: Is there a good Basic interpreter?  (Read 7799 times)
0 Members and 1 Guest are viewing this topic.
Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 98
Posts: 4813
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A maybe 10 second search got this:
http://amigojapan.github.com/Arduino-Retro-Computer-with-SD-card-and-LCD-display-and-Keyboard-input-with-BASIC-interpreter/

and this:
http://hackaday.com/2012/05/01/arduino-basic-interpreter-using-lcd-keyboard-and-sd/

and this:
http://ec2-122-248-210-243.ap-southeast-1.compute.amazonaws.com/mediawiki/index.php/Arduino_Basic

and a few more before results from this forum made the list. Your mileage may vary.

Interpreter Basic is a ancient and cruel form of torture supported by masochists and the ingnorant.
Logged

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 634
Posts: 50243
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Interpreter Basic is a ancient and cruel form of torture supported by masochists and the ingnorant.
Mostly the latter.
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 135
Posts: 6783
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Pass the code as string and the library executes it? I don't necessarily need the shell that many interpreters provide
BASIC is sorta all about the shell...

As for the provided code, it didn't work! And it's obvious that that is not actually a basic interpreter, but only a "compiler" that translates BASIC code into C code!  And it needs more comments!
( http://forum.basicprogramming.org/index.php?topic=1824.0;wap2   Follow the links...)
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17301
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Interpreter Basic is a ancient and cruel form of torture supported by masochists and the ingnorant.
Mostly the latter.

And I actually heard that they encourage the use of GOTO statements.  smiley-wink

Logged

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 98
Posts: 4813
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yup. When your business package crashes you maybe load a variable or two and type GOTO some-line-number to keep running. Ain't life good?

Logged

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Offline Offline
Full Member
***
Karma: 5
Posts: 113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Interpreter Basic is a ancient and cruel form of torture supported by masochists and the ingnorant.
A joke I'm sure, but don't be so dismissive. A tiny number of us were assembling back in the day, an increasing number of people who had to have abstraction used proto C (You talk about torture - they loved error reports), but there was a mass of people who were introduced to microprocessors via Basic (go find the philosophy behind it's development), Fortran, Pascal (later) forth etc. ALL of those pioneers provide the shoulders that we now stand on. The C used in Arduino is stripped down and has to be the easiest implementation I have ever come across and yet it still throws errors from artefacts, at least Basic has the good manners to point out the error and only the error smiley-wink And what exactly is wrong with a goto? It just provides a method for stepping over code, structures like 'case' do the goto's for you. In fact, if you read the reference, you'll find a goto. Anyone can write sloppy code in any language. If you want to be dogmatic and write tight code, pick up the data sheet and start assembling.

The advocates of all languages look down their noses at the other language users, however, if you see someone smiling quietly to himself, trying not to look too aloof, he'll be the assembler in the room smiley-wink

For a real insight, writing languages (and even small OS's) is fun, everyone should try it.
Logged

For whom does the clock pulse? It pulses for you!

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 309
Posts: 26488
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
if you see someone smiling quietly to himself, trying not to look too aloof, he'll be the assembler in the room
No, he'll be the real engineer, who has tweaked the microcode   smiley-cool
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Global Moderator
Online Online
Brattain Member
*****
Karma: 498
Posts: 19060
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
he'll be the assembler in the room

I thought for a moment you said "elephant in the room". ;P
Logged


Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 98
Posts: 4813
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

People paid me to write Basic on and off from 1980 to 1999 (last Y2K maintenance). I would BEG them to let it be C or Forth and they'd insist that if it was Basic then it would be more maintainable. Well at least by 85 it was compiled Basic.
Interpreter Basic is missing so much it is cruelty to work with. Compiler Basic is less so in proportion to how much it is C/C++ in disguise. I speak from a lot of experience!

Every time I'd get into assembler it seemed like no time before the new chips were out. I did some segments for pay and more for learning but as compilers got really good I said to hell with it. I wasn't making my living keeping with the latest. If anyone is then I'm happy for you, good on yer!

Basic was like a bad habit with no redeeming qualities that I couldn't find in a better, more capable language.


Logged

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
what exactly is wrong with a goto?

It doesn't provide inferior people the ability to feel otherwise.
Logged

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 98
Posts: 4813
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What is wrong with GOTO? Nothing in particular if you can keep your program from turning into spaghetti.
OTOH spend time fixing other people's goto-ridden spaghetti code and you might get an idea about goto's.

Basic goto's get over-used by beginners who haven't figured out what gosub is for. But mind you they are superior beginners who already have a way and don't need to rely on gosub tricks.
Logged

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4092
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

... It has a weird syntax and only allows variables 27 from a-z.

I want to say that early BASIC was the same. Well, maybe 26 variables. Am I remembering correctly?
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 98
Posts: 4813
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A1, A2, A%, A$, A... at least by the mid-70's, probably sooner.
Logged

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

0
Offline Offline
God Member
*****
Karma: 39
Posts: 988
Get Bitlash: http://bitlash.net
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

From the Wikipedia article on Dartmouth Basic at http://en.wikipedia.org/wiki/Dartmouth_BASIC
Quote
Variable names were limited to A to Z, A0 to A9, B0 to B9, ..., Z0 to Z9, giving a maximum of 286 possible distinct variables. Array names were restricted to A to Z only

I have found that Bitlash users tend to run out of eeprom before they run out of variable names.  And at least they can give their _functions_ proper names so they are steered toward that habit.

While I have the podium may I point out that the syntax of the Bitlash language is much less weird / more compatible with C and Javascript in the 2.0 version and if you haven't given it a look in a while it might be worth dusting off.  Here's the User's Guide: http://bitlash.net/bitlash-users-guide.pdf

-br

Logged

Global Moderator
Online Online
Brattain Member
*****
Karma: 498
Posts: 19060
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It doesn't provide inferior people the ability to feel otherwise.

Check out this thread: http://arduino.cc/forum/index.php/topic,146205

You may be able to advise the poster about the best way of using goto.

Disclaimer: I don't really understand what "It doesn't provide inferior people the ability to feel otherwise." means. Maybe someone else does?
Logged


Pages: 1 2 [3] 4 5   Go Up
Jump to: