News for hackers. Stuff that matters.
Re:Chris Lattner on garbage collection vs. Automatic Referen... by oikawa_tooru on Sunday April 24, 2022 @12:57AM (#31141410)
Hi, I am bootcamp grad currently working with fullstack ror development. I have started to get bored of this work and want to venture into other core cse fields. Compiler design and machine learning seems to have caught my interest the most. What would your advise to be someone who wants to break into this field by self study? Does compiler design involve any math that is also used in machine learning and deeplearning? And do they share any similar concepts?
Re:Chris Lattner on garbage collection vs. Automatic Referen... by verdagon on Sunday April 24, 2022 @02:13AM (#31141689)
That's great that you're interested in venturing into other fields! Switching fields every once in a while is a great way to grow and become a stellar engineer.

If you have equal passion for those two choices, I would suggest leaning towards machine learning for now. An ML engineer can make $300k-500k/yr at the big companies after a few years.

I left that world and started doing language development as an open source endeavor, and make only $700/yr [0] which isn't that much, though I'm oddly more proud of that than the salary I got from my years in Mountain View. I'm happier, being able to push the state of the art forward and show people what incredible potential there lies ahead in the PL realm. However, I'd recommend graduates to focus on finances for a few years before looking at what lies beyond, lest the financial stress overshadow the dream.

I'm only about 110,000 lines into my journey with Vale, but so far I'd say there's little math. There's a lot of data structures knowledge needed to make a compiler fast, and some interesting algorithms, but not much overlap with ML. But who knows, maybe there's some cool things languages can do specifically for ML, that haven't been discovered yet!

[0] https://github.com/sponsors/ValeLang and I'm grateful to all of them!

Re:Chris Lattner on garbage collection vs. Automatic Referen... by oikawa_tooru on Sunday April 24, 2022 @04:01AM (#31142113)
Thank you Sir for your gracious response.
Re:Chris Lattner on garbage collection vs. Automatic Referen... by chaosite on Sunday April 24, 2022 @01:10AM (#31141452)
ML utilizes continuous mathematics, while compiler design including static analysis usually favor discrete mathematics. I wouldn't say the concepts are interchangeable.

The classic text book is the Dragon Book. Another good start on the compiler side are projects like https://buildyourownlisp.com/.

A lot of people start with lexing, parsing, and so on before moving on, but you can start from the static analysis side too. I would look at the LLVM framework and the Clang Static Analyzer, and use one of the tutorials for that to write a small analyzer for C.

Re:Chris Lattner on garbage collection vs. Automatic Referen... by oikawa_tooru on Sunday April 24, 2022 @04:02AM (#31142117)
Thank you so much for the guidance!! I will look into it soon!!
Re:Chris Lattner on garbage collection vs. Automatic Referen... by eatonphil on Sunday April 24, 2022 @07:15AM (#31142972)
I'd encourage you to join the following subreddits that might be interesting to you: r/compilers, r/programminglanguages, r/EmuDev, r/databasedevelopment.

You'll find more people like yourself interested in core CS.

My company also runs a Discord community for those kinds of people: discord.multiprocess.io.

Good luck!

Re:Chris Lattner on garbage collection vs. Automatic Referen... by simscitizen on Sunday April 24, 2022 @01:15AM (#31141469)
Maybe start with a good book or two to see if you're actually interested. Crafting Interpreters (https://craftinginterpreters.com/contents.html) might be a good intro--yes, it's about interpreters, but there's a lot of overlap between creating an interpreter and creating a compiler.
Re:Chris Lattner on garbage collection vs. Automatic Referen... by kcartlidge on Sunday April 24, 2022 @09:49AM (#31143976)
As very much a non-expert in compiler design, I found two books to be helpful introductory reads (neither are free though). I'm not sure whether someone proficient in the field would recommend them as my knowledge in the area is small, but I enjoyed them.

- Writing An Interpreter In Go by Thorsten Ball (https://interpreterbook.com)

- Compiling to Assembly from Scratch by Vladimir Keleshev (https://keleshev.com/compiling-to-assembly-from-scratch)

The first produces an interpreter in Go for a custom language, but as simscitizen says there's a lot of crossover with compilers.

The second creates a compiler written in Typescript that compiles from a minimal form of Typescript into ARM assembly. It's not cheap but is good.