HackerTrans
TopNewTrendsCommentsPastAskShowJobs

matttproud

no profile record

comments

matttproud
·w zeszłym miesiącu·discuss
Conventional Commit messages have big https://goomics.net/361 energy. Or at least the mechanisms that repositories use to programmatically enforce their use.

(I can't believe nobody has pointed this out yet.)
matttproud
·2 miesiące temu·discuss
I lived there, and I am familiar with that. I would be happy if they did away with all of it, including the state-administered lottery. But this is a great start of low-hanging fruit.
matttproud
·2 miesiące temu·discuss
Good on Minnesota.
matttproud
·5 miesięcy temu·discuss
Piggdekk in Norway are equivalent to North American studded tires. When I lived in the northern parts of the U.S., I had a set of these for times around freezing rains.

Beyond the questions of winter weather properties, there are adjacent tradeoffs between the tire types (outside of studded):

1. Fuel economy

2. Noise

3. Degree of particulate pollution emission

I'm sure that the all-season tires probably have some negative tradeoffs in these regards to, which yields a choose the most optimal product for the time of year. All-season tires to me seem like a convenience food for places where the weather can be legitimately bad.

One other difference that is hard to articulate to North American drivers with respect to understanding Scandinavia and roads: there are places where snow and ice will literally not be removed (maybe not even removeable) from the road when plowed (I presume until spring melt). It just becomes a thick ice pack over the course of weeks. I never encountered any roads in my life (including Northern Minnesota) that were this inclement. North American roads tend to be cleared (plowing or melting) to asphalt or pavement.
matttproud
·5 miesięcy temu·discuss
Driving discipline, culture, and rules in North America are Mickey Mouse.

The reality of car dependency there means that there are people driving and owning cars who can't really afford to do it properly, nor do they know they need to do it properly (e.g., having a second set of tires for the winter). You can see this evidenced by the rust buckets on the road that look like they are one pothole away from losing part of the vehicle body. Deferred maintenance and investment everywhere and in everything …
matttproud
·5 miesięcy temu·discuss
Yeah, it was interesting to see some above-ground-to-the-premises power delivery in some of the smaller Norwegian villages above the arctic circle. Things looked rather robust, though.

I lived in the Oklahoma and in Minnesota, and the difference there is already stark:

* OK suffered from plenty of storm-induced winter power outages (massive freezing rain cycles were common in my life). My mother's cotton bath robe, which she kept using until late in her life, had burn marks from when she reached for something over a lit candle during a power outage when I was four years old.

* MN suffers some, but people knew to develop meaningful contingency plans.

Both states have variegated buried-power-to-the-premises usage. It's not really to be expected as the norm in either place, but MN has far more than OK (funnily enough I grew up in a place in OK with it). Either way, the infrastructure robustness in North America looks like it arose from a dismal cost-benefit analysis versus a societal welfare consideration.

I left North America about 14 years ago for Europe. The difference is stark. We've only had one significant power interruption in that time (not even in winter); whereas stochastic neighborhood outages were commonplace in North America. What really freaks me out about the situation in North America is just the poor insulation of the structures and their low thermal mass. They will get cold fast.

Aside: A lot of friends and family in North America balked at the idea of getting a heat pump due to performance during a power outage: "when the power goes out, I can still run my gas." When I asked them whether the house was heated with forced air or used an electronic thermostatic switches, the snarky smile turned to a grimace.

When you live in a cold place, you learn to do things differently. You're naive if you don't pack warm blankets and water in your vehicle, for instance. You never know when you might find yourself stranded somewhere due to vehicular breakdown …
matttproud
·5 miesięcy temu·discuss
Short version is this:

If you are going to get into the business of introducing order dependence to test cases through global state (see my other reply on the parent), you will always want the cleanup to work correctly.

1. Using (testing.TB).Cleanup is a good defensive habit to have if you author test helpers, especially if the test helpers (see: (testing.TB).Helper) themselves do something (e.g., resource provisioning) that requires ordered teardown. Using (testing.TB).Cleanup is better than returning a cancellation or cleanup function from them.

2. (testing.TB).Cleanup has stronger guarantees about when it is called, especially when the test case itself crashes. Example: https://go.dev/play/p/a3j6O9RK_OK.

I am certain that I am forgetting another edge case or two here.

Generally nobody should be designing their APIs to be testable through mutable global state. That solves half the problem here.
matttproud
·5 miesięcy temu·discuss
This is often the path of pain: https://google.github.io/styleguide/go/best-practices#global....
matttproud
·6 miesięcy temu·discuss
Method signatures in gRPC present a pandora's box of questions: https://matttproud.com/blog/posts/grpc-method-discipline.htm....

The questions aren't unique to gRPC, however; gRPC forces you to confront them early and explicitly IMO, which is not a bad thing.
matttproud
·8 miesięcy temu·discuss
Another similar naming rabbit hole (hyper-local to Switzerland): https://de.wikipedia.org/wiki/Spanisch_Brötli.
matttproud
·8 miesięcy temu·discuss
As an American living in CH, I say send all of the (bland) Emmentaler to the U.S.; I wouldn't miss it! ;-) Inländervorrang for the rest!
matttproud
·9 miesięcy temu·discuss
Maybe better put: Bazel (and its predecessor) do support Go, but they don't support the traditional directory structure-to-import path semantic that we've come to expect in the outside world. And even then, the terminal directory needn't match the package name, but accomplished Go developers seldom violate that convention these days — thankfully.

All of this makes it paramount for developers of Go tools to use a first-party package loading library like package packages (https://pkg.go.dev/golang.org/x/tools/go/packages), which can ameliorate over this problem through the specification of a GOPACKAGESDRIVER environment variable to support alternative build systems and import path layouts (the worst thing someone can do is attempt to reverse engineer how package loading works itself versus delegating it to a library like this).
matttproud
·9 miesięcy temu·discuss
One of the worst things a developer accustomed to Bazel (and its relatives) can do with a modern language (say Go or Rust) is to model code and organize it through the Bazel concept of a build target (https://bazel.build/concepts/build-ref) first and then second represent it with the language's local organization concepts versus the other way around. One should preferentially model the code with the language-local organizing concept in an idiomatic way (e.g., a Go package — https://go.dev/ref/spec#Package_clause) and THEN map that instance of organization to a build target (e.g., go_library).

When you do this in the wrong order, you end up with very poorly laid out concepts from a code organization standpoint, which is why vagaries like this needed to be written:

* https://google.github.io/styleguide/go/best-practices.html#p...

* https://matttproud.com/blog/posts/go-package-centricity.html

In languages that operate on a flat namespace of compilable units (e.g., C++ or Java), build target sizing and grouping in Bazel (and its relatives) largely doesn't matter (from a naming the namespace and namespace findability+ergonomics perspective). But the moment Bazel starts interfacing with a language that has strict organization and namespacing concepts, this can get rather hairy. The flat namespace practice with Bazel has (IMO) led to code organization brain-rot:

> Oh, I created another small feature; here, let me place it in another (microscopic) build target (without thinking about how my users will access the symbols, locate the namespace, or have an easy way of finding it).

— — —

Note: The above is not a critique of Bazel and such. More of a meta-comment on common mispractices I have seen in the wild. The build system can be very powerful for certain types of things (e.g., FFI dependency preparation and using Aspects as a form of meta-building and -programming).
matttproud
·9 miesięcy temu·discuss
Seriously. I don't know if folks remember this Java desktop research project from 25-some years ago: https://en.wikipedia.org/wiki/Project_Looking_Glass. To say that it was slow was an understatement (it was a real PITA to get this installed and built at the time; I spent an afternoon in college doing that out of boredom).

I imagine FyneDesk is plenty fine for what it is doing in comparison.
matttproud
·9 miesięcy temu·discuss
Gentoo and Linux from Scratch (LFS) were a great way to learn back in the day (yes, 20-some years ago) — and support relatively custom operating environments through USE flags (e.g., which flavor of Motif did I want to use). I found Gentoo to be a rather practical low-level tradeoff in that era compared to Debian (super old package set and release cadence). You have to bear in mind: there were plenty of Gentoo users out there who weren't into abusing CFLAGS and such. And Portage had such a low bar to climb to create a package (cf. Debian Policy Manual as a description of the arcane nature of Debian package management with dh). Moreover, Ubuntu, which was a good pressure on Debian to modernize, wasn't yet on the mainstream for a good window of time when Gentoo really took off.
matttproud
·10 miesięcy temu·discuss
He's spent too much time huffing Alexander Dugin's flatulence. It's no different to how revanchist parties in the United States these days characterize their battle against their (domestic) enemies. Just a rhetorical foil.