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

Re: I wants LOLcodes!

Thu Jun 06, 2019 5:51 pm

Okay how much work do I have to beyond typing that into the terminal?

timrowledge
Posts: 1345
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: I wants LOLcodes!

Thu Jun 06, 2019 6:19 pm

I’d say it is a pretty good mickey-take of the strained syntax that so many people consider ‘normal’ for programming.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

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

Re: I wants LOLcodes!

Thu Jun 06, 2019 7:41 pm

OdinsCat,
Okay how much work do I have to beyond typing that into the terminal?
None. That just works.

Of course you need to write or otherwise obtain a "yourfile.lol" file containing the LOLCODE program you want to run.

Use the text editor of your choice to do that. Or start by running one of the examples posted to this thread.

So I guess the work you have to do is learn the LOLCODE language. See the LOLCODE language specification here:
https://github.com/justinmeza/lolcode-s ... ec-v1.2.md

You will find example LOLCODE programs in the lci Github repository here: https://github.com/justinmeza/lci/tree/ ... /1.3-Tests
Memory in C++ is a leaky abstraction .

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

Re: I wants LOLcodes!

Thu Jun 06, 2019 7:56 pm

timrowledge,
I’d say it is a pretty good mickey-take of the strained syntax that so many people consider ‘normal’ for programming.
You might be right. We finally found a syntax that makes Smalltalk look readable :)
Memory in C++ is a leaky abstraction .

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

Re: I wants LOLcodes!

Fri Jun 07, 2019 12:03 am

Heater wrote:
Thu Jun 06, 2019 7:56 pm
We finally found a syntax that makes Smalltalk look readable :)
But if you go at it with a text editor and just global replace LOL Code phrases for Javascript terms you do end up with readable, if not great, Javascript.

Okay it's a little more complicated than that but something a simple program can translate and fix-up to turn into viable Javascript. It is more Javascript than C because of lack of typing.

"I HAS DOLLARS ITZ 100" isn't a million miles away from "var dollars = 100;"

So the syntax isn't that bad, it's more that it's unfamiliar, more verbose than we're used to, and it's at odds with our sensibilities. But from what I can remember of Cobol and dBase it's not the first.

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

Re: I wants LOLcodes!

Fri Jun 07, 2019 12:27 am

Back in the days of the big legal wrangling over the busting of the CSS encryption on DVD's there was serious argument as to whether software that decrypted DVDs could be banned as a "circumvention device" or whether it's publication was protected as free speech. After all, it was only text that one could print on a tee shirt!

See DVD John : https://en.wikipedia.org/wiki/Jon_Lech_Johansen and the DeCSS case.

Now, somebody set out to demonstrate that software was as much regular speech or writing by creating a Perl script that could turn C source code into plainly readable English, correct grammar and all, that described the code. Not only that but it could do the reverse, English into C that could be compiled.

What we have here with LOLCODE is a more direct way to do that. With a stripped down version of English spelling and grammar for sure but readable as such none the less. No translation to a "programming language" required to run it.

By the way, Javascript has types. I think what was meant was "dynamically typed".
Memory in C++ is a leaky abstraction .

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

Re: I wants LOLcodes!

Fri Jun 07, 2019 2:43 am

Heater wrote:
Thu Jun 06, 2019 7:41 pm
OdinsCat,
Okay how much work do I have to beyond typing that into the terminal?
None. That just works.
ON MAH RASPBERRY PI I HAD 2 FURST INSTALL CMAEK 4 DA BUILD 2 WERK USIN

Code: Select all

$ sudo apt-get install cmake

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

Re: I wants LOLcodes!

Fri Jun 07, 2019 4:35 am

Well of course. Goes with out saying when building C programs.

Or of course one could have read the lci installation instructions I linked to early in this thread: https://github.com/justinmeza/lci

"PREREQUISITES
1 You must have CMake installed (www.cmake.org). a) If you're using a Linux distro with package management CMake should be in your repositories.
..."
Memory in C++ is a leaky abstraction .

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

Re: I wants LOLcodes!

Fri Jun 07, 2019 6:06 am

Heater wrote:
Fri Jun 07, 2019 4:35 am
Well of course. Goes with out saying when building C programs.

Or of course one could have read the lci installation instructions I linked to early in this thread: https://github.com/justinmeza/lci

"PREREQUISITES
1 You must have CMake installed (www.cmake.org). a) If you're using a Linux distro with package management CMake should be in your repositories.
..."
YEZ, I ALSO SAW TEH NED 4 CMAEK IN DA DOCUMENTASHUN. I MENSHUND IT CUZ IT WUZ LEFT OUT FRUM TEH INSTRUCSHUNS POSTD EARLIR IN DIS THREAD AN MAH PI DID NOT COME WIF CMAEK PREINSTALLD.

I FINKZ DAT INDEXD ARRAYS R NOT THAR IN DA MASTAH BRANCH. NAO, CUZ THAR IZ LIL DAT CAN BE DUN WITHOUT SUM SORT OV INDEXD MEMS, VARIABLEZ OR ASSOCIATIV ARRAYS, I CUD HAS 2 UNINSTAL AN SWITCH BAK 2 CODIN IN BASIC.

HAS U TRID FUCHUR BRANCH 2 C IF IT HAS WERKIN ARRAYS?

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

Re: I wants LOLcodes!

Fri Jun 07, 2019 6:21 am

ejolson,

I have not tried any kind of array or list in LOLCODE yet.

But there are tests for array operations in the lci repo: https://github.com/justinmeza/lci/tree/ ... /12-Arrays

For example:

Code: Select all

HAI 1.3
	I HAS A foo ITZ A BUKKIT
KTHXBYE
And there is an example using indexed arrays here: https://www.tutorialspoint.com/lolcode/ ... amples.htm
Memory in C++ is a leaky abstraction .

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

Re: I wants LOLcodes!

Fri Jun 07, 2019 6:29 am

Heater wrote:
Fri Jun 07, 2019 6:21 am
ejolson,

I have not tried any kind of array or list in LOLCODE yet.

But there are tests for array operations in the lci repo: https://github.com/justinmeza/lci/tree/ ... /12-Arrays

For example:

Code: Select all

HAI 1.3
	I HAS A foo ITZ A BUKKIT
KTHXBYE
And there is an example using indexed arrays here: https://www.tutorialspoint.com/lolcode/ ... amples.htm
I HAS SPENT TEH LAST HOUR LOOKIN AT TEH UNIT TESTS 4 ARRAYS AN CONCLUDD THEY R NOT LIEK ARRAYS AT ALL BUT MOAR LIEK STRUCTUREZ WIF NAMD ELEMENTS. IM BIT DISAPPOINTD RLY, CUZ I WUZ LOOKIN FWD 2 WRITIN HOOJ NUMBR FIBONACCI CALCULASHUN.

THAR IZ PROPOSAL 4 INDEXD ARRAYS HER, BUT I FINKZ NO WAN HAS DUN TEH WERK 2 IMPLEMENT THEM.

EDIT: MAYBE DAT TUTORIAL U LINKD 2 WILL HALP.

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

Re: I wants LOLcodes!

Fri Jun 07, 2019 11:17 am

ejolson wrote:
Fri Jun 07, 2019 2:43 am
ON MAH RASPBERRY PI I HAD 2 FURST INSTALL CMAEK 4 DA BUILD 2 WERK USIN

Code: Select all

$ sudo apt-get install cmake
Mea culpa, or whatever the LOL is for that - In my day it was "double-plus done not-good".

It had already been installed for me and I wrongly presumed it was pre-installed by default on Raspbian. I've added the apt-get for cmake in my earlier post. Thanks.

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

Re: I wants LOLcodes!

Fri Jun 07, 2019 11:25 am

ejolson wrote:
Fri Jun 07, 2019 6:29 am
I HAS SPENT TEH LAST HOUR LOOKIN AT TEH UNIT TESTS 4 ARRAYS AN CONCLUDD THEY R NOT LIEK ARRAYS AT ALL BUT MOAR LIEK STRUCTUREZ WIF NAMD ELEMENTS. IM BIT DISAPPOINTD RLY, CUZ I WUZ LOOKIN FWD 2 WRITIN HOOJ NUMBR FIBONACCI CALCULASHUN.
Arrays seem more like dictionaries (WERD BOOKZ) or associative arrays (BFF). They should be usable in an optimised fibo but the implementation may make them slow.

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

Re: I wants LOLcodes!

Fri Jun 07, 2019 7:35 pm

hippy wrote:
Fri Jun 07, 2019 11:25 am
ejolson wrote:
Fri Jun 07, 2019 6:29 am
I HAS SPENT TEH LAST HOUR LOOKIN AT TEH UNIT TESTS 4 ARRAYS AN CONCLUDD THEY R NOT LIEK ARRAYS AT ALL BUT MOAR LIEK STRUCTUREZ WIF NAMD ELEMENTS. IM BIT DISAPPOINTD RLY, CUZ I WUZ LOOKIN FWD 2 WRITIN HOOJ NUMBR FIBONACCI CALCULASHUN.
Arrays seem more like dictionaries (WERD BOOKZ) or associative arrays (BFF). They should be usable in an optimised fibo but the implementation may make them slow.
THAR IZ NAO HOOJ-NUMBR FIBONACCI CALCULATOR WRITTEN IN LOLCODE AVAILABLE HER.

Return to “General programming discussion”