caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Question about Lwt/Async
@ 2016-03-07  1:38 Yotam Barnoy
  2016-03-07  7:16 ` Malcolm Matalka
                   ` (2 more replies)
  0 siblings, 3 replies; 31+ messages in thread
From: Yotam Barnoy @ 2016-03-07  1:38 UTC (permalink / raw)
  To: Ocaml Mailing List

[-- Attachment #1: Type: text/plain, Size: 1490 bytes --]

Hi all

I'm thinking about my next project in OCaml, and I'm wondering how many
users of OCaml currently use Lwt or Async regularly.

One of the advantages of OCaml over Haskell (which I'm not crazy about) is
the fact that you don't have to constantly be stuck inside a monad.
However, once you want to use these user-level threading libraries, you're
essentially tied to a monad. It also means that the usage of any other
monad from Lwt/Async code is out -- OCaml doesn't have the monad
transformer infrastructure to layer monads easily as far as I can tell (am
I wrong?). I mean, even in Haskell using Monad Transformers is a pain (IMO).

Also, what happens to general utility functions that aren't rewritten for
Async/Lwt -- as far as I can tell, being in non-monadic code, they will
always starve other threads, since they cannot yield to another Async/Lwt
thread. Is this perception correct? If so, this seems to imply that you
either write your code to cooperate within these frameworks and suffer the
monad, or don't, and make it near-impossible for Lwt/Async users to make
use of your code.

I would like to get an idea of the usage level of these libraries, as well
as the burden of writing compatible code, any difficulties etc. Also, I'd
like to get a sense of the domains that benefit from these libraries. Some
domains (such as gaming) traditionally involve a continuous main loop, and
would thus only suffer from the additional overhead of queuing in these
libraries.

-Yotam

[-- Attachment #2: Type: text/html, Size: 1668 bytes --]

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2016-03-11 17:49 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-07  1:38 [Caml-list] Question about Lwt/Async Yotam Barnoy
2016-03-07  7:16 ` Malcolm Matalka
2016-03-07  9:08   ` Simon Cruanes
2016-03-07 14:06     ` Yotam Barnoy
2016-03-07 14:25       ` Ashish Agarwal
2016-03-07 14:55         ` rudi.grinberg
2016-03-07 14:59           ` Ivan Gotovchits
2016-03-07 15:05             ` Ivan Gotovchits
2016-03-08  6:55         ` Milan Stanojević
2016-03-08 10:54           ` Jeremie Dimino
2016-03-07 15:16 ` Jesper Louis Andersen
2016-03-07 17:03   ` Yaron Minsky
2016-03-07 18:16     ` Malcolm Matalka
2016-03-07 18:41       ` Yaron Minsky
2016-03-07 20:06         ` Malcolm Matalka
2016-03-07 21:54           ` Yotam Barnoy
2016-03-08  6:56             ` Malcolm Matalka
2016-03-08  7:46               ` Adrien Nader
2016-03-08 11:04               ` Jeremie Dimino
2016-03-08 12:47                 ` Yaron Minsky
2016-03-08 13:03                   ` Jeremie Dimino
2016-03-09  7:35                     ` Malcolm Matalka
2016-03-09 10:23                       ` Gerd Stolpmann
2016-03-09 14:37                         ` Malcolm Matalka
2016-03-09 17:27                           ` Gerd Stolpmann
2016-03-08  9:41     ` Francois Berenger
2016-03-11 13:21     ` François Bobot
2016-03-11 15:22       ` Yaron Minsky
2016-03-11 16:15         ` François Bobot
2016-03-11 17:49           ` Yaron Minsky
2016-03-08  5:59 ` Milan Stanojević

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