-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Livescript implementation #262
Conversation
Implementation looks good! Glad you enjoyed it. I've verified that both regular and self-hosted tests pass. However, there are a few minor things before I merge:
diff --git a/livescript/Makefile b/livescript/Makefile
index 080d572..07c91d2 100644
--- a/livescript/Makefile
+++ b/livescript/Makefile
@@ -13,8 +13,19 @@ all: node_modules $(BINS)
node_modules:
npm install
-%.js: %.ls
+%.js: %.ls node_modules
$(LSC) -d -c $(@:%.js=%.ls)
+step1_read_print.js: utils.js reader.js printer.js
+step2_eval.js: utils.js reader.js printer.js
+step3_env.js: utils.js reader.js printer.js env.js
+step4_if_fn_do.js: utils.js reader.js printer.js env.js core.js
+step5_tco.js: utils.js reader.js printer.js env.js core.js
+step6_file.js: utils.js reader.js printer.js env.js core.js
+step7_quote.js: utils.js reader.js printer.js env.js core.js
+step8_macros.js: utils.js reader.js printer.js env.js core.js
+step9_try.js: utils.js reader.js printer.js env.js core.js
+stepA_mal.js: utils.js reader.js printer.js env.js core.js
+
clean:
rm -f $(BINS)
|
yay! new implementation!
…On May 24, 2017 16:16, "Jos van Bakel" ***@***.***> wrote:
I've recently followed the mal guide to build an implementation in
Livescript. It was really much fun! Thanks for the great guide!
I noticed there is an open pull request for another Livescript
implementation, but the last comments on that thread are from 2015. So I
thought I'll give it a try.
What do you think about my Livescript implementation?
------------------------------
You can view, comment on, or merge this pull request online at:
#262
Commit Summary
- Added livescript
- Step 0 & 1
- Step 2
- Step 3
- Step 4
- Deferrables until step 4
- Step 5
- Step 6
- Step 7
- Step 8
- Added first, rest and nth
- Step 8 complete
- More of step 8
- Completed step 9
- Self hosting!
- Fixed recursion in Makefile
- Fixed wrong ignore of livescript/node_readline.js
- Added livescript to dependencies + use local livescript compiler
File Changes
- *M* .gitignore <https://github.com/kanaka/mal/pull/262/files#diff-0>
(3)
- *M* Makefile <https://github.com/kanaka/mal/pull/262/files#diff-1>
(3)
- *A* livescript/Makefile
<https://github.com/kanaka/mal/pull/262/files#diff-2> (20)
- *A* livescript/core.ls
<https://github.com/kanaka/mal/pull/262/files#diff-3> (342)
- *A* livescript/env.ls
<https://github.com/kanaka/mal/pull/262/files#diff-4> (21)
- *A* livescript/error.ls
<https://github.com/kanaka/mal/pull/262/files#diff-5> (0)
- *A* livescript/node_readline.js
<https://github.com/kanaka/mal/pull/262/files#diff-6> (47)
- *A* livescript/package.json
<https://github.com/kanaka/mal/pull/262/files#diff-7> (18)
- *A* livescript/printer.ls
<https://github.com/kanaka/mal/pull/262/files#diff-8> (50)
- *A* livescript/reader.ls
<https://github.com/kanaka/mal/pull/262/files#diff-9> (179)
- *A* livescript/run
<https://github.com/kanaka/mal/pull/262/files#diff-10> (2)
- *A* livescript/step0_repl.ls
<https://github.com/kanaka/mal/pull/262/files#diff-11> (28)
- *A* livescript/step1_read_print.ls
<https://github.com/kanaka/mal/pull/262/files#diff-12> (18)
- *A* livescript/step2_eval.ls
<https://github.com/kanaka/mal/pull/262/files#diff-13> (53)
- *A* livescript/step3_env.ls
<https://github.com/kanaka/mal/pull/262/files#diff-14> (124)
- *A* livescript/step4_if_fn_do.ls
<https://github.com/kanaka/mal/pull/262/files#diff-15> (194)
- *A* livescript/step5_tco.ls
<https://github.com/kanaka/mal/pull/262/files#diff-16> (212)
- *A* livescript/step6_file.ls
<https://github.com/kanaka/mal/pull/262/files#diff-17> (241)
- *A* livescript/step7_quote.ls
<https://github.com/kanaka/mal/pull/262/files#diff-18> (282)
- *A* livescript/step8_macros.ls
<https://github.com/kanaka/mal/pull/262/files#diff-19> (355)
- *A* livescript/step9_try.ls
<https://github.com/kanaka/mal/pull/262/files#diff-20> (384)
- *A* livescript/stepA_mal.ls
<https://github.com/kanaka/mal/pull/262/files#diff-21> (397)
- *A* livescript/utils.ls
<https://github.com/kanaka/mal/pull/262/files#diff-22> (6)
Patch Links:
- https://github.com/kanaka/mal/pull/262.patch
- https://github.com/kanaka/mal/pull/262.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#262>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAj-yfXYJn5fYbcbXhJxEARbU4Ccfgeks5r9C2dgaJpZM4NlF0X>
.
|
Thanks for your feedback @kanaka. I've implemented the changes. I'm not quite sure what the regex does in stats and stats-lisp, but I copied it from the coffeescript implementation and it appears to work. I'll send a tweet later tonight, and i'll think about making a blog post. Thanks again for this wonderful project. I'm thinking about doing another implementation in another language :-) |
I stopped Travis for the other implementations (so we don't have to wait a couple hours). I had to make a minor Dockerfile update, but now things pass: https://travis-ci.org/kanaka/mal/jobs/235731614 |
@c0deaddict I note that you have some Elm background. Surprisingly, Elm is currently missing as a mal implementation. Interested in tackling that next? You'll might have to deal with some hassle around command line execution. E.g. https://github.com/jfairbank/run-elm |
That would be interesting, i'm on it! |
Livescript implementation
Livescript implementation
I've recently followed the mal guide to build an implementation in Livescript. It was really much fun! Thanks for the great guide!
I noticed there is an open pull request for another Livescript implementation, but the last comments on that thread are from 2015. So I thought I'll give it a try.
What do you think about my Livescript implementation?