[Haskell-cafe] Can cabal be turned into a package manager?

2012-12-12 Thread Janek S.
In the recent months there was a lot of dicussion about cabal, dependency hell and alike. After reading some of these discussions there is a question I just have to ask: Why not create a package manager (like rpm or apt) for Haskell software? I've been using Linux for years. Software for Linux

Re: [Haskell-cafe] How to start with GHC development?

2012-12-12 Thread Janek S.
Dnia środa, 12 grudnia 2012, wren ng thornton napisał: > Other than that, it's hard to say. What part of the compiler are you > (most) interested in hacking on? The type system? The compilation down > to C-- and LLVM? The concurrency and parallelism? Debugging, testing, > and fuzzing? ... At the mo

Re: [Haskell-cafe] How to start with GHC development?

2012-12-11 Thread Janek S.
> One way to do that would be to have a page (wiki, perhaps) that has a > reading list for learning about GHC. Well, I think that GHC wiki has really decent commentary. I'm just not sure if reading it will be enough to get started (probably not). So guidance would be appreciated :) Janek _

[Haskell-cafe] How to start with GHC development?

2012-12-11 Thread Janek S.
Dear list, I would like to learn about internals of GHC and contribute to its development in the future. I read a couple of papers that give a very general overview of GHC (chapter from AoS, papers about inliner and multicore support) and I'm thinking what direction should I pursue now. I was

Re: [Haskell-cafe] Problem with benchmarking FFI calls with Criterion

2012-11-27 Thread Janek S.
Dnia wtorek, 27 listopada 2012, Gregory Collins napisał: > Did you pass the option to criterion asking it to do a GC between > trials? Yes. > You might be measuring a GC pause. > > On Tue, Nov 27, 2012 at 2:41 PM, Janek S. wrote: > > Dnia wtorek, 27 listopada 2012,

Re: [Haskell-cafe] Problem with benchmarking FFI calls with Criterion

2012-11-27 Thread Janek S.
frequency scaling and results are the same. Actually I doubt that 39us of benchmarking would cause CPU overheating with such repeatibility. Besides, this wouldn't explain why the first benchmark actually got faster. Janek > > On Nov 27, 2012 7:23 AM, "Janek S." wrote: > >

Re: [Haskell-cafe] Problem with benchmarking FFI calls with Criterion

2012-11-27 Thread Janek S.
the remaining benchmarks take almost two times longer. Janek Dnia niedziela, 25 listopada 2012, Janek S. napisał: > Well, it seems that this only happens on my machine. I will try to test > this code on different computer and see if I can reproduce it. > > I don't think using exi

Re: [Haskell-cafe] Problem with benchmarking FFI calls with Criterion

2012-11-25 Thread Janek S.
> > fast, rest slow" behavior. What version of GHC are you running? > > > > > > Edward > > > > > > Excerpts from Janek S.'s message of Fri Nov 23 13:42:03 -0500 2012: > > > > > What happens if you do the benchmark without unsafePerformIO > &g

Re: [Haskell-cafe] Survey: What are the more common Haskell IDEs in use ?

2012-11-24 Thread Janek S.
Will it be possible to see the results? Janek Dnia sobota, 24 listopada 2012, Dan napisał: > Because I see there are many preferences on what IDE to use for Haskell > I've created a quick survey on this topic. > > Please click here and select your choices from the lists. > > http://kwiksurveys.co

Re: [Haskell-cafe] Problem with benchmarking FFI calls with Criterion

2012-11-24 Thread Janek S.
I'm using GHC 7.4.2 on x86_64 openSUSE Linux, kernel 2.6.37.6. Janek Dnia piątek, 23 listopada 2012, Edward Z. Yang napisał: > Running the sample code on GHC 7.4.2, I don't see the "one > fast, rest slow" behavior. What version of GHC are you running? > > Edw

Re: [Haskell-cafe] Problem with benchmarking FFI calls with Criterion

2012-11-23 Thread Janek S.
fast, remaining ones run slow. Janek > > Excerpts from Janek S.'s message of Fri Nov 23 10:44:15 -0500 2012: > > I am using Criterion library to benchmark C code called via FFI bindings > > and I've ran into a problem that looks like a bug. > > > > The firs

[Haskell-cafe] Problem with benchmarking FFI calls with Criterion

2012-11-23 Thread Janek S.
I am using Criterion library to benchmark C code called via FFI bindings and I've ran into a problem that looks like a bug. The first benchmark that uses FFI runs correctly, but subsequent benchmarks run much longer. I created demo code (about 50 lines, available at github: https://gist.gith

Re: [Haskell-cafe] I killed performance of my code with Eval and Strategies

2012-11-17 Thread Janek S.
er than sequential version. Janek > > > 2012/11/15 Janek S. > > > > Do you really mean to calculate the 'sin . sqrt' of just the head of > > > the > > > > list, or do you mean: > > > calculateSeq = map (sin . sqrt) ? > > >

Re: [Haskell-cafe] I killed performance of my code with Eval and Strategies

2012-11-15 Thread Janek S.
it with a [Vector]. Then, run your sin.sqrt's on > each vector in parallel. Finally, use Data.Vector.concat to combine your > result. As stated in my post scriptum I am aware of that solution :) Here I'm trying to figure what am I doing wrong with Eval. Thanks! Janek > &

[Haskell-cafe] I killed performance of my code with Eval and Strategies

2012-11-14 Thread Janek S.
Dear Haskellers, I am reading Simon Marlow's tutorial on parallelism and I have problems with correctly using Eval monad and Strategies. I *thought* I understand them but after writing some code it turns out that obviously I don't because parallelized code is about 20 times slower. Here's a s

Re: [Haskell-cafe] How to determine correct dependency versions for a library?

2012-11-09 Thread Janek S.
> I usually just take the easy way out and switch to ==0.7. I see. I guess I don't yet have enough experience in Haskell to anticipate how restrictive is such a choice. Janek > > On Fri, Nov 9, 2012 at 11:31 AM, Janek S. wrote: > > Thanks Clark! You're method seems go

Re: [Haskell-cafe] How to determine correct dependency versions for a library?

2012-11-09 Thread Janek S.
&& <= 0.7 > > If someone uses a previous version of a library, and wants your library to > support it too (and, preferably, it works out of the box), they'll send a > pull request. > > That's what works for me. Maybe you could use it as a starting point to >

[Haskell-cafe] How to determine correct dependency versions for a library?

2012-11-09 Thread Janek S.
Recently I started developing a Haskell library and I have a question about package dependencies. Right now when I need my project to depend on some other package I only specify the package name in cabal file and don't bother with providing the package version. This works because I am the onl

[Haskell-cafe] Waiting for garbage collection can kill parallelism?

2012-11-09 Thread Janek S.
Today I was reading "Parallel Performance Tuning for Haskell" by Jones, Marlow and Singh and wanted to replicate the results for their first case study. The code goes like this: module Main where import Control.Parallel main :: IO () main = print . parSumFibEuler 38 $ 5300 parSumFibEuler :: I

Re: [Haskell-cafe] Announce: Haskell Platform 2012.4.0.0

2012-11-06 Thread Janek S.
Is there a timeline for including GHC 7.6 in the Platform? Janek Dnia wtorek, 6 listopada 2012, Mark Lentczner napisał: > I'm pleased to announce that Haskell Platform > 2012.4.0.0is > now available. > > This release contains three new packag

Re: [Haskell-cafe] Adding custom events to eventlog

2012-10-19 Thread Janek S.
That's what I was looking for. Thanks! Dnia piątek, 19 października 2012, Ben Gamari napisał: > "Janek S." writes: > > Dear list, > > > > I'm using ThreadScope to improve performance of my parallel program. It > > would be very helpful for me if I

[Haskell-cafe] Adding custom events to eventlog

2012-10-19 Thread Janek S.
Dear list, I'm using ThreadScope to improve performance of my parallel program. It would be very helpful for me if I could place custom things in eventlog (e.g. "now function x begins"). Is this possible? Janek ___ Haskell-Cafe mailing list Haskell-

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

2012-10-19 Thread Janek S.
Thank you very much Thomas. This is the kind of explanation I needed! Janek Dnia czwartek, 18 października 2012, Thomas Schilling napisał: > On 18 October 2012 13:15, Janek S. wrote: > >> Something like this might work, not sure what the canonical way is. > >> (...) >

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 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 ar

[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 inpu

[Haskell-cafe] Generating test data in QuickCheck

2012-10-15 Thread Janek S.
I'm writing tests using QuickCheck to test data types that are not an instance of QC's Arbitrary. To prevent orphan instances I use forAll function instead of instantiating these types as Arbitrary. The problems arise when I need to generate several different variables for one test. To do thi

Re: [Haskell-cafe] Image processing using Repa

2012-10-10 Thread Janek S.
> You do not have to use computeIntoP. You can just use computeP followed by > toForeignPtr (i don't remember the exact name for that and am on my phone > so it would be awkward to look up). So Repa can create the buffer for you. > Coincidentally, I didn't realize computeIntoP even existed, and I w

[Haskell-cafe] Image processing using Repa

2012-10-10 Thread Janek S.
I'm playing a bit with Repa library and its DevIL bindings. I tried to modify one of the examples from tutorial on HaskellWiki. I want to load an image, rotate it and save it to disk. I managed to write something like this: import Foreign.Ptr import System.Environment import Data.Array.Repa as

Re: [Haskell-cafe] Am I the only one having problems with RWH?

2012-10-06 Thread Janek S.
Dnia sobota, 6 października 2012, Mark Thom napisał: >Also, the functional pearl on applicative functors by Conor McBride and a >second > author (can't recall his name) blew the door open on the subject, for me. Good to hear, it's in front of me on the desk and I'm planning to finish that pearl t

[Haskell-cafe] Am I the only one having problems with RWH?

2012-10-06 Thread Janek S.
I began learning Haskell 9 months ago. I still consider myself a beginner, but I'm progressing towards more advanced concepts. I read scientific papers (simpler ones) and books about Haskell and functional programming. Right now I'm reading Pearls of Functional Algorithm Design, Introduction

Re: [Haskell-cafe] ANNOUNCE: test-framework-golden-1.1

2012-10-05 Thread Janek S.
> There are some technical advantages to SmallCheck (determinism, no need > to shrink etc.), but the main reason I prefer it is because it gives me > more confidence. With quickcheck, I know that it generated 100 tests, but > I've no idea what those tests are, and whether the RNG missed some > impo

Re: [Haskell-cafe] ANNOUNCE: test-framework-golden-1.1

2012-10-05 Thread Janek S.
> Cool, looking forward to reading it! Well, the post is already finished: http://ics.p.lodz.pl/~stolarek/blog/2012/10/code-testing-in-haskell/ I was just going to publish it and then your email came up on the list. > I hope you won't forget to cover SmallCheck in your article as well. > Being al

Re: [Haskell-cafe] ANNOUNCE: test-framework-golden-1.1

2012-10-05 Thread Janek S.
Talking about good timing - I was just finishing my post on code testing in Haskell when your announcement came up, so your library made it as a last minute news :) I never used golden approach to testing but it is good to know that it exists. *I* think that it might be a good idea to separet

Re: [Haskell-cafe] Creating Repa arrays from unboxed vectors

2012-10-04 Thread Janek S.
> so if it's waiting for a Vector from vector-0.9.1 it means Repa is > built against this version (which is not the latest on your computer > thus the problem). Yes, as I said the latest one is 0.10. Is there any way to sensibly manage this kind of dependencies (sensibly = without hidding package

Re: [Haskell-cafe] Creating Repa arrays from unboxed vectors

2012-10-04 Thread Janek S.
Thanks! > This makes it look like you've got two versions of vector installed, This is true, I have vector-0.9.1 and vector-0.10, but > with Repa built against the version that _isn't_ 0.9.1. this, I think, is not exactly correct: [root@GLaDOS : /dane/download] ghc-pkg field repa depends depends:

[Haskell-cafe] Creating Repa arrays from unboxed vectors

2012-10-04 Thread Janek S.
Dear list, I'm trying to create unboxed REPA array from unboxed Vector, but I keep getting this type error: ghci> :m + Data.Array.Repa ghci> :m + Data.Array.Repa.Repr.Unboxed ghci> :m + Data.Vector.Unboxed ghci> fromUnboxed Z (Data.Vector.Unboxed.singleton 1) :5:16: Couldn't match expected

[Haskell-cafe] Problems installing DPH

2012-10-03 Thread Janek S.
Dear list, I ran into problems when installing DPH examples: [root@GLaDOS : ~] cabal --global install dph-examples Resolving dependencies... Configuring dph-examples-0.6.1.3... Building dph-examples-0.6.1.3... Preprocessing executable 'dph-spectral-smvm' for dph-examples-0.6.1.3... [1 of 3] Compi

[Haskell-cafe] Can Haskell outperform C++?

2012-05-05 Thread Janek S.
Hi, a couple of times I've encountered a statement that Haskell programs can have performance comparable to programs in C/C++. I've even read that thanks to functional nature of Haskell, compiler can reason and make guarantess about the code and use that knowledge to automatically paralleliz