are there any concepts in computer science that vex you and make your brain tickle?I literally do not understand this
>>109941482How much work the compiler does. It is essentially taking letters and changing them to numbers. A = 12345567 etcSo the computer understands it.It auto optimizes certain section of your code making optimization irrelevant for certain things. People talk about decompiling all the time. But we never stop to think about how our code is fundamentally changed. And how we don't own own it. Didn't make it. Then i think about how it's also just cryptography. If i know that 12345567 is A, I have almost everything. I've been decompiling so many different things and I never stopped to go in the other way. It just is another point of separation between myself and what I want to do. Always stuck behind the glass, playing the game with the control unplug. Media talks about the loss of humanity by being absorb by technology. But I want to be that ghost in the shell. This is exactly what I asked for.
>>109941482Im taking a compiler construction course in uni… i had to rewrite my professor’s python code for lexers and parser in racket because trees makes moe sense to me hehe.Im still a newbie but i believe lexers take raw text, goes through it text by text and turns it into tokens (words).The parser then takes the tokens, checks if it follows the grammar and if so turns it into AST:3
>>109941482if this confuses you its probably because its throwing some parsing terms & commonalities at you while you lack some foundational language. Go google how language parsers work and write your own from scratch (NOT using tools like yacc or bison).
>>109941701Makes more sense to me in lisp* sorry
>>109941482>parser-generatorgayest cuckware ever developed. there is no reason to ever use one.
>>109941482The dragon book spends several chapters on this topic, including working through examples showing exactly how the lexing and parsing algorithms in lexx and yacc work.
>>109941899this, + pratt parsing is brilliant and not very difficult to implement
>>109941899faxthis goes for file parsers too. Write your own like a MAN faggot. Fuck protobufs on god.
Co-induction
>>109943553Pratt parsing always breaks my brain. I've probably written it from scratch about 3 times by now yet each time I feel like I'm learning it from scratch. It just never really clicked. Meanwhile recursive descent just fucking works.
>>109941482From that screenshot it's hard to say what is it that confuses you exactly ?The purpose of lexing, parsing or both ?