HNHacker News
TopNewBestAskShowJobs

gignico

238 karma · joined March 16, 2025

submissionscomments
gignico··on Scientists are working on "everything vaccines"
Evolution is not a process toward better quality of life and life expectancy of individuals. As long as enough individuals can reach the age to procreate in their environment evolution is done. Evolution didn’t train our bodies to reject the diseases we already have the vaccines for neither, so your reasoning would apply to smallpox as well. And what about viruses appeared after Homo sapiens evolved (such as HIV)?
gignico··on Intuiting Pratt Parsing
Until you need to do more than all-or-nothing parsing :) see tree-sitter for example, or any other efficient LSP implementation of incremental parsing.
gignico··on Reports of code's death are greatly exaggerated
I don’t know if someone said it already, but when Steve Jobs said this famous quote (“reports of my death are greatly exaggerated”) he then died maybe just a couple of years later.

Hope this does not happen to code :)

gignico··on My “grand vision” for Rust
Your statement contradicts itself. It was unusable hard before non-lexical lifetimes, but they vastly increased the complexity? Then maybe what’s complex for compiler writers to implement can make the user’s life easier by lowering the complexity of their code?
gignico··on My “grand vision” for Rust
I'm not sure it shows that. Even basic features of Rust we take from granted come from concepts common users do not need to understand. Borrowing of lifetime draws from affine types, but nobody cares when writing Rust code. If in 2012 you read a similar article explaining borrow checking in academic terms you would have thought Rust would be unusably hard, which is not.

Also I do not think that adding features is always bad to the point of comparing with Scala. Most of the things the article mentions will be almost invisible to users. For example, the `!Forget` thing it mentions will just end up with users getting new errors for things that before would have caused memory leaks. What a disgrace!

Then, pattern types allow you to remove panics from code, which is super helpful in many critical contexts where Rust is used in production, even in the Linux kernel once they will bump the language version so far.

gignico··on Devirtualization and Static Polymorphism
Well, Rust as well has been around for more than 10 years now. I don't imply Rust invented the approach. Surely academia knew about it decades before. I was rather commenting on how one's mental model of things can change by learning new languages.
gignico··on My “grand vision” for Rust
I think the misunderstanding here is that the article was not intended to users but to other language designers.

As a user, using a feature such as pattern types will be natural if you know the rest of the language.

Do you have a function that accepts an enum `MyEnum` but has an `unreachable!()` for some variant that you know is impossible to have at that point?

Then you can accept a `MyEnum is MyEnum::Variant | MyEnum::OtherVariant` instead of `MyEnum` to tell which are the accepted variants, and the pattern match will not require that `unreachable!()` anymore.

The fact someone does not know this is called "refinement types" does not limit their ability to use the feature effectively.

gignico··on Galileo's handwritten notes found in ancient astronomy text
It’s unbelievable how that 16th century book looks like it is written in LaTeX. Or plain TeX, probably, given its age XD
gignico··on 10-202: Introduction to Modern AI (CMU)
I think the problem is the under representation of other branches of AI research: knowledge representation, automated reasoning, planning, etc.

These are important topics with important industrial applications which have the only downsides to not be suitable for implementing friendly chatbots and for raising the stocks of Silicon Valley companies.

gignico··on Devirtualization and Static Polymorphism
> Under the hood, a virtual table (vtable) is created for each class, and a pointer (vptr) to the vtable is added to each instance.

Coming from C++ I assumed this was the only way but Rust has an interesting approach where the single objects do not pay any cost because virtual dispatch is handled by fat pointers. So you carry around the `vptr` in fat pointers (`&dyn MyTrait`) only when needed, not in every instance.

gignico··on Defer available in gcc and clang
That’s great news!
gignico··on Defer available in gcc and clang
I was under the wrong assumption that defer was approved for the next standard already.
gignico··on Defer available in gcc and clang
Absolutely, it's not their first language. In our curriculum C programming is part of the Operating Systems course and comes after Computer Architecture where they see assembly. So its purpose is to be low level to understand what's under the hood. To learn programming itself they use other languages (currently Java, for better or worse, but I don't have voice on that choice).
gignico··on Defer available in gcc and clang
I’m just going to start teaching classes of C programming to university first-year CS students. Would you teach `defer` straight away to manage allocated memory?
gignico··on Claude’s C Compiler vs. GCC
Exactly. This flawed argument by which everything will be fixed by future models drives me crazy every time.
gignico··on We tasked Opus 4.6 using agent teams to build a C Compiler
> To stress test it, I tasked 16 agents with writing a Rust-based C compiler, from scratch, capable of compiling the Linux kernel. Over nearly 2,000 Claude Code sessions and $20,000 in API costs, the agent team produced a 100,000-line compiler that can build Linux 6.9 on x86, ARM, and RISC-V.

If you don't care about code quality, maintainability, readability, conformance to the specification, and performance of the compiler and of the compiled code, please, give me your $20,000, I'll give you your C compiler written from scratch :)

gignico··on Ask HN: Anyone else struggle with how to learn coding in the AI era?
I see your point about pragmatic software engineering not being valued enough in university programs. Somehow the incentives are not aligned properly, which is unfortunate. I try to be as pragmatic as possible when I happen to teach courses where this makes sense. Next semester I'll probably teach "C programming" again after a few years, which is always fun for the students, who will never see a raw pointer again in their career.
gignico··on Ask HN: Anyone else struggle with how to learn coding in the AI era?
My two cents as a university teacher:

In my view AI tools are a sort of super-advanced interactive documentation. You can learn factual information (excluding allucinations) by either asking or looking at the generated code and explanations of it. But in the same way documentation alone was not a sufficient learning tool before, AI is not now.

What AI cannot give you and I suggest you to learn through other resources:

- algorithmic proficiency, i.e. how to decompose your problems into smaller parts and compose a solution. You don’t necessarily need a full algorithms course (even though you find good ones online for free) but familiarising with at least some classical non-trivial algorithm (e.g. sorting or graph-related ones) is mind-changing.

- high-level design and architecture, i.e. how to design abstractions and use them to obtain a maintainable codebase when size grows. Here the best way is to look at the code of established codebases in your preferred programming language. A good writer is an avid reader. A good programmer reads a lot of other people’s code.

- how programming languages work, i.e. the different paradigms and way of thinking about programming. This lets you avoid fixing on a single one and lets you pick the right tool for each task. I suggest learning both strongly-typed and dynamic languages, to get the feeling of their pros and cons.

That’s an incomplete list from the top of my mind.

You can still use AI as a tool in learning these things, but good old books and online resources (like Coursera) worked really well for decades and are not obsolete at all.

And the last thing is the most important: curiosity about how things work and about how to make them better!

gignico··on Apple I Advertisement (1976)
Even better, what if I had invested that money in Apple stock instead? :)
gignico··on Apple I Advertisement (1976)
At $666.66 this must have been a diabolic deal!
gignico··on Fedora Asahi Remix is now working on Apple M3
That's cool!
gignico··on Fedora Asahi Remix is now working on Apple M3
Is that display port over USB-C? That’s the main showstopper for me to use Asahi on my M1 Pro MBP.
gignico··on Is Rust faster than C?
The article does not mention the possible additional optimisation opportunities that arise in Rust code due to stricter aliasing rules of references. But I don’t have an example in mind. Does anyone know of an example of it happening in real code?
gignico··on Immer – A library of persistent and immutable data structures written in C++
I used this library extensively in a prototype of a project and it was awesome!

Besides performance, the API is very well thought.

gignico··on Z3 API in Python: From Sudoku to N-Queens in Under 20 Lines (2015)
I was about to comment the same. Z3 always takes all the credit but cvc5 is just as great!
gignico··on Typst: A Possible LaTeX Replacement
Actually number 5 is not an issue. Defining macros in the preamble is a custom but you can define macros anywhere.
gignico··on Peru's Great Urban Experiment (2023)
Yes, Peru (and South America in general) can be fairly dangerous for people used to Europe or the US, but if you let you be guided by someone who knows where to go, it is a wonderful place. My wife herself is Peruvian but lived in Europe for her whole life so it was a new experience for her as well. We travelled on a tour planned by a travel agency ad-hoc for our honeymoon, so we were alone (not in a group) but we were escorted by private guides for all the travel, who organized both the transports and the touristic activities. Schedules were tight so it was challenging, but really rewarding! On top of the usual famous places like Machu Pichu I also greatly recommend the amazonian region. We went to a lodge on the Marañon river some kilometers from the source of the Amazon River and met local tribes (including one of the five last speakers of a disappearing local ancient language). Great memories for sure!
gignico··on Peru's Great Urban Experiment (2023)
I've visited Chan Chan during my honeymoon last year, it's impressive! All Peru is impressive, north to south. Highly recommended!
← PreviousPage 2 of 2