Garth Goldwater
07/11/2020, 10:05 PMGarth Goldwater
07/11/2020, 10:06 PMRay Imber
07/11/2020, 10:49 PMGarth Goldwater
07/11/2020, 11:09 PMRay Imber
07/12/2020, 12:14 AMKartik Agaram
Ray Imber
07/12/2020, 12:31 AMKartik Agaram
Ray Imber
07/12/2020, 1:01 AMKartik Agaram
Ray Imber
07/12/2020, 1:11 AMKartik Agaram
Edward de Jong / Beads Project
07/12/2020, 1:13 AMKartik Agaram
Instead of trying to create ever more powerful stacks of function by long sequences of domain specific languages or function composition, i have tried in my Beads language to create compartmentalization, where a section of code's possible effects are constantly being narrowed, so that a mistake in a module can only have a local effect, and thus the overall system is more robust.Nice!
Ray Imber
07/12/2020, 1:30 AMI personally find that the dynamic languages create a memory burden on the reader, as the reader must have in their mind the domain specific language. For very bright people, these languages are attractive, but the high leverage achieved in these languages means that small changes can have drastic effects. Leverage works both ways.This is a really good point. DSL's and Macros are a double edge sword for exactly this reason. I think it has been a big contributor to lisps downfall. It's something I personally struggle with reconciling.
Beads language to create compartmentalization, where a section of code's possible effects are constantly being narrowed, so that a mistake in a module can only have a local effect, and thus the overall system is more robust.I'm curious about how you achieve this. It reminds me of this research project, AbleC, in which they try to create a C compiler that supports extensions / plugins that could be proven to have only local effects in much the same way.
Ray Imber
07/12/2020, 1:43 AMDoug Moen
07/12/2020, 1:54 AMIt's beyond Lisp because arguments are received unevaluated, and different operations may parse their args in very different ways.So it's the same thing as FEXPRs in Lisp. Not really beyond Lisp, because the idea was invented by Lisp first. https://en.wikipedia.org/wiki/Fexpr
Doug Moen
07/12/2020, 1:58 AMGarth Goldwater
07/12/2020, 2:05 AMGarth Goldwater
07/12/2020, 2:06 AMGarth Goldwater
07/12/2020, 2:08 AMset-word:
vs a 'lit-word
vs a :get-word
vs a word
. havent figured out how all of it works together yet, but it seems like it uses the same data structure in pretty much every case… almost like clojure’s omnipresent use of nested maps/edn—but it seems to extend to binding syntax instead of just raw data. idk. I’m finding it pretty mind-bendingGarth Goldwater
07/12/2020, 2:17 AMshalabh
07/12/2020, 2:28 AMDoug Moen
07/12/2020, 2:39 AMRay Imber
07/12/2020, 2:44 AMKartik Agaram
Aleks
07/12/2020, 3:14 AMGarth Goldwater
07/12/2020, 3:42 AMprobe
, mold
, bind
, and BIND?
. I imagine that if you’ve fully learned to read the matrix, it can be really pleasant to hook into code and inspect what’s bound where, evaluate with one function and compare it to another. Like if you had wrenches that fit all the nuts and bolts on your step-through debugger—but it also seems like you have to build the debugger yourself from the kit. I’m no expert, though. I hope (wish?) we have some people with more experience with red and/or rebol specifically in the slackGarth Goldwater
07/12/2020, 3:43 AMEdward de Jong / Beads Project
07/12/2020, 3:48 AMKonrad Hinsen
07/12/2020, 9:06 AMyoshiki
07/12/2020, 9:19 AMKonrad Hinsen
07/12/2020, 10:24 AMDoug Moen
07/12/2020, 10:28 AMAs someone who's built an fexpr-based Lisp: no, Red is not like fexprs.The original post was about Rebol, and I was talking about Rebol, not Red. Rebol and Red are different. There are two kinds of Lisp dialect. • In the Macro dialects (modern compiled dialects like Common Lisp and Scheme), there are no FEXPRs. Instead, there are Macros, which receive their arguments as unevaluated syntax objects. There are two phases of evaluation. Calls to macros are expanded at compile time, not at run time. Macros are not first class values. • In the FEXPR dialects, you have FEXPR objects, which are like functions, except that the arguments are unevaluated syntax objects. FEXPRs are first class values. There is only one phase of evaluation: calls to FEXPRs are evaluated at run time. These dialects are interpreted, not compiled. Older examples are Lisp 1.5 and 3Lisp (these are historical dialects, not used today). A newer example is the Kernel language, a dialect of Scheme with FEXPRs instead of Macros, with multiple implementations on github: http://web.cs.wpi.edu/~jshutt/kernel.html Everything I said about FEXPR Lisp dialects seems to be also true of Rebol, and everything I said about Macro Lisp dialects seems to be also true of Red. So that is how I am categorizing Rebol and Red, pending more information. This page from the Red language site seems to confirm what I just wrote: https://www.red-lang.org/2016/12/entering-world-of-macros.html
Doug Moen
07/12/2020, 11:11 AMGood question... another one: is there a good reason to choose two levels with an explicit boundary in between them? Why not just one (as e.g. on a Lisp machine)? Why not more than two? In other words, is two some kind of optimum, or just a historical accident?I don't know enough about Red to answer this in the Red context, but I can talk about my own experience. My Curv language has exactly 2 levels because Curv can be either interpreted on a CPU, or it can be compiled into GPU shader code and run on a GPU. The run time requirements for these two execution environments are quite different. On the GPU, I can't have a garbage collector, or first class function values, or general run-time polymorphism, whereas on the CPU, I can. So any Curv code that runs on the GPU is restricted to a statically typed subset of Curv. This statically typed subset is upward compatible with the full language, and GPU code can be executed on the CPU without any ceremony, so it feels like you are programming in a single language. The Red language is claimed to be suitable for writing operating systems. You don't want to have a garbage-collected runtime environment inside an operating system kernel, because garbage collection pauses are incompatible with real time programming. For example, you need to be able process interrupts with guaranteed latency bounds. From Red-lang.org, "*Red/System* is a C level language, where you are responsible for allocating and freeing memory, and where you may need precise manual control over those actions." I know that the Lisp machine operating system was written in Lisp. I don't know the details, but it seems plausible that they would have used a statically typed Lisp subset for low-level OS code (device drivers and such), which if true, would put Lisp machine Lisp into the same category as Curv and Red (two levels, including a low-level systems programming dialect).
Konrad Hinsen
07/12/2020, 5:41 PMKartik Agaram
wtaysom
07/13/2020, 3:22 AM