Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Twey
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
1.
▲
by
Twey
4d ago
> In Clojure the data is thrown away too, just at a slightly later point. The data is parsed then destructured then processed, and it is at the destructuring stage that irrelevant data is discarded and marked for GC. Right; the differenc
2.
▲
by
Twey
5d ago
> Perhaps we only want to find patients with WBC counts outside a certain range, and discard those lines where the data is invalid. In which case, we could write a narrower type, and simply not parse the CSV rows that are invalid: These
3.
▲
by
Twey
5d ago
> Then at which point does a type become equivalent to a restriction that could be decoupled from the underlying type by choosing a broader type? I'm not totally sure how to interpret this question. If I already have a type that inc
4.
▲
by
Twey
7d ago
> You appear to be saying that the values of a type cannot be a subset of another type; that is, there is no '1', only a '1' that is an integer, a '1' that is a short, and so forth, and every '1' i
5.
▲
by
Twey
7d ago
> But a value can have more than one possible type. The number 1 could come from an unsigned byte, or a signed long, for example. Here we disagree. Unsigned 8-bit integers† and signed 64-bit integers, while both conveniently notated with
6.
▲
by
Twey
8d ago
> I think you're using 'value' to mean something slightly different to the way I meant it. So to get us onto the same page, by 'value', I mean something independent of how its stored; that is, the number 1 is a v
7.
▲
by
Twey
8d ago
In fact the opposite is true: raw values have no valid operations and types allow you to add operations that make sense for those values. It's an unfortunate historical accident, which we're slowly getting over, that we confla
8.
▲
by
Twey
8d ago
I think I struggle to assemble a coherent notion of what it means to (conceptually) decouple a value from its type. You can completely forget the type of a value and treat it as opaque bytes, but then there are no valid operations left on t
9.
▲
by
Twey
9d ago
Or here: https://this-museum-is-not-obsolete.com/
10.
▲
by
Twey
9d ago
> The reason for this is that in Rust, a struct couples type-checking to a fixed data representation. You can't get one without the other. > Clojure decouples data representations from type checking. This is funny to me because s
11.
▲
by
Twey
22d ago
The libertarian take is surely exactly this, with the elitism either stripped out or pushed into the background (depending on your political bent): rather than employees and employers everyone should be a founder of their one-person company
12.
▲
by
Twey
25d ago
> in Clang/GCC the `__` is not explicitly reserved for builtins In fact in C identifiers starting with _ are reserved for the implementation (except for in local scope if the second character is not an underscore or capital letter).
13.
▲
by
Twey
1mo ago
People are very upset, especially in the arts, that Anthropic is changing the text to watermark it, but isn't that missing the point a little bit? They're not changing _your_ text whose every word you've carefully chosen for
14.
▲
by
Twey
1mo ago
You might enjoy Liero (or its modern descendent OpenLieroX) which is similar to Worms but with real-time play (and kept the pixel vibes).
15.
▲
by
Twey
1mo ago
Right, so the definition of higher-kinded types is that the _parameter_ to the trait (here, `Self`) is higher-kinded (here, `* → *`) not that the trait is parameterized. So `impl Functor for List[A]` is not (semantically) correct: it's
16.
▲
by
Twey
2mo ago
Right, I got the notion — but syntactically I expect `Self` to refer to the thing named at the top of the block, which is a `Functor[A]`. I think what both I and the sibling comment are getting at is that there is a difference between `Func
17.
▲
by
Twey
2mo ago
Love to see a real-world example of GRIN! trait Functor[A]: fun map[B](self, f: A -> B) -> Self[B]; This looks a little wacky to me. I see that you can write HKTs in their η-long form and refer to them unapplied (`Funct
18.
▲
by
Twey
2mo ago
I'd go even further: even the ‘cognitive elite’ (the university educated? researchers?) understand only a thin spike of frontier human knowledge, even if they might understand it very deeply. Outside their specialty and maybe a slightl
19.
▲
by
Twey
2mo ago
> Those "demons" didn't eat our lunch? Tell that to the Europeans who were so afraid of naming the bear that its original name is still lost to us :) The Luddites also had a lot to say about the mechanical demons that were
20.
▲
by
Twey
2mo ago
> The result is that we will live in a demon-haunted world, full of marvelous devices whose operation we will not understand, based on engineering principles we will not understand, discovered using formalisms we will not understand. Wel
21.
▲
by
Twey
2mo ago
In constructive mathematics I think you'd be right: to call a problem decidable would require you to produce the algorithm that decides it, so you couldn't call the Collatz conjecture decidable (nor could you call it undecidable!)
22.
▲
by
Twey
2mo ago
We have official government ID (the national insurance number, roughly equivalent to a USian SSN), but names aren't expected to reliably link it in one hop, and we're politically averse to laws that require citizens to produce it
23.
▲
by
Twey
2mo ago
But we are importing this model now in Boris Johnson and Farage. As far as I can see Farage is doing exactly (a British spin on) the GWB strategy: despite having a pretty classical private-school upbringing he's created a ‘bloke from t
24.
▲
by
Twey
2mo ago
> The drawback with more phonetic systems like Gregg is that one has to learn entirely new ways of spelling words. The point of the phonetic systems is that you don't have to ‘spell’ words at all: what you say is what you write. (Th
25.
▲
by
Twey
2mo ago
And yet there is a correct algorithm — it's either the const yes algorithm or the const no algorithm. We don't _know_ which algorithm it is, but that's not relevant to the definition of undecidability, which only requires tha
26.
▲
by
Twey
2mo ago
Quantum computation is not super-Turing: anything you could solve with a quantum Turing machine you could also solve with a classical Turing machine, albeit sometimes a lot slower. We know how to emulate quantum systems in classical systems
27.
▲
by
Twey
2mo ago
Ironically Rust (hence the name) was originally billed as the language that did nothing novel at all, but just productized a bunch of concepts that were already well understood in the PL field :) I think that a programming language — much l
28.
▲
by
Twey
3mo ago
I think that arguably an (active) object à la Kay is itself a process — it doesn't have shared memory with the rest of the program (regardless of how that's achieved).
29.
▲
by
Twey
3mo ago
> Most rewrites answer to the engineer - what they want to learn, what offends their taste, what looks good in an interview - and not to the company paying the salary. One big caveat to this is that a large (and increasing) part of the v
30.
▲
by
Twey
3mo ago
I think it definitely sits at a reasonable point in the tradeoff space here, but it's not the only reasonable point. And it's the nature of tradeoffs that some cases will slip through the cracks.
More ›