News for hackers. Stuff that matters.
Re:Mirth – a type-safe concatenative purely functional progr... by tomsmeding on Friday July 12, 2019 @03:50PM (#20423849)
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.
Re:Mirth – a type-safe concatenative purely functional progr... by paulddraper on Friday July 12, 2019 @04:42PM (#20424321)
But 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.

Re:Mirth – a type-safe concatenative purely functional progr... by edejong on Friday July 12, 2019 @05:57PM (#20424888)
LISP is a notable exception. Btw, I do believe a compiler should be one of the examples of a new language.
Re:Mirth – a type-safe concatenative purely functional progr... by bogdanoff_2 on Friday July 12, 2019 @10:58PM (#20426237)
Are 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?
Re:Mirth – a type-safe concatenative purely functional progr... by edejong on Saturday July 13, 2019 @06:55AM (#20427463)
In LISP-like languages a compiler/interpeter is a simple example.
Re:Mirth – a type-safe concatenative purely functional progr... by kazinator on Sunday July 14, 2019 @12:28AM (#20431637)
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...

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-l...

Re:Mirth – a type-safe concatenative purely functional progr... by garmaine on Friday July 12, 2019 @06:59PM (#20425287)
FWIW, concatinative languages are even simpler than Lisp.
Re:Mirth – a type-safe concatenative purely functional progr... by garmaine on Friday July 12, 2019 @04:23PM (#20424150)
True, 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.