top | item 4145911

Number Script - A Little Language that compiles to JavaScript

79 points| binarydreams | 13 years ago |github.com | reply

29 comments

order
[+] ajuc|13 years ago|reply
I wonder, if you wrote a program, that generates all valid javascript programs, given enough time, do you automatically have copyright on all these programs? Or do you need to actually run the program and save the results somewhere?
[+] jaekwon|13 years ago|reply
nah, it's clear that work still needs to be done to identify the useful programs. if you can identify useful programs from any sludge of valid programs, well you have AI.
[+] mappum|13 years ago|reply
Well in the number-script compiler, it verifies code by running it (I'm not sure if that qualifies).

Also, you would get stuck on code with infinite loops.

[+] richyzhang|13 years ago|reply
Really fun, you should introduce it on April 1.
[+] ajuc|13 years ago|reply
I want to see fractal made from the numbers that are valid. I'll try to do this, but I don't know how to best cast 1d numbers onto 2d plane. Only way I can think of, that doesn't depend on arbitrary constraints like how many pixels in a row, is to make spiral starting from the middle of the screen. Anybody has better idea?
[+] giladvdn|13 years ago|reply
Not sure this actually qualifies as a compiler. All it does is (Python): return int(code.encode('hex'))
[+] teeja|13 years ago|reply
I save even more loads of scripting time by encoding in Base 1. Documentation is a snap, and no danger of creeping featuritis.
[+] modarts|13 years ago|reply
Is this supposed to be a knock on CoffeScript?
[+] dbaupp|13 years ago|reply
Can anyone write a quine?
[+] anonymoushn|13 years ago|reply

  5278827227337076170449567737552050301648746541307090261949087452005923485275315474841135167346502310847459286951086056344961803751459109212515926887194626082177012120350623103576444178029679178692303904162181758870755165218374331731985435437211712470113418677388286391584240429269097406210073414223015915570360596450972343414303025097210394142649144691637350017001727477713336405614635714291836737681181600586279616997175126243498394778635680522
[+] tubbo|13 years ago|reply
JavaScript: Programming's funniest joke.
[+] thenonsequitur|13 years ago|reply
I think the joke here is actually on CoffeeScript, not Javascript.

And really the joke is on CoffeeScript evangelists, not CoffeeScript.