justinmeza / lolcode-spec Goto Github PK
View Code? Open in Web Editor NEWLOLCODE language specification archives and development.
LOLCODE language specification archives and development.
Is it possible at current state to make a downto loop? I tried this http://pastebin.com/PnX2HTdz but variable sets to 0 in loop (and throws an error if i try access undefined variable).
Tested on v0.10.5
I HAS A TEST ITZ []
PUT "hello" IN TEST
todo: accessing contents
In addition to the current language builtin types (NUMBR
, NUMBAR
, YARN
, TROOF
, and NOOB
), introduce FUNKSHUN
as a builtin first class object (with appropriate lambda syntax)
Proposal for dynamic statement execution and dynamic expression evaluation:
Dynamic statement execution: MAEK IT LIEK
e.g.
I HAZ A VAR ITZ "BLOON"
MAEK IT LIEK SMOOSH "I HAZ A " VAR " ITZ :"RED:"" MKAY
which defines a variable BLOON
with the value "RED"
.
Dynamic expression evaluation: JUS LIEK
e.g.
I HAZ A PROLEM ITZ "SUM OF 4 AN 5"
VISIBLE SMOOSH "PROLEM IZ " PROLEM MKAY
VISIBLE SMOOSH "ANSR IZ " JUS LIEK PROLEM MKAY
which would display
PROLEM IZ SUM OF 4 AN 5
ANSR IZ 9
A few years back, I was fiddling around with LOLCODE and tried to implement a flavor that contained classes and object declarations. I recently stumbled upon your projects, and it's great to see the esolang still alive!
Would there be any interest in adding an object-oriented feature to the language? I spent some time drafting up an addition to the language specs, and if there's interest I would love to flesh it out a bit more and help add it to the lci.
The draft can be seen here (additions at the bottom):
https://github.com/bjia56/lolcode-spec/blob/master/v1.5_draft/lolcode-spec-v1.5.md
Note that I added the class syntax in the form of Dogespeak. A friend of mine suggested that since he thought it could be appropriate for a significantly different feature of the language. The keywords can definitely be changed to something more lolcat-related if that's necessary.
I am in favor of the following syntax for declaring a structured data type:
DIS IS A <class_name> KINDA LIKE A <base_class_name> BUT
IT GOT A <variable>
IT GOT A <variable> ITZ <value>
IT CAN <function_name>
OKIE
Instantiation can be done with: I HAS A <instance_name> ITZ <class_name> BORN WIF <arguments>
, or <instance_name> R <class_name> BORN WIF <arguments>
Accessing elements of the structure can be done with I HAS A <variable> ITZ DA <field_name> OV <instance_name>
, or <variable> R DA <field_name> OV <instance_name>
.
Other syntax could be used - but I would certainly like structured data types!
So I understand that the lolcode interpreter(s) you created are open source. Is the specification itself open source as well? I ask because I recently started work on my own LOLCODE interpreter as an academic exercise and would like to put my code on my own GitHub account under GPLv3. Do i need written permission from you to do so? Obviously, you would be credited with the creation of the LOLCODE spec.
Hi all, I'm really confused at loop's operation:
IM IN YR <label> <operation> YR <variable> [TIL|WILE <expression>]
<code block>
IM OUTTA YR <label>
"Where may be UPPIN (increment by one), NERFIN (decrement by one), or any unary function".
So I tried to make a loop where operation
is a unary function
on Tutorialspoint:
HAI 1.2
HOW IZ I bla YR X
X R SUM OF X AN 1
FOUND YR X
IF U SAY SO
IM IN YR LOOP I IZ bla YR X MKAY TIL BOTH SAEM X AN 10
VISIBLE X
IM OUTTA YR LOOP
KTHXBYE
and another version on repl.it:
HAI 1.2
HOW DUZ I bla YR X
X R SUM OF X AN 1
FOUND YR X
IF U SAY SO
I HAS A X ITZ 1
IM IN YR LOOP bla YR X TIL BOTH SAEM X AN 10
VISIBLE X
IM OUTTA YR LOOP
KTHXBYE
I think repl.it version is more fit to the spec, so why is that there are 2 ways to write a loop and both are true (no errors when executing)?
deleted
I think it would be more of a LOLCAT type language if the name was changed from LOLCODE to LOLKODE.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.