The LOLCODE forum

Discussions in support of the LOLCODE.com wiki

You are not logged in.

Announcement

New registrations are disabled. Please see this announcement.

#1 2007-10-09 09:56:11

viraptor
Moderator
From: Bath / UK
Registered: 2007-08-15
Posts: 20
Website

Erlol

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 smile

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 ... smile )

Things that don't work so far in order of implementing now:
- comments smile (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% smile 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 smile (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

 

#2 2007-10-09 21:38:42

atl
BDFL
From: lolcode.com
Registered: 2007-05-31
Posts: 324
Website

Re: Erlol

I don't get a chance to read stuff here often...

but this is awesome. thanks!

Offline

 

#3 2007-10-10 01:05:45

viraptor
Moderator
From: Bath / UK
Registered: 2007-08-15
Posts: 20
Website

Re: Erlol

You can test it out on http://kni.prz.rzeszow.pl:10101/ - just write your code and hit "Submit" smile
It will hang on GIMMEH, so don't use it. It's currently able to handle:

Code:

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

KTHXBYE

I hope I'll be able to run brainfuck interpreter on that soon smile

Last edited by viraptor (2007-10-10 01:07:31)

Offline

 

#4 2007-10-11 02:29:51

viraptor
Moderator
From: Bath / UK
Registered: 2007-08-15
Posts: 20
Website

Re: Erlol

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 wink

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 big_smile (also - take that LAMP !!)

Last edited by viraptor (2007-10-11 02:36:03)

Offline

 

#5 2007-10-13 22:09:46

viraptor
Moderator
From: Bath / UK
Registered: 2007-08-15
Posts: 20
Website

Re: Erlol

Updated,
- WTF?, OMG, OMGWTF switch working
- O RLY? with MEBBE-s working
- comments working

only functions and string processing left AFAIK smile

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

 

#6 2007-10-14 12:08:39

atl
BDFL
From: lolcode.com
Registered: 2007-05-31
Posts: 324
Website

Re: Erlol

yeah, you just sign in and create the page--it's a wiki after all! Once it's created, I lock it down to your username.

Offline

 

#7 2007-10-14 15:53:50

atl
BDFL
From: lolcode.com
Registered: 2007-05-31
Posts: 324
Website

Re: Erlol

There you go. It's locked down to your account so you're the only editor.

Offline

 

#8 2008-01-07 11:19:09

viraptor
Moderator
From: Bath / UK
Registered: 2007-08-15
Posts: 20
Website

Re: Erlol

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 smile
Parser gets some readable errors implemented, but not for every case (with row/col tracking).

In short - something is happening, I'm not dead smile

Offline

 

#9 2008-01-08 07:03:10

Coda
Moderator
Registered: 2007-10-30
Posts: 308

Re: Erlol

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

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson