pbLua based on 5.3 (work1) - it works!

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

pbLua based on 5.3 (work1) - it works!

Ralph Hempel-2
Just a brief note to say that I've successfully ported Lua 5.3 (work1)
to the LEGO MINDSTORMS NXT platform, an extremely memory constrained
ARM7 based device with only soft float support.

<http://www.hempeldesigngroup.com/lego/pblua>

I set up Lua to use int and float as the basic numeric types, and after
a bit of struggle with my custom vfprintf() and getting bitten by the
difference between fmodf() and modff() things worked pretty well.

On a simple loop iteration, I found that floats took about 3 times as
long as ints, which is decent for soft floats.

The whole thing (including the NXT drivers and a binding to Lua) runs in
about 138K of FLASH and I have 58K of the 64K of RAM available.

I do have to run the gc pretty aggressively because it's impossible to
double the requested RAM more than once or twice after startup :-)

Thanks again to the three amigos for making one of the only tiny
languages that will fill this niche. The alternatives (I tried them)
were Forth and Scheme :-)

I'll go so far as to say it's the only tiny infix language I have found
that's supported by a fantastic reference manual, book (PiL), and
relatively noise free community mailing list.

Cheers, Ralph


Reply | Threaded
Open this post in threaded view
|

Re: pbLua based on 5.3 (work1) - it works!

Roberto Ierusalimschy
> Just a brief note to say that I've successfully ported Lua 5.3
> (work1) to the LEGO MINDSTORMS NXT platform, an extremely memory
> constrained ARM7 based device with only soft float support.
>
> <http://www.hempeldesigngroup.com/lego/pblua>
>
> [...]

Many thanks for the feedback (even more for a positive feedback ;).

-- Roberto

Reply | Threaded
Open this post in threaded view
|

Re: pbLua based on 5.3 (work1) - it works!

Tim Hill
Has anyone else looked at the EV3 Mindstorms due out this fall? The new "brick" is begging to get a Lua port .. ARM9 and much more RAM+ROM.

--Tim

On Aug 6, 2013, at 6:33 AM, Roberto Ierusalimschy <[hidden email]> wrote:

>> Just a brief note to say that I've successfully ported Lua 5.3
>> (work1) to the LEGO MINDSTORMS NXT platform, an extremely memory
>> constrained ARM7 based device with only soft float support.
>>
>> <http://www.hempeldesigngroup.com/lego/pblua>
>>
>> [...]
>
> Many thanks for the feedback (even more for a positive feedback ;).
>
> -- Roberto
>


Reply | Threaded
Open this post in threaded view
|

Re: pbLua based on 5.3 (work1) - it works!

Ralph Hempel-2
Tim Hill wrote:
> Has anyone else looked at the EV3 Mindstorms due out this fall? The
> new "brick" is begging to get a Lua port .. ARM9 and much more
> RAM+ROM.

Yes, I'm one of the lucky ones that has one. It's on my list of things
to do when the weather gets lousy up here in Ontario...

Ralph

Reply | Threaded
Open this post in threaded view
|

Re: pbLua based on 5.3 (work1) - it works!

Andrew Starks


On Wednesday, August 7, 2013, Ralph Hempel wrote:
Tim Hill wrote:
Has anyone else looked at the EV3 Mindstorms due out this fall? The
new "brick" is begging to get a Lua port .. ARM9 and much more
RAM+ROM.

Yes, I'm one of the lucky ones that has one. It's on my list of things to do when the weather gets lousy up here in Ontario...

Ralph


Hurry up man! Our Lego First League starts soon! :)

-Andrew 
Reply | Threaded
Open this post in threaded view
|

Re: pbLua based on 5.3 (work1) - it works!

Tim Hill
In reply to this post by Ralph Hempel-2
… calls upon the storm gods to head to Ontario :)

On Aug 7, 2013, at 1:21 AM, Ralph Hempel <[hidden email]> wrote:

> Tim Hill wrote:
>> Has anyone else looked at the EV3 Mindstorms due out this fall? The
>> new "brick" is begging to get a Lua port .. ARM9 and much more
>> RAM+ROM.
>
> Yes, I'm one of the lucky ones that has one. It's on my list of things to do when the weather gets lousy up here in Ontario...
>
> Ralph
>


Reply | Threaded
Open this post in threaded view
|

Re: pbLua based on 5.3 (work1) - it works!

KHMan
On 8/9/2013 10:20 AM, Tim Hill wrote:
> … calls upon the storm gods to head to Ontario :)

It's going to be a *lot* easier to run Lua on EV3... :-p

Texas Instruments AM1808 ARM9 SOC
http://armdevices.net/2013/01/13/lego-mindstorms-ev3-launched/

Datasheet
http://www.ti.com/product/am1808

Linux toolchain (free)
http://www.ti.com/tool/linuxezsdk-sitara

> On Aug 7, 2013, at 1:21 AM, Ralph Hempel wrote:
>
>> Tim Hill wrote:
>>> Has anyone else looked at the EV3 Mindstorms due out this fall? The
>>> new "brick" is begging to get a Lua port .. ARM9 and much more
>>> RAM+ROM.
>>
>> Yes, I'm one of the lucky ones that has one. It's on my list of things to do when the weather gets lousy up here in Ontario...
>>
>> Ralph

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia


Reply | Threaded
Open this post in threaded view
|

Re: pbLua based on 5.3 (work1) - it works!

Ralph Hempel-2
KHMan wrote:

> On 8/9/2013 10:20 AM, Tim Hill wrote:
>> … calls upon the storm gods to head to Ontario :)
>
> It's going to be a *lot* easier to run Lua on EV3... :-p
>
> Texas Instruments AM1808 ARM9 SOC
> http://armdevices.net/2013/01/13/lego-mindstorms-ev3-launched/
>
> Datasheet
> http://www.ti.com/product/am1808
>
> Linux toolchain (free)
> http://www.ti.com/tool/linuxezsdk-sitara

Seriously, is there that much interest in getting Lua on the EV3 just in
this group? :-)

I have next week off, we'll be in Lake Placid doing some hiking - maybe
there will be a rainy day...

Ralph

Reply | Threaded
Open this post in threaded view
|

Re: pbLua based on 5.3 (work1) - it works!

KHMan
On 8/9/2013 7:40 PM, Ralph Hempel wrote:

> KHMan wrote:
>> On 8/9/2013 10:20 AM, Tim Hill wrote:
>>> … calls upon the storm gods to head to Ontario :)
>>
>> It's going to be a *lot* easier to run Lua on EV3... :-p
>>
>> Texas Instruments AM1808 ARM9 SOC
>> http://armdevices.net/2013/01/13/lego-mindstorms-ev3-launched/
>>
>> Datasheet
>> http://www.ti.com/product/am1808
>>
>> Linux toolchain (free)
>> http://www.ti.com/tool/linuxezsdk-sitara
>
> Seriously, is there that much interest in getting Lua on the EV3
> just in this group? :-)
>
> I have next week off, we'll be in Lake Placid doing some hiking -
> maybe there will be a rainy day...

Enjoy the break, we're just shootin' the breeze here... :-)

Anyway, in dumping the links out there I was just thinking that
EV3 is just another small Linux-based board, 64MB RAM and 16MB
NAND, so when people start releasing distro images and toolchains,
I think coding will be a breeze much like Raspberry Pi and all the
small ARM/MIPS boards. So it seems to me like: no more
microcontroller, it's a small Linux computer now...

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia


Reply | Threaded
Open this post in threaded view
|

Re: pbLua based on 5.3 (work1) - it works!

D Burgess-4
> So it seems to me like: no more microcontroller, it's a small Linux computer now...

That is my view too.

Reply | Threaded
Open this post in threaded view
|

Re: pbLua based on 5.3 (work1) - it works!

Tim Hill

On Aug 10, 2013, at 9:07 PM, David Burgess <[hidden email]> wrote:

>> So it seems to me like: no more microcontroller, it's a small Linux computer now...
>
> That is my view too.
>

(way OT for Lua mail list..)

Out of sheer masochism I once created a Turing machine using Lego windstorms parts, without cheating and using the Brick to do any of the logic. Had a 40 bit "tape" made of mechanical bits. I seem to recall it ran at about 0.02 instructions per second :)

--Tim