12 ms·
I’ve worked on multiple compilers (optimizations expert) at MSFT on VS and CUDA and gave developed a DSL and worked on Database Compilers. I can’t hire compile
by ibains 6y ago
I’ve worked on multiple compilers (optimizations expert) at MSFT on VS and CUDA and gave developed a DSL and worked on Database Compilers.
I can’t hire compiler people with right skills.
We’re building an IDE and those parsers are written differently, and we use Scala packrat parser combinators.
These courses teach very little judgement or industry relevant stuff. When do you use packrat parser vs LALR vs LL? Good luck hiring an engineer with advanced compiler courses knowing any of this.
I’d like to sit down all university professors who teach compiler courses and teach them a course on what’s relevant.
- Ambroisie 6y agoWhat ressources do you recommend I read, or what I can do, to learn more about applicable compiler knowledge?
- throwaway_pdp09 6y agoPrev post by me, if it's any help https://news.ycombinator.com/item?id=25210523 https://news.ycombinator.com/item?id=25210523
- deleted 6y ago[deleted]
- cinericius 6y agoDo you think it is the responsibility of academia to teach "industry relevant stuff"? I agree that courses generally don't teach judgement well, but I do think that it is the workplace/industry's responsbility to train their engineers and not expect fresh grads to be fully equipped to work on something that specific.
- nicoburns 6y agoI definitely think there ought to be courses on such things available. There should be an educational route that is between pure academia which focusses on esoterica that is only relevant to research and vocational courses that don't include much innthe way of theory at all. The idea that industry ought to pay for it presumably comes from a background where universities are private an expensive. But I'd like to live in a world where these kind of courses were government subsidised and available for free or cheap.
- bachmeier 6y ago> The idea that industry ought to pay for it presumably comes from a background where universities are private an expensive. In the US at least, where even public universities are ridiculously expensive, there's no way to keep the current system running unless our grads are able to get jobs that pay well when they graduate. Indirectly industry is paying for the courses taught by universities. In the current environment we need to prepare students for employment. > I'd like to live in a world where these kind of courses were government subsidised and available for free or cheap. I think we'd be better off as a country (US). I also think that ship has sailed and it sank to the bottom of ocean a couple decades ago.
- fiddlerwoaroof 6y agoI tend to think of most university education as taxpayer and student subsidized versions of the sort of training that companies should be doing. I think, for most programmers, a well-thought-out apprenticeship program would be better both for them and for the company, except that the amount of money we send to universities makes this economically infeasible.
- phaker 6y ago> Do you think it is the responsibility of academia to teach "industry relevant stuff"? I don't think that was what ibains was going for, though i don't fault you for seeing this in that comment. (Especially that i don't think this course suffers from that problem and generally i think things are rapidly improving on this front.) That problem to me and i think to him too is that quite a lot of things that such courses tend to teach as well thought out, well working solutions and approaches just don't work very well and frequently i find comments on what's a 'good taste' solution and what isn't that are completely my understanding of the problem space which is why. E.g. in parsing (as that's the topic he mentioned): First, lots of people just spend way too much time on it. And they focus on parts that are of zero use to beginners (like explaining all several grammar families) and then use obtuse parser generators that save no work and sometimes use them in bizarre way (like picking a lalr parser generator then hand editing the output to support a not-quite-lalr language). Meanwhile a recursive descent parser is easy to write, fast and gives pretty good error messages with _very_ little work. You do need to know enough about grammars to be able to write one down and know if it describes an ambiguous language etc so this should be taught, but you don't need to understand the language zoo well.
- chrisseaton 6y agoMost languages are context sensitive. Most language tools are context free. How did we go so wrong?
- MaxBarraclough 6y agoCould this be viewed as supply exceeding demand? Context-free grammars are ripe for theoretical computer science work even if they're not practically relevant. On the flipside, I suppose the constraints of context-free grammars are seen as a price not worth paying when designing a language.
- throwaway_pdp09 6y agoCan you give an example (or three) where that lets us down? That would be very helpful to me I suspect.
- nordsieck 6y ago> Do you think it is the responsibility of academia to teach "industry relevant stuff"? I mean, there are colleges that cater specifically to industry. Digipen is a good example of this: they have very close relationships with game studios and shoehorn their curriculum into the requirements the state imposes on colleges. These sorts of colleges are not particularly popular, however, so I think most prospective students understand the value of a more broad and timeless approach to software education.
- WalterBright 6y ago> Do you think it is the responsibility of academia to teach "industry relevant stuff"? In college I learned a lot of math and how to do things like calculate stress and bending. I learned nothing about material finishes, material selection, fastener selection, tolerances, drafting, etc. But the latter was easy to pick up on the job, while learning mathematical analysis on the job just doesn't happen.
- the-smug-one 6y agoAnd learning PHP, React, and MongoDB is easy to do on the job. However, I think that there are industry practices which may inform what students are taught. For example, process algebra is rarely (if ever?) used in industry. There are other formalisms of comparable difficulty and academic interest which are used however, perhaps teach those instead?
- UncleEntity 6y ago> These courses teach very little judgement or industry relevant stuff. Hasn't that been the debate for, like, ever? Should the universities teach you how to learn or should they teach you how to hit the ground running at your first post-graduation job? I'd say anyone who took phd-level courses on compiler design shouldn't take too much training to become a valuable team member as they've proven they can learn what is important for the given task but maybe that's just my uninformed opinion.
- nicoburns 6y agoI feel like "teach you to learn" vs "teach you useful skills"is a false dichotomy, and often just an excuse for poor teaching. They can and should do both. The reasom they don't is because they're so research focussed, which is fine as an option but a problem because there are no or vert few good options for high level academic courses that are more practically focussed.
- woodruffw 6y agoI second this (although I work more on translation and modeling than optimization). IME, it's much easier to find otherwise competent, savvy researchers and spin them onto compiler work than it is to take someone who's gone through an "advanced" course.
- deleted 6y ago[deleted]
- nialv7 6y agoNo offence, but parsing (in a compiler, not in general) is probably the most boring part of a compiler. As this is a PhD course, I'd expect the goal of it to be preparing students for research in the field, not writing parsers for some industrial company. Also, there are definitely courses that teach you how to write a parser. But we usually don't call them advanced.
- munificent 6y ago> No offence, but parsing (in a compiler, not in general) is probably the most boring part of a compiler. Not if you're writing an IDE. Writing a batch mode parser that takes an entire correct source file and produces an AST is easy. Writing a parser that instaneously handle producing an updating AST while the user is typing in the middle of the program while still allowing semantic analysis to occur and without vomiting out a pile of extraneous errors or giving up entirely is a lot harder.
- cambalache 6y agoHe didnt say easy, he did say boring, and I agree.
- munificent 6y agoI wouldn't describe it as boring either, but maybe that's just me.
- klyrs 6y ago> Not if you're writing an IDE. This thread is so weird. The topic at hand is a compliers course. ibains complains about a desire for qualified IDE developers. It's like complaining that your family doctor isn't an orthopedic surgeon. Why should a compilers course spend the requisite time for these highly specialized IDE algorithms? Specifically. What part of this course should be removed to make room for IDE-specific algorithms? Or, would an advanced IDE algorithms course (with this course as a prerequisite) be a more sensible approach?
- pfalcon 6y ago
- bachmeier 6y ago> I’d like to sit down all university professors who teach compiler courses and teach them a course on what’s relevant. I don't teach compiler courses, but I'm an academic, and I do keep in touch with industry people to find out what's important for my data analysis course. A couple of big problems with your proposal: 1. Time variation in "what industry wants". This year one thing's hot, the next year it's something else. A bare minimum requirement for any course is that a student taking it in their second year should learn something that's still relevant three years later when they're in the first year of their job. 2. Cross sectional variation. There's no such thing as "what industry wants". Every place wants something different, with only a small subset common to 80% of employers.
- MaxBarraclough 6y agoibains made a specific point about language processing in IDEs being different to that of (traditional) compilers. Presumably there exists a state-of-the-art there just as there's a state-of-the-art for conventional compilers, but academia doesn't give it as much attention.
- throwaway_pdp09 6y agoText -> parser -> AST -> job done. If it's any different in an IDE vs anything else I'd like to know how.
- morelisp 6y agoPartial parse state and recovery are critical. You don't want the entire bottom half of a file to lose semantic analysis while the programmer figures out what to put before a closing ).
- throwaway_pdp09 6y agoDoes that issue go away if you use packrat vs some other means?
- seanmcdirmid 6y agoYou are thinking about it the wrong way. In this niche, you will almost never find people with the exact skills you are looking for. Better to find people with tangentially related skills and experience and let them grow into the role. Academia is never going to be comprehensive enough to prepare students for every niche that has some demand. Rather, they should just focus on teaching a core that will help them learn what they need later on demand. > When do you use packrat parser vs LALR vs LL? If you need ok performance and good error recovery (especially if you are doing stuff in an IDE!), none of the above: recursive descent is not that hard to implement, and is incredibly flexible.
- ibains 6y agopackrat parser combinators are recursive descent with infinite look ahead. That’s the problem, engineers are under educated
- seanmcdirmid 6y agoThe problem is some engineers are ideological, you don’t want to work with those. If you have this argument during an interview and the interviewing engineer is insisted that X is always the right choice, run away. Anytime a commercial language gets bogged down in parsing, unless that is core to the product (and mostly it isn’t), also run away. Parsing represents like 1% of the work that needs to be done on a compiler, even if it’s an IDE parser that needs to be really incremental (the only worse thing is to get stuck on lexing).
- honkycat 6y agoI agree. Engineers are under educated. This is not going to improve. Poor and middle class kids don't have the luxury to soak up as much education as they feel like before choosing a topic they are interested in. That is a privilege reserved for the wealthy. We go to schools that are pragmatic, teach us some basics, and the get us out the door to do cog work. Look at all of the comments you have drawn. Let me spell it out for you: your expectations are too high. Society is not designed to create compiler engineers you can hire fresh out of school. It is churning out bright scrappy people who are hungry for class mobility, a decent standard of living, and an interesting job to smash their brain against. Maybe look for one of those instead of expecting a perfect candidate to drop out if the sky. You have a cool as hell project so I'm sure you could find a brilliant person willing to learn.
- helloycombinat 6y ago> When do you use packrat parser vs LALR vs LL? Good luck hiring an engineer with advanced compiler courses knowing any of this Honestly, I have no idea why you would want any of those. Can you explain in a few sentences? I written a parser before and it was faster than everything I used that does the same thing or similar. And I haven't had any professional or teachers teach me parsing I once wrote a json parser in .NET. It was faster than literally everything I tried but I already know it can't touch simdjson and I haven't compared it to the new dotnet parser but I imagine they do it faster. I'm actually confused how people write such shitty parsers when I barely know what I'm doing. Like are they using a link list or revisiting characters multiple times to parse? (I think two visits is acceptable. One to find the end of a number and another pass to convert the number to value although I'm sure it's not hard to do one pass)
- carom 6y agoIs that such a critical hiring criteria? That seems like something I could learn in a week.
- chrisseaton 6y ago> That seems like something I could learn in a week. So why not learn it in a week then apply for the job? I would suggest the reason is... because you cannot learn it in a week.
- mhh__ 6y agoYou can't gain experience in a week but you aren't working alone. This is an example of know-how, not theory. Different problems require different things.
- TACIXAT 6y ago>So why not learn it in a week then apply for the job? For a lot of reasons. I'm not looking to work in compilers. OP sounds like the opposite of the type of people I want to work with. I enjoy what I work on quite a bit. I am paid well. I have the chance to build up the business and a team. It is just an attitude that I see a lot. The candidate doesn't have XYZ specific knowledge. Find someone who is interested and motivated (e.g. someone who has independently taken an advanced course in a topic) and build them up. I'm sorry that some candidate can't answer your trivia question, but if it could be taught in a 16 week course (~10 hours / week), you could find a way to convey it on the job (~40 hours / week) in a much shorter period of time. For this scenario have new hires work through a series of designed problems. Have them implement and run into the pitfalls with LL, LR, and Packrat parsers. Show issues with left recursion, shift / reduce conflicts, space trade offs of Packrat, seriously whatever you want to demonstrate. Even just write up a document explaining when to use each rather than bemoaning the lack of knowledge. Like how much cooler would the top comment in this thread have been if I had learnt something? This feels a lot like "I want a candidate with the knowledge of a senior for the price of a recent grad".
- speters 6y agoThis would lead to incredible toxic situations. If I want to apply to 5 companies and all 5 have 1, but different questions that I could learn in a week. Would you considser it would be more efficient for any party for me to learn this in advance? Also, this assumes it is known upfront what this required knowledge would be...
- g9yuayon 6y agoParsing is frontend of a compiler. That the compiler course focuses on compiler backend does not mean it's not relevant to the industry. I personally find aliasing, flow analysis, and and optimization very relevant to what we needed to do. As for industry vs academia, wouldn't it be fair to say that professors should teach which ever is more advanced? I certainly don't believe that teaching Java generics, no matter how relevant that is, is relevant to a PhD program, which is supposed to push the state of the art of a subject.
- zakember 6y agoAny resources you can suggest to point interested engineers in the right direction?
- throwaway_pdp09 6y agoI have some idea what I'm talking about, see my post https://news.ycombinator.com/item?id=25210523 https://news.ycombinator.com/item?id=25210523 and I don't kniow about why using a packrat over anything else. I pull something off the shelf, antlr for my latest project, then get on with it. The parser is the most trivial side of things, if you consider that a key skill it comes across as being an issue from the 1970s, not today. Writing a RD by hand is not a big deal anyway as someone else said. If your into optimising compilers you're focusing on a very odd area to criticise. I'd gave though more about dataflow using lattices or whatever, graph stuff etc. So parsing aside, what are the 'relevant' skills you feel are missing? (and what are 'Database Compilers'? Nearest I can think of that may fit are query optimisers)
- chrisseaton 6y ago> Good luck hiring an engineer with advanced compiler courses knowing any of this. Have you tried raising the level of compensation you offer? There are engineers elsewhere doing this at other companies you could presumably get if you put your hands in your pockets?
- hnxs 6y ago“We can’t hire for x” almost always means “we can’t hire for x for what we’re willing to pay”
- mhh__ 6y agoI'm normally fairly laissez-faire about the morality of "exploiting" employees, but that works both ways - if you can't find people for the amount of money you're charging then tough shit
- Viliam1234 6y agoYeah, we can argue about the merits of capitalism vs socialism, but what some companies want is "socialism for us, capitalism for our employees".
- ibains 6y agoWe pay very very well, all my peers from NVIDIA are above 700k. Why would you presume anything about salary?
- chrisseaton 6y agoIt's not true that there aren't engineers with these skills - there are thousands of them in the US and more worldwide - so if you can't hire them then either: * you aren't looking (seems unlikely) * there's something toxic about your team that means they'd never work for you and you should fix that (hopefully unlikely) * you aren't paying enough to make the move worthwhile for them (seems likely as people never want to pay the going rate) That's why I presumed salary. Double your salary and you may suddenly find you're being flooded with contacts from the compiler engineers at places like Google. If that's the case then your only problem was the compensation you were offering and not a problem with education.
- vector_spaces 6y agoI saw this great interview recently with Anders Hejlsberg at MSFT on how modern compiler construction differs from what is taught in traditional University courses. Is this what you're alluding to? After watching that interview, it's strange to read a comment like yours. While the architecture is completely different, it doesn't frankly seem like that big a leap to go from "senior engineer with X years working on thing that's tangentially related to compilers" to being able to be productive in a reasonable amount of time working with the new architecture. What am I missing? https://youtu.be/wSdV1M7n4gQ https://youtu.be/wSdV1M7n4gQ
- chrisseaton 6y agoIt's pretty hard to pick up compiler skills because very little of it is written down. It takes a lot of time (a few years) working with code bases and papers to absorb it.
- pfalcon 6y ago> very little of it is written down > and papers to absorb it. I smell a contradiction. But I'm glad that even well-known industry people see it like that. It's not a common flu you can pick up at university library. It's an arcane lore you need to travel faraway to dig into ruins of Library of Alexandria to find the knowledge of.
- chrisseaton 6y agoI don't see the contradiction - very little of it is written down, and so you need to spend a lot of time scraping around for the disparate parts that are written down and trying to absorb as much as possible for them. There are very few (in some parts of the field none) books that bring together all the information.
- pfalcon 6y agoGood, good. Reminds me that stealing your https://rubybib.org/ https://rubybib.org/ idea for Python is on my todo list for long time ... Actually, my own ref to the Library of Alexandria, initially done for a word of mouth, is a literal situation in some parts of the realm. Reminds me I wanted to put up a mirror of Rice' Massively Scalar Compiler Project materials somewhere. In my mental map, Cooper and guys literally saved SSA from IBM's freezing hell (quoting Kenneth Zadeck: "What Happened Next / We stopped working on SSA. / None of us actually worked on a compiler project. / We were blocked from transfering SSA to the IBM product compilers."). Really should do that on winter holidays. By that time, we'll also know if http://ssabook.gforge.inria.fr/latest/ http://ssabook.gforge.inria.fr/latest/ actually have gone down. But at least that is already mirrored...
- knuthsat 6y agoParser combinators allow elegant implementations of parsing but are ridiculously slow compared to some Knuth-optimized parsers.
- yters 6y agoI agree in general. I have a PhD in comp eng and know a lot of academia type subjects, but only a small portion is especially useful in a practical setting. Also a lot of academic knowledge seems needlessly obtuse. It becomes a lot clearer when looking at the practical problems that spurred the academic fields. At times I get the aha as to why this abstract concept is addressing a meaningful question, and if that's how academic education oriented itself, around these basic meaningful questions it would help people learn much more effectively.
- u801e 6y ago> I’d like to sit down all university professors who teach compiler courses and teach them a course on what’s relevant. Courses should be used to teach general concepts while industry should be used to show those how to apply those concepts. The choice between using a packrat parser, LALR, or LL would be easier to explain to someone who has been exposed to those concepts and understands the advantages and disadvantages of each approach compared to someone who has never heard of the terms. Best practices change with time, but knowing the base concepts and how to apply them will help people adapt. If they're only exposed to what's considered relevant at this time, then they won't have the necessary exposure to concepts that may pertain to future best practice.
- deeeeplearning 6y agoThis is such an empty criticism. Universities are not job training facilities. You want people who have the exactly right skillset? Hire smart kids and train them, you know, the way it's been done for hundreds of years.
- Philip-J-Fry 6y agoHiring for exact skills is what you do when you need the skills ASAP and the actual supply of engineers is there. The time you waste looking for someone with the exact knowledge you need could have been spent getting a good compiler engineer and just teaching them what you know. And magically that good engineer will get better, it's pretty amazing stuff. I've was told multiple times, University/School teaches you how to learn. You get your actual knowledge and skills from the job. What I learned in 3 years of university was nothing compared to what I learned in 6 months on the job.
- kop316 6y agoI will second this. I would much rather hire an engineer who has a related background and wants to learn over an engineer with the exact skillset but does not want to learn. It may take a few months, but the former engineer will pick up what you want them to know (if you mentor them correctly), and past that inversion point, they are immensely more valuable.
- Viliam1234 6y agoAt first, it sounds like "win/win" if universities trained their students to use the same tools companies want. Companies would save money for training, and graduates would be ready for their jobs. But in longer term, it is actually "win/lose", because if three years later the fashionable tools change, the companies that optimize for saving money on training would simply fire their existing employees and hire new graduates. For the students, it is better to be the kind of person who understands the deep principles and can learn new tools as needed. And the companies have a choice to either offer job trainings, or offer higher salaries to people currently working in other companies who already have the needed skills. (Or whine about market shortage and import H1B servants.)
- mafribe 6y agoI understand the problem. I teach compilers at a big university. And I would love to hire graduates with compiler skills for my startup, but find it difficult. There are several structural problems that conspire to keep students from acquiring knowledge in low-level programming domain like compilation: a course needs to fit with the rest of the curriculum, and with student interest. I cannot get students interested in lexing and parsing, because they hear all day how exciting deep learning and big data are. Lexing and parsing are deemed solved in the 1960s, a sentiment I disagree with. In addition, classical theoretical computer science (e.g. automata and languages) is rarely taught with enough depths in many universities, so students lack the technical background. You can cover this in a compilers course (I do) but it takes time, and the students see it as an ordeal. Compilers as a subject is not helped by the most widely recommended book being the Dragon Book which is dated and way too long to be useful for beginners. Compare the Dragon Book with the material available as introduction to machine learning ... Many of the existing textbooks are also not covering modern compilation themes, in particular JITs, and compilation for multi-core and GPUs. I'd say there is currently no good undergraduate textbook on compilers. I could probably, with a lot of work, cobble something reasonable together from my lecture notes, but I don't believe in books, I'd like to do a good MOOC, but building suitable software infrastructure requires more work than I am currently willing to put in. My department tried hard to remove the compilers course, as "no longer relevant", and "too hard". I threatened to resign if it was not kept as a mandatory course. For now this worked.
- markus_zhang 6y agoThanks. I'm actually very interested in lexing and parsing, because that's probably 99% of the stuff a layman-programmer gets to do with compiler theory in job. I mean not everyone gets chance to write the backend part, but parsing skill is almost used universally.
- mafribe 6y agoA fun exercise is writing a lexer generator or a parser generator. It's probably easier starting out with writing a lexer generator like Flex for your favourite language. I recommend using the Flex input format, than you can test your creation using Flex as a testing oracle! This is not something you can do in a weekend.
- morelisp 6y agoAs someone who is happy when he interviews a candidate who at least knows you don't start parsing with `string.split()` I gotta say, your bar is extremely high. Surely MSFT can afford some internal training?
- swyx 6y agoperhaps you should guest lecture at a university and have them record all the lessons? your kind of experience is rare.
- deleted 6y ago[deleted]
- fooker 6y ago> When do you use packrat parser vs LALR vs LL? This is not something you can expects candidates to know.
- kevin_thibedeau 6y agoCollege is for imparting foundational knowledge. It isn't vocational training. You should find capable employees and train them for your needs.
- zerr 6y agoUnless you're looking for an external consultant for the one month project, you're doing it wrong: https://www.reddit.com/r/ProgrammerHumor/comments/4k994j/if_carpenters_were_hired_like_programmers/ https://www.reddit.com/r/ProgrammerHumor/comments/4k994j/if_...
- bird_monster 6y ago> I’d like to sit down all university professors who teach compiler courses and teach them a course on what’s relevant. I'm sorry if you've already answered, or if it comes up a lot, but could you toss up some buzzwords/more industry-standard things you're looking for? I was going to look into this course, and still probably will, but if you're saying it's not relevant I'd like to know what to be looking into instead?
- hwabyong 6y ago> I can’t hire compiler people with right skills. You can hire bright, motivated and mature people and teach them the skills they need. Academia doesn't exist to provide profit-maximizing, ready inputs to business. They produce people who have the skills to (hopefully) be able to grow into any position.
- ejanus 6y agoI am currently writing a parser using combinator. How can I reach you to learn what is the proper method to use on each case?
- classified 6y agoThose mean academics! How dare they teach anything else than what you need right now.