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 20:31:03 +0900
- From: Curt Sampson <cjs@example.com>
- Subject: Re: [tlug] STM (was: Re: work times & accommodation @tokyo)
- References: <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> <878wvjdgk7.fsf@uwakimon.sk.tsukuba.ac.jp>
- User-agent: Mutt/1.5.17 (2007-11-01)
On 2008-07-30 15:36 +0900 (Wed), Stephen J. Turnbull wrote: > 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. Err, "yeah." Something like that. :-) Of more concern, as I said, is how you make this work for every TVar (or equivalant thereof) in the entire JVM. > The sketch in "Beautiful Concurrency" is nowhere near as detailed as I > remembered it.... I thought it was enough for someone experienced with monads in Haskell to get enough of an idea of what's going on to implement it. > ...and I was confusing the implementation of 'atomically' > with that of the 'TVar' itself. Right. This is about all uses of any TVars, not just one. > 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. Actually, no. You use monads to sequence operations, but if you look at something like the State monad, there's no I/O (or IO monad) involved. It's an entirely separate system built in the same way, with the exception that IO includes a bunch of low-level "magic" (just pseudo-magic, really) that deals with the idea of "the real world." (Mostly this is just doing a proper wrapping of the C library functions that have side-effects.) You can think of the State monad as just another implementation of an alternate "real world" that needs no special support, since it's contained entirely within the language. > > 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. Right. That's a reasonable trade-off, and probably the one I would make. cjs -- Curt Sampson <cjs@example.com> +81 90 7737 2974 Mobile sites and software consulting: http://www.starling-software.com
- Follow-Ups:
- Re: [tlug] STM (was: Re: work times & accommodation @tokyo)
- From: Stephen J. Turnbull
- 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: 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
- Re: [tlug] STM (was: Re: work times & accommodation @tokyo)
- From: Stephen J. Turnbull
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] STM (was: Re: work times & accommodation @tokyo)
- Next by Date: Re: [tlug] Finding unrestricted internet access in 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