Re: join points and stream fusion?

2017-04-27 Thread Christian Höner zu Siederdissen
> Is this a regression? I.e. did some earlier version of GHC do better on the > exact same code? > > Maybe open a Trac ticket. > > Thanks > > Simon > > | -Original Message- > | From: Glasgow-haskell-users [mailto:glasgow-haskell-users- > | boun.

Re: join points and stream fusion?

2017-04-27 Thread Christian Höner zu Siederdissen
e I end up with a join point on (++). Further evidenced (?) by the curious occurance of s1uf4 ... (Left (Left (Left ...))). Additional calls then are (Left (Left (Right ))) and so on. It would be really good if (|||) is *not* turned into a join point. Best, Christian * Christian Höner

join points and stream fusion?

2017-04-27 Thread Christian Höner zu Siederdissen
Dear all, have some of you experienced bad code generation in ghc-8.2-rc1 in combination with stream fusion from the vector package? Unfortunately, the problem occurs with ADPfusion code which means no simple example, but I'm asking because of the following core below. In ghc-8.0 I have nice

Re: stream fusion, concatMap, exisential seed unboxing

2015-02-02 Thread Christian Höner zu Siederdissen
isn't unboxed. There is a way to get the strictness analysis to run twice -flate-dmd-anal. You could try that. Simon | -Original Message- | From: Glasgow-haskell-users [mailto:glasgow-haskell-users- | boun...@haskell.org] On Behalf Of Christian Höner zu Siederdissen | Sent

Re: stream fusion, concatMap, exisential seed unboxing

2015-02-02 Thread Christian Höner zu Siederdissen
Don't use criterion; this stuff is huge: you get 10G of allocation in your test run instead of 10M. Or something. Simon | -Original Message- | From: Christian Höner zu Siederdissen | [mailto:choe...@tbi.univie.ac.at] | Sent: 02 February 2015 16:02 | To: Simon Peyton

stream fusion, concatMap, exisential seed unboxing

2015-02-01 Thread Christian Höner zu Siederdissen
Hi everybody, I'm playing around with concatMap in stream fusion (the vector package to be exact). concatMapM :: Monad m = (a-m (Stream m b)) - Stream m a - Stream m b concatMapM f (Stream ...) = ... I can get my concatMap to behave nicely and erase all Stream and Step constructors but due to

'import ccall unsafe' and parallelism

2014-08-14 Thread Christian Höner zu Siederdissen
Greetings everybody, I happen to be a bit confused with regards to unsafe foreign imports and parallelism. Assume the following C function: foreign import ccall unsafe cfun cfun :: CInt - IO () Now, cfun does some work: go xs = unsafePerformIO $ do forM_ xs $ cfun return $

Re: 'import ccall unsafe' and parallelism

2014-08-14 Thread Christian Höner zu Siederdissen
Thanks, I've played around some more and finally more than one capability is active. And indeed, unsafe calls don't block everything. I /had/ actually read that but when I saw the system spending basically only 100% cpu time, I'd thought to ask. One problem with this program seems to be that the

Re: 'import ccall unsafe' and parallelism

2014-08-14 Thread Christian Höner zu Siederdissen
That's actually a great idea, especially since the safe variants of the calls are already in place. * Carter Schonwald carter.schonw...@gmail.com [14.08.2014 23:10]: have a smart wrapper around you ffi call, and if when you think the ffi call will take more than 1 microsecond, ALWAYS use

Re: Looking for list comprehensions use cases

2014-07-23 Thread Christian Höner zu Siederdissen
Hi Janek, yes to both -- in a way. See Section 5.3 here for lists: http://dl.acm.org/citation.cfm?id=2543736 For my usual work, I use stream fusion and manually 'flatten' everything in all of ADPfusion and rather large bunch of other work building on top of that. ;-) Giegerich's original ADP is

Re: vector and GeneralizedNewtypeDeriving

2014-05-15 Thread Christian Höner zu Siederdissen
Greetings, As an avid user of unboxed vectors (with a dozen libraries using them with many newtypes), I've basically been using vector-th-unbox, which is fine for parameter-free newtypes. Viele Gruesse, Christian * Carter Schonwald carter.schonw...@gmail.com [15.05.2014 04:15]: this is an

Re: splicing varPs in quasi-quote brackets

2014-03-15 Thread Christian Höner zu Siederdissen
Thanks Adam, It indeed does work with a lambda, should've thought about it. So, it seems splices in patterns are new in 7.8 (hadn't seen it in the notes). Gruss, Christian * adam vogt vogt.a...@gmail.com [15.03.2014 05:12]: Hello Christian, It seems new to me that $( ) is allowed in

splicing varPs in quasi-quote brackets

2014-03-14 Thread Christian Höner zu Siederdissen
Hello everybody, I wrote me this nice function 'buildRns' which splices in $(varP w) nice and recursively. Unfortunately, this only seems to work in the 7.8 branch, not in 7.6.3. Is this indeed new, or am I missing something obvious? The message is: ADP/Fusion/TH.hs:106:86: Parse error in

Re: memory ordering

2013-12-20 Thread Christian Höner zu Siederdissen
Hi John, I guess you probably want to pseq x. See below for an example. Since your 2nd action does not depend on your 1st. Gruss, Christian import Debug.Trace import GHC.Conc main = do x - return (traceShow 1 $ 1::Int) -- x `pseq` print (2::Int) print (2::Int) print x * John Lato

Re: GHC 7.8 release?

2013-02-07 Thread Christian Höner zu Siederdissen
Hi Simon, The download page already has a big Stop there. http://www.haskell.org/ghc/download_ghc_7_6_2 Apart from that, I am /really/ looking forward to sse/avx extensions and the official new-code-gen to further narrow the gap between high-performance C and high-performance Haskell. That

Re: Advice on type families and non-injectivity?

2013-01-13 Thread Christian Höner zu Siederdissen
Hi, How would you infer a from F a? Given bar :: Bool, I can't see how one could go from Bool to F a = Bool and determine a uniquely. My question is not completely retorical, if there is an answer I would like to know it :-) Gruss, Christian * Conal Elliott co...@conal.net [13.01.2013 20:13]:

Re: Advice on type families and non-injectivity?

2013-01-13 Thread Christian Höner zu Siederdissen
Hi Conal, if you take your example program and write foo :: Bool, ghci accepts it? For me it complains, and I would think rightly so, that couldn't match expected type Fa with actual type Bool. It actually only works with the following quite useless type instance F a = Bool. By the way, using

Re: [Haskell] ANNOUNCE: GHC version 7.6.1

2012-09-07 Thread Christian Höner zu Siederdissen
Hi Simon, Yes I am using -fnew-codegen. Using a large set of random input data I get the expected results (comparing to both, a different version in Haskell, and one in C). I'll be monitoring output and will report problems. However not relying on it, except to show that high performance is

Re: ANNOUNCE: GHC 7.4.2 Release Candidate 1

2012-05-18 Thread Christian Höner zu Siederdissen
Hi, right now it seems that my ADPfusion stuff works, apparently no bugs. The runtimes seem to have improved a bit, too. :-) (Could be due to other changes I currently make due to reviewers' suggestions...) If anybody has a binary package for ARM in general, I can test that, too. Unfortunately,

optimizer, spec-constr changes 7.2.2 - 7.4

2012-04-30 Thread Christian Höner zu Siederdissen
Hi, I am currently trying to get my ADPfusion library to optimize code using ghc-head (same thing described below happens with 7.4.1). Using ghc-7.2.2, both test programs (Nussinov78 and RNAFold) optimize well, the performance is close to C and ghc-core shows good code. This is mostly to say

cabal install version selection

2012-03-30 Thread Christian Höner zu Siederdissen
Hi everybody, I fail to remember or re-google the package version selection for cabal, if no version constraints are given. If I depend on iteratee, and there are no constraints, does it take the lowest version? When I pushed the newest version of the RNAFold package, the log showed

ADPfusion: Efficient, high-level dynamic programming

2012-03-24 Thread Christian Höner zu Siederdissen
ADPfusion combines stream-fusion (using the stream interface provided by the vector library) and type-level programming to provide highly efficient dynamic programming (DP) combinators. You can write DP programs in a style similar to Algebraic Dynamic Programming (ADP) (Giegerich et al.), meaning

Re: unregisterised and -prof

2012-02-06 Thread Christian Höner zu Siederdissen
It would seem that you are building random with profiling enabled: 4. Build random-1.0.1.1 by new by ghc/7.4.1/instUnregis by ghc --make Setup ./Setup configure --prefix=/home/mechvel/ghc/7.4.1/instUnregis/lib/ghc-7.4.1 -p ./Setup build -v while your non-reg'ged build of ghc has no

Re: Unit unboxed tuples

2011-12-23 Thread Christian Höner zu Siederdissen
Hi, I have to second that. I recently fell over that problem when writing instances for certain kinds of tuples. In libraries, such as tuple there is a special 'OneTuple' constructor but I'd really appreciate a more uniform fix -- but don't know of one either... Gruss, Christian * Ganesh

Re: repa: fromVector

2011-05-20 Thread Christian Höner zu Siederdissen
-tuple ;-) A function along those lines is extremely useful in a number of cases. I hope to have some time to actually dig through the repa sources and see what is possible. Gruss, Christian * Ben Lippmeier b...@ouroborus.net [20.05.2011 04:14]: On 19/05/2011, at 8:27 PM, Christian Höner zu

repa: fromVector

2011-05-19 Thread Christian Höner zu Siederdissen
Hi, I'd like to use repa in a rather perverted mode, I guess: for my programs I need to be able to update arrays in place and repeatedly perform operations on them. Right now, it basically works like this (in ST): - create unboxed space using primitive (same as unboxed vectors) - unsafefreeze

Re: Release/git plans

2011-01-20 Thread Christian Höner zu Siederdissen
This is Haskell. One should abstract away the system used. Call it vcs-ghc@ and vcs.haskell.org ;-) Gruss, Christian * austin seipp a...@hacks.yi.org [20.01.2011 22:19]: Point taken, I personally think it's rather minor although it was brought up before like I said, so perhaps others think

Re: lib for tuples

2011-01-04 Thread Christian Höner zu Siederdissen
That would not be economical. Lets just say people never use more than 8-tuple and then try to count how many functions you would need. The tuple package on Haskell provides a generic interface to access/manipulate the k'th element of an n-tuple. That should be sufficient and is not subject to

Re: [Haskell] Terms of Service for Haskell community server

2010-12-15 Thread Christian Höner zu Siederdissen
Hi, you probably mean generating an ssh key-pair. This is a one-step operation. Is Yarrow a weapon or a crypto package? Otherwise I would suggest putting Yarrow onto your personal webpage / university system and asking for a link. Gruss, Christian PS: I have just skimmed the TOS, but apart

Re: Proposal: Require OverlappingInstances for the most specific instance only

2010-11-16 Thread Christian Höner zu Siederdissen
The change should not affect working programs, as it just allows you to define further places where you say that you want an overlapping instance. Gruss, Christian * Serge D. Mechveliani mech...@botik.ru [16.11.2010 16:47]: On Tue, Oct 26, 2010 at 09:41:58PM +0200, John Smith wrote: In the

Loop optimisation with identical counters

2010-11-02 Thread Christian Höner zu Siederdissen
Hi, is the following problem a job for ghc or the code generation backend (llvm)? We are given this program: {-# LANGUAGE BangPatterns #-} module Main where f :: Int - Int - Int - Int - Int f !i !j !s !m | i == 0= s+m | otherwise = f (i-1) (j-1) (s + i+1) (m + j*5) g :: Int - Int g

Re: Proposal: Require OverlappingInstances for the most specific instance only

2010-10-26 Thread Christian Höner zu Siederdissen
Hi, can't remember to have been hit by it; but changing would mean that library maintainers can act more conservatively. Otherwise one needs to be able to guess if an instance might be overlapped. The new version wouldn't require that, yes? Gruss, Christian * John Smith volderm...@hotmail.com

Cabal constraint solver

2010-10-02 Thread Christian Höner zu Siederdissen
Hi, does the Cabal constraint solver always try to solve the complete graph? example: (ghc-7.0.0-rc1) $ cabal install parsec-3.1.0 cabal: cannot configure syb-0.2.1. It requires base =4.0 4.3 cd syb-0.2.1 * remove base4.3 constraint from syb.cabal cabal install * syb-0.2.1 is now installed

Re: Cabal constraint solver

2010-10-02 Thread Christian Höner zu Siederdissen
Hi, thanks to you all for the answers. I will then go with increasing the version number for testing, this seems to be the easiest way to go. And indeed, 'cabal unpack' fetches ( ;-) ) the package without checking that constraints are met. Gruss, Christian * Christian Höner zu Siederdissen

GHC 6.13 + Data.Vector experiences

2010-09-22 Thread Christian Höner zu Siederdissen
Hi, I am about to upload a number of packages to hackage. They are all needed by RNAFoldProgs. The main program therein, RNAFold, replicates RNAfold of the ViennaRNA package. The difference is that the algorithm already uses a newer set of parameters; the C functionality will follow soon from our

Re: Cost Centre MAIN

2010-09-19 Thread Christian Höner zu Siederdissen
You should either try -auto-all while compiling to get cost centres for every top-level function or insert cost centres by hand with SCC: http://haskell.cs.yale.edu/ghc/docs/6.12.2/html/users_guide/profiling.html Otherwise, MAIN is main = ... Gruss, Christian * Stefan Wehr

Re: Cost Centre MAIN

2010-09-19 Thread Christian Höner zu Siederdissen
Yeah that was a bit lazy by me (or bull, if you want...;-); looks like you have runStmLogger on the top-level of your Main module (MAIN) as well. What functions are defined there? And what vars? Gruss, Christian * Stefan Wehr stefan.w...@gmail.com [19.09.2010 20:28]: 2010/9/19 Christian Höner

haddock and associated data families

2010-09-08 Thread Christian Höner zu Siederdissen
Hi, haddock seems to produce an error on associated data family decls.: http://hackage.haskell.org/packages/archive/PrimitiveArray/0.0.2.1/logs/failure/ghc-6.12 line 22, where the errors occurs is exactly this one: class PrimArrayOps a b where data PrimArray a b :: *-- ^

late optimization of typeclass callers

2010-08-26 Thread Christian Höner zu Siederdissen
Hi, I do have the problem that my code is not completely optimized. We begin with -- Ring.hs class Ring a where rmult :: a - a - a zero :: a -- PrimitiveArray.hs class PrimArrayOps a b where data PrimArray a b :: * unsafeIndex :: PrimArray a b - a - b -- PAInstances.hs -- for any 'a'

GHC-HEAD 19.Aug.2010, llvm, threaded [Memory Exhaustion]

2010-08-20 Thread Christian Höner zu Siederdissen
Hi, using: http://www.haskell.org/ghc/dist/current/dist/ghc-6.13.20100819-x86_64-unknown-linux.tar.bz2 parallel-3.1.0.0 and the most-common test program ... ever: module Main where import Control.Parallel.Strategies fib :: Int - Int fib n | n 1 = error n 1 | n == 1= 1 | n == 2

Re: Modules and their explicit export lists (are an annoyance)

2010-06-21 Thread Christian Höner zu Siederdissen
everything) Because of the rather good versioning system of Cabal (like library=x.y.z) this seems to be the most practical solution for me. Though it still would be nice if I could inject functions into other peoples' namespaces -- so to speak ;-) Gruss, Christian * Christian Höner zu Siederdissen

Modules and their explicit export lists (are an annoyance)

2010-06-19 Thread Christian Höner zu Siederdissen
Hi everybody, I'd like some input on other peoples' thoughts on this. Recently, I played around with a library that uses an explicit export list. While there are reasons for having one: - efficiencey (inlining in the module) - encapsulation in practice, it seems to me that they are more

Parallelization of Dynamic Programming Algorithms

2010-05-16 Thread Christian Höner zu Siederdissen
Hi, continuing the above discussion Parallel Haskell, 2 year project, here is what i want to do: - put an (almost) trivial program here that is a dynamic programming program but requires no other knowledge (like Bioinformatics or whatever). This one is attached. - write the same program but

Re: Parallel Haskell: 2-year project to push real world use

2010-05-04 Thread Christian Höner zu Siederdissen
* Roman Leshchinskiy r...@cse.unsw.edu.au [04.05.2010 10:02]: On 04/05/2010, at 11:10, Christian Höner zu Siederdissen wrote: * Ben Lippmeier b...@ouroborus.net [04.05.2010 02:21]: You can certainly create an array with these values, but in the provided code it looks like each

Re: Parallel Haskell: 2-year project to push real world use

2010-05-03 Thread Christian Höner zu Siederdissen
Hi, on that topic, consider this (rather trivial) array: a = array (1,10) [ (i,f i) | i -[1..10]] where f 1 = 1 f 2 = 1 f i = a!(i-1) + a!(i-2) (aah, school ;) Right now, I am abusing vector in ST by doing this: a - new a' - freeze a forM_ [3..10] $ \i - do write a (a'!(i-1) +

Re: Parallel Haskell: 2-year project to push real world use

2010-05-03 Thread Christian Höner zu Siederdissen
that you're using, and some example data + output? Thanks, Ben. On 04/05/2010, at 9:21 AM, Christian Höner zu Siederdissen wrote: a = array (1,10) [ (i,f i) | i -[1..10]] where f 1 = 1 f 2 = 1 f i = a!(i-1) + a!(i-2) (aah, school ;) Right now, I am abusing vector

Re: Parallel Haskell: 2-year project to push real world use

2010-05-03 Thread Christian Höner zu Siederdissen
* Roman Leshchinskiy r...@cse.unsw.edu.au [04.05.2010 02:32]: On 04/05/2010, at 09:21, Christian Höner zu Siederdissen wrote: Hi, on that topic, consider this (rather trivial) array: a = array (1,10) [ (i,f i) | i -[1..10]] where f 1 = 1 f 2 = 1 f i = a!(i-1) + a!(i-2

Easily generating efficient instances for classes

2010-02-24 Thread Christian Höner zu Siederdissen
Hi, I am thinking about how to easily generate instances for a class. Each instance is a tuple with 1 or more elements. In addition there is a second tuple with the same number of elements but different type. This means getting longer and longer chains of something like (...,x3*x2,x2,0). -

Re: Removing/deprecating -fvia-c

2010-02-15 Thread Christian Höner zu Siederdissen
Hi, the things I am interested in are: foldU f init . mapU (\k - array_1 !: (i,k) `combine` array_2 !: (k,j)) $ enumFromToU i j where (!:) = fancy_index_op with both `vector` and `uvector` (then D.V.fold etc). Since ghc 6.12 there has been no significant difference in using either backend.

Text.Regex.Posix with [String] Result broken?

2010-02-08 Thread Christian Höner zu Siederdissen
Hi, are Regex'es broken or is this local to my installation? I want to blame someone else, see: http://book.realworldhaskell.org/read/efficient-file-processing-regular-expressions-and-file-name-matching.html where all result types of [a] are broken, too. Thanks, Christian What to test for:

Re: Control.Parallel.Strategies.parMap CPU usage

2009-03-30 Thread Christian Höner zu Siederdissen
Hi, thank you very much Simon Don, for the answers. The latest head gives great results on parallel programs. All cores are now always at work as I hoped for. So, too, thanks to everybody involved in the multicore improvements -- they should come very handy. :-) Thanks again, Christian *

X11-1.4.2 on 64bit Fedora 8 fails to build

2008-07-01 Thread Christian Höner zu Siederdissen
, but should look in /usr/lib64. Btw. I don't have root on the machine. Thanks, Christian Höner zu Siederdissen pgpBEO4ihqZJE.pgp Description: PGP signature ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org

GHC 6.8.2 and large source files

2008-06-01 Thread Christian Höner zu Siederdissen
a handcrafted program, albeit with very few lines, that shows how one of our source files would look like: http://bibiserv.techfak.uni-bielefeld.de/cgi-bin/adp_MatrixMult We automatically generate type, algebras and the grammar for our application. Thanks, Christian Höner zu Siederdissen