Piping
Jump to navigation
Jump to search
Piping
piping is a language that was made in a day.
the basic consecpt is that you can pipe data to different places.
typing
there are several types
--tanks
--numbers
--strings
--code
commands
there is only one command, pipe.
there are several ways to use pipe:
pipe (h) into (g) as (k) set a property (k) of the varible (g) with the value (h) pipe self into (g) add varible (g) pipe (g) through (k) with (f) use the filter (k) on the varible (g) with flags (f) pipe (g) through (k) use the filter (k) on the varible (g) pipe exit close the program
filters
diferent filters enact diferent things
loop takes in two parameters: times, content runs the (content) (times) many times output prints the input varible input when used,varible gets a new key added to it called input, that contains the user input. exists checks if a varible exists, it takes parameters: test [the varible to test[don't question it]], outcome it uses flags: -true runs (outcome) if (test) exists -false runs (outcome) if (test) dosent exist run takes (outcome) as a parameters, then runs outcome eql takes the parameters: prm0 prm1 outcome if (prm0) equals (prm1) then run (outcome) it uses flags -true runs (outcome) if (prm) -false runs (outcome) if not (prm) grt takes the parameters: prm0 prm1 outcome if (prm0) is greater than (prm1) then run (outcome) it uses flags -true runs (outcome) if (prm) -false runs (outcome) if not (prm) lst takes the parameters: prm0 prm1 outcome if (prm0) is less than (prm1) then run (outcome) it uses flags -true runs (outcome) if (prm) -false runs (outcome) if not (prm) add sub mul div mod
examples
hello * 32
pipe self into g pipe 23 into g as times pipe {pipe 'Hello World!' through output} into g as content pipe (g) through loop pipe exit
truth machine
pipe self into h pipe { pipe self into g pipe (g) through input pipe (g::input) into g as prm1 pipe 1 into g as prm0 pipe { pipe 0 through output pipe exit } into g as outcome pipe (g) through eql with -false } into h as outcome pipe (g) into h as test pipe (h) through exists with -false pipe 1 through output
external
interpereter(hard to use) https://editor.p5js.org/the.spiderminecart/sketches/G8Af8CdwA