Threads
Jump to navigation
Jump to search
Threads is an Esolang. It is multithreaded.
Symbols | Info |
---|---|
a | add one to the counter |
s | subtract one from the counter |
o | default: output the counter, dotted: output the following string or s for the variable |
i | default: input into the counter, dotted: input into the string variable |
( | start loop default: infinite, dotted: following number or c for the counter (can not be dotted) |
) | end loop (can be dotted) |
t | make a thread to run the dotted code in (t.[a]), can also have a thread id (t0.[a]) |
[ | start code block default: run normal, dotted: run with arguments* (can not be dotted) |
] | end a code block (can be dotted) |
q | compile the current thread default: compiles to a.out, dotted: compiles to # |
c | comment (c.”this is a comment”) |
* that are not in the compiler command
Symbols | Info |
---|---|
[blank] | run the code normally |
v | verbose (Created new thread! Added 1 to the counter!) |
o | outputs to o.out (can be changed in the configuration file) |
i | set the string to the current value of the file i.out |
c | each code bloCk is a value on a staCk |
e | extends the logic set using rules from e.out |
Hello World:
o."Hello, World!"
Cat:
(i."" o.s)
XKCD Random Number:
t.[a a a a o] c."speed thread"
Fork Bomb:
(t.[t]) c."your computer will not survive this"
Compiler Example:
./threadsc.sh -voice hello.thr
Block Example:
[o.”Balls”].o