Re: [Haskell-cafe] Google Summer of Code - Lock-free data structures
Ben wrote: perhaps it is too late to suggest things for GSOC -- but stephen tetley on a different thread pointed at aaron turon's work, which there's a very interesting new concurrency framework he calls reagents which seems to give the best of all worlds : it is declarative and compositional like STM, but gives performance akin to hand-coded lock-free data structures. he seems to have straddled the duality of isolation vs message-passing nicely, and can subsume things like actors and the join calculus. http://www.ccs.neu.edu/home/turon/reagents.pdf he has a BSD licensed library in scala at https://github.com/aturon/ChemistrySet if someone doesn't want to pick this up for GSOC i might have a hand at implementing it myself. That looks great! While I didn't take the time to understand the concurrency model in detail, the overall idea is to use arrows that can be run atomically runAtomically :: Reagent a b - (a - IO b) This is very similar to STM: combining computations within the monad/arrow is atomic while combining computations outside the monad/arrow can interleave them. runAtomically (f . g) -- atomic runAtomically f . runAtomically g -- interleaving Actually, it turns out that the Reagent arrow is also a monad, but the author seems to claim that the static arrow style enables certain optimizations. I haven't checked his model in detail to see whether this is really the case and how exactly it differs from STM, but we know that situations like this happen for parser combinators. Maybe it's enough to recast reagents as an applicative functor? To summarize: the way I understand it is that it's apparently possible to improve the STM monad by turning it into an arrow. (I refer to STM in a very liberal sense here: whether memory is transactional or not is unimportant, the only thing that matters is a computation that composes atomically.) Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Installing REPA
Hi, I'm trying to install REPA but getting the following. Do I just install base? Or is it more complicated than that? Thanks, Dominic. Tests-MacBook-Pro:PDE Test$ cabal install repa Resolving dependencies... cabal: cannot configure repa-2.2.0.1. It requires base ==4.4.* For the dependency on base ==4.4.* there are these packages: base-4.4.0.0 and base-4.4.1.0. However none of them are available. base-4.4.0.0 was excluded because of the top level dependency base -any base-4.4.1.0 was excluded because of the top level dependency base -any Tests-MacBook-Pro:PDE Test$ cabal --version cabal-install version 0.10.2 using version 1.10.1.0 of the Cabal library Tests-MacBook-Pro:PDE Test$ Tests-MacBook-Pro:PDE Test$ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.0.3 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Installing REPA
06.04.2012, 18:02, Dominic Steinitz idontgetoutm...@googlemail.com: cabal: cannot configure repa-2.2.0.1. It requires base ==4.4.* Tests-MacBook-Pro:PDE Test$ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.0.3 I think this might be because base-4.3 was shipped with GHC 7.0 series: http://www.haskell.org/ghc/docs/7.0.3/html/libraries/index.html ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Installing REPA
On Fri, Apr 6, 2012 at 7:02 AM, Dominic Steinitz idontgetoutm...@googlemail.com wrote: Hi, I'm trying to install REPA but getting the following. Do I just install base? The only safe way to upgrade base is to upgrade GHC -- I'm not sure which ghc has base-4.4 though (Based on Dmitry's comment, maybe 7.2?) --Rogan Thanks, Dominic. Tests-MacBook-Pro:PDE Test$ cabal install repa Resolving dependencies... cabal: cannot configure repa-2.2.0.1. It requires base ==4.4.* For the dependency on base ==4.4.* there are these packages: base-4.4.0.0 and base-4.4.1.0. However none of them are available. base-4.4.0.0 was excluded because of the top level dependency base -any base-4.4.1.0 was excluded because of the top level dependency base -any Tests-MacBook-Pro:PDE Test$ cabal --version cabal-install version 0.10.2 using version 1.10.1.0 of the Cabal library Tests-MacBook-Pro:PDE Test$ Tests-MacBook-Pro:PDE Test$ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.0.3 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Installing REPA
On Sat, Apr 7, 2012 at 2:02 AM, Dominic Steinitz idontgetoutm...@googlemail.com wrote: Hi, I'm trying to install REPA but getting the following. Do I just install base? Or is it more complicated than that? Thanks, Dominic. I think the easiest solution is to just use an older version of Repa. According to Hackage, the latest one that works with base 4.3 is Repa 2.1.1.3: $ cabal install repa==2.1.1.3 Chris ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] I Need a Better Functional Language!
On 05/04/2012, Grigory Sarnitskiy sargrig...@ya.ru wrote: One could expect from a language that bears 'functional' as its characteristic to be able to do everything imaginable with functions. However, the only thing Haskell can do with functions is to apply them to arguments and to feed them as arguments, run in parallel (run and concatenate programs). Obviously, that's not all of the imaginable possibilities. One also can rewrite programs. And write programs that rewrite programs. And write programs that rewrite programs that rewrite the first programs and so on. But there is no such possibility in Haskell, except for introducing a DSL. Note, that the reflectivity is important. For x86 machine: http://hackage.haskell.org/package/hdis86 Truly, I often wish to be able to pattern match on functions myself. Alas, the function is not an algebraic data type. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe