News for hackers. Stuff that matters.
Re:Speedy Web Compiler – A Rust port of Babel and Closure Co... by chrisseaton on Sunday December 23, 2018 @01:34PM (#18747552)
Many people working on compilers will have a PhD in the subject. It's an area where it definitely takes many years to get up to speed. As you said yourself it's deeply studied, and studying all that work takes ages.

Compilers are also definitely not well documented. I think they're rather notoriously undocumented with much of our knowledge of the subject passed on orally and existing only in the knowledge of people working in the field.

For example a couple of years ago I went looking for details of a very common compiler technique, called safepoints, used in many major industrial compilers today, and found that there was essentially no written information on them at all. That's pretty extraordinary.

Re:Speedy Web Compiler – A Rust port of Babel and Closure Co... by hyperpape on Sunday December 23, 2018 @01:58PM (#18747679)
Two thoughts:

1. Safepoints are kind of off-topic, because they're part of the interplay between a complex optimizing compiler and the garbage collector/runtime. Babel and its ilk are source-source compilers targeting a language that doesn't have manual memory management. To my mind, that makes things much simpler.

2. How long ago were you searching for safepoint info? I've collected several articles and talks relating to safepoints. I don't know of anything that discusses safepoints in a way that you could implement them from scratch just based on the discussion, but they're tied to a complex part of the runtime, so any example/tutorial code would probably be parochial to a particular VM.

Re:Speedy Web Compiler – A Rust port of Babel and Closure Co... by chrisseaton on Sunday December 23, 2018 @02:04PM (#18747721)
> I don't know of anything that discusses safepoints in a way that you could implement them from scratch just based on the discussion

The best discussion of them at the moment is this one - and as you'll notice they're essentially having to do analysis of what is already out there because it just wasn't written down anywhere at the time. They don't have much of a 'related work' section or a bibliography because there wasn't much to refer to.

https://dl.acm.org/citation.cfm?id=2754169.2754187

And implementing them from scratch is what I wanted to know how to do. For a lot of compiler topics the only way to learn is to sit down with an existing expert and physically ask them. Compared to other CS fields that’s really bad.

Re:Speedy Web Compiler – A Rust port of Babel and Closure Co... by pbiggar on Sunday December 23, 2018 @06:40PM (#18749196)
> Many people working on compilers will have a PhD in the subject.

There is some truth to this, but as someone with a PhD in compilers, let me say that this area is very accessible to people without PhDs. The first time I met @dannybee, I asked him where he went to grad school. Turns out he went to law school. Didn't stop him writing the GCC alias analysis framework though.

Re:Speedy Web Compiler – A Rust port of Babel and Closure Co... by pjmlp on Monday December 24, 2018 @02:12AM (#18750885)
How much time did you spent in CS literature for compilers?

One of my focus areas during my degree was system programming, including compilers and language design.

Already in the late 90s, there were several good books about compilers.

Re:Speedy Web Compiler – A Rust port of Babel and Closure Co... by chrisseaton on Monday December 24, 2018 @07:17AM (#18751804)
> Already in the late 90s, there were several good books about compilers.

There are tons of introductory texts, a few intermediate texts, a couple of very narrow advanced texts, and then it just runs out. A great deal of our knowledge is undocumented.