Is making a compiler actually that hard...

Is making a compiler actually that hard? Whenever I ask some anons why they think Terry Davis is a genius they bring up the whole "he mad his own compiler" thing. Im taking a class this semester on building compilers, by the end I'll have built my own. Does this make everyone who passes this class a Terry Davis tier genius programmer?

Attached: 1508191813565.jpg (640x480, 70K)

Other urls found in this thread:

theswissbay.ch/pdf/Gentoomen Library/Misc/O'Reilly Lex and Yacc.pdf
dinosaur.compilertools.net/
the-eye.eu/public/Books/HumbleBundle/lexandyacc.pdf
youtube.com/watch?v=5-SJKJnZ9cg
twitter.com/NSFWRedditImage

The compiler you'll build in that class will probably be really basic. Those aren't really hard to make, but if you get to the advanced optimization parts it'll be a lot more complex. I have no idea how advanced HolyC is in that regard though.

>optimizing JIT compiler
>some spoon fed nanopass shit

Depending on the language, making a compiler isn't necessarily that hard. Making a USABLE compiler that does the bare minimum standard of optimization, however, is one of the harder software problems out there. One of the few places that the complexity and effort of doing machine learning correctly is actually something that's worthwhile.

the genius is that it was written for a holy cause, not to pass some shmuck class at your glowing institution

dont know what any of this means

What is connection between ML and writing compiler?

Fucking compiler plebs. I'll never code in anything other than assembly.

Fucking assembler pleb, I'll never code in anything other than binary.

What machine learning is is optimization of unsolvable problem spaces and that's exactly what compilers do. There are a thousand ways to translate language code in to machine code and choosing the best one for the given situation is an absurdly complex heuristic.

There's plenty of academic literature on the hows and whys if you're really interested.

is there a place I can watch all of terries videos?

What did it even accomplish though, beyond proving to atheists that people who claim to commune with god are schizophrenic?

Writing a compiler is no that hard, considering you can skip writing your lexers/parsers/syntactic analyzers and so on.
Not a trivial thing to do seriously, but you don't need to become schizoid, OP.

That sound super interesting. Assuming I know a bit about machine learning, but nothing on compilers, where would I start? Any resources you can point me to?

writing a new language and compiler for it and making both actually perform well is incredibly hard. writing a basic compiler isnt too complex. but then making a new os with some amazing research features in it in your brand new language? forget about it

>Is making a compiler actually that hard?

It's really easy. All you have to do is learn two Unix programs, lex & yacc.
theswissbay.ch/pdf/Gentoomen Library/Misc/O'Reilly Lex and Yacc.pdf

Plus this:
dinosaur.compilertools.net/

2nd edition Lex & Yacc:
the-eye.eu/public/Books/HumbleBundle/lexandyacc.pdf

no not really

Not really most archives I find are usually incomplete. For example I rarely find ones with this youtube.com/watch?v=5-SJKJnZ9cg

deeze nuts

there's so many im not sure if there is a complete collection

Fucking binary plebs, I'll never code in anything other than detaching and reattaching wires.

>Is making a compiler actually that hard?
no

Predictable and consistent optimizations are better than some machine-learning heuristic because then the programmer can understand what those optimizations are and work with them, as opposed to ML when it's trained on programs that exist already and if you write your program in a different way you'll get shitty results

Well his compiler was impressive because it compiled on the fly in memory, and you could paste in like images and stuff directly into the code.

>and you could paste in like images and stuff directly into the code.
you mean he invented an HTML document?

Making a basic compiler is not that hard. Making a brand new language, good compiler and then an entire operating system with it is pretty hard.
Using lex & yacc is fucking retarded, just do it yourself instead of adding dependency for no reason you stupid monkeys.

Also everyone eventually ends up doing handrolled recursive descent anyway, once they decide to care about error messages and recovery

no, i mean you could paste like an image, right into the code, like it was a binary representation of it. More like RichText, if you remember that ill fated Microsoft technology.

If whatever special snowflake "predictable and consistent" ad hoc heuristic algorithm is really the optimal one then the Machine Learning algorithm will optimize into using it.

But since it's not, it won't.

You're living in an 8-bit fantasy world. It's time to grow up and realize that the complexity scale is too large to consistently predict anymore and the only reason anything works as well as it does is because they have been algorithmically optimized.

Depends on the design and what tools you use. There are tools to abstract parts of the process of creating a compiler.

One of the most important parts of the compiler is the parser, which tokenizes words and determines if statements follow the rules of a grammar.

You can easily make a machine-generated parser using a toolchain like yacc + lex as mentioned, but to create one from scratch, which is probably what terry did, would take over thousands of lines of code. You will probably be using lex +yacc in your compiler class due to time constraints. ( GCC used to use a lex+yacc generated parser ,but have since switched to a hand-written parser) .

You might choose to translate to an intermediate language first, make optimizations, then go to assembly.

Basically, there are a lot of things you can do with regards to creating a compiler, but it CAN be simple depending on what you want to achieve. If you are making a small lex/yacc compiler that compiles some imaginary C/C++ like language (which is what most likely you will do in a class setting) it won't be that difficult.

Fucking wire plebs, I'll never code in anything other than spawning billions of universes per second with my dick and waiting for the program to be developed by one of the random lifeforms that inevitably emerged

>If whatever special snowflake "predictable and consistent" ad hoc heuristic algorithm is really the optimal one
That's not what I said
I said predictable optimizations are better because the programmer can work with them if they understand them
Most optimizations that exist that are in use right now fall into that category
The optimal optimization depends on your program. You can find an optimal general solution but that solution always depends on your dataset, letting the programmer work with them always gives you the best individual result

>One of the most important parts of the compiler is the parser, which tokenizes words and determines if statements follow the rules of a grammar.
That's probably the least important part of a compiler. It's really easy to do, it's a few hundred lines of code and there's even tools that generate parsers for you. 90% of the difficulty in writing a compiler is optimization of the final result

>special snowflake "predictable and consistent" ad hoc heuristic algorithm
You know nothing about compiler optimization, do you

>the Machine Learning algorithm will optimize into using it.
And nothing about machine learning either, by the sound of it. The space of programs that are semantically equivalent to the input is not smooth in any sense. Good luck getting your ML algorithm to produce valid code, much less code that's both valid and equivalent to the original.

>>Is making a compiler actually that hard?
No, Terry was reinventing an entire stack of software. Thats why he gets recognition. in fact many people wrote a Simple C compiler it's not that hard. For most folks it would be just waste of there time. Most of his stuff is the bare minimum as all education examples should be. That was the purpose of this work before he get mentally ill. Terry himself called it "J Operating System" the name "TempleOS" was introduced in 2013 at this point he barley made any progress. because of his health. He had the target of 100k lines for this Project in the end he used 120k in one video he said he would only remove stuff from now on. because he was done.

It is if you're some dumb fuck normalfag i.e. that vast majority of people on this board or getting a cs degree somewhere.