Hacker News new | ask | show | jobs
by joddystreet 12 days ago
I was working on a similar concept - Morpheus

Snippet -

```

document ::= ( comment | blank )* screen-line body

body ::= ( element-line | comment | blank )*

element-line ::= indent kind [ name ] meaning* [ modifiers ]

```

2 comments

This was take 2

```

document = { template } ;

template = "@template", identifier, newline, { node }, "@end", line-end ;

node = group | row ;

group = "<", identifier, ">", newline, { node }, "</", identifier, ">", line-end ;

row = atom, { "|", atom }, line-end ;

atom = reference | component | spacer ;

reference = "[[", identifier, "]]" ;

component = "[", label, [ "|", identifier, { "|", property } ], "]" ;

property = identifier, "=", value ;

value = json-scalar | binding ;

label = label-part, { label-part } ;

label-part = literal-text | escape | binding ;

binding = "{", identifier, { ".", identifier }, "}" ;

spacer = "..." ;

line-end = newline | end-of-file ;

```

Still evolving.

Core idea is to be able to define interfaces in a minimal language, without going into too much details about attributes, say height, width, etc

Myself too, they are all essentially DSLs with a transpiler to underlying tools and packages in a given language. Mine is different by allowing module developers to control the output technologies and DSL if they want, boiled down to CUE + text/template. Downstream users get a similar experience to this post.
Both of those are too much DSL (imo). My approach involved no business logic, because that never works out, and focussed on generating/maintaining boilerplate, while also allowing users to modify the generated code and have it survive regen (diff3)

https://hofstadter.io/code-generation/

I'm migrating / renaming / cleaning up the project this week

https://github.com/verdverm/veg

My focus was essentially to be able to define this and let agents use these to build the interfaces. This `...with a transpiler to underlying tools and packages in a given language.` is an interesting idea, but I just want to focus on the language specs and compiler.
> but I just want to focus on the language specs and compiler

I'm using "a transpiler" loosely to cover when the input is a DSL and output is something like react, tanstack, node - but tech choices are flexible here