kanaka / mal

mal - Make a Lisp
Other
10k stars 2.53k forks source link

Merge eval and evalAST in purescript implementation #631

Closed asarhaddon closed 1 week ago

asarhaddon commented 1 year ago

Hello. These changes should be part of #592 , but

asarhaddon commented 4 weeks ago

Now the build system complains that esbuild is not installed.

kanaka commented 4 weeks ago

Looks like that error can be resolved like this:

--- a/impls/purs/Makefile
+++ b/impls/purs/Makefile
@@ -9,7 +9,7 @@ OTHER_SRCS = src/Readline.js src/Readline.purs src/Types.purs src/Reader.purs \
 all: $(BINS)

 $(BINS): %.js: src/%.purs $(OTHER_SRCS) node_modules/readline-sync
-       spago bundle-app --main $($(<:src/%=%)) --to $@
+       spago bundle-app --platform=node --main $($(<:src/%=%)) --to $@

 node_modules/readline-sync:
kanaka commented 3 weeks ago

@asarhaddon I have no idea what's causing the most recent failure. I poked around a bit but didn't see anything obvious.

asarhaddon commented 1 week ago

The same error appears without the merge-eval, without readline and with argv, readString, writeString from the node-process module instead of a local FFI to javascript. I am giving up the update part.

kanaka commented 1 week ago

@asarhaddon works for me. There are a lot of implementations that could/should be updated from very old version of the docker image/compiler/interpreter. I'm fine with not doing that as part of these updates if it's proves problematic.