Live data from Hacker News

Advanced Compilers: Self-Guided Online Course

cs.cornell.edu

81–90 of 241 posts

Re: Advanced Compilers: Self-Guided Online Course

#81
post #59

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 lu…

You 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.

Re: Advanced Compilers: Self-Guided Online Course

#82
post #59

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 lu…

> 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)

Re: Advanced Compilers: Self-Guided Online Course

#83

Earlier quoted context omitted.

Do 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.

I 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…

> 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.

Re: Advanced Compilers: Self-Guided Online Course

#84
post #59

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 lu…

Is that such a critical hiring criteria? That seems like something I could learn in a week.

Re: Advanced Compilers: Self-Guided Online Course

#86

Domain-specific compilers are a bigger field, where there's more opportunity to do something interesting Take C (or some other language) and its mature optimizing compilers as a foundation, and write a program that compiles a high-level description of a domain-specific program into C For example, NN-512 ( https://NN-512.com ) is a compiler that takes as input a simple text description of a convolutional neural net in…

I have just spent the last 13 months significantly reworking a compiler that turns Excel-like formulas into JavaScript. The compiler is used by an app designer, and the formula language is meant to be easy to pick up for people used to spreadsheets. A significant difference compared to Excel is that our compiler features static typing, enabling helpful error messages to be produced at build-time. (Spreadsheets, on th…

Your project sounds like fun. What/for whom is the project? What level of Excel formula compatibility are you shooting for, e.g. just in the neighborhood like Google Sheets, reasonably close as in Libre Office, or full compatibility with the latest version? If the latter you must have one gnarly test suite. Would love to hear more about it.

Re: Advanced Compilers: Self-Guided Online Course

#87
post #86

Earlier quoted context omitted.

I have just spent the last 13 months significantly reworking a compiler that turns Excel-like formulas into JavaScript. The compiler is used by an app designer, and the formula language is meant to be easy to pick up for people used to spreadsheets. A significant difference compared to Excel is that our compiler features static typing, enabling helpful error messages to be produced at build-time. (Spreadsheets, on th…

Your project sounds like fun. What/for whom is the project? What level of Excel formula compatibility are you shooting for, e.g. just in the neighborhood like Google Sheets, reasonably close as in Libre Office, or full compatibility with the latest version? If the latter you must have one gnarly test suite. Would love to hear more about it.

OK, I see it's https://www.calcapp.net which looks like a smart product idea. My best to you. Would still love to hear more about the other questions.

Re: Advanced Compilers: Self-Guided Online Course

#89
post #59

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 lu…

Parsing 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.

Re: Advanced Compilers: Self-Guided Online Course

#90
post #40

Anyone interested in following the course together during the holidays? To keep each other motivated etc.

If you have to stop "early" please get through the simple DCE and LVN passes.

A solid basic-block level DCE & LVN optimization along with a judicious "compile time evaluator" (simple constant folding) will let you produce code at around 80% of the level of LLVM.

Obviously, you're not going to get the magic that comes of LLVM's scalar analysis pass, but you're not going to be embarrassed with your performance, either.

Post reply on HN