Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
kbolino
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
45 ms
·
841.
▲
by
kbolino
2y ago
Private equity is a type of private ownership, even if it doesn't apply to Steam. In the broader context of business dysfunction, public-vs-private ownership is not telling the full story. Corporate raiding is also just part of the pic
842.
▲
by
kbolino
2y ago
It's a colloquialism not a legal statement. Steam sells more games than all other PC distribution channels combined, and has done for many years now.
843.
▲
by
kbolino
2y ago
I concur on all points, though I think there's something else than public ownership at fault per se. Publicly traded corporations were once considered an innovation and improvement over private ownership. Something went awry over the y
844.
▲
by
kbolino
2y ago
Steam has locked up the gaming market on PCs and so far it has been all upside. The decline of Netflix and the proliferation of generally worse alternatives has not been a boon for anyone but rent-seekers. This theory of competition is not
845.
▲
by
kbolino
2y ago
It exists, but IMO it's not a good choice. First of all, it doesn't support RenderGeometry or RenderGeometryRaw, which are necessary for high-performance 2D rendering (absent the new GPU API). I doubt it will support any of the GP
846.
▲
by
kbolino
2y ago
ARM has gotten very good, and is definitely competitive with mid-range x86 while offering better performance-per-watt, but it is still not competitive with high-end x86.
847.
▲
by
kbolino
2y ago
Regarding the borrow checker, what you say is not correct. The borrow checker's rules are stricter than absolutely necessary. It is designed to reject all invalid programs, but it also rejects some valid programs.
848.
▲
by
kbolino
2y ago
From the perspective of government receipts, the bulk of taxes are paid by the middle, not the tails. The rich don't have enough numbers, and the poor don't have enough money, to offset the area under the middle of the curve. This
849.
▲
by
kbolino
2y ago
Multiple varieties of "snobby Eurochocolate" are sold prominently in the candy and/or snack aisles of my podunk town's Walmart and grocery store. I've never had any trouble getting it, and with domestic candy prices
850.
▲
by
kbolino
2y ago
They've been forced to relax this policy, but only in the EU: https://www.theverge.com/2024/1/25/24050478/apple-ios-17-4-b...
851.
▲
by
kbolino
2y ago
Viewed skeptically rather than apologetically, it seems like the fundamental concepts of society (like "freedom" and its limits) are nebulous and mutable, and the fundamental processes of society (like how ideas become law) are in
852.
▲
by
kbolino
2y ago
If the links are operating at only 10Mbps or 100Mbps, it's possible for them to operate in half-duplex mode (e.g., if the cables don't have all 8 pins wired properly), even with a switch. In this mode, there's a collision dom
853.
▲
by
kbolino
2y ago
Is it really true that there's no scalar FPU at all? What about x87? The instructions are still there even in 64-bit long mode, they use their own registers, and there are enough idiosyncrasies (80-bit extended-double precision, stac
854.
▲
by
kbolino
2y ago
If you can accept cooperative scheduling that runs tasks only on a single core, then yes, lightweight solutions exist. This is more like "event-driven coroutines" than "green threads" though. If you want "full"
855.
▲
by
kbolino
2y ago
This claim is false for a lot of modern language runtimes which use tracing garbage collection, like the CLR (C#/VB), JVM (Java/Kotlin/Scala/etc), Go, BEAM (Erlang/Elixer), etc. There are no hard promises about when
856.
▲
by
kbolino
2y ago
It's never really been about saving keystrokes, but about re-writing the same (fairly common) operation over and over again (and not necessarily the same way each time), and not being able to benefit from future optimizations. However,
857.
▲
by
kbolino
2y ago
I did some benchmarks, and it seems you are right that there's no (more) cache-friendly solution in general (at least, not that I could come up with). Memoizing the full entries (key and value) into a slice and then sorting that slice
858.
▲
by
kbolino
2y ago
This is a bridge that the standard library has already crossed, though. Off the top of my head, both encoding/json and text/template guarantee sorted iteration order of maps. I don't think it's an edge case at all. Wheth
859.
▲
by
kbolino
2y ago
This is a good point which likely explains why maps.Sorted doesn't exist (yet): what would it even return? I think returning an iterator is acceptable, the docs could explain the expense of the operation, and the implementation could c
860.
▲
by
kbolino
2y ago
As I mentioned in another reply, this simple solution is not cache-friendly.
861.
▲
by
kbolino
2y ago
And yet slices.Sorted was added which does exactly this already, but only for single-valued iterators.
862.
▲
by
kbolino
2y ago
I've re-read everything you've written so far, and I think we're just in violent agreement. It would have helped if you provided some explanatory code, but the word "middleware" in your original post (which may have
863.
▲
by
kbolino
2y ago
I said no such thing. First, it would save one line of code (v := m[k]). Second, it would also allow an optimization. When iterating a map directly, you have both the key and the value at the same time. However, since we iterate only the
864.
▲
by
kbolino
2y ago
In its simplest form, a functional option is: type Option func(ptr *T) The entire purpose of this function is to be called, and when called, to change something about the value pointed to by ptr. That seems like a classic case of s
865.
▲
by
kbolino
2y ago
Yeah, that particular case got better with generics. It's still more verbose to write ptr.To(true) than &true though. Unfortunately, there's no generic type constraint for "is an interface" or even "is nilable&q
866.
▲
by
kbolino
2y ago
Whatever you think the best name for it is, it's still missing from the library.
867.
▲
by
kbolino
2y ago
If you're using the functional options pattern, and you're trying to == or type-assert one of the options, you're the one doing something abnormal. Maybe it makes sense in the broader context of what you're trying to d
868.
▲
by
kbolino
2y ago
Being unable to access struct fields a.b.c without risking a panic sucks (and which caused the panic: a.b or b.c?). There's no remotely ergonomic solution to the problem, because there's no nil-safe struct member operator, there&#
869.
▲
by
kbolino
2y ago
The whole point of the "functional" options pattern is that the option's own identity or type doesn't matter, only its side-effects. If you do need to examine the option itself, you're either using the wrong pattern
870.
▲
by
kbolino
2y ago
They just added custom iterators ("range over func") to the language in 1.23 but somehow missed the obvious opportunity to add e.g. maps.SortedByKeys. It's clunky to write: for _, k := range slices.Sorted(maps.Keys(m))
More ›