Constant FAST
Source pub const FAST: &str = "\n\"#stream.spl\" import\n\"#http.spl\" import\n\nfunc ls { files | \".\" list-files }\nfunc ls@ { files | list-files }\nfunc cd { | chdir }\nfunc cat { | read-file }\n\nfunc output { | with thing ;\n\tthing gettype \"array\" eq \n\tthing gettype:ends-with<^Iter> or \n\tdup if {\n\t\tthing:foreach<&println>\n\t}\n\tnot if {\n\t\tthing _str println\n\t}\n}\n\nfunc *m { | swap :ends-with }\nfunc m* { | swap :starts-with }\nfunc # { | swap :filter }\nfunc ? { | swap :map }\nfunc times { | :iter }\n\nfunc \\ { | pop }\n\nfunc ~@ { | env:get<\"HOME\"> \"/\" concat swap concat }\nfunc ~ { | env:get<\"HOME\"> }\nfunc $ { v | env:get }\n\nfunc . { | output }\nfunc ex { | with s ; [ ^sh ^-c s ] command-wait; }\nfunc ex% { | command-wait; }\nfunc ex. { | with s ; [ ^sh ^-c s ] StreamTypes:cmd:create:read-to-end<1024 16 *> }\nfunc ex%. { | StreamTypes:cmd:create:read-to-end<1024 16 *> }\nfunc into { | with input file ;\n\tinput gettype any<[ { | \"array\" eq } { | \"bytearray\" eq } ]> not if { input _str:to-bytes =input }\n\tfile 1 StreamTypes:file:create\n\t\tdup :write-exact;<input>\n\t\t\t:close;\n}\n\nfunc tcp { stream |\n\tStreamTypes:tcp:create\n}\n\nfunc curl { s | bcurl:to-str }\n\nfunc bcurl { bytes | with url ;\n\t1 if {\n\t\turl:readf<\"{}:{}/{}\"> dup if { \n\t\t\t=url\n\t\t\turl:0 url:1 _int \"GET\" \"/\" url:2 concat net:http:Request:new\n\t\t\t2 stop\n\t\t} pop\n\t\turl:readf<\"{}:{}\"> dup if { \n\t\t\t=url\n\t\t\turl:0 url:1 _int \"GET\" \"/\" net:http:Request:new\n\t\t\t2 stop\n\t\t} pop\n\t\turl:readf<\"{}/{}\"> dup if { \n\t\t\t=url\n\t\t\turl:0 80 \"GET\" \"/\" url:1 concat net:http:Request:new\n\t\t\t2 stop\n\t\t} pop\n\t\turl:readf<\"{}\"> dup if { \n\t\t\t=url\n\t\t\turl:0 80 \"GET\" \"/\" net:http:Request:new\n\t\t\t2 stop\n\t\t} pop\n\t\t\"invalid url\" panic\n\t} :send:body\n}\n\nconstruct _shell_array_ext {\n idx\n ;\n next { any | with this ; \n this:idx 0 or dup ++ this:=idx this:sget\n }\n}\ninclude _shell_array_ext in array\ninclude _Iter in array\n\nfunc any { bool | with o checks ;\n\t0 checks:foreach<{ | o swap call if { pop 1 } }>\n}\n";