Viewing profile — lock1
lock1
HN member- Joined
- Sat, Apr 26, 2025, 1:07 PM UTC
- HN karma
- 197
- Public activity
- 98 items
- HN profile
- View on Hacker News ↗
About lock1
Recent public activity
-
comment
Comment #47859308
CPU interrupt for breakpoint, https://wiki.osdev.org/Interrupt_Vector_Table
-
comment
Comment #47541810
Wait what? I don't get why performance improvement implies reliability and incident improvement. For example, doing dangerous thing might be faster (no bound checks, weaker consist…
-
comment
Comment #47507745
Pretty sure it stands for "Artificial abbreviation & hype GeneratIon" nowadays
-
comment
Comment #47298084
It looks like it. Based on what I observe as an occasional tutor, it looks like compiler warnings & errors are scary for newcomers. Maybe it's because it shares the same thing that…
-
comment
Comment #47224287
There's no special keyword, just a "generic" type `IO ` defined in standard library which has a similar "tainting" property like `async` function coloring. Any side effect has to b…
-
comment
Comment #47145260
> Maybe in the future we don't use these things to write programs but if you think we're going to go the rest of history with just natural languages and leave all the precision to …
-
comment
Comment #47128467
I'm curious, if tagged unions are a subset of sum type, what is your definition of "sum type"? AFAIK, tagged union is sum type, based on sum type mathematical definition.
-
comment
Comment #47061935
> Those are both syntactically valid lines of code. (it's actually one of python's many warts). They are not ambiguous in any way. one is a number, the other is a tuple. They retur…
-
comment
Comment #47059214
> Code is much much harder to check for errors than an email. Disagree. Even though performing checks on dynamic PLs is much harder than on static ones, PLs are designed to be non-…
-
comment
Comment #46979298
> Or is a big part of this concept only relevant for strong functional languages with sum types and pattern matching? It need not strictly be a pure functional language for type-dr…
-
comment
Comment #46975620
That's true, but then again, don't forget the fact that words might get interpreted as different things by different people. Words like "arrow", "functor", or "validate" might get …
-
comment
Comment #46970685
> Because in those examples you can have a User whose email property is a ParseError and you still end up having to check "is the email property result for this user type Email or …
-
comment
Comment #46965687
Coming from a more "average imperative" background like C and Java, outside of compiler or serde context, I don't think "parse" is a frequently used term there. The idea of "checki…
-
comment
Comment #46964312
In the spirit of "Parse, Don't Validate", rather than encode "validation" information as a boolean to be checked at runtime, you can define `Email { raw: String }` and hide the con…
-
comment
Comment #46955963
> This makes those tools, as powerful as they can be, unable to help us think about and enforce correctness across horizons that are not visible from the standpoint of a single pro…
-
comment
Comment #46941790
No, there isn't. I guess you could pick a subset of a particular natural language such that it removes ambiguity. At that point, you're basically reinventing something like COBOL o…
-
comment
Comment #46936470
This kind of comment reminds me of how broad "software development" is. On other HN posts, they're stating something like "software development is dead", "LLM as a compiler", "Do y…
-
comment
Comment #46846022
Why structural is more fundamental? C#'s anonymous type shares some flexibility of structural type system even though it still a nominal type. > A language would only need a single…
-
comment
Comment #46566409
It's still a useful distinction IMO. "Script" PLs tend to be interpreted, dynamic, and handwave various machine-level details. In contrast, "compiled" PLs usually provide you the c…
-
comment
Comment #46514353
FWIW, FAFO is a very good way to learn. Assuming we can respawn indefinitely and preserve knowledge between respawns, driving fast and taking off your seatbelt would definitely tea…
-
comment
Comment #46443341
Well, in a language with nullable reference types, you could use something like fn find (self: List ) -> (T, bool) to express what you want. But exactly like Go's error handling vi…
-
comment
Comment #46342719
Ideally , but realistically, I have never heard of any major programming language that allows you to express "this function only accepts static constant string literal".
-
comment
Comment #46228455
I always wondered if people actually find it beneficial to follow these "design patterns" or not. Personally, I prefer to learn FP patterns, which tend to be backed with nice mathe…
-
comment
Comment #46158949
But in most cases you probably want something disjoint like Rust's `Result `. In case of "it might be success with partial failure", you could go with unnamed tuples `(Option ,E)` …
-
comment
Comment #46053422
That's needlessly aggressive. Ignoring webapps, you could do gamedev without even knowing what a matrix is. You don't even need such construction in most native applications, embed…