Recent submissions

Comment · 1 year ago
This was my experience of Ada as well. Beautiful language, that somehow seemed to combine the best parts of Haskell and C. But so difficult to find documentation online. C++ has it's footguns, but it's hard not to learn them all just from the background noise alone. The tooling and stackoverflow-ability makes C++ feel as fast to develop as a scripting language in comparison to Ada.
Comment · 1 year ago
Comment · 1 year ago
I think I mostly agree, but I do have one war story of using a C++ library (Apache Avro) that parsed data and exposed a "get next std::string" method. When parsing a file, all the data was set to the last string in the file. I could see each string being returned correctly in a debugger, but once the next call to that method was made, all previous local variables were now set to the new string. Never looked too far into it but it seemed pretty clear that there was a bug in that library that was messing with the internals of std::string, (which if I understand is just a pointer to data). It was likely re-using the same data buffer to store the data for different std::string objects which shouldn't be possible (under the std::string "API contract"). It was a pain to debug because of how "private" std::string's internals are.

In other words, we can at best form API contracts in C++ that work 99% of the time.

Comment · 1 year ago
In fairness there are also several ambiguities with JSON. How do you handle multiple copies of the same key? Does the order of keys have semantic meaning?

jq supports several pseudo-JSON formats that are quite useful like record separator separated JSON, newline separated JSON. These are obviously out of spec, but useful enough that I've used them and sometimes piped them into a .json file for storage.

Also, encoding things like IEEE NaN/Infinity, and raw byte arrays has to be in proprietary ways.

Comment · 1 year ago
Then why do I have it the other way where when I cast from a yt premium phone it still shows ads.
Comment · 1 year ago
> I would look into countries where euthanasia has been already implemented.

That's what puts me off of the idea in the first place. Cases like Christine Gauthier (a former army corporal and paralympian) who was offered euthanasia when trying to seek government disability benefits to install a wheelchair ramp. If it takes someone with existing fame to speak out about this, how many more people has this been pushed on?

> from the utilitarianism view - allowing euthanasia will prevent much more suffering than it will cause.

I'm not totally convinced. I haven't run the numbers, and this also certainly takes into account my personal views on valuing life and family, but I do fear more pain and suffering will come with legal euthanasia than it will solve.

Just look at the end of the article. It gives several examples of the kind of thing that allows me as a utilitarian to say that the suffering of a few terminally ill is not as bad as the harassment of countless vulnerable people.

Comment · 2 years ago
There is in other areas of copyright law, like romhacks and action replay codes. Romhacks seem like a very grey area but generally don't get DMCAed when they distribute large binary patch files of the original roms. And "Lewis Galoob Toys, Inc. v. Nintendo of America, Inc." would imply that the dead simple 16 byte[0] "patch files" in the form of game genie codes are legal.

To take a more practical example. Is there no meaningful difference between the dwm multimon patch files[1] and the full forked repo[2]? For context, lots of suckless software keeps extra features/addons in semi-offical out of tree patches files. The philosophy of suckless is generally to hardcode config options in source code and recompile instead of editing .rc files. This reduces the complexity of the code, so you end up with some very minimalistic easy to patch recompile and code. So it's a natural (if very esoteric) way of implementing plugins.

Obviously this is a bit contrived because all the suckless code is actually open source, so none of this matters to them. But I think it's fair to say that distributing the 7 .patch files at [1] wouldn't count as distributing a forked version of dwm. The patch files contain some context lines ripped straight from the main codebase, but not the main repo. Hell I'd even wonder if there's some kind of fair use argument for patch files. After all, often they boil down to a criticism of the codebase, saying that it's bad because it contains all the lines of code starting with '-' signs and really would be better if it had these extra lines of code after the '+' signs.

The license doesn't seem contradictory to me. Counter-intuitive, unclear, and paradoxical (in the most general sense of the word), yes. But not contradictory.

[0] Looks like the longest codes are 32 digits of hex long: https://archive.org/details/GameGenieSNESCodebookProgramming...

[1] https://dwm.suckless.org/patches/multimon/

[2] https://github.com/garybgenett/.dwm

Comment · 2 years ago
Comment · 2 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton