4 ms·
It's impressive to me that you can build a project on something (here Ruby), and if you get big enough that the initial decision is a problem for some reason (h
by Zababa 5y ago
It's impressive to me that you can build a project on something (here Ruby), and if you get big enough that the initial decision is a problem for some reason (here performance), you can just improve on it like that.
How does one generally get to work on compilers? Is it mostly through academia? Through open source contributions to compilers?
- jez 5y ago(I work on the Sorbet team) I've been meaning to write a blog post about this because I get asked about my personal journey to working on the team a bunch. The makeup of the current team is a split of: - people who worked on programming languages & compilers in academia - people who worked on developer productivity/product infrastructure at large tech companies - people who just really like types (me) Which is to say: there's a deal of luck involved, but there are also some fairly straightforward ways to inch closer to PLs/compilers job in industry. That all being said, the piece of advice I always give people who bring this up: there's nothing stopping you from working on PLs/compilers right now! Find a ticket labeled "good first bug," show up in the #internals channel on the Sorbet Slack[1], and someone would love to help you get started. Don't care about Sorbet? That's fine! Pick your programming language of choice, find where the developers hang out, and repeat the process. Oftentimes, there's nothing holding you back from working on PLs and compilers except yourself. [1] https://sorbet.org/slack https://sorbet.org/slack
- Zababa 5y agoThank you for the detailed and quick answer! And thanks for the advice.
- ibraheemdev 5y agoThe Rust compiler is a great example of one that is very beginner friendly. Diagnostic (error message) issues, of which there are many, are a relatively easy way to get started and learn the codebase. The community is also very friendly to new contributors, and you can learn your way around the compiler and choose to work and learn things that interest you. There are certain things you'll need to know for certain parts of the compiler, such as some graph theory if you're working on Rust's MIR, and you should read a high level overview of how compilers work. Compilers are a huge, never-ending field of study/work. Start small and work your way up from there.
- skohan 5y ago> How does one generally get to work on compilers? Is it mostly through academia? Through open source contributions to compilers? You can just do it! As a place to start I'd recommend looking for tutorials on recursive-descent parsing, and just try to make a program that parses a toy language and transpiles it into C, or some other language you're familiar with. Then you can grow it from there. You can get really fancy with things automatic parser generation, and using an LLVM back-end to enable optimization, but writing a simple compiler is a reasonable project for someone with even a basic handle on programming and a little creativity to just jump in and figure out.
- mjul 5y agoA good way to learn is to learn on the job. If you start looking for mini languages in a normal project (or where they would fit) you will see that there are frequently many opportunities to do something useful with small domain specific languages. I suggest starting with parser combinators rather than page 1 in the Dragon Book. They are a nice way to get things done quickly.
- umanwizard 5y agoFacebook did the same for PHP: added gradual typing (enforced in 99.9% of code with mandatory linters), a better standard library, and a compiler. That was much cheaper than rewriting everything.
- bigyikes 5y agoJust wondering, does FB still use PHP / Hack for new services? I personally don’t mind the language but for some reason I imagine it being unpopular internally.
- umanwizard 5y agoThey still use it for anything that runs on the application layer, i.e. stuff the runs in-process on the machines that serve web and GrahphQL API requests. FB isn’t as steeped in modern service-oriented ideology as most similar companies, so that `www` monorepo represents a lot more code than you probably expect, including stuff you’d normally think of as “services”. True backend services do exist outside the PHP application, and are typically written in C++. Java, Rust, and Python also exist in various niches. The only mainstream language I have never seen anywhere at FB is Go, although I’m sure any language you can imagine is used by _some_ random team out there. I’m not sure why Hack would be unpopular. On the contrary, it’s the default choice for starting new projects since all of the internal tooling is built mostly with Hack in mind, so it’s the path of least resistance for developers.
- mhh__ 5y agoAlmost everyone who works on the D compiler has come to it as a hobby. The books don't teach you how to write a good compiler i.e. most textbooks spend years on parsing theory when 99% of real compilers use handwritten parsers which can basically be made up on the fly.
- notsureaboutpg 5y agoMy company is a big Ruby / Rails supporter, so they have some dedicated positions for people to just work on Sorbet + Rails full time. You can switch roles to be one of these guys and the more experienced people doing this will train you.