This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
apemanzilla's profile picture

MoonScript port with LuLPeg?

Started by apemanzilla, 05 February 2016 - 03:15 AM
apemanzilla #1
Posted 05 February 2016 - 04:15 AM
I recently found out about MoonScript, and it looks pretty interesting. It gives you a bunch of neat features like classes, (with inheritance) importing, exporting, and a lot more. And a few others seem to also have shown interest in it. However, it seems the main problem with using MoonScript with CC is that it requires a native Lua library, LPeg, which parses the syntax and grammar of Lua code.

It turns out that there is a pure-Lua port of LPeg -
LuLPeg, which is supposedly a drop-in replacement for LPeg, with only a couple differences which are rather minor. So, in theory, it would be relatively easy to port MoonScript to use LuLPeg instead of LPeg, and therefore, work in CC - further expanding the choice of languages.

What do you guys think? If I find the time, I might see if I can get MoonScript working in CC as it's definitely something that I'm interested in.
SquidDev #2
Posted 05 February 2016 - 07:51 AM
Yes. This is something I've been wanting to do for a while but haven't ever got round to it.
Quartz101 #3
Posted 05 February 2016 - 10:03 AM
YES! Do it!
wilcomega #4
Posted 05 February 2016 - 01:23 PM
That would be awesome!