Jump to content




AdvCC: CC done quicker.


  • This topic is locked This topic is locked
7 replies to this topic

#1 martin509

  • Members
  • 53 posts

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;
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.

#2 Skullblade

  • Members
  • 470 posts
  • LocationThe Big Apple, NY

Posted 28 February 2013 - 09:46 AM

No new languages

#3 martin509

  • Members
  • 53 posts

Posted 28 February 2013 - 09:54 AM

View PostSkullblade, on 28 February 2013 - 09:46 AM, said:

No new languages
sad face?
It would be optional, anyway.

#4 Sammich Lord

    IRC Addict

  • Members
  • 1,212 posts
  • LocationThe Sammich Kingdom

Posted 28 February 2013 - 09:58 AM

This is doable in Lua if you write a interpreter.

#5 martin509

  • Members
  • 53 posts

Posted 28 February 2013 - 10:33 AM

View PostSammich Lord, on 28 February 2013 - 09:58 AM, said:

This is doable in Lua if you write a interpreter.
That would just slow the game down even more since it gets interpreted by lua, then by java.
This is the reason emulation is so demanding, btw.

#6 Pinkishu

  • Members
  • 484 posts

Posted 28 February 2013 - 10:56 AM

Theres no point, it doubt it would be much faster in processing, maybe in typing, once you memorize all the weird abbreviations

And you could do that already in lua
txt = {}
txt.slpr = textutils.slowprint

txt.splr("meow")

orso

#7 immibis

    Lua God

  • Members
  • 1,033 posts
  • LocationWellington, New Zealand

Posted 28 February 2013 - 11:25 AM

Not short enough!

t.s("E")


#8 Cruor

  • Members
  • 413 posts
  • LocationNorway

Posted 28 February 2013 - 11:26 AM

This is allready doable in plain Lua.
Locked.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users