News for hackers. Stuff that matters.
Re:How to Design Software Good by nayuki on Thursday November 08, 2018 @08:35PM (#18411732)
I saw a quick flash of unstyled content (in Firefox) where all the text was jammed into one paragraph with no breaks. And then the page rendered normally.

So I glanced at the source code, and it surprised me to see that it was not a typical HTML document, but instead an XML document with a stylesheet. It is very rare to see a non-HTML page on the web, whether it is the XHTML serialization of HTML, or fully custom XML.

Re:How to Design Software Good by cpeterso on Friday November 09, 2018 @03:16AM (#18413038)
Thanks for reporting this problem! I filed a Firefox bug:

https://bugzilla.mozilla.org/show_bug.cgi?id=1506038

This bug is actually a regression in Firefox 58 from the fix for a use-after-free bug (CVE-2018-5097):

https://bugzilla.mozilla.org/show_bug.cgi?id=1387427

Re:How to Design Software Good by nayuki on Friday November 09, 2018 @10:16AM (#18414972)
I thought it was intentional and not a bug - thanks for reporting! It's true that I don't see flash-of-unstyled-content on HTML and XHTML pages, unless the CSS file is delayed by many seconds. I noticed another bug though - the Firefox inspector tool doesn't show style rules for the XML document.
Re:How to Design Software Good by mafro on Thursday November 08, 2018 @09:21PM (#18411917)
Once upon a time, the whole internet was going to be built this way!
Re:How to Design Software Good by nothrabannosir on Friday November 09, 2018 @05:23AM (#18413533)
Client side XSLT has one terrific advantage : it allows splitting up a page into dynamic and static parts. This allows you to cache almost-static-but-not-really pages very efficiently. E.g. a news paper front page with a “logged in as…” section top right, but otherwise equal content. Or HN comment pages for logged in users, which currently are uncached and can cause quite heavy load on the server for heavy threads, simply by virtue of people viewing it. I remember a situation where they explicitly asked: please log out when viewing this comment page—that shouldn’t be necessary.
Re:How to Design Software Good by bjoli on Friday November 09, 2018 @03:19AM (#18413047)
I still think client side XSLT is a good thing. I write simple documents and it is automatically converted client side. The world's best static site generator.

I gives me the best of two worlds: simple markup with complete control of output and CSS styling and instant changes of all documents without a compilation step.

Re:How to Design Software Good by dionidium on Friday November 09, 2018 @10:45AM (#18415220)
XSLT got an unfair shake. Yes, XML is ugly, and verbose, and painful to write code in, but the ideas were very good. Most users never understood the processing model or the declarative/functional nature of XSLT, and so tried to write procedural code with it, with predictably nasty outcomes (hint: <xsl:if> is almost always a code smell). But those who did get it, could use it to write some pretty elegant little programs.
Re:How to Design Software Good by tonyedgecombe on Friday November 09, 2018 @03:57AM (#18413196)
I liked XSLT for XML to XML but using it for creating HTML was a nightmare.
Re:How to Design Software Good by lemming on Thursday November 08, 2018 @09:19PM (#18411909)
I agree this is very unusual. It's also somewhat annoying, for example I can't just send this to my Kindle to read it, and I can imagine other tools failing on this as well.
Re:How to Design Software Good by timClicks on Thursday November 08, 2018 @10:17PM (#18412102)
Which is more the fault of the Kindle than the authors. It's Docbook, a standard that was invented for the purpose of writing books.
Re:How to Design Software Good by chipotle_coyote on Friday November 09, 2018 @01:33AM (#18412733)
It's great to use DocBook for writing books! (Actually, I don't think this is true for most books, but you do you.) But I would argue that processors that are designed to take HTML as input are not at fault for failing to process non-HTML documents. (Many, but not all) web browsers can render and style XML like this, but I'd argue that this is -- somewhat ironically given the article's subject -- probably not the best approach to putting DocBook files on the web.
Re:How to Design Software Good by deaddodo on Friday November 09, 2018 @01:42AM (#18412771)
The only way to build a fully conformant browser is to support rendering HTML as SGML with a DTD. Toy/specialty renderers skip over that step since you can assume 99.9999% of web documents will be HTML. However, they would completely fall apart on standard SGML, styled XML, etc.
Re:How to Design Software Good by tqh on Friday November 09, 2018 @05:04AM (#18413442)
Writing good software is hard I guess :)
Re:How to Design Software Good by SyneRyder on Friday November 09, 2018 @01:33AM (#18412737)
I just tried it on Pocket, and it keeps switching me to the web version... which is a bit frustrating, since the source code / DocBook [1] XML format looks ideal for describing a Pocket article.

Seems DocBook has been around since 1999, judging from when the first O'Reilly book was published about it [2].

I just flagged it with the Pocket app's "Report An Article Display Problem" feature, but it is such a niche use case that I can't imagine them spending time on it.

[1] https://en.wikipedia.org/wiki/DocBook

[2] https://www.oreilly.com/openbook/docbook/book/docbook.html

Re:How to Design Software Good by profalseidol on Thursday November 08, 2018 @11:28PM (#18412326)
Kindle will probably take it away from you anyway.
Re:How to Design Software Good by telaport on Thursday November 08, 2018 @10:04PM (#18412060)
ya and here I am trying to save this to instapaper and wondering wtf is wrong with this guy.
Re:How to Design Software Good by cr4zy on Friday November 09, 2018 @12:04AM (#18412444)
Also cannot read with dark reader. My eyes! -.-
Re:How to Design Software Good by alexanderby on Friday November 09, 2018 @02:38PM (#18417212)
This is XML, Dark Reader works for HTML only.