I really fail to see the distinction between writing some functions in a language, compared to a “new language” or dsl or something.
Maybe it’s just my past experiences clouding my judgement, but if I see something saying it has its own language, or dsl, or flavor of a language… it makes me want to run away!
Also, debugging the compiler is not as daunting if you want to. I never needed. The DrRacket IDE comes with all the tools and workflows to make that just like debugging any other program.
Be aware that Racket is a language toolkit and offers the tools and workflows to work with language development. Also, I didn't claim that my functions were a new language, I said that Pollen is a language. Pollen is not just a bunch of functions in a language, it is a proper programming language, I invite you to check it out.
Maybe I didn't explained it well on the post. Racket comes with many languages, not necessarily DSLs, some are full blown languages. People also ship new languages as packages. Pollen is one of such languages. The post details how I can leverage the fact that I can write Racket functions and use other modules and call them from Pollen. The main objective is to make people more interested in more flexible systems for blogging. That people should mould their blog to their experience and not the other way around (which is much more common).
Making a new language in Racket is just writing some functions (and macros, which in Racket are a kind of function). This means pretty much all your tooling comes along for free (syntax highlighting, debugger, etc).
The reason that someone might write a DSL is because it better fits the problem. The OP's example Pollen for instance, provides an easy way to run a full programming language to produce HTML output, something that can be tedious without language support.
Been a while Ricardo, I still remember that old WebAudio talk with the guitar. Thanks a lot for sharing MDX here, it looks quite neat indeed.
I think that the main difference between what I was showing and MDX is that MDX is the JS ecosystem, and you basically get JavaScript only. In those Pollen/Racket based setup, you get languages beyond Pollen and Racket. For example, I can write my own language specialised to describe TTRPG adventures. It doesn't need to look like Racket, or behave like Racket. It can be a whole new language. And I can still plug it into my blog because Racket allows you to mix and match Racket-based languages.
With MDX, from my very brief read of their website, you'll create a JSX components and insert it inside a Markdown document. You're limited to Markdown documents and JSX components, which let's be honest is probably enough for most cases if not all of them.
In the end it is about what the blog authors want to use. There is no point in using something one doesn't like, that will make writing a chore. If I was doing a JS-based blog, I'd certainly would look towards using MDX.
Good times! Those and all the Mozilla/FF OS events are also in permanent memory here :)
I'm not familiar with Pollen but indeed, it seems the ability to run anything at build time, and define your own DSLs opens up interesting possibilities in a way MDX would not be capable of. Not that I would choose JS for a blog either - things are way too fragile now.
9 comments
[ 3.1 ms ] story [ 35.5 ms ] threadMaybe it’s just my past experiences clouding my judgement, but if I see something saying it has its own language, or dsl, or flavor of a language… it makes me want to run away!
I agree, it’s a turn-off, for sure
Also, debugging the compiler is not as daunting if you want to. I never needed. The DrRacket IDE comes with all the tools and workflows to make that just like debugging any other program.
Maybe I didn't explained it well on the post. Racket comes with many languages, not necessarily DSLs, some are full blown languages. People also ship new languages as packages. Pollen is one of such languages. The post details how I can leverage the fact that I can write Racket functions and use other modules and call them from Pollen. The main objective is to make people more interested in more flexible systems for blogging. That people should mould their blog to their experience and not the other way around (which is much more common).
Making a new language in Racket is just writing some functions (and macros, which in Racket are a kind of function). This means pretty much all your tooling comes along for free (syntax highlighting, debugger, etc).
The reason that someone might write a DSL is because it better fits the problem. The OP's example Pollen for instance, provides an easy way to run a full programming language to produce HTML output, something that can be tedious without language support.
I think that the main difference between what I was showing and MDX is that MDX is the JS ecosystem, and you basically get JavaScript only. In those Pollen/Racket based setup, you get languages beyond Pollen and Racket. For example, I can write my own language specialised to describe TTRPG adventures. It doesn't need to look like Racket, or behave like Racket. It can be a whole new language. And I can still plug it into my blog because Racket allows you to mix and match Racket-based languages.
With MDX, from my very brief read of their website, you'll create a JSX components and insert it inside a Markdown document. You're limited to Markdown documents and JSX components, which let's be honest is probably enough for most cases if not all of them.
In the end it is about what the blog authors want to use. There is no point in using something one doesn't like, that will make writing a chore. If I was doing a JS-based blog, I'd certainly would look towards using MDX.
I'm not familiar with Pollen but indeed, it seems the ability to run anything at build time, and define your own DSLs opens up interesting possibilities in a way MDX would not be capable of. Not that I would choose JS for a blog either - things are way too fragile now.