Live data from Hacker News

30 years of tags

artmann.co

41–50 of 103 posts

Re: 30 years of <br> tags

#41

Earlier quoted context omitted.

Ampersands are ASCII, but also need to be encoded to be in a parameter value.

Yeah, but you can totally choose to not allow that in your software.

That's true. Your argument about how short parameter extraction can be gets a little weaker though if only solve it for the easy cases. Code can be shorter if it solves a simplified version of the problem statement.

Re: 30 years of <br> tags

#42
post #9

> For that, you needed CGI scripts, which meant learning Perl or C. I tried learning C to write CGI scripts. It was too hard. Hundreds of lines just to grab a query parameter from a URL. The barrier to dynamic content was brutal. That's folk wisdom, but is it actually true? "Hundreds of lines just to grab a query parameter from a URL." /*@null@*/ /*@only@*/ char * get_param (const char * param) { const char * query =…

Good showcase. Your code will match the first parameter that has as a suffix, no necessarily exactly (username=blag&name=blub will return blag). It also doesn't handle any percent encoding.

[deleted]

Re: 30 years of <br> tags

#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?

Re: 30 years of <br> tags

#44

> For that, you needed CGI scripts, which meant learning Perl or C. I tried learning C to write CGI scripts. It was too hard. Hundreds of lines just to grab a query parameter from a URL. The barrier to dynamic content was brutal. That's folk wisdom, but is it actually true? "Hundreds of lines just to grab a query parameter from a URL." /*@null@*/ /*@only@*/ char * get_param (const char * param) { const char * query =…

> 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.

Re: 30 years of <br> tags

#45

Earlier quoted context omitted.

I think they meant that from a vanilla HTML standpoint

Sure, but later in the article it says that when PHP came out it solved the problem of not being able to do includes. Which again... server-side includes predate PHP. I think that this is just an error in the article any way you slice it. I assume it was just an oversight, as the author has been around long enough that he almost certainly knows about SSI.

PHP's initial release announcement mentions includes as a feature that can be used even if the server does not have SSI support: https://groups.google.com/g/comp.infosystems.www.authoring.c...

Re: 30 years of <br> tags

#46

Earlier quoted context omitted.

Most commenters seem to miss that this is the throwaway code for HN, with a maximum allocated time of five minutes. I wouldn't commit it like this. The final code did cope with percent-encoding even though the project didn't took any user generated values at all. And I did read the RFCs, which honestly most developers I meet don't care to do. I also made sure the percent-decodation function did not rely on the ASCII…

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;

Re: 30 years of <br> tags

#47
post #11

What a comprehensive, well-written article. Well done! The author traces the evolution of web technology from Notepad-edited HTML to today. My biggest difference with the author is that he is optimistic about web development, while all I see is shaky tower of workarounds upon workarounds. My take is that the web technology tower is built on the quicksand of an out-of-control web standardization process that has been…

I was also impressed and read the whole thing and got a lot of gaps filled in my history-of-the-web knowledge. And I also agree that the uncritical optimism is the weak point; the article seems put together like a just-so story about how things are bound to keep getting more and more wonderful.

But I don't agree that the system is bound to collapse. Rather, as I read the article, I got this mental image of the web of networked software+hardware as some kind of giant, evolving, self-modifying organism, and the creepy thing isn't the possibility of collapse, but that, as humans play with their individual lego bricks and exercise their limited abilities to coordinate, through this evolutionary process a very big "something" is taking shape that isn't a product of conscious human intention. It's not just about the potential for individual superhuman AIs, but about what emerges from the whole ball of mud as people work to make it more structured and interconnected.

Re: 30 years of <br> tags

#48
post #45

Earlier quoted context omitted.

Sure, but later in the article it says that when PHP came out it solved the problem of not being able to do includes. Which again... server-side includes predate PHP. I think that this is just an error in the article any way you slice it. I assume it was just an oversight, as the author has been around long enough that he almost certainly knows about SSI.

PHP's initial release announcement mentions includes as a feature that can be used even if the server does not have SSI support: https://groups.google.com/g/comp.infosystems.www.authoring.c...

Does it, other than using PHP? To me it sounds like that feature to use instead of SSI is PHP.
Post reply on HN