Re: happstack-ixset internals/performance (was Re: [Haskell-cafe] Inverse of HaskellDB)

2010-10-02 Thread Thomas M. DuBuisson
han IxSet to store your points and > still use happstack-state. > > - jeremy > > On Fri, Oct 1, 2010 at 1:53 PM, Thomas M. DuBuisson > wrote: > >> That is pretty close to how it would look using happstack-state. Here > >> is a complete, runnable example which

happstack-ixset internals/performance (was Re: [Haskell-cafe] Inverse of HaskellDB)

2010-10-01 Thread Thomas M. DuBuisson
> That is pretty close to how it would look using happstack-state. Here > is a complete, runnable example which defines the types, a query, > creates/initializes the database, performs the query, and prints the > results. [snip] How is data stored in Happstack.State? I see the "Component" instanc

[Haskell-cafe] cryptohash and an incremental API

2010-07-12 Thread Thomas M. DuBuisson
Vincent, Due to spam-like comments on -cafe I hadn't been subscribed for a while and missed your cryptohash discussion! Particularly: > The main reason for this library is the lack of incremental api exposed by > current digest libraries, and filling the void about some missing digest > algorith

[Haskell-cafe] ByteString, zipWith', and rewrite rules

2010-07-11 Thread Thomas M. DuBuisson
Comments on the zipWith' function inside of Data.ByteString say: -- Rewrite rules -- are used to automatically covert zipWith into zipWith' when a pack is -- performed on the result of zipWith. This is only true internally to Data.ByteString because the zipWith' function could be inlined away by

Re: [Haskell-cafe] Hackage Improvement Ideas

2008-10-23 Thread Thomas M. DuBuisson
> 1) Popularity statistics -- like debian's popcon, gives stats on how > many people have which packages from hackage installed Popularity has been suggested for some time. I think any new features should be going into the happs version of Hackage ( http://code.haskell.org/hackage-server ) Thoug

Re: [Haskell-cafe] Verifying a list of properties using QuickCheck

2008-10-22 Thread Thomas M. DuBuisson
Thomas van Noort wrote: > However, I would like a single result for the complete list of > properties instead of a result for each property. I realize that this > restricts the properties to be of the same type, but that isn't a > problem for my application. You're types can be different, so lo

Re: [Haskell-cafe] About do notation.

2008-10-14 Thread Thomas M. DuBuisson
Magicloud wrote: > Hi, > As some articles say, do notation is expand to (>>) and (>>=) > when > being compiled. > So I want to know the details. Like: > main = do > a <- getArgs > b <- getLine > myFunc1 (head a) b > myFunc2 b (head a) > > I cannot figure out what is the (>>) a

Re: [Haskell-cafe] control-timeout with gtk

2008-09-19 Thread Thomas M. DuBuisson
On Fri, 2008-09-19 at 09:09 -0300, Marco TĂșlio Gontijo e Silva wrote: > I added the NOINLINE annotations and even tried building with -fno-cse, > but the result was the same. Do you have any other suggestions? A while ago I made a shim using control-event to provide the control-timeout api in Con

Re: [Haskell-cafe] Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Thomas M. DuBuisson
jason.dusek: > What does Haskell have to say about cloud computing? If by 'cloud computing' you wish to discuss mapReduce then: http://www.cs.vu.nl/~ralf/MapReduce/paper.pdf Map reduce in Haskell, enjoy! Tom ___ Haskell-Cafe mailing list Haskell-Caf

Re: [Haskell-cafe] Haskell Weekly News: Issue 85 - September 13, 2008

2008-09-13 Thread Thomas M. DuBuisson
> What would theorem proofs do for me? Imagine if you used SmallCheck to exhastively test the ENTIRE problem space for a given property. Now imagine you used your brain to show the programs correctness before the heat death of the universe... Proofs are not features, nor are they code. What

Re: [Haskell-cafe] Haskell Speed Myth

2008-08-26 Thread Thomas M. DuBuisson
> > Wow! 3x the performance for a simple change. Frustrating that there > > isn't a protable/standard way to express this. Also frustrating that > > the threaded version doesn't improve on the situation (utilization is > > back at 50%). GR, retraction, retraction! I was obviously too tired

Re: [Haskell-cafe] Haskell Speed Myth

2008-08-25 Thread Thomas M. DuBuisson
dons: > Simon Marlow sez: > > The thread-ring benchmark needs careful scheduling to get a speedup > on multiple CPUs. I was only able to get a speedup by explicitly > locking half of the ring onto each CPU. You can do this using > GHC.Conc.forkOnIO in GHC 6.8.x, and you'll also nee

Re: [Haskell-cafe] Haskell Propeganda

2008-08-24 Thread Thomas M. DuBuisson
Chris said: > I personally think such pattern matching errors > are a weaknesss of the language; with possibly no solutions to resolve. Actually tools like CATCH [1] exist and could be incorporated into a compiler to eliminate this problem. [1] http://www-users.cs.york.ac.uk/~ndm/catch/

Re: [Haskell-cafe] Haskell Speed Myth

2008-08-24 Thread Thomas M. DuBuisson
> Hmm thanks, that's interesting -- I was think it was probably caused > by OS X, but it appears to happen on Linux too. Could you try running > the old code too, and see if you experience the order of magnitude > slowdown too? The original program on my Linux 2.6.26 Core2 Duo: [EMAIL PROT

Re: [Haskell-cafe] Haskell Speed Myth

2008-08-23 Thread Thomas M. DuBuisson
> That's really interesting -- I just tried this. > > Compiling not using -threaded: 1.289 seconds > Compiling using -threaded, but not running with -N2: 3.403 seconds > Compiling using -threaded, and using -N2: 55.072 seconds > I was hoping to see a relative improvement when introducting an op

Re: [Haskell-cafe] Haskell Propeganda

2008-08-23 Thread Thomas M. DuBuisson
wrt head [], Niels said: > So now what? Action plan = [] Oh come now. Between ghci, hpc, and manual analysis I've never hit a Haskell error and thrown my hands up, "I can't go any further, I'm at a complete loss!" Also it helps that I run into this extremely rarely - I have a larger habit of hid

Re: [Haskell-cafe] a recent Haskell contribution?

2008-08-20 Thread Thomas M. DuBuisson
You might be talking about my 'ipc' library [1] I mentioned here a little while ago [2]. Don't forget the plethora of caviats (quick hack, BSD sockets, trunkates messages around 4 kB). I thought I'd be interested in developing and supporting some high level IPC library but I'm really not and I do

Re: [Haskell-cafe] What's in a name?

2008-08-13 Thread Thomas M. DuBuisson
> Do we have a formal convention for the naming of > packages and/or the naming of the modules they contain? There is a recommended set of categories and in general I believe library authors try and follow the previously established names. > How are name > collisions supposed to be avoided? In

Re: [Haskell-cafe] Recommended Haskell Books

2008-08-10 Thread Thomas M. DuBuisson
I know someone else is going to say it, so I may as well beat them to the punch: Real World Haskell isn't released yet, but beta chapters are available online at book.realworldhaskell.org/beta As for me, I learned though the Yet Another Haskell tutorial, Haskell School of Expression (book), Haske

Re: [Haskell-cafe] message-passing IPC for Haskell?

2008-07-31 Thread Thomas M. DuBuisson
> I have seen postings about work on message-passing IPCs for > Haskell. I like STM but want to keep an open mind ... I can't find > those postings. Can something remind of this work and where/how I can > read about? I made a quick hack composing BSD sockets from Network.Socket for higher le

GHCi Debugger (was Re: [Haskell-cafe] Architecturally flawed)

2008-07-10 Thread Thomas M. DuBuisson
> I could try GHC's new debugger. But my experiences with it so far have > shown that for all but the most trivial programs possible, it becomes > intractably difficult to figure out what the debugger is actually > showing you. GDB is to C as (a) GHCi debugger :: Haskell (b) Pigs :: Farmers (

[Haskell-cafe] Why the exception?

2008-06-24 Thread Thomas M. DuBuisson
Cafe I'm a bit lost on this exception and curious about what's going on. Is there a valid reason for this exception that I am missing? Note the hard-coded [0..100] could be any Word8 list you want (generated via arbitrary, [], or other) and it gives the same result. Load the module and perform:

Re: [Haskell-cafe] How to do this in FP way?

2008-06-15 Thread Thomas M. DuBuisson
Magicloud Magiclouds wrote: > Say I have something like this in C: > static int old; > int diff (int now) { /* this would be called once a second */ > int ret = now - old; > old = now; > return ret; > } > Because there is no "variable" in Haskell. So how to do this in a > FP way? So

Re: [Haskell-cafe] Documenting the impossible

2008-06-14 Thread Thomas M. DuBuisson
I think when Andy made HPC he added a way to mark code unreachable so it wouldn't "harm" your test coverage report. On Sat, 2008-06-14 at 19:58 +0100, Andrew Coppin wrote: > I have a small idea. I'm curios if anybody else thinks it's a good idea... > > How about a {-# IMPOSSIBLE #-} pragma that

[Haskell-cafe] [WARN] Bug fix release of pureMD5 (Was: pureMD5)

2008-06-12 Thread Thomas M. DuBuisson
Cafe, Daniel Larsson noticed a correctness issue with the pureMD5 package. This issue would affect you if you built the value incrementally via the 'updateMD5' function (vs just using 'md5') and didn't provide 512 bit long bytestrings (an MD5 block of operation). As you can probably tell, I didn't

Re: [Haskell-cafe] Simple list processing

2008-06-11 Thread Thomas M. DuBuisson
Why is there no mapAccumL' (strict)? Just a library deficiency that we can remedy or am I missing something? Don Stewart wrote: > andrewcoppin: > > OK, so this is a fairly basic question about list processing. > > > > Several times now, I have found myself wanting to process a list to > > produ

Re: [Haskell-cafe] [ANN] Bindings to Xen Control (xenctrl.h)

2008-06-07 Thread Thomas M. DuBuisson
2 at 00:19 -0400, Thomas M. DuBuisson wrote: > Don, > I'll throw future work ideas in the next releases cabal. The most > obvious doors opened are Haskell rewrites of the current Xen > infrastructure (virt-install, xm, xend). Slightly more interesting > tasks could be (warning: r

Re: [Haskell-cafe] [ANN] Bindings to Xen Control (xenctrl.h)

2008-06-01 Thread Thomas M. DuBuisson
Don, I'll throw future work ideas in the next releases cabal. The most obvious doors opened are Haskell rewrites of the current Xen infrastructure (virt-install, xm, xend). Slightly more interesting tasks could be (warning: random thoughts): 1) HAPPS server that can manage Xen domains (without r

[Haskell-cafe] [ANN] Bindings to Xen Control (xenctrl.h)

2008-05-31 Thread Thomas M. DuBuisson
All, I'm just getting started with hsXenCtrl [1] as both a fun way to play with Xen and become proficient with Haskell FFI. Once I get my community.haskell.org account squared away I'll likely setup a public darcs repo (and a homepage somewhere). As for modules: I intend to expand on the trival F

Re: [Haskell-cafe] Performance: MD5

2008-05-20 Thread Thomas M. DuBuisson
Andrew, What is "fast enough"? My informal understanding of the implementations are: 1) Unoptimized [Word8] implementations (constant space, two or three orders of magnatude slower than C) 2) Bindings to 'C' routines (typically O(n) space due to strict ByteStrings and no split out of initialConte

Re: [Haskell-cafe] Performance: MD5

2008-05-17 Thread Thomas M. DuBuisson
Andrew, I spent a reasonable amount of time making pureMD5 (available on hackage) faster, which mainly ment strictness annoitations and unboxing strict fields, but I also spent a good deal of time with the profiler. One of my early versions was fairly slow due to the converting of the LPS to blocks

Re: [Haskell-cafe] type families and type signatures

2008-04-06 Thread Thomas M. DuBuisson
Id is an operation over types yielding a type, as such it doesn't make much sense to me to have (Id a -> Id a) but rather something like (a -> Id a). One could make this compile by adding the obvious instance: > type instance Id a = a Curiously, is this a reduction from a real world use of famil

Re: [Haskell-cafe] MD5? (was: Haskell performance question)

2007-11-09 Thread Thomas M. DuBuisson
I minor changes, fixing up my chunking function (finally) thus eliminating the space leak. Performance is now under 3x that of C! Yay! Also, nano MD5 benched at 1.15x 'C' (for files small enough for strict ByteStrings to do ok). Get the code: darcs get http://code.haskell.org/~tommd/pureMD5 On

Re: [Haskell-cafe] MD5? (was: Haskell performance question)

2007-11-08 Thread Thomas M. DuBuisson
Glad you asked! http://sequence.complete.org/node/367 I just posted that last night! Once I get a a community.haskell.org login I will put the code on darcs. The short of it it: 1) The code is still ugly, I haven't been modivated to clean. 2) Manually unrolled, it is ~ 6 times slower than C 3)

[Haskell-cafe] Of phantom types and type extentions

2007-10-15 Thread Thomas M. DuBuisson
All, I've been casually developing a PacketBB (i.e. Generalized Manet Packet Format) library in Haskell. I think I have a need to pass state information as a phantom type - I'll step through the issue now. With the 'AddressBlock' (S5.2.1 packetBB draft 8), network addresses are abbreviated as se