Live data from Hacker News

30 years of tags

artmann.co

51–60 of 103 posts

Re: 30 years of <br> tags

#51
post #44

Earlier quoted context omitted.

> HTML represents a tree and string interpolation is the wrong tool to generate a tree description. Yet 30 years later it feels like string interpolation is the most common tool. It probably isn't, but still surprisingly common.

The thing is, the browser needs the tree, but the server doesn't really need the whole tree. Building the tree on the server is usually wasted work. Not a lot of tree oriented output as you make it libraries.

My point is that treating it as the tree it is, is the only way to really make it impossible to produce invalid HTML. You could also actually validate not just syntax, but also semantic.

> Not a lot of tree oriented output as you make it libraries.

That was actually the point of my library, although I must admit, I haven't implemented actually streaming the HTML output out, before having composed the whole tree. It isn't actually that complicated, what I would need to implement would be to make part of the tree immutable, so that the HTML for it can already be generated.

Re: 30 years of <br> tags

#52

Earlier quoted context omitted.

I think they meant that from a vanilla HTML standpoint

If they insist on only using vanilla HTML then the problem is unsolved to this day. I think it is actually less solved now, since back then HTML was an SGML application, so you could supply another DTD and have macro-expansion on the client.

Object tag can do it. iframe also with limitations.

Re: 30 years of <br> tags

#53
post #43

> At one company I worked at, we had a system where each deploy got its own folder, and we'd update a symlink to point to the active one. It worked, but it was all manual, all custom, and all fragile. The first time I saw this I thought it was one of the most elegant solutions I'd ever seen working in technology. Safe to deploy the files, atomic switch over per machine, and trivial to rollback. It may have been manua…

It’s been a while (a decade?!) but if I recall correctly Capistrano did this for rails deployments too, didn’t it?

I am now feeling old for using Capistrano even today. I think there might be “cooler and newer” ways to deploy, but i never ever felt the need to learn what those ways are since Capistrano gets the job done.

Re: 30 years of <br> tags

#54

Earlier quoted context omitted.

If they insist on only using vanilla HTML then the problem is unsolved to this day. I think it is actually less solved now, since back then HTML was an SGML application, so you could supply another DTD and have macro-expansion on the client.

Object tag can do it. iframe also with limitations.

Does it really? I think, this makes you have a wrapper and I am not sure if you can get rid of all issues with "display: contents". Also you are already in the body, so you can't change the head, which makes it useless for the most idiomatic usecase for that feature.

Re: 30 years of <br> tags

#55

> Every page on your site needed the same header, the same navigation, the same footer. But there was no way to share these elements. No includes, no components. That's not completely true. Webservers have Server Side Includes (SSI) [0]. Also if you don't want to rely on that, 'cat header body > file' isn't really that hard. [0] https://web.archive.org/web/19970303194503/http://hoohoo.ncs...

HTML was invented as an SGML vocabulary, and SGML and thus also XML has entities/text macros you can use to reference shared documents or fragments such as shared headers, footers, and site nav, among other things.

Not sure, why you are getting downvoted, as that was pretty much the case before HTML5.

Re: 30 years of <br> tags

#57

Earlier quoted context omitted.

I get that, but your initial comment implied you were about to showcase a counter to "Hundreds of lines just to grab a query parameter from a URL", but instead you showed "Poorly and incompletely parsing a single parameter can be done in less than 100 lines". You said you allocated 5 minutes max to this snippet, well in php this would be 5 seconds and 1 line. And it would be a proper solution. $name = $_GET['name'] ?…

And in the code in C it looks like this, which is also a proper solution, I did not measure the time, it took me to write that. name = cgiGetValue (cgi, "name"); if (!name) name = SOME_DEFAULT; If you allow for GCC extensions, it looks like this: name = cgiGetValue (cgi, "name") ?: SOME_DEFAULT;

That would fail on a user supplying a multiple where you don't expect.

> If multiple fields are used (i.e. a variable that may contain several values) the value returned contains all these values concatenated together with a newline character as separator.

Re: 30 years of <br> tags

#58
post #43

> At one company I worked at, we had a system where each deploy got its own folder, and we'd update a symlink to point to the active one. It worked, but it was all manual, all custom, and all fragile. The first time I saw this I thought it was one of the most elegant solutions I'd ever seen working in technology. Safe to deploy the files, atomic switch over per machine, and trivial to rollback. It may have been manua…

It’s been a while (a decade?!) but if I recall correctly Capistrano did this for rails deployments too, didn’t it?

Not just rails. Capistrano is tech stack agnostic. It's possible to deploy a project with nodejs using Capistrano.

And yes, it's truly elegant.

Rollbacks become trivial should you need it.

Re: 30 years of <br> tags

#60

Earlier quoted context omitted.

The article mentions that in the very next sentence > You either copied and pasted your header into every single HTML file (and god help you if you needed to change it), or you used to embed shared elements. Neither option was great.

I’m talking about the frameset and frame tags, not iframes.

Ah, okay, you’re right, it’s been a long while since I used those tags…
Post reply on HN