You are viewing archived messages.
Go here to search the history.

Mariano Guerra 2023-01-30 17:58:08

Naming is hard:

With the newsletter looking for its place under the Future of Coding Brand Conglomerate β„’ I tried to give each feature a consistent place and name, this is the current state of affairs:

Now http redirects to https automatically

πŸ“’ Looking for feedback , let me know what you think, I would like to start linking more stuff to the futureofcoding.org domain instead of github and tinyletter but for that I need stable links that don't break

Ivan Reese 2023-01-30 18:57:42

The link search tool is neat. I've now set up an A record for links.futureofcoding.org, if you want it.

Mariano Guerra 2023-01-30 19:15:19

sure! πŸ˜„

Maikel van de Lisdonk 2023-01-30 18:15:05

Has anyone read "compilers principles techniques and tools" and/or "modern compiler design"? Can you recommend one them or another book about the subject? I am getting some experience building compilers currently and the last year or so, but I am still rather new to it and looking for some good reference to help me grow

Jimmy Miller 2023-01-30 19:03:04

The dragon book is a classic that is often recommended. I personally haven't read it. I hear most people like it as a reference. A book I have read (a good chunk of) that I can highly recommend is crafting interpreters. While on the face it isn't about compilation, the second half of the book you compile to a bytecode vm that you build.

My advice is to look for books where most of the book is not spent in parsing. For some reason, there is an obsession in compiler books with parsing. It is usually not that important and is such a small part of the language.

One book I just ordered but haven't read yet that looks really nice is Engineering A Compiler.

Also happy to chat about compilers anytime. I'm relatively new to them as well, but now working on a JIT compiler in my day job, I'm learning a lot faster.

Maikel van de Lisdonk 2023-01-30 19:19:04

Thanks, that sounds like a good book (crafting interpreters) and I've ordered it. I've also saw Engineering a Compiler and curious about your findings. For sure interesting to have a chat about compilers in a video call , where are you located? (I am a bit busy because we're moving through a new house this month here in the Netherlands). I only have a big chunk of friday and the saturday and sunday early mornings to work on my project .. so working on a jit compiler at work full-time is very nice I can imagine for sure!

Lu Wilson 2023-01-31 00:07:34

I found it very confusing but I did enjoy the pictures

smt 2023-01-31 01:48:43

do you have the code posted online for the compiler you're working on? i'm not an expert though i know a little bit and would be happy to take a look

Maikel van de Lisdonk 2023-01-31 05:32:53

I am working on multiple compilers, this is the expression/script to javascript compiler: github.com/devhelpr/expression-compiler .. I have used a course on udemy as a base for the the compiler structure (udemy.com/course/parser-from-scratch) .. I am also building a simple jsx compiler which I'll share once I have some bugs fixed.

Maikel van de Lisdonk 2023-01-31 05:57:31

I use my expression-compiler in the visual programming system that I am building .. it is used for compiling little snippets for conditional nodes but also larger pieces of script. It can have input from the outside via a payload and it can be extended with external functions that can be used from within the expressions/scripts.

Jack Rusher 2023-01-31 08:12:49

I scanned through Crafting Interpreters awhile ago β€” it looked like a good, approachable introduction. Wirth's Compiler Construction is a beautiful gem of a book, though perhaps a bit dated by now. The Dragon Book is a classic, but I think it works better in a teaching setting than for self-study. SICP intros this topic very well, but contains loads of other stuff that would turn it into a lengthy side quest.

Much as Jimmy has recommended that you skip a bunch of parsing stuff, it sounds like your use case doesn't need a bunch of the normal code generation techniques, as what you're building is what we used to call a translator (rather than a compiler , which is a translator from a higher to a lower level language). πŸ€·β€β™‚οΈ

Maikel van de Lisdonk 2023-01-31 09:10:57

I've also build a webassembly compiler using the same approach although you might argue that this is also a translation process since wasm is a (very) low language as well. Where lies the boundary between calling this process compilation or translation? (Or maybe even "transpiling")

Jack Rusher 2023-01-31 15:30:15

What people call "transpiling" today is what we would have called "translation" in the past. High level to (w)ASM would definitely be compiling! πŸ™‚

Maikel van de Lisdonk 2023-01-31 15:31:05

πŸ˜…otherwise I had to return the book I just bought

Lu Wilson 2023-01-31 15:51:55

It's only called compiling if it's from the compilΓ© region of France I believe

Mariano Guerra 2023-01-31 15:53:22

The sun is a compiler

William Taysom 2023-01-31 23:52:16

As a lover of parsers, I agree that compiling is a different beast from compiling. Where a parser is a tree growing out of a stream β€” and at its most interesting a typo dirty stream β€” compiling is mostly more about transforming a tree.

Speaking of beasts, when first, and with little understanding, I was curious about this at school, I was hoping for the Dragon Book and got Pierce's Types and Programming Languages, which served me better in the end.

For compiling, I always liked the Nanopass project for its clarity nanopass.org/documentation.html. For parsing, monadic ones get a person in a particularly good frame of mind, and Ohm ohmjs.org is the nicest tool I've come across.

Ulysses Popple 2023-02-01 08:19:43

I've been really enjoying "build your own programming language" by clinton l jeffery which includes building a compiler.

Maikel van de Lisdonk 2023-02-01 13:22:44

Thanks for all the info! Enough to read and discover (and improve)πŸ€―πŸ˜€

Jack Rusher 2023-02-01 16:29:32

The Nanopass papers are great. I wish more languages used a layered approach of that kind!