Monday, June 9, 2008

Protocopter!

It's like flying... only you're coding.


So... recently Coda (I'll refer to him using his internet identity), and I have decided to fork off of LOLCode (we were running into stumbling blocks currently) and implement a language with all the features we've been designing for lolcode, except with a friendlier, less-ambiguous syntax for parsers (so we could write one easily). This of course would then let us source-to-source LOLCode files into our emerging interesting language. Hence, the birth of Protocopter.


<Disclaimer> Coda and I are performing the fork, however all LOLers are welcome. Coda and I cannot steal credit for what the community has helped put together. We feel we can accomplish a LOLCode implementation easier if we have a language that has less dissonance with the LOLCode spec.

Protocopter is still in it's fetal stage, as Coda and I debate over various syntax issues. Please bear that in mind. So far, protocopter is a dynamic language with Prototype object orientation, and an interesting lisp-like syntax. </Disclaimer>


Here's some sample syntax from our recent discussions/draft:


[Object : either] <- function(lhs, rhs)(!if lhs true rhs)

[test] <- true
[test2] <- false

(!if (!either test test2) {
! console:print "One of these is true!"
})


A few notes here:
  • ! is the "execute" operator, and calls a function

  • : is the scope operator, and allows you to reference another scope

  • Object is the base-class prototype of ALL objects in protocopter. Scopes are also objects, so therefore the either function shows up in all scopes

  • We're debating the "function" syntax, but you can see the idea is, function takes an argument list and a lambda-expression (or s-expresion or whatever you want to call it).
  • { statement-block } defines a closure.

  • [ identifier ] is the allocation operator. It will allocate a "slot" on the current scope with the given name.



On a side note, recently I've been having a lot less free time (and a lot more random things to take care of at home). Instead of making dumber posts (like some might consider a lolcode post), I'm going to try to make sure this blog always has the best content I can provide, it just might be less frequently. Hope all [2,10) of you enjoyed this!

1 comments:

Logan said...

I, for one, thoroughly enjoyed the word "Protocopter."