pramode_ce (pramode_ce) wrote,
pramode_ce
pramode_ce

With Love, from Lua! [Experiments with ATNGW100 - Part 9]

C, for example, ia a beautiful language in the category of "portable assemblers". In that category C is powerful thanks to its libraries, simple and easily implementable thanks to its syntax and semantics, portable due to very clever and clean hardware abstraction.

I think that Lua is to "high level scripting languages" is what C is to "portable assemblers". Lua has both OO and functional programming very naturally represented in its semantics. All objects are first class (including functions). Lua is small, very fast (in fact fastest scripting language according to http://shootout.alioth.debian.org/ [debian.org]), has very good Virtual Machine, incremental Garbage Collector. As far as fundamantals are concerned, Lua is light-years ahead of Ruby. It still lags behind in library support, but the recent progress is very encouraging.

Read more...

From first impressions, I think I am going to like this language! I got it cross-compiled for the AVR32 cleanly. The statically linked binary is only 200kb in size and still the language supports stuff like coroutines, closures, iterators ...It also does tail call optimization. I feel we have in Lua a Scheme/Lisp with human-friendly syntax! My decision is almost made - I will test drive my robot with Lua instead of Python.

This is The Book to read if you want to know more about Lua ... Some reviewers have even compared it to K&R!

My ATNGW100 now boots from an image on the SD card and runs Lua scripts!

Read more...

Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments