I may not be the best one to talk, but writing a compiler in something like Java/Haskell sounds like it would be incredibility slow if you wanted to get some real world usage out of it. If you already know some Java, why not take a dive into a real lower level language like C/C++ already? -- C/C++ have been used to write a lot of compilers/interpreters. Speaking of, check out Bisqwit's video on writing a compiler.

https://www.youtube.com/watch?v=eF9qWbuQLuw&t=652s

If half way in that video already feels like it's a little too much to handle, perhaps you are not ready. -- No offense. I've tried to taken a nose dive attempting to write a MMO game from scratch and got burned from it pretty quickly after I realized how evolve you really must be. Just don't want you to waste your time, if it could be spent doing something more practical. Otherwise, if you can sit through the hole video and understand how to interpreter into xyz language, by all means go ahead and mess around, and do some Googling around on the Internet. There are 100s examples out there how to make interpreters/compilers.

I also had this book at one point, if the hole project still interests you: https://www.amazon.com/Compilers-Principles-Techniques-Tools-2nd/dp/0321486811/ref=sr_1_2?ie=UTF8&qid=1516817947&sr=8-2&keywords=compiler

Andrew McRobb
Full-time Software Developer
Part-time Freelancer

On Tue, Jan 23, 2018 at 6:39 PM, trent shipley <trent.shipley@gmail.com> wrote:
Since my other thread degenerated into a "school bad, school good" flame war, I thought I would try again.

I have little academic OR practical background with programming.

I want to write a couple of compilers.

The compilers are for functional languages.

I would PREFER to write the compilers with functional languages (1, a Haskell to JVM compiler mostly in Haskell with with some Java, 2, Funcalc--a pedagogical spreadsheet in Kotlin.)

I'm pretty good at learning computer languages, and so far teaching myself Haskell has failed to produce insurmountable obstacles.

But programming compilers is supposed to be HARD, and very much indebted to theory (as in, things they DO teach in school).

I have no money for school, (and whether school produces better coders or not, I LIKE school, but that's irrelevant due to the money problem.)

Is it possible to teach yourself to write compilers in an imperative language? If so how?
Having learned to write compilers with imperative languages, how do you convert to writing compilers in functional languages (for example, given Haskell [thought by many to be hard], writing lexer-parser-compilers is considered easy)?


Regards,


Trent.

---------------------------------------------------
PLUG-discuss mailing list - PLUG-discuss@lists.phxlinux.org
To subscribe, unsubscribe, or to change your mail settings:
http://lists.phxlinux.org/mailman/listinfo/plug-discuss