Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] STM (was: Re: work times & accommodation @tokyo)
- Date: Wed, 30 Jul 2008 15:36:24 +0900
- From: "Stephen J. Turnbull" <stephen@example.com>
- Subject: Re: [tlug] STM (was: Re: work times & accommodation @tokyo)
- References: <20080728144249.GA26262@lucky.cynic.net> <d8fcc0800807280805g11e1165cg7252a6b9c9017771@mail.gmail.com> <20080728160250.GB26262@lucky.cynic.net> <d8fcc0800807280949y71d562a4lad5773cf142d3f11@mail.gmail.com> <20080729004756.GF26262@lucky.cynic.net> <87skttcco4.fsf@uwakimon.sk.tsukuba.ac.jp> <20080729093315.GJ16234@lucky.cynic.net> <87myk0cyud.fsf@uwakimon.sk.tsukuba.ac.jp> <20080729233618.GE5154@lucky.cynic.net> <87d4kwch9b.fsf@uwakimon.sk.tsukuba.ac.jp> <20080730015628.GB27857@lucky.cynic.net>
Curt Sampson writes: > On 2008-07-30 10:06 +0900 (Wed), Stephen J. Turnbull wrote: > > > Make it a separate class, with private members for the value and the > > log. > > I guess that this is the part I'm not clear on. I'm not, either. Clearly what needs to be done is to create an AtomicSequence type, which has access to and validates the log(s) before it exits. I don't have time to deal with figuring how this might be done, unfortunately, let alone whether it would succeed. The sketch in "Beautiful Concurrency" is nowhere near as detailed as I remembered it, and I was confusing the implementation of 'atomically' with that of the 'TVar' itself. > > > The really short explanation is that Haskell forces you to > > > distinguish pure and impure operations, > > > > I don't think this is true for STM, since it's not a cut-and-dried > > situation like with the IO monad. > > What's the difference? Oh, brain fart, I guess. I was thinking that you might read or write variables in such a way that there's no external effect, but of course Haskell doesn't really have variables in that sense. Anything that resembles a C variable will be I/O in Haskell. > Well, at least that moves C++ into the "it's theoretically possible" > category. However, it's starting to sound as if "the C++ typechecker can > do anything Haskell's can do" is like "6502 assembler can do anything > that Java can do, because they're both Turing-complete." Yes, of course. But sometimes it's worth doing it. Eg, in the XEmacs case, we have strong reasons to stick with the existing C code base. However, we don't need parts of C that can't be used in C++, so our C code is expected to compile and run correctly as C++. The integer vs. character distinction is very important to our implementation of Mule (multilingual processing), so it was worth creating a character type that can't mix with integers without an explicit conversion. This didn't catch absolutely everything, but Mule code is at such a low level there's not much you can do but abort if you see char/int confusion. In itself it's deadly enough that we nicknamed it "Ebola". The C++ version of characters saved a lot of runtime aborts.
- Follow-Ups:
- Re: [tlug] STM (was: Re: work times & accommodation @tokyo)
- From: Curt Sampson
- References:
- Re: [tlug] STM (was: Re: work times & accommodation @tokyo)
- From: Curt Sampson
- Re: [tlug] STM (was: Re: work times & accommodation @tokyo)
- From: Josh Glover
- Re: [tlug] STM (was: Re: work times & accommodation @tokyo)
- From: Curt Sampson
- Re: [tlug] STM (was: Re: work times & accommodation @tokyo)
- From: Josh Glover
- Re: [tlug] STM (was: Re: work times & accommodation @tokyo)
- From: Curt Sampson
- Re: [tlug] STM (was: Re: work times & accommodation @tokyo)
- From: Stephen J. Turnbull
- Re: [tlug] STM (was: Re: work times & accommodation @tokyo)
- From: Curt Sampson
- Re: [tlug] STM (was: Re: work times & accommodation @tokyo)
- From: Stephen J. Turnbull
- Re: [tlug] STM (was: Re: work times & accommodation @tokyo)
- From: Curt Sampson
- Re: [tlug] STM (was: Re: work times & accommodation @tokyo)
- From: Stephen J. Turnbull
- Re: [tlug] STM (was: Re: work times & accommodation @tokyo)
- From: Curt Sampson
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] STM (was: Re: work times & accommodation @tokyo)
- Next by Date: Re: [tlug] STM (was: Re: work times & accommodation @tokyo)
- Previous by thread: Re: [tlug] STM (was: Re: work times & accommodation @tokyo)
- Next by thread: Re: [tlug] STM (was: Re: work times & accommodation @tokyo)
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links