6 ms·
Both REBOL and Red feel magical to me. How is this simplicity achievable? Where is the trick? I never could dig too deep into those, and couldn't find much in
by rgrau 6y ago
Both REBOL and Red feel magical to me. How is this simplicity achievable? Where is the trick?
I never could dig too deep into those, and couldn't find much info on the net. Is there a set of seminal papers/articles on the principles which those are based off?
I imagine there's Logo on one side of it, but I'm not sure about the bootstrap story, the toolchain, etc... Meta-II? Smalltalk, Lisp?
I recently found this book
https://subscription.packtpub.com/book/application_development/9781789130706 https://subscription.packtpub.com/book/application_developme... which I'd like to read if it talks about that holistic approach. Any comments? other pointers?
- bryanrasmussen 6y agothe original design objectives. http://www.rebol.com/docs/design-objectives.html http://www.rebol.com/docs/design-objectives.html I remember a long time ago an interview with the original language implementer where he talked about drawing inspiration from some things in Lisp but I can't remember enough to google forward to the document.
- 9214 6y agoHistorically, Rebol family takes roots in the ideas of symbolic programming, denotational semantics and distributed computing. It never was an academical project (so you won't find any papers or articles), but rather a mix of pragmatism mixed with nonacceptance of the current state of software, so there's no magic to it: you reject the bloat and keep things simple. The core idea is that, in Red/Rebol, you don't write "code" in the usual sense of the word, but rather load a data structure in memory that interpreters/compilers then process. This data structure is a concrete-syntax tree (CST), a product of lexing syntactically-rich data format (think of a human-centered, futuristic JSON with unique literal forms for things like IP addresses with RGBA tuples, dates in various ISO formats, monetary values, URLs, e-mails, etc). The result of evaluation, then, is the end game of interpreters/compilers "walking" this CST — and each one can interpret the same tree differently. So, Red/Rebol is both a programming language and a data format, there is no distinction between code and data. Rebol called itself "messaging language" because this CST, coupled with semantic rules for its interpretation, constitutes an embedded DSL (aka dialect), a message that you can exchange not only between machines (as a data structure), but between machines and humans (as a readable format). Implementation-wise, the leverage comes from the runtime library that reuses what OS provides, high degree of polymorphism, everything being a first-class citizen, and above-mentioned syntactically-rich homoiconicity with general orientation towards linguistic abstraction. With all of that we end up with a tool (speaking of Red) that covers the whole spectrum of software development, from metal to meta: user-land functions that seamlessly operate on CST values and enable meta-programming at run-time without macros, and a set of dialects that process said CST and encapsulate the problem domain's complexity, like e.g. VID for declarative GUI specification, Draw for raster drawing, Parse for creating other DSLs (think of it as Meta-II on speeds, wearing jet-rollers) and Red/System for low-level programming. All packed into a few megabytes. These are the principles. Rebol was an interpreted language bootstrapped from C, Red is both compiled and interpreted: runtime is written in Red/System, and bootstrapping compiler with Red/System toolchain are written in Rebol2. So, Red is written in itself, Red/System and Rebol; Red/System is a dialect of Red; Rebol is 90% compatible with Red (roughly the same data format and language semantics). Let this meta-circularity sink in. Balbaert's book is IMO a very shallow explanation of the language basics, often plain wrong and technically incorrect, so I cannot in good faith recommend it, especially if you are a newcomer to Rebol family with ambitions to go advanced and master the tool. WRT pointers toward design-centered discussions around Red/Rebol, consider to join community Gitter channel and read wiki articles. E.g. one of them (shameless plug) goes a bit more into conceptual underpinnings that I described above. https://gitter.im/red/red https://gitter.im/red/red https://github.com/red/red/wiki/%5BDOC%5D-How-Red-works,-a-brief-explanation https://github.com/red/red/wiki/%5BDOC%5D-How-Red-works,-a-b...
- rgrau 6y agoWow, thanks so much for this answer. I'm just going to add this link here to another explanation of yours I found around that expands on some of the unique aspects of Red: https://www.reddit.com/r/redlang/comments/aebxct/contrast_red_with_racket/ https://www.reddit.com/r/redlang/comments/aebxct/contrast_re... . Thanks again
- Apofis 6y agoWhile Red seems to be in active development, with over 10,000 commits, the community seems to be absent... odd. https://github.com/search?o=desc&q=language%3Ared&s=stars&type=Repositories https://github.com/search?o=desc&q=language%3Ared&s=stars&ty...
- 9214 6y agoA rather strange thing to say, given that (a) Github arbitrary limits number of displayed repositories (try to refresh the page a few times) (b) there is Gitlab and other Git-repository managers with VCSs (c) there's a Gitter chat with daily activity [1]. It's true that community is small (yet tightly knit), but I wouldn't go as far as to call it absent. [1]: https://gitter.im/red/red https://gitter.im/red/red
- techdragon 6y agoTLDR: Red desperately needs its own community maintained learning materials. It’s all about signalling. I’ve meant to learn more about Red for years but keep putting it on the back burner because I can never seem to find a cohesive set of material to self-learn from. (I want a book. Like https://doc.rust-lang.org/book/ https://doc.rust-lang.org/book/ - doesn’t have to be great, but it’s my minimum bar for entry, one cohesive document to learn the language, syntax, grammar, keywords, whatever standard library exist, maybe even a tutorial or two along the way... Perl, TCL, Python, Rust, Ruby, Go, Prolog, all the good languages have a book like learning document with sections and chapters I can work through, usually they combine it with their standard library reference too.) The Red community does look absent/dead/deeply in decline by the standard of other languages. Myself, and I’m sure many others, pass over and ignore it time and time again because without a more obvious set of signals that its worth our time, (I have extremely limited time for learning dead languages, they are not worthless, it’s a matter of priorities) we just move on to other things after we fail to see why it’s worth learning any more than “Red is a cool language descended from REBOL, but it seems kinda like no one uses it so it might not be worth the time to learn, because if it really was awesome surely it would be more popular and have books and stuff”
- 6y ago