www.nickhodge.com

microsoft, munging and on being a mercurial iconoclastic professional geek.

Archive for the ‘lolcode’ Category

istartedsomething on LOLCODE

without comments

istar­ted­something reports on Joel’s and my present­a­tion of LOLCODE.

LOL.

Long gets it.

Written by Nick Hodge

August 9th, 2007 at 5:35 pm

LOLCODE IN UR TECHED WebJam BarCampSydney WWEE Summit

with 6 comments

Dis­claimer: this is just for LOLZ.

Video thumbnail. Click to play
Click To Play

  1. For fur­ther ref­er­ence on LOLCATS: I CAN HAS CHEEZBURGER 
  2. ps: U CAN HAS TSHIRT AT store.lolcode.com
  3. To decon­struct and see the his­tory of LOLCATS: Anil Dash
  4. The obvi­ous wiki­pe­dia entry for LOLCATS
  5. LOLCATS takes the memes of the inter­net, stand­ard­izes them with funny pic­tures of cats. As LOLCATS is main­stream (ref: http://www.news.com.au/story/0,23599,21988724–2,00.html and ref: http://www.chron.com/disp/story.mpl/business/4862013.html) Oh Noes!
  6. LOLCODE: tak­ing the lan­guage: syn­tax, gram­mar, vocab­u­lary — but more import­antly the memes of LOLCATS into an eso­teric pro­gram­ming lan­guage Other eso­teric pro­gram­ming lan­guages include Var’aq, INTERCAL, and Omgrofl
  7. Mitch Denny the­ory: we’ll com­mu­nic­ate in shortened phrases and memes as com­mon under­stand­ings. eg: Star Trek:TNG epis­ode: Dar­mok. Note Mitch Denny is Star Wars, not Star Trek — so this ref­er­ence may be lost on Mitch.
  8. Examples:
    Stage 1: http://www.nickhodge.com/blog/archives/2025
    Stage 2: LOLCODE HAS LULZ http://forum.lolcode.com/viewtopic.php?id=304
    Stage 3: Seems that the lan­guage dir­ec­tion is dynamic, more like Javas­cript than C# 2.0 (eg: BUKKITS as arrays and slots; like )
  9. LOLCODE.net : com­piles down to IL. Really big thanks to Joel Pobar for his expert com­ments and advice for all on LOLCODE.Net
  10. LOLCODE Spe­cific­a­tion is presently at 1.2 with lively dis­cus­sion in the for­ums on lol­code. And an example of the com­munity cre­at­ing a language.
  11. U CAN HAS LOLCODE?

Written by Nick Hodge

August 9th, 2007 at 12:53 pm

LOLCODE: Part 4, A New Beginning

with 2 comments

Time to LOLCODE. Watch­ing the for­ums, it’s fun watch­ing the defin­i­tion of a pro­gram­ming lan­guage where the gram­mar is obvious.

And I’ve also thought of a great, quot­able reason to use LOLCode:

Nick Hodge, Enthu­si­ast Evan­gel­ist for Microsoft, recom­mends the invest­ig­a­tion of LOLCODE as Enterprise-worthy Pro­gram­ming Lan­guage if your devel­op­ment pro­ject has a strong require­ment to enter­tain future sys­tem main­ten­ance engin­eers, and your present devel­op­ment team gets LOLCATS humor.” You can quote me on that.

What was not imme­di­ately obvi­ous, another effort is to make your lines of LOL­Code funny. Care­ful choice of vari­able names should res­ult in LULZ.

There were a few occa­sions where I had a peek at the C# source code of the LOL­Code com­piler. It will be inter­est­ing to see how much of the engine that makes the com­piler is taken over by the new DLR, and how hard/easy it is to cre­ate a domain spe­cific lan­guage. The DLR con­tains mainy of the infra­struc­ture pieces, such as cre­ation of abstract syn­tax trees, etc.

Note that these examples com­piled with LOLCODE.Net Build 35, and are based on the 1.2 spe­cific­a­tion.

First pro­gram: Hello World

HAI
VISIBLE “hello world“
KTHXBYE

What’s going on here? HAI is the indic­a­tion of the begin­ning of the lol­code app; KTHXBYE is the end.

VISIBLE “hello world” prints out, well, hello world.

Second pro­gram: Get­ting Input

HAI
    I HASFLUFFYZ
    VISIBLE “ur namez is?”
    GIMMEH LINE FLUFFYZ
    VISIBLE “hello “!
    VISIBLE FLUFFYZ
KTHXBYE

So, what’s going on this time?

I HAS A FLUFFYZ– declares a vari­able called FLUFFYZ

GIMMEH LINE FLUFFYZ– gets some input, in this case from the keyboard

The exclam­a­tion mark at the end of the VISIBLE “hello “! keeps the prin­tout on the same line

VISIBLE FLUFFYZ prints out the con­tent of the vari­able FLUFFYZ. Simple

Third pro­gram: Loop­ing, Conditionals

HAI
I HAS A LIFE ITZ 1
I HAS A OSCARZ ITZ 10
IM IN YR HEADSPIN UPPIN YR LIFE TIL BOTH SAEM LIFE AN OSCARZ
    VISIBLE LIFE
IM OUTTA YR HEADSPIN
KTHXBYE

This code example should work; it com­piles in lolc but neatly stops when run­ning in the CLR. The new parts are the assign­ment of a value to a vari­able (I HAS A LIFE ITZ 1)

Secondly, the line  “I am in your loop increas­ing your LIFE until both-the same life and OSCARZ” is a simple loop with incre­ment and a test.

The “IM IN YR HEADSPIN” is an example/attempt at humor. HEADSPIN is the name of the loop. Craft­ing these names to some­thing funny will provide a future code main­ten­ance geek some LULZ in the future.

Written by Nick Hodge

August 3rd, 2007 at 11:54 am

Mind Migration: Orcas / Visual Studio 2008 Beta 2 and LOLCODE.net

with 3 comments

aka: I CAN HAS EAT FREEWILLY NOW?

before read­ing this: note I am a scripter at best; and am learn­ing C# and all the Microsoft tools. I know more than I’ve done which means I am super dan­ger­ous. Doing this is purely an exper­i­ment in what is pos­sible, not what really should be done to ensure that the world cools down so whales don’t get eaten by Orcas.

Why LOLCODE.net? Does the world really need another obscure pro­gram­ming language?

Why doesn’t the world have one stand­ard lan­guage. You know, like French or English?

The brain is a strange thing. Lan­guage helps people com­mu­nic­ate ideas, or memes, from one per­son to another.

Pro­gram­ming Lan­guages are more form­al­ised as they map to a very bin­ary com­puter under­neath. No memes here.

Mak­ing a pro­gram­ming lan­guage from a meme is an attempt to bridge the LULZ we have in our head to the mundane art of punch­ing in zeros and ones. Eso­teric pro­gram­ming lan­guages r0x0rz

Enough eso­teric blath­er­ing on lan­guages as noone cares and onto my per­sonal LOLCODE  journey.

http://lolcode.com/ is LOLCODE cent­ral, where the lan­guage is being form­ally spe­cified (more form­ally than Ruby, albeit less func­tional. Pun, get it?)

Orcas. Sort of like a black-and-white cat of the sea that eats seals, but has no paws. Orcas are pretty smart beast­ies. Love eat­ing the tongues of whales. Funny code name for Visual Stu­dio 2008. For this, I’ve installed beta 2.

LOLCode.net. Grab the .zip file from the archive and pop into a dir­ect­ory “c:\program files\lolcode\”

Readme.txt:
This dis­tri­bu­tion includes the com­piler (lolc.exe), com­piler lib­rary (lolcode.net.dll),
stand­ard lib­rary (stdlol.dll) and code samples.

Read the readme. Hmm, accord­ing to the Readme and the LOLCODE forum, “We’d need MSBuild sup­port and a VS exten­sion”. Quick live.com search on msbuild. Ah, msbuild is a build plat­form. Gotcha. Visual Stu­dio exten­tion.  Now that looks harder.

Might just stick to the doc­u­ment­a­tion and use com­mand line. Firstly, let’s stick the dir­ect­ory into my %PATH%

OK, run cmd

type cd c:\Program Files\LOLcode\

Let’s be brace and just lolc fulltest.lol   (that is, com­pile the .lol file fulltext.lol)

Error at line: 2. “Lib­rary ‘STDIO’ not found” (line sez: CAN HAS STDIO?)

Prob­ably best to go from source. I’ve been put­ting this off for months: it’s time for an SVN cli­ent for Win­dows. Off to Tor­toiseSVN so I can down­load a build.

Using Tor­toiseSVN check­out http://lolcode-dot-net.googlecode.com/svn/trunk/ Revi­sion 35 at the time of posting.

Double-click on the .sln file (Visual Stu­dio solu­tion file) and con­vert to VS2008.

Ahh, 51 com­pile errors and 17 warn­ings. Need NUnit. http://nunit.org/ here I come. Installed, and 0 com­pile errors, 11 warn­ings. For­get the warn­ings. If they were ser­i­ous, they’d be errors. Coolio. Set my code to gen­er­ate a Release version.

Again, run cmd

cd C:\Program Files\LOLcode\lolc\bin\Release

lolc test.lol

Suc­cess! I have a test.exe

test

Num­ber guess­ing game. I CAN HAS LOLCODE, com­piled from source.

 

Tech­nor­ati Tags: , ,

Written by Nick Hodge

July 31st, 2007 at 6:27 pm

LOLCODE at TechEd 2007, Australia [Update 23rd July 2007]

with 10 comments

lolcode tshirt

TechEd, from a newcomer’s per­spect­ive, needs more cow­bell. http://twitter.com/atl intro­duced us all to the world’s new­est pro­gram­ming lan­guage in May.

Based on a demo­cratic yet tech­no­lo­gic­ally flawed vote on http://nickhodge.com/ pop­u­lar opin­ion is that LOLCODE should be presented.

There­fore, Chuck has let me sub­vert the hier­archy and made a slot for me to present the following:

Thursday 9th August

12:45pm-1:15pm   NIck Hodge: LOLCODE. CAN HAS NEW .NET LANGUAGE. LOLCODE IZ IN UR TECHED. C U THERE. KTHXBAI

Just the thing to start the day, and shake off any resid­ual hangover.

Not sure what I’ll get to cover in a mere 30 minutes. Maybe LOLCODE will get into the key­note for 2008?

Buy the t-shirt at http://store.lolcode.com/

Tech­nor­ati Tags:

Written by Nick Hodge

July 4th, 2007 at 4:16 pm

Poll Results:

without comments

Written by Nick Hodge

June 15th, 2007 at 6:18 pm

I CAN HAS LOLCODE.COM T-SHIRT

with 5 comments

As the LOLCATS meme goes TechEd; here one of my submissions:

techedlolcat

Now, in the interest of learn­ing new pro­gram­ming lan­guages: I pur­chased a LOLCODE.com T-shirt. What was inter­est­ing was the non-geeks look­ing at me strangely. People already think I am “out there”, and the LOLCODE t-shirt just proves it.

Before you start dis’in my new lan­guage of choice, there is a Visual Stu­dio 2005 with syn­tax high­light­ing and Intel­li­s­ense and a .Net ver­sion on the way.

So, my ques­tion to the developer com­munity: do we need a spe­cial BOF LOLCODE ses­sion at TechEd 2007?

Written by Nick Hodge

June 15th, 2007 at 6:06 pm