Initial commit; include deadfish.lol

This commit is contained in:
Robert Miles 2018-06-30 00:19:09 -04:00
commit a1fdc680cd
2 changed files with 43 additions and 0 deletions

8
README.md Normal file
View File

@ -0,0 +1,8 @@
# sketches
LOLCode sketches. Tiny programs that don't deserve their own repos.
## `deadfish.lol` - Deadfish in 35 LOC
A small Deadfish interpreter. Put each instruction on its own line; all instructions are capitalized. Any non-command input will
make the program exit (including EOF).

35
deadfish.lol Normal file
View File

@ -0,0 +1,35 @@
HAI 1.4
I HAS A REG ITZ 0
HOW IZ I INTERPRETIN YR CH
REG, WTF?
OMG -1
REG R 0
OMG 256
REG R 0
GTFO
OIC
CH, WTF?
OMG "I"
REG R SUM OF REG AN 1
GTFO
OMG "D"
REG R DIFF OF REG AN 1
GTFO
OMG "S"
REG R PRODUKT OF REG AN REG
GTFO
OMG "O"
VISIBLE REG
GTFO
OMGWTF
FOUND YR FAIL
OIC
FOUND YR WIN
IF U SAY SO
I HAS A CH
I HAS A WRK ITZ WIN
IM IN YR inloop UPPIN YR thr WILE BOTH SAEM WRK AN WIN
GIMMEH CH
WRK R I IZ INTERPRETIN YR CH MKAY
IM OUTTA YR inloop
KTHXBYE