Moed/Examples

From Esolang
Jump to navigation Jump to search

Back to Moed Feel free to add your own examples

Hello world

A1

(&Hello, world!)@
("Hello, world!)>{=@ `,}= <

Truth machine

A1

=_={@.}#`
:.=

Cat

A1

=@&`,

String sum

A1

>&=`|\=+ =`<$.@

Display color

B1 This program displays a color using a string sum of the strings "red", "green", and "blue", divides by 100 and then uses it as a jump argument

>&=`|\=+ =`<$554**\/~.~Jjjj1488**-488**488****-00~|~@j1488**-00~|~@j1488**-488***00~|~@

Random grayscale image

A1

5>{5>{1~?~488***-~.~::488***+488***+2;2;~|~={>"=2} `1\-}= <
$={>"=2} `1\-}= <
@

ASCII compressor

A1 Takes an ASCII string and compresses it into a single Unicode character

&={@,$} `\488***+
Can be used as a fortune generator with your name.
With my name it gives .

This thing

B1 Takes 2 binary strings as input

0>{:J&_j?_j@
=@ `'0\-J:._j1+2\%}=
<

Base n to base 10 converter

A1

#00~|~&$#&$0>{\1\-:00~^~^&'0\-*2;+={>"=2$}\`\}= <
.@
Format input like this: b,l,ddddd... where b is the base, l is the length of the source number, and d is the number, , means any non-numeric character

Brainfuck interpreter

A1 Simulates 8-bit cells; infinite bidirectional tape.

=_( data coordinates:
_x,y
_ ,0 - tape
_ ,1 - program
_ ,2 - stack
_0,3 - tape pointer
_1,3 - program pointer
_2,3 - stack pointer
_3,3 - depth
_)0>&={+1~|~1;1} =`<$$
13~^~:1~^~\1+13~|~
        :   =_ =0 =$ =`<$$ @
>=_ =`<$:'+-=_ =0 =$ =`<$$ 03~^~:0~^~1+884**\%\0~|~  1
>=_ =`<$:'--=_ =0 =$ =`<$$ 03~^~:0~^~1\-884**\%\0~|~ 1
>=_ =`<$:'>-=_ =0 =$ =`<$$ 03~^~1+03~|~              1
>=_ =`<$:'<-=_ =0 =$ =`<$$ 03~^~1\-03~|~             1
>=_ =`<$:'.-=_ =0 =$ =`<$$ 03~^~0~^~,                1
>=_ =`<$:',-=_ =0 =$ =`<$$ &03~^~0~|~                   1
>=_ =`<$:'[-=_ =0 =$ =`<$$ 13~^~23~^~2~|~23~^~1+23~|~{133~|~>{13~^~1~^~:']-={>"=1~|~33-\1~^~33$$} `$'[-={>"=1~|~33+1~^~33$} `$
={>"=2} `13~^~1+13~|~}= <
}1
>=_ =`<$:']-=_ =0 =$ =`<$$ 03~^~0~^~={>"=11} `$23~^~1\-23~|~23~^~2~^~1\-13~|~1
>      $$=