Discussions in support of the LOLCODE.com wiki
You are not logged in.
Hey
I've started previosly with rotfl, but lolcode.net is so much better that there's not much sense in continuing it (+ got some problems with SLK used in backend as parser).
But when I started learning erlang lately there was only one thing I could start writing ![]()
Erlolcode is scanner->parser->runner of Lolcode that can dump any phase of that as erlang object and load it back later (i.e. you can run codetree prepared before). I'm implementing only 1.2 + bukkits (so no operators for example - use SUM OF ... AN ...
)
Things that don't work so far in order of implementing now:
- comments
(no, really)
- meebe in ifs
- switch / case
- functions (everything's in place, just value returning will be tricky...)
- hex codes in yarns
Maybe I missed something, but the point is -> it's 85% complete 1.2 and I'm going for 100%
If you see something missing, please tell me.
Additional features:
- ~80 internal regression tests, so I won't mess things up (erlol:test(). if you want to hack on it).
- 1 comment line in whole project (have fun reading... erlang is self-documenting... right?... right?)
- no error handling - if it doesn't work, it blows up
(it prints out error+stack though, so if you believe it should work - send it to me along with code)
- bukkit is hash... multidim. bukkit is still a hash, nonexistant keys give NOOB, so:
"level 2" IN MAH "level 1" IN MAH bukkit R WIN
BTW bukkit["level 1", "level 2"] = WIN
VISIBLE "test1: " "level 2" IN MAH "level 1" IN MAH bukkit "; test2: " "level 1" IN MAH bukkit !
gives "test1: WIN; test2: NOOB"
In erlang shell you can run erlol:run_file("filename.lol").
You can get erlang from http://www.erlang.org and NetBeans based IDE from http://sourceforge.net/projects/erlybird
I'll try to set up some web interface for it though... maybe tonight.
Last edited by viraptor (2007-10-09 09:58:18)
Offline
You can test it out on http://kni.prz.rzeszow.pl:10101/ - just write your code and hit "Submit" ![]()
It will hang on GIMMEH, so don't use it. It's currently able to handle:
HAI
I HAS A bukkit
I HAS A input ITZ "random string"
VISIBLE "Write now: "
2 IN MAH bukkit R input
"animal" IN MAH bukkit R "wabbit"
VISIBLE "bukkit[:"animal:"] = " "animal" IN MAH bukkit !
input R 0
IM IN YR loop
input R SUM OF input AN 1
VISIBLE "bukkit[" input "] = " input IN MAH bukkit !
BOTH SAEM input AN 3, O RLY?
YA RLY
GTFO
OIC
IM OUTTA YR loop
KTHXBYEI hope I'll be able to run brainfuck interpreter on that soon ![]()
Last edited by viraptor (2007-10-10 01:07:31)
Offline
And it runs brainfuck interpreter! (read in MEWzings, interpreter is rewritten to be 1.2+BUKKIT compatible)
I'll try to add "program input" textarea on http://lolcode.viraptor.info:10101/ soon, so you can check it out yourself!
So far comments are implemented and BUKKITs are fixed. Meebe and cases next ![]()
It may be also notable, that it's Linux running erlang Yaws web application server running natively Erlol running lolcode BF interpreter running BrainF**K ! Talk about application stack
(also - take that LAMP !!)
Last edited by viraptor (2007-10-11 02:36:03)
Offline
Updated,
- WTF?, OMG, OMGWTF switch working
- O RLY? with MEBBE-s working
- comments working
only functions and string processing left AFAIK ![]()
Testsite updated at http://lolcode.viraptor.info:10101/ of course...
PS. I CAN HAS http://lolcode.com/implementations/erlol PLZ? KTHNXBYE!
Last edited by viraptor (2007-10-13 22:10:50)
Offline
Updated page with program input field (doesn't always work yet - will be fixed today). When it works, everyone will be able to check brainfuck implementation ![]()
Parser gets some readable errors implemented, but not for every case (with row/col tracking).
In short - something is happening, I'm not dead ![]()
Offline
Hmm, Erlang looks like an easier-to-read Haskell. Some things that the whitepaper claims are language features look more to me like interpreter features, but as far as functional languages are concerned it looks like any others in the field. (I'm still a Schemer at heart.)
Good to see one of us has time to work on interpreters. ![]()
Offline