It's not really a contribution, more of a thanks for giving me a bundle of laffs. I'm currently writing some real life code for a railway station, and just had to jump on the bandwagon. So… as I code in c, I have myself a new header file. Here's a fragment of code I've produced. I know my syntax is different from ISO lolcode, but I think it works nicely. Will be installed on site early July. I think LOL is probably the expression I would use.
#include <lolcode.h> static void * teh ServerCallback(struct NETSTREAM * teh NetStream, DWORD teh Callback, DWORD teh dwParam, void * teh pParam) { void * teh Result = NULL; wtf (teh Callback) { iz teh NS_CONNECT: { struct in_addr sin; char *pIP; teh sin.S_un.S_addr = dwParam; teh pIP = inet_ntoa(sin); mebbe (IsLocalHost(pIP)) // only accept from local host teh Result = (void *)TRUE; mebbe (Debug) txt("%s has connected\n", pParam); kthx; } iz teh NS_DISCONNECT: { mebbe (Debug) txt("%s has disconnected\n", pParam); kthx; } .... whatever: { txt("error: callback code %d\n", nCallback); kthx; } } }
BTW header file looks like this:
// shamelessly plundered from lolcode.com #define kthxbye exit #define kthx break #define gimme getch #define mebbe if #define nowai else #define wtf switch #define iz case #define whatever default // omg must be useful - maybe that's an exception #define moar continue #define hai main #define teh // just whitespace #define also && #define txt printf
— Dave, 2007/05/30 17:04