At my school (http://www.cs.millersville.edu/) TuringMachines, push down automata, and FiniteAutomata (including RegularExpressions) are covered as a sophmore in a class on computational models that is a required class for all majors. Most people didn't seem to get what the point was unless they had already had experience writing parsers (there was one sophmore in my class who WritesCompilersAsaHobby).
CarletonUniversity introduced this requirement the year after I entered. -- SunirShah
See also GrokTheCompiler.
How many of us also write compilers as a hobby? I used to. -- DavidBrantley
- I do. Of course, I also write compilers for a living, so things work out nicely. -- PaulTevis
- I write compilers and interpreters as a hobby, in an unending quest to design my perfect programming language. My latest is a mix of my favourite parts of SchemeLanguage, SmalltalkLanguage, DylanLanguage and PythonLanguage.
- Features: MultiMethods (as in Dylan [DylanLanguage]) with tail-call elimination (as in Scheme, see TailCallOptimization) as the only form of control flow -- all other control flow statements can then be implemented in the language itself with common ones in a standard library; blocks as first-class objects (as in Smalltalk and Scheme), scope expressed by indentation (as in Python); functions have "keyword parameters" (as in Smalltalk); dynamically loaded packages (as in Python, Java etc.). I'm aiming for a language where readability is the primary goal, without sacrificing expressive power or the ability to be compiled into reasonably efficient native code. I'm thinking that the programming paradigm (sorry about that word!) in this language will be to define domain-specific classes, control constructs and functions tailored to each particular problem domain, built upon the bare minimum language and standard libraries. -- NatPryce
- One of my friends and I are also trying to develop the perfect language (in our CopiousFreeTime). A mixture of JavaLanguage, CeeLanguage, and PythonLanguage (with just a dash of SmalltalkLanguage). Interpreted, byte-compiled, and native compilation. Yes, we know we're loony. -- PaulTevis
- I toy around with interpreters in ObjectiveCaml. O'Caml is really optimized for writing parsers and interpreters. It's just good fun. -- StephanHouben
- I'm into the DylanLanguage, and I'm one of the core maintainers of GwydionDylan. The one thing I have learnt is that language design is a very delicate thing, that influences your choice in optimization algorithms in subtle ways, and the designers of Dylan made sure that all the nifty features translate into good code. -- AndreasBogk
- The ForthLanguage is an easy one to write a compiler/interpreter for, if you want to try something small. And the experience doing this will help understand how to write compilers for other languages. -- KrisJohnson
- Mee too. My language OhScript will not be too spectacular, but the runtime to it will allow something similar to the CommonLanguageRuntime -- that is the ability to transparently program without language barriers.
- My latest hobby project was a compiler/interpreter for KarelTheRobot. It was implemented in PythonLanguage, and its output was also Python. -- SteveHowell
- I'm slowly writing a compiler for the OnceProgrammingLanguage in my spare time. -- ThomasColthurst
- I once implemented a compiler from a C-like language to the PIC. Now that I am older and wiser, some of my spare time goes toward my Lisp [LispLanguage] compiler-to-be, which is entirely in Lisp. -- DanielKnapp
- I used to write copious amounts of languages that had a heterogeneous (heterogeneous? OK, wrong word. I mean there is only one data type and the whole program is a tree with limited width (no blocks and the like)) data format and could be expressed as trees. Then I'd randomly scramble 1000s of these programs and used genetic programming to breed good and efficient programs ;) My latest language is for web development and not quite for fun, HtagLanguage. I think its parse tree and strings only datatyping will be sufficient to shape it into a genetically breedable language. Well, commercial pressure have moved me away from my genetic passion and towards practical web applications. HtagLanguage has become more sophisticated, and nowadays I wrtie new scripting systems in HtagLanguage. Since mine is still the only instance of Htag, I fear of loosing my skills in "mainstream" programming languages. -- SvenNeumann
- I'm writing one right now for JayRuby, a RubyLanguage implementation. I didn't think I was alone, but I couldn't imagine so many others were doing things like this. -- AndersBengtsson
- I started to write a compiler long ago and then discovered, that aspects to build into it appeared faster, then I could include them and that the refactoring of the compiler made it faster incomplete than I could handle in my spare time. Today no real code of it remains. But I still enjoy designing languages and especially the environment for them, because I think, that the compiler is not the real challenge for a language designer, the operating system is. -- GunnarZarncke (see also LanguagesAreOperatingSystems and LanguagesVsEnvironments)
- I've been tinkering around with and designing various languages for too many years now. In recent years, my focus has been on developing new language structures to aid the beginner or non-programmer in picking up their first language and becoming productive with it in a reasonable amount of time. -- NickShaffner?
- I avoid "big" compiler project - I do often write small language for concrete needs, but still just for fun... (and in the same time I do develop a "real" compiler project with C like syntax and specefic asm output - but this more of a work than an amusement)
- I've written an incremental compiler for Emblem (http://web.onetel.com/~hibou/Emblem.html), my Lisp dialect. It's in Emblem, and compiles down to Emblem byte code. It's around 1000 lines long. -- DonaldFisk
By the standards I'm seeing discussed here, one might assert that even when a programmer is creating a new language, they are not necessarily a LanguageDesigner. However, it would seem to me that there is a ContinuumOfOriginality, that is to say, that even derivative or synthetic works often have elements of creativity (if not necessarily innovation). This can be seen in a project I am involved in called Basis, a collaborative effort to solve the reccurring requests for a systems-programming language with a QBasic-like syntax (it is also meant as a demostration of compiler programming, which is my own main involvement in it; I had simultaneously proposed similar projects for Lisp and Smalltalk like system languages, which fell flat). While I and a handful of others devised the grammar it will use, it is wholly derivative of earlier languages of the type, by intention (indeed, some suggested 'improvements' which I proposed were violently rejected as being too un-Basic-like). Still, there were some notable differences from the dialects which it is based upon, and it does not quite match any one of them. To what degree is this design, and to what degree is this 'writing'? -- JayOsako
It falls in two categories, design of the language, and design and implementation of the compiler/interpreter. If the language design is 100% provided, e.g. by ANSI standard, then there's no room left for further language design. If the language design is 80% provided via "make it like QBasic, but also add in some features to support XYZ", then there's room for 20% to be design. Similarly with the compiler; even if the language was 100% designed for you, you may (or may not) design the language implementation. If you take an existing compiler, and change just its grammar, that's not much in the way of design. If you start from scratch, you have to design subsystems (like for tracking types) and classes/data structures/methods.
In short, design is novel or customized solution to a set of problems, either in the language, its implementation, or both.
If you have this infliction, then perhaps try building an interpreter for TopsQueryLanguage.