
LinearML:a programming language designed to write efficient parallel programs. - primodemus
https://github.com/pikatchu/LinearML
======
pikatchu
Hi all, I didn't realize that my project would end up in hacker-news. I was
planning to make a public announcement later when I had something more stable.
But well ... There is no going back now. Right now, I need to stabilize
closures, finish the standard library, write more tests and optimizations. I
saw a comment saying: it looks like clean. Well it's different in 2 ways,
LinearML is strict and every object is linear. In most languages (Clean, ATS,
etc ...), linear types are used to encode side-effects, as an alternative to
monads. This is not the case here, in LiML, every object is linear! sharing
has to be explicit. This leads to 3 interesting properties: 1) message passing
is cheap (no need to copy) 2) most operations can be done "in-place", which is
normally not true for a purely functional language. This allows better
caching. 3) There is no GC. No runtime overhead for garbage collection at all.

~~~
limmeau
I know this question is unpopular among PL researchers, but what is the
biggest program you've ever written in your language?

~~~
pikatchu
This is an unfair question :-) My plan was to release LinearML with a
significant amount of non-trivial examples. The guys from "mirage" are working
on a TCP stack based on LiML. I thought that would have been a really good
app. So, to answer your question. Right now, there isn't much. But the
question is unfair because I am not the one who made this public anouncement
... I didn't want to make the anouncement for 3 reasons: I just started a new
job at Facebook last week, and wanted to focus on that; I wanted to release
something relatively stable/fast; I wanted quite a few non-trivial examples to
prove my point. But I understand your skepticism. I would have certainly asked
the same question :-)

------
feral
A 1-2 page article, highlighting why this language is worth checking out,
would be a much more useful submission than a link to the github repository.

The readme on the github page doesn't contain much more information than the
title on HN.

I can't quickly evaluate whether this is worth downloading, configuring, and
installing.

Maybe its just me, but I don't like HN submissions that point to github
repositories, with skeleton readmes - I think we could do better.

~~~
primodemus
The tutorial contains a nice overview of the language:
<https://github.com/pika/LinearML/wiki/Tutorial>

The most interesting feature is the use of linear types to statically ensure
sound usage of resources, including memory, in other words, no garbage
collector.

~~~
ejones
Indeed. Linear Lisp promises the same thing
([http://www.deepdyve.com/lp/association-for-computing-
machine...](http://www.deepdyve.com/lp/association-for-computing-
machinery/lively-linear-lisp-look-ma-no-garbage-LvEqZZStmU)) and perhaps
Linear Joy (<http://osdir.com/ml/lang.concatenative/2005-10/msg00009.html>)...

It seems that when you do that, though, and especially from looking at the
tutorial, you end up with semantics that are a) fundamentally different from
GC-ed semantics, and b) explicit about memory management. But perhaps it
amounts to a kind of type-safe memory management?

~~~
hga
Henry Baker has copies of many/most/nearly all of his papers on his home page,
in this case: <http://home.pipeline.com/~hbaker1/LinearLisp.html>

------
scott_s
Brief tutorial is linked off off of the wiki:
<https://github.com/pika/LinearML/wiki/Tutorial>

Tried some brief Googling of what I think is the main author, and I found this
paper, "HirondML: Fair Threads Migration for Objective Caml": <http://www-
apr.lip6.fr/~ravet/hirondml_ppl08.pdf>

------
bjg
One of my professor's is working on an almost identical idea with his research
team. A parallel ML implementation. They call it "Manticore"

<http://manticore.cs.uchicago.edu/>

~~~
pikatchu
I don't understand how this is "almost identical" ...

------
pnathan
This sounds really cool.

I'd like to see indepth articles about how it achieves this, state of product,
etc, etc. Comparisons with other languages on various benchmarks would be nice
too. Maybe the Shootout.

~~~
pikatchu
I am working on that, but it's a bit early for that :-)

------
dkersten
This is very interesting.

I am experimenting with programming language design and implementation at the
moment and linear types is something I was considering - I am trying to
implement the language runtime in a dataflow model anyway and I felt linear
types would be a good match. I didn't do any work on it though because I'm not
sure how to implement it, but perhaps this language will give me some ideas.

