HNHacker News
TopNewBestAskShowJobs

masklinn

68,925 karma · joined April 25, 2009

submissionscomments
masklinn··on Why the Bronze Age Collapsed
Hasn’t that been the primary hypothesis for a while?

Them essentially being refugees / displaced and looking for a new place, not them being spawned on the map like a cheap rts scenario.

masklinn··on How Delhi Cut Electricity Loss from 50 to 5 Percent
It’s where you’ll find most countries with a good handle on their electric network, advanced economies or not. You can do better but it requires either very small service distances (so you don’t have transmission losses in the first place) or an extreme dedication to hunting them down.
masklinn··on Footguns with Postgres “at time zone 'UTC'”
JS’s temporal API will serialize zoned datetimes with both offset and timezone (specifically, an RFC 9557 representation), this can be used to infer tzdb updates. By default, temporal will raise an error when parsing a datetime where the offset and the timezone’s offset differ, but it can be configured to sway one way or the other depending on use case.
masklinn··on Packing Binary Is Fun
protobuf is definitely not a binary analogue to JSON, because it's not a self-describing document format, it requires a schema.

cbor is a json analogue.

masklinn··on Packing Binary Is Fun
If you want to be a real developer you should use raw deflate (or atleast zlib streams), they're way harder to identify so they look more really developpery.

Also gzip adds something like a dozen unnecessary bytes.

masklinn··on Footguns with Postgres “at time zone 'UTC'”
> The thing about this is that if Perth's time zone ever changes so erratically or with such little notice that participants need to be notified that the point-in-time of an upcoming meeting has changed

"erratically" and "with little notice" are pretty relative when it comes to timezone shifts. DST decisions have been made with as little as a week lead time, Samoa dropping an entire day off of its calendar was done with under a year lead time (noises started about 9 months prior, the act was assented 6 months prior).

> would we expect all athletes, organizers, fans, etc. to show up and do everything 1 hour earlier (by solar time)?

Usually yes.

masklinn··on Footguns with Postgres “at time zone 'UTC'”
I'd say relational databases (in the sense of standard SQL) have 0 types that correspond to modern data-handling practices: timestamp with timezone stores an instant but lies about it and implicitly gets converted from and to the connection-local timezone.
masklinn··on Footguns with Postgres “at time zone 'UTC'”
It’s really not clear what you’re asking.

The point of using zoned events is to match the life and expectation of people living in the real world e.g. if there is a meeting in Perth at 10AM, and the Perth timezone gets shifted, the meeting is still occurring at 10AM perth time. If it’s broadcast then every other time is what changes (or not).

If people want to fix their meeting internationally they can already do that by setting their meeting time in UTC.

masklinn··on Footguns with Postgres “at time zone 'UTC'”
A ZonedDateTime is not an instant and a timezone, for the same reason that you can’t unambiguously round trip between arbitrary timezones and UTC:

- zoned datetimes carry ambiguities as to their actual location on the timeline (because they can repeat, or not exist at all)

- future zoned datetime carry outright uncertainty as to their actual location on the timeline (as the zone’s offset can be updated at any point and any number of times until the event has elapsed)

masklinn··on Nissan's third generation e-POWER powertrain
The concept is called range extenders, and the video does explain why it’s one of those false great ideas and every production vehicle has failed: EVs with range extenders are at best bad EVs and at worst terrible hybrids.
masklinn··on Packing Binary Is Fun
> Schemas save you space, but then you lose the ability to understand the data without the schema. That's where JSON has always been handy despite its inefficiencies.

Of course that’s orthogonal to using a text v binary representation, you can have a schema’d text format, and a self-describing binary format.

BSON, UBJSON, MessagePack and CBOR are binary but self-describing.

masklinn··on Go Concurrency Distilled
A go channel is just a queue with a configurable amount of buffering. Buffering 0 is the most interesting as it creates a “rendezvous” channel which syncs the sender and the receiver.

A channel of size 1 is a bit like an mvar but with support for only take and put.

masklinn··on Solving for faster SHA-1 collision detection
Git proper has had rust code in it since 2.52, as an opt-in optional. 2.55 makes it opt out. 3.0 might make it required.
masklinn··on The GitHub wiki is an anti-pattern
Yeah you can configure gh “wikis” to be freely editable but that’s not the default and most of them are not,
masklinn··on The GitHub wiki is an anti-pattern
It is. Although it’s a hidden git repo with none of the GitHub tooling.
masklinn··on Looking forward to Git 2.56 – and 3.0
TFA literally notes that one if the key sha256 devs is a github employee and in favor of the transition.

And sha256 is in private preview at GitHub: https://github.com/bk2204/talk-rust-in-git/blob/dev/presenta...

masklinn··on You can run Git on object storage if you re-make packfiles
Git does not use sparse files no, however in packs objects are delta-ified: any object can be either literal or a combination of literal segments and range copies from a base object, and that base object can be the same, recursively. So to resolve any object you need to jump around a fair bit in the pack file. The normal GC creates delta chain of length 10, aggressive defaults to 50, the maximum is 4095.
masklinn··on Goroutine Leak Profiles
> "<-chan TYPE" is the receive end, "chan<- TYPE" is the send end, "chan TYPE" without an arrow can be used for either.

The problem is that there is pretty much just a subtyping relationship, when you convert a channel to a send or receive channel you don't get a different object, you just get the relevant subset of operations.

> There is no way to explicitly "close" the receive end.

And that's the root cause of half of more of the example issues in TFA. With the ability to close either end of the channel (and to handle closed receivers from the senders, obviously), most of the issues just go away (even more reliably so if that happens for you when the relevant end stops being used).

masklinn··on Goroutine Leak Profiles
(2) has a bit more nuance to it: you can close channels… but the langage is designed for that to only be ok on single senders, a receiver can gracefully handle a closed channel (an iteration will just stop, a receive can use the 2-valued form to get the information), a sender will always straight up panic. Aka go channels are designed for fan-out.

And not closing channels is also considered idiomatic, per a tour of go:

> Channels aren't like files; you don't usually need to close them.

masklinn··on A heap overflow and SSO misconfiguration to compromise OpenAI internal repos
Also libwebp.
masklinn··on Apple detectives solved mystery of ancient tree and rewrote the history of fruit
Getting to that is one of the reasons why people would kinda just grow apple seeds all over.

Plus they were not completely wasted, while not generally edible they’re fine for cider.

masklinn··on Apple detectives solved mystery of ancient tree and rewrote the history of fruit
Heterozygosity and self-incompatibility are common to fruit trees in general, not specific to apples.

I think ancestral citruses (not the crosses) are the primary exception, as well as a few citrus hybrids which create clone seeds asexually.

> Outside of Granny Smith apples the ones you eat are mostly the results of mutations in the grown plants that we cut off and graft.

Honeycrisp is a chance seedling, though it stems from a horticultural crossbreeding effort it was grown from seed. And commercially useful sport mutations tend to come from popular chance seedlings to start with, since it is necessarily a more limited evolution of the basal cultivar, which needs to exist and in sufficient quantity that you’ll roll out useful mutations eventually (also useful is in the eye of the beholder as we can see with the red so-called delicious).

masklinn··on US 10-Year Breaches 5% as Inflation, Supply Worries Mount
Trump floated that trial balloon a few months back, though currently the administration is proceeding with the much more American plan of widespread voter suppression, intimidation, and bribery, if in the most ham-fisted and unconstitutional way possible.
masklinn··on US 10-Year Breaches 5% as Inflation, Supply Worries Mount
> To some extend I hope that the Republican party wins the next election. They should be the ones fixing the economy, raising taxes, and doing something responsible for once.

Why would you ever think they’d be interested in doing any of that? A non-insignificant fraction of the gop wants to collapse the US entirely.

masklinn··on OpenAI bots knew about the RubyGems caching vulnerability
> It's also more evidence that Docker/LXC is not a security boundary and all untrusted code should run in a Firecracker VM.

While I’m partial towards distrusting containers in favor of VMs, a container can’t prevent an operation you configured it to allow. A firecracker VM would no more prevent network access if you gave the guest network access.

masklinn··on LG says we're fake news [video]
> I think you do actually want those.

No, I rather know I do not.

> It's quite amazing to receive a notification from your dryer that it finished its cycle.

It’s really quite useless to me.

What I may want is an ODB so I can plug in whatever external observation and possibly control plane I wish, were I so inclined (I am not), and could make my device smart. Hell for a dryer you could probably have a plug or panel feeding into HA and send an alert based on load.

Anything that’s “smart” out of the box is rife for abuse and will eventually sink into that.

masklinn··on Working with Git Worktrees in Magit
Not relevant to comparing clones and worktrees, both create a fresh working copy from the repository data, and object store files are not modified in place (or at all really).
masklinn··on Hitachi launches CO2 heat pump water heaters with solar-friendly tariff controls
I’ve used a bunch where the shower head is on a hose not fixed to the wall. Usually with a two-way faucet.

The biggest issue in the west is the room being wet to start with.

masklinn··on Working with Git Worktrees in Magit
They don’t use less disk space as long as you account for that correctly: clones within a file system use hardlinks for the object store, so if you du on a clone it’ll be however many megs / gigs S but if you do that encompassing n such clones they will only use a bit more than S for the object stores. And cross file system you can use “--shared” although that will break the clone if you remove the source (then again the same occurs with worktrees). It’s also not significantly faster: on a fairly hefty monorepo (a few gigs, working copy is 1.2G) a worktree takes 4.76s, a clone takes 4.94. The clone’s .git “is” 3.4G, but that falls to 5.8MB when du-ing both the source repository and the clone. Of course if you create every clone from the base repo it’s going to be slow as fuck and eat all your disk, but you can not do that.

The rest I agree with, that objects and branches are shared between worktrees, as well as the repository configuration (e.g. remotes) is why I use worktrees, having to move things around and losing the content when I’d delete the wrong clone is why I stopped using them.

masklinn··on Working with Git Worktrees in Magit
You could try proposing a worktree copy command on the mailing list. Worktrees are currently independent and work off of repositories which may have no existing worktree / working copy at all, let alone one it makes sense to start from, so there is bothing to copy but for dodgy heuristics.
Page 1 of 34Next →