Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
mrkeen
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
20 ms
·
391.
▲
by
mrkeen
10mo ago
> side effects are not necessarily a bad thing. unintentional side effects are Right. Just like Strings aren't inherently bad. But languages where you can't tell whether data is a String or not are bad. No language forbids ef
392.
▲
by
mrkeen
10mo ago
I'm all for FP, but there's no way the mainstream is taking side-effects seriously. Neither Kotlin nor Rust cares about effects. Switching to Kotlin/Rust for FP reasons (and then relying on programmer discipline to track effe
393.
▲
by
mrkeen
10mo ago
> that specific example is wrong This will be discovered at compile time if you use immutability & types like the article suggests. > So the assumption that you either are loading XOR have data XOR have an error does not hold. If
394.
▲
by
mrkeen
11mo ago
> The old auto-increment IDs were totally fine—until suddenly they weren’t, because multiple shards couldn’t share the same global counter anymore. > Their workaround was simple and surprisingly effective: they offset new IDs by a hug
395.
▲
by
mrkeen
11mo ago
void* is a problem because the caller and callee need to coordinate across the encapsulation boundary, thus breaking it. (Internally it would be fine to use - the author could carefully check that qsort casts to the right type inside the .
396.
▲
by
mrkeen
11mo ago
One of the perks of being distributed, I guess. The kind of failure that a system can tolerate with strict fsync but can't tolerate with lazy fsync (i.e. the software 'confirms' a write to its caller but then crashes) is prob
397.
▲
by
mrkeen
11mo ago
TCP (which you recommended - but doesn't just "solve distributed programming) is only amazing to the extent that it solves UDP's problems.
398.
▲
by
mrkeen
11mo ago
You can't avoid distributed unless your users live inside your database.
399.
▲
by
mrkeen
11mo ago
It's not unassuming. Rust is superior to many other languages for making this risky behaviour visually present in the code base. You can go ahead and grep your codebase for this today, instead of waiting for an incident. I'm a
400.
▲
by
mrkeen
11mo ago
A queue with persistent storage is like a ledger whose entries don't vanish when you read them, or a git branch whose commits stick around for longer than 24-72 hours. It's popular because it didn't have any competition while
401.
▲
by
mrkeen
11mo ago
⊕ is variable! Just like g1 or g2. I specifically didn't use an already-existing symbol because then you wouldn't know if I'm talking about that symbol, or any symbol in general. Integer-multiplication is associative, E.g.
402.
▲
by
mrkeen
11mo ago
But I have the compiler write the type annotations for me. If it can't do that, it makes my job harder to make sure top-level functions have types.
403.
▲
by
mrkeen
11mo ago
They're just spooky names for simple concepts - and the article defines them on first use. If abstract algebra were a requirement, they'd skip these definitions. Paraphrasing 'Group' from the article to see if I've
404.
▲
by
mrkeen
11mo ago
I grabbed the code from the article and annotated it with the different cases from the famous picture* switch (expr.kind) { case "number"/"string"/"var": ... [Var] case "call&qu
405.
▲
by
mrkeen
11mo ago
> People just got fed up with the push toward pure FP and the complexity. Pure FP and category theory Amen. My eyes start to glaze over whenever I read about covariance. It's one thing if a feature works because of category theor
406.
▲
by
mrkeen
11mo ago
Latency = Partition. There is code running on a server. When poll that server, that code will choose (in the best case) between given you whatever answer it has Available, or it will check with its peers (on a different continent) to make
407.
▲
by
mrkeen
11mo ago
Yep. Your SQL transactions are only consistent to the extent that they stay in the db. Mashing F5 is a perfect example of stepping outside the bounds of consistency. If want to update a counter, do you read the number on your frontend, add
408.
▲
by
mrkeen
11mo ago
Just like Git. Why bother with all these branches, commits and merges? Just make it so everyone's revision steps forward in perfect lockstep.
409.
▲
by
mrkeen
11mo ago
It's wishful thinking. It's like choosing Newtonian physics over relativity because it's simpler or the equations are neater. If you have strong consistency, then you have at best availability xor partition tolerance. "
410.
▲
by
mrkeen
11mo ago
The interactive lambda-calculus interpreter looks like it does the right thing, not that I've tried to push it too hard. Can't comment on the delta-nets. If you're looking for a real person who's been plugging away at p
411.
▲
by
mrkeen
11mo ago
> Another criticism comes from functional programmers, who argue that you don’t need to maintain invariants and thus don’t need much information hiding if data is immutable. Yep > Information hiding also encourages people to create sm
412.
▲
by
mrkeen
11mo ago
Let's make the interface so special that it gets its own file type. Let's say '.h' for "header".
413.
▲
by
mrkeen
11mo ago
But OOP needs something to distinguish it from the rest, otherwise it's just P. Do people honestly think other languages don't do whatever definition OOP has today? Encapsulation & polymorphism? Message-passing & late-bi
414.
▲
by
mrkeen
11mo ago
I've done this. We have a customer whom we bill for feature X. Does he actually have feature X or are we billing him for nothing? With ES: We see his Subscriptions and Cancellations and know if he has feature X. Without ES: We don'
415.
▲
by
mrkeen
11mo ago
If you segregate your read and write, i.e put a (P)artition between them, and require writes to be (A)vailable when reads are down (and vice-versa), then you're either inconsistent, or eventually-consistent.
416.
▲
by
mrkeen
11mo ago
I've heard worse, e.g. You use POST for your Cs and GET for your Qs. Tada !
417.
▲
by
mrkeen
11mo ago
> What's your response to the common theme that event sourcing systems are difficult to maintain in the face of constantly changing product requirements? I've been on an ES team at my current job, and switched to a CRUD monolit
418.
▲
by
mrkeen
11mo ago
> it expects a level of correct-design-up-front which isn't realistic for most teams. The opposite is true. A non-ES system is an ES system where you are so sure about being correct-up-front that you perform your reduce/fold st
419.
▲
by
mrkeen
11mo ago
> Event sourcing shines when the business actually cares about history (finance, compliance, complex workflows) Flip it on its head. Would those domains be better off with simple crud? Did the accountants make a wrong turn when they swi
420.
▲
by
mrkeen
11mo ago
> Just because CQRS might make it easier to split Or segregate even.
More ›