ref: 7f24708ec6677e1de14ff4b892ff9482d253bda5
parent: e06e2070b1e0b678934eb9ae82dab38688dfbcb7
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Thu Oct 31 15:30:32 EDT 2024
prefer "λ" over "lambda"
--- a/flisp.boot
+++ b/flisp.boot
@@ -20,25 +20,25 @@
0 0 0 0 0 0 0 0 0 0 0)
*interactive* #f *syntax-environment*
#table(letrec #fn("?000|1202021e12223052e122240522515154e1222605262:" #(#fn(nconc)
- lambda #fn(map) #.car #fn("9000n12021e12205162:" #(#fn(nconc) set! #fn(copy-list)))
+ λ #fn(map) #.car #fn("9000n12021e12205162:" #(#fn(nconc) set! #fn(copy-list)))
#fn(copy-list) #fn("6000n17060:" #(void)))) quasiquote #fn("8000n1700E62:" #(bq-process)) when #fn("<000|1200211POe4:" #(if
begin)) unwind-protect #fn("8000n220>2150215062:" #(#fn("@000n220121qFe3e2e12223A210e1241e1250e2e3e3e31e1e3e3:" #(let
- lambda prog1 trycatch begin raise)) #fn(gensym))) dotimes #fn(";000|120>0<0T62:" #(#fn("=000n220E211Ke32223e10e1e124F5153e4:" #(for
- - #fn(nconc) lambda #fn(copy-list))))) define-macro #fn("?000|120210<e22223e10=e12415153e3:" #(set-syntax!
- quote #fn(nconc) lambda #fn(copy-list))) receive #fn("@000|22021q1e32221e10e123825153e3:" #(call-with-values
- lambda #fn(nconc) #fn(copy-list))) unless #fn("=000|1200O211Pe4:" #(if begin)) let* #fn("A000|10H3E02021e1qe12215153e1:2021e173051e1e1220=B3H02024e10=e12215153e1@301515375051e2:" #(#fn(nconc)
- lambda #fn(copy-list) caar let* cadar)) case #fn(":000|120>D61:" #(#fn("7000n120?0421>225061:" #(#fn("9000n2120C5020:1J40O:1R3=021072151e3:1H3=023072151e3:1=J>0230721<51e3:74251523=0260271e2e3:280271e2e3:" #(else
+ λ prog1 trycatch begin raise)) #fn(gensym))) dotimes #fn(";000|120>0<0T62:" #(#fn("=000n220E211Ke32223e10e1e124F5153e4:" #(for
+ - #fn(nconc) λ #fn(copy-list))))) define-macro #fn("?000|120210<e22223e10=e12415153e3:" #(set-syntax!
+ quote #fn(nconc) λ #fn(copy-list))) receive #fn("@000|22021q1e32221e10e123825153e3:" #(call-with-values
+ λ #fn(nconc) #fn(copy-list))) unless #fn("=000|1200O211Pe4:" #(if begin)) let* #fn("A000|10H3E02021e1qe12215153e1:2021e173051e1e1220=B3H02024e10=e12215153e1@301515375051e2:" #(#fn(nconc)
+ λ #fn(copy-list) caar let* cadar)) case #fn(":000|120>D61:" #(#fn("7000n120?0421>225061:" #(#fn("9000n2120C5020:1J40O:1R3=021072151e3:1H3=023072151e3:1=J>0230721<51e3:74251523=0260271e2e3:280271e2e3:" #(else
eq? quote-value eqv? every #.symbol? memq quote memv) vals->cond)
#fn("<000n1200910e2e12122e12324>9115252e3:" #(let #fn(nconc) cond #fn(map)
#fn("8000n1910A0<520=P:" #())))
#fn(gensym))))) catch #fn("7000n220>215061:" #(#fn("@000n120F210e12223240e225260e22728e2e325290e2Ae3e42:0e22;0e2e4e3e3:" #(trycatch
- lambda if and pair? eq car quote thrown-value cadr caddr raise))
+ λ if and pair? eq car quote thrown-value cadr caddr raise))
#fn(gensym))) assert #fn("<000n1200D2122230e2e2e2e4:" #(if
raise quote assert-failed)) do #fn("A000|220>21501<22230522224052222505265:" #(#fn("B000n520021822212324e125F=51522324e12590251230e18452e153e4e3e2e1230e18352e3:" #(letrec
- lambda if #fn(nconc) begin #fn(copy-list)))
- #fn(gensym) #fn(map) #.car #.cadr #fn("7000n170051B38071061:0<:" #(cddr caddr)))) with-input-from #fn("=000|12021e1220e2e1e12315163:" #(#fn(nconc)
+ λ if #fn(nconc) begin #fn(copy-list))) #fn(gensym)
+ #fn(map) #.car #.cadr #fn("7000n170051B38071061:0<:" #(cddr caddr)))) with-input-from #fn("=000|12021e1220e2e1e12315163:" #(#fn(nconc)
with-bindings *input-stream* #fn(copy-list))) let #fn(":000|120>O61:" #(#fn("<000n1AR3D0A?04F<z004F=z01@30D420>2122e12324A52e125F51532326A5262:" #(#fn("8000n2A3@020A0e2e1Ae3@3001P:" #(letrec))
- #fn(nconc) lambda #fn(map) #fn("6000n10B3500<:0:" #())
+ #fn(nconc) λ #fn(map) #fn("6000n10B3500<:0:" #())
#fn(copy-list) #fn("6000n10B3500T:7060:" #(void)))))) cond #fn("9000|020>D61:" #(#fn("7000n120>?040A61:" #(#fn("7000n10H340O:20>0<61:" #(#fn(":000n10<20Q;I7040<DQ3@00=J500<:210=P:0=J@0220<910A=51e3:0T23CW07475051513A026>77750515161:28>295061:2:0<210=P910A=51e4:" #(else
begin or => 1arg-lambda? caddr #fn("=000n1200A<e2e1210227374A5151P920910=51e4e3:" #(let
if begin cddr caddr)) caadr #fn("<000n1200A<e2e121072A510e2920910=51e4e3:" #(let
@@ -52,7 +52,7 @@
#fn(map) #.car #.cadr #fn("6000n12060:" #(#fn(gensym))))))
*whitespace* "\t\n\v\f\r \u0085 \u2028\u2029 " 1+
#fn("7000n10KM:" #() 1+) 1- #fn("7000n10K\x80:" #() 1-)
- 1arg-lambda? #fn("8000n10B;3^040<20Q;I8040<20Q;3J040=B;3B040TB;3:04710TK62:" #(lambda
+ 1arg-lambda? #fn("8000n10B;3^040<20Q;I8040<20Q;3J040=B;3B040TB;3:04710TK62:" #(λ
length=) 1arg-lambda?)
<= #fn("7000n210L;IB0470051;380470151S:" #(nan?) <=) >
#fn("7000n210L:" #() >) >= #fn("7000n201L;IB0470051;380470151S:" #(nan?) >=)
@@ -149,15 +149,15 @@
compile-f #fn("8000n27021>2262:" #(call-with-values #fn("8000n070AF62:" #(compile-f-))
#fn("6000n20:" #())) compile-f)
compile-f- #fn("8000n220>DD62:" #(#fn(">000n220>?0421>?1422>7350FT74FT5175FT517627FT5274F51910C7028@7074F5166:" #(#fn("9000n120>71051B3N072051B3=02371051P@7074051@60755061:" #(#fn("8000n120>7105161:" #(#fn(":000n10J40A:20210A940542223052P:" #(#fn(list*)
- lambda #fn(map) #fn("6000n17060:" #(void)))) get-defined-vars)) cddr cdddr
- begin caddr void) lambda-body) #fn("7000n170051920C8071061:A061:" #(lastcdr
- caddr) lam:body) #fn("9000n620>1H360E@702115161:" #(#fn("9000n120>02190451\x8061:" #(#fn("9000n120>71729145261:" #(#fn("C000n1924\x87\xa900JO07092021A922J80910@60910U54@s072920732425242605277280515153515247092029A28051922J80910@60910U5547:920940924923A55@30D47;9102<523L070920922J702=@402>91053@]0922\x87A0709202?91053@H0924JA0709202@91053@30O47A920923940PD93194151544709202B5247C2D7E7F92051517G9205192553920r3G62:" #(emit
+ λ #fn(map) #fn("6000n17060:" #(void)))) get-defined-vars)) cddr cdddr begin
+ caddr void) lambda-body) #fn("7000n170051920C8071061:A061:" #(lastcdr caddr) lam:body)
+ #fn("9000n620>1H360E@702115161:" #(#fn("9000n120>02190451\x8061:" #(#fn("9000n120>71729145261:" #(#fn("C000n1924\x87\xa900JO07092021A922J80910@60910U54@s072920732425242605277280515153515247092029A28051922J80910@60910U5547:920940924923A55@30D47;9102<523L070920922J702=@402>91053@]0922\x87A0709202?91053@H0924JA0709202@91053@30O47A920923940PD93194151544709202B5247C2D7E7F92051517G9205192553920r3G62:" #(emit
optargs bcode:indexfor make-perfect-hash-table
#fn(map) #.cons #.car iota #fn(length) keyargs emit-optional-arg-inits > 255
largc lvargc vargc argc compile-in ret values #fn(function) encode-byte-code
bcode:code const-to-idx-vec)) filter keyword-arg?))
#fn(length))) #fn(length))) make-code-emitter lastcdr lambda-vars filter #.pair?
- lambda))) #0=#(#:g726 ()))
+ λ))) #0=#(#:g726 ()))
compile-for #fn(":000n57084513X07101O825447101O835447101O845447202362:742561:" #(1arg-lambda?
compile-in emit for error "for: third form must be a 1-argument lambda") compile-for)
compile-if #fn("<000n420>710517105183T728351738351B3;0748351@60755065:" #(#fn(";000n582DC>070AF9028364:82OC>070AF9028464:70AFO8254471A22053470AF902835449023<071A2352@:071A24153475A052470AF9028454475A162:" #(compile-in
@@ -166,7 +166,7 @@
#(loada loadc loadg) emit load0 load1 loadt loadf loadnil fits-i8 loadi8 #fn(eof-object?)
compile-in #fn(top-level-value) eof-object loadv in-env? compile-app #fn("<000n1020CW071903T513@072AF902903T64:73A24903T63:025C?076AF90290364:027C@078AF902903=64:029C<07:AF90363:02;C=07<2=>2>>62:02?C@07@AF902903=64:02AC@07BAF902903=64:02CCG07DAF903T277E90351P64:02FCK07GAF903T7H903517I9035165:02JCF072AFD903T54473A2K62:02LC_072AFO7H90351544903TR;I9047M2N5147OAF903T2P64:02QCC072AF9027R9035164:02SCs072AFO2;q903Te35447T7H9035151360O@807M2U51472AFO7H9035154473A2S62:7VAF90290364:" #(quote
self-evaluating? compile-in emit loadv if compile-if begin compile-begin
- prog1 compile-prog1 lambda call-with-values #fn("8000n07091191362:" #(compile-f-))
+ prog1 compile-prog1 λ call-with-values #fn("8000n07091191362:" #(compile-f-))
#fn("9000n27091021053472910152417391151L3<0709102462:D:" #(emit loadv
bcode:cdepth nnn
closure)) and
@@ -184,7 +184,7 @@
bcode:cdepth nnn #fn(constant?) printable? #fn(top-level-value) loadv))
lookup-sym) compile-sym)
compile-thunk #fn(";000n1702122e1qe10e1A5461:" #(compile #fn(nconc)
- lambda) #0#)
+ λ) #0#)
compile-while #fn("9000n420>710517105162:" #(#fn(":000n270AFO715054472A052470AFO90254473A24153473A2552470AFO90354473A26053472A162:" #(compile-in
void mark-label emit brf pop jmp)) make-label) compile-while)
const-to-idx-vec #fn("9000n120>21720515161:" #(#fn("9000n17021>72A515240:" #(table-foreach
@@ -246,7 +246,7 @@
#fn(":000n20H3400:0<B;37040<=B3G07005190:71051152e2@400<9040=152P:" #(caar
cadar) expand-lambda-list) #fn("8000n10H3600e1:0<B3@0700519050=51P:0<9050=51P:" #(caar) l-vars)
#fn(";000n220>0T71051720519050T5164:" #(#fn(":000n420>2122238352F5261:" #(#fn(";000n12021e1924A052e1923902052F64:" #(#fn(nconc)
- lambda)) #fn(nconc) #fn(map) #.list)) lastcdr cddr) expand-lambda)
+ λ)) #fn(nconc) #fn(map) #.list)) lastcdr cddr) expand-lambda)
#fn("<000n20=V;I6040TH3N070051J400:210T90:72051152e3:23>740517505170051905740515164:" #(cddr
define caddr #fn(":000n420>2122238352F5261:" #(#fn(";000n12021e1F924A052Pe192390205263:" #(#fn(nconc)
define)) #fn(nconc) #fn(map) #.list)) cdadr caadr) expand-define)
@@ -257,11 +257,10 @@
#fn("6000n20:" #() local-expansion-env)
#fn("7000n20H3400:20>0<61:" #(#fn("9000n120>210F5261:" #(#fn("7000n120>21>61:" #(#fn(":000n1A;3604A=B3M093:AT920=f293970A519215262:A;IA04910RS;I704910Z360060:21>729205161:" #(caddr
#fn("8000n103B094:0930=f293162:92020C60930:92021C>094693093162:92021C>094693093162:92022C>094793093162:92023C>094893093162:A60:" #(quote
- lambda define let-syntax)) macrocall?))
- #fn("7000n020>D5192061:" #(#fn("6000n120>?040:" #(#fn("9000n10H3400:0<H3700<@<094:0<93152A0=51P:" #())))))))
+ λ define let-syntax)) macrocall?)) #fn("7000n020>D5192061:" #(#fn("6000n120>?040:" #(#fn("9000n10H3400:0<H3700<@<094:0<93152A0=51P:" #())))))))
#fn(assq)))) expand-in)))) expand)
expand-define #fn("=000n1200T71051B3:071051@L00TR3;07250e1@=07324750515262:" #(#fn("<000n20R3:02001<e3:200<2122e10=e1231510<54e3:" #(set!
- #fn(nconc) lambda #fn(copy-list))) cddr void error "compile error: invalid syntax "
+ #fn(nconc) λ #fn(copy-list))) cddr void error "compile error: invalid syntax "
print-to-string) expand-define)
filter #fn("7000n220>D61:" #(#fn("9000n120>?040AFqe163:" #(#fn("9000n382D1B3S049101<513?0821<qPN=?2@30D41=?1@\f/4=:" #() filter-)))) filter)
fits-i8 #fn("8000n10Y;3F04700r\xb052;3:04710r\xaf62:" #(>= <=) fits-i8)
@@ -369,7 +368,7 @@
#fn("9000n170A0G513A0930A0G92191063:D:" #(closure?))))
#fn(function:vals))) #fn(function:name)) find-in-f)
#fn("8000n22021>22}61:" #(#fn(";000n103H0207122237405152255261:26:" #(#fn(symbol)
- string-join #fn(map) #fn(string) reverse! "/" lambda))
+ string-join #fn(map) #fn(string) reverse! "/" λ))
#fn("8000n07021>F524O:" #(for-each #fn("9000n19100Aq63:" #())))
#fn("7000n10B;3B040<20Q;38040T21Q38072061:23061:" #(thrown-value
ffound caddr #fn(raise)))) fn-name) #fn("8000n37021>062:" #(for-each #fn("9000n1702190222534739110EGF5274051=P51475504902KMz02:" #(princ
@@ -451,7 +450,7 @@
print-stack-trace #fn(stacktrace))) #fn("7000n1A50420061:" #(#fn(raise)))))
#fn("6000n0Aw0:" #(*output-stream*)))) *output-stream*) top-level-exception-handler)
trace #fn("8000n120>2105151422:" #(#fn("7000n120>215061:" #(#fn("@000n170A51Ie0219107223024252627910e20e3e228e12927Ae20e3e4e35162:D:" #(traced?
- #fn(set-top-level-value!) eval lambda begin write cons quote newline apply))
+ #fn(set-top-level-value!) eval λ begin write cons quote newline apply))
#fn(gensym))) #fn(top-level-value) ok) trace)
traced? #fn("8000n170051;3>042105121A51d:" #(closure? #fn(function:code)) #(#fn(":000|020210P51472504230\x7f2:" #(#fn(write)
x newline #.apply)) ()))
--- a/flisp.c
+++ b/flisp.c
@@ -2098,7 +2098,7 @@
FL_T = builtin(OP_BOOL_CONST_T);
FL_F = builtin(OP_BOOL_CONST_F);
FL_EOF = builtin(OP_EOF_OBJECT);
- LAMBDA = symbol("lambda");
+ LAMBDA = symbol("λ");
FUNCTION = symbol("function");
QUOTE = symbol("quote");
TRYCATCH = symbol("trycatch");
--- a/read.c
+++ b/read.c
@@ -426,7 +426,7 @@
return (toktype = TOK_NUM);
}
toktype = TOK_SYM;
- tokval = symbol((uint8_t)buf[0] == 0xce && (uint8_t)buf[1] == 0xbb ? "lambda" : buf);
+ tokval = symbol(strcmp(buf, "lambda") == 0 ? "λ" : buf);
}
return toktype;
}