Amjad Masad - 02/07/2011
Amjad emailed me with a link to an Emoticon interpreter written in CoffeeScript, and a demo of it in action.
Michael Champanis - 14/06/2006
Thanks to Mike for my first ever genuine code contribution from another person! Mike contacted me out of the blue to send this fantastic calculator implentation.
30 / 5 8-< =|8:< 8-< @:-O + - * / T:-O 32 ;-O 37 42 47 :-( @:-O =|8=\ [8-< :-E ;-O T:-< :-) ];-O 1 [;-O 1 T:-O X:-D :-( 8+{ :-P ];-O [;=\ :-E 8-} :-P ];-O [;=\ :-E 8x} :-P ];-O [;=\ :-E 8/} :-P ];-O [;=\ :-E :-)
This chunk of code reads a simple arithmetical operation from the first line, extracts the operator, then uses a series of comparisons to identify it before jumping to the relevant section of the code to execute the instruction.
Inspired by this I wrote the following
30 / 5 }:-> 8-O : :-O 8-> 8-O { }:-O :-> ** read data and construct operator ** =|:-O 3 8-# ** implode operator ** Z:-O 8-> =|:-O 8-@ ** set up new instructions ** 8-O Z:-> Z:-> ** copy new instructions back ** :-P
This makes the operator by using the implode operator and then moves it into Z: and executes it. The last bit was really tricky without an insert or join operator! For this reason I added an Insert operator (V) in version 1.4.