5 ms·
To be frank, the src/ folder is the compiler for Mirth written in Mirth, so there's your example code. However, I do agree that a quick introduction would not b
by tomsmeding 7y ago
To be frank, the src/ folder is the compiler for Mirth written in Mirth, so there's your example code. However, I do agree that a quick introduction would not be out of place.
- garmaine 7y agoTrue, and that would be a good thing for the README to emphasize. It's mentioned, but in passing. But even so, I know I'd like a good reference of what primitive operations are, the type system, and what's provided by the Prelude.
- paulddraper 7y agoBut the first thing I want to about C is not a compiler written in C. That's an unfriendly intro to almost any language. I want to see a procedure call, "Hello world" I/O, some math or string manipulation, and how to run that myself. After that I can look at compiler sources.
- edejong 7y agoLISP is a notable exception. Btw, I do believe a compiler should be one of the examples of a new language.
- garmaine 7y agoFWIW, concatinative languages are even simpler than Lisp.
- bogdanoff_2 7y agoAre you saying that lisps are an exception to needing to see some small examples at first when looking at a new language? Why do you think they're an exception?
- edejong 7y agoIn LISP-like languages a compiler/interpeter is a simple example.
- kazinator 7y agohttps://github.com/sbcl/sbcl/tree/master/src/compiler https://github.com/sbcl/sbcl/tree/master/src/compiler Doesn't look simple to me. This one is in one file, but more than half a megabyte of code spanning close to 12000 lines: https://github.com/clisp-lang/clisp/blob/master/src/compiler.lisp https://github.com/clisp-lang/clisp/blob/master/src/compiler... The Emacs Lisp byte compiler also doesn't look like a good small example for neophytes: http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/emacs-lisp/bytecomp.el http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/emacs-l...