For eg. compare this:
``` Window { textColor: "slategray" property int v: 40
ColumnLayout {
id: layout
anchors.fill: parent
spacing: 20
Text {
id: number
Layout.alignment: Qt.AlignHCenter
font.pixelSize: 70
text: v
}
ProgressBar {
id: progressBar
Layout.alignment: Qt.AlignHCenter
value: v/100
color: v < 50 ? "dodgerblue" : "turquoise"
}
}
MouseArea {
anchors.fill: parent
onClick: v = (v+20)%100
}
}
```with Declare:
``` App [ textColor = slategray,
group: View [ x = center, y = center, width = 80%,
layout: SimpleLayout [ axis = y, spacing = 20 ],
number: Text [ width = 100%, textAlign = center,
fontSize = 70, fontWeight = bold, text = { "" + v } ],
bar: Gauge [ width = 100%, value = { v },
tint = { v < 50 ? cool : warm }, accessibilityLabel = "v" ],
hint: Text [ width = 100%, textAlign = center,
text = "click anywhere to change v" ]
],
v: number = 40,
cool: Color = dodgerblue,
warm: Color = turquoise,
onClick() { v = (v + 20) % 100 }
]
```"Two vectors, and the one invariant that binds them." WHAT ARE YOU TALKING ABOUT
For now, I would urge project creators to start using Neon for writing docs and landing pages. It's significantly better out of the box.
Anyway, it's probably more existential dread than laziness. Y'all just gonna point your LLM at it in real world use.
It should probably say up front that this is an npm package along with the tooling for it, and the output runs in a browser.
"This page is written in it. By an LLM."
[1] https://kotlinlang.org/docs/multiplatform/compose-multiplatf...
- Move docs to llms.txt too
- Make one click copy prompt button for starting with an agent
- Explain clearly how it can integrate with React or Vue - if I can embed a module in my already existing app - thats a great way to transition over time.
- Play the “Agent” card more - these days nobody will learn new DLL, but having a way to quickly test it with my agent would convince more people to give it a try
Snippet -
```
document ::= ( comment | blank )* screen-line body
body ::= ( element-line | comment | blank )*
element-line ::= indent kind [ name ] meaning* [ modifiers ]
```
```
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
Isn't HTML a DSL for UI? What's wrong with it?
“Show boxes”?
UI used to strive for making it easy for users to understand the software’s mental model, current state, and possible actions. Now it’s about looking cool (the same as the other cool kids).
XAML was a notoriously bad idea.
This doesn't look much better than that.
Language is extremely annoying.
I hate it