Re: [Haskell-cafe] Current situation regarding global IORefs

2006-04-23 Thread Adrian Hey
Lennart Augustsson wrote: I think global mutable variables should be regarded with utmost suspicion. There are very few situations where they are the right solution. Well IMO even the use of the term "global mutable variable" causes muddled thinking on this and I wish people would stop it. The

[Haskell-cafe] Re: Control.Exceptions and MonadIO

2006-04-23 Thread Robert Dockins
On Sunday 23 April 2006 02:19 pm, you wrote: [snip some discussion] > Perhaps something like: > > class MonadIO m => MonadIOE m where > catch :: m a-> (Exception -> m a) -> m a > throw > catchDyn > throwDyn > -- etc > > instance MonadIOE m => StateT s m where ... > instan

[Haskell-cafe] Billion-triple RDF store

2006-04-23 Thread Joel Reymont
Folks, How would you go about implementing a RDF triple store in Haskell capable of handling a billion triples? I'm looking for ideas. For example, you could use tries to store all strings but you could easily get to the point where you can't load them all into, say, 1Gb of memory which i

Re: [Haskell-cafe] Re: Control.Exceptions and MonadIO

2006-04-23 Thread Brian Hulley
I've started work on a module to replace Control.Exception by wrapping all the original Control.Exception functions in more general monadic functions and using two type classes as follows: class MonadIO m => MonadException m where catch :: m a -> (Exception -> m a) -> m a catchDyn :: Ty

Re: [Haskell-cafe] Independent component analysis and RDF

2006-04-23 Thread Donald Bruce Stewart
joelr1: > Howdy folks! > > Does anyone have sample code for independent component analysis > (ICA), singular value decomposition (SVD) aka spectral graph > partitioning, or semidiscrete decomposition (SDD)? > > I'm trying to learn this rocket science and apply it to RDF graph > analysis. H

[Haskell-cafe] Independent component analysis and RDF

2006-04-23 Thread Joel Reymont
Howdy folks! Does anyone have sample code for independent component analysis (ICA), singular value decomposition (SVD) aka spectral graph partitioning, or semidiscrete decomposition (SDD)? I'm trying to learn this rocket science and apply it to RDF graph analysis. Thanks, Joel

Re: [Haskell-cafe] Re: Control.Exceptions and MonadIO

2006-04-23 Thread Brian Hulley
Brian Hulley wrote: instance MonadIOE m => StateT s m where ... instance MonadIOE m => ReaderT r m where ... instance MonadIOB m => ReaderT r m where ... Ooops! ;-) instance MonadIOE m => MonadIOE (StateT s m) where ... instance MonadIOE m => MonadIOE (ReaderT r m) where ... instance MonadIO

[Haskell-cafe] Re: Control.Exceptions and MonadIO

2006-04-23 Thread Brian Hulley
[EMAIL PROTECTED] wrote: Robert Dockins wrote: One additional (very unfortunate) point is that higher-order IO monad combinators will not work on your monad, eg, the ones in Control.Exception. Although that is true in general, for many useful and interesting cases (including ReaderT, the state

[Haskell-cafe] Re: Predicates in HaXml

2006-04-23 Thread luby liao
For this purpose, try  h1 [keep /> dfilter (parseXtract "/greetings/greeting[1]/-")]cheers, Luby Liao > I am just trying out a few things with the Xtract tool. I have a > simple XML document:  >  >  > hello > world >  >  > I am using the Xtract query /greetings/greeting[1]/- hoping to get the  > te

Re: [Haskell-cafe] Current situation regarding global IORefs

2006-04-23 Thread Lennart Augustsson
Robert Dockins wrote: Ahhh... the singleton pattern. There is a debate among OO theorists about whether the singleton pattern is actually a good idea. I tend to side with those who say that it is Just Wrong. The reality is that "singletons" are only unique within some scope (OS process, VM