6 ms·
http://www.red-lang.org http://www.red-lang.org for those who doesn't necessarily need Lisp, but appreciates homoiconicity and other nice things. > This execut
by xaduha 10y ago
http://www.red-lang.org http://www.red-lang.org for those who doesn't necessarily need Lisp, but appreciates homoiconicity and other nice things.
> This executable is a full blown native interpreter with a JIT, GC, etc.
> A small, fast, native lisp
I have issue with the use of the word 'native' here. For me 'native' mostly means AOT compiling.
- throwaway7645 10y agoProbably the language that I'm most looking forward to. It'd give you the ease of python with the speed of a native language and the best GUI DSL I've ever seen. Edit: Agreed that I don't like the author's use of native either.
- mapcars 10y agoTo me Rebol/Red is more lisp than some other lisps out there. It doesn't have so much parens, true, but the idea of like code is data and DLS possibilities are huge things.
- allover 10y agoFirst I've heard of Red. Does it implement 'readable' [1] or is it a [parallel school of thought] (can't think of right phrase here but you get what I mean)? Also has anyone tried to create a 'readable' [1] flavour of Clojure yet? If not, why is that, do lispers consider all the parens to really not be a barrier? [1] http://readable.sourceforge.net/ http://readable.sourceforge.net/
- throwaway7645 10y agoRed is basically Rebol rewritten with an important distinction. It comes with a sister language called Red/System that is basically a lightweight static systems language like C, but a lot closer to Red. Therefore, you can run the interpreter or drop down to native code when you need it. The 1.0 release should AOT compile what it can, then JIT, then lastly interpret what you have to. It is hoimoconic like lisp, but not a lisp. There is no install, just a 1 MB interpreter and compiler that can target a lot of architectures. The draw GUI DSL is pretty amazing. There is a Rebol YouTube vid (Red is 98% compatible) where a guy makes a zillion little cool apps with only a few lines of code each.
- macmac 10y agoLink? Searched YouTube but no vids appear to match your description.
- throwaway7645 10y agohttps://m.youtube.com/watch?v=lR5Fzv6DP0I https://m.youtube.com/watch?v=lR5Fzv6DP0I
- pvdebbe 10y agoNo, the parens don't constitute a barrier of any kind, really. Reading lisp fluently requires very consistent indentation, though. Then you see where an expr starts and where it ends (with nestings and all) without counting any parens whatsoever. When writing lisp your editor should help you at least a bit to make things enjoyable. They can help a lot, but doesn't have to help much; I found for myself that if the editor just highlights matching parens, I'll be very effective.
- Chattered 10y agoSince discovering paredit-mode, I have found a whole new love for Lisp syntax, and now I won't write Lisp without it. I have tried a structure editor for Haskell but I found it pretty counterintuitive. I wonder if structure editing just assumes a language with very little syntax.
- mapcars 10y ago>Does it implement 'readable' Nope, it has it's own notation which I find very close to the Smalltalk one, for example: red>> a: [1] == [1] red>> pick head append a 1 + 1 2 == 2 red>> a == [1 2] So the second expression is good example of how things work, this is how it looks if I put parens (which are unnecessary in this case): pick (head (append a (1 + 1))) 2 Here interpreter/compiler knows how many arguments each `word` (you can think `function`) needs, so `append` needs 2 - series and item to append, `head` only one - series, `pick` needs series and index to get element. But what about `+`? red>> type? :+ == op! Operators are infix things of two arguments and they get priority over function calls, that's why `append` is called with `a` and result of `1 + 1` and not with `a` and `1`. It looks a bit tricky in the beginning, I understand, but it leads to very compact and easy to read code. This is brief explanation which should help you to start reading and writing Red/Rebol code :)
- allover 10y agoGreat explanation, thanks!
- chrisseaton 10y agoThey said that the interpreter was native. It is - it's AOT compiled. They didn't say that your program was natively compiled. Your program is interpreted - by the interpreter - the native intepreter - and then JIT compiled by meta-tracing the interpreter. Their terminology is totally consistent with how the field uses these terms. This technology operates at multiple levels of meta-implementation, so it is easy to get confused what is tracing what, and what is implemented using what at a given time.
- xaduha 10y agoIt's useless information then, any real executable is native. In that sense you can say Perl is native (Python, Ruby, JavaScript/nodejs).
- chrisseaton 10y agoWell yes any real executable is native. The perl executable is indeed a native program. It's a native interpreter for Perl. But there are also interpreted interpreters aren't there? Which aren't real executables, and aren't native. It would be possible to write an interpreted interpreter for Perl, maybe in a language like Ruby. Jython is a real example of an interpreted interpreter (if you ignore that the JVM has a JIT, but it isn't AOT, which you've said that you think is an important criteria). And so it isn't useless information. The distinction is particularly relevant here because the RPython technology they are using to build their interpreter means they can either interpret their interpreter using the Python interpreter, or they can make a native interpreter by compiling their interpreter to native AOT. That's probably why they used that particular wording. So, again, not only is their terminology consistent with the rest of the industry, they are also making a specific and interesting point here, and it isn't useless information.
- xaduha 10y agoThey put that in a headline - A small, fast, native Lisp. It's missleading/clickbaity.
- desireco42 10y agoRed is actually quite cool lang. Thanks for posting.