A place to cache linked articles (think custom and personal wayback machine)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

преди 4 години
12345678910111213141516
  1. title: as days pass by
  2. url: https://www.kryogenix.org/days/2020/05/06/hammer-and-nails/
  3. hash_url: 73f93e0e8e7810a36d88555c2cbfa573
  4. <p>There is a Linux distribution called Gentoo, named after a type of penguin (of <em>course</em> it&#8217;s named after a penguin), where installing an app doesn&#8217;t mean that you download a working app. Instead, when you say &#8220;install this app&#8221;, it downloads the source code for that app and then compiles it on your computer. This apparently gives you the freedom to make changes to exactly how that app is built, even as it requires you to have a full set of build tools and compilers and linkers just to get a calculator. I think it&#8217;s clear that the world at large has decided that this is not the way to do things, as evidenced by how almost no other OSes take this approach &#8212; you download a compiled binary of an app and run it, no compiling involved &#8212; but it&#8217;s nice that it exists, so that the few people who really want to take this approach can choose to do&nbsp;so.</p>
  5. <p>This sort of thing gets a lot of sneering from people who think that all Linux OSes are like that, that people who run Linux think that it&#8217;s about compiling your own kernels and using the Terminal all the time. <em>Why would you want to do that sort of thing, you neckbeard,</em> is the underlying message, and I largely agree with it; to me (and most people) it seems complicated and harder work for the end user, and mostly a waste of time &#8212; the small amount of power I get from being able to tweak how a thing is built is vastly outweighed by the annoyance of <em>having</em> to build it if I want it. Now, a Gentoo user doesn&#8217;t actually have to know anything about compilation and build tools, of course; it&#8217;s all handled quietly and seamlessly by the install command, and the compilers and linkers and build tools are run for you without you needing to understand. But it&#8217;s still a bunch of things that my computer has to do that I&#8217;m just not interested in it doing, and I imagine you feel the&nbsp;same.</p>
  6. <p>So I find it disappointing that this is how half the web industry have decided to make websites these&nbsp;days.</p>
  7. <p>We don&#8217;t give people a website any more: something that already works, just <span class="caps">HTML</span> and <span class="caps">CSS</span> and JavaScript ready to show them what they want. Instead, we give them the bits from which a website is made and then have <em>them</em> compile&nbsp;it.</p>
  8. <p>Instead of an <span class="caps">HTML</span> page, you get some templates and some <span class="caps">JSON</span> data and some build tools, and then that compiler runs in your browser and assembles a website out of the component parts. That&#8217;s what a &#8220;framework&#8221; <em>does</em>… it builds the website, in real time, from separate machine-readable pieces, on the user&#8217;s computer, every time they visit the website. Just like Gentoo does when you install an app. Sure, you could make the case that the browser is always assembling a website from parts &#8212; <span class="caps">HTML</span>, <span class="caps">CSS</span>, some <span class="caps">JS</span> &#8212; but this is another step beyond that; we ship a bunch of stuff in a made-up framework and a set of build tools, the build tools assemble <span class="caps">HTML</span> and <span class="caps">CSS</span> and JavaScript, and <em>then</em> the browser still has to do its bit to build that into a website. Things that should be a long way from the user are now being done much closer to them. And why? &#8220;<a href="https://macwright.org/2020/05/10/spa-fatigue.html">We&#8217;re layering optimizations upon optimizations in order to get the <span class="caps">SPA</span>-like pattern to fit every use case</a>, and I’m not sure that it is, well, worth it.&#8221; says Tom&nbsp;MacWright.</p>
  9. <p>Old joke: someone walks into a cheap-looking hotel and asks for a room. You&#8217;ll have to make your own bed, says the receptionist. The visitor agrees, and is told: you&#8217;ll find a hammer and nails behind the&nbsp;door.</p>
  10. <blockquote class="twitter-tweet" data-conversation="none" data-theme="dark"><p lang="en" dir="ltr">What about the About page? That is just static text, surely that’s quicker? No, it is worse. (Of course, all the <span class="caps">JS</span>/<span class="caps">CSS</span> would be cached, but so to on mine, and you still don’t have to wait for <span class="caps">JS</span> to construct your <span class="caps">HTML</span> if you just give it <span class="caps">HTML</span>.) <a href="https://t.co/Rxyz322ngt">pic.twitter.com/Rxyz322ngt</a></p>&mdash; Matthew Somerville (@dracos) <a href="https://twitter.com/dracos/status/1251836599421329410?ref_src=twsrc%5Etfw">April 19, 2020</a></blockquote>
  11. <p><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> </p>
  12. <p>Almost all of us don&#8217;t want this for our native apps, and think it would be ridiculous; why have we decided that our users have to have it on their websites? Web developers: maybe stop insisting that your users compile your apps for you? Or admit that you&#8217;ll put them through an experience that you certainly don&#8217;t tolerate on your own desktops, where you expect to download an app, not to be forced to compile it every time you run it? <em>You&#8217;re</em> not neckbeards… you just demand that your users have to be. You&#8217;re neckbeard <em>creators</em>. You want to browse this website? Here&#8217;s a hammer and&nbsp;nails.</p>
  13. <p>Unless you run Gentoo already, of course! In which case… compile away. <img src="https://kryogenix.org/images/penguin.png"
  14. alt="" style="display:inline;box-shadow:none;vertical-align:text-top"></p>