Fangle: create interactive documents from plain text
jotux.github.io
jotux.github.io
I'm an embedded systems engineer and work almost exclusively in embedded C/C++, so forgive my absolutely awful javascript/coffeescript coding.
Previous discussion here: https://news.ycombinator.com/item?id=5107106
Looking at your code, my brain is already reordering some of it :-P It looks clean though. I've noticed a lot of devs like to trash on coffeescript in favour of ES6 or TypeScript, but I've really grown to love the language. It's also neat to look at the compiled output and see what it does to make many of the functional elements work. Most of it makes sense.
Idyll provides this type of reactivity, but focuses more on making it easy for users to embed custom interactive components
How do you handle dynamically resizing windows/screens and canvas? I had to jump through a whole lot of hoops[1][2] just to get it to play nicely with it
Especially on Firefox canvas does not seem to play nicely with flexbox, or any kind of CSS where you don't set the width/height explicitly in pixels.
[0] http://linnarssonlab.org/flamemaps/
[1] https://github.com/linnarsson-lab/flamemaps/blob/master/src/...
[2] https://github.com/linnarsson-lab/flamemaps/blob/master/src/...
Things it buys you out of the box:
- No need to write a parser
- You can make complex references via CSS selectors
- Your structure (tags) has structure (attributes)
- All the existing tooling will help you to debug if something goes wrong.
On this note, I regret that HTML5 had thrown away the good ideas from XML (syntax consistency and namespaces) along with the bad (weird sub-formats, entity definitions, directives and other complex crap no one used well anyway).