OdinsCat
Posts: 13
Joined: Wed Jun 05, 2019 7:27 pm

I wants LOLcodes!

Wed Jun 05, 2019 10:24 pm

The LOLcodes programming languege is basically a tough thing to crack yet I think I could handle it as a first programing language due to the amount of support the internet has for learners for free. I keep trying to learn python but something always gets in the way. Does anyone know a LOLcode Compliler for Pi?

Heater
Posts: 12629
Joined: Tue Jul 17, 2012 3:02 pm

Re: I wants LOLcodes!

Thu Jun 06, 2019 2:44 am

Hysterical.

I mean "LOL".

Code: Select all

Does anyone know a LOLcode Compliler for Pi?
Compiler no, but you could just follow the instructions for building the LOLcode interpreter here https://github.com/justinmeza/lci

Or is that TLDR?

PhatFil
Posts: 1223
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: I wants LOLcodes!

Thu Jun 06, 2019 3:46 am

No Bad idea learn python or C or Basic or even COBOL before LOL imho..

programming is similar to driving in the sense that once you can drive you can drive a sports car, a family car, a bus an ambulance a van ......
and once you can program in C you can read basic code or pascal or python and understand 90% at first glance. and what you dont get straight away you will have a pretty good clue what and where to look it up.

LOL however is too dissimilar and while it may work well in a class room with a tutor and syllabus, if teaching yourself with online resources you will be limiting yourself severely. less info and unlike the established mainstream languages which have more in common with each other you will not be able to as easily pull an algorithm or method found in psuedo code or another language and use it in your lol solutions.

i am a grumpy ol git but at first glance LOL looks like an orwellian kompootar newspeak dreamt up by a committee to appeal to hoody yoofs.
the simplest type to understand has to be boolean, not so with LOL tho.. imho they should rename it WTF
**

Heater
Posts: 12629
Joined: Tue Jul 17, 2012 3:02 pm

Re: I wants LOLcodes!

Thu Jun 06, 2019 4:23 am

PhatFil,
No Bad idea learn python or C or Basic or even COBOL before LOL imho..
I think you might be taking this a bit more seriously than it was intended.

It's funny how you say that whilst ending your sentence with "imho" :)
..if teaching yourself with online resources you will be limiting yourself severely.
I don't know. LOLcode seems quite well specified and documented here: https://github.com/justinmeza/lolcode-spec

And has an active user community here: https://groups.google.com/forum/#!forum/lci-general
i am a grumpy ol git but at first glance LOL looks like an orwellian kompootar newspeak dreamt up by a committee to appeal to hoody yoofs.
Not at all. It's the vision of one man: http://www.justinmeza.com/

LOLcode does away with cryptic beginner unfriendly curly braces and such in favor of keywords they can readily recognize. For example:

Code: Select all

COLOR, WTF?
  OMG "R"
    VISIBLE "RED FISH"
    GTFO
  OMG "Y"
    VISIBLE "YELLOW FISH"
  OMG "G"
  OMG "B"
    VISIBLE "FISH HAS A FLAVOR"
    GTFO
  OMGWTF
    VISIBLE "FISH IS TRANSPARENT"
OIC
Being LOL it's not be as verbose as former languages that have done this, like COBOL.

All in all, brilliant.

User avatar
Imperf3kt
Posts: 2389
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: I wants LOLcodes!

Thu Jun 06, 2019 4:56 am

Is that really a LOLcode sample?
Simple might be your interpretation, but it's not what I'd use to describe it.

Still, people are free to use whatever they want. I don't think I'll be using it though, I'll stick to Python, as it looks easier to me.
Google is ubiquitous - Try it today, it's free!
https://opensource.com/life/16/10/how-ask-technical-questions

PhatFil
Posts: 1223
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: I wants LOLcodes!

Thu Jun 06, 2019 5:41 am

Heater wrote:
Thu Jun 06, 2019 4:23 am

I think you might be taking this a bit more seriously than it was intended.
I have to concur as after a number or rereads of the OP i dont see any humour. Totally 747 or flying at ground effect height.. not that i claim a 20.20 witt . Not the first time, and probably not the last either...


ironically it strikes me as quite verbose compared to some languages, M/Mumps/cache-object-script now thats concise.. , and if coding a lot of output the extra 2 chars in visible above those in print or write is bound to add up (P im mumps)
#1 brackets are a universally understood method of noting and forcing precedence of execution or evaluation so omitting them could be limiting?
#2 While curly bracket counting/matching can be a pain - good practice would be to redesign to a level that your writing atomic functions that dont contain a vast curly bracket count in the first place..

but the main thrust of my argument is that the syntax and structure is so dissimilar from the norm. So that when it comes to starting to develop your own projects the pickings for inspiration, and opportunities to simply lift logic from projects in a similar vein but following a different implementation path would be severely limited. And as that is when the real learning starts in my Very humble opinion, It may not be the easiest path to programming competence and confidence.

I am sure LOL has its diamond features, in my glance at the github readme i scanned down to the variables.types, and operators overlooking any aims or goals of the project. And my evaluation is solely as its value as a first language to learn as use of the word 'first' does indicate a desire to broaden the scope of learning beyond a single language.

to the OP by all means learn LOL, i am now kinda obligated to go back for a longer look see too, just make it #3 or 4 on the list..

Heater
Posts: 12629
Joined: Tue Jul 17, 2012 3:02 pm

Re: I wants LOLcodes!

Thu Jun 06, 2019 5:58 am

Imperf3kt,
Is that really a LOLcode sample?
Sure.
Simple might be your interpretation, but it's not what I'd use to describe it.
What the problem?

Anyone who has been online for a while knows what "WTF", "OMG", "GTFO" etc mean. That is most kids today.

Most languages have a multi-way conditional construct, like "switch" in C.

So just looking at the form of the thing you can guess accurately what it does even without knowing details of the language.

How is that LOLCODE example any harder than a switch in C? Python does not even have such a simple construct!

Perhaps a complete LOLCODE program would aid understanding:

Code: Select all

HAI 1.2 
    BTW Heater's first LOLCODE

    OBTW Function to calculate the n'th Fibonacci number
         The recursive way.
    TLDR
    HOW IZ I fibo YR n
        I HAS A result 
        BOTH SAEM n AN 0
        O RLY?
        YA RLY
            result R 0
            FOUND YR result
        OIC

        BOTH SAEM n AN 1
        O RLY?
        YA RLY
            result R 1
            FOUND YR result
        OIC
        I HAS A f1 ITZ I IZ fibo YR DIFF OF n AN 1 MKAY
        I HAS A f2 ITZ I IZ fibo YR DIFF OF n AN 2 MKAY
        result R SUM OF f1 AN f2
        FOUND YR result
    IF U SAY SO

    VISIBLE "fibo(20) = " I IZ fibo YR 20 MKAY
KTHXBYE
Runs like so:

Code: Select all

$ lci fibo.lolcode
fibo(20) = 6765

ejolson
Posts: 3034
Joined: Tue Mar 18, 2014 11:47 am

Re: I wants LOLcodes!

Thu Jun 06, 2019 6:53 am

Heater wrote:
Thu Jun 06, 2019 5:58 am
Imperf3kt,
Is that really a LOLcode sample?
Sure.
Simple might be your interpretation, but it's not what I'd use to describe it.
What the problem?

Anyone who has been online for a while knows what "WTF", "OMG", "GTFO" etc mean. That is most kids today.

Most languages have a multi-way conditional construct, like "switch" in C.

So just looking at the form of the thing you can guess accurately what it does even without knowing details of the language.

How is that LOLCODE example any harder than a switch in C? Python does not even have such a simple construct!

Perhaps a complete LOLCODE program would aid understanding:

Code: Select all

HAI 1.2 
    BTW Heater's first LOLCODE

    OBTW Function to calculate the n'th Fibonacci number
         The recursive way.
    TLDR
    HOW IZ I fibo YR n
        I HAS A result 
        BOTH SAEM n AN 0
        O RLY?
        YA RLY
            result R 0
            FOUND YR result
        OIC

        BOTH SAEM n AN 1
        O RLY?
        YA RLY
            result R 1
            FOUND YR result
        OIC
        I HAS A f1 ITZ I IZ fibo YR DIFF OF n AN 1 MKAY
        I HAS A f2 ITZ I IZ fibo YR DIFF OF n AN 2 MKAY
        result R SUM OF f1 AN f2
        FOUND YR result
    IF U SAY SO

    VISIBLE "fibo(20) = " I IZ fibo YR 20 MKAY
KTHXBYE
Runs like so:

Code: Select all

$ lci fibo.lolcode
fibo(20) = 6765
IZ 2 BAD DAT SUCH AN EASY 2 UNDERSTAND PROGRAMMIN LANGUAGE DOESNT HAS BUILT-IN HOOJ NUMBR SUPPORT. IF IT DID DEN U CUD ADD ANOTHR LANGUAGE 2 DIS GITHUB ARCHIV.

http://speaklolcat.com/

PhatFil
Posts: 1223
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: I wants LOLcodes!

Thu Jun 06, 2019 6:55 am

Heater wrote:
Thu Jun 06, 2019 5:58 am
Anyone who has been online for a while knows what "WTF", "OMG", "GTFO" etc mean. That is most kids today.
well i have been online for well over 20 years and i had to right click on GTFO quite a few F's for a kiddy friendly site, and in my not so limited experience with F's and programming, when you type em in they always show up in the test data when the customer is looking.. And Fs are best shouted AT the code whilst atomising stale coffee and pepperoni at the screen cira 3am Shirley.

the penny slowly drops as if through cold treacle......

Heater
Posts: 12629
Joined: Tue Jul 17, 2012 3:02 pm

Re: I wants LOLcodes!

Thu Jun 06, 2019 7:07 am

ejolson,

ALREADY THOT OV DAT
SADLY LOLCODE DOEZ NOT HAS ARRAYS YET SO MAKIN R OWN HOOJ NUMBERS WUD BE PAIN 2

Heater
Posts: 12629
Joined: Tue Jul 17, 2012 3:02 pm

Re: I wants LOLcodes!

Thu Jun 06, 2019 7:28 am

ejolson,

AT LEAST LOLCODE IZ EASIR 2 START WIF THAN SMALLTALK

:)

ejolson
Posts: 3034
Joined: Tue Mar 18, 2014 11:47 am

Re: I wants LOLcodes!

Thu Jun 06, 2019 8:01 am

Heater wrote:
Thu Jun 06, 2019 7:28 am
AT LEAST LOLCODE IZ EASIR 2 START WIF THAN SMALLTALK
INDED, BUT 4 DA ORANGE KAT IT HAS ALL TEH REQUIRD FEATUREZ NEEDD 4 GUD BEGINNIN COMPUTR LANGUAGE.

hippy
Posts: 5336
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: I wants LOLcodes!

Thu Jun 06, 2019 12:02 pm

Heater wrote:
Thu Jun 06, 2019 7:07 am
ejolson,

ALREADY THOT OV DAT
SADLY LOLCODE DOEZ NOT HAS ARRAYS YET SO MAKIN R OWN HOOJ NUMBERS WUD BE PAIN 2
Yoo sure man ?

https://www.tutorialspoint.com/lolcode/ ... amples.htm

Yo beat I to it wi yo fibo. Tis waz me take on tings man -

ihazfibo.rotflmao

Code: Select all

HAI 1.2

HOW IZ I FIBOFAT YR MUM
   BTW FIBONACCI MAN IS HOT
   BOTH SAEM MUM AN 0, O RLY?
     YA RLY, FOUND YR MUM
   OIC
   BOTH SAEM MUM AN 1, O RLY?
     YA RLY, FOUND YR MUM
   OIC
   I HAS A FATBOY ITZ DIFF OF MUM AN 1
   I HAS A SADBOY ITZ DIFF OF MUM AN 2
   I HAS A FATFIB ITZ I IZ FIBOFAT YR FATBOY MKAY
   I HAS A SADFIB ITZ I IZ FIBOFAT YR SADBOY MKAY
   I HAS A YARDIE ITZ SUM OF FATFIB AN SADFIB
   FOUND YR YARDIE
IF U SAY SO

I HAS A TING ITZ 24
VISIBLE "YO TING IZ " TING " AN YO FIBO MAN SEZ " I IZ FIBOFAT YR TING MKAY
KTHXBYE

Code: Select all

cd ~
git clone https://github.com/justinmeza/lci.git
cd lci
python install.py -j 1 --prefix="/home/pi/ffs"
../ffs/bin/lci ihazfibo.rotflmao

Code: Select all

YO TING IZ 24 AN YO FIBO MAN SEZ 46368

real    0m3.917s
user    0m3.900s
sys     0m0.010s
Iz fast no ?

I no impress wit declare varz man; "I HAS". Who nonsense that ? All bro know it "I HAZ" !!!

Heater
Posts: 12629
Joined: Tue Jul 17, 2012 3:02 pm

Re: I wants LOLcodes!

Thu Jun 06, 2019 12:28 pm

hippy,

DUDE, BRO, with all due respect I had you ass whipped already in this post: posting.php?mode=reply&f=31&t=242139#pr1477077

Code: Select all

$ cat fibo.lol
HAI 1.2
    BTW First LOLCODE test

    OBTW Function to calculate the n'th Fibonacci number
         The recursive way.
    TLDR
    HOW IZ I fibo YR n
        I HAS A result
        BOTH SAEM n AN 0
        O RLY?
        YA RLY
            result R 0
            FOUND YR result
        OIC

        BOTH SAEM n AN 1
        O RLY?
        YA RLY
            result R 1
            FOUND YR result
        OIC
        I HAS A f1 ITZ I IZ fibo YR DIFF OF n AN 1 MKAY
        I HAS A f2 ITZ I IZ fibo YR DIFF OF n AN 2 MKAY
        result R SUM OF f1 AN f2
        FOUND YR result
    IF U SAY SO

    VISIBLE "fibo(24) = " I IZ fibo YR 24 MKAY
KTHXBYE
$
$ time lci fibo.lol
fibo(24) = 46368

real    0m0.476s
user    0m0.453s
sys     0m0.000s
Since then I discovered LOLCODE does have arrays, although not finalized or documented, could not for the life of me figure out how to make them work!

Your example does not deal in HOOJ numbers or arrays but THX, I think the link you gave may help.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 22691
Joined: Sat Jul 30, 2011 7:41 pm

Re: I wants LOLcodes!

Thu Jun 06, 2019 12:30 pm

I am seriously considering closing this thread. It's complete nonsense. First, last, and only warning.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

Heater
Posts: 12629
Joined: Tue Jul 17, 2012 3:02 pm

Re: I wants LOLcodes!

Thu Jun 06, 2019 12:49 pm

jamesh,

Nonsense, perhaps.

But why the downer on having a little bit of light-hearted fun with an esoteric programming language?

It's an entertaining challenge, that runs on a Pi.

hippy
Posts: 5336
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: I wants LOLcodes!

Thu Jun 06, 2019 1:40 pm

The dividing line between "nonsense" and "esoteric" is as thin as between "genius" and "insane" and greatly depends on one's starting perspective.

Whatever the merits of LOL Code, or lack of; if it causes just one person to write a program or take an interest in programming when they wouldn't have otherwise, I would say it has some.

I think these nonsense and esoteric languages are useful if only in showing there is some other way, and sometimes they do prove more useful than they first seem. Especially if they actually embrace some fundamentally important concept as is the case with BF.

If someone seriously wants to program in LOL code then my attitude would be; good for you, go for it. And, if they want to make it better, improve the language, implement compilers and interpreters themselves, or even 'spread the word', it's not really any different in that respect to any other language. Whatever gets them aboard, whatever floats their boat.

The real problem with categorising languages as 'nonsense', unworthy of mention or discussion, is where one draws the line. Some might argue that LOL code is no worse than BF, Forth, Lisp or Smalltalk, possibly even better.

User avatar
thagrol
Posts: 1613
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: I wants LOLcodes!

Thu Jun 06, 2019 2:01 pm

Heater wrote:
Thu Jun 06, 2019 5:58 am
Anyone who has been online for a while knows what "WTF", "OMG", "GTFO" etc mean. That is most kids today.
Really? Only about 20% of the world's population speak english and roughly 75% of those do so as a second (or third, or forth, ...) language.

Your assumption is clearly incorrect and by extension so is that of the deisgner of LOL.
This space unintentionally left blank.

hippy
Posts: 5336
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: I wants LOLcodes!

Thu Jun 06, 2019 2:08 pm

thagrol wrote:
Thu Jun 06, 2019 2:01 pm
Heater wrote:
Thu Jun 06, 2019 5:58 am
Anyone who has been online for a while knows what "WTF", "OMG", "GTFO" etc mean. That is most kids today.
Really? Only about 20% of the world's population speak english and roughly 75% of those do so as a second (or third, or forth, ...) language.

Your assumption is clearly incorrect and by extension so is that of the deisgner of LOL.
But isn't that mostly just as true for traditional programming languages where we rely on idioms which are just as obscure to many in the world ?

I am wondering if LOL Code doesn't give us a glimpse into how any programming language looks to anyone who first encounters one, some insight into how a programming language looks to anyone who isn't a native English speaker. There may be something to learn from that.

User avatar
thagrol
Posts: 1613
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: I wants LOLcodes!

Thu Jun 06, 2019 2:34 pm

hippy wrote:
Thu Jun 06, 2019 2:08 pm
thagrol wrote:
Thu Jun 06, 2019 2:01 pm
Heater wrote:
Thu Jun 06, 2019 5:58 am
Anyone who has been online for a while knows what "WTF", "OMG", "GTFO" etc mean. That is most kids today.
Really? Only about 20% of the world's population speak english and roughly 75% of those do so as a second (or third, or forth, ...) language.

Your assumption is clearly incorrect and by extension so is that of the deisgner of LOL.
But isn't that mostly just as true for traditional programming languages where we rely on idioms which are just as obscure to many in the world ?

I am wondering if LOL Code doesn't give us a glimpse into how any programming language looks to anyone who first encounters one, some insight into how a programming language looks to anyone who isn't a native English speaker. There may be something to learn from that.
Indeed. I have sometimes wondered what the impact of many(most?) programing languages being derived from enlish is. Do you learn english first? Second? Or never and just treat the english words as some obscure iconography for concepts in your native language.

I imagine it's worse if you have to learn the English alphabet too.

The point I was trying to make was that Heater was speaking generaly about some very english language specfic terms. I know that in someways his position was natural for a native englsh speaker but this is a global forum.

And let's not forgot that former PM David Cameron famously got the meaning of "LOL" wrong.

Edit:
And let's also not forget that some of those terms (WTF, GTFO, etc) aren't exactly child friendly.
This space unintentionally left blank.

Heater
Posts: 12629
Joined: Tue Jul 17, 2012 3:02 pm

Re: I wants LOLcodes!

Thu Jun 06, 2019 3:16 pm

thagrol,

It's a fair cop. I was generalizing. Extrapolating beyond any reasonable measure.

hippy
Posts: 5336
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: I wants LOLcodes!

Thu Jun 06, 2019 3:19 pm

thagrol wrote:
Thu Jun 06, 2019 2:34 pm
And let's also not forget that some of those terms (WTF, GTFO, etc) aren't exactly child friendly.
It's a difficult one that. I would say it would be less appropriate to discuss or promote LOL code on CodeClub than it is here. Here I would say people have to be more tolerant of what they themselves might not approve of. I would also note it is teens themselves who have embraced LOL code and don't find their language half as offensive as others might choose to on their behalf.

There doesn't seem to be a Derek & Clive Programming Language. Yet.

OdinsCat
Posts: 13
Joined: Wed Jun 05, 2019 7:27 pm

Re: I wants LOLcodes!

Thu Jun 06, 2019 4:28 pm

What that many people commented. I just wanted to know if it was posible and if so how to do it?

Heater
Posts: 12629
Joined: Tue Jul 17, 2012 3:02 pm

Re: I wants LOLcodes!

Thu Jun 06, 2019 4:34 pm

OdinsCat,
I just wanted to know if it was possible and if so how to do it?
Is that still a question? Did you have any luck with the instructions I linked to earlier here?

hippy
Posts: 5336
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: I wants LOLcodes!

Thu Jun 06, 2019 4:36 pm

OdinsCat wrote:
Thu Jun 06, 2019 4:28 pm
I just wanted to know if it was posible and if so how to do it?

Code: Select all

cd ~
sudo apt-get install cmake
git clone https://github.com/justinmeza/lci.git
cd lci
python install.py --prefix="."
./lci yourfile.lol
Last edited by hippy on Fri Jun 07, 2019 11:11 am, edited 1 time in total.

Return to “General programming discussion”