This was originally written in [[2025-05-19]]. It has been copied over here so it may be published. [journal-entry:: [[2025-05-19]]]. What would a [[Programming Languages|Programming Language]] that was intended to be text-first look like? I assume something like [[LaTeX]] where macros that act on some scope of text would be pretty close to the ideal. Tex is pretty complicated and has explicitly different goals from that I have in mind. So what is it that I actually have in mind? Well, a way to create some structure on unstructured text and, sometimes, to generate more text from less, also potentially using the structure imposed. Why is this useful? Well, I'm not quite sure that it is. The idea comes from the thought "what is the next logical step from [[Obsidian]] or [[Logseq]]-like writing systems?" The core idea of Logseq and similar is to provide a fairly opinionated toolkit for building knowledge bases. Obsidian takes this same idea but is less opinionated in some ways and more so in others. Both focus on plaintext with [[Markdown]] based formats for interoperability. I have no interest in persisting with Markdown as a lowest common denominator format. I want something else, though Markdown can be a base. For example, one core operation might be to dynamically describe the relationship between two other notes or entities. Such as `[[A]] depends on [[B]]` to signify a dependency relationship. The "depends on" part here could be dynamic and trigger a post-processor that builds up a dynamic index of nodes that depend on each other. Such a concept has been modelled before using [[Datalog]] databases such as Datomic, but in this case it's less about modeling relationships between data points and more about providing a way to build up arbitrary structure. So what might that look like? Maybe something like `{[[A]][[depends on]][[B]]]}`? That's rather noisy, but maybe less so if you add spaces. I'm also not a huge fan of the idea that the macro itself is a note, so what about: `{depends_on [[A]] [[B]]}`? That's easier to read and it looks like a *function call*, but I really like the idea of having letting the *ordering* be dynamic such that if you strip out the special characters, it flows naturally like this: `{[[A]] depends on [[B]]}`. Parsing something like that would be really difficult though.