News aggregator

Moving PrimMonad from the primitive package to base

libraries list - Mon, 05/12/2014 - 2:37pm
Hi, I'm pondering adding unfoldM, as generalization of fromList, to the unordered-containers package. unfoldM could, just like fromList, be implemented using mutation followed by freezing internally, making it much more efficient the repeatedly calling insert when building a HashMap. A typical use case of unfoldM would be constructing a HashMap from the content of a file. Here's the annoying issue: unfoldM could work in both ST and IO, but exposing those two versions to users is a bit annoying. Either I have to have to * provide unfoldIO, unfoldST, etc for all functions I want to expose that work over either ST or IO or * depend on primitive, which is mostly unmaintained since Roman got busy with other things. Even if primitive was maintained, having to add extra library dependencies to "bottom layer" libraries like unordered-containers is often not worth the cost (more dependency management, risk of breakages, etc.) Furthermore, the pixie dust that makes abstracting over ST and IO possible, is quite
Categories: Offsite Discussion

Why does profiling binary eat CPU?

Haskell on Reddit - Mon, 05/12/2014 - 2:20pm

The program is main = forever $ threadDelay 1000000 >> return () .

Compiled with 32bit GHC 7.6.3 or 7.8.2 on Debian (inside a VM if that matters), the non-profiling binary doesn't consume CPU, the profiling does ~10%. Running with +RTS -I0, so this is not the idle gc.

When strace-ing, the profiling one seems to receive a constant flow of SIGVTALRM, while the normal receives one burst each second.

1) Is this expected behavior?

2) I see I can switch off "master tick interval" with -V0, and then CPU is not used. What consequence does this have, regarding performance (more frequent context switches?) and profilability (profiling data is not collected?).

submitted by literon
[link] [3 comments]
Categories: Incoming News

Error installing gtk3

libraries list - Mon, 05/12/2014 - 2:02pm
Hello everyone, I am trying to install gtk3 on Debian Wheezy (i386), without much success (see attached file for detailed error). I tried running |cabal update|, deleting ~/.ghc/<environment>/package.conf.d/glib* ~/.ghc/<environment>/package.conf.d/gtk* ~/.ghc/<environment>/package.conf.d/webkit* ~/.cabal/bin/gtk* ~/.cabal/packages/* ~/.cabal/packages/* ~/.cabal/packages/* and then recompiling, but I am still stuck with the same error. Any idea on where to look / what to do to fix this? Thanks -F # cabal install gtk3 > gtk-err.txt 2>&1 Resolving dependencies... In order, the following will be installed: glib- (new package) gio- (reinstall) changes: glib- added pango- (reinstall) changes: glib- added gtk3- (new package) Warning: Note that reinstalls are always dangerous. Continuing anyway... Downloading glib- [1 of 2] Compiling SetupWrapper ( /tmp/glib-
Categories: Offsite Discussion

CFP: WFLP 2014 - Workshop on Functional and (Constraint)Logic Programming

General haskell list - Mon, 05/12/2014 - 1:48pm
23rd International Workshop on Functional and (Constraint) Logic Programming colocated with 28th Workshop on (Constraint) Logic Programming (WLP 2014) September 15 - 17, at Leucorea conference center in Lutherstadt Wittenberg, Germany. *********************************************************** Dates: * submission closes: July 1, 2014 * notification: August 1, 2014 * final version due: September 1, 2014 * workshop: September 15 - 17, 2014 *********************************************************** The international workshops on functional and logic programming aim at bringing together researchers interested in functional programming, logic programming, as well as their integration. The workshops on (constraint) logic programming serve as the scientific forum of the annual meeting of the Society of Logic Programming (GLP e.V.) and bring together researchers interested in logic programming, constraint programming, and related areas like databases, artificial int
Categories: Incoming News

Skills Matter - Mon, 05/12/2014 - 4:14am
Categories: Offsite Blogs

Using mutable array after an unsafeFreezeArray, and GC details

glasgow-user - Fri, 05/09/2014 - 7:21pm
A couple of updates: Edward Yang responded here, confirming the sort of track I was thinking on: And I can report that: 1) cloning a frozen array doesn't provide the benefits of creating a new array and freezing 2) and anyway, I'm seeing some segfaults when cloning, freezing, reading then writing in my library I'd love to learn if there are any other approaches I might take, e.g. maybe with my own CMM primop variants? Thanks, Brandon
Categories: Offsite Discussion

Using mutable array after an unsafeFreezeArray, and GC details

glasgow-user - Fri, 05/09/2014 - 12:18am
I have an unusual application with some unusual performance problems and I'm trying to understand how I might use unsafeFreezeArray to help me, as well as understand in detail what's going on with boxed mutable arrays and GC. I'm using the interface from 'primitive' below. First some basic questions, then a bit more background 1) What happens when I do `newArray s x >>= \a-> unsafeFreezeArray a 2) And what if a do a `cloneMutableArray` on `a` and likewise use the resulting array? Background: I've been looking into an issue [1] in a library in which as more mutable arrays are allocated, GC dominates (I think I verified this?) and all code gets slower in proportion to the number of mutable arrays that are hanging around. I've been trying to understand how this is working internally. I don't quite understand how the "remembered set" works with respect to MutableArray. As best I understand: the remembered set in generation G points to certain objects in older generations, which objects hold references to ob
Categories: Offsite Discussion

New gtk2hs 0.12.4 release

gtk2hs - Wed, 11/21/2012 - 12:56pm

Thanks to John Lato and Duncan Coutts for the latest bugfix release! The latest packages should be buildable on GHC 7.6, and the cairo package should behave a bit nicer in ghci on Windows. Thanks to all!


Categories: Incoming News