Initial commit; include deadfish.lol
This commit is contained in:
commit
a1fdc680cd
|
@ -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).
|
|
@ -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
|
Loading…
Reference in New Issue