Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
weavejester
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
weavejester
4d ago
> Right; the difference is that by the destructing time you have lost the type information about that ‘discarded’ data, meaning you no longer know how to discard it. In Clojure this is not a problem, because the only values you're a
2.
▲
by
weavejester
5d ago
> These two types aren't typing the same data, though: in the latter case (in Rust) you've actually thrown away some of the data, and the type reflects that. In Clojure the data is thrown away too, just at a slightly later poin
3.
▲
by
weavejester
5d ago
> I'm not totally sure how to interpret this question. If I already have a type that includes all the values I want as a subset, I can restrict that type by limiting the values it can take and restricting or removing the operations
4.
▲
by
weavejester
6d ago
> Nothing (ish: you have to be careful to describe what happens to all the integer operations when restricted to your type) — that's a totally valid way to define a type. Then at which point does a type become equivalent to a rest
5.
▲
by
weavejester
7d ago
> Here we disagree. Unsigned 8-bit integers† and signed 64-bit integers, while both conveniently notated with Arabic numerals, are actually different values that support different operations, for example negation. What about a 32 bit uns
6.
▲
by
weavejester
8d ago
> To reiterate: a type doesn't limit the values but specifies the values (or rather, more generally, the meaningful operations on a value of that type). But a value can have more than one possible type. The number 1 could come fro
7.
▲
by
weavejester
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. I think you're using 'value' to mean something slightly different to the way I m
8.
▲
by
weavejester
8d ago
Types are used to both define how data is represented in memory and to restrict which values are allowed. For instance, an enum might be internally represented as a byte, but the compiler further restricts the permitted values to those the
9.
▲
by
weavejester
9d ago
Regardless of whether the type information is static or dynamic, you're still coupling some type to some data. The type is still implicit even after compilation; there still exists a structure to the data, even if that structure isn&#x
10.
▲
by
weavejester
1mo ago
There's a parallel between welfare and passive gains from diversified investments; yet as you point out, government welfare is tracked and very visible, while private investments are far more opaque. Part of the wealth that workers cre
11.
▲
by
weavejester
3mo ago
Forgive me if this is an ignorant question, but does your use of the Mainline DHT mean that Bittorrent clients will be responding to P2P address lookups from Iroh?
12.
▲
by
weavejester
3mo ago
Yes, a company needs to extract more value than it pays its employees, if only to cover its other costs. The problem is when employees are significantly underpaid compared to what they produce. Negotiation clearly doesn't work in the g
13.
▲
by
weavejester
3mo ago
There's an argument that if someone agrees to a bad deal, that's their own fault. Where I think it becomes unethical is where there's a significant power imbalance that disadvantages one side. Suppose I buy a painting from a
14.
▲
by
weavejester
3mo ago
Not everyone can afford to take the financial risk of being a founder, and not every business type can be started with low initial capital.
15.
▲
by
weavejester
3mo ago
That's not quite what I'm saying. You may very well have been paid fairly for each job you've taken, assuming that the value you generated for the business was not substantially higher than your salary. But hiring people who
16.
▲
by
weavejester
3mo ago
How many businesses are there that are worth at least $1 billion and employ no-one but the founders? When people say that it's not possible to earn a billion dollars, they're talking about the discrepancy between the wealth gained
17.
▲
by
weavejester
3mo ago
> You effectively have to keep the types of all the things involved in your head and/or trace them to ensure that you don't run into a crash. You make this sound difficult, but in practice type errors are rare in Clojure and
18.
▲
by
weavejester
3mo ago
I don't see an asymmetry in the abstraction. Both vectors and maps are associative structures - you can assign a key to a value - the only difference is that vectors have a more constrained keyspace (i.e. ordered, consecutive integers
19.
▲
by
weavejester
4mo ago
I too agree that "until you get better" isn't a good take. To err is human, and even the most experienced developers make mistakes. That said, you don't get static typing for free. As with many things it's a trade-o
20.
▲
by
weavejester
4mo ago
I'm not sure I agree. Certainly there are differences other than syntax, but that doesn't mean syntax is irrelevant. For instance, would Clojure programmers use maps as much if there was no syntax for map literals? Syntax determin
21.
▲
by
weavejester
4mo ago
But syntax must necessarily include what it's representing, no? For instance, `{:a 1}` represents an immutable map in Clojure, in the same way that `42` represents an immutable integer in Java.
22.
▲
by
weavejester
4mo ago
The programming language informs the design of the system. As I said in my earlier comment, an idiomatic Java codebase is going to be designed very differently to an idiomatic Clojure codebase, even if they both intend to solve the same pro
23.
▲
by
weavejester
4mo ago
To be clear, I'm not questioning your choice of runtime or language. I'm just curious why you think that "Programming language syntax scarcely matters", as to me that seems the same as saying "How a codebase is arch
24.
▲
by
weavejester
4mo ago
> Programming language syntax scarcely matters. It does to some extent but we the programmers tend to over-romanticize it. The runtime and its properties are the much better thing to optimize for. I'm not sure I understand this ar
25.
▲
by
weavejester
5mo ago
In the UK there's been a recent spate of nationalist flag flying. Given the artist and location, "blinded by nationalism" is the most likely intended meaning.
26.
▲
by
weavejester
5mo ago
Hype around switching from Windows servers ?
27.
▲
by
weavejester
5mo ago
I'm surprised the article didn't also mention Rich Hickey's metric of complexity; that is, complexity being a measure of how interconnected code is. https://www.youtube.com/watch?v=SxdOUGdseq4
28.
▲
by
weavejester
6mo ago
Typically you're either deploying via a container, in which case there's no more overhead than any other container deployment, or you're deploying directly to some Linux machine, in which case all you need is a JVM - hardly a
29.
▲
by
weavejester
6mo ago
I'll add a note to the cljfmt README to tell people about these commands, as your experience shows that it might not be obvious to people that they likely already have access to cljfmt in Emacs as a result of using LSP or CIDER.
30.
▲
by
weavejester
6mo ago
cljfmt is included with both Clojure-LSP and CIDER, so if you have either installed it should work out of the box. With LSP mode the standard `lsp-format-region` and `lsp-format-buffer` commands should work, and on the CIDER side `cider-for
More ›