- State-declared marriage is an tax saving scheme, that the state does in expect for future tax payers. Not granting it to people who won't "produce" tax payers seems entirely reasonable to me.
- > I'm not implying that it's not impressive
That part was about me :-).
> I'm implying that compilers still aren't magic wands,
Agreed.
> you should still optimize the algorithms (to a reasonable degree). Just let the compiler do the microptimizations (all this register allocation golf, instruction reordering, caching, the discussed division trick, etc.).
Agreed.
- But the HTTP server needs to be configured for PHP and were are discussing the situation pre-PHP.
- > Just FYI the 's got swallowed
Ironically enough your *'s as well.
- > If I were to write as I did before, but attempt to connect the letters, it would turn into an unreadable mess.
Oh, okay. They did not tell you in which order and direction you should write letters in print? They focused on that here, but maybe that was actually part for the preparation of learning cursive.
- > Print gets taught first and you learn to write with that, then cursive comes later
That was also the case for me, but the time between that is some weeks to a few months, and you train writing (perfect) spirals in that time.
- > What if the function is implemented in a shared library
If it is in the public API/ABI of a shared library, than the calling semantics including lifetime and ownership rules are part of the public interface, so of course the compiler can't just change it. You the programmer are responsible for drawing abstraction boundaries and choosing the interface.
> It works the exact same way in C++, though.
Only if write C in C++. The issue here are references, of which the compiler figures out whether this should work like a value or like a pointer. This doesn't exist in C, there the programmer needs to make up its mind and choose. The whole type conversion by making a copy issue also doesn't exist there, because either the type matches or the compiler throws an error.
- The opposite seems to be the case. The EU fosters really competitive markets, so large companies are really hard to emerge. There are tons of small software shops in my city alone, you can walk through the city and see ads for them in front of their houses.
- Why? The actual implementation of cgiGetValue I am talking about does exactly that:
> concatenated together with a newline character
- Not sure, why you are getting downvoted, as that was pretty much the case before HTML5.
- 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.
- My memory also tells me that.
> I haven't watched the talk since I saw it
Funny statement, sounds like a tautology and still contains information.
- 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.
- Does it, other than using PHP? To me it sounds like that feature to use instead of SSI is PHP.
- 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.
If you allow for GCC extensions, it looks like this:name = cgiGetValue (cgi, "name"); if (!name) name = SOME_DEFAULT;name = cgiGetValue (cgi, "name") ?: SOME_DEFAULT; - 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.
- 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 ordering (it only relies on A-Z being continuous), because of portability (EBCDIC) and I have some professional honor.
- Thanks, good author. I also like to read him. Honestly not parsing the whole query string at once feels kind of dumb. To quote myself:
> In practice you would probably parse all parameters at once and maybe use a library.
Isn't that CURL?