Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This page, while not brutalist, is IMO much more interesting since it codes itself live:

https://www.strml.net/

Discussed here: https://news.ycombinator.com/item?id=21035313



Well, it's a good thing it codes itself now, since the author was arrested for flouting money laundering rules [1].

Kidding, of course, America has a famously low-touch approach to financial crimes.

[1] https://www.nytimes.com/2020/10/01/technology/bitmex-bitcoin...


All I'm taking away from this article is that our finance laws are outdated and draconian, failing us in cases like this.


or maybe crypto as we know is an obvious attempt to sidestep the laws on money transmitting and money laundering by adding "but on a computer" and thinking it somehow obviates all the existing laws that were enacted for perfectly good reasons, and people who choose to involve themselves in these dubious legal schemes get rightfully nailed when they step over the line.

like, just because operating a crypto exchange that doesn't follow KYC laws is convenient and nice doesn't mean that we should get rid of all the laws. It would be convenient and nice if regular banking didn't have to follow KYC too, then you could pay for murder hitmen to take out your business partner with your regular bank account instead of needing crypto at all!


I don’t think this thread is the proper venue for your (as well as ancestors’) crypto opinions.


You are one comment late. The distraction was the mildrant about existing financial regulations. Your late reply makes you sound like a crypto apologist instead of someone making a reasonable attempt at keeping the thread tight.


The quine introduces a few concepts I've not yet seen before, and I always appreciate deep-dives into the (very) sloppy and forgiving parsing that browsers do to forgive the developer's perceived mistakes. One can argue, quite convincingly, that this was a bad idea™ and should never have been done; given that we can't break web backcompat, it's here forever, to live alongside all the sloppy coercion hacks and "did you mean?"s living in PHP & JS.

It is truly surprising that:

    * { display:block; }
actually displays the whole contents of <head>. It makes no sense, but neither does most of HTML, so why not?


> It makes no sense

Why so? <head> is a conventional place for tags with document metadata semantics to live, but <head> has no semantic meaning itself. (I think the only thing one could say about how UAs treat <head> is that some scraping robots might only parse <head>, discarding <body> entirely.)

And read my words above again: tags with document metadata semantics. Not “metadata tags.” All tags are just containers for DOM nodes or text, whatever additional implications they carry for the document. HTML is "a markup language for text first, and a container format for web pages second."

IMHO, <title> especially should be styled for display more often. It works great as an effective “<h0>“ tag, rather than duplicating <title>'s text into an explicit <h1> somewhere in the <body>. That way, the document only embeds its own title in one canonical location—a title which both gets rendered on the page, and displayed in the title bar. (And if you’re worried about positioning, there’s nothing saying you can’t put your <title> in your <body>. Yes, it will do the right thing.)

Tangent: in fact, there's really no reason to have <head> and <body> in your document at all. You can just declare <html> and start spitting tags. IMHO, despite going against a long-standing trend, it's a much more practical arrangement—especially if you keep all your "outside the content" formatting to CSS, and apply that CSS using a response header (https://www.w3.org/TR/html401/present/styles.html#h-14.6). If done correctly, your "full document" HTML can look exactly like your XHR-response "patch" HTML, such that your API endpoints can themselves render as full documents when viewed separately—without changing what they return! (I really need to blog about this.)


>And if you’re worried about positioning, there’s nothing saying you can’t put your <title> in your <body>

Well, the specification says you can't.

>You can just declare <html> and start spitting tags.

Strictly speaking, <html> is not required too. This is compliant HTML:

    <!DOCTYPE html> <title>something</title> hello
But that's just notation thing, implicit element will be automatically opened/closed, all rules still apply. Thus

    <!DOCTYPE html> hello <title>something</title>
is not valid, because 'hello' implicitly opens <body>, and <title> is not allowed to be there. Of course all of these would probably work in practice, because there's no junk that browser wouldn't happily accept. Discussed quine also violates standard, because it misses doctype and places <style> tags in body.


> Well, the specification says you can't.

If every implementation of a spec allows something that the spec doesn't, does it really matter what the spec says?

I always understood the various web standards as descriptive, rather than prescriptive. They tell you what browsers will/won't accept. If all browsers accept something, it should (in RFC terminology) become a part of the standard.

> places <style> tags in body

Entirely separate note: given the semantics of the CSS cascade, shouldn't stylesheets in the body only apply to the DOM nodes succeeding them, not to DOM nodes preceding them? (I have a feeling that that complexity is why <style> isn't allowed in the body...)


I've tried visible <title> [1], it looks natural in search results

    title
    body ...
vs default

    title content
    same in h1 content. body...
Search engines claims that's error and may (I'm not sure) penalize. Have to use <meta description> to fix search results (its absence claimed as error too).

[1] http://sergeykish.com/live-pages


> * { display:block; } > > actually displays the whole contents of <head>

Yeah, it enables some whacky stuff. There's something funny about <style style="..."> actually working...

For lolz I hacked up the following piece of code where an "article" is rendered entirely from <head> (probably not the cleanest implementation, but it works, and passes the nu validator with flying colors too):

  <!DOCTYPE html>
  <html>
    <head>
      <title>.</title>
      <style>
        head {
          display: block;
          max-width: 600px;
          margin: 0.5em auto;
        }
        style.show {
          display: block;
          /* Create new stacking context. */
          position: relative;
          z-index: 0;
          white-space: pre-wrap;
          margin-bottom: -1em;
          background-color: #fff;
        }
        style.show::first-line {
          font-size: 0;
        }
      </style>
      <style class="show" style="font-weight: bold">/*
  An article rendered entirely from <head>

  */</style>
      <style class="show">/*
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam ut viverra purus. Ut enim ligula, luctus nec mi sed, molestie mattis purus. Praesent quis mauris orci. Nunc blandit eget ligula sollicitudin pretium. Duis at est porttitor, feugiat est ac, volutpat magna. Nulla varius nunc ut blandit porttitor. Vestibulum tempus eros quis massa efficitur, quis condimentum nunc condimentum.

  */</style>
      <style class="show">/*
  Duis porttitor lobortis nulla pretium aliquet. Nulla in dignissim magna, eget tincidunt odio. Interdum et malesuada fames ac ante ipsum primis in faucibus. Sed quis vestibulum ligula. Vestibulum nec nibh quis neque venenatis sodales vel et purus. Duis purus lorem, facilisis vitae dictum in, mattis eget est. Suspendisse porta ornare elit, vel dictum felis. Cras mattis erat nec sapien scelerisque faucibus. Donec quis odio porta, pretium nunc at, laoreet massa.

  */</style>
      <style class="show">/*
  Nullam bibendum ornare malesuada. Phasellus eget sollicitudin lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nulla eget diam sed erat interdum lobortis. Curabitur sed posuere magna. Donec ornare pulvinar gravida. Sed ante ipsum, laoreet vitae rhoncus in, vulputate a est. Maecenas a ligula eu leo fringilla commodo ac cursus ante.

  */</style>
      <style class="show" style="padding: 1em 0"></style>
    </head>
  </html>

Here's a fiddle: https://jsfiddle.net/zfs2rabc/


Thanks for pointing this out. This kind of stuff is why I love HTML.


And the comments are a quine relay: the top comment of that thread is a link to a simple html quine.



That's excellent!


They arrested him for having a sick website.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: