kanaka / mal

mal - Make a Lisp
Other
10.1k stars 2.57k forks source link

Remaining impls to combine eval-ast/macroexpand into eval #657

Open kanaka opened 3 months ago

kanaka commented 3 months ago

Most implementations have been converted via https://github.com/kanaka/mal/pull/592. The following are the remaining implementations to convert:

Swift 2 was originally part of the list but has since been removed from the repo: https://github.com/kanaka/mal/pull/688

kanaka commented 3 months ago

Rust complete: https://github.com/kanaka/mal/pull/659

kanaka commented 3 months ago

wasm completed with https://github.com/kanaka/mal/pull/661

asarhaddon commented 3 months ago

What are the remaining issues with awk bbc-basic elixir erlang forth vhdl ? Commit 03389277 was supposed to include them. Also, I suggest to add a commet in the zig line refering to #591.

kanaka commented 3 months ago

@asarhaddon You're right, I did a grep for eval_ast and macroexpand and didn't look closely enough at the code or review your commit again when making this list. I've added a comment to zig.

kanaka commented 3 months ago

purs/purescript fixed in https://github.com/kanaka/mal/pull/631

kanaka commented 3 months ago

Powershell updated in https://github.com/kanaka/mal/pull/669

kanaka commented 3 months ago

lua was fixed in 9a22e8a65313b8f59ba427ed60f8f03af1510cfe

kanaka commented 3 months ago

objc updated in https://github.com/kanaka/mal/pull/671

kanaka commented 2 months ago

zig problem and eval_ast merge completed here: https://github.com/kanaka/mal/pull/591

kanaka commented 2 months ago

Hy implemented here: https://github.com/kanaka/mal/pull/683

kanaka commented 1 month ago

jq completed in https://github.com/kanaka/mal/pull/685

kanaka commented 1 month ago

rexx completed: https://github.com/kanaka/mal/pull/686

kanaka commented 1 month ago

I've added a PR to remove Swift 2 ("swift") if the original author doesn't want to get it build/testable in CI: https://github.com/kanaka/mal/pull/688

kanaka commented 1 month ago

matlab completed: https://github.com/kanaka/mal/pull/687

kanaka commented 1 month ago

crystal completed: https://github.com/kanaka/mal/pull/689

kanaka commented 1 month ago

Swift 2 implementation has now been removed: https://github.com/kanaka/mal/pull/688

kanaka commented 1 month ago

janet completed: https://github.com/kanaka/mal/pull/690

kanaka commented 1 month ago

scala completed: https://github.com/kanaka/mal/pull/691

asarhaddon commented 1 month ago

Hello. I would like some help with io and livescript. I have implemented the change locally, but cannot polish/test. Io has produced no binary compiler for ten years, and some dependencies have changed their Shared Object version meanwhile. The only sensible options seem to rebuild the compiler from a source released in 2017, or to drop this implementation. The error messages are poor, so the current CI is not really an option. Livescript fails with the current Dockerfile because npm breaks when trying to install ffi-napi. I guess that the same issue affects the js implementation, because node_readline.js is similar with the same dependency on ffi-napi. The issue may be trivial with some knowledge of node. Could you please take a look, and if possible update the Dockerfile so I can reproduce the steps on a local Debian?

kanaka commented 1 month ago

@asarhaddon I got livescript updated (Ubuntu 24.04 and node 18) and switched it to use koffi for the readline/FFI. Most of the JS based implementations use the same node_readine.js code so this should be a reasonable reference for updating the other implementations at some point: https://github.com/kanaka/mal/commit/1ff0671270d31c90bd535da3e9f7df3eb79f6e9a

I'll take a look at the io target (probably be a couple days though). A quick scan of the repo does seem to show that it's mostly dormant since last year. If I can't get something working easily, then I'll do the same as I did with Swift 2 (create a PR deprecating it and gjive the original author an opportunity to support/fix it if they care).

asarhaddon commented 1 month ago

Thanks. #692 updates livescript

dubek commented 1 month ago

I can look at io's Dockerfile (and then later maybe at merging eval_ast). I understand the publicly downloaded binaries are not working newer Ubuntu. What should we do in this case:

  1. Clone the C source and build it in our Dockerfile, and then copy the resulting binary interpreter to /usr/bin ?
  2. Build it somewhere else and publish it (say in my own github repo), and modify the Dockerfile to download from there?
  3. Other idea?
kanaka commented 1 month ago

livescript completed: https://github.com/kanaka/mal/pull/692

kanaka commented 1 month ago

@dubek Hi! I wasn't going to bother you until I had given in a quick spike. But since you're listening :-D, I would suggest the first option (which is what some implementations already do). The current CI process will build the image once and then cache it to ghcr.io so builds don't take too long. No need to maintain images yourself . You can point to the image if you want others to have quick access to the compiler. Once it's merged, CI will push the image to ghcr.io/kanaka/mal-test-io.

If the io build process or build deps are bulky (I don't think they are particularly for io though), you can always use a multiple stage Dockerfile to build it and then just copy the binaries to the final stage to keep size down if needed. The wasm Dockerfile does that but that's a pretty complicated one so refer to https://docs.docker.com/build/building/multi-stage/ if you're not already familiar with that. But again, you probably won't need this with io. A quick look at the CMakeLists.txt doesn't seem like it will have a lot of deps or be bulky. So let's only attack this if it turns out to be a really big image.

asarhaddon commented 1 month ago

@dubek You may want to start from where I have given up. https://github.com/asarhaddon/mal/commit/37b358a86ce473a2262c6d6110b0d93fa6a21faa

 Testing test^io^step0; step file: impls/io/step0_repl.io, test file: tests/step0_repl.mal
Running: env STEP=step0_repl MAL_IMPL=js ../../runtest.py  --deferrable --optional --test-timeout 120 --debug-file ../../test-io.debug ../tests/step0_repl.mal -- ../io/run
Exception: OSError(5, 'Input/output error')
Output before exception:
 not respond to 'Regex'
  ---------
  Object Regex                         step0_repl.io 1
asarhaddon commented 1 month ago

latex3 rpython swift5 vbs are missing from the list.

kanaka commented 1 month ago

Final latex3 cleanup: https://github.com/kanaka/mal/pull/695

kanaka commented 1 month ago

rpython finished: https://github.com/kanaka/mal/pull/696

kanaka commented 1 month ago

More related rpython (with performance optimizations too): https://github.com/kanaka/mal/pull/698

kanaka commented 1 month ago

swift6 completed: https://github.com/kanaka/mal/pull/693 (and reversioned from swift5 to swift6)

kanaka commented 1 month ago

vala completed: https://github.com/kanaka/mal/pull/697

kanaka commented 1 month ago

xslt completed: https://github.com/kanaka/mal/pull/701

kanaka commented 1 month ago

chuck completed: https://github.com/kanaka/mal/pull/702

kanaka commented 4 weeks ago

fantom completed: https://github.com/kanaka/mal/pull/704

kanaka commented 4 weeks ago

vbs completed: https://github.com/kanaka/mal/pull/703

kanaka commented 4 weeks ago

plpgsql completed: https://github.com/kanaka/mal/pull/705

kanaka commented 4 weeks ago

io completed: https://github.com/kanaka/mal/pull/699 Caveat that self-hosted mode now has a failure: https://github.com/kanaka/mal/actions/runs/11524734437/job/32085546455?pr=699 This failure has been added to #662

kanaka commented 2 weeks ago

swift3 and swift4 completed: https://github.com/kanaka/mal/pull/706