Test console

This is a console for testing out expressions in the minimal programming language CosmicOS starts off with. Type help for a sketch of the syntax, and examples for some expressions to try out.

Within the message

The console is also available within the message text. Just pick a section, pick a line, and click the little triangle. The console will start, loading all definitions up to that point.

11show conditionals
ifmaxminfactorial
14introduce pairs
conscarcdr
15introduce mutable cells
make-cellset!get!
16introduce lists
listundefinedheadtaillist-lengthlist-reffunction?equallist=prependpairfirstsecond
19some more list functions
list:findlastexcept-lastlist:reverseappendselect-match
20introduce pi and e
minusfracabswithinrangeevenodddecimalepipower:10pow:intpowexp
25some pure lambda calculus definitions - optional
pure:ifpure:truepure:falsepure:conspure:carpure:cdrpure:0pure:1pure:2pure:nextpure:+pure:*pure:prevpure:=:0fixed-pointpure:int:get
29introduce sets and set membership
elementset:<=set:=set:0
30introduce graph structures
graph:makeexists:graph:2exists:graph:2:list
32introduce environment/hashmap structure
hash-addhash-refhash-nullhash-defaultmake-hash
34introduce turing machine model
tape:dotape:maketape:resultdemo:tape:function:+:1
42introduce the elements
protonelectronneutronmasshydrogenheliumcarbonnitrogenoxygenhydrogen:2oxygen:2oxygen:3waternitrogen:2ammoniamethaneethane
44simulating unless gates
unlessmake-matrixmatrix-setmatrix-getsimulate-unlessbit-getmake-imageimage-getimage-heightimage-widthdistill-circuit