News for hackers. Stuff that matters.
Re:Create Your Own Compiler: A step-by-step interactive tuto... by toastal on Saturday November 26, 2022 @11:27PM (#33760366)
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.
Re:Create Your Own Compiler: A step-by-step interactive tuto... by chrisseaton on Saturday November 26, 2022 @11:32PM (#33760397)
It's an aesthetic - have you seen https://carbon.now.sh ? I think it's that website which popularised it recently.
Re:Create Your Own Compiler: A step-by-step interactive tuto... by klohto on Sunday November 27, 2022 @04:25AM (#33761635)
this has been a popular style ever since macOS flatness
Re:Create Your Own Compiler: A step-by-step interactive tuto... by toastal on Monday November 28, 2022 @08:11AM (#33773175)
You can also uncheck the "Window controls" that don't add anything of value to the snippet.
Re:Create Your Own Compiler: A step-by-step interactive tuto... by lukeschwartz on Sunday November 27, 2022 @02:06AM (#33761063)
propaganda.
Re:Create Your Own Compiler: A step-by-step interactive tuto... by wiseowise on Sunday November 27, 2022 @02:15AM (#33761109)
Propaganda of what? Good design?
Re:Create Your Own Compiler: A step-by-step interactive tuto... by terminal_d on Sunday November 27, 2022 @10:53AM (#33763725)
It looks cool.
Re:Create Your Own Compiler: A step-by-step interactive tuto... by terminal_d on Sunday November 27, 2022 @10:56AM (#33763759)
Anyone know what application is being used to host the tutorial?
Re:Create Your Own Compiler: A step-by-step interactive tuto... by yairhaimo on Sunday November 27, 2022 @05:05PM (#33767479)
Hi, I created the application from scratch for my own site. Thinking about improving and opensourcing it.
Re:Create Your Own Compiler: A step-by-step interactive tuto... by pomatic on Sunday November 27, 2022 @11:49AM (#33764303)
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.

Re:Create Your Own Compiler: A step-by-step interactive tuto... by periheli0n on Sunday November 27, 2022 @03:03PM (#33766229)
Nice learning resource. Big caveat: Can’t seem to go back a step. Nice looks, but functionally still has some way to go.
Re:Create Your Own Compiler: A step-by-step interactive tuto... by yairhaimo on Sunday November 27, 2022 @05:06PM (#33767495)
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.

Re:Create Your Own Compiler: A step-by-step interactive tuto... by periheli0n on Monday November 28, 2022 @04:10AM (#33771329)
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.
Re:Create Your Own Compiler: A step-by-step interactive tuto... by yairhaimo on Tuesday November 29, 2022 @05:33PM (#33794334)
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.
Re:Create Your Own Compiler: A step-by-step interactive tuto... by kramerger on Sunday November 27, 2022 @05:06PM (#33767496)
This was a pretty weird experience.

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

Re:Create Your Own Compiler: A step-by-step interactive tuto... by tzs on Sunday November 27, 2022 @09:10PM (#33769089)
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/