Readit News logoReadit News
hackrmn commented on Everything I know about good API design   seangoedecke.com/good-api... · Posted by u/ahamez
dwattttt · 2 days ago
The reminder to "never break userspace" is good, but people never bring up the other half of that statement: "we can and will break kernel APIs without warning".

It illustrates that the reminder isn't "never change an API in a way that breaks someone", it's the more nuanced "declare what's stable, and never break those".

hackrmn · 8 hours ago
In software engineering the statement "interfaces, not implementations" has been used for a long time (certainly at least Robert "Uncle Bob" C. Martin started teaching), which is a generalization on the "we don't break userspace". In essence it cooks down to declaring an interface without announcing or depending on the implementation. With OOP languages like C++, a code base would aggressively use interfaces as types, never concrete class types (which implement the interface), so that it can make it easier to reason about how and whether the program behaves when one implementation of an interface is swapped for another.

With Linux, which is a C codebase by and large, they load and pass pointers to structures to kernel procedures which can do as they please -- as long as the documentation on said structures (which usually says which fields and how are retained with which values and so on) remains unchanged. That's their "object oriented programming" (yeah, I know Linus would likely have hated the comparison).

hackrmn commented on Everything I know about good API design   seangoedecke.com/good-api... · Posted by u/ahamez
hackrmn · 9 hours ago
I've always been a staunch opponent of using `/v1/` kind of element in the URL. I understand its function and the convenience it allows for "versioning", but I grew up with HTTP and I always liked how it insisted the URL is well, the _location_ of the _resource_, and `/v1/` just muddies things up being in the URL -- it's obviously not a version of the resource that `/v1/` would be indicating, but of the API implementation, which is the first telltale sign that it's an architectural "blunder", and these compound in my experience, always and invariably given enough time.

If the consumer wants to consume a specific version of the API, the means to do so can be implemented with an alternative domain name, or -- even better (who wants to maintain alternative domain names) -- with a request _header_, e.g. `X-API-Version: v1` (or another one, perhaps a standardised one).

In any case, the `/v1/` thing is something of cargo cult programming -- I remember someone proposed it a good while ago, and it's been adopted since without much afterthought, it seems. It doesn't make sense to debate pros and cons of REST/HATEOAS if your resource identifier scheme is poorly designed, IMO.

hackrmn commented on Ban me at the IP level if you don't like me   boston.conman.org/2025/08... · Posted by u/classichasclass
hackrmn · a day ago
I know opinions are divided on what I am about to mention, but what about CAPTCHA to filter bots? Yes, I am well aware we're a decade past a lot of CAPTCHA being broken by _algorithms_, but I believe it is still a relatively useful general solution, technically -- question is, would we want to filter non-humans, effectively? I am myself on the fence about this, big fan of what HTTP allows us to do, and I mean specifically computer-to-computer (automation/bots/etc) HTTP clients. But with the geopolitical landscape of today, where Internet has become a tug of war (sometimes literally), maybe Butlerian Jihad was onto something? China and Russia are blatantly and near-openly shoving their fingers in every hole they can find, and if this is normalized so will Europe and U.S., for countermeasure (at least one could imagine it being the case). One could also allow bots -- clients unable to solve CAPTCHA -- access to very simplified, distilled and _reduced_ content, to give them the minimal goodwill to "index" and "crawl" for ostensibly "good" purposes.
hackrmn commented on Libre – An anonymous social experiment without likes, followers, or ads   libreantisocial.com... · Posted by u/rododecba
colesantiago · 2 days ago
> What Google tracking is there in, for instance, vanilla MacOS?

Mail > Google

Internet Accounts > Google

As I said:

> Absolutely zero Google tracking here and an esoteric OS has zero Google tracking. Not in source code not in network requests, zero.

Even with the mere integration of Google this deep into the OS is enough for those respect their privacy to not want to use MacOS.

hackrmn · a day ago
This isn't accurate. I mean in generally you're pointing in the right direction. Your vague statements on "esoteric OS" are not helpful, and in fact I think that it is maybe _you_ who don't know your computer as well as the person you were replying to, do -- after all they bring up relevant and actual details while you point at generalities like "Mail > Google".

Let me try to steer this in a constructive direction -- you're implying use of "GMail" with your "Mail > Google". That is fine -- it's certainly possible to set up a Google account with Mac OS X through the "Accounts" feature, implying SSO and/or reusable credentials API.

But that does not come as default with the OS, and it requires active user participation, which makes your argument a bit of shifting the goal posts indeed -- Mac OS X does not send any data to Google by default, not out of the box. You do not need an "esoteric OS", and such an OS set up with something like described above for Mac OS X, or to demonstrate the simplicity of your argument, a Google Chrome binary blob (e.g. Ubuntu) makes the OS much less "esoteric" since it's now too a "Google vehicle". Point being that Mac OS is not a Google vehicle by default. Neither is Windows, for that matter. And this for a very simple reason -- normally both Apple and Microsoft are _competitors_ to Google, and they would very much prefer the data they would have been able to collect on the user, is sent upstream to Apple and Microsoft respectively, not to their competitor. But that is tangential, again -- the primary point is that by default Internet is not Google, not with e.g. Firefox on Windows.

Let me be perfectly clear -- there's zero tracking by Google unless you use one or multiple of a) a Google provided Web browser, e.g. Chrome, and b) use Google's Web services. By using e.g. Firefox (which is indeed funded by Google) your data are _not_ sent to Google by default, and a Web extension like uMatrix also nips attempts by sites to send data to Google, in the bud. None of this is an esoteric OS.

I have nothing against warning us against Google monopoly, but I find your follow-up replies to be deflections and doubling down when the person is making it perfectly clear that their network does not contain data being sent to Google (in as far as they can trust their packet logs, I would say, but if you were to contest that, you'd need to try harder indeed).

hackrmn commented on What are OKLCH colors?   jakub.kr/components/oklch... · Posted by u/tontonius
vanderZwan · a day ago
Aside from a few criticisms that others have already raised I think this is quite a nice introduction to OKLCH and how to use them in CSS.

With that out of the way, I'd like to go on a tangent here: can anyone explain the modern trend of not including publishing dates in blog articles? It stood out to me here in particular because the opening sentence said that "OKLCH is a newer color model" and the "newer" part of that sentence will get dated quicker than you think. The main site does mention a date, but limits it to "August 2025" so this seems like a conscious choice and I just don't get it.

[0] https://jakub.kr/

hackrmn · a day ago
> can anyone explain the modern trend of not including publishing dates in blog articles?

In such cases, I usually try to see if the `Last-Modified` header served with the HTML document over HTTP, can be useful, but I conclude that often the same people who don't bother with dating their content -- you'd think they'd understand where the word _blog_ comes from, as in "[web]-log" where timestamps are paramount -- these same people don't know or care how HTTP works. Hint: the `Last-Modified` is the last modification time of the _resource_, in this case the actual HTML document. Just because your "backend" re-rendered the content because you didn't bother with setting up your server caching correctly, doesn't mean you should pretend it's a brand new content every day (which https://jakub.kr/components/oklch-colors does, unfortunately, so you won't know the timestamp from HTTP).

hackrmn commented on Libre – An anonymous social experiment without likes, followers, or ads   libreantisocial.com... · Posted by u/rododecba
hackrmn · 2 days ago
Well, it only took about 15 hours for the site to be discovered by the Internet Troll Federation and be absolutely stuffed with slurs and hate memes.

Which was to be expected, frankly.

Not sure at which point the site allowed HTML, but for the first couple of hours or so there was only text for thoughts there, then the "hypermedia" of the kind described above, appeared, rendering the site useless. Just wait until someone discovers even better means to weaponize the HTML post feature -- there's bound to be galore of client-side vulnerabilities, I expect, if only due to Unicode possibilities...

hackrmn commented on The Death of the User Interface   gist.github.com/0xs34n/a5... · Posted by u/seanseany
hackrmn · 3 days ago
While an alluring title, and commendable argument, I do not necessarily think this is about computer or user interfaces. Ok, so I, instead of navigating Finder, or Windows Explorer, or something analogous where I have an idea in my head of where my _files_ (a tangible, while "transferred" concept) are, ask an AI agent "list files I was working on last week". This does not imply a computing problem unless by "computing" you mean I am unable to organize myself and my head does not compute -- I either know where my files are, or I don't. An AI complements my memory here, this isn't a UI problem, it's just me getting lazier or more complacent, like someone with "functioning depression" who gets by at the cost of living in a "functioning mess". I am not sure I would want to hold myself to such a standard. If this was only about efficiency -- sure, let the AI complement myself, but this starts to look like explaining sheer lack of organizaiton and calling it "the end of tooling" (because I can't or won't use the tooling anyway, too much hassle). Meaning that us advancing into a WALL-E (or "Idiocracy") age where we just voice commands to AIs while we literally lie on a bed -- is that a good thing?

Let me try to clarify and simplify my rambling: I would like AI to help me, I do, but I should know where my project files are, should I not? If our memory isn't needed, I am sure evolution will shrink it. Then we put an "AI" in our brain to remember for us, and the circle is complete?

hackrmn commented on How to Think About GPUs   jax-ml.github.io/scaling-... · Posted by u/alphabetting
jacobaustin123 · 6 days ago
Shamelessly responding as the author. I (mostly) agree with you here.

> please be surgically precise with your terms

There's always a tension between precision in every explanation and the "moral" truth. I can say "a SIMD (Single Instruction Multiple Data) vector unit like the TPU VPU with 32 ALUs (SIMD lanes) which NVIDIA calls CUDA Cores", which starts to get unwieldy and even then leaves terms like vector units undefined. I try to use footnotes liberally, but you have to believe the reader will click on them. Sidenotes are great, but hard to make work in HTML.

For terms like MXU, I was intending this to be a continuation of the previous several chapters which do define the term, but I agree it's maybe not reasonable to assume people will read each chapter.

There are other imprecisions here, like the term "Warp Scheduler" is itself overloaded to mean the scheduler, dispatch unit, and SIMD ALUs, which is kind of wrong but also morally true, since NVIDIA doesn't have a name for the combined unit. :shrug:

I agree with your points and will try to improve this more. It's just a hard set of compromises.

hackrmn · 6 days ago
I appreciate your response. I made a point of not revising my comment after posting it and finding in a subsequent parable the following, quoting:

> Each SM is broken up into 4 identical quadrants, which NVIDIA calls SM subpartitions, each containing a Tensor Core, 16k 32-bit registers, and a SIMD/SIMT vector arithmetic unit called a Warp Scheduler, whose lanes (ALUs) NVIDIA calls CUDA Cores.

And right after:

> CUDA Cores: each subpartition contains a set of ALUs called CUDA Cores that do SIMD/SIMT vector arithmetic.

So, to your defense and my shame -- you *did* do better than I was able to infer from first glance. And I can take absolutely no issue with a piece elaborating on originally "vague" sentence later on -- we need to read top to bottom, after all.

Much of the difficulty with laying out knowledge in written word is inherent constraints like choosing between deferring detail to "further down" at the expense of giving the "bird's eye view". I mean there is a reason writing is hard, technical writing perhaps more so, in a way. You're doing much better than a lot of other stuff I've had to learn with, so I can only thank you to have done as much as you already have.

To be more constructive still, I agree the border between clarity and utility isn't always clearly drawn. But I think you can think of it as a service to your readers -- go with precision I say -- if you really presuppose the reader should know SIMD, chances are they are able to grok a new definition like "SIMD lane" if you define it _once_ and _well_. You don't need to be "unwieldy" in repetition -- the first time may be hard but you only need to do it once.

I am rambling. I do believe there are worse and better ways to impart knowledge of the kind in writing, but I too obviously don't have the answers, so my criticism was in part inconstructive, just a sheer outcry of mild frustration once I started conflating things from the get go but before I decided to give it a more thorough read.

One last thing though: I always like when a follow-up article starts with a preamble along of "In the previous part of the series..." so new visitors can simultaneously become aware there's prior knowledge that may be assumed, _and_ navigate their way to desired point in the series, all the way to the start perhaps. That frees you from e.g. wanting to annotate abbreviations in every part, if you want to avoid doing that.

hackrmn commented on How to Think About GPUs   jax-ml.github.io/scaling-... · Posted by u/alphabetting
gregorygoc · 6 days ago
It’s mind boggling why this resource has not been provided by NVIDIA yet. It reached the point that 3rd parties reverse engineer and summarize NV hardware to a point it becomes an actually useful mental model.

What are the actual incentives at NVIDIA? If it’s all about marketing they’re doing great, but I have some doubts about engineering culture.

hackrmn · 6 days ago
Plenty of circumstantial evidence pointing to the fact NVIDIA prefers to hand out semi-tailored documentaion resources to signatories and other "VIPs", if not the least to exert control over who and how uses their products. I wouldn't put it past them to routinely neglect their _public_ documentation, for one reason or another that makes commercial sense to them but not the public. As for incentives, go figure indeed -- you'd think by walling off API documentation, they're shooting themselves in the feet every day, but in these days of betting it all on AI, which means selling GPUs, software and those same NDA-signed VIP-documentation articles to "partners", maybe they're all set anyway and care even less for the odd developer who wants to know how their flagship GPU works.
hackrmn commented on How to Think About GPUs   jax-ml.github.io/scaling-... · Posted by u/alphabetting
tormeh · 6 days ago
I find it very hard to justify investing time into learning something that's neither open source nor has multiple interchangeable vendors. Being good at using Nvidia chips sounds a lot like being an ABAP consultant or similar to me. I realize there's a lot of money to be made in the field right now, but IIUC historically this kind of thing has not been a great move.
hackrmn · 6 days ago
I grew up learning programming on a genuine IBM PC running MS-DOS, neither of which was FOSS but taught me plenty that I routinely rely on today in one form or another.

u/hackrmn

KarmaCake day103September 21, 2024View Original