Live data from Hacker News

Introduction to Compilers and Language Design (2021)

dthain.github.io

21–30 of 58 posts

Re: Introduction to Compilers and Language Design (2021)

#22

Earlier quoted context omitted.

The best part of the blind AI hatred is you can call literally anything AI slop without presenting evidence and the anti-slop loyalists will hate it without any evidence. I do value both correct high quality AI usage and non-AI works, would be nice if we could have a bar for the AI stuff that makes sense instead of dismissing peoples work blindly.

I guarantee half the folk commenting “ai slop” on people’s projects are folk who never read people’s code even before AI. Now they get to dismiss it without providing any specifics and feel superior.

> I guarantee

How do you guarantee it, exactly? AI told you in an authoritative tone?

Re: Introduction to Compilers and Language Design (2021)

#23

Just scannning the table of contents and I don't see any of the major topics of language design. It seems to be more like just "intro to compilers"

This looks like an undergrad-level walkthrough through key topics of how a language works. Say, python or ruby, or simpler pascal compilers.

Both compilers and language design are as old as this industry, and have too much knowledge for a single course.

This one is ok, better than most similar courses based on, say, the dragon book.

Re: Introduction to Compilers and Language Design (2021)

#24

it wanders within a tight circle around C and its idiosyncrasies.

Probably by design. > This book offers a one semester introduction [...] enabling the reader to build a simple compiler that accepts a *C-like language*

Then it is really not about language design... I would rather recommend https://www.plai.org/

Re: Introduction to Compilers and Language Design (2021)

#25
post #6
post #3

Sometimes I see people who design languages and build compilers, and I find them truly amazing. I once tried making a language myself because I was curious, but it was so difficult that I just settled for a simple C backend. The people contributing to LLVM probably know everything down to assembly generation. they're truly incredible.

Assembly generation is actually pretty simple, it's optimizing everything that's difficult. Writing an assembler is a great way to get acquainted with compiler construction, because you don't need to think about optimization and types and the other features that make high level languages complicated aren't needed.

I actually started my first compiler my allowing (only) inline assembler first, and then starting to wrap higher level constructs around it.

It adds a little bit of complexity (you need to be very clear on how you handle registers) but it worked surprisingly well, and it makes it easy to built up the complexity step by step.

It also meant I could bootstrap the compiler itself with just an assembler.

Sadly I lost the source decades ago.

(Making assembler an integral construct of a higher-level language is also not a unique approach - there's Randall Hyde's High-Level Assembly[1] and others.)

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

Re: Introduction to Compilers and Language Design (2021)

#26

Earlier quoted context omitted.

I guarantee half the folk commenting “ai slop” on people’s projects are folk who never read people’s code even before AI. Now they get to dismiss it without providing any specifics and feel superior.

> I guarantee How do you guarantee it, exactly? AI told you in an authoritative tone?

[deleted]

Re: Introduction to Compilers and Language Design (2021)

#27

Earlier quoted context omitted.

The best part of the blind AI hatred is you can call literally anything AI slop without presenting evidence and the anti-slop loyalists will hate it without any evidence. I do value both correct high quality AI usage and non-AI works, would be nice if we could have a bar for the AI stuff that makes sense instead of dismissing peoples work blindly.

I guarantee half the folk commenting “ai slop” on people’s projects are folk who never read people’s code even before AI. Now they get to dismiss it without providing any specifics and feel superior.

50% of folks seems a pretty strong signal, though. No?

While I agree that simply calling something "AI slop" is not constructive, it is not my job to voluntarily review LLM-extruded crap. In the past I would provide constructive criticism because there was an actual conversation taking place. The producer had put at least enough thought into it such that my engagement didn't feel like replying to a chatbot, but that's what it feels like now, so unless I see some considerable effort and original thought on the author's part, I am likely to drop a "slop" comment and move on with my day.

Re: Introduction to Compilers and Language Design (2021)

#28

Just scannning the table of contents and I don't see any of the major topics of language design. It seems to be more like just "intro to compilers"

What books would you recommend for programming language design? What are the missing topics?

Re: Introduction to Compilers and Language Design (2021)

#29
post #3

Sometimes I see people who design languages and build compilers, and I find them truly amazing. I once tried making a language myself because I was curious, but it was so difficult that I just settled for a simple C backend. The people contributing to LLVM probably know everything down to assembly generation. they're truly incredible.

>The people contributing to LLVM probably know everything down to assembly generation. they're truly incredible.

Not really. I was webdev who then switched into compilers job with LLVM being foundation

LLVM itself is huge, it is not trivial to be familiar with every it's areas/mechanisms, but writing not-complex passes, bug fixing, regression fixing does not require some fancy knowledge

Re: Introduction to Compilers and Language Design (2021)

#30
post #3

Sometimes I see people who design languages and build compilers, and I find them truly amazing. I once tried making a language myself because I was curious, but it was so difficult that I just settled for a simple C backend. The people contributing to LLVM probably know everything down to assembly generation. they're truly incredible.

>The people contributing to LLVM probably know everything down to assembly generation. they're truly incredible. Not really. I was webdev who then switched into compilers job with LLVM being foundation LLVM itself is huge, it is not trivial to be familiar with every it's areas/mechanisms, but writing not-complex passes, bug fixing, regression fixing does not require some fancy knowledge

If you don’t mind me asking, why and how did you make the switch? Going from webdev to compilers seems like a strong U turn that’s not easy to pull off, especially because the resources on compilers out there are extremely scarce
Post reply on HN