<div dir="ltr">@tom - forkIO and freineds works great for lightweight local threads, what about non-local threads though in a distributed setting.  Is there anything in haskell that you think replaces that functionality in erlang?</div>

<div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 27, 2014 at 10:34 PM,  <span dir="ltr"><<a href="mailto:amindfv@gmail.com" target="_blank">amindfv@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="auto"><div>Unfortunately I can't help with recommending an actor library. I think peoples' responses of "you should never want to do that" are, um, unhelpful.</div><div><br></div><div>That said, i've written both haskell and erlang professionally, and never had a need for actors/message passing in haskell. It may be the wrong tool for most haskell jobs.</div>

<div><br></div><div>The main things erlang-style concurrency gets you are</div><div> - lightweight threads (in haskell by default -- 'forkIO' creates lightweight threads)</div><div> - limited shared mutable state (haskell's pure)</div>

<div> - spreading computation over cores (in haskell you want parallelism not concurrency -- check out the Par monad)</div><div> - computation over boxes (see distributed-process)</div><div><br></div><div>To do "message passing", check out MVars (and later, STM)</div>

<div><br></div><div>Tom</div><div><br></div><div><br>El Mar 27, 2014, a las 17:40, james <<a href="mailto:james@mansionfamily.plus.com" target="_blank">james@mansionfamily.plus.com</a>> escribió:<br><br></div><div>
<div class="h5">
<blockquote type="cite"><div>
  
    
  
  
    <div>On 27/03/2014 17:28, Christopher Allen
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div lang="x-western">
        <div dir="ltr">I don't actually want to get drawn into this, but
          one point would be that it's really just the same fallacies as
          OOP in general, but concurrent. </div>
      </div>
    </blockquote>
    <br>
    Well, horses for courses, I've been writing distributed C++ apps
    since cfront was shiny and new.<br>
    <br>
    I find writing off OOP as distasteful as writing off functional, and
    there are people in both camps.<br>
    <br>
    I have ordered Simon's book and will take care to read it.<br>
    <br>
    In the mean time - does anyone have an answer to the question I
    asked?<br>
    <br>
    James<br>
    <br>
    <blockquote type="cite">
      <div lang="x-western">
        <div dir="ltr">The idea that isolation behind an interface
          (message passing or not) is going to prevent unnecessary
          mutation or side effects from getting out of control.
          <div>
            <br>
          </div>
          <div>In practice, it doesn't do that at all and the fact that
            you're making your inter-dependencies more implicit, rather
            than explicit, through the use of isolated buckets of
            side-effecting state and mutation is going to make it harder
            rather than easier to debug the program when it invariably
            breaks. I'd rather get a call-stack if I'm going to abandon
            Haskell-y goodness. And your Actors *will* get into a bad
            state, so you'll end up writing Inspector and Debugger
            mixins just to keep a handle on the complexity when they get
            into that bad state.</div>
          <div><br>
          </div>
          <div>It's not impossible for Actors to make sense. I used
            agents (which are not full-blown Actors per se) in Clojure
            for side-effect isolation, serialization, and thread safety
            to good effect, but I kept how much "work" they did to a
            bare minimum and tried to keep everything in pure functions
            as long as I could.</div>
          <div><br>
          </div>
          <div>It's just that I see programmers with a shiny new hammer
            looking for every nail they can find.</div>
          <div><br>
          </div>
        </div>
        <div class="gmail_extra"><br>
          <br>
          <div class="gmail_quote">On Thu, Mar 27, 2014 at 12:21 PM,
            Zongheng Yang <span dir="ltr"><<a href="mailto:zongheng.y@gmail.com" target="_blank">zongheng.y@gmail.com</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Can
              anyone give some detailed cons of Akka / actor model?<br>
              <div>
                <div><br>
                  On Thu, Mar 27, 2014 at 5:21 AM, Alois Cochard <<a href="mailto:alois.cochard@gmail.com" target="_blank">alois.cochard@gmail.com</a>>
                  wrote:<br>
                  > I have good experience with actors (Scala/Akka),
                  and I can tell you that you<br>
                  > should avoid them as much as possible.<br>
                  > I think the model is good if you need to do some
                  low level concurrency<br>
                  > coding on a language that don't have effect
                  tracking in types.<br>
                  ><br>
                  > Having used the Async library from Marlow, I
                  highly recommend it... and it<br>
                  > probably cover a big percentage of traditional
                  concurrency use cases.<br>
                  ><br>
                  > You still have Haskell Cloud if you want
                  distributed messaging.<br>
                  ><br>
                  > Cheers<br>
                  ><br>
                  ><br>
                  ><br>
                  > On 27 March 2014 06:29, james <<a href="mailto:james@mansionfamily.plus.com" target="_blank">james@mansionfamily.plus.com</a>>
                  wrote:<br>
                  >><br>
                  >> Having been introduced to actors by looking
                  at Erlang, I discovered Akka.<br>
                  >><br>
                  >> It seems that the performance is pretty
                  impressive and I like the model.<br>
                  >><br>
                  >> There seem to be several basic Actor
                  libraries in Hackage, but they don't<br>
                  >> seem<br>
                  >> to be very actively developed.<br>
                  >><br>
                  >> I'm more interested in the model for
                  programming within a single runtime<br>
                  >> than I am for distributed systems, but
                  message and dispatch performance<br>
                  >> definitely is important.<br>
                  >><br>
                  >> Can anyone share experiences with the
                  different packages?  Is any one<br>
                  >> of them stand-out?<br>
                  >><br>
                  >> Thanks<br>
                  >> James<br>
                  >><br>
                  >><br>
                  >>
                  _______________________________________________<br>
                  >> Haskell-Cafe mailing list<br>
                  >> <a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
                  >> <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
                  ><br>
                  ><br>
                  ><br>
                  ><br>
                  > --<br>
                  > Alois Cochard<br>
                  > <a href="http://aloiscochard.blogspot.com" target="_blank">http://aloiscochard.blogspot.com</a><br>
                  > <a href="http://twitter.com/aloiscochard" target="_blank">http://twitter.com/aloiscochard</a><br>
                  > <a href="http://github.com/aloiscochard" target="_blank">http://github.com/aloiscochard</a><br>
                  ><br>
                  > _______________________________________________<br>
                  > Haskell-Cafe mailing list<br>
                  > <a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
                  > <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
                  ><br>
                  _______________________________________________<br>
                  Haskell-Cafe mailing list<br>
                  <a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
                  <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
                </div>
              </div>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
    </blockquote>
    <br>
  

</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Haskell-Cafe mailing list</span><br><span><a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a></span><br>

<span><a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a></span><br></div></blockquote></div></div></div><br>_______________________________________________<br>


Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Patrick Wheeler<br><a href="mailto:Patrick.John.Wheeler@gmail.com">Patrick.John.Wheeler@gmail.com</a><br><a href="mailto:Patrick.J.Wheeler@rice.edu">Patrick.J.Wheeler@rice.edu</a><br>

<a href="mailto:Patrick.Wheeler@colorado.edu">Patrick.Wheeler@colorado.edu</a>
</div>