![]() |
|
![]() |
|
It's also not that relevant. You'll can add different syntax variants, the Lisp evaluator doesn't see parentheses in any way, just actual interned data.
|
![]() |
|
I'm not persuaded this is a better idea than, say, Racket's ability to configure the reader layer [1]. This lets you create, for example, an embedded Datalog implementation [2] that uses Datalog syntax but interops with other Racket modules. (The underlying data model doesn't change.) This gives you the ability to metaprogram without being confined to S-expressions, but it does so in a high-level way. It is very neat to see this kind of syntax bootstrapping. I think there's some value (in a researchy-sense) to being able to do that. But I'm not sure if there's something fundamentally "better" about this approach over Racket's approach. Postscript: Lisp (and Scheme and Racket) macros typically operate on AST (typically because Lisp has reader macros and Racket has a full-bodied reader extension) but Rhombus [3] operates on a "shrubbery", which is like an AST but it defers some parsing decisions until later. This gives macros a little flexibility in extending the syntax of the language. Another interesting point in the design space! [1]: https://docs.racket-lang.org/guide/hash-reader.html [2]: https://docs.racket-lang.org/datalog/datalog.html [3]: Flatt, Allred & Angle et al. (2023-10-16) Rhombus: A New Spin on Macros without All the Parentheses, Proceedings of the ACM on Programming Languages. https://doi.org/10.1145/3580417 |
![]() |
|
I'm not sure that something which uses brainfuck as its default example is intending you to take it seriously. Personally I burst out laughing at the introduction of "metacrank".
|
![]() |
|
Do you have an example of quotation in lisp vs m4? I'm interested in what you asserted but I need something more concrete I think.
|
![]() |
|
Wow. The proverb of "Languages that don't change your way of thinking about programming are not worth learning" in full swing here, I feel like I've been enlightened.
|
![]() |
|
> This is of course true, but there's something very broken with lisp Big words from a C project that has not a single warning option in its CFLAGS. |
![]() |
|
This is really cool! For those who take it as a joke or who scoff at the choices (like the whitespace thing), at least read until section 4 and then skip to section 9.
|
![]() |
|
I think it's fine to show that you can do it, I think the main thing is to flip the order a bit. E.g. "here's a cool thing thing we can do Maybe compare how e.g. Forth is often introduced, with how people describe bootstrapping of a simplistic Forth like Jonesforth or Sectorforth [2]. Showing people how they can define their own words and it fundamentally changes how they work with the language afterwards is cool to a lot of people who have no interest in details like how you an implement even numbers with a minimal set of primitives (e.g. Sectorforth relies on that - it doesn't have builtin numbers[3]). Both are interesting to me, but I'm weird, and I think for most people it'd be easier to maintain their interest if those two aspects are either separate articles or at least if the bootstrapping is relegated to a standalone section they're clearly told they can skip. [1] https://news.ycombinator.com/item?id=31368212 [2] https://github.com/cesarblum/sectorforth [3] The Sectorforth Hello world defines every numeric constant it needs like this:
Which is fun if you're a language geek. Not so convincing if you want to know if Forth is fort you [EDIT: That mistake was wholly unintentional, but I'll leave it].
|
![]() |
|
The "bootstrapping code for a very minimal syntax" reads like a practical joke. Their mention of Brainfuck set expectations appropriately:
|
![]() |
|
This is lovely. I'm having trouble working out how this differs from Factor, in which left bracket and quote are also not primitive. |
![]() |
|
Please, what is the problem this solves? What are some example instances of things that the lisp approach makes difficult or impossible that this alternative makes straightforward?
|
![]() |
|
In my opinion, this article a hilarious joke, a satire. I mean... > Let's take a look at what the bootstrapping code for a very minimal syntax looks like: > > ldfgldftgldfdtgl > df > > dfiff1 crank f |
![]() |
|
I know of multiple ways to do it in perl - 'use Foo;' can introduce a source filter that slurps the entire remaining file text, thus hiding it from the perl compiler. __DATA__ sooort of counts and is probably the closest to pure STOPPARSE as GP is thinking of. I also, once, wrote https://p3rl.org/Devel::Declare which basically grabbed the current read position and Did Things, including calling back into the existing perl parser to not have to re-implement everything - that was how perlers first got access to a mostly* working 'method' keyword. (now there's a proper way of doing that in perl core, and Devel::Declare is (very happily to me) obsolete, but it was essential to prove the concept and the user interest to justify adding the actual feature to the core interpreter) [*] the caveats are many and believe me I'm well aware the entire thing was a giant hack from the moment I first started writing it, but rather than trying to write them out I'll just say "however hacky you imagine this was, what I actually did is probably worse" and leave it there. |
When I'm reading something informational (rather than recreational) I'm always asking myself "is this worth my time?" You should address this as soon as possible, by telling the reader what the document is about right at the start. "Cognition is a new language exploring user modifiable syntax" or something similar. I didn't get past the first four paragraphs because I couldn't determine it was worth continuing.