Re: [Haskell-cafe] Weird problem: Couldn't read cabal file "hashable/1.2.0.0/hashable.cabal"

2013-01-06 Thread Eugene Kirpichov
n, Jan 6, 2013 at 10:05 PM, Eugene Kirpichov wrote: > Couldn't read cabal file -- Eugene Kirpichov http://www.linkedin.com/in/eugenekirpichov http://jkff.info/software/timeplotters - my performance visualization tools ___ Haskell-Ca

[Haskell-cafe] Weird problem: Couldn't read cabal file "hashable/1.2.0.0/hashable.cabal"

2013-01-06 Thread Eugene Kirpichov
out. I just tried installing a fresh Ubuntu 12.04 onto a VM and I did not have this problem that he has. What additional information can I ask him for? Maybe somebody already encountered this problem? (Actually, I have a whole strace cabal install cabal-install, but it's 33Mb - I can upload it

[Haskell-cafe] Decent docs to my visualization tools

2012-12-27 Thread Eugene Kirpichov
:) Feedback and sharing would be very welcome. -- Eugene Kirpichov http://www.linkedin.com/in/eugenekirpichov ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Incremental regular expressions - article and library

2012-12-18 Thread Eugene Kirpichov
, for reasons explained in the article :) -- Eugene Kirpichov http://www.linkedin.com/in/eugenekirpichov ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

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

2012-11-30 Thread Eugene Kirpichov
fine. I can find no environment differences between the > machines. The app does not use a lot of memory, and the machine is not > running out of physical or swap. > > Regards, > > Malcolm > > > > > > On 04 Sep, 2012,at 04:01 PM, Eugene Kirpichov >

Re: [Haskell-cafe] Maximum bipartite matching: 24 lines

2012-10-22 Thread Eugene Kirpichov
no spam \ Abfallen > http://stefan-klinger.de > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > -- Eugene Kirpichov http://www.linkedin.com/in/eugenekirpichov We're hiring! http://tinyurl.com/mirantis-openstack-engineer ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

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

2012-10-19 Thread Eugene Kirpichov
rds, > Malcolm > > > On 04 Sep, 2012,at 04:01 PM, Eugene Kirpichov wrote: > > Hi Manish, > > Please provide the input file, I'll debug this. > > On Mon, Sep 3, 2012 at 1:06 PM, Manish Trivedi wrote: >> Hi, >> >> I am running into a weird out of

Re: [Haskell-cafe] 64-bit vs 32-bit haskell platform on Mac: misleading notice on Platform website?

2012-10-11 Thread Eugene Kirpichov
uld find out the defaults for those systems, or how to establish what > their system is using. > > Finally, I note that HP 2012.4.0.0 (out in a month) will ship with GHC > 7.4.2, and so will still have the above bugs. > > - Mark > > > _

Re: [Haskell-cafe] 64-bit vs 32-bit haskell platform on Mac: misleading notice on Platform website?

2012-10-08 Thread Eugene Kirpichov
oing on, so if anyone has any pointers on how to make >> sure ghci behaves the same in gdb please let me know. > > Could you please file a bug report at: > > http://hackage.haskell.org/trac/ghc/ > > Thanks! > > ___ >

[Haskell-cafe] 64-bit vs 32-bit haskell platform on Mac: misleading notice on Platform website?

2012-09-25 Thread Eugene Kirpichov
site direction. Wouldn't it be appropriate to remove this notice and ask people to use the 64-bit version unless they have a specific reason not to? -- Eugene Kirpichov http://www.linkedin.com/in/eugenekirpichov We're hiring! http:/

Re: [Haskell-cafe] Choosing color of the track

2012-09-18 Thread Eugene Kirpichov
nse time. I know > TimePlot wiki has quantile example but I havent been able to successfully > use it. > > Regards, > -Manish > > > On Tue, Sep 18, 2012 at 10:48 AM, Eugene Kirpichov > wrote: >> >> Hi Manish, >> >> The meaning of "@" is not

Re: [Haskell-cafe] Choosing color of the track

2012-09-18 Thread Eugene Kirpichov
7; > > I cant get to print plots in different color. Could anyone point out what am > I doing wrong? > > Thanks, > Manish > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinf

Re: [Haskell-cafe] Choosing color of the track

2012-09-17 Thread Eugene Kirpichov
Hi, I'm the author and I'll reply tomorrow, sorry, going to sleep now :) thanks for the interest in the tools anyway! 17.09.2012, в 21:40, Manish Trivedi написал(а): > Hi Folks, > > I am trying to plot two tracks with different colors. > Following is my input file, > > -- > 2012-09-18

Re: [Haskell-cafe] Help a young graduate haskeller to land its dream job

2012-09-12 Thread Eugene Kirpichov
pare/improve myself for the foreseeable future. > > Thanks again, > and sorry for the OT/spammish plug. > > Humbly, > Alfredo Di Napoli > > _______ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.

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

2012-09-04 Thread Eugene Kirpichov
> tplot: user error (out of memory) > > real0m0.026s > user0m0.018s > sys0m0.008s > > -Manish > > _______ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > -- Eu

Re: [Haskell-cafe] wondering about a MonadIO instance for a heap data type

2012-07-11 Thread Eugene Kirpichov
nto Debug.Trace. Thanks for your hint. > > Qi > > > On Wednesday, July 11, 2012 5:28:17 PM UTC-5, Eugene Kirpichov wrote: >> >> Use Debug.Trace. >> It does not make sense to declare that heap is a monad, as a monad is an >> abstraction of sequencing computatio

Re: [Haskell-cafe] wondering about a MonadIO instance for a heap data type

2012-07-11 Thread Eugene Kirpichov
Use Debug.Trace. It does not make sense to declare that heap is a monad, as a monad is an abstraction of sequencing computations, and a heap is not an abstraction of sequencing computations at all. You don't make your String class implement the "rendering engine" interface just because you want

Re: [Haskell-cafe] How to select n random words from a file ...

2012-06-10 Thread Eugene Kirpichov
> ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe -- Eugene Kirpichov Principal Engineer, Mirantis Inc. http://www.mirantis.com/ Editor, http://fprog.ru/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Finding the average in constant space

2012-05-27 Thread Eugene Kirpichov
A lot of people have done this :) eg from me: google up a fairly recent thread from me about processing streams and perhaps the keyword "timeplot" (writing from a dying phone, can't do myself) 27.05.2012, в 12:04, Chris Wong написал(а): > Hello all > > I just came up with a way of executing

Re: [Haskell-cafe] Google Summer of Code - Lock-free data structures

2012-03-29 Thread Eugene Kirpichov
; memory? Both are lock-free? Is it possible to implement every data structure > based on CAS in terms of STM? What are the drawbacks? The other way round? > > > Best regards, > Heinrich Apfelmus > > -- > http://apfelmus.nfshost.com > > > _

Re: [Haskell-cafe] Inject cabal version or VCS version as a CPP macro

2012-02-22 Thread Eugene Kirpichov
On Wed, Feb 22, 2012 at 2:57 PM, Herbert Valerio Riedel wrote: > Eugene Kirpichov writes: > > > It can be used like this: > > > > {-# LANGUAGE TemplateHaskell #-} > > import Distribution.VcsRevision.Git > > import Language.Haskell.TH.Syntax

Re: [Haskell-cafe] Inject cabal version or VCS version as a CPP macro

2012-02-22 Thread Eugene Kirpichov
showMyGitVersion = $(do v <- qRunIO getRevision lift $ case v of Nothing -> "" Just (hash,True) -> hash ++ " (with local modifications)" Just (hash,False) -> hash) On Wed, Feb 22, 2012 at 2:26 PM, Herbert Valerio Riedel wrote: > Hi, >

Re: [Haskell-cafe] Inject cabal version or VCS version as a CPP macro

2012-02-22 Thread Eugene Kirpichov
lift $ case cs of >x:_ -> x >[] -> "unknown") > > On Wed, Feb 22, 2012 at 10:37 AM, Eugene Kirpichov > wrote: > > Thanks, this is exactly what I was looking for! > > > > I might look some mo

Re: [Haskell-cafe] Inject cabal version or VCS version as a CPP macro

2012-02-22 Thread Eugene Kirpichov
; > Can Cabal expose the version as a preprocessor macro by default, or do I > > have to use Build-Type: Custom and add a preprocessing step of my own? > -- Eugene Kirpichov Principal Engineer, Mirantis Inc. http://www.mirantis.com/ Editor, http://fprog.ru/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Inject cabal version or VCS version as a CPP macro

2012-02-22 Thread Eugene Kirpichov
step of my own? -- Eugene Kirpichov Principal Engineer, Mirantis Inc. http://www.mirantis.com/ Editor, http://fprog.ru/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Hierarchical tracing for debugging laziness

2012-01-25 Thread Eugene Kirpichov
Thanks! I released it: http://hackage.haskell.org/package/htrace http://github.com/jkff/htrace On Wed, Jan 25, 2012 at 4:18 AM, Felipe Almeida Lessa < felipe.le...@gmail.com> wrote: > Really nice! Looks like it could be a useful mini-package on Hackage. > > -- > Felip

[Haskell-cafe] Hierarchical tracing for debugging laziness

2012-01-24 Thread Eugene Kirpichov
6 7 8 9 10 55 (reload) *HTrace> s2 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 55 -- Eugene Kirpichov Principal Engineer, Mirantis Inc. http://www.mirantis.com/ Editor, http://fprog.ru/ _

Re: [Haskell-cafe] Natural Transformations and fmap

2012-01-23 Thread Eugene Kirpichov
Have you tried generating a free theorem for :-> ? (I haven't as I'm writing from my phone) 24.01.2012, в 9:06, Ryan Ingram написал(а): > On Mon, Jan 23, 2012 at 8:05 PM, Daniel Fischer > wrote: > On Tuesday 24 January 2012, 04:39:03, Ryan Ingram wrote: > > At the end of that paste, I prove

[Haskell-cafe] Is there a way to do *allocation* profiling with a breakdown by type?

2012-01-19 Thread Eugene Kirpichov
Hi, I've got a program that seems to spend much of its time allocating short-lived objects, which therefore don't show up in +RTS -hy or alike. Is there a way to get a breakdown by type of the objects that are being *allocated* but not necessarily retained (disappear after gen0)?

Re: [Haskell-cafe] Encouraging performance with ghc 7.4

2012-01-18 Thread Eugene Kirpichov
oductivity 85.3% of total user, 82.3% of total elapsed On Wed, Jan 18, 2012 at 8:22 PM, Eugene Kirpichov wrote: > Hi cafe, > > Just wanted to inform you that I've been benchmarking my compute-intensive > stuff on ghc 7.0.4 vs 7.4.0, and 7.4.0 gave a large speedup - one program &

[Haskell-cafe] Encouraging performance with ghc 7.4

2012-01-18 Thread Eugene Kirpichov
MUT time2.03s ( 2.28s elapsed) GC time0.21s ( 0.23s elapsed) EXITtime0.00s ( 0.00s elapsed) Total time2.26s ( 2.51s elapsed) %GC time 9.3% (9.1% elapsed) Alloc rate1,056,397,390 bytes per MUT second Productivity 90.7% of total user,

Re: [Haskell-cafe] __GLASGOW_HASKELL__ for GHC 7.4

2012-01-17 Thread Eugene Kirpichov
My bad, it *should* really be 704. http://www.haskell.org/ghc/docs/latest/html/users_guide/options-phases.html#c-pre-processor On Tue, Jan 17, 2012 at 3:35 PM, Eugene Kirpichov wrote: > Hi, > > I'm fixing a build error in a package that depends on the RTS API, which > changed

[Haskell-cafe] __GLASGOW_HASKELL__ for GHC 7.4

2012-01-17 Thread Eugene Kirpichov
Hi, I'm fixing a build error in a package that depends on the RTS API, which changed in 7.4, using #if __GLASGOW_HASKELL__ >= 740. However, build log shows that __GLASGOW_HASKELL__ is still 704, not 740 as I'd expect. Is this a bug? -- Eugene Kirpichov Principal Engineer, Miran

Re: [Haskell-cafe] GHC exceeding command line length limit with split-objs - and a possible fix

2012-01-11 Thread Eugene Kirpichov
for myself, as it's easier to do and I'd then quicker become able to build my application with split-objs and shrink its executable size from 11 to 2Mb) On Wed, Jan 11, 2012 at 9:48 PM, Brandon Allbery wrote: > On Wed, Jan 11, 2012 at 02:12, Eugene Kirpichov wrote: > >> I thi

Re: [Haskell-cafe] GHC exceeding command line length limit with split-objs - and a possible fix

2012-01-11 Thread Eugene Kirpichov
gt; > 4 on top of an existing XCode 3 installation. > > GCC 4.6.2 builds on OS X 10.7 with Xcode 4.2. Build GMP 5.0.2 with clang, > and then GCC with /usr/bin/gcc -> llvm-gcc-4.2. I think I saw someone guild > GCC 4.7, but this is highest stable. > > Hans > > >> From

Re: [Haskell-cafe] GHC exceeding command line length limit with split-objs - and a possible fix

2012-01-10 Thread Eugene Kirpichov
Oh well... looks like building ghc won't be easy, as it doesn't build with llvm-gcc and it's not easy to get a "real" gcc on Lion. But I don't stop trying :) On Wed, Jan 11, 2012 at 11:12 AM, Eugene Kirpichov wrote: > Hi, > > I'm building gtk2hs on a m

[Haskell-cafe] GHC exceeding command line length limit with split-objs - and a possible fix

2012-01-10 Thread Eugene Kirpichov
a file - gcc @file - and write overly long option strings into temp files. It'd be fun for me to implement this as my first contribution to ghc; is this a good idea in general? -- Eugene Kirpichov Principal Engineer, Mirantis Inc. http://www.mi

[Haskell-cafe] All the random packages

2012-01-07 Thread Eugene Kirpichov
g to which ones will bring the community the most benefit? Is there any effort on unifying them going on? -- Eugene Kirpichov Principal Engineer, Mirantis Inc. http://www.mirantis.com/ Editor, http://fprog.ru/ ___ Haskell-Cafe mailing list Haskell-Cafe@h

Re: [Haskell-cafe] Type class for sequences with dependent types

2012-01-05 Thread Eugene Kirpichov
Will this help? data List a b where List :: [a] -> List a a 05.01.2012, в 17:12, Robbert Krebbers написал(а): > Hello, > > in a Haskell development I have to represent paths that have elements of > alternating types. GADTs allow me to do this easily: > > data AltList :: * -> * -> * wher

Re: [Haskell-cafe] Reifying case expressions [was: Re: On stream processing, and a new release of timeplot coming]

2011-12-26 Thread Eugene Kirpichov
On Tue, Dec 27, 2011 at 7:23 AM, Sebastian Fischer wrote: > 2011/12/26 Eugene Kirpichov > >> Whoa. Sebastian, you're my hero — I've been struggling with defining >> Arrow for ListTransformer for a substantial time without success, and here >> you got it, dram

Re: [Haskell-cafe] Reifying case expressions [was: Re: On stream processing, and a new release of timeplot coming]

2011-12-26 Thread Eugene Kirpichov
Whoa. Sebastian, you're my hero — I've been struggling with defining Arrow for ListTransformer for a substantial time without success, and here you got it, dramatically simpler than I thought it could be done (I was using explicit queues). I wonder if now this datatype of yours is isomorphic to

[Haskell-cafe] Convert Double to Data.Fixed

2011-12-26 Thread Eugene Kirpichov
0)) / fromIntegral 100, but this frankly sucks and is rather slow, there must be a better way. -- Eugene Kirpichov Principal Engineer, Mirantis Inc. http://www.mirantis.com/ Editor, http://fprog.ru/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Reifying case expressions [was: Re: On stream processing, and a new release of timeplot coming]

2011-12-26 Thread Eugene Kirpichov
2011/12/26 Gábor Lehel > On Sun, Dec 25, 2011 at 9:19 PM, Eugene Kirpichov > wrote: > > Hello Heinrich, > > > > Thanks, that's sure some food for thought! > > > > A few notes: > > * This is indeed analogous to Iteratees. I tried doing the same wit

Re: [Haskell-cafe] Reifying case expressions [was: Re: On stream processing, and a new release of timeplot coming]

2011-12-25 Thread Eugene Kirpichov
On Mon, Dec 26, 2011 at 12:19 AM, Eugene Kirpichov wrote: > Hello Heinrich, > > Thanks, that's sure some food for thought! > > A few notes: > * This is indeed analogous to Iteratees. I tried doing the same with > Iteratees but failed, so I decided to put together so

Re: [Haskell-cafe] Reifying case expressions [was: Re: On stream processing, and a new release of timeplot coming]

2011-12-25 Thread Eugene Kirpichov
o you don't need functions of the form (forall r . ListTo a r -> ListTo b r) - you just need (ListTo b [a]). This is a revelation for me. On Sun, Dec 25, 2011 at 2:25 PM, Heinrich Apfelmus < apfel...@quantentunnel.de> wrote: > Eugene Kirpichov wrote: > >> In the last couple

Re: [Haskell-cafe] book.realworldhaskell.org is down

2011-12-24 Thread Eugene Kirpichov
Thanks. Now it's working - it wasn't at the moment of my email. On Sun, Dec 25, 2011 at 11:21 AM, Tom Murphy wrote: > realworldhaskell.org/book > On Dec 25, 2011 1:46 AM, "Eugene Kirpichov" wrote: > >> See subject. >> Is this expected? >>

Re: [Haskell-cafe] strict, lazy, non-strict, eager

2011-12-24 Thread Eugene Kirpichov
Thanks, this makes sense. On Sun, Dec 25, 2011 at 10:03 AM, Dan Doel wrote: > On Sun, Dec 25, 2011 at 12:14 AM, Eugene Kirpichov > wrote: > > On Sat, Dec 24, 2011 at 10:49 PM, Dan Doel wrote: > >> I think it's good to be clear on all these specifics, and people c

Re: [Haskell-cafe] strict, lazy, non-strict, eager

2011-12-24 Thread Eugene Kirpichov
rning the distinctions by osmosis. > > -- Dan > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > -- Eugene Kirpichov Principal Engineer, Mirantis Inc. http://www.mirantis.com/ Editor, http://fprog.ru/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Parallel Karatsuba - A Weird speed up value greater than 4 on an Intel Quadcore CPU!

2011-12-24 Thread Eugene Kirpichov
I mean exactly 2x one cores cache size of course. 24.12.2011, в 20:06, Eugene Kirpichov написал(а): > If the cache was infinitely faster, then doubling it would give an infinite > speedup for an algorithm whose working set was exactly one core's cache size. > > > &

Re: [Haskell-cafe] Parallel Karatsuba - A Weird speed up value greater than 4 on an Intel Quadcore CPU!

2011-12-24 Thread Eugene Kirpichov
If the cache was infinitely faster, then doubling it would give an infinite speedup for an algorithm whose working set was exactly one core's cache size. 24.12.2011, в 19:58, Burak Ekici написал(а): > > First of all, thanks a lot for your quick answer! > However, the question is what are the

Re: [Haskell-cafe] Parallel Karatsuba - A Weird speed up value greater than 4 on an Intel Quadcore CPU!

2011-12-24 Thread Eugene Kirpichov
Well, assume that cache is x times faster than main memory and that the hot working set size is y, and cache size of one core is z, and that the algorithm is really bound by memory access. Then some simple math should give the answer :) I can't do it myself now as I don't have a pen and paper at

Re: [Haskell-cafe] Parallel Karatsuba - A Weird speed up value greater than 4 on an Intel Quadcore CPU!

2011-12-24 Thread Eugene Kirpichov
Superlinear speedup can occur due to the increased cache size. 24.12.2011, в 19:49, Burak Ekici написал(а): > Dear List, > > I am trying to parallelize Karatsuba multiplication with Haskell's > second generation strategies. Although, I am running the code on an > Intel quad-core CPU, I abnor

Re: [Haskell-cafe] strict, lazy, non-strict, eager

2011-12-24 Thread Eugene Kirpichov
dantry! > > Scare on! > > Murray Campbell > > > _______ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > -- Eugene Kirpichov Principal Engineer, Mirantis Inc.

[Haskell-cafe] On stream processing, and a new release of timeplot coming

2011-12-23 Thread Eugene Kirpichov
nteresting functions in that file - e.g. edges2eventsSummary, which applies a summary over a stream of "long" events to a stream of rise/fall edges. This means that you can define a "stream transformer" (Stream a -> Stream b) as a function (StreamSummary b -> StreamSummary a), which can

[Haskell-cafe] Drawing charts over a lot of data

2011-11-21 Thread Eugene Kirpichov
to an existing package (I didn't find one on hackage) or if someone expressed interest in making Chart avoid having the whole input in memory. -- Eugene Kirpichov Principal Engineer, Mirantis Inc. http://www.mirantis.com/ Editor, http://fprog.ru/ ___

Re: [Haskell-cafe] Ridiculously slow FFI, or cairo binding?

2011-11-11 Thread Eugene Kirpichov
Hi Axel, When do you expect to publish an updated version of gtk2hs on hackage? On Thu, Nov 3, 2011 at 1:02 PM, Eugene Kirpichov wrote: > Hi, > The actual thanks for tracking this down go to Vincent Hanquez for finding > that we're doing a lot of gmp calls (and for making me a

Re: [Haskell-cafe] Ridiculously slow FFI, or cairo binding?

2011-11-03 Thread Eugene Kirpichov
made in my copy. On Thu, Nov 3, 2011 at 11:41 AM, Axel Simon wrote: > Hi Eugene, > > > On 02.11.2011, at 17:34, Eugene Kirpichov wrote: > > Heh. >> >> Guess what! >> A simple {-# INLINE cFloatConv #-} helped to the same extent! >> >> Axel, I think

Re: [Haskell-cafe] Fwd: Ridiculously slow FFI, or cairo binding?

2011-11-02 Thread Eugene Kirpichov
Thanks! I'll definitely consider your library in the future, but for now, as we can see, there's no necessity in rewriting cFloatConv at all - {-# INLINE #-} suffices :) On Thu, Nov 3, 2011 at 3:30 AM, wren ng thornton wrote: > On 11/2/11 7:14 AM, Eugene Kirpichov wrote: &

Re: [Haskell-cafe] Ridiculously slow FFI, or cairo binding?

2011-11-02 Thread Eugene Kirpichov
ations. > > I don't think it's going to make any difference, as the core already > have an specialized poor version.  See my first e-mail. > > -- > Felipe. > -- Eugene Kirpichov Principal Engineer, Mirantis Inc. http://www.mirantis.com/ Editor, http://fprog.ru/

Re: [Haskell-cafe] Ridiculously slow FFI, or cairo binding?

2011-11-02 Thread Eugene Kirpichov
pragma? It is part of the Haskell 98 and > Haskell 2010 specifications. > > On 02.11.2011, at 12:14, Eugene Kirpichov wrote: > > > Yay!!! > > > > I made a small change in Types.chs and got my original > cairo-binding-based program to be just as blazing fast. The

Re: [Haskell-cafe] Fwd: Ridiculously slow FFI, or cairo binding?

2011-11-02 Thread Eugene Kirpichov
Sorry for re-sending, my previous attempt got ignored by gtk2hs-devel mailing list as I wasn't subscribed. Now I am. On Wed, Nov 2, 2011 at 3:14 PM, Eugene Kirpichov wrote: > Yay!!! > > I made a small change in Types.chs and got my original cairo-binding-based > program to b

Re: [Haskell-cafe] Fwd: Ridiculously slow FFI, or cairo binding?

2011-11-02 Thread Eugene Kirpichov
ble Float where cFloatConv = double2Float and replaced a couple of constraints in functions below by usage of CFloatConv. On Wed, Nov 2, 2011 at 2:25 PM, Felipe Almeida Lessa wrote: > +gtk2hs-devel > > On Wed, Nov 2, 2011 at 8:15 AM, Eugene Kirpichov > wrote: > > Any idea

Re: [Haskell-cafe] Ridiculously slow FFI, or cairo binding?

2011-11-02 Thread Eugene Kirpichov
Any idea how to debug why all the GMP calls? I'm looking at even the auto-generated source for cairo bindings, but I don't see anything at all that could lead to *thousands* of them. On Wed, Nov 2, 2011 at 2:14 PM, Vincent Hanquez wrote: > On 11/02/2011 10:10 AM, Eugene Kirpichov w

Re: [Haskell-cafe] Ridiculously slow FFI, or cairo binding?

2011-11-02 Thread Eugene Kirpichov
+gtk2hs-users On Wed, Nov 2, 2011 at 2:10 PM, Eugene Kirpichov wrote: > Oh. This is pretty crazy, I wonder what they're doing with GMP so much... > > I modified the Haskell program to use cairo directly, even with safe > calls, and it now takes the same time as the C program.

Re: [Haskell-cafe] Ridiculously slow FFI, or cairo binding?

2011-11-02 Thread Eugene Kirpichov
te 0 1024 768 cr <- cairo_create s cairo_set_source_rgb cr 0 255 0 forM_ [0,2..1024] $ \x -> do forM_ [0,2..768] $ \y -> do cairo_rectangle cr x y 1 1 cairo_fill cr pic <- newCString "picture.png" cairo_surface_write_to_png s pic On Wed, Nov 2, 2011 at

Re: [Haskell-cafe] Ridiculously slow FFI, or cairo binding?

2011-11-02 Thread Eugene Kirpichov
lp the case at all, even though the core changed FFI calls from "__pkg_ccall_GC" to "__pkg_ccall". The performance stayed the same; the overhead is elsewhere. On Wed, Nov 2, 2011 at 1:31 PM, Claude Heiland-Allen wrote: > On 02/11/11 09:17, Eugene Kirpichov wrote: > >&

Re: [Haskell-cafe] Ridiculously slow FFI, or cairo binding?

2011-11-02 Thread Eugene Kirpichov
dozen seconds drawing. On Wed, Nov 2, 2011 at 1:17 PM, Eugene Kirpichov wrote: > Hello, > > I've got two very simple programs that draw a very simple picture using > cairo, doing a couple hundred thousand of cairo calls. > One program is in C++. The other is in Haskell and us

[Haskell-cafe] Ridiculously slow FFI, or cairo binding?

2011-11-02 Thread Eugene Kirpichov
forM_ [0,2..1024] $ \x -> do forM_ [0,2..768] $ \y -> do C.rectangle x y 1 1 C.fill C.surfaceWriteToPNG s "picture.png" -- Eugene Kirpichov Principal Engineer, Mirantis Inc. http://www.mirantis.com/ Editor, http://fprog.ru/ __

Re: [Haskell-cafe] lazy A-star search

2011-10-30 Thread Eugene Kirpichov
Anton, I think the mapM inside searchBy is incorrect. You're threading state between exploration of different branches, which you I think shouldn't be doing. 30.10.2011, в 19:44, Anton Kholomiov написал(а): > I'm misunderstanding astar. I've thought that 'whole route'-heuristic > will preven

Re: [Haskell-cafe] When does the UNPACK pragma work?

2011-10-28 Thread Eugene Kirpichov
On Fri, Oct 28, 2011 at 2:32 PM, Daniel Fischer < daniel.is.fisc...@googlemail.com> wrote: > On Friday 28 October 2011, 11:57:54, Eugene Kirpichov wrote: > > Another question: Can I unpack some fields in a record and not unpack > > others? > > Yes, no problem with t

Re: [Haskell-cafe] When does the UNPACK pragma work?

2011-10-28 Thread Eugene Kirpichov
Another question: Can I unpack some fields in a record and not unpack others? Does their order matter then? On Fri, Oct 28, 2011 at 1:57 PM, Eugene Kirpichov wrote: > Oh, I see, thanks! > > So then, I guess, the solution would be to use a fixed-precision integer > type instead. >

Re: [Haskell-cafe] When does the UNPACK pragma work?

2011-10-28 Thread Eugene Kirpichov
Oh, I see, thanks! So then, I guess, the solution would be to use a fixed-precision integer type instead. On Fri, Oct 28, 2011 at 1:54 PM, Daniel Fischer < daniel.is.fisc...@googlemail.com> wrote: > On Friday 28 October 2011, 11:41:15, Eugene Kirpichov wrote: > > newtype Day = Mo

[Haskell-cafe] When does the UNPACK pragma work?

2011-10-28 Thread Eugene Kirpichov
ion of data constructor `UTCTime' In the data type declaration for `UTCTime' -- Eugene Kirpichov Principal Engineer, Mirantis Inc. http://www.mirantis.com/ Editor, http://fprog.ru/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Cross-compilation x64 -> x86 easier under Ubuntu 11.10 with multiarch?

2011-10-13 Thread Eugene Kirpichov
Hi cafe, Ubuntu 11.10 has been released, which includes support for "multiarch" https://wiki.ubuntu.com/MultiarchSpec Am I right that this will facilitate compiling Haskell code into x86 binaries on an x64 machine? -- Eugene Kirpichov Principal Engineer, Mirantis Inc. http://www.mi

[Haskell-cafe] Packaged my log visualization tools

2011-09-16 Thread Eugene Kirpichov
(i386), require gtk2.0, gmp3, libc6. http://jkff.info/software/timeplotters-0.1-1_amd64.tar.gz *nix binaries (amd64), require gtk2.0, gmp3, libc6. -- Eugene Kirpichov Principal Engineer, Mirantis Inc. http://www.mirantis.com/ Editor, http://fprog.ru/ ___ Ha

Re: [Haskell-cafe] regex-applicative library needs your help! (algorithmic challenge)

2011-09-13 Thread Eugene Kirpichov
there's some clever trick I don't > know). > > [1]: http://swtch.com/~rsc/regexp/regexp3.html > > -- > Roman I. Cheplyaka :: http://ro-che.info/ > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org >

[Haskell-cafe] alex 3.0 broken with Data.ByteString.Lazy - w2c conversion missing (fix attached)

2011-08-09 Thread Eugene Kirpichov
Data/ByteString/Lex{,/Lazy} and try ghci'ing to them, doing the modification I did and ghci'ing again. -- Eugene Kirpichov Principal Engineer, Mirantis Inc. http://www.mirantis.com/ Editor, http://fprog.ru/ wrappers.hs Description: Binary data _

Re: [Haskell-cafe] Analyzing slow performance of a Haskell program

2011-08-07 Thread Eugene Kirpichov
Prim.Int# >>                :: GHC.Types.Int ~ GHC.Prim.Int#); >>      0 -> 0; >>      1 -> 3; >>      2 -> 6; >>      3 -> 6; >>      4 -> 5; >>      5 -> 5; >>      6 -> 5; >>      7 -> 7; >>      8 -> 6; >&

Re: [Haskell-cafe] pointer equality

2011-07-19 Thread Eugene Kirpichov
reallyUnsafePointerEq#, and it really is as unsafe as it sounds :) 20.07.2011, в 7:51, "Nikhil A. Patil" написал(а): > Hi, > > Is there any way of getting the following code to immediately return > True without performing the element-by-element comparison? Essentially > this boils down to che

Re: [Haskell-cafe] Haskell fgl example

2011-07-19 Thread Eugene Kirpichov
rding the same. > > > -- > Rohit > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > > -- Eugene Kirpichov Principal Engineer, Mirantis Inc. http

Re: [Haskell-cafe] Patterns for processing large but finite streams

2011-07-01 Thread Eugene Kirpichov
i laggedInput = li Nothing where li maybePrev = Yield (maybe2list maybePrev) $ Just $ maybe empty (li . Just) Looks like this can be made into an instance of Arrow and can be composed etc. 2011/7/1 Heinrich Apfelmus : > Eugene Kirpichov wrote: >>>> >>>> Plain old lazy

Re: [Haskell-cafe] Patterns for processing large but finite streams

2011-07-01 Thread Eugene Kirpichov
Thanks but I'm afraid that's still not quite what I'm looking for; guess I'll have to define my desire by my implementation - so once it's ready I'll show the result to cafe :) 2011/7/1 Alexey Khudyakov : > On Fri, Jul 1, 2011 at 12:54 PM, Eugene Kirpichov >

Re: [Haskell-cafe] Patterns for processing large but finite streams

2011-07-01 Thread Eugene Kirpichov
Alexey, your definition of "mean" does not look like "liftS2 (/) sum length" - you have to manually "fuse" these computations. I'm asking for a formalism that does this fusion automatically (and guaranteedly). 2011/7/1 Alexey Khudyakov : > On Fri, Jul

Re: [Haskell-cafe] Patterns for processing large but finite streams

2011-07-01 Thread Eugene Kirpichov
ace : > Sure you can. > > runningAverage :: Int -> [Double] -> [Double] > runningAverage n xs = let chunk = take n xs >                      in (sum chunk / length chunk) : runningAverage (tail xs) > > Lazy lists are absolutely ideal for this purpose. > Regards, >    Malcol

Re: [Haskell-cafe] Patterns for processing large but finite streams

2011-06-30 Thread Eugene Kirpichov
Plain old lazy lists do not allow me to combine multiple concurrent computations, e.g. I cannot define average from sum and length. 2011/7/1 Heinrich Apfelmus : > Eugene Kirpichov wrote: >> >> I'm rewriting timeplot to avoid holding the whole input in memory, and >>

[Haskell-cafe] Patterns for processing large but finite streams

2011-06-30 Thread Eugene Kirpichov
mbers * Given a stream of numbers with times, split it into buckets by time of given width and produce a stream of (bucket, 50%,75% and 90% quantiles in this bucket) * Sum a stream of numbers Is this, perhaps, what comonads are for? Or iteratees? -- Eugene Kirpichov Principal Engineer, Mirantis Inc.

Re: [Haskell-cafe] Conditional IO ?

2011-06-20 Thread Eugene Kirpichov
> Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > > -- Eugene Kirpichov Principal Engineer, Mirantis Inc. http://www.mirantis.com/ Editor, http://fprog.ru/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Errors installing 'Haskell Charts'

2011-06-10 Thread Eugene Kirpichov
gtk-0.12.0 depends on glib-0.12.0 which failed to install. > pango-0.12.0 depends on glib-0.12.0 which failed to install. > > > Where to get glib-0.12.0 ? > > Thanks! > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell

Re: [Haskell-cafe] Installing Gtk2Hs on Win32

2011-06-10 Thread Eugene Kirpichov
them into a directory without > spaces. > [/quote] > > This link (http://www.gtk.org/download-windows.html) is dead. > Where to get pre-compiled binary libraries of Gtk+ ? > > Thanks! > > ___ > Haskell-Cafe mailing list >

Re: [Haskell-cafe] *GROUP HUG*

2011-05-24 Thread Eugene Kirpichov
l-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > -- Eugene Kirpichov Principal Engineer, Mirantis Inc. http://www.mirantis.com/ Editor, http://fprog.ru/ ___ Haskell-Cafe mailing list Ha

Re: [Haskell-cafe] Markov chain algorithm (from "The Practice of Programming", Kernighan/Pike)

2011-05-11 Thread Eugene Kirpichov
ment of `insertWith', namely `(:)' > In the expression: > insertWith > (:) > ("Moby", "Dick") > "will" > (fromList [(("Joe", "Blow"), ["is"]), (("Moby&

[Haskell-cafe] Cairo package broken on Windows, or am I cooking it wrong?

2011-05-10 Thread Eugene Kirpichov
some other error? How can I diagnose what's wrong? How is "cabal install" generally supposed to find that a dll is needed, if I don't write it down in the extra-libraries field? -- Eugene Kirpichov Principal Engineer, Mirantis Inc. http://www.miranti

Re: [Haskell-cafe] For Project Euler #1 isn't it more efficient to generate just the numbers you need?

2011-05-07 Thread Eugene Kirpichov
__ >>> Haskell-Cafe mailing list >>> Haskell-Cafe@haskell.org >>> http://www.haskell.org/mailman/listinfo/haskell-cafe >>> >> >> ___ >> Haskell-Cafe mailing list >> Has

Re: [Haskell-cafe] ANNOUNCE: iterIO-0.1 - iteratee-based IO with pipe operators

2011-05-05 Thread Eugene Kirpichov
Sounds just terrific! Thanks! 06.05.2011, в 8:15, David Mazieres написал(а): > Hi, everyone. I'm pleased to announce the release of a new iteratee > implementation, iterIO: > >http://hackage.haskell.org/package/iterIO > > IterIO is an attempt to make iteratees easier to use through an

Re: [Haskell-cafe] ANN: timeplot-0.3.0 - the analyst's swiss army knife for visualizing ad-hoc log files

2011-05-01 Thread Eugene Kirpichov
Hello, Sorry for the broken link: the correct link to the presentation is: http://jkff.info/presentations/two-visualization-tools.pdf 2011/4/30 Eugene Kirpichov : >  Hello fellow haskellers, > > I announce the release of timeplot-0.3.0, the "analyst's swiss army > knife

[Haskell-cafe] ANN: timeplot-0.3.0 - the analyst's swiss army knife for visualizing ad-hoc log files

2011-04-30 Thread Eugene Kirpichov
courage you to give it a try and look around for a use case :) If you do give the tool a try, please tell me if something goes wrong, be it an installation problem or a bug (the version is fresh released, so this is quite possible). -- Eugene Kirpichov Principal Engineer, Mirantis Inc. http://www

Re: [Haskell-cafe] tplot and splot - analyst's swiss army knifes for visualizing log files

2011-03-18 Thread Eugene Kirpichov
share link was present (finally making some use of my hosting...). Here it is: http://jkff.info/presentations/two-visualization-tools.pdf 2011/3/17 Ferenc Wagner : > Eugene Kirpichov writes: > >> 2010/12/17 Henning Thielemann : >> >>> Eugene Kirpichov schrieb: >>>

Re: [Haskell-cafe] Haskell IDE

2011-03-02 Thread Eugene Kirpichov
e a real alternative? > > Thanks > > Klaus > > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > > -- Eugene Kirpichov Senior Software Engineer, Mirantis Inc. htt

Re: [Haskell-cafe] Haskell platform installation failure on OS X 10.6.6 (intel)

2011-02-24 Thread Eugene Kirpichov
ers. > > G. > > On Thu, Feb 24, 2011 at 3:41 PM, Eugene Kirpichov > wrote: >> Hello, >> >> Below is an experience report from Artem (cc'd) on a failed >> installation of Haskell platform on a Mac. >> >> OS: OS X 10.6.6 >> CPU: Intel Cor

[Haskell-cafe] Haskell platform installation failure on OS X 10.6.6 (intel)

2011-02-24 Thread Eugene Kirpichov
m reports on installing haskell-platform on OS X from other people (I myself don't have it) - like being unable to install it without first installing XCode, etc. Can anyone help resolve this issue? I'm sure this is not expected behavior. What further information would help find the cau

  1   2   3   4   >