4 include term-colours.4th
6 include catch-throw.4th
27 make-type boolean-type
28 make-type character-type
34 make-type primitive-proc-type
35 make-type compound-proc-type
36 make-type fileport-type
37 : istype? ( obj type -- obj bool )
42 \ ---- Exceptions ---- {{{
44 variable nextexception
47 create nextexception @ ,
51 make-exception recoverable-exception
52 make-exception unrecoverable-exception
54 : display-exception-msg ( addr count -- )
67 ['] display-exception-msg ,
75 \ ---- List-structured memory ---- {{{
77 10000 constant scheme-memsize
79 create car-cells scheme-memsize allot
80 create car-type-cells scheme-memsize allot
81 create cdr-cells scheme-memsize allot
82 create cdr-type-cells scheme-memsize allot
84 create nextfrees scheme-memsize allot
95 nextfrees nextfree @ + @
98 nextfree @ scheme-memsize >= if
102 nextfree @ scheme-memsize >= if
103 unrecoverable-exception throw s" Out of memory!"
107 : cons ( car-obj cdr-obj -- pair-obj )
108 cdr-type-cells nextfree @ + !
109 cdr-cells nextfree @ + !
110 car-type-cells nextfree @ + !
111 car-cells nextfree @ + !
117 : car ( pair-obj -- car-obj )
119 dup car-cells + @ swap
123 : cdr ( pair-obj -- car-obj )
125 dup cdr-cells + @ swap
129 : set-car! ( obj pair-obj -- )
131 rot swap car-type-cells + !
135 : set-cdr! ( obj pair-obj -- )
137 rot swap cdr-type-cells + !
142 : nil? nil-type istype? ;
145 : none? none-type istype? ;
147 : objvar create nil swap , , ;
149 : value@ ( objvar -- val ) @ ;
150 : type@ ( objvar -- type ) 1+ @ ;
151 : value! ( newval objvar -- ) ! ;
152 : type! ( newtype objvar -- ) 1+ ! ;
153 : obj! ( newobj objvar -- ) dup rot swap 1+ ! ! ;
154 : obj@ ( objvar -- obj ) dup @ swap 1+ @ ;
156 : objeq? ( obj obj -- bool )
159 : 2rot ( a1 a2 b1 b2 c1 c2 -- b1 b2 c1 c2 a1 a2 )
160 >R >R ( a1 a2 b1 b2 )
161 2swap ( b1 b2 a1 a2 )
162 R> R> ( b1 b2 a1 a2 c1 c2 )
166 : -2rot ( a1 a2 b1 b2 c1 c2 -- c1 c2 a1 a2 b1 b2 )
167 2swap ( a1 a2 c1 c2 b1 b2 )
168 >R >R ( a1 a2 c1 c2 )
169 2swap ( c1 c2 a1 a2 )
175 \ ---- Port I/O ---- {{{
177 : fileport>fid ( fileport -- fid )
180 : fid>fileport ( fid -- fileport )
183 : open-input-file ( addr n -- fileport )
184 r/o open-file drop fid>fileport
187 : close-port ( fileport -- )
188 fileport>fid close-file drop
191 objvar console-i/o-port
192 0 fileport-type console-i/o-port obj!
194 objvar current-input-port
195 console-i/o-port obj@ current-input-port obj!
197 : read-port ( fileport -- obj )
198 current-input-port obj!
201 : read-console ( -- obj )
202 console-i/o-port obj@ read-port ;
206 \ ---- Pre-defined symbols ---- {{{
210 : duplicate-charlist ( charlist -- copy )
212 2dup car 2swap cdr recurse cons
215 : charlist-equiv ( charlist charlist -- bool )
224 2drop 2drop true exit
226 2drop 2drop false exit
231 2drop 2drop false exit
238 car drop -rot car drop = if
239 cdr 2swap cdr recurse
245 : charlist>symbol ( charlist -- symbol-obj )
264 drop symbol-type 2dup
265 symbol-table obj@ cons
270 : cstr>charlist ( addr n -- charlist )
274 2dup drop @ character-type 2swap
282 : create-symbol ( -- )
290 does> dup @ swap 1+ @
293 create-symbol quote quote-symbol
294 create-symbol quasiquote quasiquote-symbol
295 create-symbol unquote unquote-symbol
296 create-symbol unquote-splicing unquote-splicing-symbol
297 create-symbol define define-symbol
298 create-symbol define-macro define-macro-symbol
299 create-symbol set! set!-symbol
300 create-symbol ok ok-symbol
301 create-symbol if if-symbol
302 create-symbol lambda lambda-symbol
303 create-symbol λ λ-symbol
304 create-symbol begin begin-symbol
308 \ ---- Environments ---- {{{
310 : enclosing-env ( env -- env )
313 : first-frame ( env -- frame )
316 : make-frame ( vars vals -- frame )
319 : frame-vars ( frame -- vars )
322 : frame-vals ( frame -- vals )
325 : add-binding ( var val frame -- )
326 2swap 2over frame-vals cons
328 2swap 2over frame-vars cons
332 : extend-env ( vars vals env -- env )
342 : get-vars-vals-frame ( var frame -- bool )
343 2dup frame-vars vars obj!
347 vars obj@ nil objeq? false =
349 2dup vars obj@ car objeq? if
354 vars obj@ cdr vars obj!
355 vals obj@ cdr vals obj!
361 : get-vars-vals ( var env -- vars? vals? bool )
366 2over 2over first-frame
367 get-vars-vals-frame if
369 vars obj@ vals obj@ true
383 : lookup-var ( var env -- val )
387 recoverable-exception throw" Tried to read unbound variable."
391 : set-var ( var val env -- )
392 >R >R 2swap R> R> ( val var env )
394 2swap 2drop ( val vals )
397 recoverable-exception throw" Tried to set unbound variable."
403 : define-var ( var val env -- )
406 2over env obj@ ( var val var env )
408 2swap 2drop ( var val vals )
413 first-frame ( var val frame )
420 : make-procedure ( params body env -- proc )
423 drop compound-proc-type
427 nil nil nil extend-env
432 \ ---- Primitives ---- {{{
434 : make-primitive ( cfa -- )
441 rot primitive-proc-type ( var prim )
442 global-env obj@ define-var
445 : ensure-arg-count ( args n -- )
447 drop nil objeq? false = if
448 recoverable-exception throw" Too many arguments for primitive procedure."
452 recoverable-exception throw" Too few arguments for primitive procedure."
459 : ensure-arg-type-and-count ( tn tn-1 ... t2 t1 args n -- )
461 drop nil objeq? false = if
462 recoverable-exception throw" Too many arguments for primitive procedure."
466 recoverable-exception throw" Too few arguments for primitive procedure."
469 2dup cdr 2swap car ( ... t1 n args' arg1 )
470 2rot 1- swap 2swap rot ( ... args' n-1 arg1 t1 )
472 recoverable-exception throw" Incorrect type for primitive procedure."
480 : push-args-to-stack ( args -- arg1 arg2 ... argn )
490 : add-fa-checks ( cfa n -- cfa' )
491 here current @ 1+ dup @ , !
495 ['] 2dup , ['] lit , , ['] ensure-arg-count ,
496 ['] push-args-to-stack ,
497 ['] lit , , ['] execute ,
501 : add-fa-type-checks ( cfa t1 t2 ... tn n -- cfa' )
502 here current @ 1+ dup @ , !
509 dup ( cfa t1 t2 ... tn n m )
514 rot ['] lit , , ( cfa t1 t2 ... tn-1 n m )
520 ['] lit , , ['] ensure-arg-type-and-count ,
522 ['] push-args-to-stack ,
523 ['] lit , , ['] execute ,
529 : make-fa-primitive ( cfa n -- )
530 add-fa-checks make-primitive ;
532 : make-fa-type-primitive ( cfa t1 t2 ... tn n -- )
533 add-fa-type-checks make-primitive ;
536 bold fg red ." Incorrect argument type." reset-term cr
540 : ensure-arg-type ( arg type -- arg )
542 recoverable-exception throw" Incorrect argument type for primitive procedure."
549 \ ---- Macros ---- {{{
553 ( Look up macro in macro table. Returns nil if
555 : lookup-macro ( name_symbol -- proc )
574 : make-macro ( name_symbol params body env -- )
577 2swap ( proc name_symbol )
584 2over 2over ( proc name table name table )
586 2swap 2drop ( proc table )
598 macro-table obj@ cons
607 variable stored-parse-idx
608 create parse-str 161 allot
609 variable parse-str-span
611 create parse-idx-stack 10 allot
612 variable parse-idx-sp
613 parse-idx-stack parse-idx-sp !
616 parse-idx @ parse-idx-sp @ !
621 parse-idx-sp @ parse-idx-stack <= abort" Parse index stack underflow."
625 parse-idx-sp @ @ parse-idx ! ;
629 '\n' parse-str parse-str-span @ + !
630 1 parse-str-span +! ;
633 4 parse-str parse-str-span @ + !
634 1 parse-str-span +! ;
641 current-input-port obj@ console-i/o-port obj@ objeq? if
642 parse-str 160 expect cr
643 span @ parse-str-span !
645 parse-str 160 current-input-port obj@ fileport>fid read-line
646 drop swap parse-str-span !
648 parse-str-span @ 0= and if append-eof then
659 : charavailable? ( -- bool )
660 parse-str-span @ parse-idx @ > ;
662 : nextchar ( -- char )
663 charavailable? false = if getline then
664 parse-str parse-idx @ + @ ;
667 : whitespace? ( -- bool )
679 nextchar [char] ( = or
680 nextchar [char] ) = or
683 : commentstart? ( -- bool )
684 nextchar [char] ; = ;
688 false \ Indicates whether or not we're eating a comment
691 dup whitespace? or commentstart? or
693 dup nextchar '\n' = and if
694 invert \ Stop eating comment
696 dup false = commentstart? and if
697 invert \ Begin eating comment
712 nextchar [char] - = ;
715 nextchar [char] + = ;
717 : fixnum? ( -- bool )
743 : flonum? ( -- bool )
750 \ Record starting parse idx:
751 \ Want to detect whether any characters (following +/-) were eaten.
758 [char] . nextchar = if
765 [char] e nextchar = [char] E nextchar = or if
773 drop pop-parse-idx false exit
781 \ This is a real number if characters were
782 \ eaten and the next characer is a delimiter.
783 parse-idx @ < delim? and
788 : boolean? ( -- bool )
789 nextchar [char] # <> if false exit then
796 and if pop-parse-idx false exit then
808 : str-equiv? ( str -- bool )
825 delim? false = if drop false then
830 : character? ( -- bool )
831 nextchar [char] # <> if false exit then
836 nextchar [char] \ <> if pop-parse-idx false exit then
840 S" newline" str-equiv? if pop-parse-idx true exit then
841 S" space" str-equiv? if pop-parse-idx true exit then
842 S" tab" str-equiv? if pop-parse-idx true exit then
844 charavailable? false = if pop-parse-idx false exit then
850 nextchar [char] ( = ;
852 : string? ( -- bool )
853 nextchar [char] " = ;
855 : readfixnum ( -- num-atom )
866 10 * nextchar [char] 0 - +
875 : readbool ( -- bool-obj )
878 nextchar [char] f = if
889 : readchar ( -- char-obj )
893 S" newline" str-equiv? if 7 parse-idx +! '\n' character-type exit then
894 S" space" str-equiv? if 5 parse-idx +! bl character-type exit then
895 S" tab" str-equiv? if 3 parse-idx +! 9 character-type exit then
897 nextchar character-type
902 : readstring ( -- charlist )
903 nextchar [char] " = if
908 ." No delimiter following right double quote. Aborting." cr
917 nextchar [char] \ = if
920 [char] n of '\n' endof
921 [char] " of [char] " endof
927 inc-parse-idx character-type
934 : readsymbol ( -- charlist )
935 delim? if nil exit then
937 nextchar inc-parse-idx character-type
944 : readpair ( -- pairobj )
948 nextchar [char] ) = if
953 ." No delimiter following right paren. Aborting." cr
962 \ Read first pair element
967 nextchar [char] . = if
972 ." No delimiter following '.'. Aborting." cr
986 \ Parse a scheme expression
1012 nextchar [char] " <> if
1013 bold red ." Missing closing double-quote." reset-term cr
1031 nextchar [char] ) <> if
1032 bold red ." Missing closing paren." reset-term cr
1041 nextchar [char] ' = if
1043 quote-symbol recurse nil cons cons exit
1046 nextchar [char] ` = if
1048 quasiquote-symbol recurse nil cons cons exit
1051 nextchar [char] , = if
1053 nextchar [char] @ = if
1055 unquote-splicing-symbol recurse nil cons cons exit
1057 unquote-symbol recurse nil cons cons exit
1067 \ Anything else is parsed as a symbol
1068 readsymbol charlist>symbol
1070 \ Replace λ with lambda
1071 2dup λ-symbol objeq? if
1080 \ ---- Eval ---- {{{
1082 : self-evaluating? ( obj -- obj bool )
1083 boolean-type istype? if true exit then
1084 fixnum-type istype? if true exit then
1085 character-type istype? if true exit then
1086 string-type istype? if true exit then
1087 nil-type istype? if true exit then
1088 none-type istype? if true exit then
1093 : tagged-list? ( obj tag-obj -- obj bool )
1095 pair-type istype? false = if
1101 : quote? ( obj -- obj bool )
1102 quote-symbol tagged-list? ;
1104 : quote-body ( quote-obj -- quote-body-obj )
1107 : quasiquote? ( obj -- obj bool )
1108 quasiquote-symbol tagged-list? ;
1110 : unquote? ( obj -- obj bool )
1111 unquote-symbol tagged-list? ;
1113 : unquote-splicing? ( obj -- obj bool )
1114 unquote-splicing-symbol tagged-list? ;
1116 : eval-unquote ( env obj -- res )
1120 recoverable-exception throw" no arguments to unquote."
1125 recoverable-exception throw" too many arguments to unquote."
1128 2drop car 2swap eval
1131 ( Create a new list from elements of l1 consed on to l2 )
1132 : join-lists ( l2 l1 -- l3 )
1133 nil? if 2drop exit then
1140 defer eval-quasiquote-item
1141 : eval-quasiquote-pair ( env obj -- res )
1142 2over 2over ( env obj env obj )
1144 cdr eval-quasiquote-item
1146 -2rot car ( cdritem env objcar )
1148 unquote-splicing? if
1149 eval-unquote ( cdritems caritem )
1157 eval-quasiquote-item ( cdritems caritem )
1172 pair-type istype? if
1173 eval-quasiquote-pair exit
1177 ; is eval-quasiquote-item
1179 : eval-quasiquote ( obj env -- res )
1180 2swap cdr ( env args )
1183 recoverable-exception throw" no arguments to quasiquote."
1186 2dup cdr ( env args args-cdr )
1188 recoverable-exception throw" too many arguments to quasiquote."
1191 2drop car ( env arg )
1193 eval-quasiquote-item
1196 : variable? ( obj -- obj bool )
1197 symbol-type istype? ;
1199 : definition? ( obj -- obj bool )
1200 define-symbol tagged-list? ;
1202 : make-lambda ( params body -- lambda-exp )
1203 lambda-symbol -2rot cons cons ;
1205 ( Handles iterative expansion of defines in
1206 terms of nested lambdas. Most Schemes only
1207 handle one iteration of expansion! )
1208 : definition-var-val ( obj -- var val )
1210 cdr 2dup cdr 2swap car ( val var )
1213 symbol-type istype? false =
1215 2dup cdr 2swap car ( val formals var' )
1216 -2rot 2swap ( var' formals val )
1217 make-lambda nil cons ( var' val' )
1224 : eval-definition ( obj env -- res )
1225 2dup 2rot ( env env obj )
1226 definition-var-val ( env env var val )
1227 2rot eval ( env var val )
1229 2rot ( var val env )
1235 : assignment? ( obj -- obj bool )
1236 set!-symbol tagged-list? ;
1238 : assignment-var ( obj -- var )
1241 : assignment-val ( obj -- val )
1244 : eval-assignment ( obj env -- res )
1246 2over 2over ( env obj env obj )
1247 assignment-val 2swap ( env obj valexp env )
1248 eval ( env obj val )
1250 2swap assignment-var 2swap ( env var val )
1252 2rot ( var val env )
1258 : macro-definition? ( obj -- obj bool )
1259 define-macro-symbol tagged-list? ;
1261 : macro-definition-name ( exp -- mname )
1264 : macro-definition-params ( exp -- params )
1267 : macro-definition-body ( exp -- body )
1271 : eval-define-macro ( obj env -- res )
1274 2dup macro-definition-name 2swap ( name obj )
1275 2dup macro-definition-params 2swap ( name params obj )
1276 macro-definition-body ( name params body )
1278 env obj@ ( name params body env )
1286 : if? ( obj -- obj bool )
1287 if-symbol tagged-list? ;
1289 : if-predicate ( ifobj -- pred )
1292 : if-consequent ( ifobj -- conseq )
1295 : if-alternative ( ifobj -- alt|none )
1303 : false? ( boolobj -- boolean )
1304 boolean-type istype? if
1305 false boolean-type objeq?
1311 : true? ( boolobj -- bool )
1314 : lambda? ( obj -- obj bool )
1315 lambda-symbol tagged-list? ;
1317 : lambda-parameters ( obj -- params )
1320 : lambda-body ( obj -- body )
1323 : begin? ( obj -- obj bool )
1324 begin-symbol tagged-list? ;
1326 : begin-actions ( obj -- actions )
1329 : eval-sequence ( explist env -- finalexp env )
1330 ( Evaluates all bar the final expressions in
1331 an an expression list. The final expression
1332 is returned to allow for tail optimization. )
1334 2swap ( env explist )
1336 \ Abort on empty list
1343 2dup cdr ( env explist nextexplist )
1346 -2rot car 2over ( nextexplist env exp env )
1348 2drop \ discard result
1349 2swap ( env nextexplist )
1352 2drop car 2swap ( finalexp env )
1355 : application? ( obj -- obj bool )
1358 : operator ( obj -- operator )
1361 : operands ( obj -- operands )
1364 : nooperands? ( operands -- bool )
1367 : first-operand ( operands -- operand )
1370 : rest-operands ( operands -- other-operands )
1373 : list-of-vals ( args env -- vals )
1379 2over 2over first-operand 2swap eval
1380 -2rot rest-operands 2swap recurse
1385 : procedure-params ( proc -- params )
1386 drop pair-type car ;
1388 : procedure-body ( proc -- body )
1389 drop pair-type cdr car ;
1391 : procedure-env ( proc -- body )
1392 drop pair-type cdr cdr car ;
1394 ( Ensure terminating symbol arg name is handled
1395 specially to allow for variadic procedures. )
1396 : flatten-proc-args ( argvals argnames -- argvals' argnames' )
1398 2over nil? false = if
1399 recoverable-exception throw" Too many arguments for compound procedure."
1406 symbol-type istype? if
1416 recoverable-exception throw" Too few arguments for compound procedure."
1423 recurse ( argvals argnames argvals'' argnames'' )
1424 2rot car 2swap cons ( argvals argvals'' argnames' )
1425 2rot car 2rot cons ( argnames' argvals' )
1429 : apply ( proc argvals -- result )
1431 primitive-proc-type of
1435 compound-proc-type of
1436 2dup procedure-body ( argvals proc body )
1437 -2rot 2dup procedure-params ( body argvals proc argnames )
1438 -2rot procedure-env ( body argnames argvals procenv )
1444 extend-env ( body env )
1448 R> drop ['] eval goto-deferred \ Tail call optimization
1451 recoverable-exception throw" Object not applicable."
1455 ( Simply evaluates the given procedure with expbody as its argument. )
1456 : macro-expand ( proc expbody -- result )
1458 2dup procedure-body ( expbody proc procbody )
1459 -2rot 2dup procedure-params ( procbody expbody proc argnames )
1460 -2rot procedure-env ( procbody argnames expbody procenv )
1466 extend-env eval-sequence eval
1469 :noname ( obj env -- result )
1484 2swap eval-quasiquote
1494 2swap eval-definition
1499 2swap eval-assignment
1503 macro-definition? if
1504 2swap eval-define-macro
1520 ['] eval goto-deferred
1524 2dup lambda-parameters
1533 ['] eval goto-deferred
1538 2over 2over ( env exp env exp )
1539 operator ( env exp env opname )
1541 2dup lookup-macro nil? false = if
1542 \ Macro function evaluation
1544 ( env exp env opname mproc )
1545 2swap 2drop -2rot 2drop cdr ( env mproc body )
1550 ['] eval goto-deferred
1552 \ Regular function application
1554 2drop ( env exp env opname )
1556 2swap eval ( env exp proc )
1558 -2rot ( proc env exp )
1559 operands 2swap ( proc operands env )
1560 list-of-vals ( proc argvals )
1567 recoverable-exception throw" Tried to evaluate object with unknown type."
1572 \ ---- Print ---- {{{
1574 : printfixnum ( fixnumobj -- ) drop 0 .R ;
1576 : printbool ( numobj -- )
1584 : printchar ( charobj -- )
1587 9 of ." #\tab" endof
1588 bl of ." #\space" endof
1589 '\n' of ." #\newline" endof
1595 : (printstring) ( stringobj -- )
1596 nil? if 2drop exit then
1600 '\n' of ." \n" drop endof
1601 [char] \ of ." \\" drop endof
1602 [char] " of [char] \ emit [char] " emit drop endof
1608 : printstring ( stringobj -- )
1613 : printsymbol ( symbolobj -- )
1614 nil-type istype? if 2drop exit then
1620 : printnil ( nilobj -- )
1623 : printpair ( pairobj -- )
1627 nil-type istype? if 2drop exit then
1628 pair-type istype? if space recurse exit then
1632 : printprim ( primobj -- )
1633 2drop ." <primitive procedure>" ;
1635 : printcomp ( primobj -- )
1636 2drop ." <compound procedure>" ;
1638 : printnone ( noneobj -- )
1639 2drop ." Unspecified return value" ;
1641 : printport ( port -- )
1645 fixnum-type istype? if printfixnum exit then
1646 boolean-type istype? if printbool exit then
1647 character-type istype? if printchar exit then
1648 string-type istype? if printstring exit then
1649 symbol-type istype? if printsymbol exit then
1650 nil-type istype? if printnil exit then
1651 pair-type istype? if ." (" printpair ." )" exit then
1652 primitive-proc-type istype? if printprim exit then
1653 compound-proc-type istype? if printcomp exit then
1654 none-type istype? if printnone exit then
1656 recoverable-exception throw" Tried to print object with unknown type."
1661 \ ---- Garbage Collection ---- {{{
1666 variable gc-stack-depth
1669 depth gc-stack-depth !
1673 false gc-enabled ! ;
1678 : pairlike? ( obj -- obj bool )
1679 pair-type istype? if true exit then
1680 string-type istype? if true exit then
1681 symbol-type istype? if true exit then
1682 compound-proc-type istype? if true exit then
1687 : pairlike-marked? ( obj -- obj bool )
1688 over nextfrees + @ 0=
1691 : mark-pairlike ( obj -- obj )
1692 over nextfrees + 0 swap !
1701 : gc-mark-obj ( obj -- )
1703 pairlike? invert if 2drop exit then
1704 pairlike-marked? if 2drop exit then
1715 scheme-memsize nextfree !
1716 0 scheme-memsize 1- do
1717 nextfrees i + @ 0<> if
1718 nextfree @ nextfrees i + !
1724 \ Following a GC, this gives the amount of free memory
1728 nextfrees i + @ 0= if 1+ then
1732 \ Debugging word - helps spot memory that is retained
1735 nextfrees i + @ 0<> if
1747 symbol-table obj@ gc-mark-obj
1748 macro-table obj@ gc-mark-obj
1749 global-env obj@ gc-mark-obj
1751 depth gc-stack-depth @ do
1760 \ ." (" gc-count-marked . ." pairs marked as used.)" cr
1761 ; is collect-garbage
1765 \ ---- Loading files ---- {{{
1767 : charlist>cstr ( charlist addr -- n )
1769 dup 2swap ( origaddr addr charlist )
1775 drop ( origaddr addr charlist char )
1776 -rot 2swap ( origaddr charlist addr char )
1778 1+ -rot ( origaddr nextaddr charlist )
1781 2drop ( origaddr finaladdr )
1785 : load ( addr n -- finalResult )
1790 ok-symbol ( port res )
1793 2over read-port ( port res obj )
1795 2dup EOF character-type objeq? if
1796 2drop 2swap close-port
1800 2swap 2drop ( port obj )
1802 global-env obj@ eval ( port res )
1808 \ ---- Standard Library ---- {{{
1810 include scheme-primitives.4th
1812 s" scheme-library.scm" load 2drop
1818 ( REPL calls REPL-BODY in a loop until repl-body returns true. )
1819 : repl-body ( -- bool )
1820 cr bold fg green ." > " reset-term
1824 2dup EOF character-type objeq? if
1826 bold fg blue ." Moriturus te saluto." reset-term cr
1830 global-env obj@ eval
1832 fg cyan ." ; " print reset-term
1838 cr ." Welcome to scheme.forth.jl!" cr
1839 ." Use Ctrl-D to exit." cr
1848 recoverable-exception of false endof
1849 unrecoverable-exception of true endof