Re: [Haskell] Re: [Haskell-cafe] ANN: cmonad 0.1.1

2009-03-30 Thread Don Stewart
AM, Don Stewart d...@galois.com wrote: Nested constructed product returns? Or constructed sums? lennart: Well, yes and no.  GHC actually does a decent job when given very imperative code with references and mutable arrays. Now the type I use to wrap the references to get type safe l

Re: [Haskell-cafe] Looking for practical examples of Zippers

2009-03-30 Thread Don Stewart
xmonad's state is represented as a zipper on nested lists. The wikipedia article on zippers lists this and other examples. gue.schmidt: Hi, my quest for data structures continues. Lately I came across Zippers. Can anybody point be to some useful examples? Günther

[Haskell-cafe] ANNOUNCE: vacuum-cairo: a cairo frontend to vacuum for live Haskell data visualization

2009-03-30 Thread Don Stewart
I am pleased to announce the release of vacuum-cairo, a Haskell library for interactive rendering and display of values on the GHC heap using Matt Morrow's vacuum library. This library takes vacuum's output, generates dot graph format from it, renders it to SVG with graphviz, and displays the

Re: [Haskell-cafe] uvector package appendU: memory leak?

2009-03-29 Thread Don Stewart
manlio_perillo: Hi. As with a previous post, I think I have found a possible memory problem with the uvector package. I have this data structure (for, again, my Netflix Prize project): IntMap (UArr (Word16 :*: Word8)) I was adding elements to the map using something like: v =

Re: [Haskell-cafe] uvector package appendU: memory leak?

2009-03-29 Thread Don Stewart
manlio_perillo: Don Stewart ha scritto: [...] So the question is: why appending an array of only one element to an existing array causes memory problems? It must copy the entire array. Isn't it the same with snocU? And, since the final result is the same, what happens

Re: [Haskell] Re: [Haskell-cafe] ANN: cmonad 0.1.1

2009-03-29 Thread Don Stewart
Nested constructed product returns? Or constructed sums? lennart: Well, yes and no. GHC actually does a decent job when given very imperative code with references and mutable arrays. Now the type I use to wrap the references to get type safe l-values and r-values makes it tricker, and ghc

Re: [Haskell-cafe] ANN: FallingBlocks 0.1

2009-03-27 Thread Don Stewart
bwsanders: Hello, I just uploaded fallingblocks to Hackage. It is another Tetris clone, but it uses SDL, and I thought there could be more SDL examples. Any and all comments and suggestions will be extremely appreciated! There is a darcs repo at

[Haskell-cafe] Arch Linux now provides more than 1000 Haskell libraries and apps

2009-03-27 Thread Don Stewart
A small milestone in the packaging business: http://archhaskell.wordpress.com/2009/03/27/arch-haskell-news-mar-14-2009-1000-haskell-packages/ More than 1000 Haskell packages packaged up for Arch Linux. Hackage now has 1163 (+41) Haskell packages, of which 1007 (+33) have been natively packaged

Re: [Haskell-cafe] g++ std:map vs GHC IntMap

2009-03-26 Thread Don Stewart
manlio_perillo: Bulat Ziganshin ha scritto: Hello Manlio, Thursday, March 26, 2009, 6:39:12 PM, you wrote: The test consists in adding 1000 elements to an empty map. +RTS -c -F1.1 then read about garbage collection It now requires 386 MB of memory, but is 4.7 times slower. So,

Re: [Haskell-cafe] How to increment an Int in Haskell (stack overflow issue)

2009-03-25 Thread Don Stewart
bauertim: I have a program that is currently blowing out the stack, Stack space overflow: current size 8388608 bytes. Use `+RTS -Ksize' to increase it. I am pretty sure I get to the end of the computation that increments various statistic counters (lazily?) and only when I go to print

[Haskell-cafe] Making videos of your project

2009-03-24 Thread Don Stewart
Hey guys, I've been making quick youtube videos of projects to convey what they do. Here, for example, using Tim Docker's Charts library in ghci: http://www.youtube.com/watch?v=2Lqzygxvus0 (Click on the HD button for higher res). Or one of Neil Brown's SG OpenGL graphics library,

Re: [Haskell-cafe] Something wrong with happs.org?

2009-03-24 Thread Don Stewart
We need a redirect... rmm-haskell: I thought that HAppS has gone, replaced by happstack? http://happstack.com/ -Ross On Mar 24, 2009, at 11:32 AM, Vimal wrote: Hi, http://happs.org/ has some Javascript visible as plain text. It looks like some tags are missing in the page... I hope

Re: [Haskell-cafe] Re: Are there performant mutable Arrays in Haskell?

2009-03-24 Thread Don Stewart
barsoap: Brettschneider, Matthias brettschnei...@hs-albsig.de wrote: Thx for your hints, I played around with them and the performance gets slightly better. But the major boost is still missing :) I noticed, that one real bottleneck seems to be the conversion of the array back into

Re: [Haskell-cafe] Making videos of your project

2009-03-24 Thread Don Stewart
claus.reinke: Perhaps the make a video slogan doesn't quite explain what is intended - it didn't to me!-) Reading John Udell's short article What is Screencasting? http://www.oreillynet.com/pub/a/oreilly/digitalmedia/2005/11/16/what-is-screencasting.html?page=1 gave me a better idea: the

Re: [Haskell-cafe] Hackage upload problems?

2009-03-23 Thread Don Stewart
sfvisser: Hello, Currently I'm trying to upload a minor update of Salvia to Hackage to fix some dependency issues but Hackage times out all the time? Both the CLI tool and the web-interface do not react to my upload request. Any known problems here? Discussion taking place on libraries@

[Haskell-cafe] Hackage download and popularity statistics

2009-03-23 Thread Don Stewart
For the first time, we've got download and popularity statistics from Hackage: http://www.galois.com/blog/2009/03/23/one-million-haskell-downloads/ Find out if your package made the top 100, and when we reach our 1 millionth hackage download! -- Don

Re: [Haskell-cafe] Re: A guess on stack-overflows - thunks build-upand tail recursion

2009-03-20 Thread Don Stewart
It would be great to have a video of this in action up on youtube. You can simply 'recordmydesktop' on linux (and likely elsewhere), then upload the result. It also helps the general adoption cause, having Haskell more visible and accessible. claus.reinke: The problem occurs when the result

Re: [Haskell-cafe] Ease of Haskell development on OS X?

2009-03-20 Thread Don Stewart
tom.davie: Other than chose the graphics card carefully, an iMac will do you very well. Hope that helps. This is very useful. Could the Mac users add information (and screenshots?) to the OSX wiki page, http://haskell.org/haskellwiki/OSX

Re: [Haskell-cafe] Ease of Haskell development on OS X?

2009-03-20 Thread Don Stewart
tom.davie: On 20 Mar 2009, at 18:08, Don Stewart wrote: tom.davie: Other than chose the graphics card carefully, an iMac will do you very well. Hope that helps. This is very useful. Could the Mac users add information (and screenshots?) to the OSX wiki page, http://haskell.org

Re: [Haskell-cafe] Ease of Haskell development on OS X?

2009-03-20 Thread Don Stewart
tom.davie: On 20 Mar 2009, at 18:46, Don Stewart wrote: tom.davie: On 20 Mar 2009, at 18:08, Don Stewart wrote: tom.davie: Other than chose the graphics card carefully, an iMac will do you very well. Hope that helps. This is very useful. Could the Mac users add information

Re: [Haskell-cafe] Ease of Haskell development on OS X?

2009-03-20 Thread Don Stewart
martijn: Don Stewart wrote: Yes, anything that is relevant to the development experience on this platform. Remember: it is more than just getting ghc. How do they get hold of new libraries and apps? Is cabal-install available? Since GHC is written in Haskell, do you need to have another

Re: [Haskell-cafe] Ease of Haskell development on OS X?

2009-03-20 Thread Don Stewart
that gtk2hs is the only thing in the haskellverse that requires ports to get compiled in an intuitive way. On Fri, Mar 20, 2009 at 1:51 PM, Don Stewart d...@galois.com wrote: tom.davie: On 20 Mar 2009, at 18:46, Don Stewart wrote: tom.davie: On 20 Mar 2009, at 18:08, Don Stewart

Re: [Haskell-cafe] Ease of Haskell development on OS X?

2009-03-20 Thread Don Stewart
dons: Good to hear you're shipping graphical Haskell apps, Jefferson. Well done. We do have tools for packaging for various distros: * Mac OSX: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/mkbndl * Windows

Re: [Haskell-cafe] Ease of Haskell development on OS X?

2009-03-20 Thread Don Stewart
bulat.ziganshin: Hello Jeff, Friday, March 20, 2009, 10:22:35 PM, you wrote: As this continues to build, I guess the issue for me, and I'm willing to help with it, is trying to figure out how to redistribute programs written with gtk2hs. on Windows, people can just install the gtk2hs

Re: [Haskell-cafe] Ease of Haskell development on OS X?

2009-03-20 Thread Don Stewart
bulat.ziganshin: Hello Don, Saturday, March 21, 2009, 12:06:48 AM, you wrote: i distribute my gtk2hs program for windows and linux. no problems, i just included runtime libraries provided by gtk2hs team. it was with gtk2hs 0.9.12.1 though, may be they don't provided updated archive for

Re: [Haskell-cafe] Are there performant mutable Arrays in Haskell?

2009-03-19 Thread Don Stewart
Brettschneider: Hey There, I am trying to write a hash-algorithm that in fact is working, but as you might have guessed the problem is the performance :) At the moment I am 40 times worse than the same implementation in C. My problem is, I need mutable arrays which are the heart of

[Haskell-cafe] Haskell on your system? Information wanted!

2009-03-18 Thread Don Stewart
Hey all, I noticed we didn't have an easy page to find out how to get hold of the Haskell toolchain for various systems. So there's now a link from haskell.org to (existing) pages on how to obtain Haskell on windows, mac osx and linux and bsd. If you're a distro maintainer for these systems,

Re: [Haskell-cafe] Tweaking the garbage collector for realtime usage

2009-03-18 Thread Don Stewart
bugfact: The GHC documentation lists a lot of tweaks that can be done to the garbage collector. However, Haskell spin-offs like Timber implement their own incremental garbage collector that is better suitable for real-time usage. Did someone already fiddle with GHC's gc flags so it works

[Haskell-cafe] Visualising the Hierarchical Namespace

2009-03-16 Thread Don Stewart
I've just finished a post (and quick tool) for graphing the complete module namespace of Haskell, taken from the core libraries and all of Hackage. It's quite large: http://donsbot.wordpress.com/2009/03/16/visualising-the-haskell-universe/ ___

Re: [Haskell-cafe] Visualising the Hierarchical Namespace

2009-03-16 Thread Don Stewart
Oh, barely any time (maybe 30-60 seconds). It's just a 10k node graph with a 50k edges. :) vanenkj: How long did the haskell universe graphs take to render? On Mon, Mar 16, 2009 at 11:05 AM, Don Stewart d...@galois.com wrote: I've just finished a post (and quick tool) for graphing

Re: [Haskell-cafe] Visualising the Hierarchical Namespace

2009-03-16 Thread Don Stewart
My secret hope is that Jeff will take the .dot files and doing something very cool with them jefferson.r.heard: Very impressive looking, Don. -- Jeff On Mon, Mar 16, 2009 at 11:14 AM, Don Stewart d...@galois.com wrote: Oh, barely any time (maybe 30-60 seconds). It's just a 10k node

Re: [Haskell-cafe] Visualising the Hierarchical Namespace

2009-03-16 Thread Don Stewart
manlio_perillo: Don Stewart ha scritto: I've just finished a post (and quick tool) for graphing the complete module namespace of Haskell, taken from the core libraries and all of Hackage. It's quite large: http://donsbot.wordpress.com/2009/03/16/visualising-the-haskell-universe

Re: [Haskell-cafe] I can't install hs-plugins beceause of Linker.h

2009-03-15 Thread Don Stewart
It depends on if you need 'eval' or object loading capability. For true plugins, hs-plugins is still the only binding to the GHC rts object loader, for eval-like mechanisms, we've a number of bindings to the ghc-api bytecode interpreter, such as hint. That said, hs-plugins is kinda sorta

Re: [Haskell-cafe] I can't install hs-plugins beceause of Linker.h

2009-03-15 Thread Don Stewart
Fixed on hackage. $ cabal update $ cabal install plugins-1.4.1 Or via the web: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/plugins-1.4.1 -- Don yuri.kashnikoff: Thanks. Problem solved now! On Sun, Mar 15, 2009 at 7:20 PM, Duncan Coutts

Re: [Haskell-cafe] big discussion about Haskell on Reddit

2009-03-15 Thread Don Stewart
fft1976: I noticed that on Programming Reddit, where I lurk, there is a big discussion about the disconnect between how much Haskell is advocated there and the number of applications written in it. http://www.reddit.com/r/programming/comments/84sqt/dear_reddit_i_am_seeing_12_articles_in/

Re: [Haskell-cafe] Alternative to Data.Binary

2009-03-14 Thread Don Stewart
grzegorz.chrupala: Hi all, Is there a serialization library other than the Data.Binary from hackage? I am using Data.Binary in a couple of projects, but I have found its stack and memory usage very hard to control. Its very common that decoding a map or list of non-trivial size uses up

[Haskell-cafe] What's new on Hackage this week? March 14, 2009

2009-03-14 Thread Don Stewart
http://archhaskell.wordpress.com/2009/03/14/arch-haskell-news-mar-14-2009/ A regular update of Haskell in Arch Linux Arch now has 974 Haskell packages in AUR. That’s 12 new packages this week, and lots of updates as well. See the blog for the full list of updates. -- Don

[Haskell-cafe] Re: Has anybody replicated =~ s/../../ or even something more basic for doing replacements with pcre haskell regexen?

2009-03-14 Thread Don Stewart
Also, consider stealing the regex susbt code from: http://shootout.alioth.debian.org/u64q/benchmark.php?test=regexdnalang=ghcid=4 tphyahoo: So, I tweaked Text.Regex to have the behavior I need. http://patch-tag.com/repo/haskell-learning/browse/regexStuff/pcreReplace.hs FWIW, the

Re: [Haskell-cafe] Design Patterns by Gamma or equivalent

2009-03-14 Thread Don Stewart
wren: There also a number of idioms which are similar in scope to the idioms that arise in other languages: using tail recursion, accumulators, continuation-passing transformations, closures over recursion[6], Schwartzian transforms, etc. [6] For lack of a better name. I mean doing

Re: [Haskell-cafe] bytestring vs. uvector

2009-03-13 Thread Don Stewart
manlio_perillo: Don Stewart ha scritto: bulat.ziganshin: Hello Don, Wednesday, March 11, 2009, 12:12:07 AM, you wrote: Right, so my point stands: there's no difference now. If you can write a Storable instance, you can write a UA et al instance. yes, if there is some class provided

Re: [Haskell-cafe] bytestring vs. uvector

2009-03-13 Thread Don Stewart
manlio_perillo: Bryan O'Sullivan ha scritto: [...] text is not mature, and is based on the same modern fusion framework as uvector and vector. It uses unpinned arrays, but provides functions for dealing with foreign code. What is the reason why you have decided to use unpinned arrays

Re: [Haskell-cafe] Has anybody replicated =~ s/../../ or even something more basic for doing replacements with pcre haskell regexen?

2009-03-13 Thread Don Stewart
tphyahoo: Is there something like subRegex... something like =~ s/.../.../ in perl... for haskell pcre Regexen? I mean, subRegex from Text.Regex of course: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/regex-compat Thanks for any advice, Basically, we should have it.

Re: [Haskell-cafe] broken IO support in uvector package, when using non primitive types

2009-03-13 Thread Don Stewart
UIO's also only a truly alpha idea as a proxy for bytestring/Binary support. Patches welcome. pumpkingod: As far as I know, the reason for this is that the UIO instance for productions writes the two rows out sequentially to file, but doesn't include any means to determine the length of the

Re: [Haskell-cafe] broken IO support in uvector package, when using non primitive types

2009-03-13 Thread Don Stewart
As far as I know, the reason for this is that the UIO instance for productions writes the two rows out sequentially to file, but doesn't include any means to determine the length of the two halves when it's loading up again. When you try to read the production back in, it tries to read in two

Re: [Haskell-cafe] broken IO support in uvector package, when using non primitive types

2009-03-13 Thread Don Stewart
manlio_perillo: Daniel Fischer ha scritto: [...] Worked with uvector-0.1.0.1: [...] But not with uvector-0.2 [...] The main difference is that in uvector 0.2, hPutBU does not write in the file the length of the array; hGetBU simply use the file size. let elemSize = sizeBU 1

Re: [Haskell-cafe] broken IO support in uvector package, when using non primitive types

2009-03-13 Thread Don Stewart
manlio_perillo: Don Stewart ha scritto: [...] So, the patch is: just revert this change. Or... use your own UIO instance. That's why it's a type class! Why should I rewrite the UIO instance, if one already exists? Oh, because you want different serialization semantics to the (arbitrary

Re: [Haskell-cafe] broken IO support in uvector package, when using non primitive types

2009-03-13 Thread Don Stewart
of writing a Binary instance, so maybe we can get the best of both worlds eventually. Thanks, Dan On Fri, Mar 13, 2009 at 7:21 PM, Don Stewart d...@galois.com wrote: manlio_perillo: Don Stewart ha scritto: [...] So, the patch is: just revert this change. Or... use your own UIO

Re: [Haskell-cafe] ThreadScope: Request for features for the performance tuning of parallel and concurrent Haskell programs

2009-03-12 Thread Don Stewart
marlowsd: Ben Lippmeier wrote: On 12/03/2009, at 12:24 AM, Satnam Singh wrote: Before making the release I thought it would be an idea to ask people what other features people would find useful or performance tuning. So if you have any suggestions please do let us know! Is it available

Re: [Haskell-cafe] Re: Data.Binary patches?

2009-03-12 Thread Don Stewart
Send it to the maintainer... Explain what the patch is for, and why it should be applied. dbueno: On Wed, Mar 11, 2009 at 20:54, Denis Bueno dbu...@gmail.com wrote: I've got a small patch for Data.Binary.  Should I post it here, or is there some more appropriate forum? In case whoever

Re: [Haskell-cafe] ThreadScope: Request for features for the performance tuning of parallel and concurrent Haskell programs

2009-03-12 Thread Don Stewart
karel.gardas: Don Stewart wrote: marlowsd: Ben Lippmeier wrote: On 12/03/2009, at 12:24 AM, Satnam Singh wrote: Before making the release I thought it would be an idea to ask people what other features people would find useful or performance tuning. So if you have any suggestions

Re: [Haskell-cafe] Generics Versus Parametric Polymorphism

2009-03-11 Thread Don Stewart
mark.spezzano: Hi, Just wondering if Generics and Parametric polymorphism are one and the same in Haskell. I read (somewhere!) an article stating that generics might be included in Haskell Prime but I thought that they’re already included as parametric polymorphism. Did I misread

Re: [Haskell-cafe] ByteString in patterns

2009-03-11 Thread Don Stewart
manlio_perillo: Don Stewart ha scritto: manlio_perillo: Don Stewart ha scritto: [...] {-# LANGUAGE OverloadedStrings #-} import qualified Data.ByteString.Char8 as C isMatch :: C.ByteString - Bool isMatch match = True isMatch _ = False main = print . map

Re: [Haskell-cafe] Distributing Linux binaries

2009-03-10 Thread Don Stewart
If it is a hurdle for me, I can imagine a lot of people are getting frustrated at trying to distribute their binaries on Linux. Yes. This is not a new observation :) -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] bytestring vs. uvector

2009-03-10 Thread Don Stewart
xj2106: Alexander Dunlap alexander.dun...@gmail.com writes: - uvector, storablevector and vector are all designed for dealing with arrays. They *can* be used for characters/word8s but are not specialized for that purpose, do not deal with Unicode at all, and are probably worse at it.

Re: [Haskell-cafe] bytestring vs. uvector

2009-03-10 Thread Don Stewart
bulat.ziganshin: Hello Don, Tuesday, March 10, 2009, 10:40:30 PM, you wrote: I think uvector only works with certain types that can be unboxed, while storablevector works with all types that instantiate Foreign.Storable.Storable. I don't know about vector. From the description of

Re: [Haskell-cafe] Sugestion for a Haskell mascot

2009-03-10 Thread Don Stewart
I thought this was our unofficial mascot: http://www.haskell.org/sitewiki/images/8/85/NarleyYeeaaahh.jpg Available in plush form: http://www.amazon.com/Narwhal-Plush-Stuffed-Animal-Toy/dp/B0011DFUGE/ref=sr_1_3?ie=UTF8s=toys-and-gamesqid=1236716339sr=1-3 YEEHH! mads_lindstroem:

Re: [Haskell-cafe] bytestring vs. uvector

2009-03-10 Thread Don Stewart
bulat.ziganshin: Hello Don, Tuesday, March 10, 2009, 11:01:31 PM, you wrote: if uavector use ghc's built-in unboxed array operations (as Data.Array.Unboxed does) then it's necessarily bounded to types supported by those operations And what is Storable limited to? Ultimately

Re: [Haskell-cafe] bytestring vs. uvector

2009-03-10 Thread Don Stewart
xj2106: Don Stewart d...@galois.com writes: And what is Storable limited to? Ultimately they're all limited to the primops for reading and writing, and to what types we can encode in those. So: primop ReadOffAddrOp_Char readCharOffAddr# GenPrimOp ... {- instance

Re: [Haskell-cafe] bytestring vs. uvector

2009-03-10 Thread Don Stewart
bulat.ziganshin: Hello Don, Wednesday, March 11, 2009, 12:12:07 AM, you wrote: Right, so my point stands: there's no difference now. If you can write a Storable instance, you can write a UA et al instance. yes, if there is some class provided for this and not just hard-coded 4 or so

Re: [Haskell-cafe] bytestring vs. uvector

2009-03-10 Thread Don Stewart
bulat.ziganshin: Hello Don, Wednesday, March 11, 2009, 12:48:35 AM, you wrote: unfortunately, Array library unboxed arrays still aren't based on any Unboxable *class* Hmm. Aren't all the array library types based on MArray and IArray? So I can define my own say, new STUArray

Re: [Haskell-cafe] ByteString in patterns

2009-03-10 Thread Don Stewart
manlio_perillo: Hi. Using normal String type I can define a pattern like: let foo baz = 777 foo baz 777 But if I want to use ByteString, what should I do? This seems impossible, since ByteString data constructor is not available. -XOverloadedStrings e.g. {-# LANGUAGE

Re: [Haskell-cafe] ByteString in patterns

2009-03-10 Thread Don Stewart
manlio_perillo: Don Stewart ha scritto: manlio_perillo: Hi. Using normal String type I can define a pattern like: let foo baz = 777 foo baz 777 But if I want to use ByteString, what should I do? This seems impossible, since ByteString data constructor is not available

Re: [Haskell-cafe] ByteString in patterns

2009-03-10 Thread Don Stewart
manlio_perillo: Don Stewart ha scritto: [...] {-# LANGUAGE OverloadedStrings #-} import qualified Data.ByteString.Char8 as C isMatch :: C.ByteString - Bool isMatch match = True isMatch _ = False main = print . map isMatch . C.lines = C.getContents What

Re: [Haskell-cafe] Distributing Linux binaries

2009-03-09 Thread Don Stewart
lists: Hi folks, I've got an application to release. I'm releasing the source, but I also wanted to release binary versions for people that don't have GHC. I developed on Windows, so making a Windows executable was simple. I also have access to an Ubuntu Linux box, on which I can easily

Re: [Haskell-cafe] Minimum Int?

2009-03-09 Thread Don Stewart
colin: Is there a function that yields the minimum value of Int on an implementation? Prelude minBound :: Int -9223372036854775808 Prelude maxBound :: Int 9223372036854775807 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] ANN: Future 1.1.0 concurrency library

2009-03-09 Thread Don Stewart
Who needs to build futures into the language -- all you need is MVars, eh? -- Don vanenkj: I'd also like to point out that Chris did this with 165 lines of code--including comments and whitespace! If you drop the whitespace and comments, it's only 91 lines!

Re: [Haskell-cafe] Mystified by Cabal

2009-03-08 Thread Don Stewart
duncan.coutts: On Sat, 2009-03-07 at 17:30 +, Colin Paul Adams wrote: Svein == Svein Ove Aas svein@aas.no writes: Preprocessing library game-tree-1.0.0.0... Building game-tree-1.0.0.0... Data/Tree/Game/Negascout.hs:31:0: Unrecognised pragma [1 of 2]

[Haskell-cafe] Arch Linux: New package updates for Mar 8, 2008

2009-03-08 Thread Don Stewart
New Haskell packages for the week ending Mar 8. http://archhaskell.wordpress.com/2009/03/08/arch-haskell-news-mar-8-2009/ Arch now has 962 Haskell packages in AUR. That’s 17 new packages this week, and lots of updates as well. Notable releases this week * htar-0.3: Command-line tar archive

Re: [Haskell-cafe] Looking for literature

2009-03-08 Thread Don Stewart
claus.reinke: I'm trying to catch up with all the wonderful Haskell Types, classes, Abstract Data Types, Algebraic Data Types, Types that give peoples headaches and all the other, deeper stuff I have been happily putting off. Hmm, do we need more pragmas?-) {-# LANGUAGE

Re: [Haskell-cafe] Mystified by Cabal

2009-03-07 Thread Don Stewart
colin: I have just attempted Cabal-izing my program (splitting it into a library and main program as well), and I'm mystified by some problems I am having. First, when I try to build the library I get: [co...@susannah game-tree]$ runhaskell Setup build Preprocessing library

Re: [Haskell-cafe] serializing large data structures, stack overflow

2009-03-07 Thread Don Stewart
Increase the stack size, or use a different serialiser (they're only a half dozen lines to write), or different data structure? -- Don frigginfriggins: I'm playing around with Netflix, implementing a simple KNN-algorithm, I will later try SVD which seems to be the most successful approach.

Re: [Haskell-cafe] serializing large data structures, stack overflow

2009-03-07 Thread Don Stewart
want something that avoids flattening it to a list first -- Don frigginfriggins: can you link to a good example of writing your own because I couldn't find one. On Sat, Mar 7, 2009 at 8:57 PM, Don Stewart d...@galois.com wrote: Increase the stack size, or use a different serialiser

Re: [Haskell-cafe] Purely Functional Data Structures

2009-03-07 Thread Don Stewart
gue.schmidt: Hi, is the above mentioned book still *the* authority on the subject? I bought the book, read about 10 pages and then put it back on the shelf. Um. In my app I have to deal with 4 csv files, each between 5 - 10 mb, and some static data. I had put all that data into an

Re: [Haskell-cafe] bytestring vs. uvector

2009-03-07 Thread Don Stewart
bos: On Sat, Mar 7, 2009 at 10:23 PM, Alexander Dunlap alexander.dun...@gmail.com wrote: Hi all, For a while now, we have had Data.ByteString[.Lazy][.Char8] for our fast strings. Now we also have Data.Text, which does the same for Unicode. These seem to be the standard

Re: [Haskell-cafe] Re: MPI

2009-03-06 Thread Don Stewart
fft1976: On Wed, Mar 4, 2009 at 5:03 PM, FFT fft1...@gmail.com wrote: Are MPI bindings still the best way of using Haskell on Beowulf clusters? It's my feeling that the bindings stagnated, or are they just very mature? What's the story with distributed memory multiprocessing? Are Haskell

Re: [Haskell-cafe] Re: MPI

2009-03-06 Thread Don Stewart
bos: On Thu, Mar 5, 2009 at 10:43 AM, FFT fft1...@gmail.com wrote: Are MPI bindings still the best way of using Haskell on Beowulf clusters? It's my feeling that the bindings stagnated, or are they just very mature? MPI itself hasn't changed in 14 years, so it's not

Re: [Haskell-cafe] Data.Binary stack overflow with Data.Sequence String

2009-03-05 Thread Don Stewart
Avoid unpack! ndmitchell: Hi Gwern, I get String/Data.Binary issues too. My suggestion would be to change your strings to ByteString's, serisalise, and then do the reverse conversion when reading. Interestingly, a String and a ByteString have identical Data.Binary reps, but in my

Re: [Haskell-cafe] missing support to Data.Binary for uvector package

2009-03-05 Thread Don Stewart
manlio_perillo: Hi. I'm still having problems with the uvector package. I have an IntMap (UArr xxx) data type, and I want to serialize it to disk, in binary format. I'm using the uvector package from http://patch-tag.com/repo/pumpkin-uvector/home The problem is with missing

Re: [Haskell-cafe] Haskell Logo Voting will start soon!

2009-03-05 Thread Don Stewart
eelco: Hi there! It's been quiet for a while around the 'new logo' competition, but here is how it is going to work: The list with options can be found here (for now): http://community.haskell.org/~eelco/poll.html Notice that some (very) similar logos are grouped as one option (thanks

Re: [Haskell-cafe] help optimizing memory usage for a program

2009-03-04 Thread Don Stewart
manlio_perillo: Hi. After some work I have managed to implement two simple programs that parse the Netflix Prize data set. For details about the Netflix Prize, there was a post by Kenneth Hoste some time ago. I have cabalized the program, and made available here:

Re: [Haskell-cafe] Re: Left fold enumerator - a real pearl overlooked?

2009-03-04 Thread Don Stewart
jwlato: On Tue, Mar 3, 2009 at 1:03 AM, Henning Thielemann lemm...@henning-thielemann.de wrote: On Mon, 2 Mar 2009, John Lato wrote: While I think that the Iteratee pattern has benefits, I suspect that it can't be combined with regular lazy functions, e.g. of type [a] - [a]. Say I

Re: [Haskell-cafe] Threading and Mullticore Computation

2009-03-03 Thread Don Stewart
mwinter: Hi, I tried a get into concurrent Haskell using multiple cores. The program below creates 2 task in different threads, executes them, synchronizes the threads using MVar () and calculates the time needed. import System.CPUTime import Control.Concurrent import

Re: [Haskell-cafe] Threading and Mullticore Computation

2009-03-03 Thread Don Stewart
allbery: On 2009 Mar 3, at 12:31, mwin...@brocku.ca wrote: In both runs the same computations are done (sequentially resp. parallel), so the gc should be the same. But still using 2 cores is much slower than using 1 core (same program - no communication). The same GCs are done, but GC has to

Re: [Haskell-cafe] Threading and Mullticore Computation

2009-03-03 Thread Don Stewart
andrewcoppin: Svein Ove Aas wrote: For what it's worth, I tried it myself on 6.10.. details follow, but overall impression is that while you lose some time to overhead, it's still 50% faster than unthreaded. On a quad core, ghc 6.10 snapshot from today: Single threaded whirlpool$

Re: [Haskell-cafe] possible memory leak in uvector 0.1.0.3

2009-03-02 Thread Don Stewart
manlio_perillo: Hi. In the help optimizing memory usage for a program I discovered some interesting things: 2) UArr from uvector leaks memory. I'm rather sure about this. Note it was just allocating more than was required, it wasn't leaking it in any sense (i.e. losing track of the

Re: [Haskell-cafe] interaction between ghci and cudaBLAS library

2009-03-02 Thread Don Stewart
seb: In my efforts to integrate this library into Haskell (I am working on OS X 10.5.6 with ghc-6.10.1 and CUDA 2.0) I am getting a bad interaction between the threads in ghci - when I call the library init function via the FFI, ghci will block in __semwait_signal. Of course if I build an

Re: [Haskell-cafe] interaction between ghci and cudaBLAS library

2009-03-02 Thread Don Stewart
seb: Don Stewart-2 wrote: Do you get the same problem in compiled code? (GHCi is generally for exploratory work only). if I create an executable run it non-interactively. It works fine: $ ghc -O2 --make -threaded main.hs cublas.hs -lcublas -L${CUDA}/lib No matter whether

Re: [Haskell-cafe] Re: Left fold enumerator - a real pearl overlooked?

2009-02-28 Thread Don Stewart
jwlato: Hello Günther, I think the largest reason Haskellers don't use left-fold enumerators is that there isn't a ready-to-use package on Hackage. Oleg's code is extremely well commented and easy to follow, but it's not cabalized. In addition to Takusen, Johan Tibbe's hyena application

Re: [Haskell-cafe] missing support for NFData in uvector package

2009-02-28 Thread Don Stewart
manlio_perillo: Today I noticed that there is no instance declaration for NFData, in the uvector package. The definition is quite simple: instance NFData a = NFData (UArr a) where -- NOTE: UArr is already strict rnf array = array `seq` () but it is important. In a my program

Re: [Haskell-cafe] differences between Data.Array and Data.Vector

2009-02-27 Thread Don Stewart
manlio_perillo: Hi. In Hackage there are some packages named *array*, and others named *vector*. What are the differences? Is available a guide to the various data structures available in Haskell? The vector packages tend to be either easily growable, or easily fusible, or both.

Re: [Haskell-cafe] memory issues

2009-02-27 Thread Don Stewart
bulat.ziganshin: Hello Rogan, Saturday, February 28, 2009, 1:18:47 AM, you wrote: data Block = Block { offset::Integer , size::Integer } deriving (Eq) try !offset::Integer , !size::Integer offset :: !Integer And possibly just using {-# UNPACK

Re: [Haskell-cafe] Performance question

2009-02-26 Thread Don Stewart
Ben.Lippmeier: On 26/02/2009, at 9:27 PM, hask...@kudling.de wrote: Currently i can only imagine to define a data type in order to use unboxed Ints instead of the accumulator tuple. That would probably help a lot. It would also help to use two separate Double# parameters instead of the

[Haskell-cafe] Re: seg-fault in mersenne-random with SSE2 (was Performance question)

2009-02-26 Thread Don Stewart
Alistair.Bayley: From: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Roel van Dijk I replaced the standard random number generated with the one from mersenne-random. On my system this makes the resulting program about 14 times faster than the

Re: [Haskell-cafe] Performance question

2009-02-26 Thread Don Stewart
vandijk.roel: I replaced the standard random number generated with the one from mersenne-random. On my system this makes the resulting program about 14 times faster than the original. I also made a change to accumulateHit because it doesn't need to count to total. That is already known.

Re: [Haskell-cafe] Performance Issue

2009-02-26 Thread Don Stewart
james.swaine: i'm implementing a benchmark which includes a detailed specification for a random number generator. for any of the kernels outlined in the benchmark, i might have to generate a set of random numbers R, which has a length n, using the following formulas: R[k] = ((2^-46)(X[k]))

[Haskell-cafe] Re: package code duplication

2009-02-25 Thread Don Stewart
wasserman.louis: There was a question recently about being allowed to get into package internals, and I had a question. I want to use uvector's stream internals in ways that the exposed methods don't permit, but I don't especially want to use another package (e.g. vector, which does expose

Re: Pickling a finite map (Binary + zlib) [was: [Haskell-cafe] Data.Binary poor read performance]

2009-02-24 Thread Don Stewart
dons: wren: Neil Mitchell wrote: 2) The storage for String seems to be raw strings, which is nice. Would I get a substantial speedup by moving to bytestrings instead of strings? If I hashed the strings and stored common ones in a hash table is it likely to be a big win? Bytestrings

Re: Pickling a finite map (Binary + zlib) [was: [Haskell-cafe] Data.Binary poor read performance]

2009-02-24 Thread Don Stewart
felipe.lessa: On Tue, Feb 24, 2009 at 4:59 AM, Don Stewart d...@galois.com wrote: Looks like the Map reading/showing via association lists could do with further work. Anyone want to dig around in the Map instance? (There's also some patches for an alternative lazy Map serialisation

Re: [Haskell-cafe] Data.Binary poor read performance

2009-02-24 Thread Don Stewart
jnf: wren ng thornton wrote: If you have many identical strings then you will save lots by memoizing your strings into Integers, and then serializing that memo table and the integerized version of your data structure. The amount of savings decreases as the number of duplications

[Haskell-cafe] Re: Data.Binary poor read performance

2009-02-23 Thread Don Stewart
ndmitchell: Hi, In an application I'm writing with Data.Binary I'm seeing very fast write performance (instant), but much slower read performance. Can you advise where I might be going wrong? Can you try binary 0.5 , just released 20 mins ago? There was definitely some slow downs due to

<    2   3   4   5   6   7   8   9   10   11   >