Re: [Haskell] Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM - video

2006-11-30 Thread Chris Kuklewicz
Eureka, I claim to have written an implementation which agrees with all the semantics that Simon Peyton-Jones wants for onCommit/onRetry/retryWith. See below: Simon Peyton-Jones wrote: > | In many useful cases, such as the getLine example, the Y action will have > its > | own atomic {} block.

RE: [Haskell] Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM - video

2006-11-29 Thread Simon Peyton-Jones
| In many useful cases, such as the getLine example, the Y action will have its | own atomic {} block. In which case the semantics of when it is allowed to | re-attempt X are what is important. If you require (Y) to complete before | re-attempting (X) then you get an infinite regression where eve

Re: [Haskell] Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM - video

2006-11-28 Thread Chris Kuklewicz
Here I restate what you obviously know several times, then take a shot at answering your final question. Tim Harris (RESEARCH) wrote: > Hi, > >> After seeing how close I could come to creating onRetry/retryWith I have a >> question about the semantics of your idea for retryWith. >> >> Normally af

RE: [Haskell] Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM - video

2006-11-28 Thread Tim Harris (RESEARCH)
Hi, > After seeing how close I could come to creating onRetry/retryWith I have a > question about the semantics of your idea for retryWith. > > Normally after a retry the STM block is rolled back and put to sleep and > will > only be awakened and re-executed if one of the STM variables it had read

RE: [Haskell] Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM - video

2006-11-27 Thread Simon Peyton-Jones
| Normally after a retry the STM block is rolled back and put to sleep and will | only be awakened and re-executed if one of the STM variables it had read from is | committed to by a different STM block. The *semantics* are that it is retried anytime in the future. The *pragmatics* are as you d

Re: [Haskell] Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM - video

2006-11-24 Thread Chris Kuklewicz
Simon Peyton-Jones wrote: > I have also toyed with adding > > retryWith :: IO a -> STM () > > The idea here is that the transction is undone (i.e. just like the 'retry' combinator), then the specified action is performed, and then the transaction is retried. Again no atomicity guarantee.

Re: [Haskell] Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM - video

2006-11-24 Thread Chris Kuklewicz
I posted an improved version of the new monad to the wiki at http://haskell.org/haskellwiki/New_monads/MonadAdvSTM Observations: ** This idiom made it easy for the retrying case to queue an action which ensures success in the next attempt. ** More than one operation can be queued for both the co

Re: [Haskell] Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM - video

2006-11-24 Thread C.M.Brown
Hi, I got this working on Mac OS X. I had to download media player 9: http://www.microsoft.com/windows/windowsmedia/software/Macintosh/osx/default.aspx This contains the WMV3 codec. Cheers, Chris. On Fri, 24 Nov 2006, James William Pye wrote: > On Fri, Nov 24, 2006 at 10:26:38AM +0100, Tomas

Re: [Haskell] Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM - video

2006-11-24 Thread Chris Kuklewicz
I was inspired by Simon's post to kludge up a working prototype that does what is discussed: Simon Peyton-Jones wrote: > | The basic idea is to provide a way for a transaction to call into > transaction-aware libraries. The libraries > | can register callbacks for if the transaction commits (to

RE: [Haskell] Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM- video

2006-11-24 Thread Simon Peyton-Jones
PROTECTED] On Behalf Of Claus | Reinke | Sent: 24 November 2006 12:22 | To: Simon Peyton-Jones; Tim Harris (RESEARCH) | Cc: haskell-cafe@haskell.org | Subject: Re: [Haskell] Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM- video | | this thread reminds me about something that I wanted to ask you

Re: [Haskell] Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM- video

2006-11-24 Thread Claus Reinke
this thread reminds me about something that I wanted to ask you. if I recall correctly, most of the literature references in STM papers are recent, so I wondered whether you are aware of this one: NAMING AND SYNCHRONIZATION IN A DECENTRALIZED COMPUTER SYSTEM SourceTechnical Report: TR

Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM - video

2006-11-24 Thread Tomasz Zielonka
On Fri, Nov 24, 2006 at 10:31:27AM +0100, Lemmih wrote: > Worked for me with mplayer+w32codecs. Oops! I missed the "Download" link and tried to download through "Watch" ;-) Thanks! Best regards Tomasz ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.o

Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM - video

2006-11-24 Thread Lemmih
On 11/24/06, Tomasz Zielonka <[EMAIL PROTECTED]> wrote: On Thu, Nov 23, 2006 at 12:56:00PM -, Bayley, Alistair wrote: > http://channel9.msdn.com/Showpost.aspx?postid=231495 > > The links to the video are a couple of yellow buttons at the bottom of > the article: "Watch" or "Download". > > I h

Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM - video

2006-11-24 Thread Tomasz Zielonka
On Thu, Nov 23, 2006 at 12:56:00PM -, Bayley, Alistair wrote: > http://channel9.msdn.com/Showpost.aspx?postid=231495 > > The links to the video are a couple of yellow buttons at the bottom of > the article: "Watch" or "Download". > > I haven't watched this yet (it's nearly an hour long, I thi

Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM - video

2006-11-24 Thread Johan Tibell
I would just love to have some Haskell video casts. That would be awesome! Cheers, Johan On 11/23/06, Bayley, Alistair wrote: http://channel9.msdn.com/Showpost.aspx?postid=231495 The links to the video are a couple of yellow buttons at the bottom of the article: "Watch" or "Download". I have

Re: [Haskell] Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM - video

2006-11-24 Thread Tomasz Zielonka
On Fri, Nov 24, 2006 at 10:02:59AM +0100, Tomasz Zielonka wrote: > That's where retryWith would help. Right now I am using something named > autonomous transactions: > > autonomously :: Bool -> STM a -> STM () > > This basically forks a new thread to perform the given transaction > outside of

Re: [Haskell] Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM - video

2006-11-24 Thread Tomasz Zielonka
On Fri, Nov 24, 2006 at 08:22:36AM +, Simon Peyton-Jones wrote: > I have also toyed with adding > > retryWith :: IO a -> STM () > > The idea here is that the transction is undone (i.e. just like the 'retry' > combinator), then the specified action is performed, and then the transacti

RE: [Haskell] Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM - video

2006-11-24 Thread Simon Peyton-Jones
| The basic idea is to provide a way for a transaction to call into transaction-aware libraries. The libraries | can register callbacks for if the transaction commits (to actually do any "O") and for if the transaction | aborts (to re-buffer any "I" that the transaction has consumed). In addit

Re: [Haskell] Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM - video

2006-11-23 Thread Liyang HU
Hi, On 23/11/06, Benjamin Franksen <[EMAIL PROTECTED]> wrote: One answer is in fact "to make it so that Console.Write can be rolled back too". To achieve this one can factor the actual output to another task and inside the transaction merely send the message to a transactional channel (TChan):

RE: [Haskell] Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM - video

2006-11-23 Thread Tim Harris (RESEARCH)
range of things that can be done inside an atomic block. Cheers, Tim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Benjamin Franksen Sent: 24 November 2006 03:16 To: haskell@haskell.org Cc: haskell-cafe@haskell.org Subject: [Haskell] Re: [Haskell-cafe]

Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM - video

2006-11-23 Thread Benjamin Franksen
[sorry for quoting so much, kinda hard to decide here where to snip] Cale Gibbard wrote: > On 23/11/06, Jason Dagit <[EMAIL PROTECTED]> wrote: >> A comment on that video said: >> >> - BEGIN QUOTE >> It seems to me that STM creates new problems with composability. >> You create two class

Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM - video

2006-11-23 Thread Cale Gibbard
On 23/11/06, Jason Dagit <[EMAIL PROTECTED]> wrote: A comment on that video said: - BEGIN QUOTE It seems to me that STM creates new problems with composability. You create two classes of code: atomic methods and non atomic methods. Nonatomic methods can easily call atomic ones – the

Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM - video

2006-11-23 Thread Jason Dagit
A comment on that video said: - BEGIN QUOTE  It seems to me that STM creates new problems with composability. You create two classes of code: atomic methods and non atomic methods. Nonatomic methods can easily call atomic ones – the compiler could even automatically inject the atomic

[Haskell-cafe] SimonPJ and Tim Harris explain STM - video

2006-11-23 Thread Bayley, Alistair
http://channel9.msdn.com/Showpost.aspx?postid=231495 The links to the video are a couple of yellow buttons at the bottom of the article: "Watch" or "Download". I haven't watched this yet (it's nearly an hour long, I think). Found via reddit (http://reddit.com). Haskeller's on TV (sort of...) woo