CubeScript on the Web |
by kripken
on 09/12/2010 21:40, 13 messages, last message: 09/25/2010 22:32, 1655 views, last view: 03/17/2024 22:21 |
|
For all CubeScript fans, here it is running in your web browser:
http://syntensity.com/static/cubescript.html
just for teh lulz
- kripken
|
|
Board Index
|
|
#1: Cool |
by LeftClicker
on 09/12/2010 22:29
|
|
I can't think of any practical uses, but that's pretty awesome.
reply to this message
|
|
#2: perhaps... |
by |ice|sub-zero|L
on 09/13/2010 05:49
|
|
it may be useful if linked to say a server... allows you to do kinda what IRC does only with a specific order, allowing only cubescript for those who happen to know more about CS than IRC (though its not hard to learn and yadda yadda yadda.)
reply to this message
|
|
#3: .. |
by SheeEttin
on 09/13/2010 06:40
|
|
x = 0; if $x [x = 1; [x = 2; echo @@x]]
Doesn't work. It reloads the page. Same for the quine.
C'mon, man, at least get the "simple" working right... ;)
(Or did you not actually do anything beyond feeding it into LLVM then Emscripten?)
reply to this message
|
|
#4: Re: .. |
by kripken
on 09/13/2010 06:51, refers to #3
|
|
> (Or did you not actually do anything beyond feeding it into LLVM then Emscripten?)
Pretty much, yeah :)
The automatic translation stuff has lots of minor bugs, probably something there causes the problems you mention. Should be fixable though.
- kripken
reply to this message
|
|
#5: pop |
by Hirato Kirata
on 09/13/2010 06:56
|
|
I tried the following example
x = 5
echo $x
push x 10
echo $x
pop x
echo $x
this should produce 5 10 5, not 5 10 10 and a message that says pop doesn't exist :P
if you intend to fix it up, or if you require a few more examples, there's plenty on this page
http://sandboxgamemaker.com/wiki/index.php?title=Cubescript
reply to this message
|
|
#6: Re: .. |
by Hirato Kirata
on 09/13/2010 06:57, refers to #3
|
|
x = 0
if $x [blah]
x is 0, so it actually shouldn't do a thing :P
if (! $x) on the other hand...
reply to this message
|
|
#7: .. |
by kripken
on 09/13/2010 08:03
|
|
The quine seems to work... it prints out something identical to the quine itself?
The other stuff does look like bugs :)
reply to this message
|
|
#8: .. |
by degrave3
on 09/13/2010 15:49
|
|
I want to get it working:
a = [ sleep 1 [ a; a; a; ] ]; a;
reply to this message
|
|
#9: Re: .. |
by kripken
on 09/13/2010 19:03, refers to #8
|
|
Hmm, sleep won't work without some sort of main loop in the HTML page...
- kripken
reply to this message
|
|
#10: Re: .. |
by SheeEttin
on 09/13/2010 20:15, refers to #9
|
|
http://www.w3schools.com/jsref/met_win_settimeout.asp
reply to this message
|
|
#11: .. |
by kripken
on 09/15/2010 08:10
|
|
Ok, I updated the demo to fix those bugs (with 'pop' not recognized as a command, and with stuff with $args causing the page to reload). Thanks for telling me about those problems!
However sleep still won't work, I guess I'd need to add some sort of main loop support, maybe using setTimeout as SheeEttin said. I need to think more about how to do that.
- kripken
reply to this message
|
|
#12: Re: .. |
by Razgriz
on 09/15/2010 11:39, refers to #11
|
|
aww no gui stuff? you're no fun xD
reply to this message
|
|
#13: .. |
by Nixot
on 09/25/2010 22:32
|
|
Looks like it's time for a Cubescript Acid test. :P
I love you for doing this. Can you make it a textarea so we can have multiline scripts please? :3
reply to this message
|
|
|
Board Index
|
|