Top products from r/Compilers

We found 18 product mentions on r/Compilers. We ranked the 13 resulting products by number of redditors who mentioned them. Here are the top 20.

Next page

Top comments that mention products on r/Compilers:

u/Lucretia9 · 1 pointr/Compilers

> Be honest. The type system, and generics are difficult at first. It took some months for that stuff to all click into place.

I learnt it at uni, there was no mention of generics, that I remember. Just using them to instantiate things like Unchecked_Deallocation. It was quite a good way to learn it. I only got more heavily involved with Ada when I left my programming job. The we used at uni was Jan Skansholm which is a nice easy intro to the language, we used the second edition which was Ada9X at the time.

> Ada also has a different programming dictionary. Things like limited/unlimited, tagged, abstract/concrete, discriminante, subtypes, and others were things that either were different in other languages, or I'd never heard of excpet in Ada. It's a language with a long digestion period.

Limited is still more powerful than other languages equivalents, which many don't have. Having a hide a constructor is a pain and can be worked around, limited cannot, therefore you can't abuse it like you can in C++.

Tagged is the a generic term for classes, all languages have the concept of a tag, it's just spelt out and not hidden in Ada. How do you think C++ determines which class is derived from another class? It's with a tag, a value stored in the class. Anyone who has done low level programming with C++ should know or at least have a clue about what goes into a C++ class, a tag and a vtable, then there are non-virtual member functions which take a pointer to the class as an implicit first parameter, this.

Abstract most will (should) have come across with pure virtual functions in classes.

Discriminants are not unique to Ada, anybody whose done a bit of Pascal will have come across them, they're also more structured than the equivalent struct/union.

Subtyping is not exactly unique to Ada, most OO languages have subtyping by extension/derivation, but subtyping primitive types is, I've not seen this anywhere else, same for strong typing of primitive types, same for fixed point types. The fact you cannot define a range in all other languages (without using templates) is one of the reasons there are so many errors in software.

Wrap around in modular types still impresses me now, no other language has that either (without using templates).

Printing the name of an enumeration is easy too, you can also read and write these names and convert to/from the enumeration values easily. In other languages you have to build the name table yourself and then write the conversions and the i/o code for each enum you want to do this with, how much work is that?

Then you can use all these ranges/enums as array bounds, doesn't even have to start at 0!

You do need to build up your knowledge bit by bit, but that's the same with all languages, it's just those languages have less to them and therefore (perceived to be) "easier" to learn.

It's got it's issues and it's showing it's age in certain parts, but it's got some good stuff in it and has some good stuff coming to 202x including parallel blocks for fine grained parallelism alongside it's (slightly) heavier tasking model (which other languages still don't have).

A new language for me has to have what Ada has and more, there just isn't any.

u/fadmmatt · 12 pointsr/Compilers

I just taught a compilers class. I've been posting my lecture notes on my blog (with many more to come); these might be useful to you:

  • Meta-circular evaluators and first-class macros
  • Compiling to Java
  • Compiling to C

    I recommend writing a Scheme compiler first, and I'd use Lisp in Small Pieces instead of the Dragon book.

    The Appel books are also a good treatment of compiler writing.

    Try writing a recursive descent parser by hand first. This is a manageable endeavor for a Scheme-like language. I wouldn't bother with ANTLR for a second attempt; I'd use one of the hot parser combinator libraries instead.

    In total, a good first compiler project would be something like:

  • A hand-written lexer.
  • A recursive-descent parser.
  • A normalizing pass to flatten expressions.
  • An escape-analysis pass.
  • A closure conversion pass.
  • A lambda-lifting pass.
  • A C-emission pass.

    You could then retarget to x86 if you write a register allocator.

    Good luck!
u/jimsyhadron · 7 pointsr/Compilers

I've been following my own journey upgrading my knowledge of language design over the last ten years or so. Some resources I highly recommend:

​

u/suhcoR · 1 pointr/Compilers

Book preferences are subjective; it depends on what you know and your learning style. That said: Engineering a Compiler is quite good. But there are also many nice tutorial around, e.g. https://ruslanspivak.com/lsbasi-part1/.

u/BinaryLust · 4 pointsr/Compilers

Here are few more advanced books that I highly recommend after you learn the basics and want to really implement something.

​

- Modern Compiler Implementation in Java 2nd Edition

- Advanced Compiler Design and Implementation 1st Edition

​

Also here is a link to a GitHub page with tons of compiler related resources. awesome-compilers

u/balefrost · 2 pointsr/Compilers

I was recently pointed to Engineering a Compiler (Cooper and Torczon) by some other Redditor, and so far it seems to be quite good.

u/tedivm · 4 pointsr/Compilers

As someone who is also just getting into that (to write, for fun, a really shitty javascript compiler), and I really enjoyed Constructing Language Processors for Little Languages.

I bought it with the Dragon book and read through it fairly quickly, using the Dragon book as a reference for things I either didn't understand or wanted more detail on.

u/PomAhGraNut · 2 pointsr/Compilers

This is the book that was used in my college compilers course. I found it to be one of the more readable CS books.