[Haskell-cafe] hdbc parametrized select

2012-10-18 Thread s9gf4ult
does hdbc have parametrized selects ? There is execute execute :: Statement - [SqlValue] - IO Integer and some other functions which get list of parameters but return IO Integer or IO () and there is other couple of functions fetchRow :: Statement - IO (Maybe [SqlValue]) which return values of

Re: [Haskell-cafe] tplot (out of memory)

2012-10-18 Thread malcolm.wallace
Did you ever solve this? I have a similar message ( user error (out of memory) ) arising from a different app (not tplot) that uses the Haskell Chart library (and cairo underneath). On some linux machines, it crashes, on others it works fine. I can find no environment differences between the

[Haskell-cafe] How to correctly benchmark code with Criterion?

2012-10-18 Thread Janek S.
Dear list, during past few days I spent a lot of time trying to figure out how to write Criterion benchmarks, so that results don't get skewed by lazy evaluation. I want to benchmark different versions of an algorithm doing numerical computations on a vector. For that I need to create an

Re: [Haskell-cafe] How to correctly benchmark code with Criterion?

2012-10-18 Thread Claude Heiland-Allen
Hi Janek, On 18/10/12 10:23, Janek S. wrote: during past few days I spent a lot of time trying to figure out how to write Criterion benchmarks, so that results don't get skewed by lazy evaluation. I want to benchmark different versions of an algorithm doing numerical computations on a vector.

Re: [Haskell-cafe] How to correctly benchmark code with Criterion?

2012-10-18 Thread Alfredo Di Napoli
I don't know if you have already read them, but Tibell's slides on High Performance Haskell are pretty good: http://www.slideshare.net/tibbe/highperformance-haskell There is a section at the end where he runs several tests using Criterion. HTH, A. On 18 October 2012 11:45, Claude Heiland-Allen

[Haskell-cafe] Fwd: hdbc parametrized select

2012-10-18 Thread Wilfried van Asten
This was not sent to the cafe since I used the wrong from address. -- Forwarded message -- From: Asten, W.G.G. van (Wilfried, Student M-CSC) w.g.g.vanas...@student.utwente.nl Date: Thu, Oct 18, 2012 at 12:27 PM Subject: Re: [Haskell-cafe] hdbc parametrized select To:

[Haskell-cafe] A yet another question about subtyping and heterogeneous collections

2012-10-18 Thread Dmitry Vyal
Hello list! I've been experimenting with emulating subtyping and heterogeneous collections in Haskell. I need this to parse a binary representation of objects of a class hierarchy in C++ program. So far I implemented upcasting using a chain of type classes and now I'm playing with

Re: [Haskell-cafe] A yet another question about subtyping and heterogeneous collections

2012-10-18 Thread MigMit
Why do you need ALike x, BLike x etc.? Why not just Like u x? Отправлено с iPhone Oct 18, 2012, в 14:36, Dmitry Vyal akam...@gmail.com написал(а): Hello list! I've been experimenting with emulating subtyping and heterogeneous collections in Haskell. I need this to parse a binary

Re: [Haskell-cafe] How to correctly benchmark code with Criterion?

2012-10-18 Thread Janek S.
Something like this might work, not sure what the canonical way is. (...) This is basically the same as the answer I was given on SO. My concerns about this solutions are: - rnf requires its parameter to belong to NFData type class. This is not the case for some data structures like Repa

Re: [Haskell-cafe] A yet another question about subtyping and heterogeneous collections

2012-10-18 Thread Dmitry Vyal
On 10/18/2012 03:20 PM, MigMit wrote: Why do you need ALike x, BLike x etc.? Why not just Like u x? Hmm, looks like a nice idea. I tried it, unfortunately I can't cope with compiler error messages: tst.hs:32:15: Context reduction stack overflow; size = 201 Use -fcontext-stack=N to

Re: [Haskell-cafe] How to correctly benchmark code with Criterion?

2012-10-18 Thread Antoine Latter
On Thu, Oct 18, 2012 at 4:23 AM, Janek S. fremenz...@poczta.onet.pl wrote: Dear list, during past few days I spent a lot of time trying to figure out how to write Criterion benchmarks, so that results don't get skewed by lazy evaluation. I want to benchmark different versions of an

Re: [Haskell-cafe] How to correctly benchmark code with Criterion?

2012-10-18 Thread Janek S.
So the evaluation will be included in the benchmark, but if bench is doing enough trials it will be statistical noise. When I intentionally delayed my dataBuild function (using delayThread 100) the estimated time of benchmark was incorrect, but when I got the final results all runs were

Re: [Haskell-cafe] How to correctly benchmark code with Criterion?

2012-10-18 Thread Antoine Latter
On Thu, Oct 18, 2012 at 9:06 AM, Janek S. fremenz...@poczta.onet.pl wrote: So the evaluation will be included in the benchmark, but if bench is doing enough trials it will be statistical noise. When I intentionally delayed my dataBuild function (using delayThread 100) the estimated time

Re: [Haskell-cafe] A yet another question about subtyping and heterogeneous collections

2012-10-18 Thread Roman Cheplyaka
* Dmitry Vyal akam...@gmail.com [2012-10-18 17:31:13+0400] On 10/18/2012 03:20 PM, MigMit wrote: Why do you need ALike x, BLike x etc.? Why not just Like u x? Hmm, looks like a nice idea. I tried it, unfortunately I can't cope with compiler error messages: tst.hs:32:15: Context

[Haskell-cafe] Teaching Haskell @ MOOCs like Coursera or Udacity

2012-10-18 Thread niket
I am a novice in Haskell but I would love to see the gurus out here teaching Haskell on MOOCs like Coursera or Udacity. Dr Martin Odersky is doing it for Scala here: https://www.coursera.org/course/progfun I would love to see Haskell growing on such new platforms! Regards, Niket

Re: [Haskell-cafe] Teaching Haskell @ MOOCs like Coursera or Udacity

2012-10-18 Thread Thiago Negri
+1 2012/10/18 niket niketku...@gmail.com: I would love to see Haskell growing on such new platforms! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] How to correctly benchmark code with Criterion?

2012-10-18 Thread Thomas Schilling
Yes, Criterion always discards the time of the first evaluation. On 18 October 2012 15:06, Janek S. fremenz...@poczta.onet.pl wrote: So the evaluation will be included in the benchmark, but if bench is doing enough trials it will be statistical noise. When I intentionally delayed my dataBuild

Re: [Haskell-cafe] How to correctly benchmark code with Criterion?

2012-10-18 Thread Thomas Schilling
On 18 October 2012 13:15, Janek S. fremenz...@poczta.onet.pl wrote: Something like this might work, not sure what the canonical way is. (...) This is basically the same as the answer I was given on SO. My concerns about this solutions are: - rnf requires its parameter to belong to NFData

[Haskell-cafe] Getting PID of a child process

2012-10-18 Thread Jason Dusek
Hi All, Using `System.Process.runInteractiveProcess', I can start a process and get a handle to it: runInteractiveProcess :: FilePath - [String] - Maybe FilePath - Maybe [(String, String)] - IO (Handle, Handle, Handle, ProcessHandle) For diagnostic purposes, I'd like to print

Re: [Haskell-cafe] Getting PID of a child process

2012-10-18 Thread Gwern Branwen
On Thu, Oct 18, 2012 at 5:03 PM, Jason Dusek jason.du...@gmail.com wrote: For diagnostic purposes, I'd like to print the PID of the process attached to this handle -- how best to do that? In Mueval when I wanted the PID (so I could later send sigkills), I did this: hdl - runProcess

[Haskell-cafe] ANNOUNCE: apphointments - A simple functional calendar

2012-10-18 Thread Steffen Schuldenzucker
Dear Café, I just wrote myself a small (~ 200 LOC) calendar application today. https://bitbucket.org/rainmaker/apphointments Comments/Patches welcome. From the readme: apphointments - A simple functional calendar This is a UI = Code calendar

Re: [Haskell-cafe] Getting PID of a child process

2012-10-18 Thread Donn Cave
Quoth Jason Dusek jason.du...@gmail.com, Using `System.Process.runInteractiveProcess', I can start a process and get a handle to it: runInteractiveProcess :: FilePath - [String] - Maybe FilePath - Maybe [(String, String)] - IO (Handle, Handle, Handle, ProcessHandle)

Re: [Haskell-cafe] A yet another question about subtyping and heterogeneous collections

2012-10-18 Thread AntC
Roman Cheplyaka roma at ro-che.info writes: * Dmitry Vyal akamaus at gmail.com [2012-10-18 17:31:13+0400] On 10/18/2012 03:20 PM, MigMit wrote: Why do you need ALike x, BLike x etc.? Why not just Like u x? Hmm, looks like a nice idea. I tried it, unfortunately I can't cope with

[Haskell-cafe] acid-state audit trail

2012-10-18 Thread Richard Wallace
Hey all, I've been looking at acid-state as a possible storage backend for an application. It looks like it fits my needs pretty damn well, but one thing that I'm curious about is if it is possible to get a list of update events. You can obviously query for the current state, but it's not