Re: [Haskell-cafe] Solving the configuration problem with parametrized modules

2011-09-06 Thread Joachim Breitner
Hi, Am Dienstag, den 06.09.2011, 08:15 +1000 schrieb Erik de Castro Lopo: Joachim Breitner wrote: The big downside is the verbosity of the approach: A lot of parameters need to be passed, and if one such value is suddenly required in a function where it was not before, this function’s

Re: [Haskell-cafe] GHC/Cabal on AFS

2011-09-06 Thread Christian Maeder
I had similar problems under Solaris with ghc binaries compiled using gcc-4.3.3 http://hackage.haskell.org/trac/ghc/ticket/5013 C. Am 05.09.2011 19:06, schrieb Tristan Ravitch: I have the Haskell Platform (and my home directory with my cabal-installed packages) installed on an AFS (a

[Haskell-cafe] ANN: Netwire 1.2.0

2011-09-06 Thread Ertugrul Soeylemez
Hello there, version 1.2.1 of netwire is out. New features include: * Completely reworked event system. Events are now solely based on signal inhibition, which turns out to be much more convenient and faster than AFRP's traditional approach using Maybe-wrapped values. Now

Re: [Haskell-cafe] ANN: Netwire 1.2.0

2011-09-06 Thread Ertugrul Soeylemez
Ertugrul Soeylemez e...@ertes.de wrote: version 1.2.1 of netwire is out. It's actually 1.2.2 now, because had forgotten something in the .cabal file. Greets Ertugrul -- nightmare = unsafePerformIO (getWrongWife = sex) http://ertes.de/ -- nightmare = unsafePerformIO (getWrongWife = sex)

Re: [Haskell-cafe] Solving the configuration problem with parametrized modules

2011-09-06 Thread Yitzchak Gale
Joachim Breitner wrote: ...Usually in Haskell, you’d determine them in the main function and then pass them in an argument to all functions needing them, or you wrap that in a monad... The big downside is the verbosity of the approach: A lot of parameters need to be passed, and if one such

Re: [Haskell-cafe] Solving the configuration problem with parametrized modules

2011-09-06 Thread Jon Fairbairn
Joachim Breitner m...@joachim-breitner.de writes: Hi Cafe, this is an idea that has been floating in my head for a while, and I’m wondering about its feasibility and, if feasible, complexity (in the range from „trivial“ over “blog post” over “paper” to “thesis”). Application authors in

Re: [Haskell-cafe] EclipseFP fails to install

2011-09-06 Thread Brent Yorgey
On Mon, Sep 05, 2011 at 12:12:40AM +0200, Henk-Jan van Tuyl wrote: L.S., I have installed Eclipse 3.7 and EclipseFP 2.1.0 on my Windows XP computer After trying to install EclipseFP in Eclipse, I got the following message: C:\Programs\Haskell Platform\2011.2.0.1\bin\ghc-pkg.exe dump

Re: [Haskell-cafe] Data.IArray rant

2011-09-06 Thread Jon Fairbairn
Roman Leshchinskiy r...@cse.unsw.edu.au writes: On 03/09/2011, at 03:04, Ivan Lazar Miljenovic wrote: On 3 September 2011 11:38, Evan Laforge qdun...@gmail.com wrote: The result is that my first contact with haskell arrays left me with the impression that they were complicated, hard to

Re: [Haskell-cafe] Solving the configuration problem with parametrized modules

2011-09-06 Thread Joachim Breitner
Hi Jon, Am Dienstag, den 06.09.2011, 14:01 +0100 schrieb Jon Fairbairn: Joachim Breitner m...@joachim-breitner.de writes: this is an idea that has been floating in my head for a while, and I’m wondering about its feasibility and, if feasible, complexity (in the range from „trivial“ over

Re: [Haskell-cafe] Solving the configuration problem with parametrized modules

2011-09-06 Thread Joachim Breitner
Hello, Am Dienstag, den 06.09.2011, 15:17 +0300 schrieb Yitzchak Gale: We're talking about passing a single parameter - a record type, or a shallow tree, or something else extremely simple. In the monadic case, we're adding a single Reader component to the transformer stack. point taken, if

Re: [Haskell-cafe] Data.IArray rant

2011-09-06 Thread Roman Leshchinskiy
Jon Fairbairn wrote: Roman Leshchinskiy r...@cse.unsw.edu.au writes: No, arrays were not considered to be bad, they were designed with parallelism in mind. I'm not sure how this can be the case if, as discussed below, most array operations have to go through lists, an inherently sequential

[Haskell-cafe] Undefined symbol error coming from shared, dynamic library.

2011-09-06 Thread David Banas
Hi all, I'm trying to build a shared, dynamic library for use with a C program. I'm getting an `undefined symbol' error, when I try to run that C program, and was hoping that the last line in the output, below, might mean something to someone. I include the entire output of a `make rebuild'

Re: [Haskell-cafe] Data.IArray rant

2011-09-06 Thread Andrew Coppin
It's rather that some considered the IArray API to be inadequate most of the time. Really, H98 arrays aren't very good at anything they do. For collective operations, you are supposed to convert the array to a list, work on the list and then convert it back to an array which just seems wrong. I

Re: [Haskell-cafe] Solving the configuration problem with parametrized modules

2011-09-06 Thread Stephen Tetley
On 6 September 2011 15:33, Joachim Breitner m...@joachim-breitner.de wrote: I think the benefit you get from being able to treat runtime constants as plain values manifests mostly when writing pure code. If your code has already been written or re-written in monadic style, adding a

Re: [Haskell-cafe] Configuration Problem and Plugins

2011-09-06 Thread Ryan Ingram
The other option is {-# LANGUAGE ExistentialQuantification #-} data Renderer s = Renderer { initialize :: IO s, destroy :: IO (), renderS :: SystemOutput - s - IO s } -- Now, you need to hold the state somewhere, which you can do with an existential: data InitializedRenderer =

[Haskell-cafe] Memoization of functions

2011-09-06 Thread Michael Orlitzky
I'm working on a program where I need to compute a gajillion (171442176) polynomials and evaluate them more than once. This is the definition of the polynomial, and it is expensive to compute: polynomial :: Tetrahedron - (RealFunction Point) polynomial t = sum [ (c t i j k l) `cmult` (beta

Re: [Haskell-cafe] Data.IArray rant

2011-09-06 Thread Evan Laforge
I am unconvinded that this is any more wrong than using a for loop in an imperative language. Remember that the lists are lazy, so it’s misleading to say “convert the array to a list” since what happens most of the time is that elements are taken out of the array and passed to the processing

[Haskell-cafe] Is there any way to parametrize a value update using record syntax?

2011-09-06 Thread Poprádi Árpád
Hi all, i have a record with a lot of items used in a state monad. data BigData = BigData { data1 :: X , data2 :: X -- and so on } type MonadicEnv a = State BigData a I updates the fields in the computation with such

Re: [Haskell-cafe] Is there any way to parametrize a value update using record syntax?

2011-09-06 Thread Brandon Allbery
2011/9/6 Poprádi Árpád popradi_ar...@freemail.hu updateData1 :: X - MonadicEnv() updateData1 d = do; env - get; put env {data1 = d} updateData1 d = modify (\r - r {data1 = d}) But there is, sadly, no eta-reduced version of record update to make the \r - r ... boilerplate go away;

Re: [Haskell-cafe] Data.IArray rant

2011-09-06 Thread Brandon Allbery
On Tue, Sep 6, 2011 at 13:40, Andrew Coppin andrewcop...@btinternet.comwrote: But then, lists are in the standard Prelude, and hard-wired into the language syntax. Streams aren't exposed by any moderately standard library. Even the stream-fusion library treats streams as a sort of under the

Re: [Haskell-cafe] Is there any way to parametrize a value update using record syntax?

2011-09-06 Thread Alexey Khudyakov
On 07.09.2011 00:56, Brandon Allbery wrote: 2011/9/6 Poprádi Árpád popradi_ar...@freemail.hu mailto:popradi_ar...@freemail.hu updateData1 :: X - MonadicEnv() updateData1 d = do; env - get; put env {data1 = d} updateData1 d = modify (\r - r {data1 = d}) But there is, sadly, no

[Haskell-cafe] Fwd: Is there any way to parametrize a value update using record syntax?

2011-09-06 Thread David Barbour
forgot to CC list. -- Forwarded message -- From: David Barbour dmbarb...@gmail.com Date: 2011/9/6 Subject: Re: [Haskell-cafe] Is there any way to parametrize a value update using record syntax? To: Poprádi Árpád popradi_ar...@freemail.hu 2011/9/6 Poprádi Árpád

Re: [Haskell-cafe] Is there any way to parametrize a value update using record syntax?

2011-09-06 Thread Erik Hesselink
2011/9/6 Poprádi Árpád popradi_ar...@freemail.hu: i have a record with a lot of items used in a state monad. data BigData = BigData {                   data1 :: X                 , data2 :: X                -- and so on                } updateData1 :: X - MonadicEnv() updateData1 d = do;

Re: [Haskell-cafe] Is there any way to parametrize a value update using record syntax?

2011-09-06 Thread David Barbour
2011/9/6 Erik Hesselink hessel...@gmail.com You can use the fclabels package [1] for this. It makes record labels first class, and also provides functions to update parts of a record in the state monad [2]. That's pretty nifty. Thanks for mentioning it.

[Haskell-cafe] mapM is supralinear?

2011-09-06 Thread Travis Erdman
The performance of mapM appears to be supralinear in the length of the list it is mapping on.  Does it need to be this way?  As a comparison, both mapM_ and map are linear in the length of the list. To wit: travis@PW:~/Documents/insurer$ ghci GHCi, version 7.0.3: http://www.haskell.org/ghc/ 

Re: [Haskell-cafe] mapM is supralinear?

2011-09-06 Thread Daniel Fischer
On Wednesday 07 September 2011, 01:01:08, Travis Erdman wrote: The performance of mapM appears to be supralinear in the length of the list it is mapping on. Hmm. Could reproduce with 6.12.3 and 7.0.4, but not with 7.2.1. Does it need to be this way? Apparently it doesn't, and it seems to

Re: [Haskell-cafe] Memoization of functions

2011-09-06 Thread briand
On Tue, 06 Sep 2011 15:16:09 -0400 Michael Orlitzky mich...@orlitzky.com wrote: I'm working on a program where I need to compute a gajillion (171442176) polynomials and evaluate them more than once. This is the definition of the polynomial, and it is expensive to compute: polynomial ::

Re: [Haskell-cafe] Data.IArray rant

2011-09-06 Thread Richard O'Keefe
On 7/09/2011, at 5:40 AM, Andrew Coppin wrote: But anyway... Haskell '98 arrays may have fancy indexing, but I've always wished that there had been a plain ordinary integer-indexed array construct, with the fancy indexing implemented on top of that, so your use of fancy indexing is