-
Notifications
You must be signed in to change notification settings - Fork 2
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
Doesn't seem to work when using nvm #2
Comments
Hah, thanks for having a look. It's still only the reader right now, so the README is lying to you, sorry. You can read source into a data structure, but I still need to perform code generation and macro expansion upon that code. Maybe before code gen... impl isn't even on NPM yet I'm afraid. It will be released as 1.0.0 on there once it can execute even if the "standard library" is pretty empty. The bin that is executed and aliased to I should have the first full working version in a few weeks. It'd be cool to get a repl working too, shouldn't be hard once I have eval working. |
TL;DR: It will work with NVM... when it exists... :D |
Feel free to check out how the reader works though and critique it. I quite like that it parses the entire source code in one run through the string, but maybe you'll have some thoughts on it. |
Oh sorry, I saw your fib example on Twitter and was a bit confused as to how it worked so I thought I'd try to use it and convert it to JavaScript and then see how it works from there. |
Ah, I apologise for the confusion, I'm just glad I got it to parse / read the source. Equivalent JavaScript would be the following, although I hope to get around the tail recursion problem in Impl: function fib(n) {
if (n < 2) {
return 1
} else {
return fib(n - 2) + fib(n - 1)
}
} (this would blow the stack quite quickly due to the recursion, so I hope to add tail recursion somehow which optimises the problem out) |
Hi. I'm using nvm to manage my node versions but when I install
impl
I cannot run it.I cd'd into my impl folder inside my nvm node_modules folder and this is the folder structure I have.
Let me know if I can help you any other way.
The text was updated successfully, but these errors were encountered: