I am currently in the pre-pre-pre-alpha-alpha stage of getting a working LOLCODE interpreter on a FRC Robot.
Could one of you please take a look at the attatched TGZ and see how hard it would be to hack in a basic WPI library?
It follows the LOLCODE 1.2 spec, but it has objects (bukkits) and less strict typing (if at all). I also added PWNZ OF (>) and OWNZ OF (<) to make programmin’ a lot easier.
Well so far it has all of the LOLCODE spec. From this point on I would leave those files alone and make use of the I CAN HAZ command. Example:
I CAN HAZ WPILIB 2010
That would activate an extension (hooks onto the bottom of the main parser function) which parses for commands that you created. Then you can keep legacy support for changes to WPILib.
Here’s the kind of thing I see in the WPILib extension:
HOW DUZ CONSTRUCT
I SEE THAT JAGUAR ON PORT <port>
I SEE THAT ENCODER ON PORT <port>
I SEE THAT COMPRESSOR ON PORTS <spike port> AND <switch port>
I SEE THAT JOYSTICK ON PORT <port>
IF U SAY SO
HOW DUZ TELEOP
JAGUAR <port> GO <some NUMBAR value>
ENCODER <port> GIMMEH <input variable>
JOYSTICK <port> GIMMEH <input variable>
IF U SAY SO
I am as serious as the following text is bolded: YA RLY
and the code would be at the LOLCODE 1.2 spec (with bukkits and P/OWNZ OF) ex:
O HAI IM ROBOT
HOW DUZ I NERF YR BEERZ?
FOUND YR DIFF OF BEERZ AN 1
IF U SAY SO
KTHX
HAI 1.2
CAN HAS STDIO?
I HAS A FOOL ITZ LIEK A ROBOT
FOOL!!NERF 2
VISIBLE IT
KTHXBYE
I am working with the author of this lolcode parser (http://www.icanhaslolcode.org) to do this, and we kinda need a zip of the c/++ api (I programmed my team’s robot in Java), so if you can provide that, please do :D.
The attached makefile & utils is from AustinSchuh:
I have a couple scripts and patches that I’ve collected up that let me build WPILib and pull down the latest.
My makefile pulls down the latest WPILib (you need to point it to the latest version when that changes), patches it (I found a bug, and the makefile needs to get swapped out for it to build), pulls down the latest GCC compiler that is needed to compile for the cRIO, and then builds the code. So, once all the pieces are found and together, it works like a charm.
If I’m doing things right, and you have all the unlisted prerequisites, all you should have to do is type make in the MainRobot directory. And then wait. Make sure you have wput, ftp, and wine, to start with.
The paths might not seem to make the most sense now, but I’m pulling things from our repository and this is how things are set up.
Type *make *to build the code
Type make deploy to deploy the code. You will have to edit the makefile to change all IP addresses from 10.9.71.2 to your team number.
And that’s it. If you want to add more source files, add them on the line that goes something like MainRobot.o.
Once you are that far, you can start poking at it a bit more. It’s definately not the most polished makefile in existence.