Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
goto11
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
84 ms
·
901.
▲
by
goto11
5y ago
I think it is more helpful to explain why thinks work the way they do.
902.
▲
by
goto11
5y ago
Looks great! Small pet peeve regarding tutorials: When learning a new technology I don't care about the headaches people had 20 years ago. My first concern is how I use the technology and what it can do for me. The section about layout
903.
▲
by
goto11
5y ago
> with a tiny country like that government is always there, always responsive, always able to answer the phone and take care of your problem. I doubt it. A government of a small country does not necessarily have more resources per citize
904.
▲
by
goto11
5y ago
So if you want to try out a potential new member of a band, the correct approach is to grill them on the circle of fifth.
905.
▲
by
goto11
5y ago
Orthogonal to what?
906.
▲
by
goto11
5y ago
They solve a simpler and more constrained problem which makes it easier to make tools. Something like Windows Forms are basically WYSIWYG - you drop some controls on a canvas and now you have a GUI. But the GUI will not gracefully adapt to
907.
▲
by
goto11
5y ago
Is that fair? Since we have no pre-Christian sources to compare to, it is hard to say how fairly Snorri represent the tradition. (Obviously the bit where he explains the Norse gods as descendants of princes of Troy is of dubious authenticit
908.
▲
by
goto11
5y ago
The article literally quotes Dijkstra for saying: > The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids c
909.
▲
by
goto11
5y ago
Yes lets rewrite everything Ruby on Rails and CoffeScript, it is just so much more productive and creative! At least this was the opinion on HN a few years ago. Now of course other tools and languages are fashionable. And nothing against Ru
910.
▲
by
goto11
5y ago
Lots of programming wars is just tribalism. Java is disliked on HN because it represent "enterprise" - big long-lived organizations which maintain a codebase for decades and therefore conservative. A different tribe than the start
911.
▲
by
goto11
5y ago
Here he is talking about humility in the act of writing code, by recognizing the limits of the minds capacity and therefore keeping the code simple to understand rather than clever. He wasn't particularly humble in his writings.
912.
▲
by
goto11
5y ago
StackOverflow has its share of problems, including overzealous moderation. I do civic duty by often voting for reopen and moderating the reopen queue. That said, removing moderation is not the solution. If you look at the unmoderated new qu
913.
▲
by
goto11
5y ago
Yeah the trailing slash in <br /> is legal in HTML, but it doesn't actually make the tag self-closing. For example <b /> is still an opening tag which require a </b>.
914.
▲
by
goto11
5y ago
OK but these are two separate question. Of course you should use an existing library if it solves the exact problem you have. Don't waste time re-implementing the wheel unless you are doing if for educational purposes. Whether such a l
915.
▲
by
goto11
5y ago
If I understand the HTML spec correctly, these two examples are not valid HTML. The script element content model has the constraint that if the substring "<!--" occurs inside the content, a corresponding "-->" must
916.
▲
by
goto11
5y ago
> completely steamrolled by Microsoft OLE 2. But did OLE 2 succeed? I know this is the technology which allows you to embed a Word document in an Excel sheet in a PowerPoint presentation, but does this actually work across applications
917.
▲
by
goto11
5y ago
The content model of the script element is gnarly for historical reasons, but it does not depend on the syntax of the scripting language used: https://html.spec.whatwg.org/multipage/scripting.html#restri...
918.
▲
by
goto11
5y ago
It is worth noting that back then songwriter and performer were basically separate jobs, and it was very common for multiple artists to record the same song, sometimes even at the same time and competing on the charts. Hound Dog is written
919.
▲
by
goto11
5y ago
But the question is specifically about that edge case! So how to handle it, if the "robust battle-tested parser" is of no help?
920.
▲
by
goto11
5y ago
It seems like a solution in search of a problem? How often do you need to embed a spreadsheet in word-processing document? Furthermore, making components from multiple independent vendors interact seamlessly is just an incredibly complex
921.
▲
by
goto11
5y ago
Correct me if I'm wrong, but I believe HTML tags can still be lexed with a regular expression. The syntax of the script element is cryptic, but it does not contain any recursive productions, so it should still be possible to lex correc
922.
▲
by
goto11
5y ago
> This conversation would be a lot clearer with a distinction between "regexes" and "regular languages". This is often an important distinction, but the point of the article is that the Stackoverflow question does not
923.
▲
by
goto11
5y ago
Are you arguing that the effort required to make a regex robust and correct is larger than the effort required to make some hand-rolled character-by-character based lexer robust and correct? Because that sounds counter-intuitive to me. A
924.
▲
by
goto11
5y ago
As far as I can tell, a SAX parser does not expose the distinction between an opening tag and a self-closing tag. The tag `<foo />` would just emit a startElement event followed by an endElement, exactly the same as `<foo>&
925.
▲
by
goto11
5y ago
Shouldn't we forget all of history then? Which ruler have not caused suffering or death for somebody?
926.
▲
by
goto11
5y ago
Regular expressions can be as robust as you need them to be, just like any other kind of code. They are a DSL to create lexers, and they are exactly as robust (or hacky) as if you wrote the same lexer by hand.
927.
▲
by
goto11
5y ago
The point is that a parser could very well use regexes under the hood to perform the tokenization. Because it is the right tool for the job. A language without regex-support might use something like lex to compile a lexer. Of course you
928.
▲
by
goto11
5y ago
What I like about regexes is they are typically both the most readable and the best performing solution to the kind of problems they are suited for. Just don't use them for validating email addresses or determining if a number is a p
929.
▲
by
goto11
5y ago
Handling invalid syntax is another can of worms! It would make all parts of the tokenizer much more complex, not just comments. In the case of XHTML, a parser is supposed to reject any document which is not well formed. HTML parsers typical
930.
▲
by
goto11
5y ago
The problem is the answers saying "this is not possible". The OP asks a perfectly reasonable question. The answers assume the OP actually meant to ask a different question, and they they ridicule the OP for this imagined questio
More ›