Re: [Haskell-cafe] Memory and Threads - MVars or TVars

2010-07-29 Thread Christopher Done
This could be useful: Beautiful concurrency by Simon Peyton Jones http://research.microsoft.com/en-us/um/people/simonpj/papers/stm/beautiful.pdf On 29 July 2010 02:23, Eitan Goldshtrom thesource...@gmail.com wrote: Hi everyone. I was wondering if someone could just guide me toward some good

Re: [Haskell-cafe] Memory and Threads - MVars or TVars

2010-07-29 Thread Ben Millwood
On Thu, Jul 29, 2010 at 3:49 AM, Eitan Goldshtrom thesource...@gmail.com wrote: Perhaps you guys could help me with Cabal now though? I'm trying to install Orc but it wants base=4.2 and =4.3 and I have 4.1 after installing the latest release of GHC. Cabal won't upgrade the base. It complains

Re: [Haskell-cafe] Memory and Threads - MVars or TVars

2010-07-29 Thread Job Vranish
You might try pulling downloading the package ('cabal fetch org' will do this) and changing the base dependency (to = 4.1) in the orc.cabal file and then build it manually (cabal configure cabal build cabal install (while in the same directory as the .cabal file)) and see what happens. I don't

Re: [Haskell-cafe] Memory and Threads - MVars or TVars

2010-07-29 Thread Thomas DuBuisson
On Thu, Jul 29, 2010 at 6:53 AM, Job Vranish job.vran...@gmail.com wrote: You might try pulling downloading the package ('cabal fetch org'  will do this) and changing the base dependency (to = 4.1) in the orc.cabal file cabal also has an 'unpack' command for the particularly lazy (me). Ex:

[Haskell-cafe] Memory and Threads - MVars or TVars

2010-07-28 Thread Eitan Goldshtrom
Hi everyone. I was wondering if someone could just guide me toward some good information, but if anyone wants to help with a personal explanation I welcome it. I'm trying to write a threaded program and I'm not sure how to manage my memory. I read up on MVars and they make a lot of sense. My

Re: [Haskell-cafe] Memory and Threads - MVars or TVars

2010-07-28 Thread Job Vranish
Atomic operations are special operations where you don't have to worry about some other process messing with things while the operation is taking place. For a simple example of why atomic operations are important: (taken from: http://en.wikipedia.org/wiki/Linearizability#Non-atomic) The naive,

Re: [Haskell-cafe] Memory and Threads - MVars or TVars

2010-07-28 Thread Eitan Goldshtrom
Ah! That clears that up a lot. I read the wiki page but something just didn't make full sense about it until you used the word prevent. I understand that the computer doesn't actually prevent other threads from running -- that would defeat the purpose of the concurrency -- but it helped clear