It's too early in the week, and I'm too sober for this.
My one nit, is the lack of static typing. I'm not a fan of radically changing the direction of a project, so instead of baking it into HTML, the Programming Language I suggest the TypeScript route. Something like a hypertext typed programming syntax, HTTPS, to compile to HTML, the Programming Language.
considering a hindley milner type system for the language, but it would be a big lift w/ explicit stack semantics
also looking at HTML, the programming language,++, or, possibly, Objective-HTML, the programming langauge, which would be easier to get to and potentially more awful
I'm using Swift Result Builders as a statically typed language to generate HtmlScript code (which a similar approach as html, the programming language):
Personally I'm using CSS [0] on the backend, but might switch it out for HTML. It'd be cool to use the same technology for both. The CSS+HTML combo has some big limitations.
The best part is how they have to keep repeating "HTML, the programming language" or "HTML, the markup language" everywhere in an attempt to keep things clear :)
It would be awesome if they were using some sort of macro system / templating engine to consistently expand {{html_prog}} and {{html_markup}} just to keep it straight while they're writing it.
Thank you for posting this, it made my day a bunch brighter!
> It would be awesome if they were using some sort of macro system / templating engine to consistently expand {{html_prog}} and {{html_markup}} just to keep it straight while they're writing it.
You could use the <template> tag.
<template id="my-macro-name">
<!-- some operations -->
</template>
To use it:
<source src="my-macro-name"/>
Using source to look familiar to bash users because why not.
<output> is an obscure tag that I think allows to exploit accidental turing completeness similar to the checkbox hack.
Or is it? I once considered using that tag for some price calculator widget, but it couldn't even replace a div because of styling issues or something.
That being said, I spent like half a minute trying to figure out the point of this post and then lost interest...
Will try again, was hoping for a funny Rube Goldberg machine instead of T-shirt merchandise.
So nah, it's about as "based" as blogging about JS frameworks IMO.
You could reasonably leave tables as a way of defining an Array<Object>.
Using <dd> for addition and <dt> for duplication just makes me sad. It almost makes be suppose you don’t care about HTML (the markup language) semantics!
[1] suggests that I should define functions with the `<dfn>` tag, but the documentation appears out-of-date, because the HTML program sample shows using the `<def>` tag. Is the next revision of HTML, the Programming Language, A Programming Language going to cover the difference between the `<dfn>` and `<def>` tags, or deprecate one of them?
Maybe I am mistaken but it seems to me that the stack is implemented with a Javascript. I am a bit disappointed, in the sense that the stack too could have been implemented as a a list of tags in the containing document.
This would enable interesting features such as visual debugging (you just check the document to see the status of the program) and more importantly would enable the "code as data" paradigm, giving us easy metaprogramming and essentially a "lisp with brackets"
Interestingly, since it is actually XML, you could take advantage of all the XML features. A XSD may be able to encode the language grammar, and with XSLT, get some nice rendering.
Of course, the parser is just a DOM parser, which is built in browsers and that's what the interpreter is using. But if you want to write a standalone compiler for it, just take an off the shelf XML DOM parser and you have your AST.
I remember in the hay days of XML, someone made an article that discussed why XML is really just a language of S-expressions. This article seems argue something similar.
P.S., S-expression or not, XML-based DSLs are horrible. I don't know how many people have PTSDs using ANT or a slew of commercial "user-friendly" DSLs for test automation, process automation, and etc. It turns out the companies just didn't know how to design small programming languages and certainly lacked of compiler-writing skills.
...now I'm starting to wonder whether htmx and _hyperscript are similar to this, just disguised better...? And I was seriously considering using htmx for one thing, too.
[+] [-] DistractionRect|2 years ago|reply
My one nit, is the lack of static typing. I'm not a fan of radically changing the direction of a project, so instead of baking it into HTML, the Programming Language I suggest the TypeScript route. Something like a hypertext typed programming syntax, HTTPS, to compile to HTML, the Programming Language.
[+] [-] recursivedoubts|2 years ago|reply
also looking at HTML, the programming language,++, or, possibly, Objective-HTML, the programming langauge, which would be easier to get to and potentially more awful
[+] [-] lassejansen|2 years ago|reply
https://htmlscript.org
This works pretty well for composable server side generated view components.
[+] [-] gemstones|2 years ago|reply
[+] [-] cantSpellSober|2 years ago|reply
[+] [-] recursivedoubts|2 years ago|reply
https://html-lang.org/#js
functions defined in HTML, the programming language, can be invoked by JavaScript, the programming language (sic) and vice versa.
[+] [-] laurent_du|2 years ago|reply
[+] [-] rob|2 years ago|reply
[0] https://dev.to/thormeier/dont-try-this-at-home-css-as-the-ba...
[+] [-] dexwiz|2 years ago|reply
[+] [-] MikeTheGreat|2 years ago|reply
It would be awesome if they were using some sort of macro system / templating engine to consistently expand {{html_prog}} and {{html_markup}} just to keep it straight while they're writing it.
Thank you for posting this, it made my day a bunch brighter!
[+] [-] gorgoiler|2 years ago|reply
I appreciate their joke, but “HyperText Markup Language, the markup language” is a little redundant.
Some of us have had to include XSLT programming in our careers. We have seen into the dark abyss… and been paid to do it!
[+] [-] jraph|2 years ago|reply
You could use the <template> tag.
To use it: Using source to look familiar to bash users because why not.[+] [-] paulddraper|2 years ago|reply
[+] [-] unknown|2 years ago|reply
[deleted]
[+] [-] xupybd|2 years ago|reply
Thanks to "a slightly unhinged man living in montana"
[+] [-] TremendousJudge|2 years ago|reply
[+] [-] scop|2 years ago|reply
[+] [-] moritzwarhier|2 years ago|reply
Or is it? I once considered using that tag for some price calculator widget, but it couldn't even replace a div because of styling issues or something.
That being said, I spent like half a minute trying to figure out the point of this post and then lost interest...
Will try again, was hoping for a funny Rube Goldberg machine instead of T-shirt merchandise.
So nah, it's about as "based" as blogging about JS frameworks IMO.
[+] [-] chrismorgan|2 years ago|reply
Using <dd> for addition and <dt> for duplication just makes me sad. It almost makes be suppose you don’t care about HTML (the markup language) semantics!
[+] [-] recursivedoubts|2 years ago|reply
https://html-lang.org/#extending
and, in fact, HTML, the programming language, programs can modify not only themselves, but also the language itself, at runtime!
interesting possibilities await you, the programmer of HTML, the programming language!
[+] [-] xnx|2 years ago|reply
[+] [-] recursivedoubts|2 years ago|reply
https://html-lang.org/#example
and live demo at the bottom:
https://html-lang.org/#live-demo
that runs disturbingly fast given the implementation is an inefficient recursive algo
computers are fast
[+] [-] toddmorey|2 years ago|reply
[+] [-] recursivedoubts|2 years ago|reply
[+] [-] halosghost|2 years ago|reply
All the best,
[1]: https://html-lang.org/#defining-functions
[+] [-] recursivedoubts|2 years ago|reply
i tried to fix it
[+] [-] mrighele|2 years ago|reply
This would enable interesting features such as visual debugging (you just check the document to see the status of the program) and more importantly would enable the "code as data" paradigm, giving us easy metaprogramming and essentially a "lisp with brackets"
(Yes, I am not being completely serious)
[+] [-] unknown|2 years ago|reply
[deleted]
[+] [-] recursivedoubts|2 years ago|reply
[+] [-] maxwelljoslyn|2 years ago|reply
[+] [-] fuzztester|2 years ago|reply
(Neither am I)
[+] [-] GuB-42|2 years ago|reply
Of course, the parser is just a DOM parser, which is built in browsers and that's what the interpreter is using. But if you want to write a standalone compiler for it, just take an off the shelf XML DOM parser and you have your AST.
[+] [-] xyproto|2 years ago|reply
Mallory: Is HTML a programming language?
Bob: No! Well some people think is, but they are wrong! Then again, there is the HTML programming language...
Mallory: !???
[+] [-] g9yuayon|2 years ago|reply
P.S., S-expression or not, XML-based DSLs are horrible. I don't know how many people have PTSDs using ANT or a slew of commercial "user-friendly" DSLs for test automation, process automation, and etc. It turns out the companies just didn't know how to design small programming languages and certainly lacked of compiler-writing skills.
[+] [-] abrolhos|2 years ago|reply
[+] [-] k__|2 years ago|reply
[+] [-] klibertp|2 years ago|reply
[+] [-] dewey|2 years ago|reply
[+] [-] fabiancook|2 years ago|reply
[deleted]
[+] [-] IroncladDev|2 years ago|reply
[+] [-] hoosieree|2 years ago|reply
[+] [-] imhoguy|2 years ago|reply
[+] [-] recursivedoubts|2 years ago|reply
[+] [-] jakelazaroff|2 years ago|reply
[+] [-] arp242|2 years ago|reply
[+] [-] protopete|2 years ago|reply
Edit: nevermind, but the comment still says "This ul tag"
[+] [-] dullcrisp|2 years ago|reply
[+] [-] krapp|2 years ago|reply