News for hackers. Stuff that matters.
Re:Deurbanising the Web [pdf] by hyperpape on Monday July 19, 2021 @09:34AM (#27882482)
Saying HTML can be offlineable is like saying C can be provably terminating. There's a subset of programs where that's true, but it's not inherent to the form. A PDF is inherently self-contained, standard web technologies are not. When you open the page and it's a PDF, it gives you certain guarantees, when you open it and it's HTML, you have to have to do further investigation.
Re:Deurbanising the Web [pdf] by lucideer on Monday July 19, 2021 @10:41AM (#27883161)
Firstly, C being provably terminating is a problem dealing with the full body of C programs written in the world. The OP is dealing with their own self-published content. That's a different problem: if your analogy held it would need to be limited to proving that a subset of C programs written by the author terminate.

Secondly, the level of difficulty in making HTML offlineable is many orders of magnitude simpler than your C analogy: there's really no comparison. For the OP we only need to make HTML documents that they have authored themselves offlineable and yet people have written general purpose tools to do this automatically for most webpages. This is not a hard problem.

TL;DR your analogy is absurd.

Re:Deurbanising the Web [pdf] by hyperpape on Monday July 19, 2021 @10:55AM (#27883320)
This is a helpful post because it gets to the heart of the difference. Many people are saying "if you do HTML in a particular way, you get the same benefits." I'm asking "what's inherent to the form?" That's exactly the point about C--you can write it in a way that's provably terminated, but it's not guaranteed. Consider the consumer's perspective.

When I land on a page that's a PDF, I know certain things--I can easily save it and read it later. How do I know that? Not because I have read the PDF spec, or know that much about it, but because of my experience as a consumer of the web.

When I land on an arbitrary web-page, do I know the same thing? No. I don't know what the page is doing, I don't know what my browser will do when I try to save the page. When I save this page, I have the option to save HTML only, or a complete web page. Will the complete page actually work? I go into the source, and there's a link to the javascript (which is saved locally). Does rendering the page rely on that javascript? Does that javascript do xhr or fetch calls? Since it's Hacker News, I suspect the answer is no. However that's not inherent to the medium.

There are better ways to archive the content of even dynamic JS heavy pages, but they are not things that you learn as an average user of the web.

Re:Deurbanising the Web [pdf] by apotheon on Monday July 19, 2021 @02:51PM (#27886029)
It's possible to write PDFs that don't "work" (for some useful definition of "work" similar to the case with HTML) offline. Please stop pretending that's not true.

The reason offline utility tends to be true more often for PDFs is that PDFs are not generally regarded as the preferred online-default format of choice, which is in turn a matter of social effects rather than technical capacity. Reverse the socially accepted roles of the two document formats and watch the same complaints get made against PDFs as you're making against HTML. I'd bet money the "normal" state of affairs would remain the same in terms of the perceived benefit/detriment allocation between online/offline formats; only which format was considered which would have changed.

. . . but then all the web would be even heavier documents, and even less customizable for local viewing, thanks in part to that pagination and strict formatting situation.

Re:Deurbanising the Web [pdf] by anigbrowl on Monday July 19, 2021 @05:37PM (#27887536)
It's possible, but it takes work. I can't remember the last time a pdf did something unreadably weird, usually my only gripe is with something that's a scan of an old document but whoever turned it into PDF didn't do OCR.
Re:Deurbanising the Web [pdf] by lucideer on Monday July 19, 2021 @11:18AM (#27883587)
I don't really follow. How does this author converting their entire site to PDF help readers/visitors/users?

The original HTML site[0] was printable as PDF, and save-able as both HTML and "Web page, complete", all of which result in a well-formatted & readable offline experience. (It was also responsive: very readable on mobile, but that's an aside).

The new PDF site is not accessible to some, difficult to read on mobile, and interacts poorly with all of the norms web users are accustomed to (back navigation, anchors, etc.)

[0] https://web.archive.org/web/20130127175816/http://www.lab6.c...

Re:Deurbanising the Web [pdf] by hyperpape on Monday July 19, 2021 @12:33PM (#27884516)
It's the difference between "this thing has X property" (termination or able to save for offline reading) and "this thing _obviously_ has X property, in a way that you can tell without any expertise, or doing any investigation".

How important this is to users, or whether it is worth it is something I've not commented on, but it is a difference.

Re:Deurbanising the Web [pdf] by ksec on Wednesday July 21, 2021 @06:32PM (#27913017)
Yes. The sort of discussion happening every day between a product manager and engineers.
Re:Deurbanising the Web [pdf] by chalst on Monday July 19, 2021 @12:02PM (#27884104)
hyperpage's analogy would work if the property was "avoids undefined behaviour", rather than "avoids nontermination". When we encounter a webpage, we are being expected to execute potentially complex, well-being threatening code whose behaviour is about as easy to predict as obfuscated C.
Re:Deurbanising the Web [pdf] by lucideer on Monday July 19, 2021 @01:43PM (#27885286)
True but again only if we're talking about parsing the web. This is about HTML files the author is producing themselves.
Re:Deurbanising the Web [pdf] by apotheon on Monday July 19, 2021 @02:53PM (#27886051)
PDFs are capable of the same issues.
Re:Deurbanising the Web [pdf] by JadeNB on Monday July 19, 2021 @12:37PM (#27884560)
> When you open the page and it's a PDF, it gives you certain guarantees ….

I think that this is a lot less true than we're used to thinking. The PDF spec contains a lot more interactive capabilities than I think most people realise. (It supports JavaScript!) We're not used to seeing those capabilities abused, because there's no point; it is so much easier to abuse HTML. But, if people want to abuse PDF—and, if we somehow convinced the world to move to it, then they would—then they easily can.

(I'm not conversant enough in the spec to know, but I do know that Postscript is Turing complete, and I don't know that PDF isn't. At least HTML on its own certainly isn't—no recursion!—although all bets go out the window once you start layering other tech on top of it.)

Re:Deurbanising the Web [pdf] by monkeynotes on Monday July 19, 2021 @09:41AM (#27882543)
I don't buy that the problem with the web is that HTML is not inherently offlineable. HTML may not be inherently offlineable but it can be. PDF isn't inherently a web friendly format, but it can be. There really isn't any good argument for PDFing the web.
Re:Deurbanising the Web [pdf] by pajko on Monday July 19, 2021 @10:14AM (#27882849)
Print the page to PDF.
Re:Deurbanising the Web [pdf] by tablespoon on Monday July 19, 2021 @10:31AM (#27883028)
> Print the page to PDF.

Even that usually sucks nowadays, because web developers don't care anymore. Probably 75% of the time before I do that, I have to go into the dev console to delete overlay elements that obscure content and garbage that will waste 10 pages (e.g. grossly oversized images, related article recommendations, etc.).

There was a time when most websites had a print view that gave you a simplified html page that worked well, but I think most of those are gone now. Now it's all some print "media-type" CSS that no one ever put the time in to do properly or keep up to date.

Re:Deurbanising the Web [pdf] by stjohnswarts on Monday July 19, 2021 @06:26PM (#27888007)
I agree, I don't see why anyone can call publishing in PDF is "dumb". The author of the material gets to choose his medium. If "you" don't like it then move along or convert it to your preferred format. In other words "why not both?"
Re:Deurbanising the Web [pdf] by hypertele-Xii on Tuesday July 20, 2021 @05:54AM (#27891788)
I bet HTML to PDF is a lot easier conversion than PDF to HTML.

Formats matter.

Re:Deurbanising the Web [pdf] by EugeneOZ on Monday July 19, 2021 @09:58AM (#27882712)
> A PDF is inherently self-contained, standard web technologies are not

What technologies exactly? You can have absolutely everything you need inside the HTML. You can inline css, js, svg and images. What technologies you can’t inline?

Re:Deurbanising the Web [pdf] by aenigma on Monday July 19, 2021 @10:42AM (#27883166)
you are correct that you CAN - but who does. That's no longer considered best practice. The arugment these days is that it's a lot easier to manage css if it's in a separate file, same with js, etc. So none of the serious web developers actually do anything inline anymore. The time it would take to convert a "best practice" website with separate files for html, css, js, etc. is just not worth it. The point he's making is still valid - why not have the option for something static.
Re:Deurbanising the Web [pdf] by EugeneOZ on Monday July 19, 2021 @10:51AM (#27883272)
But with the same (and even much bigger) success you can declare “I’m switching to self-contained HTML! No more external resources!” instead of “I’m switching to PDF, saying farewell to interactivity and mobile devices”.

It's just the declaration of ONE person, switching ONE site.

Re:Deurbanising the Web [pdf] by apotheon on Monday July 19, 2021 @02:56PM (#27886096)
> why not have the option for something static

You have the same option with either HTML or PDF:

- PDF files can be dynamic or static, depending on how you write them.

- HTML files can be dynamic or static, depending on how you write them.