diff --git a/README.md b/README.md index 3fa1c13df2..e23542ea1a 100644 --- a/README.md +++ b/README.md @@ -488,7 +488,7 @@ mono ./stepX_YYY.exe ### Factor -The Factor implementation of mal has been tested with Factor 0.97 +The Factor implementation of mal has been tested with Factor 0.98 ([factorcode.org](http://factorcode.org)). ``` diff --git a/impls/factor/Dockerfile b/impls/factor/Dockerfile index c213838156..c2be667a83 100644 --- a/impls/factor/Dockerfile +++ b/impls/factor/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:vivid +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -24,8 +24,9 @@ WORKDIR /mal # Factor RUN apt-get -y install libgtkglext1 RUN cd /usr/lib/x86_64-linux-gnu/ \ - && curl -O http://downloads.factorcode.org/releases/0.97/factor-linux-x86-64-0.97.tar.gz \ - && tar xvzf factor-linux-x86-64-0.97.tar.gz \ + && curl -O https://downloads.factorcode.org/releases/0.98/factor-linux-x86-64-0.98.tar.gz \ + && tar xvzf factor-linux-x86-64-0.98.tar.gz \ && ln -sf /usr/lib/x86_64-linux-gnu/factor/factor /usr/bin/factor \ - && rm factor-linux-x86-64-0.97.tar.gz + && rm factor-linux-x86-64-0.98.tar.gz +ENV HOME /mal diff --git a/impls/factor/lib/printer/printer.factor b/impls/factor/lib/printer/printer.factor index 8ff4266afe..0739f473ef 100644 --- a/impls/factor/lib/printer/printer.factor +++ b/impls/factor/lib/printer/printer.factor @@ -5,7 +5,7 @@ lib.types math math.parser sequences splitting strings summary vectors ; IN: lib.printer -GENERIC# (pr-str) 1 ( maltype readably? -- str ) +GENERIC#: (pr-str) 1 ( maltype readably? -- str ) M: object (pr-str) drop summary ; M: malatom (pr-str) [ val>> ] dip (pr-str) "(atom " ")" surround ; M: malfn (pr-str) 2drop "#" ; diff --git a/impls/factor/step2_eval/step2_eval.factor b/impls/factor/step2_eval/step2_eval.factor index 8b73333126..d27c8b8301 100755 --- a/impls/factor/step2_eval/step2_eval.factor +++ b/impls/factor/step2_eval/step2_eval.factor @@ -14,7 +14,7 @@ CONSTANT: repl-env H{ DEFER: EVAL -GENERIC# eval-ast 1 ( ast env -- ast ) +GENERIC#: eval-ast 1 ( ast env -- ast ) M: malsymbol eval-ast [ name>> ] dip ?at [ "no variable " prepend throw ] unless ; M: sequence eval-ast '[ _ EVAL ] map ; diff --git a/impls/factor/step3_env/step3_env.factor b/impls/factor/step3_env/step3_env.factor index 742c3f59f2..73c2b27bf1 100755 --- a/impls/factor/step3_env/step3_env.factor +++ b/impls/factor/step3_env/step3_env.factor @@ -16,7 +16,7 @@ SYMBOL: repl-env DEFER: EVAL -GENERIC# eval-ast 1 ( ast env -- ast ) +GENERIC#: eval-ast 1 ( ast env -- ast ) M: malsymbol eval-ast env-get ; M: sequence eval-ast '[ _ EVAL ] map ; M: assoc eval-ast '[ _ EVAL ] assoc-map ; diff --git a/impls/factor/step4_if_fn_do/step4_if_fn_do.factor b/impls/factor/step4_if_fn_do/step4_if_fn_do.factor index 37076e98f2..eccb64c14e 100755 --- a/impls/factor/step4_if_fn_do/step4_if_fn_do.factor +++ b/impls/factor/step4_if_fn_do/step4_if_fn_do.factor @@ -10,7 +10,7 @@ SYMBOL: repl-env DEFER: EVAL -GENERIC# eval-ast 1 ( ast env -- ast ) +GENERIC#: eval-ast 1 ( ast env -- ast ) M: malsymbol eval-ast env-get ; M: sequence eval-ast '[ _ EVAL ] map ; M: assoc eval-ast '[ _ EVAL ] assoc-map ; diff --git a/impls/factor/step5_tco/step5_tco.factor b/impls/factor/step5_tco/step5_tco.factor index aff1b9cf37..aaf8f279e9 100755 --- a/impls/factor/step5_tco/step5_tco.factor +++ b/impls/factor/step5_tco/step5_tco.factor @@ -10,7 +10,7 @@ SYMBOL: repl-env DEFER: EVAL -GENERIC# eval-ast 1 ( ast env -- ast ) +GENERIC#: eval-ast 1 ( ast env -- ast ) M: malsymbol eval-ast env-get ; M: sequence eval-ast '[ _ EVAL ] map ; M: assoc eval-ast '[ _ EVAL ] assoc-map ; diff --git a/impls/factor/step6_file/step6_file.factor b/impls/factor/step6_file/step6_file.factor index 290ee83333..fad99ed44a 100755 --- a/impls/factor/step6_file/step6_file.factor +++ b/impls/factor/step6_file/step6_file.factor @@ -10,7 +10,7 @@ SYMBOL: repl-env DEFER: EVAL -GENERIC# eval-ast 1 ( ast env -- ast ) +GENERIC#: eval-ast 1 ( ast env -- ast ) M: malsymbol eval-ast env-get ; M: sequence eval-ast '[ _ EVAL ] map ; M: assoc eval-ast '[ _ EVAL ] assoc-map ; diff --git a/impls/factor/step7_quote/step7_quote.factor b/impls/factor/step7_quote/step7_quote.factor index eae1cc5de1..60f85b9a04 100755 --- a/impls/factor/step7_quote/step7_quote.factor +++ b/impls/factor/step7_quote/step7_quote.factor @@ -11,7 +11,7 @@ SYMBOL: repl-env DEFER: EVAL -GENERIC# eval-ast 1 ( ast env -- ast ) +GENERIC#: eval-ast 1 ( ast env -- ast ) M: malsymbol eval-ast env-get ; M: sequence eval-ast '[ _ EVAL ] map ; M: assoc eval-ast '[ _ EVAL ] assoc-map ; @@ -49,7 +49,7 @@ M: object eval-ast drop ; swapd [ over length cut [ zip ] dip ] dip [ swap 2array suffix ] [ drop ] if* >hashtable ; -GENERIC# apply 0 ( args fn -- maltype newenv/f ) +GENERIC#: apply 0 ( args fn -- maltype newenv/f ) M: malfn apply [ exprs>> nip ] diff --git a/impls/factor/step8_macros/step8_macros.factor b/impls/factor/step8_macros/step8_macros.factor index f6c7db7cdd..6cb4b479a4 100755 --- a/impls/factor/step8_macros/step8_macros.factor +++ b/impls/factor/step8_macros/step8_macros.factor @@ -11,7 +11,7 @@ SYMBOL: repl-env DEFER: EVAL -GENERIC# eval-ast 1 ( ast env -- ast ) +GENERIC#: eval-ast 1 ( ast env -- ast ) M: malsymbol eval-ast env-get ; M: sequence eval-ast '[ _ EVAL ] map ; M: assoc eval-ast '[ _ EVAL ] assoc-map ; @@ -52,7 +52,7 @@ M: object eval-ast drop ; swapd [ over length cut [ zip ] dip ] dip [ swap 2array suffix ] [ drop ] if* >hashtable ; -GENERIC# apply 0 ( args fn -- maltype newenv/f ) +GENERIC#: apply 0 ( args fn -- maltype newenv/f ) M: malfn apply [ exprs>> nip ] diff --git a/impls/factor/step9_try/step9_try.factor b/impls/factor/step9_try/step9_try.factor index cf0119e813..fb01b187f2 100755 --- a/impls/factor/step9_try/step9_try.factor +++ b/impls/factor/step9_try/step9_try.factor @@ -11,7 +11,7 @@ SYMBOL: repl-env DEFER: EVAL -GENERIC# eval-ast 1 ( ast env -- ast ) +GENERIC#: eval-ast 1 ( ast env -- ast ) M: malsymbol eval-ast env-get ; M: sequence eval-ast '[ _ EVAL ] map ; M: assoc eval-ast '[ _ EVAL ] assoc-map ; @@ -63,7 +63,7 @@ M: object eval-ast drop ; swapd [ over length cut [ zip ] dip ] dip [ swap 2array suffix ] [ drop ] if* >hashtable ; -GENERIC# apply 0 ( args fn -- maltype newenv/f ) +GENERIC#: apply 0 ( args fn -- maltype newenv/f ) M: malfn apply [ exprs>> nip ] diff --git a/impls/factor/stepA_mal/stepA_mal.factor b/impls/factor/stepA_mal/stepA_mal.factor index 0a2bb84694..f4e930bf36 100755 --- a/impls/factor/stepA_mal/stepA_mal.factor +++ b/impls/factor/stepA_mal/stepA_mal.factor @@ -11,7 +11,7 @@ SYMBOL: repl-env DEFER: EVAL -GENERIC# eval-ast 1 ( ast env -- ast ) +GENERIC#: eval-ast 1 ( ast env -- ast ) M: malsymbol eval-ast env-get ; M: sequence eval-ast '[ _ EVAL ] map ; M: assoc eval-ast '[ _ EVAL ] assoc-map ; @@ -63,7 +63,7 @@ M: object eval-ast drop ; swapd [ over length cut [ zip ] dip ] dip [ swap 2array suffix ] [ drop ] if* >hashtable ; -GENERIC# apply 0 ( args fn -- maltype newenv/f ) +GENERIC#: apply 0 ( args fn -- maltype newenv/f ) M: malfn apply [ exprs>> nip ]