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.
It would also be cool if someone would explore CSS for the frontend. I think isomorphic CSS could be a really neat stack.
Edit: I actually think I recall some pure-CSS frontend examples. We might just need to combine that with backend CSS technologies.
Edit edit: Probably the biggest issue will be to prevent the server from evaluating the CSS fully but maybe something like what Next.js does with server and client components could work here.
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!
XSLT might have the greatest ratio of brilliance to marketing of anything in our industry.
XSLT is a pattern matching DSL for converting trees into other trees. What things are trees? Programs.
It is also XML. XML is a boring business thing for boring business people associated with legacy Java codebases. We like json here. Or maybe yaml. To quote an otherwise excellent past colleague, "the pointy brackets hurt my eyes". It's horrible to edit in notepad too.
Who wants XML syntax for a purely functional programming language? No-one wants that, we write our compilers in C++ thank you.
As a bonus extra, "XML schema" are a similarly crufty rubbish old thing in nasty XML syntax that look suspiciously like "type of that tree". So you can typecheck the intermediate IR in your compiler pipeline. If you wrote it in the bad language from the before times. Emacs knows what those schema mean too.
The world has moved on to better marketed semantically worse things with prettier syntax. This brings me joy.
The definitive and complete resource is Michael Kay’s XSLT book (originally Wrox Press, but now part of O’Reilly I think?). Granted, a paper book as a resource isn’t great, but it’s some book!
Kay went to Cambridge (Trinity) and did his PhD under Sir Maurice Wilkes. He’s no joke: one of the examples from the book is implementing the Knight’s Tour. Although this is only the chapter pre-amble, the commentary is indicative of what kind of book this is:
It’s like Dijkstra writing the definitive reference manual for CSS and one of the formatting examples being an engine for solving Towers of Hanoi.
While I have qualms about the utility of XSLT as a general purpose language — it’s fine if you embed it in an imperative language a la SQL in Python, and awful if you try and use it standalone — it also gave us XPath which is by far the best way of querying markup that I’ve ever used. (Well, until CSS got attribute selectors, so I use it less and less these days I suppose.)
(You probably know all this, but it was interesting to add
to the thread.)
> 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.
Yes, I know. I think this "HTML, the programming language" is obviously a joke, so I'm asking whether htmx is also a joke - or an attempt at trolling web devs, more precisely - just disguised better... There is a whole book on htmx, but when it comes to trolling, some people definitely would put this much effort into making their trolling attempts more bulletproof.
I'm mostly joking, though. I think htmx is not likely to be a trolling attempt, but it would be absolutely epic if it was :)
The explanation basically uses an AST that's apparent to the user to explain the language - and this is a language built on an AST whose structure is apparent to the user. I love it and will definitely be turning the idea over in my head for the next few days.
Same. I liked ColdFusion for what it was, but I also don't miss it. The spaghetti code I had to fix is what I remember most. While spaghetti code isn't a unique problem to CF, it is made so much harder to fix when you don't have a debugger and you can't right-click to find references. The horrors of endlessly nested cfloops inside cfifs with cfaborts and cflocation tucked away wherever the programmer needed it. never again!
in designing HTML, the programming language, i tried to stay as close as possible to existing semantics in HTML, the markup language, as I could, so that HTML, the markup language, developers would be comfortable with it in a minimum amount of time
most HTML, the markup langauge, developers are used to anchor tags (i.e. the <a> tag) with an href that begins with a hash "jumping" to that element. Therefore I decided to take that well known semantic and integrate it into HTML, the programming language.
there are multiple examples of loops using this (as well as the <i> "if" conditional) tag that I think show how intuitive this will be for most HTML, the markup language, developers, but of course research is ongoing in this and other matters
I guess I don't really think of HTML as "sequential" but I definitely do think of it as "composed." Meaning I don't often consider siblings elements, but I often do consider parent/child elements. Anchor tags that link to other parts of the doc are relatively rare compared to links to other docs. The only exception is stuff like schema definitions or reusable shapes in SVGs.
Common ones like JavaScript, Java, C#, etc. They all have a stack, but aren't stack oriented like Assembly or Forth. The stack in modern languages is abstracted so you don't have to worry about pushing/popping values in a specific order, and you can't explicitly reference it. C and Rust is probably the closest I get with Heap v Stack memory, but even that is not truly stack oriented.
How am I supposed to complete the LinkedIn quizz for HTML (the programming language) when the documentation states that <bdo> will result in values "anded" together >:(
Great work! I’d love to see a server-side tempting engine written in HTML, the programming language that can be used to send HTML, the markup language files to clients.
This is awesome! Can’t believe I haven’t seen it before. Reminds me of HTMX in a way. Did this project come before or after it? Can you differentiate them? I’d like to use this in a hobby project but am not sure how it differs from HTMX. They seem to overlap in some areas?
is there a point to this? While it's fun to the author, it just reinforces a talking point that no experienced engineer take seriously but kept getting parotted by some people, to the detriment of beginners who believe in them.
Hey, would you mind reviewing https://news.ycombinator.com/newsguidelines.html and sticking to those rules when posting here? You broke them with this comment for sure, and it looks like some of your other comments may be breaking them as well; I haven't read
closely enough to be sure, but they seem to be written in more of a flamewar/aggressive style than we're trying for on this site.
I'm really into this HTML web components trend. I built a similar set of primitive HTML components except the focus is to allow interfacing with data from my serverless platform.
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.