Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
lock1
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
61.
▲
by
lock1
1y ago
To be fair to Sean (post author), it does kind of make sense if you view "make invalid states unrepresentable" from distributed system perspective (Sean's blog tends to cover this topic) as it way more painful to enforce ther
62.
▲
by
lock1
1y ago
+1 In cases like electronics & protocols, it's very often a good idea to add an extra "reserved & unused" section for compatibility reasons. These representations need not be 1:1 with the domain model. Different versi
63.
▲
by
lock1
1y ago
> What is ValidatedData? A subset of the Data that is valid? Usually, but not necessarily. `validate()` might add some additional information too, for example: `validationTime`. More often than not, in a real case of applying alg
64.
▲
by
lock1
1y ago
Unrelated with GP post: What's wrong with Java's Optional? IIRC it doesn't fulfill monad axiom, but I don't think there's a huge problem with it. By the time you're using Option<>-like, I don't think
65.
▲
by
lock1
1y ago
Yeah, sure, I have a fair share of complaints on Windows too. Since Win XP, I think there has always been some kind of jank around Windows auto-hide taskbar, and it still persists on Win 11 which irritates me quite a lot. Closed-source does
66.
▲
by
lock1
1y ago
Installing stuff with your package manager? In my experience, it's still quite annoying and fragmented in Linux desktop to install stuff here. GUIs like KDE Discover exist, but sometimes it doesn't do the things I expect them to d
67.
▲
by
lock1
1y ago
> Most people on earth should be using Linux I don't think the current state of the Linux desktop is ready for that. Linux desktop still loves to show its sharp edges from time to time. Sure, I do also think most of Windows stuff no
68.
▲
by
lock1
1y ago
When I first saw "Parse, don't validate" title, it struck me as a catchy but perhaps unnecessarily clever catchphrase. It's catchy, yes, but it felt too ambiguous to be meaningful for anyone outside of the target audienc
69.
▲
by
lock1
1y ago
Disclaimer: I didn't have any production experience, only side projects in both C++ & Rust. I think the problem with `T &d` and `T d` is that these 2 declarations yield a "name" `d` that you can operate on very simila
70.
▲
by
lock1
1y ago
Maybe, but "thread" is a widely accepted term even though it's closely related to "fiber" both in concurrency (coop/preempt multitask) and general day-to-day sense (textile).
71.
▲
by
lock1
1y ago
While I like CD's works, I would say "CD / Blur" is the least informational of all the CD slash series. I guess it's a fun and more accessible option, but it certainly lacks depth compared to something like 3B1B
72.
▲
by
lock1
1y ago
To be fair, "fiber" is a pretty well known term in the context of concurrency. The post author did not make it up.
73.
▲
by
lock1
1y ago
Unrelated to the gp post, but isn't LLMs more like a deterministic chaotic system than a "non-deterministic" one? "Tiny changes to the input can change the output quite a lot" is similar to "extreme sensitivity
74.
▲
by
lock1
1y ago
For a traditional roguelike, it's Pixel Dungeon & its forks. Played Cogmind a bit recently.
75.
▲
by
lock1
1y ago
Real life might be a (hardcore) roguelike game too! ... except you can't restart on failure or reroll your starter kit
76.
▲
by
lock1
1y ago
Interesting anecdote. At $DAYJOB, I'm currently migrating a non-performance sensitive system to a functional style, which requires defining basic functional types like Option<> and Result<>. So far I think it works pretty w
77.
▲
by
lock1
1y ago
It shares the same important property (short-circuiting, explicit & type checkable) with Rust's `Result<>`, yes. I don't think it's a direct equivalent though - Java's exception creates stack trace by default -
78.
▲
by
lock1
1y ago
The only way to handle a checked exception is either by declaring `throws` in the function signature to propagate it, or by using annoying try-catch statement. Then, due to the verbosity of try-catch, some decided to misuse it with an empty
79.
▲
by
lock1
1y ago
Ah, I'm bookmarking this. Thanks for writing this :) I love how you put it: "grab a fucking profiler before you optimize". I get complaints sometimes about using FP because of performance, and I think a variant of "grab
80.
▲
by
lock1
1y ago
Disagree. Given the current popularity of dynamic languages and the fact that many people don't understand the value of ADT, newtype pattern, C-like enum even in static languages, I'd argue booleans & primitives are way overus
81.
▲
by
lock1
1y ago
Yeah, Java's generics still kind of suck. There's a rumor after project Valhalla, Java language maintainers might add reified generics in the future. However, I think the current state of Java ADT & generic isn't that bad
82.
▲
by
lock1
1y ago
Agree with your point. Writing good tests & utilizing type system properly should help a lot with catching bugs. But for some reason writing tests always reminds me with xkcd "Standards" ( https://xkcd.com/927&#
83.
▲
by
lock1
1y ago
You could overload operator=() in C++ with a call to exit(), which fulfills "variable assignment that halts the program".
84.
▲
by
lock1
1y ago
I don't think base manim support interactive 3D env. But Grant & Ben Eater built "an interactive video" back then about quaternion which you can interact with. Links: - https://eater.net/quaternions - ht
85.
▲
by
lock1
1y ago
I guess it's reasonable to be hopeful as a Java developer nowadays. Modern Java communities are slowly adopting the common FP practice "making illegal states unrepresentable" and call it "data oriented programming".
86.
▲
by
lock1
1y ago
Isn't that line of reasoning implies companies with multi-billion dollars in their war chest are much more "human" than a literal human with student loans?
87.
▲
by
lock1
1y ago
Or "point-less" style ;) Could you elaborate? AFAIK tacit programming tend to be scrambling around composition, paren, and args which makes left-to-right reading significantly harder for function with arity greater than 2. I find
88.
▲
by
lock1
1y ago
Unfortunately belt speed gain per tier is linear and 1:3 blue:yellow belt.
89.
▲
by
lock1
1y ago
Tracker music? Pretty sure communities that develop those tools and use them to create music still exist. Relevant link: Ahoy - Trackers: The Sound of 16-Bit - https://www.youtube.com/watch?v=roBkg-iPrbw
90.
▲
by
lock1
1y ago
"... pretty QR codes", reminds me of a paper from SIGGRAPH 2025 I saw a few weeks ago. "Claycode: Stylable and Deformable 2D Scannable Codes" https://arxiv.org/abs/2505.08666 https://clay
More ›