Go Down

Topic: Bitlash v2.0 build is available for download... (Read 7203 times) previous topic - next topic

billroy

Hello and good day:

I've posted an updated version of Bitlash at http://bitlash.net.

Bitlash 2.0 RC1 is available at the links below.

Bitlash is an open source interpreted language shell and embedded programming environment for Arduino.  The Bitlash shell runs entirely on the Arduino and supports many of the familiar Arduino functions.  Bitlash interprets commands you type on the serial port or send from your favorite PC-side programming environment.

Version 2.0 of Bitlash offers improved compatibility with C syntax, an upgrade to the macro system to allow true functions with arguments and return values to be defined in the Bitlash language and stored in EEPROM, and many other small improvements.

Also included in this release is the BitChi web server, a Bitlash-powered Ethernet web server and telnet console for Arduino.  BitChi generates dynamic web pages using Bitlash 2.0 as the scripting engine.  You can administer BitCHI remotely via the password-protected telnet console.  The BitChi server works with the official Arduino Ethernet shield and compatible Arduino boards.

I'm releasing an early release candidate build in the hope that the community can help shake out any remaining bugs before declaring 2.0.  Please give Bitlash a try and let me know how it works for you.

Download: http://bitlash.net/wiki/_media/bitlash-2.0-rc1.zip
Release announcement: http://bitlash.net/wiki/start
Documentation index: http://bitlash.net/wiki/docindex

Happy hacking,

-br
http://entropymouse.com
http://bitlash.net

retrolefty

Nice work;

I like the expression you coined: twitter is the new Hollerith  :D

Lefty

billroy

Thanks and aw shucks ;)

-br
http://bitlash.net
http://entropymouse.com

coopermaa

Hi Bill,

Thanks for the great work!

I've downloaded bitlash v2.0RC1 and upload the bitlashdemo to Arduino, trying to get
started with bitlash. See following:

bitlash here! v2.0 RC1 (c) 2011 Bill Roy -type HELP- 1021 bytes free
> pinmode(d13,1)
> print d13
0
> d13=1
> print d13
1
>
> pinmode(d12,1)
> print d12
0
> d12=1
> print d12
0
> d12=1
> print d12
0
>

I follow your instruction to turn on d13, it works, but it seems
not work properly for other digital pins. Is there something wrong with my procedure?

Cooper

coopermaa

The problem is solved. There is a typo in the code:

> pinmode(d12,1)
> d12=1

Should be corrected as follows:

> pinmode(12,1)
> d12=1

Cooper

billroy

That is a very interesting bug!  I am going to have to train my eyes to watch for it.

Could have been a very tricky debugging experience if the effect had been to set TX to an input instead of an output... where did my serial go...

Thanks for sharing and best regards,

-br
http://bitlash.net
http://entropymouse.com

coopermaa

One more question. How to read out the arguments of a bitlash function?
I entered the example "printargs" function as follows:

bitlash here! v2.0 RC1 (c) 2011 Bill Roy -type HELP- 1021 bytes free
> ls
> function printargs {i=0; while ++i<arg(0) {print arg(i);}}
saved
> ls
function printargs {i=0; while ++i<arg(0) {print arg(i);}};

But there is no response when I run the "printargs" function:

> printargs 1 2 3
> printargs "Hello bitlash"

-----------------^
unexpected number

Cooper

coopermaa

Okay, it's working now.

> function printargs {i=0; while ++i<=arg(0) {print arg(i);}}
saved
> printargs(1)
1
> printargs(1,2,3)
1
2
3
>

I confound the function with the command. "printargs" is a function, not a command! :)

The bitlash functions take only number type arguments. I wonder if it is possible to support string arguments in the future?

Cooper

billroy

Hello again, Cooper:

Glad to see you worked through the bug.

I agree String type arguments are a highly desirable feature.  I have a couple designs that are plausible, but I am a little bit puzzled how to address the reliability problems related to dynamic memory allocation for strings: fragmentation, garbage collection, and out of memory. 

Right now Bitlash makes no use of malloc()/free(), so the only out-of-memory condition arises from a function that is deeply recursive or an expression that is too complex for the available stack.  With all the string implementations I have thought through, it's possible to have a hidden out-of-memory crash lurking just past the edge of testing.  Not a comforting thought for embedded applications.

(I do take hope from work like Paul's here: http://code.google.com/p/arduino/issues/detail?id=468 -- thanks, Paul!)

I'd welcome feedback and ideas on implementing a useful subset of String (or let's just call it char[]) functionality in a way that would sidestep the reliability issues associated with dynamic memory allocation.


-br
http://bitlash.net
http://entropymouse.com

coopermaa

Hope to see the new feature!

Bitlash is very userful, I'd like to introduce it to my friends, so I just wrote a bitlash getting started tutorial in chinese. FYI.

Cooper

billroy

Thanks, Cooper.  I don't know Chinese, but it's clear from the pictures and organization you put a lot of work and thought into your documentation.

I've linked to your page from http://bitlash.net/wiki/sightings in the hope that others will benefit.

Best regards,

-br
http://bitlash.net
http://entropymouse.com

coopermaa

#11
Feb 20, 2011, 05:32 am Last Edit: Feb 20, 2011, 05:39 am by coopermaa Reason: 1
Thank you, Bill. I just try my best to make it readable. Actually, it most comes from the "Install" page of bitlash documentation.

I just found another problem. The free() build-in function seems not work, there is nothing returned when I type "free()" in the command prompt,

> free()
>                                // <--- amount of memory expected

Cooper

coopermaa

My bad, I have to pass it to print command:

> print "Memory:", free()
Memory: 1021

Cooper

billroy

Hi, Cooper:

Yes, that is correct!

Best regards,

-br
http://bitlash.net
http://entropymouse.com

Go Up