caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Stéphane Glondu" <steph@glondu.net>
To: "Mikkel Fahnøe Jørgensen" <mikkel@dvide.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] JIT & HLVM, LLVM
Date: Wed, 30 Sep 2009 15:42:44 +0200	[thread overview]
Message-ID: <4AC36054.6070704@glondu.net> (raw)
In-Reply-To: <caee5ad80909300554h613a3066x20c55704b2ffffb2@mail.gmail.com>

Mikkel Fahnøe Jørgensen a écrit :
> But this requires the function to be designed in a clean way and
> conform to certain monadic rules, and getting it wrong creates a mess
> in the type errors.

Actually, I find the typing discipline enforced by the monadic
abstraction very helpful (and elegant).

> Now, we might as well just push a closure onto a queue instead of on
> the call stack. This avoid a lot of complexity in the function type
> design, and we get a lot more flexibility in how we dispatch the tasks
> (arguably we could do the same or possibly more, in continuation
> passing style, but it will give you a headache).

This sounds like a narrow (and C-ish) way to tackle things. The bind
operator is about composition of threads, not scheduling.

> More importantly, it is much simpler to understand a closure on a
> queue, than continuation passing style.

What you call the "call stack" is orthogonal to your "queues of
closures": one is about combining results of threaded computations
whereas the other is just spawning threads and relying on some external
mechanism to schedule them.

In other words, I think both can be used together, and achieve different
purposes.


Best regards,

-- 
Stéphane


  reply	other threads:[~2009-09-30 13:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-27 17:18 David McClain
2009-09-27 17:22 ` [Caml-list] " Vincent Aravantinos
2009-09-27 17:35   ` Edgar Friendly
2009-09-27 18:51     ` Jon Harrop
2009-09-27 19:07       ` Edgar Friendly
2009-09-27 19:23         ` kcheung
2009-09-27 19:33           ` Jon Harrop
2009-09-27 21:10           ` Jon Harrop
2009-09-27 21:45             ` Vincent Aravantinos
2009-09-30  1:08             ` Mikkel Fahnøe Jørgensen
2009-09-30 11:57               ` Stéphane Glondu
2009-09-30 12:54                 ` Mikkel Fahnøe Jørgensen
2009-09-30 13:42                   ` Stéphane Glondu [this message]
2009-09-30 19:11                     ` Mikkel Fahnøe Jørgensen
2009-09-30 15:22               ` Jon Harrop
2009-09-30 19:35                 ` Mikkel Fahnøe Jørgensen
2009-09-28 12:25     ` Gerd Stolpmann
     [not found] <20090927214558.D40C5BC5C@yquem.inria.fr>
2009-09-27 21:59 ` CUOQ Pascal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AC36054.6070704@glondu.net \
    --to=steph@glondu.net \
    --cc=caml-list@yquem.inria.fr \
    --cc=mikkel@dvide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).