Hacker News new | past | comments | ask | show | jobs | submit login
Create Your Own Compiler: A step-by-step interactive tutorial (citw.dev)
199 points by lispybanana on Nov 27, 2022 | hide | past | favorite | 16 comments



Although it is older than a fair number of HN readers, a great book from 1990 on compilers is Allen Holub's "Compiler Design in C". It's long out of print but there is a free PDF on Holub's website [1].

The book covers the usual theory and then puts it to use to develop tools for writing compilers (e.g., lexical analyzer generators similar to lex and parser generators similar to yacc) and then with those tools develops a C compiler.

[1] https://holub.com/compiler/


This approach won't work if you live somewhere windy^ - the cables will chafe and even with the nylon spacer, will likely short and/or electrify the soffit with obvious associated risks.

^source: first hand experience, albeit with cuphooks rather than magnets.


Anyone know what application is being used to host the tutorial?


Hi, I created the application from scratch for my own site. Thinking about improving and opensourcing it.


This was a pretty weird experience.

I've would preferred a simpler and more traditional design.


Nice learning resource. Big caveat: Can’t seem to go back a step. Nice looks, but functionally still has some way to go.


Hi,

(It's my site). Thanks! That's a pretty big caveat, woops. I'll check it out.

Would love to hear some ideas about improved functionality.


Mainly that it‘s impossible to go back a step! Sorry if my comment sounded negative — I learnt a lot just by clicking through the steps. Very easy to follow. The steps are just the right size of complexity, the code is very clear.


Thanks! You cant go back a step at all? Going back a step might fail in certain cases that I dont have tests for but it should work in general. I'll keep digging.


What is the purpose of the macOS window action buttons in a UI like this? I can't close the window and it doesn't match my OS at all.


It's an aesthetic - have you seen https://carbon.now.sh ? I think it's that website which popularised it recently.


this has been a popular style ever since macOS flatness


You can also uncheck the "Window controls" that don't add anything of value to the snippet.


It looks cool.


propaganda.


Propaganda of what? Good design?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: