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

I kinda want to rewrite LUA [not really]

Started by ebernerd, 26 January 2013 - 03:50 PM
ebernerd #1
Posted 26 January 2013 - 04:50 PM
I want to be able to write a script easier. So instead of all of this extra poop, I could do a simple code.

So, for a math problem, it would be:


math add 8 8
end
So, that code would add the numbers following ADD or SUBTRACT or whatever
Could anyone please help me with the coding?
This would be a real help!
Lyqyd #2
Posted 26 January 2013 - 04:53 PM
This sounds like far more work than simply learning and using Lua.
theoriginalbit #3
Posted 26 January 2013 - 04:58 PM
Uhh what's wrong with:
8 + 8

Why does it have to be in the syntax of:
math add 8 8

That too me that just seems like more work to program.
ebernerd #4
Posted 26 January 2013 - 05:01 PM
well, more for the user that DOESNT know LUA…
Lyqyd #5
Posted 26 January 2013 - 05:46 PM
They'd probably be better off learning Lua than learning whatever syntax you come up with to "help" them interact with a limited subset of Lua.

As a side note, you're getting these sorts of replies because they are a match for the perceived amount of effort you've put in.
theoriginalbit #6
Posted 26 January 2013 - 05:50 PM
Lua was picked for its ease of learning, there are much harder languages to learn, heck try to learn FORTH (used by RedPower2 computers), it's much more difficult to learn by the average user.

Actually the syntax you want to use kind of reminds me of a stack based language (like FORTH). And stack based languages are quite hard for newbies to get their heads around!
Zoinky #7
Posted 26 January 2013 - 06:15 PM
Plus, that syntax makes no sense. Why would you need to 'end' a maths equation? Try looking around for some tutorials, they'll help you get started with Lua.