Hacker Newsnew | past | comments | ask | show | jobs | submit | yu3zhou4's commentslogin

On Safari mobile it shows a modal that can’t be scrolled nor closed

Yeah, it's not mobile-friendly. didn't get a chance to look into it

Good luck to everyone in achieving their goals and exploring new paths!

To me it's deep learning compilers since mid 2025. I am a person who can't learn just from reading books, so 80% of time I learn by doing (contribute to PyTorch) and 20% of time I read books (now: Engineering a Compiler from Keith Cooper and Linda Torczon) and talk to LLMs to fill gaps in my understanding.

My main quest now is to build a bridge [0] between PyTorch and universal GPU computing world - which I believe WebGPU might become. What it requires is to build is 1) a runtime for executing PyTorch ATen operations on WebGPU by running WGSL shaders and 2) a compiler, so you can use full PyTorch power with @torch.compile

[0] - https://github.com/jmaczan/torch-webgpu


WebGPU backend for PyTorch

https://github.com/jmaczan/torch-webgpu


Glad you enjoyed it, your comment made my day


Is Dragon book still relevant? Do you recommend any other learning resources other than reading the source and contributing to llvm?


IMHO absolutely. The basics of lexer and parser are still there. Some of the optimizations are also relevant. You just cannot expect to read the book and be able to write GCC or LLVM from scratch(1).

For learning deeper about other advanced topics there is:

https://www.cs.cornell.edu/courses/cs6120/2025fa/

and

https://mcyoung.xyz/2025/10/21/ssa-1/

So maybe writing a compiler with exactly one FE (for a simple language) and one BE (for a simple architecture), with say 80% of the optimizations could be a doable project.

(1) We should define what we mean by that, because there are thousands of front-ends and back-ends.


I heard that new volume is updated with newer stuffs like data flow analysis, garbage collection, etc. Anyway the book doesn't teach you how to build a basic working compiler, so need to consult another materials.

Try Andrew Appel's "Modern Compiler implementation in Java/C/ML" or Writing a C Compiler (https://norasandler.com/book) which is much more recent.

Eventually, you'd want to hack GCC/LLVM because they are production-grade compilers.


> Is Dragon book still relevant?

No, not at all, the teachings and techniques have been surpassed since four decades or so.

The algorithm LALR is flawed, it only works for a subset of CFG instead of all. That alone is already a death blow. If you want to try out BNF grammars in the wild, it is nearly guaranteed that they are complex enough for LALR to shit itself with S-R conflicts.

The technique of generating and dumping source code is awkward and the reasons that made that a necessity back then are no longer relevant. A good parser is simply a function call from a code library.

The technique of tokenising, then parsing in a second pass is awkward, introduces errors and again the reasons that made that a necessity back then are no longer relevant. A good parser works "on-line" (term of art, not meaning "over a computer network" here) by tokenising and parsing at the same time/single-pass.

The book precedes Unicode by a long time and you will not learn how to properly deal with text according to the rules laid out in its various relevant reports and annexes.

The book does not take into consideration the syntactic and semantic niceties and features that regex have gained since and thus should definitely also be part of a grammar parser.

> recommend any other learning resources

Depends on what your goals are. For a broad and shallow theoretical introduction and to see what's out there, browse the slide decks of university lectures for this topic on the Web.


Thanks. I'd like to learn the most important things in traditional compilers that are still relevant and translate these skills into ML compilers


I taught in the past and still like the trilogy of books

> Modern Compiler Implementation by Andrew W. Appel

It comes in three flavors C, ML (Meta Language), and Java

https://www.cs.princeton.edu/~appel/modern/

Writing a compiler in Standard ML is as natural as writing a grammar and denotational semantics.

Compiler writing is becoming an extinct art.


The ML version is my favourite and I can vouch for the books being quite interesting.

For more modern folks, one can use the ML version as inspiration for doing the book exercises in OCaml, Haskell, F# or Rust.

Writing compilers for a living, and CS research is a niche domain, not something I would consider an extinct art.


Thanks!

Are you sure it’s an extinct art though? LLVM is flourishing, many interesting IRs come to life like MLIR, many ML-adjacent projects build their own compilers (PyTorch, Mojo, tinygrad), many big tech like Intel, AMD, Nvidia, Apple and others contribute to multiple different compilers, projects integrate one to another at different levels of abstraction (PyTorch -> Triton -> CUDA) - there is a lot of compilation going on from one language to another

Not to mention many languages in a mainstream that weren’t that popular 10 years ago - think Rust, Zig, Go


The prominence of LLVM is a symptom of the dying of compiler writing as an art, not evidence of its vitality.


> compiler writing as an art

cooking is an art. software is engineering. no one would say "building skyscrapers as an art is dying".


You should look into GraalVM as well, as it is another approach for compiler development.


I'll take the bait.

Do you distinguish between writing a compiler and writing an optimizing compiler, and if so, how is writing an optimizing compiler an extinct art?

Equality saturation, domination graphs, chordal register allocation, hardware-software codesign, etc there are many new avenues of research for compilers, and these are just the ones on the top of my head that are relevant to my work. Most optimization work is R&D and much of it is left unimplemented at scale, and things like the phase-ordering problem and IR validation are hard to do in practice, even given ample resources and time.


I heard that the ML version was a translation of the C version, and is thus not easy to follow along. Or it may have been the other way around!


The other way around, the best book is the ML version, the other two try to do ML in the respective language.

Ironically, now with modern Java you can that much easier than the approach done in the Java variant back in 1997.


There a free online accredited master's degree in Financial Engineering (https://www.wqu.edu/mscfe), probably not for OP but maybe some find it useful for them


Are there any alternative mobile OSes actively developed? I remember Ubuntu Touch was the thing and something from Firefox, but not sure if they are continued?


Ubuntu Touch is still a thing.

We also have PostmarketOS (alpine base) and Mobian (debian base) as frontrunners. Supposedly Arch Linux for ARM and openSUSE Tumbleweed are also used by some on mobile.


There's HarmonyOS [1], which is developed by Huawei, and which has a similar mix of open (OpenHarmony) and proprietary components. I haven't used it, but it's supported by quite a few phones and sort of surprised it wasn't mentioned anywhere on this thread.

[1]: https://en.wikipedia.org/wiki/HarmonyOS




I think gp meant a physical/print copy in the snail mail


I see no article in the link, just "news250922" header with some layout


It’s up again, check it.

Twitter/X post link: https://twitter.com/deepseek_ai/status/1970117808035074215

Also Hugging Face model link: https://huggingface.co/deepseek-ai/DeepSeek-V3.1-Terminus


Very inspiring story, congrats on your journey!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: