33 lines
1.0 KiB
Plaintext
33 lines
1.0 KiB
Plaintext
Horrlang is an esoteric language, you should not try it.
|
|
|
|
In Horrlang, memory and instruction are mixed, so you can use old instruction
|
|
as new memory places or do some metaprogramation rewriting your code as it run.
|
|
|
|
Just like in LISP but ... without lists ... good luck ...
|
|
|
|
So in Horrlang you have basically 2 pointers, a memory one and an instruction
|
|
one. Both starts at 0. The instruction one follow instructions that can move
|
|
the memory pointer, look at instruction set :
|
|
|
|
Instruction set :
|
|
|
|
Lx : Move memory head left x chars (defaults to 1)
|
|
Rx : Move memory head right x chars (defaults to 1)
|
|
|
|
Nx : Goto the next char that is x
|
|
Px : Goto the prev char that is x
|
|
O : Output current value under memory head
|
|
I : Read from stdin to the current memory head location
|
|
K : Decrement current memory location
|
|
H : Increment current memory location
|
|
Jx : Jump to prev char X if current memory location != 0
|
|
|
|
The Hello World :
|
|
R9R9R9R4OROROROROROROROROROROROHello World.
|
|
|
|
Writing a serie of P should like :
|
|
R5OP5P or R3OP3
|
|
|
|
Write 123456789 using a loop :
|
|
R9R3:ROHLKJ:81
|