Re: [Haskell-cafe] Problem with benchmarking FFI calls with Criterion
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? 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 involved? I removed unsafePerformIO, changed copy to have type Vector Double - IO (Vector Double) and modified benchmarks like this: bench C binding $ whnfIO (copy signal) I see no difference - one benchmark runs 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 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.github.com/4135698 ) in which C function copies a vector of doubles. I benchmark that function a couple of times. First run results in avarage time of about 17us, subsequent runs take about 45us. In my real code additional time was about 15us and it seemed to be a constant factor, not relative to correct run time. The surprising thing is that if my C function only allocates memory and does no copying: double* c_copy( double* inArr, int arrLen ) { double* outArr = malloc( arrLen * sizeof( double ) ); return outArr; } then all is well - all runs take similar amount of time. I also noticed that sometimes in my demo code all runs take about 45us, but this does not seem to happen in my real code - first run is always shorter. Does anyone have an idea what is going on? Janek ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Survey: What are the more common Haskell IDEs in use ?
I often use geany too 2012/11/24 Erik de Castro Lopo mle...@mega-nerd.com: Dan wrote: 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.com/s.asp?sid=oqr42h4jc8h0nbc53652 Any comments/suggestions are welcome. I use Geany which is not on the list. Erik -- -- Erik de Castro Lopo http://www.mega-nerd.com/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Survey: What are the more common Haskell IDEs in use ?
SublimeText is fine 2012/11/24 David Virebayre dav.vire+hask...@gmail.com I often use geany too 2012/11/24 Erik de Castro Lopo mle...@mega-nerd.com: Dan wrote: 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.com/s.asp?sid=oqr42h4jc8h0nbc53652 Any comments/suggestions are welcome. I use Geany which is not on the list. Erik -- -- Erik de Castro Lopo http://www.mega-nerd.com/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Best Timur DeTeam Amirov Moscow, Russia ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Survey: What are the more common Haskell IDEs in use ?
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.com/s.asp?sid=oqr42h4jc8h0nbc53652 Any comments/suggestions are welcome. (if any is missing, etc) Apologies for the add they show after you select the preferences - it is a free survey tool - i guess they have to live somehow too :) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Survey: What are the more common Haskell IDEs in use ?
Yes Janek, I will post the results in a few days/one week max, once we get enough data in. Dan --- On Sat, 11/24/12, Janek S. fremenz...@poczta.onet.pl wrote: From: Janek S. fremenz...@poczta.onet.pl Subject: Re: [Haskell-cafe] Survey: What are the more common Haskell IDEs in use ? To: haskell-cafe@haskell.org Cc: Dan dan_...@yahoo.com Date: Saturday, November 24, 2012, 1:14 AM 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.com/s.asp?sid=oqr42h4jc8h0nbc53652 Any comments/suggestions are welcome. (if any is missing, etc) Apologies for the add they show after you select the preferences - it is a free survey tool - i guess they have to live somehow too :) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Survey: What are the more common Haskell IDEs in use ?
At my workplace, most people who code in Haskell use MS Visual Studio as their Haskell IDE. :-) But they don't read Haskell-cafe... Regards, Malcolm On 24 Nov 2012, at 07:28, Dan wrote: Because I see there are many preferences on what IDE to use for Haskell I've created a quick survey on this topic. (if any is missing, etc) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANN: hledger-web 0.19.3
hledger-web now supports GHC 7.6 properly (no more Prelude.read: no parse error). Release notes: * fix Prelude.read: no parse errors with GHC = 7.6 * web lib refactoring, easier scripting/developing Thanks! -Simon hledger is a command-line tool and haskell library for tracking financial transactions, which are stored in a human-readable plain text format. In addition to reporting, it can also help you record new transactions, or convert CSV data from your bank. Add-on packages include hledger-web, a web interface. hledger is inspired by and compatible with John Wiegley's Ledger. For more, see http://hledger.org . Install it: cabal update; cabal install hledger-web For more installation help, see http://hledger.org/MANUAL.html#installing . Or, sponsor a ready-to-run binary for your platform: http://hledger.org/DOWNLOAD.html . ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] class Bytestringable or ToBytestring
On 11/23/2012 08:19 AM, Silvio Frischknecht wrote: i recently found the convertible package Thanks. quite a cool package, I'll probably use it in the future for some of my programs. Not sure that's appropriate for my cases unfortunately. -- Vincent ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] cabal isn't updating local doc index after local package upgrade
Haskell Platform 2012 v2.0.0, MacOS 64-bit. (MacOS 10.8.2.) I just used cabal to upgrade the installation of a local package I'm writing, and I'm still seeing the old version of the documentation in ~/Library/Haskell/doc/index.html. How can I fix this? In more detail: this machine had greek-1.0.1 installed, but I was working on another package that needed greek-1.1.0. So I went into the directory where I keep the source for the greek package, made sure it was up-to-date, and ran cabal clean cabal configure cabal build cabal install as my normal user, not as root. As far as I can tell, the rebuild was successful; cabal's output finished with Installing library in /Users/cobbe/Library/Haskell/ghc-7.4.1/lib/greek-1.1.0/lib Registering greek-1.1.0... Updating documentation index /Users/cobbe/Library/Haskell/doc/index.html However, when I open ~/Library/Haskell/doc/index.html in my browser, I still see the documentation for greek-1.0. The docs for the new version are present, in ~/Library/Haskell/ghc-7.4.1/lib/greek-1.1.0/doc, but they don't appear in the main index. Am I missing a step in the process, or is this a bug in cabal? Is there a workaround? I do have a couple of older versions of the greek package insatlled, because there doesn't seem to be an easy way to remove obsolete packages. Could they be causing problems? If so, what's the best way to delete them? (I don't particularly mind having the older versions hanging around, as long as they're actually harmless.) Thanks much, Richard ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Problem with benchmarking FFI calls with Criterion
I don't see such behavior neither.ubuntu 12.10, ghc 7.4.2. Perhaps this has to do with how malloc allocates /cachebehavior. If you try not to allocate array rather use existing one perhaps there would be no inconsistency?It looks to me that's about CPU cache performance. Branimir 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? 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 involved? I removed unsafePerformIO, changed copy to have type Vector Double - IO (Vector Double) and modified benchmarks like this: bench C binding $ whnfIO (copy signal) I see no difference - one benchmark runs 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 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.github.com/4135698 ) in which C function copies a vector of doubles. I benchmark that function a couple of times. First run results in avarage time of about 17us, subsequent runs take about 45us. In my real code additional time was about 15us and it seemed to be a constant factor, not relative to correct run time. The surprising thing is that if my C function only allocates memory and does no copying: double* c_copy( double* inArr, int arrLen ) { double* outArr = malloc( arrLen * sizeof( double ) ); return outArr; } then all is well - all runs take similar amount of time. I also noticed that sometimes in my demo code all runs take about 45us, but this does not seem to happen in my real code - first run is always shorter. Does anyone have an idea what is going on? Janek ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] cabal isn't updating local doc index after local package upgrade
This is filed as https://github.com/haskell/cabal/issues/1051 * Richard Cobbe co...@ccs.neu.edu [2012-11-24 12:43:55-0500] Haskell Platform 2012 v2.0.0, MacOS 64-bit. (MacOS 10.8.2.) I just used cabal to upgrade the installation of a local package I'm writing, and I'm still seeing the old version of the documentation in ~/Library/Haskell/doc/index.html. How can I fix this? In more detail: this machine had greek-1.0.1 installed, but I was working on another package that needed greek-1.1.0. So I went into the directory where I keep the source for the greek package, made sure it was up-to-date, and ran cabal clean cabal configure cabal build cabal install as my normal user, not as root. As far as I can tell, the rebuild was successful; cabal's output finished with Installing library in /Users/cobbe/Library/Haskell/ghc-7.4.1/lib/greek-1.1.0/lib Registering greek-1.1.0... Updating documentation index /Users/cobbe/Library/Haskell/doc/index.html However, when I open ~/Library/Haskell/doc/index.html in my browser, I still see the documentation for greek-1.0. The docs for the new version are present, in ~/Library/Haskell/ghc-7.4.1/lib/greek-1.1.0/doc, but they don't appear in the main index. Am I missing a step in the process, or is this a bug in cabal? Is there a workaround? I do have a couple of older versions of the greek package insatlled, because there doesn't seem to be an easy way to remove obsolete packages. Could they be causing problems? If so, what's the best way to delete them? (I don't particularly mind having the older versions hanging around, as long as they're actually harmless.) Thanks much, Richard ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Survey: What are the more common Haskell IDEs in use ?
I expected some IDEs will be missed but to add an other text box would have to pay for the survey - so went for the cheap version.. Not too familiar with this survey tool so if we add now VisStudio to it may delete the other answers (have over 100 answers so far) - so we'll add the VS option next time we run it (I assume they are a small number (?) ) --- On Sat, 11/24/12, Malcolm Wallace malcolm.wall...@me.com wrote: From: Malcolm Wallace malcolm.wall...@me.com Subject: Re: [Haskell-cafe] Survey: What are the more common Haskell IDEs in use ? To: Dan dan_...@yahoo.com Cc: haskell-cafe@haskell.org Date: Saturday, November 24, 2012, 1:22 AM At my workplace, most people who code in Haskell use MS Visual Studio as their Haskell IDE. :-) But they don't read Haskell-cafe... Regards, Malcolm On 24 Nov 2012, at 07:28, Dan wrote: Because I see there are many preferences on what IDE to use for Haskell I've created a quick survey on this topic. (if any is missing, etc) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] cabal isn't updating local doc index after local package upgrade
On Sat, Nov 24, 2012 at 08:37:31PM +0200, Roman Cheplyaka wrote: This is filed as https://github.com/haskell/cabal/issues/1051 Ah! Thanks for the pointer; I didn't know about that bug database. I'll watch that issue for further developments. * Richard Cobbe co...@ccs.neu.edu [2012-11-24 12:43:55-0500] Haskell Platform 2012 v2.0.0, MacOS 64-bit. (MacOS 10.8.2.) I just used cabal to upgrade the installation of a local package I'm writing, and I'm still seeing the old version of the documentation in ~/Library/Haskell/doc/index.html. How can I fix this? Richard ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] need help with understanding expression
Hi, Thanks for the clarification. This is clearly depravity. I am confused, in what sense this is depravity? Damodar On Sun, Nov 18, 2012 at 7:27 AM, Albert Y. C. Lai tre...@vex.net wrote: On 12-11-17 02:19 AM, damodar kulkarni wrote: Let's see tthis: Prelude :t 3 a 3 a :: (Num ([Char] - t)) = t No complaint from GHC; but now see this: Prelude :t a 3 interactive:1:0: Couldn't match expected type `t1 - t' against inferred type `[Char]' In the expression: a 3 Why does it not fail for (:t 3 a) but does fail for (:t a 3)? 3 is polymorphic, a is monomorphic (exactly [Char]). To make a polymorphic, turn on OverloadedStrings: :set -XOverloadedStrings :type a a :: Data.String.IsString a = a :type a 3 a 3 :: (Num a, Data.String.IsString (a - t)) = t Success! This is clearly depravity. __**_ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/**mailman/listinfo/haskell-cafehttp://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe