Re: [Haskell-cafe] Church vs Boehm-Berarducci encoding of Lists

2012-09-20 Thread oleg
Dan Doel wrote: > >> P.S. It is actually possible to write zip function using Boehm-Berarducci > >> encoding: > >> http://okmij.org/ftp/Algorithms.html#zip-folds > > If you do, you might want to consider not using the above method, as I > seem to recall it doing an undesirable amount of ex

[Haskell-cafe] [Snap] Argument Substitution in Heist Templates with Splices

2012-09-20 Thread Sebastian Fischer
Hello, the following program demonstrates that arguments in Heist templates are sometimes not substituted in presence of splices: {-# LANGUAGE OverloadedStrings #-} import Blaze.ByteString.Builder (toByteString) import qualified Data.ByteString.Char8as BS import Data.Func

Re: [Haskell-cafe] Church vs Boehm-Berarducci encoding of Lists

2012-09-20 Thread Jay Sulzberger
On Thu, 20 Sep 2012, o...@okmij.org wrote: Dan Doel wrote: P.S. It is actually possible to write zip function using Boehm-Berarducci encoding: http://okmij.org/ftp/Algorithms.html#zip-folds If you do, you might want to consider not using the above method, as I seem to recall it doi

Re: [Haskell-cafe] Church vs Boehm-Berarducci encoding of Lists

2012-09-20 Thread Jay Sulzberger
On Thu, 20 Sep 2012, Jay Sulzberger wrote: On Thu, 20 Sep 2012, o...@okmij.org wrote: Dan Doel wrote: P.S. It is actually possible to write zip function using Boehm-Berarducci encoding: http://okmij.org/ftp/Algorithms.html#zip-folds If you do, you might want to consider not us

Re: [Haskell-cafe] simple servers

2012-09-20 Thread 山本和彦
Hello, > Non-threaded RTS would block FFI to C code. But it does not block file > descriptors and sockets because the scheduler uses select(). To my > experience, *simple* network programming with non-threaded RTS also > works well except the case where we reach the limit of file > descriptors for

Re: [Haskell-cafe] ANNOUNCE: uuid-1.2.6

2012-09-20 Thread David Fox
I was wondering about this: -- My goal with this instance was to make it work just enough to do what -- I want when used with the HStringTemplate library. instance Data UUID where toConstr uu = mkConstr uuidType (show uu) [] (error "fixity") gunfold _ _ = error "gunfold"

[Haskell-cafe] progress reporting in a backtracking algorithm

2012-09-20 Thread Harald Bögeholz
Dear Haskell Cafe, I am playing around with a backtracking algorithm that can take quite a while to compute all solutions to a problem. I'd like to use Debug.Trace.trace to provisionally output something that lets me estimate the total time it might take. But I just can't wrap my head around it.

Re: [Haskell-cafe] An easy way to represent and modify graphs?

2012-09-20 Thread Takayuki Muranushi
Yes Pointers. I've forgotten that. I have once dealt with structures, with lots of IORefs. It was smooth and fast. Thank you for reminding me! On the other hand, use of pointers means that our values are not algebraic data type any more. We have to derive operations such as map, fold, serialize b