2,676 karma · joined Nov 28, 2019 (7y ago) · 1,131 submissions
comment 5mo ago · link · parent
The Federalist Papers talk a lot about factionalism versus tyranny. On a larger scale, look at how long it took what are now European Union members to stop warring with each other.
comment 6mo ago · link · parent
Personally I prefer lisp 1 languages, like scheme. Even there, though, there was a split over r6rs, so we got a bunch of mostly-like-r5rs schemes and racket.
Maybe the problem is that lisps are no longer popular enough to have a winning implementation! If there is one, though, then it's Common Lisp on SBCL.
comment 6mo ago · link · parent
comment 6mo ago · link · parent
> function foo({a, b, c}) {
... return {x: a, y: b, z: c};
... }
undefined
> foo({a: 1, b: 2, c: 3})
{ x: 1, y: 2, z: 3 }
> const a = 'A', b = 'B', c = 'C';
undefined
> foo({a, b, c})
{ x: 'A', y: 'B', z: 'C' }
>comment 6mo ago · link · parent
Also, phosphorus is the more scarce fertilizer, I think. I remember reading a paper from a Chinese lab that was trying to figure out how to cheaply isolate phosphorus fertilizer from commercial pig farm feces. They decided it wouldn't be cost effective.
comment 6mo ago · link · parent
To be fair, if you use only the Linux syscall interface, then a program that you compiled on x86 in the 90s will probably still run anywhere today. Linus is adamant about this.
But if you want to use... anything else, then it's unlikely to work at all unless you are very specific about your target. There isn't one company deciding that glibc or mesa or whatever is binary backward compatible on every kernel for every platform forever. Microsoft is, somewhat, one such company. That's why System32\*.dll have such stable interfaces -- it's their job to translate whatever late 90s system/graphics facilities some boomer dreamed up into whatever the current Windows hodgepodge of system services support. It's no wonder Microsoft is trying to drop support for hardware like crazy.
This implicit compatibility isn't true for all Windows programs, though. Consider Visual Studio. Couldn't compile my console program on my computer and run it on my dad's computer. He had to first install the "Redistributable," which for him and most people might as well be a rootkit and a super scary virus program bad guy.
comment 6mo ago · link · parent
Studios don't target Linux, they target Windows and sometimes Mac.
Imagine if Flappy Bird targeted only iPhone, because there were only 50,000,000 Android users in the world (hardly worth supporting). Then Android creates an iPhone runtime on Android so people can play Flappy Bird on it, and you conclude "iPhone actually worked, this is evidence that Android is a hilarious and catastrophic failure."
comment 7mo ago · link · parent
As I recall from Ubuntu Touch, they had to build a system that was a thin wrapper around Android so that they had access to firmware blobs.
I guess that would still be ok as long as the hardware component manufacturers don't start to require authentication from the OS. That would be along the same lines as the fight you're describing.
comment 7mo ago · link · parent
comment 7mo ago · link · parent
Pharmacists have to get a special degree before they can even get an interview, and I've heard that the education is heavy on organic chemistry. Then you get a job as a cashier selling pills.
> Hacker news and r/programming is only good to get general ideas and keep up-to-date. The comments are almost worthless.
You got me.
> Once, someone asked me who I looked up to and I said Conan O’Brien [...]
He wrote for SNL and studied literature at Harvard, so there's probably plenty going on up there.
comment 7mo ago · link · parent
There was a dedicated system underground. Vacuum jacketed tubes taking waste helium from the labs to a reservoir across campus.
Helium is rare, helium 3 is precious.
comment 7mo ago · link · parent
The claim was that some plain old chips are exquisitely radiation resisitant, and it's not clear why.
comment 7mo ago · link · parent
[1]: https://en.wikipedia.org/wiki/North_American_plate#Plate_mot...
comment 7mo ago · link · parent
> Summarize a technique for type erasure as is done in C++. Assume that your audience is familiar with all of C++'s features, but not with the technique of type erasure. The briefer the summary, the better, but don't omit any essential pieces or use vague language.
ChatGPT Plus generated a lot of text and code. Then I said:
> Now please summarize using only a few sentences.
and it replied:
> Type erasure wraps any concrete type `T` in a uniform container that stores a `void*` to the object plus a pointer to a type-specific static table of function pointers (the “vtable”). Each `T` provides its own table implementing required operations (destroy, copy/move, and any interface methods), and the container dispatches all behavior through that table. This lets unrelated types share a runtime interface without a common base class, with lifetime and semantics fully defined by the per-type table.
Not perfect, but pretty good.