ref: 8fb69dc859d54447081792cdff4c1916a2199110
parent: f3a9a7b3175862fe2d4375c6640f7e0f69a533fc
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Mon Mar 17 13:48:57 EDT 2025
docstrings: rehaul Assume markdown-like syntax. Separate short/long descriptions with an empty line. Print signatures indented.
--- a/boot/sl.boot
+++ b/boot/sl.boot
@@ -1,45 +1,45 @@
(*builtins* #(NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL #fn("n10<:" #())
- #fn("n10=:" #()) NIL NIL NIL NIL #fn("n10B:" #()) NIL NIL NIL NIL NIL #fn("n10H:" #())
- NIL NIL NIL #fn("z0700}2:" #(<)) NIL #fn("n201N:" #()) NIL #fn("n201P:" #())
- #fn("n201Q:" #()) #fn("n10R:" #()) #fn("n10S:" #())
- #fn("n10T:" #()) NIL #fn("n10V:" #()) NIL #fn("n10X:" #())
- #fn("n10Y:" #()) #fn("n10Z:" #()) #fn("n10[:" #())
- #fn("n10\\:" #()) #fn("n10]:" #()) NIL #fn("n201_:" #()) NIL NIL NIL #fn("n201c:" #())
- #fn("n201d:" #()) #fn("z00:" #()) #fn("z0700}2:" #(apply))
- #fn("z0700}2:" #(+)) #fn("z0700}2:" #(-))
- #fn("z0700}2:" #(*)) #fn("z0700}2:" #(/))
- #fn("z0700}2:" #(div0)) #fn("z0700}2:" #(=))
- #fn("n201m:" #()) NIL #fn("z0700}2:" #(vec))
- #fn("z0700}2:" #(aset!)) NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL #fn("n3012082>1|:" #(#fn("n1A061:" #())))
- NIL NIL NIL NIL NIL NIL NIL NIL #fn("z0700}2:" #(aref)) NIL NIL NIL)
- *properties* #table(*funvars* #table(*prompt* (NIL) lz-unpack ((data :to destination)
- (data :size
- decompressed-bytes)) void? ((x)) >= ((a . rest)) defstruct ((name
- doc options... (slot-1 DEFAULT) slot-2 (slot-3 :read-only))
+ #fn("n10=:" #()) NIL NIL NIL NIL #fn("n10B:" #()) NIL NIL NIL NIL NIL #fn("n10H:" #())
+ NIL NIL NIL #fn("z0700}2:" #(<)) NIL #fn("n201N:" #()) NIL #fn("n201P:" #())
+ #fn("n201Q:" #()) #fn("n10R:" #()) #fn("n10S:" #())
+ #fn("n10T:" #()) NIL #fn("n10V:" #()) NIL #fn("n10X:" #())
+ #fn("n10Y:" #()) #fn("n10Z:" #()) #fn("n10[:" #())
+ #fn("n10\\:" #()) #fn("n10]:" #()) NIL #fn("n201_:" #()) NIL NIL NIL #fn("n201c:" #())
+ #fn("n201d:" #()) #fn("z00:" #()) #fn("z0700}2:" #(apply))
+ #fn("z0700}2:" #(+)) #fn("z0700}2:" #(-))
+ #fn("z0700}2:" #(*)) #fn("z0700}2:" #(/))
+ #fn("z0700}2:" #(div0)) #fn("z0700}2:" #(=))
+ #fn("n201m:" #()) NIL #fn("z0700}2:" #(vec))
+ #fn("z0700}2:" #(aset!)) NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL #fn("n3012082>1|:" #(#fn("n1A061:" #())))
+ NIL NIL NIL NIL NIL NIL NIL NIL #fn("z0700}2:" #(aref)) NIL NIL NIL)
+ *properties* #table(*funvars* #table(*prompt* (NIL) lz-unpack ((data :to destination)
+ (data :size
+ decompressed-bytes)) void? ((x)) >= ((a . rest)) defstruct ((name
+ doc options… (slot-1 DEFAULT) slot-2 (slot-3 :read-only))
(name (:type vec) (:named T) (:constructor T) (:conc-name NIL) (:predicate NIL) . slots)) help ((term)) length= ((lst
n)) __finish ((status)) doc-for ((term (doc NIL))) rand-u32 (NIL) = ((a . rest)) rand-u64 (NIL) car ((lst)) <= ((a . rest)) add-exit-hook ((fun)) /= ((a . rest)) lz-pack ((data
- (level 0))) rand (NIL) nan? ((x)) rand-float (NIL) void (rest) cons? ((value)) vm-stats (NIL) rand-double (NIL) * ((num…)) cdr ((lst)) + ((num…)) > ((a . rest))) *doc* #table(>= "Return T if the arguments are in non-increasing order (previous\none is greater than or equal to the next one)." void? "Return T if x is #<void>, NIL otherwise." length= "Bounded length test.\nUse this instead of (= (length lst) n), since it avoids unnecessary\nwork and always terminates." doc-for "Define documentation for a top level term.\nIf the optional doc argument is missing and the term is a function\nsignture, adds it to the documentation." car "Return the first element of a list or NIL if not available." *builtins* "VM instructions as closures." <= "Return T if the arguments are in non-decreasing order (previous\none is less than or equal to the next one)." void "Return the constant #<void> while ignoring any arguments.\n#<void> is mainly used when a function has side effects but does not\nproduce any meaningful value to return, so even though T or NIL could\nbe returned instead, in case of #<void> alone, REPL will not print\nit." rand "Return a random non-negative fixnum on its maximum range." nan? "Return T if the argument is NaN, regardless of the sign." Instructions "VM instructions mapped to their encoded byte representation." rand-double "Return a random double on [0.0, 1.0] interval." > "Return T if the arguments are in strictly decreasing order (previous\none is greater than the next one)." cdr "Return the tail of a list or NIL if not available." + "Return sum of the numbers or 0 with no arguments." T "A boolean \"true\".\n(not T) → NIL\n(if T 'yes 'no) → 'yes" lz-unpack "Return decompressed data previously compressed using lz-pack.\nEither destination for the decompressed data or the expected size of\nthe decompressed data must be specified. In the latter case a new\narray is allocated." __finish "A function called right before exit by the VM." help "Display documentation for the specified term, if available." defstruct "Defines a structure type with a specific name and slots.\nThe default underlying type is a named vector, ie the first element is\nthe name of the structure type, the rest are the slot values. If the\nname as the first element isn't required, \":named NIL\" should be\nused. A list can be used instead of a vector by adding \":type list\"\noption.\n\nThe option :conc-name specifies the slot accessor prefix, which\ndefaults to \"name-\".\n\nDefault predicate name (\"name?\") can be changed:\n\n (defstruct blah :predicate blargh? a b c)" rand-u32 "Return a random integer on [0, 2³²-1] interval." = "Return T if the arguments are equal." rand-u64 "Return a random integer on [0, 2⁶⁴-1] interval." NIL "An empty list. Also used as the opposite of T.\n(not NIL) → T\n(if NIL 'yes 'no) → 'no\n(car NIL) → NIL\n(cdr NIL) → NIL" add-exit-hook "Puts an one-argument function on top of the list of exit hooks.\nOn shutdown each exit hook is called with the exit status as a single\nargument, which is (usually) 0 on success and any other number on\nerror." /= "Return T if not all arguments are equal. Shorthand for (not (= …))." lz-pack "Return data compressed using Lempel-Ziv.\nThe data must be an array, returned value will have the same type.\nThe optional level is between 0 and 10. With level 0 a simple LZSS\nusing hashing will be performed. Levels between 1 and 9 offer a\ntrade-off between time/space and ratio. Level 10 is optimal but very\nslow." arg-counts "VM instructions mapped to their expected arguments count." rand-float "Return a random float on [0.0, 1.0] interval." *prompt* "Function called by REPL to signal the user input is required.\nDefault function prints \"#;> \"." cons? "Return T if the value is a cons cell." vm-stats "Print various VM-related information, such as the number of GC calls so far, heap and stack size, etc." * "Return product of the numbers or 1 with no arguments." *properties* "All proper
\ No newline at end of file
- *syntax-environment* #table(bcode:nconst #fn("n1200r2e3:" #(aref)) doc-for #fn("\x8710002000W1000J60q?140B86;35040<;J404086;35040=863H020212287e212288e2e4e2:20212287e21e3e2:" #(void
+ (level 0))) rand (NIL) nan? ((x)) rand-float (NIL) void (rest) cons? ((value)) vm-stats (NIL) rand-double (NIL) * ((num…)) cdr ((lst)) + ((num…)) > ((a . rest))) *doc* #table(>= "Return `T` if the arguments are in non-increasing order (previous\none is greater than or equal to the next one)." void? "Return `T` if `x` is `#<void>`, `NIL` otherwise." length= "Perform a bounded length test.\n\nUse this instead of `(= (length lst) n)`, since it avoids unnecessary\nwork and always terminates." doc-for "Define documentation for a top level term.\n\nIf `term` is a function signature and `doc` is not specified, just\nthe signature will be included in the documentation, without\nreplacing any previously defined." car "Return the first element of a list or `NIL` if not available." *builtins* "VM instructions as closures." <= "Return `T` if the arguments are in non-decreasing order (previous\none is less than or equal to the next one)." void "Return the constant `#<void>` while ignoring any arguments.\n\n`#<void>` is mainly used when a function has side effects but does not\nproduce any meaningful value to return, so even though `T` or `NIL` could\nbe returned instead, in case of `#<void>` alone, REPL will not print\nit." rand "Return a random non-negative fixnum on its maximum range." nan? "Return `T` if the argument is *NaN*, regardless of the sign." Instructions "VM instructions mapped to their encoded byte representation." rand-double "Return a random double on interval [0.0, 1.0]." > "Return `T` if the arguments are in strictly decreasing order (previous\none is greater than the next one)." cdr "Return the tail of a list or `NIL` if not available." + "Return sum of the numbers or `0` with no arguments." T "A boolean \"true\".\n\n(not T) → NIL\n(if T 'yes 'no) → 'yes" lz-unpack "Return decompressed data previously compressed using lz-pack.\n\nEither destination for the decompressed data or the expected size of\nthe decompressed data must be specified. In the latter case a new\narray is allocated." __finish "A function called right before exit by the VM." help "Display documentation for the specified term, if available." defstruct "Defines a structure type with a specific name and slots.\n\nThe default underlying type is a \"named\" `vector`, where the\nfirst element is the name of the structure's type, the rest are the\nslot values. If the name as the first element isn't required,\n`:named NIL` should be used. A `list` can be used instead of a\n`vector` by adding `:type list` option.\n\nThe option `:conc-name` specifies the slot accessor prefix, which\ndefaults to `<name>-`.\n\nDefault predicate name (`<name>?`) can be changed:\n\n (defstruct blah :predicate blargh? a b c)" rand-u32 "Return a random integer on interval [0, 2³²-1]." = "Return `T` if the arguments are equal." rand-u64 "Return a random integer on interval [0, 2⁶⁴-1]." NIL "An empty list. Also used as the opposite of T.\n\n(not NIL) → T\n(if NIL 'yes 'no) → 'no\n(car NIL) → NIL\n(cdr NIL) → NIL" add-exit-hook "Puts an one-argument function on top of the list of exit hooks.\n\nOn shutdown each exit hook is called with the exit status as a\nsingle argument, which is (usually) `0` on success and any other\nnumber on error." /= "Return `T` if not all arguments are equal. Shorthand for `(not (= …))`." lz-pack "Return data compressed using Lempel-Ziv.\n\nThe data must be an array, returned value will have the same type.\nThe optional `level` is between `0` and `10`. With `level` set to\n`0` a simple LZSS using hashing will be performed. Levels between\n`1` and `9` offer a trade-off between time/space and ratio. Level\n`10` is optimal but very slow." arg-counts "VM instructions mapped to their expected arguments count." rand-float "Return a random float on [0.0, 1.0] interval." *prompt* "Function called by REPL to signal the user input is required.\n\nDefault function prints `#;> `." cons? "Return `T` if the value is a cons cell." vm-stats "Print various VM-relat
\ No newline at end of file
+ *syntax-environment* #table(bcode:nconst #fn("n1200r2e3:" #(aref)) doc-for #fn("\x8710002000W1000J60q?140B86;35040<;J404086;35040=863H020212287e212288e2e4e2:20212287e21e3e2:" #(void
0<;J404086;35040=863H020212287e212288e2e4e2:20212287e21e3e2:" #(void
-nput-from #fn("z12021e1220e2e1e12315163:" #(#fn(nconc) with-bindings
+#fn("n1200r2e3:" #(aref)) doc-for #fn("\x8710002000W1000J60q?140B86;35040<;J404086;35040=863H020212287e212288e2e4e2:20212287e21e3e2:" #(void
*io-in* #fn(copy-list))) unless #fn("z1200q211Pe4:" #(if
-list))) time #fn("n1202122e1e2e123024252622e121e32728e5e3e3:" #(let
+(if
*)) cond #fn("z0Ib520852185>1_51485<061:" #(#0=#fn("z0I:" #() void)
#fn("n10H340q:0<85<20Q;J80485<DQ3C085=J6085<:2185=P:85=J@02285<A<0=51e3:85T23C\x94074758551513c07675855151278685<e2e12886217975855151PA<0=51e4e3:272:85<e2e1282:7585512:e2A<0=51e4e3:2885<2185=PA<0=51e4:" #(else
-12:1=51522829e12:82512825e18:52e153e4e3e2e12825e18952e3:" #(#fn(map)
+e2A<0=51e4e3:2885<2185=PA<0=51e4:" #(else
onc) begin #fn(copy-list))) mark-label #fn("n22002122e21e4:" #(emit
quote label)) with-bindings #fn("z12071052207205220230522425e12076888653e12720288687535129242:e12715152242:e127202;8688535152e3e164:" #(#fn(map)
car cadr #fn("n12060:" #(#fn(gensym))) #fn(nconc) let list #fn(copy-list)
#fn("n22001e3:" #(set!)) unwind-protect begin #fn("n22001e3:" #(set!)))) let #fn("z1q0R3B00?641<?041=?1@30q42021e12223052e124151532225052863C0268687e2e186e3@408788P:" #(#fn(nconc)
λ #fn(map) #fn("n10B3500<:0:" #()) #fn(copy-list)
-("n1200r3e3:" #(aref)) > #fn("z12021e12273151510e163:" #(#fn(nconc)
- < #fn(copy-list) reverse!)) when #fn("z1200211Pqe4:" #(if begin)) quasiquote #fn("n1700E62:" #(bq-process)) help #fn("n17002152853{0228523527486<5147550486=3C0262786=5247550@30q426280>170029q535247550^1@>0742:0524755047;60:" #(getprop
- *doc* #fn(str-split) "\n" princ newline #fn(for-each)
- #fn("n17050471061:" #(newline princ)) #fn("n17050471A0P61:" #(newline print)) *funvars* "no help for "
+ #fn("n10B3500<:0:" #()) #fn(copy-list)
+ #fn("n10B3500T:7060:" #(void)) letrec)) bcode:code #fn("n1200Ee3:" #(aref)) make-label #fn("n120e1:" #(gensym)) bcode:cenv #fn("n1200r3e3:" #(aref)) > #fn("z12021e12273151510e163:" #(#fn(nconc)
+ < #fn(copy-list) reverse!)) when #fn("z1200211Pqe4:" #(if begin)) quasiquote #fn("n1700E62:" #(bq-process)) help #fn("n1700215285;3;042285235270024q53863c07586<51486=3Q0262786=52478504873907850@30q@30q@30q4873Q0752951478504262:0>1875247850@30q486;J50487360q@>0752;0524785047<60:" #(getprop
+ *doc* #fn(str-split) "\n" *funvars* princ #fn(for-each)
Ee12L8E5152e12L8@5153e3@30qe12L7M2N8;8A8@8F8C8E0>78?525165:" #(#(NIL
NIL :named 1 :conc-name 3 :type 0 NIL NIL NIL NIL NIL NIL :predicate 4 NIL NIL NIL NIL NIL NIL
-ructor 2) vec #0# #fn("n17005121220A>28552485:" #(cddr #fn(for-each)
+2L8E5152e12L8@5153e3@30qe12L7M2N8;8A8@8F8C8E0>78?525165:" #(#(NIL
(for-each)
#fn("n17002152340q:722324A<25F2605661:" #(member
(:read-only) error #fn(str) "invalid option in slot " " of struct " ": "))) slot-opts)
@@ -49,7 +49,7 @@
5523O02<2=2>2?86e22@2?96e22Ae6e2@B02B232995510M24e4e4e4:" #(list-ref
#fn(sym) def s v assert if void? aref #fn(length) member :read-only error str "slot " quote " in struct "
" is :read-only" aset!)))) bcode:ctable #fn("n1200Ke3:" #(aref)) with-output-to #fn("z12021e1220e2e1e12315163:" #(#fn(nconc)
-242522e2262722e22829e2e3262:22e20e3e42;22e22<22e2e4e3e3:" #(trycatch
+))) bcode:ctable #fn("n1200Ke3:" #(aref)) with-output-to #fn("z12021e1220e2e1e12315163:" #(#fn(nconc)
e173051e1e1220=B3H02024e10=e12215153e1@301515375051e2:" #(#fn(nconc)
λ #fn(copy-list) caar let* cadar)) letrec #fn("z1202021e12273052e122240522515154e1227605262:" #(#fn(nconc)
λ #fn(map) car #fn("n12021e12205162:" #(#fn(nconc) set! #fn(copy-list)))
@@ -58,231 +58,231 @@
23072151e3:1=J>0230721<51e3:74751523=0260271e2e3:280271e2e3:" #(else
eq? quote-value eqv? every sym? memq quote memv) vals->cond)
#fn(gensym) let #fn(nconc) cond #fn(map) #fn("n1A<F0<520=P:" #()))) receive #fn("z22021q1e32221e10e123825153e3:" #(call-with-values
-otect #fn("n2202122q1e3e2e1232402225e121e12625e2e4e321e1e3e3:" #(let
+ensym) let #fn(nconc) cond #fn(map) #fn("n1A<F0<520=P:" #()))) receive #fn("z22021q1e32221e10e123825153e3:" #(call-with-values
raise)) dotimes #fn("z10<0T20E2187Ke32223e186e1e12415153e4:" #(for
- throw #fn("n220212223e201e4e2:" #(raise list quote thrown-value)))
- 1+ #fn("n10KM:" #() 1+) 1-
- #fn("n10K~:" #() 1-) 1arg-lambda? #fn("n10B;3E04700<51;3:04710TK62:" #(lambda? length=) 1arg-lambda?)
- <= #fn("z1Ib6862086>1_486<^10162:" #(#fn("n21S;JL041<0L2;J5040V340q:A<1<1=62:" #())) <=)
- > #fn("z1Ib6862086>1_486<^10162:" #(#fn("n21S;JE041<0L2;3;04A<1<1=62:" #())) >) >=
- #fn("z1Ib6862086>1_486<^10162:" #(#fn("n21S;JL0401<L2;J5040V340q:A<1<1=62:" #())) >=)
- Instructions #table(call.l #byte(0x51) trycatch #byte(0x4b) loadg.l #byte(0x44) aref2 #byte(0x17) box #byte(0x32) cadr #byte(0x24) argc #byte(0x3e) setg #byte(0x47) load0 #byte(0x15) nan? #byte(0x26) fixnum? #byte(0x29) loadc0 #byte(0x11) loada0 #byte(0x0) div0 #byte(0x3b) keyargs #byte(0x1f) call #byte(0x5) loada.l #byte(0x45) num? #byte(0x28) sub2 #byte(0x4e) add2 #byte(0x1d) loadc.l #byte(0x46) loadc #byte(0x9) builtin? #byte(0x2b) set-car! #byte(0x2f) vargc.l #byte(0x50) vec #byte(0x3f) ret #byte(0xa) loadi8 #byte(0x42) tapply #byte(0x4d) loadvoid #byte(0x19) loada1 #byte(0x1) shift #byte(0x2e) atom? #byte(0x18) cdr #byte(0xd) brne.l #byte(0x53) / #byte(0x3a) equal? #byte(0x34) apply #byte(0x36) dup #byte(0xb) loadt #byte(0x14) jmp.l #byte(0x30) = #byte(0x3c) not #byte(0x23) set-cdr! #byte(0x1e) fn? #byte(0x2c) eq? #byte(0x21) * #byte(0x39) load1 #byte(0x1b) bound? #byte(0x2a) box.l #byte(0x56) < #byte(0x1c) brnn.l #byte(0x54) jmp #byte(0x10) loadv #byte(0x2) for #byte(0x4c) dummy_eof #byte(0x58) + #byte(0x37) brne #byte(0x13) argc.l #byte(0x4f) compare #byte(0x3d) brn #byte(0x3) neg #byte(0x25) loadv.l #byte(0x43) vargc #byte(0x4a) brbound #byte(0x27) loadc1 #byte(0x16) setg.l #byte(0x48) cons? #byte(0x12) aref #byte(0x55) sym? #byte(0x22) aset! #byte(0x40) car #byte(0xc) cons #byte(0x20) tcall.l #byte(0x52) - #byte(0x38) brn.l #byte(0x31) optargs #byte(0x57) closure #byte(0xe) vec? #byte(0x2d) pop #byte(0x4) eqv? #byte(0x33) list #byte(0x35) seta #byte(0xf) seta.l #byte(0x49) brnn #byte(0x1a) loadnil #byte(0x41) loadg #byte(0x7) loada #byte(0x8) tcall #byte(0x6))
- __finish #fn("n120210>17262:" #(#fn(for-each)
- #fn("n10A61:" #()) *exit-hooks*) __finish)
+25e121e12625e2e4e321e1e3e3:" #(let
+ #:g369 λ prog1 trycatch #:g370 raise)) dotimes #fn("z10<0T20E2187Ke32223e186e1e12415153e4:" #(for
+ - #fn(nconc) λ #fn(copy-list))) throw #fn("n220212223e201e4e2:" #(raise list quote thrown-value)))
+ 1+ #fn("n10KM:" #() 1+) 1-
+ #fn("n10K~:" #() 1-) 1arg-lambda? #fn("n10B;3E04700<51;3:04710TK62:" #(lambda? length=) 1arg-lambda?)
+ <= #fn("z1Ib6862086>1_486<^10162:" #(#fn("n21S;JL041<0L2;J5040V340q:A<1<1=62:" #())) <=)
+ > #fn("z1Ib6862086>1_486<^10162:" #(#fn("n21S;JE041<0L2;3;04A<1<1=62:" #())) >) >=
+ #fn("z1Ib6862086>1_486<^10162:" #(#fn("n21S;JL0401<L2;J5040V340q:A<1<1=62:" #())) >=)
+ Instructions #table(call.l #byte(0x51) trycatch #byte(0x4b) loadg.l #byte(0x44) aref2 #byte(0x17) box #byte(0x32) cadr #byte(0x24) argc #byte(0x3e) setg #byte(0x47) load0 #byte(0x15) nan? #byte(0x26) fixnum? #byte(0x29) loadc0 #byte(0x11) loada0 #byte(0x0) div0 #byte(0x3b) keyargs #byte(0x1f) call #byte(0x5) loada.l #byte(0x45) num? #byte(0x28) sub2 #byte(0x4e) add2 #byte(0x1d) loadc.l #byte(0x46) loadc #byte(0x9) builtin? #byte(0x2b) set-car! #byte(0x2f) vargc.l #byte(0x50) vec #byte(0x3f) ret #byte(0xa) loadi8 #byte(0x42) tapply #byte(0x4d) loadvoid #byte(0x19) loada1 #byte(0x1) shift #byte(0x2e) atom? #byte(0x18) cdr #byte(0xd) brne.l #byte(0x53) / #byte(0x3a) equal? #byte(0x34) apply #byte(0x36) dup #byte(0xb) loadt #byte(0x14) jmp.l #byte(0x30) = #byte(0x3c) not #byte(0x23) set-cdr! #byte(0x1e) fn? #byte(0x2c) eq? #byte(0x21) * #byte(0x39) load1 #byte(0x1b) bound? #byte(0x2a) box.l #byte(0x56) < #byte(0x1c) brnn.l #byte(0x54) jmp #byte(0x10) loadv #byte(0x2) for #byte(0x4c) dummy_eof #byte(0x58) + #byte(0x37) brne #byte(0x13) argc.l #byte(0x4f) compare #byte(0x3d) brn #byte(0x3) neg #byte(0x25) loadv.l #byte(0x43) vargc #byte(0x4a) brbound #byte(0x27) loadc1 #byte(0x16) setg.l #byte(0x48) cons? #byte(0x12) aref #byte(0x55) sym? #byte(0x22) aset! #byte(0x40) car #byte(0xc) cons #byte(0x20) tcall.l #byte(0x52) - #byte(0x38) brn.l #byte(0x31) optargs #byte(0x57) closure #byte(0xe) vec? #byte(0x2d) pop #byte(0x4) eqv? #byte(0x33) list #byte(0x35) seta #byte(0xf) seta.l #byte(0x49) brnn #byte(0x1a) loadnil #byte(0x41) loadg #byte(0x7) loada #byte(0x8) tcall #byte(0x6))
2384w4^147025d;350426;J50427w8429w:4qw;47<w=47>w?47@wA:" #(*os-name*
"macos" #fn("n0702161:" #(princ "\e[0m\e[1m#;> \e[0m"))
#fn("n0702161:" #(princ "#;> ")) *prompt* "dos" "\\" "/" *directory-separator* "\n" *linefeed*
-*stdout* *io-out* *stdin* *io-in* *stderr* *io-err*) __init_globals)
+
22c37029@402:^185;3=042;857<8653873B02=87513907>8761:q:" #(*os-name*
"unknown" "plan9" "home" "macos" princ "\e]0;StreetLISP v0.999\a" "HOME" #fn(os-getenv) "lib/slrc"
-" #fn(str) *directory-separator* #fn(path-exists?) load) __rcscript)
- __script #fn("n1200>121{:" #(#fn("n070A61:" #(load))
- #fn("n170051421K61:" #(top-level-exception-handler
- #fn(exit)))) __script)
- __start #fn("n1705040=B3D00=w14qw24730T51@C00w14Dw24745047550426E61:" #(__init_globals
- *argv*
- *interactive*
- __script
- __rcscript repl
- #fn(exit)) __start)
- abs #fn("n10EL23500U:0:" #() abs) add-exit-hook
- #fn("n1070Pw047160:" #(*exit-hooks* void) add-exit-hook) any #fn("n21B;3D0401<51;J:047001=62:" #(any) any)
- arg-counts #table(bound? 1 sym? 1 car 1 cons 2 cadr 1 nan? 1 for 3 fixnum? 1 cdr 1 atom? 1 div0 2 vec? 1 equal? 2 eqv? 2 compare 2 not 1 set-cdr! 2 num? 1 fn? 1 eq? 2 builtin? 1 cons? 1 set-car! 2)
- argc-error #fn("n2702102211Kl237023@402465:" #(error "compile error: " " expects " " argument."
- " arguments.") argc-error)
- arr? #fn("n10];JF042005185B;390485<21Q:" #(#fn(typeof) arr) arr?) assoc
+9@402:^185;3=042;857<8653873B02=87513907>8761:q:" #(*os-name*
+ "unknown" "plan9" "home" "macos" princ "\e]0;StreetLISP v0.999\a" "HOME" #fn(os-getenv) "lib/slrc"
+ ".slrc" #fn(str) *directory-separator* #fn(path-exists?) load) __rcscript)
+ __script #fn("n1200>121{:" #(#fn("n070A61:" #(load))
+ #fn("n170051421K61:" #(top-level-exception-handler
+ #fn(exit)))) __script)
+ __start #fn("n1705040=B3D00=w14qw24730T51@C00w14Dw24745047550426E61:" #(__init_globals
+ *argv*
+ *interactive*
+ __script
+ __rcscript repl
+ #fn(exit)) __start)
+ abs #fn("n10EL23500U:0:" #() abs) add-exit-hook
+ #fn("n1070Pw047160:" #(*exit-hooks* void) add-exit-hook) any #fn("n21B;3D0401<51;J:047001=62:" #(any) any)
+ arg-counts #table(bound? 1 sym? 1 car 1 cons 2 cadr 1 nan? 1 for 3 fixnum? 1 cdr 1 atom? 1 div0 2 vec? 1 equal? 2 eqv? 2 compare 2 not 1 set-cdr! 2 num? 1 fn? 1 eq? 2 builtin? 1 cons? 1 set-car! 2)
+ argc-error #fn("n2702102211Kl237023@402465:" #(error "compile error: " " expects " " argument."
#(caar assoc) assoc) assv #fn("n2701510c3501<:13:07101=62:q:" #(caar
-assoc) assv #fn("n2701510c3501<:13:07101=62:q:" #(caar
- assv) assv)
- bcode:indexfor #fn("n20KG0r2G20861523:02186162:2286187534870r287KMp4:" #(#fn(has?)
- #fn(get)
+arguments.") argc-error)
+ arr? #fn("n10];JF042005185B;390485<21Q:" #(#fn(typeof) arr) arr?) assoc
+ #fn("n2701510d3501<:13:07101=62:q:" #(caar assoc) assoc) assv #fn("n2701510c3501<:13:07101=62:q:" #(caar
+ assv) assv)
_486<^1161:" #(#fn("n10B3Q00<T3B070A21720<5153@30q4F<0=61:q:" #(emit
-Q00<T3B070A21720<5153@30q4F<0=61:q:" #(emit
+ #fn(put!)) bcode:indexfor)
0T1K~52e3e2:0<28CP01El23500T:707029710T1K~52e3e2:70710152e2:" #(list
bq-process unquote cons 'unquote unquote-splicing copy-list 'unquote-splicing unquote-nsplicing
-unquote-splicing unquote-nsplicing
- 'unquote-nsplicing) bq-bracket)
- bq-bracket1 #fn("n20B3S00<20CL01El23500T:7122730=1K~52e3:730162:" #(unquote cons 'unquote
+1K~52e3e2:0<25CT01El2390260Te2:707027710T1K~52e3e2:0<28CP01El23500T:707029710T1K~52e3e2:70710152e2:" #(list
+ bq-process unquote cons 'unquote unquote-splicing copy-list 'unquote-splicing unquote-nsplicing
+ 'unquote-nsplicing) bq-bracket)
07:87<7186152e3:2A7B87P7186152e162:Ib6862C186>2_486<^10q62:" #(quote
bq-process vec->list list vec apply quasiquote 'quasiquote unquote length= cons 'unquote any
splice-form? lastcdr #fn(map) #fn("n1700A62:" #(bq-bracket1))
#fn(nconc) list* #fn("n20J;02071151P:0B3o00<22CX020731AEl23700=@C07425e2760=AK~52e252P:F<0=770<A521P62:2071760A521P51P:" #(nconc
-! unquote nreconc list 'unquote bq-process bq-bracket))) bq-process)
- builtin->instruction #fn("n120A0q63:" #(#fn(get)) #(#table(#.cadr cadr #.aset! aset! #.+ + #.- - #.equal? equal? #.eq? eq? #.builtin? builtin? #.not not #.cons? cons? #.cdr cdr #./ / #.div0 div0 #.set-car! set-car! #.vec vec #.set-cdr! set-cdr! #.< < #.aref aref #.for for #.cons cons #.apply apply #.eqv? eqv? #.vec? vec? #.list list #.car car #.bound? bound? #.nan? nan? #.fn? fn? #.sym? sym? #.compare compare #.fixnum? fixnum? #.atom? atom? #.= = #.num? num? #.* *)))
- caaaar #fn("n10<<<<:" #() caaaar) caaadr
- #fn("n10T<<:" #() caaadr) caaar #fn("n10<<<:" #() caaar) caadar
- #fn("n10<T<:" #() caadar) caaddr #fn("n10=T<:" #() caaddr) caadr
- #fn("n10T<:" #() caadr) caar #fn("n10<<:" #() caar) cadaar
- #fn("n10<<T:" #() cadaar) cadadr #fn("n10TT:" #() cadadr) cadar
- #fn("n10<T:" #() cadar) caddar #fn("n10<=T:" #() caddar) cadddr
- #fn("n10==T:" #() cadddr) caddr #4=#fn("n10=T:" #() caddr) call-with-values
+fn("n1700A62:" #(bq-bracket1))
+ #fn(nconc) list* #fn("n20J;02071151P:0B3o00<22CX020731AEl23700=@C07425e2760=AK~52e252P:F<0=770<A521P62:2071760A521P51P:" #(nconc
+ reverse! unquote nreconc list 'unquote bq-process bq-bracket))) bq-process)
+ builtin->instruction #fn("n120A0q63:" #(#fn(get)) #(#table(#.cadr cadr #.aset! aset! #.+ + #.- - #.equal? equal? #.eq? eq? #.builtin? builtin? #.not not #.cons? cons? #.cdr cdr #./ / #.div0 div0 #.set-car! set-car! #.vec vec #.set-cdr! set-cdr! #.< < #.aref aref #.for for #.cons cons #.apply apply #.eqv? eqv? #.vec? vec? #.list list #.car car #.bound? bound? #.nan? nan? #.fn? fn? #.sym? sym? #.compare compare #.fixnum? fixnum? #.atom? atom? #.= = #.num? num? #.* *)))
+ caaaar #fn("n10<<<<:" #() caaaar) caaadr
+ #fn("n10T<<:" #() caaadr) caaar #fn("n10<<<:" #() caaar) caadar
+ #fn("n10<T<:" #() caadar) caaddr #fn("n10=T<:" #() caaddr) caadr
+ #fn("n10T<:" #() caadr) caar #fn("n10<<:" #() caar) cadaar
+ #fn("n10<<T:" #() cadaar) cadadr #fn("n10TT:" #() cadadr) cadar
ure-var! #fn("n20r3G70186E5387;JG042186510r322861e152p4:" #(index-of
-10r322861e152p4:" #(index-of
- #fn(length) #fn(nconc)) capture-var!)
- cdaaar #fn("n10<<<=:" #() cdaaar) cdaadr
- #fn("n10T<=:" #() cdaadr) cdaar #fn("n10<<=:" #() cdaar) cdadar
- #fn("n10<T=:" #() cdadar) cdaddr #fn("n10=T=:" #() cdaddr) cdadr
- #fn("n10T=:" #() cdadr) cdar #fn("n10<=:" #() cdar) cddaar
- #fn("n10<<==:" #() cddaar) cddadr #fn("n10T==:" #() cddadr) cddar
- #fn("n10<==:" #() cddar) cdddar #fn("n10<===:" #() cdddar) cddddr
- #fn("n10====:" #() cddddr) cdddr #fn("n10===:" #() cdddr) cddr
- #fn("n10==:" #() cddr) char? #fn("n12005121Q:" #(#fn(typeof) rune) char?) closure?
- #fn("n10\\;36040[S:" #() closure?) compile #fn("n170q7105162:" #(compile-f lower-define) compile)
+ddr) caddr #4=#fn("n10=T:" #() caddr) call-with-values
+ #fn("n205086B3@0A86<C90186=}2:18661:" #() #(#3=(*values*))) capture-var! #fn("n20r3G70186E5387;JG042186510r322861e152p4:" #(index-of
+ #fn(length) #fn(nconc)) capture-var!)
+ cdaaar #fn("n10<<<=:" #() cdaaar) cdaadr
+ #fn("n10T<=:" #() cdaadr) cdaar #fn("n10<<=:" #() cdaar) cdadar
+ #fn("n10<T=:" #() cdadar) cdaddr #fn("n10=T=:" #() cdaddr) cdadr
+ #fn("n10T=:" #() cdadr) cdar #fn("n10<=:" #() cdar) cddaar
+ #fn("n10<<==:" #() cddaar) cddadr #fn("n10T==:" #() cddadr) cddar
+ #fn("n10<==:" #() cddar) cdddar #fn("n10<===:" #() cdddar) cddddr
+ #fn("n10====:" #() cddddr) cdddr #fn("n10===:" #() cdddr) cddr
+ #fn("n10==:" #() cddr) char? #fn("n12005121Q:" #(#fn(typeof) rune) char?) closure?
@=00r40r4Gr/Mp48:3C07?018283898:8;67:760823702@@402A8;63:" #(in-env?
#fn(top-level-value) length> 255 compile-in compile-arglist emit tcall.l call.l
-nlineable? compile-let compile-builtin-call tcall call) compile-app)
- compile-arglist #fn("n3202101>282524228261:" #(#fn(for-each)
- #fn("n170AFq0544Ar4Ar4GKMp:" #(compile-in))
- #fn(length)) compile-arglist)
+283898:8;67:760823702@@402A8;63:" #(in-env?
+ #fn(top-level-value) length> 255 compile-in compile-arglist emit tcall.l call.l
+ builtin->instruction cadr length= lambda? inlineable? compile-let compile-builtin-call tcall call) compile-app)
+ compile-arglist #fn("n3202101>282524228261:" #(#fn(for-each)
28752P544750176828752530r40r4G88UMp47702262:7822r362:" #(#fn(length)
- list-head compile-arglist list-tail emit argc-error) compile-aset!)
+ compile-aset! #fn("n3208251r2~87Kl23?07101q2282P64:K87L23h07101q2374828752P544750176828752530r40r4G88UMp47702262:7822r362:" #(#fn(length)
064:83=H3>070018283<64:7001q83<5447202352474018283=64:" #(compile-in
-8283=64:" #(compile-in
+et! aref list-head compile-arglist list-tail emit argc-error) compile-aset!)
2ICb086r2l23:07702J62:r286L23?07708586r3~63:7585r262:7708562:" #(#0#
#fn("n0AEl239070FK62:7192FA63:" #(argc-error emit) num-compare)
#fn(get) arg-counts length= argc-error list emit loadnil < = + load0 add2 - neg sub2 * load1 /
-ad1 /
- vec loadv #() apply tapply aref aref2) compile-builtin-call)
- compile-f #fn("n2702101>22262:" #(call-with-values #fn("n070AF62:" #(compile-f-))
+08562:" #(#0#
+ #fn("n0AEl239070FK62:7192FA63:" #(argc-error emit) num-compare)
+ #fn(get) arg-counts length= argc-error list emit loadnil < = + load0 add2 - neg sub2 * load1 /
7I15154478862L5247M2N7O86EG517P86518<5386r3G62:" #(make-code-emitter
lastcdr lambda:vars filter cons? λ #fn(length) keyword-arg? emit optargs bcode:indexfor
make-perfect-hash-table #fn(map) cons car iota keyargs emit-optional-arg-inits 255 vargc.l argc.l
vargc argc extend-env complex-bindings lambda:body box-vars compile-in ret values #fn(fn)
- ret values #fn(fn)
+ make-perfect-hash-table #fn(map) cons car iota keyargs emit-optional-arg-inits 255 vargc.l argc.l
<07502852@;0750298:53475027895347401828=544750278:63:" #(#fn(gensym)
-
+8351728351B3;0738351@30q8;DC=07401828<64:8;J=07401828=64:7401q8;89554750268953475027885347401828<544823<07502852@;0750298:53475027895347401828=544750278:63:" #(#fn(gensym)
835151360q@807W2`5147A01q7_83515447102]62:7>01828364:" #(compile-sym
emit load0 load1 loadt loadnil void? loadvoid fits-i8 loadi8 loadv aset! compile-aset! in-env?
compile-app quote self-evaluating? compile-in if compile-if begin compile-begin prog1
compile-prog1 λ call-with-values #fn("n070AF62:" #(compile-f-))
-70A21053413K02223AF>2152470A242515163:q:" #(emit loadv #fn(for-each)
+n-env?
)
#fn("n170AF0q64:" #(compile-sym)) closure #fn(length)))
-ddr "trycatch: second form must be a 1-argument lambda") compile-in)
+mpile-or while compile-while cddr return ret set! value-get-doc error "set!: name must be a symbol"
827388515440r40r4G8<UMp4E8<L23A082J<0770288<63:q:" #(compile-arglist
-ndings caddr box-vars #fn(nconc) compile-in emit shift) compile-let)
- compile-or #fn("n470018283q21q67:" #(compile-short-circuit brnn) compile-or)
+e-let #fn("n483<83=0r4G88T70018953718;727388518;528:537408=524258=1<521=P7608>827388515440r40r4G8<UMp4E8<L23A082J<0770288<63:q:" #(compile-arglist
+ vars-to-env complex-bindings caddr box-vars #fn(nconc) compile-in emit shift) compile-let)
251B3_00r40r4GKMp47201q718251544730245240r40r4Gr/Mp:q:" #(compile-in
-Gr/Mp:q:" #(compile-in
+ compile-or #fn("n470018283q21q67:" #(compile-short-circuit brnn) compile-or)
/Mp47302962:7201q8354489360q@>07:2;2<82525147302=8;63:" #(lookup-sym
global compile-in emit setg vinfo:index capture-var! loada loadc set-car! error #fn(str)
-r #fn(str)
+KMp47201q835440r40r4Gr/Mp47302962:7201q8354489360q@>07:2;2<82525147302=8;63:" #(lookup-sym
p486360q@907202452475018283=84858657486340q:720268;63:" #(compile-in
-ym) emit dup pop compile-short-circuit label) compile-short-circuit)
+3=H3@070018283<8665:86;J70421507001q83<865540r40r4GKMp486360q@9072023524720858;5340r40r4Gr/Mp486360q@907202452475018283=84858657486340q:720268;63:" #(compile-in
88=T3:07502:62:q:7502;7<08252534833A088=T3:07502:62:q:" #(lookup-sym
global #fn(constant?) printable? #fn(top-level-value) emit loadv loadg loada vinfo:index car
-loadv loadg loada vinfo:index car
- loadc capture-var!) compile-sym)
+3:750278263:88<El23W0750287988=51534833A088=T3:07502:62:q:7502;7<08252534833A088=T3:07502:62:q:" #(lookup-sym
+ global #fn(constant?) printable? #fn(top-level-value) emit loadv loadg loada vinfo:index car
534730265240r40r4Gr/Mp47101q835447302788534730248963:" #(#fn(gensym)
-#fn(gensym)
- compile-in void emit label brn pop jmp) compile-while)
- complex-bindings #fn("n2205020507101qq8687564722386>174875162:" #(#fn(table)
- complex-bindings-
- filter #fn("n120A062:" #(#fn(has?)))
+define) compile-thunk)
+ compile-while #fn("n4205020507101q72505440r40r4GKMp473024885347101q825447302589534730265240r40r4Gr/Mp47101q835447302788534730248963:" #(#fn(gensym)
+ compile-in void emit label brn pop jmp) compile-while)
+ complex-bindings #fn("n2205020507101qq8687564722386>174875162:" #(#fn(table)
+ complex-bindings-
q82S;J50483848566:740<17:051838485562;2<1838485>40=52P:" #(#fn(memq)
#fn(put!) quoted? set! complex-bindings- caddr lambda? lambda:body diff lambda:vars inlineable?
-map) #fn("n1700AqF929366:" #(complex-bindings-))) complex-bindings-)
- const-to-idx-vec #fn("n1200r2G51212285>10KG52485:" #(#fn(vec-alloc)
- #fn(for-each)
- #fn("n2A10p:" #())) const-to-idx-vec)
- copy-tree #fn("n10H3400:700<51700=51P:" #(copy-tree) copy-tree) count
- #fn("n2Ib620862186>1_51486<01E63:" #(#0#
- #fn("n31J5082:A<01=01<5139082KM@408263:" #() count-)) count)
+2S;J50483848566:740<17:051838485562;2<1838485>40=52P:" #(#fn(memq)
+ #fn(put!) quoted? set! complex-bindings- caddr lambda? lambda:body diff lambda:vars inlineable?
+ #fn(map) #fn("n1700AqF929366:" #(complex-bindings-))) complex-bindings-)
+ const-to-idx-vec #fn("n1200r2G51212285>10KG52485:" #(#fn(vec-alloc)
+ #fn(for-each)
+ #fn("n2A10p:" #())) const-to-idx-vec)
+ copy-tree #fn("n10H3400:700<51700=51P:" #(copy-tree) copy-tree) count
8586>2_486<^10q62:0H3400:0<0=73858652390748661:85748651P:" #(length>
-8070161:21A0<523:0F<0=162:22A0<D534F<0=0<1P62:" #(reverse! #fn(has?)
+ #() count-)) count)
0<D534F<0=0<1P62:" #(reverse! #fn(has?)
- #fn(put!))) member
- delete-duplicates) delete-duplicates)
+51P:" #(length>
+ #fn(table) #fn("n20H38070161:21A0<523:0F<0=162:22A0<D534F<0=0<1P62:" #(reverse! #fn(has?)
82<2G88=PPp@J0892HCB00E82<2I88=PPp@30q;J@040E7J182P8852p^140:" #(#0#
#fn("n17002162:" #(member (load0 load1 loadt loadf loadnil loadvoid)) load?) car cdr cadr pop #fn(memq)
(loadv loadg setg) bcode:indexfor #fn(assq) ((loadv loadv.l) (loadg loadg.l) (setg setg.l) (loada
-sq) ((loadv loadv.l) (loadg loadg.l) (setg setg.l) (loada
+J182P8852p^140:" #(#0#
oada
- (1) loada1 loadc loadc0 loadc1 brn not brnn eq? brne nreconc) emit)
+loadg.l) (setg setg.l) (loada
82515447102884534710295247102:895347;0182=8384KM65:q:" #(#fn(gensym)
-dar seta pop label emit-optional-arg-inits) emit-optional-arg-inits)
+x91020507102284534710238953474075176838452q53q7782515447102884534710295247102:895347;0182=8384KM65:q:" #(#fn(gensym)
2:8<2N8>5152489KM?9^1@30q@\x9f.42O2P8<878:>38;5242Q8<61:" #(reverse!
list->vec >= #fn(length) 65536 #fn(table) #fn(buffer) label #fn(put!)
#fn(sizeof) #fn(io-write) #fn(get) Instructions jmp jmp.l brne brne.l brnn brnn.l brn brn.l #fn(memq)
-2 s16 brbound #fn(s32) (loadv.l loadg.l setg.l loada.l seta.l argc.l
- vargc.l call.l tcall.l loadc.l box.l) (optargs
+536 #fn(table) #fn(buffer) label #fn(put!)
+ #fn(sizeof) #fn(io-write) #fn(get) Instructions jmp jmp.l brne brne.l brnn brnn.l brn brn.l #fn(memq)
c.l call.l tcall.l loadc.l box.l) (optargs
-for-each) #fn("n220A052421AF37072@407324921520~5162:" #(#fn(io-seek)
- #fn(io-write) s32 s16
+ vargc.l call.l tcall.l loadc.l box.l) (optargs
+ keyargs)
seek)
- s32 s16
- #fn(get)))
- #fn(io->str)) encode-byte-code)
- error #fn("z020210P61:" #(#fn(raise) error) error) eval
+" #(#fn(io-seek)
+ #fn(io-write) s32 s16
+ #fn(get)))
+ #fn(io->str)) encode-byte-code)
40515285R3@021258586<e3e2:212585<2627e185=e128865185<54e3e2:" #(cddr
-tax " print-to-str set! #fn(nconc) λ #fn(copy-list)) expand-define)
- extend-env #fn("n370182E530P:" #(vars-to-env) extend-env) filter
- #fn("n2I20210>1?65148601qe163:" #(#0# #fn("n382I1B3Q04A1<513?0821<qPN=?2@30q41=?1@\x0e/4=:" #() filter-)) filter)
- fits-i8 #fn("n10Y;3<0470r\xaf0r\xb063:" #(>=) fits-i8) fn-disasm
+ #fn("n10T70051B3:070051@H085R37021@=07223740515285R3@021258586<e3e2:212585<2627e185=e128865185<54e3e2:" #(cddr
+ #1=#fn("z0I:" #() void) error "compile error: invalid syntax " print-to-str set! #fn(nconc) λ #fn(copy-list)) expand-define)
+ extend-env #fn("n370182E530P:" #(vars-to-env) extend-env) filter
+ #fn("n2I20210>1?65148601qe163:" #(#0# #fn("n382I1B3Q04A1<513?0821<qPN=?2@30q41=?1@\x0e/4=:" #() filter-)) filter)
2K7L8<<7?888<<52M515248<8<<r4M_@<08;8>8<<E53^1^1@\xd0-:" #(fn-disasm
- #fn(fn-vals) #1# #fn("n10\\3F00[JA070504710qAKM63:72061:" #(newline
- fn-disasm
+b08;8>8<<r25347B2K7L8<<7M888<<52M515248<8<<r2M_@w02=8?2N523b08;8>8<<r45347B2K7L8<<7?888<<52M515248<8<<r4M_@<08;8>8<<E53^1^1@\xd0-:" #(fn-disasm
+ newline void #fn(fn-code) #fn(fn-vals) #1# #fn("n10\\3F00[JA070504710qAKM63:72061:" #(newline
:72061:" #(newline
-1523A0A182ML237023@4024751K~512602765:" #(princ >= 1- " >" " " hex5
+ fn-disasm
" #(princ >= 1- " >" " " hex5
": " " ") print-inst)
#fn(length) #fn(table-foldl) #fn("n382;J@041AF<Gl2;34040:" #()) Instructions #fn("n1702161:" #(princ
"\t")) #fn(memq) (loadv.l loadg.l setg.l) ref-s32-LE (loadv loadg setg)
(loada seta loadc call tcall list + - * / < = vec argc vargc loadi8 apply tapply closure box
-gs " " brbound (jmp brne brnn brn) "@" hex5 ref-s16-LE (jmp.l brne.l
- brnn.l brn.l)) fn-disasm)
- foldl #fn("n382J401:700082<15282=63:" #(foldl) foldl) foldr
+c argc vargc loadi8 apply tapply closure box
+ shift aref) princ #fn(num->str) aref (loada.l seta.l loadc.l argc.l vargc.l call.l tcall.l box.l)
+ (optargs keyargs) keyargs " " brbound (jmp brne brnn brn) "@" hex5 ref-s16-LE (jmp.l brne.l
1;JS040TB;3E0471051R;3:0471051e1;J404q:0<22C?07324A<0=52}2:q:" #(def
-22C?07324A<0=52}2:q:" #(def
- caadr begin nconc #fn(map)) #(#2#)))))
- get-syntax #fn("n120710q63:" #(#fn(get)
- *syntax-environment*) get-syntax)
- getprop #fn("\x8720003000W2000J60q?2420711q5387;3<04208708253;J50482:" #(#fn(get)
- *properties*) getprop)
- hex5 #fn("n170210r@52r52263:" #(str-lpad #fn(num->str) #\0) hex5) identity
- #fn("n10:" #() identity) in-env? #fn("n21B;3F042001<52;J:047101=62:" #(#fn(assq)
- in-env?) in-env?)
+00182=5362:" #(foldr) foldr) get-defined-vars #fn("n170A<05161:" #(delete-duplicates) #(#2=(#fn("n10H340q:0<20Cj00=B3d00TR;37040Te1;JS040TB;3E0471051R;3:0471051e1;J404q:0<22C?07324A<0=52}2:q:" #(def
+ caadr begin nconc #fn(map)) #(#2#)))))
+ get-syntax #fn("n120710q63:" #(#fn(get)
+ *syntax-environment*) get-syntax)
+ getprop #fn("\x8720003000W2000J60q?2420711q5387;3<04208708253;J50482:" #(#fn(get)
+ *properties*) getprop)
+ hex5 #fn("n170210r@52r52263:" #(str-lpad #fn(num->str) #\0) hex5) identity
+ #fn("n10:" #() identity) in-env? #fn("n21B;3F042001<52;J:047101=62:" #(#fn(assq)
+ in-env?) in-env?)
047185T51;3]04727385T52;3O047485T2552S;3@047685T270=5162:" #(lambda?
-da?
- list? every sym? length> 255 length= #fn(length)) inlineable?)
- io-readall #fn("n1205021850524228561:" #(#fn(buffer)
- #fn(io-copy)
- #fn(io->str)) io-readall)
+("n31J40q:01<C5082:7001=82KM63:" #(index-of) index-of) inlineable?
+ #fn("n10<85B;3u047085<51;3i047185T51;3]04727385T52;3O047485T2552S;3@047685T270=5162:" #(lambda?
+ list? every sym? length> 255 length= #fn(length)) inlineable?)
+ io-readall #fn("n1205021850524228561:" #(#fn(buffer)
+ #fn(io-copy)
ad-all-of io-readline) io-readlines) iota #fn("n17071062:" #(map-int
-ine) io-readlines) iota #fn("n17071062:" #(map-int
- identity) iota)
- keyword->sym #fn("n1200513K021220512386K24865153^161:0:" #(#fn(keyword?)
- #fn(sym)
- #fn(str)
- #fn(str-sub)
- #fn(str-length)) keyword->sym)
- keyword-arg? #fn("n10B;3904200<61:" #(#fn(keyword?)) keyword-arg?) lambda-vars
+io->str)) io-readall)
+ io-readline #fn("n12002162:" #(#fn(io-readuntil) #\newline) io-readline) io-readlines
+ #fn("n17071062:" #(read-all-of io-readline) io-readlines) iota #fn("n17071062:" #(map-int
+ identity) iota)
+ keyword->sym #fn("n1200513K021220512386K24865153^161:0:" #(#fn(keyword?)
+ #fn(sym)
+ #fn(str)
+ #fn(str-sub)
112863:A<0=1D8364:0B3>070290<26164:01C:07021162:7029026164:" #(error
"compile error: invalid argument list " ": optional arguments must come after required." length=
caar "compile error: invalid optional argument " " in list " #fn(keyword?)
-ome last." "compile error: invalid formal argument ") check-formals)
- #fn(map)
- #fn("n10B390700<61:0:" #(keyword->sym))
- to-proper) lambda-vars)
- lambda:body #fn("n170061:" #(caddr) lambda:body) lambda:vars
- #fn("n1700T61:" #(lambda-vars) lambda:vars) lambda? #fn("n1020Q;J704020Q:" #(λ) lambda?)
- last-pair #fn("n10=H3400:700=61:" #(last-pair) last-pair) lastcdr
- #fn("n10H3400:70051=:" #(last-pair) lastcdr) length= #fn("n21EL2340q:1El23500H:0H3701El2:700=1K~62:" #(length=) length=)
- length> #fn("n21EL23400:1El23;00B;34040:0H3701EL2:700=1K~62:" #(length>) length>)
- list->vec #fn("n1700}2:" #(vec) list->vec) list-head
- #fn("n2701E52340q:0<710=1K~52P:" #(<= list-head) list-head) list-ref #fn("n2700152<:" #(list-tail) list-ref)
- list-tail #fn("n2701E523400:710=1K~62:" #(<= list-tail) list-tail) list?
+ list " ": optional arguments must come after required." length=
+ caar "compile error: invalid optional argument " " in list " #fn(keyword?)
+ ": keyword arguments must come last." "compile error: invalid formal argument ") check-formals)
+ #fn(map)
+ #fn("n10B390700<61:0:" #(keyword->sym))
+ to-proper) lambda-vars)
+ lambda:body #fn("n170061:" #(caddr) lambda:body) lambda:vars
+ #fn("n1700T61:" #(lambda-vars) lambda:vars) lambda? #fn("n1020Q;J704020Q:" #(λ) lambda?)
+ last-pair #fn("n10=H3400:700=61:" #(last-pair) last-pair) lastcdr
+ #fn("n10H3400:70051=:" #(last-pair) lastcdr) length= #fn("n21EL2340q:1El23500H:0H3701El2:700=1K~62:" #(length=) length=)
+ length> #fn("n21EL23400:1El23;00B;34040:0H3701EL2:700=1K~62:" #(length>) length>)
+ list->vec #fn("n1700}2:" #(vec) list->vec) list-head
61:" #(list?) list?) load #fn("n120021522285>123850>2{:" #(#fn(file)
:read #fn("n0Ib48420A84>2_484<^1III63:" #(#fn("n320A51JG0F<21A510721514735063:24A514737215161:" #(#fn(io-eof?)
-ess void #fn(io-close))))) #fn("n120A5142122F0e361:" #(#fn(io-close)
- #fn(raise) load-error))) load)
- load-process #fn("n170061:" #(eval) load-process) lookup-sym
- #fn("n31J5020:1<2108752883808288P:7201=82KM63:" #(global #fn(assq) lookup-sym) lookup-sym)
+120021522285>123850>2{:" #(#fn(file)
+ :read #fn("n0Ib48420A84>2_484<^1III63:" #(#fn("n320A51JG0F<21A510721514735063:24A514737215161:" #(#fn(io-eof?)
+ #fn(read) load-process void #fn(io-close))))) #fn("n120A5142122F0e361:" #(#fn(io-close)
+ #fn(raise) load-error))) load)
0:0<23C<0747505161:760<513K02728e10Te185051e17905164:2:74062:" #(#1#
#fn("n170051B3N071051B3=02270051P@7073051@607450758551768551863D0278687e328748652P:87:" #(cddr
cdddr begin caddr void get-defined-vars lower-define λ #fn(map)) λ-body) quoted? def lower-define
- expand-define lambda? #fn(nconc) λ lastcdr #fn(map)) lower-define)
- macrocall? #fn("n10<R;3904700<61:" #(get-syntax) macrocall?) macroexpand
+70051P@7073051@607450758551768551863D0278687e328748652P:87:" #(cddr
+ cdddr begin caddr void get-defined-vars lower-define λ #fn(map)) λ-body) quoted? def lower-define
4_514208=29888?>2_514208>2:_514208?2;8?8>8;8<8=>5_5148?<0q62:" #(#0#
#fn("n20Z;J904200152S:" #(#fn(assq)) top?) #fn("n10H3400:020d3400:0<B3P07105122CF023A<7405151A<0=5162:0<A<0=51P:" #(((begin))
caar begin #fn(append) cdar) splice-begin) *expanded* #fn("n20H3400:A<201523:0F<051@300A<21152873;0728651@30q2324758852152b987JA024269289>28662:Ib:8:278:928993>4_48:<^186518:I8;B3c0493<788;51QJC08;92<8;<89<52_@;08;798;51_48;=?;@\xfb/48::" #(begin
@@ -291,163 +291,165 @@
#fn(nconc) #fn(map) list get-defined-vars)) caar cdar) expand-body)
#fn("n20H3400:0<B3M00<=B3F070051A<71051152e2@400<F<0=152P:" #(caar cadar) expand-lambda-list)
#fn("n10H3600e1:0<B3?070051A<0=51P:0<A<0=51P:" #(caar) l-vars)
-237489521522225e1F<868:52e192<888:528764:" #(lastcdr cddr #fn(nconc)
+3M00<=B3F070051A<71051152e2@400<F<0=152P:" #(caar cadar) expand-lambda-list)
(lastcdr cddr #fn(nconc)
#fn(map) list λ) expand-lambda)
#fn("n20=S;J6040TH3o070051J400:0T717005151873B00=?0472868752@30q42386A<74051152e3:750517605170051718851F<86512728798:52152893E088=?847287898653@30q42723e18792<868;52Pe193<888;5263:" #(cddr
-ne) #fn("n20T20A<71051222324F1>2865215252P:" #(begin cddr #fn(nconc)
- #fn(map)
+512728798:52152893E088=?847287898653@30q42723e18792<868;52Pe193<888;5263:" #(cddr
+ value-get-doc sym-set-doc def caddr cdadr caadr #fn(nconc)
#fn("n10<70A<0TF525150Fe3:" #(compile-thunk))) expand-let-syntax)
#fn("n20:" #() local-expansion-env) #fn("n20H3400:0<208615221A10>3873P087=B3I0A<87T0=f2F<72875115262:73051893>0A<890=f2162:87;J?0486RS;J60486Z3708860:8624C400:8625C:092<0162:8625C:092<0162:8626C:093<0162:8627C:094<0162:8860:" #(#fn(assq)
#fn("n0Ib48420AF84>3_484<^19261:" #(#fn("n10H3400:0<H3700<@90A<0<F5292<0=51P:" #()))) caddr
-caddr
- macrocall? quote λ def let-syntax) expand-in)) macroexpand)
- macroexpand-1 #fn("n10H3400:7005185390850=}2:0:" #(macrocall?) macroexpand-1)
+400:8625C:092<0162:8625C:092<0162:8626C:093<0162:8627C:094<0162:8860:" #(#fn(assq)
+ #fn("n0Ib48420AF84>3_484<^19261:" #(#fn("n10H3400:0<H3700<@90A<0<F5292<0=51P:" #()))) caddr
+ macrocall? quote λ def let-syntax) expand-in)) macroexpand)
-hash-table #fn("n1Ib5208521_514Ib6862285860>3_486<^12305161:" #(#1#
#fn("n270712205151162:" #(mod0 abs #fn(hash)) $hash-keyword)
-d)
+ake-code-emitter)
r2A<85F52i29286G3;093<FKM61:928685p49286KM71051p494<0=61:92:" #(caar
-94<0=61:92:" #(caar
+20i2q52Ib68621A085F86>5_486<^19261:" #(#fn(vec-alloc)
120021222354247576Dw54Dw64278788>2288685>22989>1{89504:" #(#fn(file)
-:truncate (*linefeed* *directory-separator* *argv* that *exit-hooks*
- *print-pretty* *print-width* *print-readably* *print-level*
+ cdar)))) #fn(length)) make-perfect-hash-table)
+ make-system-image #fn("n120021222354247576Dw54Dw64278788>2288685>22989>1{89504:" #(#fn(file)
*print-length* *os-name* *interactive* *prompt* *os-version*)
*print-pretty* *print-readably* #fn("n0Aw04Fw1:" #(*print-pretty* *print-readably*))
#fn("n07021A>17223505152742576842577845253f22885F52429F7:52^1^142;F61:" #(filter #fn("n10Z;3u0420051S;3j0421051[S;JC0422051222105151dS;3I04230A52S;3=04242105151S:" #(#fn(constant?)
-tr) #fn(memq) #fn(io?))) simple-sort #fn(environment) nconc #fn(map)
- list top-level-value #fn(write)
- #fn(io-write)
+5253f22885F52429F7:52^1^142;F61:" #(filter #fn("n10Z;3u0420051S;3j0421051[S;JC0422051222105151dS;3I04230A52S;3=04242105151S:" #(#fn(constant?)
+ #fn(top-level-value) #fn(str) #fn(memq) #fn(io?))) simple-sort #fn(environment) nconc #fn(map)
+ list top-level-value #fn(write)
)
-(io-close)))
- #fn("n1A50420061:" #(#fn(raise)))) make-system-image)
- map! #fn("n21I1B3B04101<51_41=?1@\x1d/4:" #() map!) map-int
- #fn("n2701E52340q:0E51qPqb78786_4K7115122870>2|486:" #(<= 1- #fn("n1A<F051qPN4AA<=_:" #())) map-int)
- max #fn("z113;070210163:0:" #(foldl #fn("n201L23401:0:" #())) max) member
- #fn("n21<0d3401:13:07001=62:q:" #(member) member) memv #fn("n21<0c3401:13:07001=62:q:" #(memv) memv)
- min #fn("z113;070210163:0:" #(foldl #fn("n201L23400:1:" #())) min) mod
+ #fn(io-write)
+ *linefeed* #fn(io-close)))
+ #fn("n1A50420061:" #(#fn(raise)))) make-system-image)
+ map! #fn("n21I1B3B04101<51_41=?1@\x1d/4:" #() map!) map-int
+ #fn("n2701E52340q:0E51qPqb78786_4K7115122870>2|486:" #(<= 1- #fn("n1A<F051qPN4AA<=_:" #())) map-int)
+ max #fn("z113;070210163:0:" #(foldl #fn("n201L23401:0:" #())) max) member
+ #fn("n21<0d3401:13:07001=62:q:" #(member) member) memv #fn("n21<0c3401:13:07001=62:q:" #(memv) memv)
:" #() negative?) nestlist #fn("n37082E52340q:1710015182K~53P:" #(<=
-list #fn("n37082E52340q:1710015182K~53P:" #(<=
- nestlist) nestlist)
- newline #fn("\x8700001000W0000J7070?04210725247360:" #(*io-out* #fn(io-write)
- *linefeed* void) newline)
- nreconc #fn("n2701062:" #(reverse!-) nreconc) odd?
- #fn("n170051S:" #(even?) odd?) partition #fn("n2I2021?65148601qe1qe164:" #(#0#
- #fn("n48283PI1B3Z0401<513?0821<qPN=?2@<0831<qPN=?341=?1@\x05/47088<=88==62:" #(values) partition-)) partition)
- positive? #fn("n1E0L2:" #() positive?) princ
- #fn("z070qw042185>1220>12386>1{86504:" #(*print-readably* #fn("n0Aw0:" #(*print-readably*))
- #fn("n02071A62:" #(#fn(for-each) write))
- #fn("n1A50420061:" #(#fn(raise)))) princ)
+dl #fn("n201L23400:1:" #())) min) mod
+ #fn("n207001521i2~:" #(div) mod) mod0 #fn("n2001k1i2~:" #() mod0) negative?
+ #fn("n10EL2:" #() negative?) nestlist #fn("n37082E52340q:1710015182K~53P:" #(<=
+ nestlist) nestlist)
+ newline #fn("\x8700001000W0000J7070?04210725247360:" #(*io-out* #fn(io-write)
+ *linefeed* void) newline)
+ nreconc #fn("n2701062:" #(reverse!-) nreconc) odd?
+ #fn("n170051S:" #(even?) odd?) partition #fn("n2I2021?65148601qe1qe164:" #(#0#
+ #fn("n48283PI1B3Z0401<513?0821<qPN=?2@<0831<qPN=?341=?1@\x05/47088<=88==62:" #(values) partition-)) partition)
+ positive? #fn("n1E0L2:" #() positive?) princ
+ #fn("z070qw042185>1220>12386>1{86504:" #(*print-readably* #fn("n0Aw0:" #(*print-readably*))
T2E8551;J60485R37072@40788551^1@>0722F514780514727G61:" #(type-error
length= princ "type error: expected " ", got " #fn(typeof) caddr ": " print bounds-error "index "
" out of bounds for " unbound-error "eval: variable " " has no value" error "error: " load-error
-? #fn(str?) "*** Unhandled exception: " *linefeed*) print-exception)
+caddr ": " print bounds-error "index "
F075076370r5@40r452@300517778292:2;505252Eb92<2=868889>38762:" #(#0#
-05121151C?022232487e361:25051E76278851512888A187>4|:" #(#fn(fn-name)
- #fn(fn-code)
- #fn(raise) thrown-value
- ffound #fn(fn-vals) 1-
- #fn(length)
+)
+ print-stack-trace #fn("n1IIb5b620852185>1_51420862285>1_51473740r3523F075076370r5@40r452@300517778292:2;505252Eb92<2=868889>38762:" #(#0#
+ #fn("n32005182P2105121151C?022232487e361:25051E76278851512888A187>4|:" #(#fn(fn-name)
+ #fn(fn-code)
+ #fn(raise) thrown-value
#fn("n170A0G513>0F<A0G929363:q:" #(closure?))) find-in-f)
-3E0722374758651522662:27:" #(#fn("n02021AF>292524q:" #(#fn(for-each)
- #fn("n1A<0Fq63:" #())))
+ #fn(length)
+ #fn("n170A0G513>0F<A0G929363:q:" #(closure?))) find-in-f)
())))
#fn("n10B3F00<20C?00T21C8072061:23061:" #(thrown-value
ffound caddr #fn(raise))) str-join #fn(map) str reverse! "/" "λ") fname) reverse! length>
list-tail *interactive* filter closure? #fn(map) #fn("n10Z;380420061:" #(#fn(top-level-value)))
-" " print)) vec->list ")" *linefeed* fn-disasm))) print-stack-trace)
- print-to-str #fn("n1205021085524228561:" #(#fn(buffer)
- #fn(write)
- #fn(io->str)) print-to-str)
- printable? #fn("n120051;JB0471051;J80422051S:" #(#fn(io?) void? #fn(eof-object?)) printable?)
- putprop #fn("n320711q5387360q@F02250237118853488?7^14238708253482:" #(#fn(get)
- *properties* #fn(table)
- #fn(put!)) putprop)
- quote-value #fn("n1700513400:210e2:" #(self-evaluating? quote) quote-value) quoted?
+ #fn(environment) #fn(for-each) #fn("n17021A<0KGF52524222374051==52470257652492<El23?0770KG0EG52@30q49292<KM_:" #(princ
+ "(" #fn(for-each) #fn("n1702151472061:" #(princ " " print)) vec->list ")" *linefeed* fn-disasm))) print-stack-trace)
+ print-to-str #fn("n1205021085524228561:" #(#fn(buffer)
+ #fn(write)
+ #fn(io->str)) print-to-str)
+ printable? #fn("n120051;JB0471051;J80422051S:" #(#fn(io?) void? #fn(eof-object?)) printable?)
+ putprop #fn("n320711q5387360q@F02250237118853488?7^14238708253482:" #(#fn(get)
+ *properties* #fn(table)
+ #fn(put!)) putprop)
uote) quoted?) random #fn("n1200513<0712250062:23500i2:" #(#fn(int?)
-0062:23500i2:" #(#fn(int?)
- mod #fn(rand) #fn(rand-double)) random)
+p)
+ quote-value #fn("n1700513400:210e2:" #(self-evaluating? quote) quote-value) quoted?
486<^1q015162:" #(#fn("n220A5138071061:F<10P92A5162:" #(#fn(io-eof?)
-A5138071061:F<10P92A5162:" #(#fn(io-eof?)
- reverse!))) read-all-of)
- ref-s16-LE #fn("n2202101EMGE522101KMGr852M61:" #(#fn(s16)
- #fn(ash)) ref-s16-LE)
- ref-s32-LE #fn("n2202101EMGE522101KMGr8522101r2MGr@522101r3MGrH52g461:" #(#fn(s32)
- #fn(ash)) ref-s32-LE)
- remprop #fn("n220711q5386;3F042286052;3:042386062:" #(#fn(get) *properties* #fn(has?)
- #fn(del!)) remprop)
+and) #fn(rand-double)) random)
+ read-all #fn("n17071062:" #(read-all-of read) read-all) read-all-of
+ #fn("n2Ib686201860>3_486<^1q015162:" #(#fn("n220A5138071061:F<10P92A5162:" #(#fn(io-eof?)
+ reverse!))) read-all-of)
+ ref-s16-LE #fn("n2202101EMGE522101KMGr852M61:" #(#fn(s16)
+ #fn(ash)) ref-s16-LE)
+ ref-s32-LE #fn("n2202101EMGE522101KMGr8522101r2MGr@522101r3MGrH52g461:" #(#fn(s32)
+ #fn(ash)) ref-s32-LE)
324{257651S;3Z04778451788551360q@=079855147:5047;85w<61:" #(*prompt*
#fn(io-flush) *io-out* #fn("n02060:" #(#fn(read)))
#fn("n1207151422061:" #(#fn(io-discardbuffer) *io-in* #fn(raise)))
-io-eof?) *io-in* load-process void? print newline void that) prompt)
+51360q@=079855147:5047;85w<61:" #(*prompt*
ompt)
-n1700514D:" #(top-level-exception-handler))) reploop) newline) repl)
- revappend #fn("n2701062:" #(reverse-) revappend) reverse
- #fn("n170q062:" #(reverse-) reverse) reverse! #fn("n170q062:" #(reverse!-) reverse!)
- reverse!- #fn("n2I1B3B041=101?04N4?1@\x1d/40:" #() reverse!-) reverse-
+ocess void? print newline void that) prompt)
+ #fn("n020A>121{370F<60:q:" #(#fn("n0A<60:" #())
+ #fn("n1700514D:" #(top-level-exception-handler))) reploop) newline) repl)
+ revappend #fn("n2701062:" #(reverse-) revappend) reverse
120051S;3Z040H;36040RS;JK0421051;3A040R;3:04022051Q:" #(#fn(gensym?)
-fn(gensym?)
- #fn(constant?) #fn(top-level-value)) self-evaluating?)
- set-syntax! #fn("n220710163:" #(#fn(put!)
+d/40:" #() reverse!-) reverse-
+ #fn("n21J400:701<0P1=62:" #(reverse-) reverse-) self-evaluating? #fn("n120051S;3Z040H;36040RS;JK0421051;3A040R;3:04022051Q:" #(#fn(gensym?)
+ #fn(constant?) #fn(top-level-value)) self-evaluating?)
1850>22285>162:" #(call-with-values #fn("n07021A>1F=62:" #(partition
- #fn("n22071051Ae17115163:" #(#fn(nconc) simple-sort))) simple-sort)
+x-environment*) set-syntax!)
40<20Q;JN040<21Q;JD040<22Q;3:04730r252;J704022Q:" #(unquote-splicing
-(unquote-splicing
- unquote-nsplicing unquote length>) splice-form?)
- str-join #fn("n20J5020:215022860<5242324861>20=524258661:" #("" #fn(buffer)
- #fn(io-write)
- #fn(for-each)
- #fn("n120AF52420A062:" #(#fn(io-write)))
- #fn(io->str)) str-join)
+0AL2:" #()))) #fn("n22071051Ae17115163:" #(#fn(nconc) simple-sort))) simple-sort)
+ splice-form? #fn("n10B;3X040<20Q;JN040<21Q;JD040<22Q;3:04730r252;J704022Q:" #(unquote-splicing
+ unquote-nsplicing unquote length>) splice-form?)
+ str-join #fn("n20J5020:215022860<5242324861>20=524258661:" #("" #fn(buffer)
+ #fn(io-write)
+ #fn(for-each)
+ #fn("n120AF52420A062:" #(#fn(io-write)))
51EI8887L23O0422860231885251524748851?8@\f/^14758661:" #(#fn(buffer)
-)
+"n3207182122051~52062:" #(#fn(str) str-rep #fn(str-length)) str-lpad)
:1r2l2390220062:2200063:731513@02207401K~5262:742200521r2j262:" #(<=
-01K~5262:742200521r2j262:" #(<=
- "" #fn(str) odd? str-rep) str-rep)
- str-rpad #fn("n32007182122051~5262:" #(#fn(str) str-rep #fn(str-length)) str-rpad)
- str-tail #fn("n2200162:" #(#fn(str-sub)) str-tail) str-trim
+buffer)
+ #fn(str-length) #fn(io-putc) #fn(str-char) 1+ ios->str) str-map)
+ str-rep #fn("n21r4L23b0701E5235021:1Kl238022061:1r2l2390220062:2200063:731513@02207401K~5262:742200521r2j262:" #(<=
+ "" #fn(str) odd? str-rep) str-rep)
#fn("n48283L23P02012108252523A0A<017282518364:82:" #(#fn(str-find)
- #fn("n3E82L23R020121072825152523?0A<0172825163:82:" #(#fn(str-find)
- #fn(str-char)
- 1-) trim-end)
- #fn(str-length)
- #fn(str-sub)) str-trim)
- sym-set-doc #fn("z220Z3\x9c013\x980211225287<87=89<8:;3H04238:5123748:25265351~8:3A027288;>18952@30q70888<P22527902:8=53^1^1^1^1^1^1^1@30q482B3\\07;02<q537=2>87>182527902<2?87885253^1^1@30q47@60:" #(str-join
- #fn(str-split) "\n" #fn(length) str-trim " " "" #fn(map)
- #fn("n170A2105152390220A62:0:" #(<= #fn(length) #fn(str-sub))) putprop *doc* getprop *funvars*
- filter #fn("n1700A52S:" #(member)) #fn(append) void) sym-set-doc)
- table-clone #fn("n12050212285>1q053485:" #(#fn(table)
- #fn(table-foldl)
- #fn("n320A0163:" #(#fn(put!)))) table-clone)
- table-invert #fn("n12050212285>1q053485:" #(#fn(table)
- #fn(table-foldl)
- #fn("n320A1063:" #(#fn(put!)))) table-invert)
- table-keys #fn("n12021q063:" #(#fn(table-foldl)
- #fn("n3082P:" #())) table-keys)
- table-pairs #fn("n12021q063:" #(#fn(table-foldl)
- #fn("n301P82P:" #())) table-pairs)
- table-values #fn("n12021q063:" #(#fn(table-foldl)
- #fn("n3182P:" #())) table-values)
- to-proper #fn("n10J400:0H3600e1:0<700=51P:" #(to-proper) to-proper)
- top-level-exception-handler #fn("n17071w042285>1230>12486>1{86504:" #(*io-out* *stderr*
- #fn("n0Aw0:" #(*io-out*))
+ #fn("n48283L23P02012108252523A0A<017282518364:82:" #(#fn(str-find)
+ #fn(str-char) 1+) trim-start) #fn("n3E82L23R020121072825152523?0A<0172825163:82:" #(#fn(str-find)
+ #fn(str-char)
+ 1-) trim-end)
+ #fn(str-length)
+ #fn(str-sub)) str-trim)
+ sym-set-doc #fn("z220Z3\x9f013\x9b0211225287<87=732489528:;3H04258:5125768:27285351~8:;3?04292:8;>1895270888<P22527;02<8=53^1^1^1^1^1^1^1@30q482B3\\07=02>q537?2@87>182527;02>2A87885253^1^1@30q47B60:" #(str-join
+ #fn(str-split) "\n" any #fn("n1E20051L2;3@040EG21l2;34040:" #(#fn(length) #\space))
+ #fn(length) str-trim " " "" #fn(map) #fn("n170A2105152390220A62:0:" #(<= #fn(length)
+ #fn(str-sub))) putprop
+ *doc* getprop *funvars* filter #fn("n1700A52S:" #(member))
+ #fn(append) void) sym-set-doc)
+ table-clone #fn("n12050212285>1q053485:" #(#fn(table)
+ #fn(table-foldl)
+ #fn("n320A0163:" #(#fn(put!)))) table-clone)
+ table-invert #fn("n12050212285>1q053485:" #(#fn(table)
+ #fn(table-foldl)
+ #fn("n320A1063:" #(#fn(put!)))) table-invert)
+ table-keys #fn("n12021q063:" #(#fn(table-foldl)
+ #fn("n3082P:" #())) table-keys)
+ table-pairs #fn("n12021q063:" #(#fn(table-foldl)
+ #fn("n301P82P:" #())) table-pairs)
+ table-values #fn("n12021q063:" #(#fn(table-foldl)
+ #fn("n3182P:" #())) table-values)
+ to-proper #fn("n10J400:0H3600e1:0<700=51P:" #(to-proper) to-proper)
+ top-level-exception-handler #fn("n17071w042285>1230>12486>1{86504:" #(*io-out* *stderr*
" #(*io-out*))
-e))) #fn("n1A50420061:" #(#fn(raise)))) top-level-exception-handler)
- trace #fn("n120051718551Jc02207324252627280e225e3e229e12:2885e225e3e55152@30q^147;60:" #(#fn(top-level-value)
- traced? #fn(set-top-level-value!) eval λ #:g360 write cons quote newline apply void) trace)
+ #(*io-out*))
+ #fn("n070A51471225061:" #(print-exception
+ print-stack-trace #fn(stacktrace))) #fn("n1A50420061:" #(#fn(raise)))) top-level-exception-handler)
#(closure? #fn(fn-code)) #(#fn("z020210P51472504230}2:" #(#fn(write)
- #(#fn("z020210P51472504230}2:" #(#fn(write)
- x newline #.apply))))
- untrace #fn("n1200517185513C0220238551r3G52@30q^147460:" #(#fn(top-level-value) traced?
- #fn(set-top-level-value!)
- #fn(fn-vals) void) untrace)
+
+ traced? #fn(set-top-level-value!) eval λ #:g371 write cons quote newline apply void) trace)
+ traced? #fn("n170051;3>042105121A51d:" #(closure? #fn(fn-code)) #(#fn("z020210P51472504230}2:" #(#fn(write)
+ x newline #.apply))))
+ untrace #fn("n1200517185513C0220238551r3G52@30q^147460:" #(#fn(top-level-value) traced?
:" #() #(#3#)) vars-to-env #fn("n32021182>2072230515163:" #(#fn(map)
-00210A52SS1FM63:" #(vinfo #fn(memq))) iota #fn(length)) vars-to-env)
- vec->list #fn("n120051qb6K852186085>3|486<:" #(#fn(length)
- #fn("n1AF920~GA<P_:" #())) vec->list)
- vec-map #fn("n220151218651E86K~228701>3|487:" #(#fn(length)
- #fn(vec-alloc)
- #fn("n1A0F920G51p:" #())) vec-map)
- vinfo #fn("n30182e3:" #() vinfo) vinfo:heap? #.cadr vinfo:index
- #4# vinfo:sym #.car void
- #1# void? #fn("n10IQ:" #() void?) zero?
- #fn("n10El2:" #() zero?) zip #fn("z070710}3:" #(map list) zip) zip-with
+8551;3=0486B;350485:" #(#fn(str?)) value-get-doc) values
+ #fn("z00B3:00=J500<:A0P:" #() #(#3#)) vars-to-env #fn("n32021182>2072230515163:" #(#fn(map)
+ #fn("n2700210A52SS1FM63:" #(vinfo #fn(memq))) iota #fn(length)) vars-to-env)
+ vec->list #fn("n120051qb6K852186085>3|486<:" #(#fn(length)
+ #fn("n1AF920~GA<P_:" #())) vec->list)
+ vec-map #fn("n220151218651E86K~228701>3|487:" #(#fn(length)
+ #fn(vec-alloc)
+ #fn("n1A0F920G51p:" #())) vec-map)
+ vinfo #fn("n30182e3:" #() vinfo) vinfo:heap? #.cadr vinfo:index
+ #4# vinfo:sym #.car void
--- a/src/docs_extra.lsp
+++ b/src/docs_extra.lsp
@@ -1,7 +1,9 @@
(defmacro (doc-for term (doc nil))
"Define documentation for a top level term.
- If the optional doc argument is missing and the term is a function
- signture, adds it to the documentation."
+
+ If `term` is a function signature and `doc` is not specified, just
+ the signature will be included in the documentation, without
+ replacing any previously defined."
(let* ((call (cons? term))
(sym (or (and call (car term))
term))
@@ -11,25 +13,28 @@
`(void (sym-set-doc ',sym ,doc)))))
(doc-for (= a . rest)
- "Return T if the arguments are equal.")
+ "Return `T` if the arguments are equal.")
(doc-for (nan? x)
- "Return T if the argument is NaN, regardless of the sign.")
+ "Return `T` if the argument is *NaN*, regardless of the sign.")
(doc-for (vm-stats)
- "Print various VM-related information, such as the number of GC calls so far, heap and stack size, etc.")
+ "Print various VM-related information, such as the number of GC
+ calls so far, heap and stack size, etc.")
(doc-for (lz-pack data (level 0))
"Return data compressed using Lempel-Ziv.
+
The data must be an array, returned value will have the same type.
- The optional level is between 0 and 10. With level 0 a simple LZSS
- using hashing will be performed. Levels between 1 and 9 offer a
- trade-off between time/space and ratio. Level 10 is optimal but very
- slow.")
+ The optional `level` is between `0` and `10`. With `level` set to
+ `0` a simple LZSS using hashing will be performed. Levels between
+ `1` and `9` offer a trade-off between time/space and ratio. Level
+ `10` is optimal but very slow.")
(doc-for (lz-unpack data :to destination))
(doc-for (lz-unpack data :size decompressed-bytes)
"Return decompressed data previously compressed using lz-pack.
+
Either destination for the decompressed data or the expected size of
the decompressed data must be specified. In the latter case a new
array is allocated.")
@@ -38,13 +43,13 @@
"Return a random non-negative fixnum on its maximum range.")
(doc-for (rand-u64)
- "Return a random integer on [0, 2⁶⁴-1] interval.")
+ "Return a random integer on interval [0, 2⁶⁴-1].")
(doc-for (rand-u32)
- "Return a random integer on [0, 2³²-1] interval.")
+ "Return a random integer on interval [0, 2³²-1].")
(doc-for (rand-double)
- "Return a random double on [0.0, 1.0] interval.")
+ "Return a random double on interval [0.0, 1.0].")
(doc-for (rand-float)
"Return a random float on [0.0, 1.0] interval.")
@@ -51,6 +56,7 @@
(doc-for NIL
"An empty list. Also used as the opposite of T.
+
(not NIL) → T
(if NIL 'yes 'no) → 'no
(car NIL) → NIL
@@ -58,5 +64,6 @@
(doc-for T
"A boolean \"true\".
+
(not T) → NIL
(if T 'yes 'no) → 'yes")
--- a/src/sl.h
+++ b/src/sl.h
@@ -242,10 +242,12 @@
void free_readstate(sl_readstate *rs);
#define sl_TRY_EXTERN \
- sl_exctx _ctx; int l__tr, l__ca; \
- sl_savestate(&_ctx); sl.exctx = &_ctx; \
+ sl_exctx _ctx; \
+ sl_savestate(&_ctx); \
+ sl.exctx = &_ctx; \
+ int l__ca; \
if(!sl_setjmp(_ctx.buf)) \
- for(l__tr = 1; l__tr; l__tr = 0, (void)(sl.exctx = sl.exctx->prev))
+ for(int l__tr = 1; l__tr; l__tr = 0, sl.exctx = sl.exctx->prev)
#define sl_CATCH_EXTERN_NO_RESTORE \
else \
--- a/src/system.lsp
+++ b/src/system.lsp
@@ -5,15 +5,16 @@
;;; void
(def (void . rest)
- "Return the constant #<void> while ignoring any arguments.
- #<void> is mainly used when a function has side effects but does not
- produce any meaningful value to return, so even though T or NIL could
- be returned instead, in case of #<void> alone, REPL will not print
+ "Return the constant `#<void>` while ignoring any arguments.
+
+ `#<void>` is mainly used when a function has side effects but does not
+ produce any meaningful value to return, so even though `T` or `NIL` could
+ be returned instead, in case of `#<void>` alone, REPL will not print
it."
#.(void))
(def (void? x)
- "Return T if x is #<void>, NIL otherwise."
+ "Return `T` if `x` is `#<void>`, `NIL` otherwise."
(eq? x #.(void)))
;;; syntax environment
@@ -126,10 +127,14 @@
(let* {[lines (str-split doc "\n")]
[hd (car lines)]
[tl (cdr lines)]
- [snd (car tl)]
+ [snd (any (λ (s) (and (> (length s) 0)
+ (= (aref s 0) #\space)
+ s))
+ tl)]
[indent (and snd
- (- (length snd) (length (str-trim snd " " ""))))]
- [trimmed (when snd
+ (- (length snd)
+ (length (str-trim snd " " ""))))]
+ [trimmed (and snd
(map (λ (s) (if (<= indent (length s))
(str-sub s indent)
s))
@@ -147,25 +152,30 @@
;; chicken and egg - properties defined before sym-set-doc
(sym-set-doc
'*properties*
- "All properties of symbols recorded with putprop are recorded in this table.")
+ "All properties of symbols recorded with `putprop` are recorded in this table.")
(defmacro (help term)
"Display documentation for the specified term, if available."
- (let* ((doc (getprop term '*doc*)))
- (if doc
- (let {[lines (str-split doc "\n")]}
- (princ (car lines))
+ (let* {[doc (getprop term '*doc*)]
+ [lines (and doc (str-split doc "\n"))]
+ [fvs (getprop term '*funvars* nil)]}
+ (when lines
+ (princ (car lines))
+ (when (cdr lines)
+ (for-each (λ (line) (newline) (princ line))
+ (cdr lines))
(newline)
- (when (cdr lines)
- (for-each (λ (line) (newline) (princ line))
- (cdr lines))
- (newline))
- (for-each (λ (funvars) (newline) (print (cons term funvars)))
- (getprop term '*funvars* nil))
- (newline))
- (begin
- (princ "no help for " term)
- (newline)))
+ (when fvs
+ (newline))))
+ (when fvs
+ (princ "Signature:")
+ (newline)
+ (for-each (λ (fv) (newline) (princ " ") (print (cons term fv)))
+ fvs)
+ (newline))
+ (unless (or lines fvs)
+ (princ "no help for " term)
+ (newline))
(void)))
(def (value-get-doc body)
@@ -190,7 +200,7 @@
(lst (assv item (cdr lst)))))
(def (> a . rest)
- "Return T if the arguments are in strictly decreasing order (previous
+ "Return `T` if the arguments are in strictly decreasing order (previous
one is greater than the next one)."
(let loop ((a a) (rest rest))
(or (not rest)
@@ -200,7 +210,7 @@
`(< ,@(reverse! rest) ,a))
(def (<= a . rest)
- "Return T if the arguments are in non-decreasing order (previous
+ "Return `T` if the arguments are in non-decreasing order (previous
one is less than or equal to the next one)."
(let loop ((a a) (rest rest))
(or (not rest)
@@ -209,7 +219,7 @@
(loop (car rest) (cdr rest))))))
(def (>= a . rest)
- "Return T if the arguments are in non-increasing order (previous
+ "Return `T` if the arguments are in non-increasing order (previous
one is greater than or equal to the next one)."
(let loop ((a a) (rest rest))
(or (not rest)
@@ -218,7 +228,7 @@
(loop (car rest) (cdr rest))))))
(defmacro (/= a . rest)
- "Return T if not all arguments are equal. Shorthand for (not (= …))."
+ "Return `T` if not all arguments are equal. Shorthand for `(not (= …))`."
`(not (= ,a ,@rest)))
(def (negative? x)
@@ -365,8 +375,9 @@
(car (list-tail lst n)))
(def (length= lst n)
- "Bounded length test.
- Use this instead of (= (length lst) n), since it avoids unnecessary
+ "Perform a bounded length test.
+
+ Use this instead of `(= (length lst) n)`, since it avoids unnecessary
work and always terminates."
(cond ((< n 0) nil)
((= n 0) (atom? lst))
@@ -690,6 +701,7 @@
(defmacro (throw tag value)
`(raise (list 'thrown-value ,tag ,value)))
+
(defmacro (catch tag expr)
`(trycatch ,expr
(λ (e#) (if (and (cons? e#)
@@ -706,7 +718,8 @@
;;; debugging utilities
-(defmacro (assert expr) `(if ,expr t (raise '(assert-failed ,expr))))
+(defmacro (assert expr)
+ `(if ,expr t (raise '(assert-failed ,expr))))
(def traced?
(let ((sample-traced-lambda (λ args (write (cons 'x args))
@@ -743,7 +756,9 @@
;;; text I/O
-(def (print . args) (for-each write args))
+(def (print . args)
+ (for-each write args))
+
(def (princ . args)
(with-bindings ((*print-readably* nil))
(for-each write args)))
@@ -762,9 +777,12 @@
(reverse! lines)
(loop (cons curr lines) (f s)))))
-(def (io-readlines s) (read-all-of io-readline s))
-(def (read-all s) (read-all-of read s))
+(def (io-readlines s)
+ (read-all-of io-readline s))
+(def (read-all s)
+ (read-all-of read s))
+
(def (io-readall s)
(let ((b (buffer)))
(io-copy b s)
@@ -773,6 +791,7 @@
(defmacro (with-output-to io . body)
`(with-bindings ((*io-out* ,io))
,@body))
+
(defmacro (with-input-from io . body)
`(with-bindings ((*io-in* ,io))
,@body))
@@ -779,7 +798,9 @@
;;; vector functions
-(def (list->vec l) (apply vec l))
+(def (list->vec l)
+ (apply vec l))
+
(def (vec->list v)
(let ((n (length v))
(l ()))
@@ -820,7 +841,8 @@
;;; string functions
-(def (str-tail s n) (str-sub s n))
+(def (str-tail s n)
+ (str-sub s n))
(def (str-trim s at-start at-end)
(def (trim-start s chars i L)
@@ -854,9 +876,12 @@
((odd? k) (str s (str-rep s (- k 1))))
(else (str-rep (str s s) (/ k 2)))))
-(def (str-lpad s n c) (str (str-rep c (- n (str-length s))) s))
-(def (str-rpad s n c) (str s (str-rep c (- n (str-length s)))))
+(def (str-lpad s n c)
+ (str (str-rep c (- n (str-length s))) s))
+(def (str-rpad s n c)
+ (str s (str-rep c (- n (str-length s)))))
+
(def (print-to-str v)
(let ((b (buffer)))
(write v b)
@@ -881,17 +906,18 @@
(:predicate NIL)
. slots)
"Defines a structure type with a specific name and slots.
- The default underlying type is a named vector, ie the first element is
- the name of the structure type, the rest are the slot values. If the
- name as the first element isn't required, \":named NIL\" should be
- used. A list can be used instead of a vector by adding \":type list\"
- option.
- The option :conc-name specifies the slot accessor prefix, which
- defaults to \"name-\".
+ The default underlying type is a \"named\" `vector`, where the
+ first element is the name of the structure's type, the rest are the
+ slot values. If the name as the first element isn't required,
+ `:named NIL` should be used. A `list` can be used instead of a
+ `vector` by adding `:type list` option.
- Default predicate name (\"name?\") can be changed:
+ The option `:conc-name` specifies the slot accessor prefix, which
+ defaults to `<name>-`.
+ Default predicate name (`<name>?`) can be changed:
+
(defstruct blah :predicate blargh? a b c)"
(def (slot-opts slot)
; check whether slot options, if any, are valid
@@ -980,7 +1006,12 @@
`(aset! s ,[+ (length named) i] v))))])
num-slots))))
-(doc-for (defstruct name doc options... (slot-1 DEFAULT) slot-2 (slot-3 :read-only)))
+(doc-for (defstruct name
+ doc
+ options…
+ (slot-1 DEFAULT)
+ slot-2
+ (slot-3 :read-only)))
;;; toplevel
@@ -1138,9 +1169,11 @@
(else (default))))))
(expand-in e ()))
-(def (eval x) ((compile-thunk (macroexpand x))))
+(def (eval x)
+ ((compile-thunk (macroexpand x))))
-(def (load-process x) (eval x))
+(def (load-process x)
+ (eval x))
(def (load filename)
(let ((F (file filename :read)))
@@ -1302,7 +1335,9 @@
(λ () (princ "#;> ")))))
(set! *prompt*
"Function called by REPL to signal the user input is required.
- Default function prints \"#;> \"." defprompt))
+
+ Default function prints `#;> `."
+ defprompt))
(set! *directory-separator* (or (and (equal? *os-name* "dos") "\\") "/"))
(set! *linefeed* "\n")
(set! *exit-hooks* nil)
@@ -1343,9 +1378,10 @@
(def (add-exit-hook fun)
"Puts an one-argument function on top of the list of exit hooks.
- On shutdown each exit hook is called with the exit status as a single
- argument, which is (usually) 0 on success and any other number on
- error."
+
+ On shutdown each exit hook is called with the exit status as a
+ single argument, which is (usually) `0` on success and any other
+ number on error."
(set! *exit-hooks* (cons fun *exit-hooks*))
(void))
--- a/tools/gen.lsp
+++ b/tools/gen.lsp
@@ -14,15 +14,15 @@
OP_RET ret nil nil nil
OP_DUP dup nil nil nil
OP_CAR car 1 (λ (x) (car x)) (
- ((lst) "Return the first element of a list or NIL if not available."))
+ ((lst) "Return the first element of a list or `NIL` if not available."))
OP_CDR cdr 1 (λ (x) (cdr x)) (
- ((lst) "Return the tail of a list or NIL if not available."))
+ ((lst) "Return the tail of a list or `NIL` if not available."))
OP_CLOSURE closure nil nil nil
OP_SETA seta nil nil nil
OP_JMP jmp nil nil nil
OP_LOADC0 loadc0 nil nil nil
OP_CONSP cons? 1 (λ (x) (cons? x)) (
- ((value) "Return T if the value is a cons cell."))
+ ((value) "Return `T` if the value is a cons cell."))
OP_BRNE brne nil nil nil
OP_LOADT loadt nil nil nil
OP_LOAD0 load0 nil nil nil
@@ -60,10 +60,10 @@
OP_LIST list ANYARGS (λ rest rest) nil
OP_APPLY apply -2 (λ rest (apply apply rest)) nil
OP_ADD + ANYARGS (λ rest (apply + rest)) (
- ((num…) "Return sum of the numbers or 0 with no arguments."))
+ ((num…) "Return sum of the numbers or `0` with no arguments."))
OP_SUB - -1 (λ rest (apply - rest)) nil
OP_MUL * ANYARGS (λ rest (apply * rest)) (
- ((num…) "Return product of the numbers or 1 with no arguments."))
+ ((num…) "Return product of the numbers or `1` with no arguments."))
OP_DIV / -1 (λ rest (apply / rest)) nil
OP_IDIV div0 2 (λ rest (apply div0 rest)) nil
OP_NUMEQ = -1 (λ rest (apply = rest)) nil