3 ms·
From README.md: "Ni is meant to mix with Nim. The idea is to use Nim for heavylifting and binding with the outside world, and then let Ni be a 100% live dynami
by nicklaf 11y ago
From README.md:
"Ni is meant to mix with Nim. The idea is to use Nim for heavylifting and binding with the outside world, and then let Ni be a 100% live dynamically typed scripting engine inside Nim. Ni will stay a very small language, but hopefully useful."
Writing in Smalltalk or Lisp in order to control a more conservative language such as Nim would appear to be a winning idea.
I'd be interested to learn more about the difference between the approach taken by Ni, and the one taken by Hy or Clojure. In the latter two, S-expressions are transformed into the AST (or directly to bytecode) of the host language.
The author of Ni seems to have defined a new AST, and then written an interpreter in Nim:
"Ni comes in two modules, the parser (500 loc) and the interpreter (750 loc). The parser produces an AST which is also the internal representation of data in Ni. The interpreter then interprets the AST."
Perhaps this was necessary due to the more static nature of Nim compared Python or the JVM.
- gokr 11y agoYes, I made my own AST. You know, it started as a parser, evolved into an interpreter :). But I will definitely talk to Andreas (creator of Nim) if using Nim AST would be an advantage.
- nicklaf 11y agoAt any rate, your language does look rather interesting, and I should thank you for your blog post. It has made me think about how the syntax of Rebol (which was unknown to me) could possibly inform a language designed to combine ideas from both Smalltalk and Lisp.
- gokr 11y agoSmalltalk is quite lispish in many ways (closures, most stuff is an expression, simplicity etc). Rebol fascinates me - and I have only scratched its surface. For more on Rebol you should look at www.red-lang.org. Especially the stuff around the Parser DSL, like: http://www.red-lang.org/2013/11/041-introducing-parse.html http://www.red-lang.org/2013/11/041-introducing-parse.html Red is in fact very impressive and definitely the "modern Rebol".
- draegtun 11y agoIn terms of development toolkit and implementation then yes Red could/should be considered the "modern Rebol". However in terms of the language (syntax & semantics) then Rebol 3 is definitely the "modern Rebol". Have a look at Ren/C for the new ideas and the very latest development of the Rebol 3 codebase - https://github.com/metaeducation/ren-c https://github.com/metaeducation/ren-c
- gokr 11y agoYou are ever so correct, sorry about that! I also would like to say that I am slightly "disappointed" that Red decided to stick so closely to Rebol. Personally I definitely don't find everything in Rebol to be so perfect. ;)