Better HN
topnewbestaskshowjobs
Log inSign up

GrumpySloth

4,901 karma · joined Sep 13, 2020 (6y ago) · 1,641 submissions

Submissions

comment 2y ago · link · parent

This and similar arguments in this thread work on the same logic that frames software piracy as theft. It’s the fallacy of treating software as a tangible thing that, when copied, is taken away from someone and altered irreversibly.

comment 2y ago · link · parent

MIT doesn’t give anyone the ability to restrict the freedom of others. When you fork a project and use a difference licence for it, the original project remains under MIT.

comment 2y ago · link · parent

That analogy would make sense only if cutting trees left the trees intact and didn’t annoy people in the park with noise etc. Alas, it’s nonsense.

comment 2y ago · link · parent

I can understand wanting to restrict use of something a person created using a restrictive licence. I can’t understand being sad about someone else not restricting what they created. To me it looks like someone being sad after seeing someone else giving out free ice cream, even though the person being sad didn’t contribute to making the ice cream.

comment 2y ago · link · parent

Yeah. It uses VP9.

comment 2y ago · link · parent

Yup. I’ve downloaded the Webm file and iOS doesn’t know what to do with it, which is odd, since Apple allegedly added support for Webm in iOS 15. I’m on iOS 17.

comment 2y ago · link · parent

I’ve used it, but it often failed to redirect my searches. It was hit-and-miss. xxSearch works better.

comment 2y ago · link · parent

Same in Poland. I suspect they’re generally slower in Europe than US due to location of servers.

comment 2y ago · link · parent

I’ve been using Kagi for a while. Unfortunately, its website on mobile is much lower quality than say DDG. One issue I find often is that when I want to edit a previously-entered query in the search box, sliding the text cursor is very hard – it often stops at search box boundary and doesn’t scroll the text inside. Another is that sometimes the search results page freezes after I come back to it from a different tab. When I try to scroll, it refuses to scroll and only briefly shows some white space around the currently-viewed part. I blame all those on some JS that’s too creative for its own good.

Aside from that, I wish Safari had a setting to add custom search URLs, so that I can paste my Kagi auth token, instead of having to use xxSearch, which also has some annoyances. Obviously, this part is not Kagi’s fault.

I’ve stopped using Kagi on mobile and went back to DDG. It’s still stellar on desktop though.

comment 2y ago · link · parent

Care to give any examples of Linux distros without Perl?

comment 2y ago · link · parent

> much lesser lines of code

Doubtful. awk has a lot of implicit behaviour which allows the programmer to write very terse scripts. An equivalent Python program is usually several times longer.

comment 2y ago · link · parent

Perl is installed by default on most Unix systems. FreeBSD being the exception. Python isn’t. Although Python is popular; if we’re comparing the probability of someone having the interpreter installed already, it’s greater for Perl, even if people aren’t aware they already have it.

comment 2y ago · link · parent

Crunchyroll is the most bizarre streaming service I’ve tried. None of the anime had original audio tracks. One Punch Man was available only with a French dub. A Korean anime had many audio tracks to choose from... but none of them were Korean. What the hell?

Cancelled the trial after several minutes.

comment 2y ago · link · parent

Floating point numbers also don’t obey normal algebra laws and are notoriously tricky to get right.

Two’s complement on the other hand form an honest-to-god commutative ring, their implementation is dead simple and it’s very rare that they lead to bugs in and out of themselves. They’re one of the most beautiful solutions in computer science IMO.

I’d give up floating point much more readily than two's complement.

comment 2y ago · link · parent

Statically linking with musl and enabling LTO sounds like what you’re looking for.

comment 2y ago · link · parent

> To people who say "Word sux", I say "That just means you don't know how to use Word properly".

Or maybe those people just have eyes which can spot the differences in spacing between documents created with different Word versions, the mediocre kerning, and a multitude of other typographical annoyances.

Even a website is easier to replicate exactly in another browser than a Word document to be replicated from scratch in a new version of Word. And if by some miracle you manage that, the end result will always look meh.

comment 2y ago · link · parent

Hypothesis approach looks interesting. I’ll look into it.

As for my approach to generation, there’s not much to it. Instead of generating arbitrarily complex values and then trying to shrink them to simpler ones, I start with simple values and, if they work, proceed to more complex ones. In every test run I use the same values. It’s basically a brute-force, which omits values which are sufficiently similar to values already tested.

The omission is achieved by having a base set of simple values where each is judged by me to be sufficiently different from the others (I basically copy e.g. tricky numbers/unicode values from quickcheck implementations, which are used inside generating code), and the base set is ordered from simplest to less simple. Then I run a loop which goes over all elements of the base set, run the test, then take a function which based on the base set produces more complex values, run the test on that etc. So the earliest fail is going to be the simplest value it can generate.

comment 2y ago · link · parent

I have a finite budget of code and time I can afford to spend. One of the choices gives me a much better RoI in my experience. I prefer to spend the rest of the budget on the main code.

comment 2y ago · link · parent

Door A: tests find bugs sometimes (property-based)

Door B: tests find bugs almost always with a fraction of the code (my approach)

I choose Door B.

I still test properties tbh. I just don’t let randomness ruin it and don’t need to implement any shrinking.

comment 2y ago · link · parent

The problem with property-based tests is that for non-trivial input data, like e.g. source code for a compiler, it’s hard to implement shrinking, since it’s hard to tell in general what it means to simplify a program (or another piece of non-trivial input). Another issue is that randomisation introduces flakiness when the input space is large. I prefer to write tests by writing a small number of simple base cases and then code which produces increasingly more complex combinations of them up to a certain size. It’s completely deterministic and the order goes from simpler to more complex, so when the test fails, it fails at the simplest case it could find and doesn’t need to go from more complex, to simpler, which is much mire complex. By moving from property-based tests to this approach I’ve sped up my tests and made them more reliable. Previously they weren’t as effective at finding bugs, and when they did find them, it was hard to reproduce other than by copying the random generator seed. And the shrinking code was very complex.

So my approach intuitively is a bit like writing down a small set of simple axioms and then generating their more complex consequences. The key being the order.

comment 2y ago · link · parent

They didn’t sabotage them. The CPUs just didn’t align with Apple’s goals. It’s not like they gave the M1 CPUs the cooling that Intel didn’t get. My Mac Mini M1 never spins up its fans and everything is fine. I love it. If it did, I’d consider it a downgrade.

comment 2y ago · link · parent

I know about that. This is a special edition for embedded though. But CentOS is news to me. CentOS was targeted for servers.

comment 2y ago · link · parent

CentOS wasn’t used in embedded systems.

comment 2y ago · link · parent

I guess I’ll stop watching YouTube. ¯\_(ツ)_/¯

comment 2y ago · link · parent

I think on Linux at least it freezes due to watching too many files using inotify to update its sidebar. I wish there was an option to disable that. Same thing happens with Sublime Merge. It’s unusable on giant repos.

comment 2y ago · link · parent

Not after I added the second paragraph. ;)

comment 2y ago · link · parent

Perhaps that will bring FreeBSD from Tier 2 to Tier 1 of Rust support, if they cooperate with the upstream?

https://doc.rust-lang.org/nightly/rustc/platform-support.htm...

comment 2y ago · link · parent

The stuff that’s included in the system after a standard install, before you install any additional stuff. It’s all in one repository and it’s maintained by the FreeBSD project. Stuff like the kernel, libc, utils, dtrace, compilers needed to build base, ... Basically everything that’s needed for a usable system. It’s updated all together through binary patches, not separately through packages like on Linux. When you want something more, you either compile it from source using Makefiles stored in a repository called “ports” (the Makefiles download the tarballs with source code, verify their checksums, build them etc), or you install pre-built packages using the pkg package manager.

The FreeBSD project tends to like to slim the base system down. E.g. some years ago they removed Perl from the base system. So out-of-the-box the only scripting language that’s available is shell. In contrast, OpenBSD has more stuff in its base system and on the subject of Perl they doubled down on it (their package manager e.g. is written in Perl). It’s also visible, when you download the base system repos for each of them and run tokei to find out the numbers of LOC. (I don’t remember the numbers off the top of my head.) That said, FreeBSD still includes a full LLVM toolchain due to the rule “base builds base”, and LLVM is... a lot. It’s the biggest source of bloat in my jails to be honest. I keep meaning to find out if I can remove it from them.

comment 2y ago · link · parent

It’s not a token separator in the "#define foo(x)" example. You never get a "foo(" token, regardless of whitespace, but whitespace decides whether it’s a function macro definition or a constant definition. The standard needed to invent a new token called lparen, which is a left round bracket that is not preceded by whitespace, to make it make any sense.
12345
55