Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
foldr
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
91.
▲
by
foldr
2mo ago
>You would want Rust traits Go generics does have this feature. You can require a generic type to implement an interface.
92.
▲
by
foldr
2mo ago
Type classes are nice, yes, but SML doesn’t have them, or anything that can really stand in for Go’s interfaces.
93.
▲
by
foldr
2mo ago
Like this, you mean? https://haskellforall.com/2012/05/scrap-your-type-classes Fine in principle, but AFAIK it never really caught on because the ergonomics suck. Interfaces/traits/type classes do seem t
94.
▲
by
foldr
2mo ago
Go lets you constrain type parameters with interfaces. To do anything analagous in SML you have to use functors, which is substantially less convenient. I think people who refer to ML's parametric polymorphism in this context must real
95.
▲
by
foldr
2mo ago
HN threads on Go are boring because they always get derailed by someone grousing about the fact that it took a long time to add generics. The history of this has been gone over a thousand times already and it’s really quite undramatic. The
96.
▲
by
foldr
2mo ago
The generic methods that have been added are essentially just syntax sugar. You can now use method syntax in cases where you could equivalently define a function. They’re not the fundamental extension to the type system that some people hav
97.
▲
by
foldr
2mo ago
Right, that was my understanding, but it seems inconsistent with what I quoted from the review.
98.
▲
by
foldr
2mo ago
It’s the same principle as accessibility. We are all poor programmers sometimes, just as we are all impaired in various ways at times even if we don’t have a disability.
99.
▲
by
foldr
2mo ago
You can easily use arena allocation in a GCed language. With modern GCs there's not usually much performance benefit, so it tends to be limited to hot paths.
100.
▲
by
foldr
2mo ago
> The Homeric epic was already an adaptation. The poem used a relatively new technology – the written alphabet – to rework existing mythical traditions [...] Can someone explain this one? I understand that 'The Odyssey' as a ca
101.
▲
by
foldr
3mo ago
You're right that I haven't spent much time thinking about why a project that I'm not involved with, and that is of only moderate general importance, has decided to switch from one programming language to another. Anyone who&
102.
▲
by
foldr
3mo ago
The simplest explanation is that the Bun team decided to try rewriting Bun in Rust because they had some frustrations with Zig. I haven't seen any evidence that there's more to it than that. It's easy to get sucked into all t
103.
▲
by
foldr
3mo ago
Is anyone else failing to understand all the internet drama surrounding this? The rewrite may work out on a technical level or it may not. Let's wait and see. The Bun project did not swear a blood oath to use Zig forever, and it's
104.
▲
by
foldr
3mo ago
Even in Freedomland most people don't carry firearms. What else are you realistically going to do if someone has a gun except run or hide? This seems like a total non-story. Especially in a country with ~30 firearms homicides per year
105.
▲
by
foldr
3mo ago
That’s interesting, thanks. I agree that with all those extra protections enabled, there is no security issue.
106.
▲
by
foldr
3mo ago
Will it not need unsafe-eval, though? It still creates the potential for HTML injection to lead to execution of untrusted code. Execution of untrusted code is the real issue, regardless of exactly how that code ends up being evaluated and e
107.
▲
by
foldr
3mo ago
This is a pretty good argument in the case of software written by a small team of experienced engineers. In that scenario, if the engineers don't have the nous to avoid the kinds of HTML injection vulnerabilities that might allow an at
108.
▲
by
foldr
3mo ago
It means that you have to use a less strict Content-Security-Policy, which increases your vulnerability to various client-side JS attacks.
109.
▲
by
foldr
3mo ago
>do you see any reason that std::optional<uint8_t> max; couldn't just be a regular uint8_t? It's so that if (max) is truthy iff max has been assigned (including the case where it's been assigned zero). I don
110.
▲
by
foldr
3mo ago
He can make that case to the investigating committee. If Farage finds that inconvenient then, well, the easiest way for him to avoid such scrutiny in future is to declare any large amounts of money he receives. Not that difficult, and sure
111.
▲
by
foldr
3mo ago
Investigating Farage for failing to declare donations and gifts is neither “lawfare” nor a plausible means of removing him as an MP. It’s just the Parliamentary Standards Comittee doing its job. No legal penalty is on the cards. The worst t
112.
▲
by
foldr
3mo ago
I agree. However, as it's clear that OP is not an AAVE speaker writing a comment in AAVE ( https://news.ycombinator.com/item?id=48880115 ), I thought you were being somewhat facetious.
113.
▲
by
foldr
3mo ago
The system has proved to be quite dynamic, really. The electorate have had real choices over the past 10-15 years. Stay in the EU or don’t. Elect a genuine socialist or a centre-right conservative as Prime Minister. And unpopular or incompe
114.
▲
by
foldr
3mo ago
Sure, but they also teach you to use SAE in contexts where that's expected (like most written work).
115.
▲
by
foldr
3mo ago
A does unethical things to B, therefore I can do unethical things to A. This clearly doesn't work as an argument if A and B are people. Seems like classic 'two wrongs make a right' reasoning.
116.
▲
by
foldr
3mo ago
This is obviously true to a large extent, but it is also weirdly necessary to explain basic ethical precepts to a surprisingly large number of otherwise well-educated people. Believe it or not, a significant number of people simple don’t kn
117.
▲
by
foldr
3mo ago
“Oh right, all that stuff I did”, as Side Show Bob put it.
118.
▲
by
foldr
3mo ago
It's actually quite hard to say, as there are no official figures on arrests specifically for social media posts in either country. And lot of the specific cases that people point to in the UK (e.g. Lucy Connolly) have parallels in the
119.
▲
by
foldr
3mo ago
Many moderate people will respect Count Binface's stand on Ceefax, but what about this extremist nonsense about building an affordable house?
120.
▲
by
foldr
3mo ago
I think the point is that preventative action against crime is unquestionably good to about the same extent that enforcing the law is unquestionably good. In both cases there are exceptions, but few would question that it’s a good thing to
More ›