Hacker News new | past | comments | ask | show | jobs | submit login
LinearML:a programming language designed to write efficient parallel programs. (github.com/pikatchu)
69 points by primodemus on March 10, 2011 | hide | past | favorite | 22 comments



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.


I like this project. It fits nicely with my own views of a good parallel/concurrent language. As I said in another comment, I am playing around with languuge design/implementation too.

Could you perhaps give some notes on how you implemented the linear type system? I am browsing through the source code, but finding it tough understanding whats going on. Anything at all (brief overview?) would be useful and appreciated.


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


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 :-)


I'm a little late to this thread, but just wanted to say nice job. This looks promising.


thanks!


Is LiML meant to attack concurrency or parallelism or both?


both


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.


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.


Indeed. Linear Lisp promises the same thing (http://www.deepdyve.com/lp/association-for-computing-machine...) 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?


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


The tutorial is different from the article most people want. Most people just want something highlight the uniqueness of this language, not how to represent list and array. I like the kind of article explaining something (e.g. a particular parallel algorithm) used to be difficult in conventional languages but not in this new one.


Sounds a bit like Clean.


Linear types are unrelated to uniqueness types.


The linked tutorial says:

>>> Some people will argue that these are in fact "unique types" as opposed to "linear types", the difference being subtle (a unique type enforces that only ONE pointer exists at any given time, a linear type enforces that the amount of pointers is stable). However, you will often see unique types been called linear types in the litterature, and if P. Wadler can do it, so can I ! <<<


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


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/


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


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.


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


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: