HNHacker News
TopNewBestAskShowJobs

eadmund

4,538 karma · joined February 3, 2012

submissionscomments
eadmund··on Plain Text. With Lines
> Why use a new format instead of SVG or JS+canvas?

Because those are both hellaciously complex, and implementing a usable fraction of the functionality of either is not a job for a single hobbyist programmer. At least, I don’t think they are — I could be wrong. Even if I am, the number of programmers who can write code to draw a line given a JSON description has to be orders of magnitude of orders of magnitude larger than the number who can write an XML parser, an SVG implementation, a Javascript parser and runtime or a canvas implementation.

eadmund··on Plain Text. With Lines
> {"p2":{"x":141,"y":85},"mode":"line","p1":{"x":34,"y":44}}

Embracing ordered rather than named parameters can make this so much cleaner (that’s why most folks would prefer add(1, 2) to {"function":"add", "augend": 1, "addend": 2}). It’s strange that p2 comes before p1.

    ["line",{"x":34,"y":44},{"x":141,"y":85}]
The same argument applies to points — way name their components when they will always be the same?

    ["line",[34,44],[141,85]]
If you’re willing to abandon JSON, you can make it even cleaner. There’s no real need for quotes around the mode:

    [line,[34,44],[141,85]]
And it’d be nice to have some whitespace:

    [line, [34, 44], [141, 85]]
And come to think of it, those commas don’t really add anything:

    [line [34 44] [141 85]]
Hmmm, if you switched from brackets to parentheses I bet you have a library which could handle this for you:

    (line (34 44) (141 85))
eadmund··on Why there are so many more South Asian CEOs than East Asian CEOs in the US
> it fundamentally allows capitalism to decide which cultural norm is socially valid

That’s like complaining that the 100 yard dash decides whether more or less speed is good. ‘Capitalism’ (really, the free market) is just a voting and sorting system. Cultural norms which produce more value outcompete those which produce less. That’s part of why Protestant Europe (with fewer feast days) outcompeted Catholic Europe (with many more). That’s why blue laws in the U.S. have faded out. Does that mean that days off are bad? No, it just reflects that a day spent not working is a day spent not producing.

Chasing economic value is what has created the entire modern world: science, medicine, an economy in which farmers are less than 1% of the population.

eadmund··on Life, Work, Death and the Peasant: Family Formation
I think you mean ‘what about the median?’ The mean is the average.
eadmund··on Life, Work, Death and the Peasant: Family Formation
> (largely) privatized the costs of children solely onto their parents.

The single greatest component of the property tax is the local public schools. Federal taxes pay for free lunches at those schools. Approximately half of Social Security’s budget go towards needy families. Over half of college students receive federal aid, and over a quarter receive state aid.

To privatize something implies motion from public to private. What costs of parenthood do you believe have been privatized over the last 200, 100, 50 or 25 years? I genuinely don’t believe that there’s a single one, but I sincerely know that I could be wrong.

eadmund··on From XML to JSON to CBOR
No worries! ASN.1 is a bit weird because there’s a textual version and then a bunch of serialisations.

I think that human-readable is more important than space-efficient. At some point an engineer is going to be looking at bytes in a dump or debugger, and it sure is nice to be able to quickly know what they are.

eadmund··on The HTML Hobbyist (2022)
It does if the other channels transmit so strongly that they drown out yours.
eadmund··on From XML to JSON to CBOR
> However, you're abusing a text format for human reading and pretending it's a serialization format.

They should be the same, in order to facilitate human debugging. And we were discussing ASN.1, not its serialisations. Frankly, I thought that it was fairer to compare the S-expression to ASN.1, because both are human-readable, rather than to an opaque blob like:

    MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDrEee0Ri4Juz+QfiWYui/9UGSXau/2P8LjnTD8V4Unn+2FAZVGE3kL23bzeoULYv4PeleB3gfm
Sure, that blob is far more space-efficient, but it’s also completely opaque without tooling. Think how many XPKI errors over the years have been due to folks being unable to know at a glance what certificates and keys actually say.
eadmund··on The HTML Hobbyist (2022)
> But also, I have absolutely zero right to really externalize that grievance.

I’m not so certain. It’s like if one bought a nice house in the country, and enjoyed listening to classical music and going to sleep early, and then someone a quarter mile down the road built a concert stadium, and hosted heavy metal concerts every single night.

The mere existence of a heavy metal concert a quarter mile down the road interferes with listening to classical music and turning in early. Likewise, the mere existence of the ad-laden, Javascript-laden, MegaCorp™ Internet goes a long way to preventing one from experiencing the joy of ordinary life in the late 80s or early 90s when the Net was a haven for academics, technologists and hobbyists.

eadmund··on From XML to JSON to CBOR
Would you rather write a parser for this:

    SEQUENCE {
      SEQUENCE {
        OBJECT IDENTIFIER '1 2 840 113549 1 1 1'
        NULL
        }
      BIT STRING 0 unused bits, encapsulates {
          SEQUENCE {
            INTEGER
              00 EB 11 E7 B4 46 2E 09 BB 3F 90 7E 25 98 BA 2F
              C4 F5 41 92 5D AB BF D8 FF 0B 8E 74 C3 F1 5E 14
              9E 7F B6 14 06 55 18 4D E4 2F 6D DB CD EA 14 2D
              8B F8 3D E9 5E 07 78 1F 98 98 83 24 E2 94 DC DB
              39 2F 82 89 01 45 07 8C 5C 03 79 BB 74 34 FF AC
              04 AD 15 29 E4 C0 4C BD 98 AF F4 B7 6D 3F F1 87
              2F B5 C6 D8 F8 46 47 55 ED F5 71 4E 7E 7A 2D BE
              2E 75 49 F0 BB 12 B8 57 96 F9 3D D3 8A 8F FF 97
              73
            INTEGER 65537
            }
          }
      }
or this:

    (public-key
      (rsa
        (e 65537)
        (n
         165071726774300746220448927123206364028774814791758998398858897954156302007761692873754545479643969345816518330759318956949640997453881810518810470402537189804357876129675511237354284731082047260695951082386841026898616038200651610616199959087780217655249147161066729973643243611871694748249209548180369151859)))
I know that I’d prefer the latter. Yes, we could debate whether the big integer should be a Base64-encoded binary integer or not, but regardless writing a parser for the former is significantly more work.

And let’s not even get started with DER/BER/PEM and all that insanity. Just give me text!

eadmund··on URL-Driven State in HTMX
What I would want is to GET http://example.com/item/448828 with an Accept header of ‘application/s-expression,application/json;q=0.1’ instead of retrieving the HTML representation of the resource. HTTP is the API.

I also want http://example.com/application/with/path?and=parameters and http://example.com/application to return Link headers with rel=canonical appropriately.

I’d also like world peace.

eadmund··on Copyparty – Turn almost any device into a file server
From https://github.com/9001/copyparty/blob/hovudstraum/docs/vers... (kudos for doing this, BTW!):

> seafile … and nextcloud … their license is problematic

There’s nothing problematic about the AGPL, really. It protects users. It protects developers against someone taking over their projects. The only people it bothers are those who wish to take a free software project and integrate with an unfree one. That seems like a feature to me!

eadmund··on Sign in with Google in Chrome
Firefox exists, and it’s pretty awesome. I’m typing this in Firefox now. I use Firefox on my phone.

Mozilla is from all appearances a pretty terrible organisation, but their browser is good.

eadmund··on Sign in with Google in Chrome
I absolutely hate the ‘Sign in with Google’ prompt and I am very concerned that I will either accidentally or absent-mindedly tap on it and share my email address and identity with some random untrustworthy website.

The idea of identity managed by one’s browser is a pretty decent one, but the implementation which ties it to other information such as email address and which makes it so easy to accidentally use is user-hostile.

eadmund··on .gitignore Is Inherently Sisyphean
That’s fair. They really should revert that nonsense.
eadmund··on .gitignore Is Inherently Sisyphean
> They decided to waste the default warning with a wrist-slap for using "master"

I think that one can eliminate that by adding this to /etc/gitconfig, ~/.config/git/config or ~/.gitconfig as appropriate:

    [init]
            defaultBranch = master
eadmund··on .gitignore Is Inherently Sisyphean
> Excluding things like .vscode and .DS_store

I’m old and cranky enough to want to believe that excluding contributions from VS Code and macOS users is a trivial way to reduce the maintainer’s burden and improve software quality.

That’s completely unfair, of course, and probably false too.

edit: s/maybe/probably/

eadmund··on Org tutorials
> if orgmode is so good, has it not been implemented outside of emacs

Org Mode is that good, but part of its goodness is due to being in Emacs.

Emacs is not really an editor: it’s an easily user-extensible operating environment with a remarkably shallow learning curve (seriously: one can go years just setting variables before moving up to simple functions and then starting to explore). Having all that power so easily accessible is a part of what makes Org Mode great. It’s what means that each Org Mode user can mold his experience to his needs.

eadmund··on Strict-validate-path-type does not allow period/dot/. in Exact or Prefix path
I think it’s fascinating that ingress-nginx has been broken for over a year.
eadmund··on A 1960s schools experiment that created a new alphabet
> Maybe even giving us a gender neutral pronoun?

We have one: ‘it.’ What we don’t have is a specific indistinct-gender pronoun; instead, English uses ‘he’ (and in a very limited case, ‘they’).

eadmund··on Plasma 6.4 review – A worrying trend
> Quite some emotions, also in the linked article about XLibre, from someone not emotionally invested in software.

An emotional impact from a piece of software’s failures is not the same as being emotionally invested in a piece of software.

I have not emotional investment in my NIC’s firmware: I honestly don’t care about it, I don’t think about it. But if it stops working, or starts flooding my LAN with random packets, then I will care.

Likewise, I am not personally invested in Wayland vs. X11. I am emotionally invested in the way I use my computer, in my editor, my terminal, my web browser and my window manager: as long as a Wayland implementation supports all of them without regressions, then I really don’t care if my distribution continues to support X.org.

But when no Wayland implementation supports my software stack, I care that my distribution continues to support X.org. And if folks associated with Wayland were to try to smuggle needless incompatibilities with X.org into software I use then I would be upset.

eadmund··on RFC: PHP license update
The AGPL allows that.
eadmund··on Nearly 3 out of 4 Oracle Java users say they've been audited in the past 3 years
It goes without saying that this is annoying and expensive (over $100,000 for over half the respondents and over $500,000/year for over a quarter!) for those who have been audited, even if they have done nothing wrong.

I am curious what fraction of auditees did do something wrong.

At that sort of expense, it seems like many companies could probably do better to hire a single engineer to contribute to open-source Java and prioritise their needs. Of course, the ever-present temptation would be to lay him off and freeload.

eadmund··on RFC: PHP license update
> So if you never want megacorps or anyone who runs a business to ever use your code, choose AGPL.

Plenty of businesses run AGPL software (e.g. Grafana, Mastodon or Mattermost). Fewer run AGPL software for external paying customers.

As a developer, I care about the freedom of my users; I don’t much care about the paranoia of a megacorp who wants to restrict the freedom of its customers.

eadmund··on FOKS: Federated Open Key Service
> it shows a lack of respect for and understanding of the work graphic artists actually do

No more than wearing off-the-rack clothes shows a lack of respect for and understanding of the work tailors actually do.

No more than wearing factory-woven cloth shows a lack of respect for and understanding of the work weavers actually do.

No more than heating a can of soup shows a lack of respect for and understanding of the work chefs de cuisine actually do.

In my cases as well as yours, one certainly can choose to spend extra for the luxury of the best to meet the want, but it is also fine to spend less and meet the need. In my cases as well as yours, judging someone for the value he assigns to a luxury is gauche.

eadmund··on Most RESTful APIs aren't really RESTful
> I'll never understand why the HATEOAS meme hasn't died.

> Is anyone using it? Anywhere?

As I recall ACME (the protocol used by Let’s Encrypt) is a HATEOAS protocol. If so (a cursory glance at RFC 8555 indicates that it may be), then it’s used by almost everyone who serves HTTPS.

Arguably HTTP, when used as it was intended, is itself a HATEOAS protocol.

> What kind of magical client can make use of an auto-discoverable API? And why does this client have no prior knowledge of the server they are talking to?

LLMs seem to do well at this.

And remember that ‘auto-discovery’ means different things. A link typed next enables auto-discovery of the next resource (whatever that means); it assumes some pre-existing knowledge in the client of what ‘next’ actually means.

eadmund··on Most RESTful APIs aren't really RESTful
> This is more like people arguing over "proper" English, the point of language is to communicate ideas.

ur s0 rait, eye d0nt nnno wy ne1 b0dderz tu b3 "proppr"!!!!1!!

</sarcasm>

You are correct that communication is the point. Words do communicate a message. So too does disrespect for propriety: it communicates the message that the person who is ignorant or disrespectful of proper language is either uneducated or immature, and that in turn implies that such a person’s statements and opinions should be discounted if not ignored entirely.

Words and terms mean things. The term ‘REST’ was coined to mean something. I contend that the thing ‘REST’ originally denoted is a valuable thing to discuss, and a valuable thing to employ (I could be wrong, but how easy will it be for us to debate that if we can’t even agree on a term for the thing?).

It’s similar to the ironic use of the word ‘literally.’ The word has a useful meaning, there is already the word ‘figuratively’ which can be used to mean ‘not literally’ and a good replacement for the proper meaning of ‘literally’ doesn’t spring to mind: misusing it just decreases clarity and hinders communication.

> If my API is supposed to rely on content-type, how many different representations do I need? JSON is a given anymore, and maybe XML, but why not plain text, why not PDF?

Whether something is JSON or XML is independent of the representation — they are serialisations (or encodings) of a representation. E.g. {"type": "foo","id":1}, <foo id="1"/>, <foo><id>1</id></foo> and (foo (id 1)) all encode the same representation.

eadmund··on Most RESTful APIs aren't really RESTful
> Our APSi includes HATEAOS links and I have never, not once, witnessed their actual use (but they do double the size of response payloads).

So your payloads look like this:

    {
        "id": 1,
        "href": "http://someplace.invalid/things/1",
        "next-id": 3,
        "next-href": "http://someplace.invalid/things/3",
    }
And rather than just using next-href your clients append next-id to a hardcoded things base URL? That seems like way more work than doing it the REST way.
eadmund··on Most RESTful APIs aren't really RESTful
Sure, you’re right: pragmatics, in practice, are more important than theory.

But you’re assuming that there is a real contradiction between shipping features and RESTful design. I believe that RESTful design can in many cases actually increase feature delivery speed through its decoupling of clients and servers and more deeply due to its operational model.

eadmund··on Firefox is fine. The people running it are not
Why would anyone want to install another browser to use as a developer?

What the computing world needs is less separation of users and developers. Developers use programs all day, every day. And users should be able to write programs any time they wish. One of the most commonly used pieces of software in the world is a programming system: Excel.

One of my problems with iOS is the implicit assumption that users will not and should not extend the systems they use.

← PreviousPage 4 of 34Next →