Posted 28 February 2013 - 09:09 AM
I have a small little idea: A new programming language for ComputerCraft that would be much more compact and easily parsed, although of course being harder to learn.
Let me explain.
Lua is an inefficient language memory-wise. An example would be;
"But wait, how will we switch to this hyper-advanced super-language?"
How about a little tag at the top of your programs to differentiate the two?
"Okay!"
Still, this needs something cool to make it more than faster Lua.
How about various functions that any experienced programmer knows and loves?
Logic functions like AND, OR, XOR, etc to perform on things like strings, ints, and bools.
Low-level manipulation of base things like the screen to make it do awesome things: mathematical patterns, screwing around with the text lines, SCREW TEXT MODE, and so on.
Why do all this, you ask?
In the olden days, on systems like the C64, Atari 2600 and Apple II, coders had to know tons of tricks to produce cool things.
For instance, California Games on, I believe the Apple II, used palette switches while in the middle of a scan-line to produce more colours at any given time, since any one palette was extremely limited.
I see the same sort of thing today with CC, especially in games, as coders try to get as much out of the emulated hardware as possible.
So I say give them the tools for optimization.
Give them AdvCC!
P.S. Please correct me if small code is not faster than long.
Let me explain.
Lua is an inefficient language memory-wise. An example would be;
textutils.slowPrint("Hello, this code is inefficient")
Which is stupid long when you could, in another (fictional) language, do this:
txt.slpr("Efficiency!")
If my assumption that smaller code is generally quicker is true, then this could seriously speed up CC."But wait, how will we switch to this hyper-advanced super-language?"
How about a little tag at the top of your programs to differentiate the two?
"Okay!"
Still, this needs something cool to make it more than faster Lua.
How about various functions that any experienced programmer knows and loves?
Logic functions like AND, OR, XOR, etc to perform on things like strings, ints, and bools.
Low-level manipulation of base things like the screen to make it do awesome things: mathematical patterns, screwing around with the text lines, SCREW TEXT MODE, and so on.
Why do all this, you ask?
In the olden days, on systems like the C64, Atari 2600 and Apple II, coders had to know tons of tricks to produce cool things.
For instance, California Games on, I believe the Apple II, used palette switches while in the middle of a scan-line to produce more colours at any given time, since any one palette was extremely limited.
I see the same sort of thing today with CC, especially in games, as coders try to get as much out of the emulated hardware as possible.
So I say give them the tools for optimization.
Give them AdvCC!
P.S. Please correct me if small code is not faster than long.