Love the recommendations people are giving out here, not an exaggeration to say that HN gave me a better CS education than my M.S.
HN gave me much better education in CS and programming than any traditional source.
31–40 of 90 posts
Love the recommendations people are giving out here, not an exaggeration to say that HN gave me a better CS education than my M.S.
HN gave me much better education in CS and programming than any traditional source.
Earlier quoted context omitted.
What do you mean exactly by "compilers"? Because the book features a chapter on how to compile source code to virtual machine byte code.
Most of the time when people talk about compiled languages/compilers, they mean languages that compile to native machine code, not languages that compile to a bytecode/run on a virtual machine.
Simple machine code generation with basic register allocation and evaluation which eagerly spills to the stack is not super hard. Producing fast code instead is a bottomless well.
I wish my school offered something even half good as this. I've seen it like 2 years ago and it is well prepared course. >CS 6120 is a PhD-level Cornell CS course by Adrian Sampson on programming language implementation. I just dont understand why is this "PhD level"
> I just dont understand why is this "PhD level" It would have been if the papers covered were closer to the state of the art. The most recent one is from 2015. However, this course would actually give you the background required to read more recent paper and work on compiler research, so calling it PhD level is not a huge stretch.
Love the recommendations people are giving out here, not an exaggeration to say that HN gave me a better CS education than my M.S.
Are there any courses on creating a new language, interpreter, and compiler from scratch? Like not using LLVM or similar to generate intermediate representation but to literally pick an ISA and, well, compile for it.
I used what I learned from GCC output Then I wrote a basic amd64 expression compiler with simple live ranges and linear register allocation and ANF (a normal form) for postorder AST traversal for code generation. It can only evaluate nested add and mul expressions.
https://github.com/samsquire/compiler or on replit: https://replit.com/@Chronological/Compiler3#main.py
Finding opcodes is a struggle but there is this website: https://www.felixcloutier.com/x86/ and https://www.cs.uaf.edu/2016/fall/cs301/lecture/09_28_machine... (the table at the bottom is really useful)
To learn code generation not targeting amd64, I wrote an imaginary assembly language and then wrote a switch based virtual machine and a compiler for it with a frontend that looks similar to javascript.
https://github.com/samsquire/multiversion-concurrency-contro... in ProgramParser.java, LanguageInterpreter.java, and LanguageInterpreterRunner.java for where main() is.
Are there any courses on creating a new language, interpreter, and compiler from scratch? Like not using LLVM or similar to generate intermediate representation but to literally pick an ISA and, well, compile for it.
You can find a PDF and the associated course with a very minimal amount of following links.
If you are thinking of making your own language, it's also good to learn something about programming language theory, if you don't already. Many languages make mistakes that have been solved 25+ years ago. PLAI is good for that: https://www.plai.org/
Earlier quoted context omitted.
> I just dont understand why is this "PhD level" It would have been if the papers covered were closer to the state of the art. The most recent one is from 2015. However, this course would actually give you the background required to read more recent paper and work on compiler research, so calling it PhD level is not a huge stretch.
I mean a lot of programming language design goes back decades; it's better to focus a course on the basics that every language will have vs the most recent developments that haven't fully crystallized yet either.
You are right when it comes to programming language design and somewhat wrong when it comes to compiler design.
If you are doing compiler research/development, you have to be familiar with the latest and greatest research because the margins for improving things are fairly slim. It’s usually fine to be not familiar with how things worked ~30 years ago.
For programming languages, you absolutely have to understand the foundations to do absolutely anything.
Are there equivalent 'Advanced Databases: The Self-Guided Online Course'? Andy Pavlo's CMU 15-721: Advanced Database Systems is similar, where you will hack on Postgres to implement a Foreign Data Wrapper (FDW)
Here you go: https://users.cs.utah.edu/~pandey/courses/cs6530/fall22/sche...
> The lecture slides used in the course are taken from Prof. Andy Pavlo's CMU 15-721 course
Just go to the source: https://15721.courses.cs.cmu.edu/spring2023/
Earlier quoted context omitted.
Precisely made for "creating a new language, interpreter, and compiler from scratch": http://craftinginterpreters.com
This does not cover compilers. I know because I specifically asked munificent (the author) about this before and he mentioned some other books to look at.