Code: Select all
Does anyone know a LOLcode Compliler for Pi?
I think you might be taking this a bit more seriously than it was intended.No Bad idea learn python or C or Basic or even COBOL before LOL imho..
I don't know. LOLcode seems quite well specified and documented here: https://github.com/justinmeza/lolcode-spec..if teaching yourself with online resources you will be limiting yourself severely.
Not at all. It's the vision of one man: http://www.justinmeza.com/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.
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
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...
Sure.Is that really a LOLcode sample?
What the problem?Simple might be your interpretation, but it's not what I'd use to describe it.
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
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.Heater wrote: ↑Thu Jun 06, 2019 5:58 amImperf3kt,Sure.Is that really a LOLcode sample?What the problem?Simple might be your interpretation, but it's not what I'd use to describe it.
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:Runs like so: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 KTHXBYECode: Select all
$ lci fibo.lolcode fibo(20) = 6765
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.
Yoo sure man ?
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
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
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.
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 ?
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.hippy wrote: ↑Thu Jun 06, 2019 2:08 pmBut 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.
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.
Is that still a question? Did you have any luck with the instructions I linked to earlier here?I just wanted to know if it was possible 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