Live data from Hacker News

Show HN: MicroLua – Lua for the RP2040 Microcontroller

github.com

31–35 of 35 posts

Re: Show HN: MicroLua – Lua for the RP2040 Microcontroller

#31
post #2

This is very cool! I'm curious if it'd be relatively straightforward to use Fennel‡ with MicroLua? ‡ https://fennel-lang.org/

MicroLua currently compiles Lua files to binary at built time. It seems that Fennel is capable of transpiling to Lua source code, so it should be easy to add that step to the build process.

Re: Show HN: MicroLua – Lua for the RP2040 Microcontroller

#32

I can't get my head around a 1 based language.

Normally education or human oriented languages start arrays at 1 (Smalltalk, Cobol, Lua, APL, Wolfram, etc) while hardware oriented languages start arrays at 0 (C and friends, Oberon, Forth, Scheme and so on). Human oriented languages that have to play nice with C also tend to use 0. As do Python and Basic, which contradicts my rule.

Probably the number one reason not to start arrays at 0 in an educational language is that having the last element of an array of size 10 have an index of 9 causes quite a bit of confusion.

Re: Show HN: MicroLua – Lua for the RP2040 Microcontroller

#34
post #31
post #2

This is very cool! I'm curious if it'd be relatively straightforward to use Fennel‡ with MicroLua? ‡ https://fennel-lang.org/

MicroLua currently compiles Lua files to binary at built time. It seems that Fennel is capable of transpiling to Lua source code, so it should be easy to add that step to the build process.

FTR, Fennel support was indeed fairly easy to add.

https://github.com/MicroLua/MicroLua/commit/b9dfa2407afe932b...

Re: Show HN: MicroLua – Lua for the RP2040 Microcontroller

#35
post #34
post #31

Earlier quoted context omitted.

MicroLua currently compiles Lua files to binary at built time. It seems that Fennel is capable of transpiling to Lua source code, so it should be easy to add that step to the build process.

FTR, Fennel support was indeed fairly easy to add. https://github.com/MicroLua/MicroLua/commit/b9dfa2407afe932b...

Whoa — that's amazing!
Post reply on HN