Viewing profile — el_pollo_diablo
el_pollo_diablo
HN member- Joined
- Thu, Nov 30, 2023, 3:24 PM UTC
- HN karma
- 112
- Public activity
- 46 items
- HN profile
- View on Hacker News ↗
About el_pollo_diablo
No profile information was provided.
Recent public activity
-
comment
Comment #49069500
> a single proof covering the most precise description of the program's behavior is more compact Yes, and a program is most compact when all modules have been merged, and all funct…
-
comment
Comment #49069363
In my view, a major selling point of dependent types when it comes to reasoning, is that by bundling logical properties with a runtime value, they require no separate effort to pro…
-
comment
Comment #49068969
I am not sure what you mean. Of course proving a new property generally implies reasoning on each elementary step of the program. My point is that, assuming you have already proved…
-
comment
Comment #49066421
I have already written it, and I will write it again: dependent types and total functions do not scale. Maintenance is terrible. Suppose that you have managed to write a non-trivia…
-
comment
Comment #48209876
> probably meaning on an address that’s a multiple of sizeof(int), but who knows Sigh. s/sizeof(int)/_Alignof(int)/. There are good reasons for an implementation to have sizeof(int…
-
comment
Comment #48141406
Type punning via unions is not UB in C in general, but it is in C++ IIRC. I write "in general" because, as with other forms of memory reinterpretation (memcpy or copy through a cha…
-
comment
Comment #47919458
So there are now two ways to represent the same state: None or Some(struct whose fields are all None). Even though one of these representations is never produced by the deserializa…
-
comment
Comment #47423831
This reminds me of Jacques Carelman's Catalogue d'objets introuvables. Highly recommended. It has already been mentioned on HN: https://news.ycombinator.com/item?id=9789216
-
comment
Comment #46300081
Capturing invariants in the type system is a two-edged sword. At one end of the spectrum, the weakest type systems limit the ability of an IDE to do basic maintenance tasks (e.g. r…
-
comment
Comment #45769183
Years ago the research team behind OCaml released Chamelle, a version of the language localized in French, as an April fool's joke: https://gallium.inria.fr/blog/ocaml-5/
-
comment
Comment #45666287
I would put the emphasis on a different word: > This article is made and published by Anna Hartz, which may have used AI in the preparation Which , not who . They're not even sure …
-
comment
Comment #44455379
Head and tail make sense for persistent lists in functional languages with value semantics, yes. The intrusive, mutable, doubly-linked loops with reference semantics under discussi…
-
comment
Comment #44448891
> Are you saying the only real way to program is with generic data structures? Certainly not. As I said, the experienced programmer knows when (not) to use them. Some programs are …
-
comment
Comment #44441657
You mean the downside that we also already know, i.e. that there are some situations where a custom data structure would be superior for various reasons (e.g. smaller footprint)? E…
-
comment
Comment #44432450
Absolutely. Wrapping the distinguished entry point in a new structure type equipped with a thin type-safe wrapper API that covers the most common use case is the way to go.
-
comment
Comment #44432116
Not to mention that they insist on calling every entry of the list a "list head", which makes no sense (hysterical raisins, maybe?). The structure is made of a uniform loop of entr…
-
comment
Comment #44431157
None, but that is not my point. Before C23, fn() already meant the same thing as fn(void) in function definitions , which the situation under discussion here. C23 changed what fn()…
-
comment
Comment #44431120
Sure, but it is also very common for C programs to contain data structures that have one use in the program, and could still be instances of a generic type. You mentioned red black…
-
comment
Comment #44431079
If, by "situation", you mean the development of a small program with so many constraints that using existing libraries is out if the question, then yes. Otherwise, that seems unwis…
-
comment
Comment #44428902
Sure, but your alternative code incorrectly assigns to (list)->payload. You have many other options. Without typeof, you can if(0) the assignment, or check type compatibility with …
-
comment
Comment #44428613
This is about a function definition, not a random function declarator. C23 does not change anything in that case.
-
comment
Comment #44428577
C23 does not change anything in this situation, because we are talking about the definition of main(), not a forward declaration. More details here: https://news.ycombinator.com/it…
-
comment
Comment #44209675
Sure, that sort of language-specific idiosyncrasy must be dealt with in the compiler's front-end. In TFA's C example, consider that their loop while (i just needs a slight transfor…
-
comment
Comment #44208930
> In fact, even state-of-art compilers will break language specifications (Clang assumes that all loops without side effects will terminate). I don't doubt that compilers occasiona…
-
comment
Comment #43458954
> seL4 is the only microkernel that has a proof of correctness ProvenCore ( https://provenrun.com/provencore/ ) has a proof that covers correctness (memory safety, and more general…