Re:Flat HTML
by torgoguys on Wednesday April 01, 2020 @10:21AM
(#22748743)
What has the world come to if this mess is considered easier than writing some nested html tags? (Perhaps I'm not plugged into the SPA scene well enough to appreciate this project. I hope it is useful to some.) In fact, reading the examples made me check to see if the first commit to this project was today, April Fools...
[ Parent
| on HN ]
The link was shared here by someone with the same username as the github repo owner - presumably it was a pre-planned April Fools day joke for Hacker News.
Re:Flat HTML
by mdturnerphys on Thursday April 02, 2020 @03:08AM
(#22756879)
It looks like the owner has shared it three times in the last 2 weeks, which suggests it isn't a joke.
Come on, this is cutting edge stuff.
Personally I've been considering an alternative representation of python using YAML.
for example this python:
if a == 3:
b = y * 3
else:
b = x + 4
could be represented in YAML python as: if a == 3:
b = y * 3
else:
b = x + 4
Re:Flat HTML
by Stratoscope on Thursday April 02, 2020 @12:33AM
(#22756224)
That is amazing!
I hope you can share the toolchain that lets you convert from one to the other so seamlessly?
I will as soon as the indentation technology has been worked out, and the API stabilized and a documentation framework has been completed, targeting 4/1/21.4th of Jan?
;)
One advantage is security. The text after the equals sign in each string can't be misinterpreted as HTML syntax, so it's safe to build flat HTML using string concatenation.
I really hope it's a joke. I mean it's not even flat. It's just the nesting is represented in a different less intuitive way.
The reason behind the design is not mentioned. Why would one take this seriously?
Replugging bepis, another way to write 'flat' HTML using operators with a slightly different operator set: https://github.com/dosyago/bepis
For me I just wanted to stop writing all the extra syntax (like `< > =` and closing tags) and use symbols my fingers were already reaching for. Just about conciseness, efficiency and enjoyment.
I really like the operator choice in this project!