Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Merovius
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
31.
▲
by
Merovius
1y ago
> I didn't realize how important order was to type inference. I was unclear, I'm afraid. You can reorder the type parameters, it just changes which of them you need to specify: https://go.dev/play/p/oD
32.
▲
Generic interfaces
(go.dev)
58 points
by
Merovius
1y ago
|
76 comments
33.
▲
by
Merovius
1y ago
Oh and to be clear: I didn't say "look at this issue, most people clearly prefer the status quo". I just said that given this issue, making the claim that the status quo is objectively bad is hard to justify. I said that it
34.
▲
by
Merovius
1y ago
> (that is the reason the people spend years to solve it) I don't think anyone actually spend years trying to solve it. It's just that over the years, many people have tried to solve it - each for a grand total of maybe a week
35.
▲
by
Merovius
1y ago
It doesn't really contradict the survey all that much. 13% of respondents said that error handling is the biggest issue. That leaves 87%, which can rank anywhere from "it's an issue, but not the biggest" through "it
36.
▲
by
Merovius
1y ago
> But is know that the current way of Go (that is a insignificant improvement over the C way) sucks and ANY of the other ways are truly better […] This is a bold statement for something so subjective. I'll note that the proposal to
37.
▲
by
Merovius
1y ago
Except if your traits are not dyn-compatible. Which I believe a lot of Rust's traits are not. That restriction is specifically why Go does not allow methods to have extra type parameters: To make it possible for the language implementa
38.
▲
by
Merovius
2y ago
I can blame the evil overloads for building a monopoly which then becomes a juicy target for scammers. Just like block chains are effectively "the mother of all zero-day bug-bounties", so are monopolies the mother of all algorithm
39.
▲
Constraining Complexity in Go Generics
(blog.merovius.de)
4 points
by
Merovius
3y ago
|
2 comments
40.
▲
by
Merovius
3y ago
A supplementary post to my talk at GopherConAU 2023, about a design problem with NP-completeness encountered in the discussions about Go generics.
41.
▲
by
Merovius
3y ago
That depends. C function call overhead for Go is quite large (it needs to allocate a larger stack, put it on its own thread and prevent pre-emption) and possibly larger than for CPython, which relies on calling into C for pretty much everyt
42.
▲
by
Merovius
3y ago
> its creators explicitly said their goal was to replace C++ I think that is a far clearer goal if you look at C++ as it is used inside Google . If you combine the Google C++ style guide and Abseil, you can see the heritage of Go very c
43.
▲
by
Merovius
4y ago
The Author of this article is the founder of a startup trying to make "cultured oil" happen. Not a particularly trustworthy and neutral source for "the studies". He's certainly not going to be very motivated to tell
44.
▲
by
Merovius
4y ago
> I'm also slightly concerned over how blase "hackers" here on this site are treating the news. All around us are these huge, easy-to-abuse, global influence platforms with cozy backchannels to the most powerful bureaucrat
45.
▲
by
Merovius
4y ago
> In both cases, the proof is the same: “email verification” means “the user controls an email address.” No. In one case the proof is "the user receives E-Mails under this address" and in the other it is "the user can send
46.
▲
by
Merovius
4y ago
Even though you are being snarky and intentionally obnoxious: I even thought about that, yes. If unicode would allow to use red and green as skin tone modifiers, I would've done it. Except I probably wouldn't have used red and gre
47.
▲
by
Merovius
4y ago
I considered both. The issue I'm having is that "yes" and "no" is semantically wrong - or rather, semantically uninteresting. The interesting question is if a particular mechanism is "good" or "bad&qu
48.
▲
by
Merovius
4y ago
Personally, I very much dislike that this makes the zero value of `SearchTree[T]` not useful. I personally feel that anything which only handles data (as opposed to something like an os.File) shouldn't require explicit initialization.
49.
▲
by
Merovius
4y ago
Note that the article targets people writing generic code, not consuming it. So it's not really about what you want to sort. It's about what (and how ) you want to support with your sorting algorithm. As for that use-case: Go g
50.
▲
by
Merovius
4y ago
> How do float32 and float64 satisfy constraints.Ordered? Well, the simple answer is that constraints.Ordered is a type set which lists them: https://pkg.go.dev/golang.org/x/exp/constraints#Ordered The ot
51.
▲
Operator constraints in Go
(blog.merovius.de)
47 points
by
Merovius
4y ago
|
18 comments
52.
▲
by
Merovius
4y ago
> So far, Rust seems to have gotten it right by essentially copying Haskell. FWIW I've used Rust for a bit and I disagree that they "got it right". I'm not saying Rust is bad, I like the language. But it's not as
53.
▲
by
Merovius
4y ago
> It is indeed accepted if it's there by itself, but it is rejected if you try to use the interface, which is what function f does: You can't use it as a type, but you can use it as a constraint: https://go.dev/
54.
▲
by
Merovius
4y ago
> To be clear here, the tradeoff being made is that it is more important that the compiler is fast than that it is able to tell programmers about clear bugs in their code. I'm not sure that's entirely true. Or it seems at least
55.
▲
by
Merovius
4y ago
There are two reason why the compiler would need to check: 1. Because it makes for a better developer experience, if you get early feedback about your code being wrong. And 2. because type-checking a generic function requires you to check t
56.
▲
Calculating Go type sets is harder than you think
(blog.merovius.de)
79 points
by
Merovius
4y ago
|
40 comments
57.
▲
by
Merovius
5y ago
I'm confused about the text. It is not obvious, what the defendant actually did . The assumption from most people seem to be that they used a `<script>` tag or the like, with a Google URL. But the text does not imply that. On th
58.
▲
by
Merovius
5y ago
> Easiest way to deal with this is to self-host the videos. For most videos, this would be a copyright violation. i.e. there are now two laws which prevent reasonable technological solutions, making it harder for most people to host an
59.
▲
by
Merovius
7y ago
> This reminds me, as we should all be reminded on a regular basis, the bulk of the things you read in the popular press are at best skimming the surface and at worst outright misleading due to grabbing onto one obscuring factoid instead
60.
▲
by
Merovius
7y ago
I'm so tired of people purporting to speak for "the community" - especially when they diametrically oppose my own views. It feels a lot like they are co-opting me for their own agenda while simultaneously excluding me. The th
More ›