i mean i personally started learning to
- see if i can make existing compilers more performant and safe
- make my own memelang
- understand better how code works under the hood
- understand how to make any code faster aligning it with how the compiler is made
- it's honestly just a good way to learn low level programming, which is in line with other projects i wanna get involved in
bumping bc i wanna see what other people say and how off track i am
Oh, you can't "do" anything. Everything that matters is already a solved problem worked out by somebody smarter than you 20+ years ago. Learning this stuff is purely for hobbyist use and to win nerdfights online by knowing 5% more about some ridiculously niche topic than the other guy.
or you could pay for a computer science masters and phd and become one of those smart guys from 20+ years ago.
2 weeks ago
Anonymous
>just get a phd bro
That is a fine approach but outside of the scope of OP's question
2 weeks ago
Anonymous
>become one
deluded zoomer
John Blow and Casey Muratori take a massive shit on this book.
2 twatter Black folk who gives a shit opinion literally discarded
Oh, you can't "do" anything. Everything that matters is already a solved problem worked out by somebody smarter than you 20+ years ago. Learning this stuff is purely for hobbyist use and to win nerdfights online by knowing 5% more about some ridiculously niche topic than the other guy.
>is already a solved problem
this is how a fegget moron think.
not everyone are potentialess pathetic Black person shitheads like you
[...]
[...]
[...]
[...]
None of you actually answered what I asked. I asked what will I be able to do after I learn about compilers? Why should I program my own compilers?
>what will I be able to do
what will you be able to do if you study mechanical engineering or anything else for that matter?
this question stems from ignorance and stupidity, if you are interested in the conversion of syntax commands to binary chains then learn it, there is nothing beyond that
It can be useful for writing interpreters for domain-specific languages since a good interpreter is basically a program that compiles instructions for its own virtual machine. An example would be a query language for a data source that doesn't have a query engine yet.
Why?
Have they expressed their opinions on israeliteTube?
If so, link them. I'm off to bed in while and want to listen to these individuals drone on about shit no fricker cares about.
It came up in this talk about implementing a precedence parser
It's actually a very good talk
the thesis of the talk is that he has the most intuitive explanation of how to write a precedence parser and he gives a bunch of examples of how other people do a terrible job explaining the topic with a particularly harsh critique of the dragon book
Clearly never read the book. Only 1/3 of it is dedicated up to parsing. There are more modern books however and I think a lot of the dragon book analyzes things that you'd encounter while writing a compiler and solve them intuitively so not worth reading in a book
this book is one of few rare places where it is explain how to make a LR(1) and an LALR(1) parser another place is Modern Compiler Implementation in ML by Andrew Appel
I've watched this video and I've got a lot of experience writing various variations of operator precedence parsers specifically and no, his method is far from the best. In fact it's not even an operator precedence parser per se nor that he says that it is, but it's a method for dealing with operator precedence. What he does is use a recursive descent parser fot the entire language, operators are parsed with an equal precedence and a default associativity, and then, while or after the parse tree is produced, he changes the shape of the tree based of a precedence table.
It would be better logically speaking to have the recursive descent parser simply call a proper operator prececedence parser and to choose the best variation of this algorithm because the original variants are hard to generalize beyond infix operators.. It's a lot easier to understand that rewriting the tree. Usual tree rewritings are not hard but when it's for modifying the precedence and associativity it's harder. His method also requires to store in the tree the information that a given AST node corresponds to an expressions surounded by parentheses.
2 weeks ago
Anonymous
Interesting. I thought that for precedence and associativity they just refactored the grammar automatically somehow before parsing normaly
2 weeks ago
Anonymous
checked >I thought that for precedence and associativity they just refactored the grammar automatically somehow before parsing normaly.
No, that's technically possible but this implies metaprogramming and that the parser would be generated but Jai's parser is written manually like the 99% of recursive descent parsers.
But putting an operator precedence parser inside a recursive descent parser or doing the ugly thing Blow is doing reduces a good deal the size of the code you need to write, because you need 1 function be precedence level (C has 15 of them) which is a few hundred if not more of repetitive code that you don't need to write anymore and it's more reliable, more easily verifiable.
Played it, I was the anon who told chuck he should have posted a link in the first place. Missed the first link >99% accuracy, 7ACPL
You probably think I cheated after that game unfortunately
John Blow and Casey Muratori take a massive shit on this book.
The install gentoo wiki recommends it: https://wiki.installgentoo.com/wiki/Programming_resources
The install gentoo wiki hasn't had a single contribution by a non-moron for at least 4 years.
Rightfully so. 90% of that book is about parsing source code. I import "nom" library and made parsing triviad
>I import "nom" library
Get out.
None of you actually answered what I asked. I asked what will I be able to do after I learn about compilers? Why should I program my own compilers?
i mean i personally started learning to
- see if i can make existing compilers more performant and safe
- make my own memelang
- understand better how code works under the hood
- understand how to make any code faster aligning it with how the compiler is made
- it's honestly just a good way to learn low level programming, which is in line with other projects i wanna get involved in
bumping bc i wanna see what other people say and how off track i am
Oh, you can't "do" anything. Everything that matters is already a solved problem worked out by somebody smarter than you 20+ years ago. Learning this stuff is purely for hobbyist use and to win nerdfights online by knowing 5% more about some ridiculously niche topic than the other guy.
play chess with me
If you posted a lichess link I would have but you didn't. Sorry about your luck, formerly chuck's.
https://lichess.org/bcxpCwSe
you won
i missed a move
or you could pay for a computer science masters and phd and become one of those smart guys from 20+ years ago.
>just get a phd bro
That is a fine approach but outside of the scope of OP's question
>become one
deluded zoomer
2 twatter Black folk who gives a shit opinion literally discarded
>is already a solved problem
this is how a fegget moron think.
not everyone are potentialess pathetic Black person shitheads like you
>what will I be able to do
what will you be able to do if you study mechanical engineering or anything else for that matter?
this question stems from ignorance and stupidity, if you are interested in the conversion of syntax commands to binary chains then learn it, there is nothing beyond that
Anon, I work with LLVM for a living and even I can’t give you a good answer beyond "because you’re interested in it"
>even I
a literal who? wow!
Made you respond 🙂
It can be useful for writing interpreters for domain-specific languages since a good interpreter is basically a program that compiles instructions for its own virtual machine. An example would be a query language for a data source that doesn't have a query engine yet.
become a memelang chad
Why?
Have they expressed their opinions on israeliteTube?
If so, link them. I'm off to bed in while and want to listen to these individuals drone on about shit no fricker cares about.
It came up in this talk about implementing a precedence parser
It's actually a very good talk
the thesis of the talk is that he has the most intuitive explanation of how to write a precedence parser and he gives a bunch of examples of how other people do a terrible job explaining the topic with a particularly harsh critique of the dragon book
he holds up the book around the 18 minute mark
>most STEMcucks are bad teachers
that's because most of them are autists
Clearly never read the book. Only 1/3 of it is dedicated up to parsing. There are more modern books however and I think a lot of the dragon book analyzes things that you'd encounter while writing a compiler and solve them intuitively so not worth reading in a book
this book is one of few rare places where it is explain how to make a LR(1) and an LALR(1) parser another place is Modern Compiler Implementation in ML by Andrew Appel
I've watched this video and I've got a lot of experience writing various variations of operator precedence parsers specifically and no, his method is far from the best. In fact it's not even an operator precedence parser per se nor that he says that it is, but it's a method for dealing with operator precedence. What he does is use a recursive descent parser fot the entire language, operators are parsed with an equal precedence and a default associativity, and then, while or after the parse tree is produced, he changes the shape of the tree based of a precedence table.
It would be better logically speaking to have the recursive descent parser simply call a proper operator prececedence parser and to choose the best variation of this algorithm because the original variants are hard to generalize beyond infix operators.. It's a lot easier to understand that rewriting the tree. Usual tree rewritings are not hard but when it's for modifying the precedence and associativity it's harder. His method also requires to store in the tree the information that a given AST node corresponds to an expressions surounded by parentheses.
Interesting. I thought that for precedence and associativity they just refactored the grammar automatically somehow before parsing normaly
checked
>I thought that for precedence and associativity they just refactored the grammar automatically somehow before parsing normaly.
No, that's technically possible but this implies metaprogramming and that the parser would be generated but Jai's parser is written manually like the 99% of recursive descent parsers.
But putting an operator precedence parser inside a recursive descent parser or doing the ugly thing Blow is doing reduces a good deal the size of the code you need to write, because you need 1 function be precedence level (C has 15 of them) which is a few hundred if not more of repetitive code that you don't need to write anymore and it's more reliable, more easily verifiable.
*1 function per precedence level
well
anyone https://lichess.org/cA3kEJlu
time to fire up my chess engine
Played it, I was the anon who told chuck he should have posted a link in the first place. Missed the first link
>99% accuracy, 7ACPL
You probably think I cheated after that game unfortunately
Nah I'd use python, frick your compilers
I don't know felt like a roundabout way to learn compiling so I dropped it.
damn the old spyro graphics looked so different back then, sad what happened to the art guy
>Alfred Aho
>asiatic
he's a white man, of Finnish origin I think