
Mirth – a type-safe concatenative purely functional programming language - agentofuser
https://github.com/mirth-lang/mirth
======
hombre_fatal
I was interested by the title, but it really needs a quick-start + examples in
the readme.

~~~
tomsmeding
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.

~~~
paulddraper
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.

~~~
edejong
LISP is a notable exception. Btw, I do believe a compiler should be one of the
examples of a new language.

~~~
bogdanoff_2
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?

~~~
edejong
In LISP-like languages a compiler/interpeter is a simple example.

~~~
kazinator
[https://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...](https://github.com/clisp-
lang/clisp/blob/master/src/compiler.lisp)

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...](http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/emacs-
lisp/bytecomp.el)

------
olodus
Oh wow, cool. Have been hoping for another concaternative functional language.
It really feels like one of those underrepresented language types. Always
hoped to create something in Kitten but never got around to it and the
development was mostly dead last time I looked at it. The way these languages
both keeps all the simplicity of a lisp and the strong abstractions of modern
functional languages, while still feeling and being close to the metal in a
way most func langs never can is something I feel should be better explored.
Though I don't see any example code on the README... Seems quite early so it's
understandable, but would love to see more about it.

~~~
ofrzeta
> Always hoped to create something in Kitten but never got around to it and
> the development was mostly dead last time I looked at it.

You can still use Factor [http://factorcode.org/](http://factorcode.org/)

~~~
6thaccount2
The creator of Factor left years ago to work on Swift I think.

I think it is still maintained, but slow releases.

~~~
gre
The "Development release" of Factor is the best version to use. I'll see about
releasing point versions more often.

~~~
6thaccount2
Thanks! I only looked at it a little awhile back, but thought it was really
cool...as a newbie I need more of an intro text to leverage it.

------
32bitkid
I thought for a second this was a post on Mirth Connect and I had flashbacks
to doing hl7 integrations.

[https://en.m.wikipedia.org/wiki/Mirth_Connect](https://en.m.wikipedia.org/wiki/Mirth_Connect)

~~~
yellowapple
Well now it's called NextGen Connect™, so I guess there's no more naming
conflict :)

~~~
taborj
Yeah, but everyone in the industry still calls it Mirth.

Personally, I'm a Qvera man myself, but there's a cost to entry there (unless
their free Standard edition does what you need).

------
molteanu
But, but...when do you get to actually use all these awesome languages?

> Forth, Haskell, Idris, Rust, Lisp.

All great. I would do anything to find a shop that actually uses any one of
these instead of the usual boring stuff.

Seriously, how would one proceed to find such places?

~~~
fastball
1\. Pick one of those langs.

2\. Build a product.

3\. ???

4\. Profit.

~~~
molteanu
1\. Done

2\. Done

3\. ???

4\. It's open source (damn it!)

~~~
fastball
Well next time make something that you can turn into a viable business and
build an org around that lang and that culture.

Be the change you want to see!

------
kfk
Very random question. It’s the first I come across a concatenative programming
language. Is SQL also concatenative in a way? I am thinking what you can do by
chaining subqueries together for instance using “WITH”.

~~~
0815test
Not at all. "Concatenative"[1] is a property of a language _syntax_ ; broadly
speaking, it holds that an arbitrary expression in the program text can be
understood as a sequence of words, and any subsequence is in some sense
meaningful; that is, the semantics of the expression as a whole is derived by
"concatenating" the semantics of each word, and this semantic "concatenation"
is consistent in that it can be used to provide a semantics to any
subsequence.

[1]
[https://en.wikipedia.org/wiki/Concatenative_programming_lang...](https://en.wikipedia.org/wiki/Concatenative_programming_language)

This all works well for _untyped_ languages (FORTH is untyped, as an example),
but once you add in reasonably complex types you can't really use "sequences"
alone, anymore; the directly comparable property is instead true of string
diagrams. And once you add some more complexity, you even have to deal with,
e.g. proof nets. There _are_ ways to simplify textual syntaxes like e.g. typed
lambda calculus along 'concatenative' lines, but mostly these are simple
tweaks (De Bruijn notation, and/or De Bruijn indexes) that don't really create
a "different" language.

~~~
zaiste
Would you be willing to point me to some research/articles related to your
statement about complex types? I'm (also) working on a statically-typed,
concatenative programming language. It's for fun. I'd like to learn more about
this topic.

~~~
0815test
See [https://arxiv.org/abs/0903.0340](https://arxiv.org/abs/0903.0340) for a
basic introduction to the issues, and
[https://arxiv.org/abs/0908.3347](https://arxiv.org/abs/0908.3347) for a
slightly more extensive treatment, also mentioning proof nets. This does not
_explicitly_ say that these diagrams can be understood as the equivalent to
sequences in something FORTH-like, but this _is_ in fact what the papers are
pointing out in a general sense, so I see it as a rather trivial remark.

~~~
zaiste
Thank you!

------
dmix
I love the syntax.

Does anyone know how Github chooses which languages to adopt in their language
detector?

~~~
Klathmon
[https://github.com/github/linguist](https://github.com/github/linguist)

------
softwarelimits
This will change everything!

------
edem
Why do we need yet another language instead of improving the existing ones?

~~~
hombre_fatal
Your profile says you like tinkering, yet you don't understand why others
would tinker and experiment with new things?

Do you only give yourself a pass for tinkering instead of using your precious
free-time to credentialize in and improve existing software?

~~~
tunesmith
Man, I don't know if it's against site guidelines, but I've never liked using
people's bios - even if public on HN - as ammunition against their comments.
Isn't it better to just respond to the content of the comments themselves?

~~~
rickbutton
There is always a person or two at the bottom of every thread like this that
loves to spew hate towards people that like to share interesting side-
projects, usually in a "you are wasting your time because your project has no
immediate value to ME, go spend it serving my interests instead" sort of way.
Claiming to also be a tinkerer in your public bio on the same website is
gross, and IMO fair game to point it out.

------
tluyben2
I am only recently aware of Patreon because of that V-lang stuff that has been
hyping around on Reddit and here; this however seems very interesting to me.
In my spare time I have been working on something similar for a long time but
this looks, at first glance, clean and well done compared to my own efforts.
Will have a play when I really wake up.

Another nice one (again imho) is [0].

[0]
[https://www.patreon.com/csaba_hruska](https://www.patreon.com/csaba_hruska)

