Linked by Thom Holwerda on Fri 25th Aug 2006 09:03 UTC, submitted by anonymous
General Development Adam Dunkels, well-known author of the Contiki operating system and the uIP embedded TCP/IP stack, has written a really small BASIC interpreter called uBASIC in about 700 lines of C code. It is intended to be a very small scripting language for systems where memory really is at a premium such as deeply embedded systems which may have as little as a few hundreds of bytes of RAM. It provides an interesting look into how to write a very lightweight script interpreter.
Thread beginning with comment 155875
To read all comments associated with this story, please click here.
Calvin
Member since:
2005-07-14

Just because there are hardware constraints, doesn't mean the user isn't time constrained. Sometimes you need a quick an dirty one-time hack that would take a minute to knock out in a high level script.

Reply Score: 3

DoctorPepper Member since:
2005-07-12

Thank you for clarifying that. A lot of what I do for work entails "quick and dirty, one-time hacks". I used to use Perl, but now use Python. I can get more done with Python (or Perl) in 15 minutes, than most programmers can do with C or C++ in a day. Ok, two days.

We are also starting to do more of our project development in Python. There are lots of benefits besides developer time to take into consideration. Readability and maintainability are two biggies. With today's much higher performance CPUs and tons of memory, the runtime of these "scripts" is no longer an issue like it once was. If your program has to do some massive number crunching, you can write just that part in C, and the rest in Python (or Perl), and have the best of both worlds.

Reply Parent Score: 1