[Haskell-cafe] Rewrite thunk action rule?

2008-12-21 Thread Peter Todd
I have a program with this data structure: data Element = Element { elementOrigin :: V, elementSubs :: [Element] } and this important bit of code that operates on it: transform :: T - Element - Element transform t e = Element { elementOrigin = tmulv t

Re: [Haskell-cafe] Trouble with FFI on Windows2000...

2008-12-21 Thread kyra
Serge LE HUITOUZE wrote: I do the following: dlltool -d cproj1.def -l libcproj1.a ghc --make testFFI_2.hs -optl-lcproj1 -optl-L. This seems fine, since it produces a testFFI_2.exe. However, executing it, I get a MSWindows error box with a message that looks like (approximate

Re: [Haskell-cafe] Line noise

2008-12-21 Thread Jon Harrop
On Tuesday 23 September 2008 02:27:17 Brian Hurt wrote: On Sun, 21 Sep 2008, wren ng thornton wrote: Even with functionalists ---of the OCaml and SML ilk--- this use of spaces can be confusing if noone explains that function application binds tighter than all operators. Bwuh? Ocaml

Re: [Haskell-cafe] Cabal Install Links to Source from Haddock Docs

2008-12-21 Thread Thomas Hartman
the answer: not cabal install, just cabal. thart...@thartman-laptop:~/haskellInstalls/smallInstalls/pureMD5-0.2.3 thart...@thartman-laptop:~/haskellInstalls/smallInstalls/pureMD5-0.2.3cabal --help | grep -i doc haddock Generate Haddock HTML documentation.

Re: [Haskell-cafe] Rewrite thunk action rule?

2008-12-21 Thread Luke Palmer
2008/12/21 Peter Todd p...@petertodd.org If I could somehow arrange for the transform function to detect when it is being applied to a unevaluated thunk, and then modify the thunk in place, that would basically be the behavior I need. Any suggestions? That is exactly what is already

Re: [Haskell-cafe] Re: Windows vs. Linux x64

2008-12-21 Thread Jon Harrop
On Friday 12 December 2008 13:57:44 Simon Marlow wrote: - it means recompiling *everything*. It's a complete new way, so you have to make the decision to do this once and for all, or build all your libraries + RTS twice. In JITed languages they can make the choice at runtime,

[Haskell-cafe] Re: [Haskell] ANN: Hoogle with more libraries

2008-12-21 Thread Neil Mitchell
Hi Bob, 1. Searching using a package name that isn't all lower case results in nothing (e.g. (a - b) - f a - f b +InfixApplicative gives no results, while (a - b) - f a - f b +infixapplicative gives 2). Yes, if you do +InfixApplicative it assumes you mean only in the module InfixApplicative,

Re: [Haskell-cafe] Yampa vs. Reactive

2008-12-21 Thread Henrik Nilsson
Hi Tom, In reactive, one doesn't. All behaviors and events have the same absolute 0 value for time. Right. I believe the possibility of starting behaviors later is quite important. And from what Conal wrote in a related mail, I take it that this is recognized, and that this capability is

Re: [Haskell-cafe] Logos of Other Languages

2008-12-21 Thread Paul Johnson
Paulo Tanimoto wrote: Another idea: something in the form of an Ouroboros. Is that already taken for a programming language? http://en.wikipedia.org/wiki/Ouroboros Something like this? http://www.haskell.org/sitewiki/images/f/fd/Ouroborous-oval.png Paul

[Haskell-cafe] Comparing on multiple criteria

2008-12-21 Thread Martijn van Steenbergen
Hello all, Data.Ord has a handy function called comparing, and its documentation shows an example of its use. But what if you want to sort a list of values based on multiple criteria? It turns out there is a neat way to do this: compareTuple = mconcat [comparing fst, comparing snd] The

RE: [Haskell-cafe] forkIO on multicore

2008-12-21 Thread Paul Keir
So this benchmark is primarily a stress test of the parallel garbage collector since it is GC that is taking 75-80% of the time. Note that the mutator elapsed time goes down slightly with 2 cores compared to 1 however the GC elapsed time goes up slightly. Thanks Duncan, Jake et al. I'm more

Re: [Haskell-cafe] Comparing on multiple criteria

2008-12-21 Thread Jan-Willem Maessen
On Dec 21, 2008, at 8:52 AM, Martijn van Steenbergen wrote: Hello all, Data.Ord has a handy function called comparing, and its documentation shows an example of its use. But what if you want to sort a list of values based on multiple criteria? It turns out there is a neat way to do this:

Re: [Haskell-cafe] Comparing on multiple criteria

2008-12-21 Thread Luke Palmer
On Sun, Dec 21, 2008 at 9:20 AM, Jan-Willem Maessen jmaes...@alum.mit.eduwrote: Indeed, this is great to know. I can't help but notice that there is no documentation of any kind at all for the Monoid instance of Ordering; how were we supposed to know this behavior existed in the first place,

[Haskell-cafe] Re: Is this related to monomorphism restriction?

2008-12-21 Thread Maurí­cio
Why isn't the last line of this code allowed? f :: (TestClass a) = a - Integer f = const 1 a = (f,f) g = fst a The only thing I can think about is monomorphism restriction, but it's allowed (...) (...) The reason is that a has type a :: (TestClass a, TestClass b) = (a,b) and then when we take

Re: [Haskell-cafe] Rewrite thunk action rule?

2008-12-21 Thread Peter Todd
On Sun, Dec 21, 2008 at 02:56:06AM -0700, Luke Palmer wrote: 2008/12/21 Peter Todd p...@petertodd.org If I could somehow arrange for the transform function to detect when it is being applied to a unevaluated thunk, and then modify the thunk in place, that would basically be the behavior I

Re: [Haskell-cafe] Rewrite thunk action rule?

2008-12-21 Thread Luke Palmer
On Sun, Dec 21, 2008 at 10:27 AM, Peter Todd p...@petertodd.org wrote: data Element = Element { elementOrigin :: V, elementSubs :: [Element] } | ElementThunk T Element transform :: T - Element - Element transform t (ElementThunk t2 e) = ElementThunk (tmul t t2) e transform

[Haskell-cafe] Removing/Uninstalling cabal packages ?

2008-12-21 Thread Laurent Giroud
Hi, I have been doing a few experiments with cabal packages lately and I wish to uninstall these to return to a cleaner package base. However, there doesn't seem to be a cabal uninstall command and reading the documentation at http://www.haskell.org/ghc/docs/latest/html/Cabal/index.html

Re: [Haskell-cafe] ANN: bytestring-trie 0.1.0

2008-12-21 Thread Sterling Clover
Thanks for working on this! A nice efficient bytestring-trie is the sort of data structure we should have had in Haskell for some time now, and I'm sure I'll be giving it a great deal of use. Regards, Sterl. On Dec 20, 2008, at 1:06 AM, wren ng thornton wrote:

Re: [Haskell-cafe] Re: Time for a new logo?

2008-12-21 Thread Brandon S. Allbery KF8NH
On 2008 Dec 17, at 8:42, Darrin Thompson wrote: X monad could have a variant of this logo too. X= (That's how I originally thought of it, just was too lazy to post it anywhere. Sorry about that.) Or just a lambda with an extra contrasting stroke to make an X (λ' very roughly, if you have

Re: [Haskell-cafe] Logos of Other Languages

2008-12-21 Thread Daniel van den Eijkel
what about such a variation? something between an ouroborob, a lambda and a mermaid... By the way: I mixed up something: My note, that the orouboros was used as a logo for Heinz von Försters second order cybernetics, was not correct. The correct note should have been: Heinz von Förster, the

Re: [Haskell-cafe] Re: Is this related to monomorphism restriction?

2008-12-21 Thread Ryan Ingram
You have a few options. In Haskell98 (no extensions): a () = (f,f) g () = fst (a ()) -- alternatively g x = fst (a ()) x Here you make it explicit that a and g are functions; the monomorphism restriction is there to stop things that look like values (and therefore you expect to only get

Re: [Haskell-cafe] Re: Time for a new logo?

2008-12-21 Thread Miguel Mitrofanov
BTW, in Russian the character X (pronounced a bit like English H) is the first letter in Haskell. On 21 Dec 2008, at 21:48, Brandon S. Allbery KF8NH wrote: On 2008 Dec 17, at 8:42, Darrin Thompson wrote: X monad could have a variant of this logo too. X= (That's how I originally thought of

[Haskell-cafe] ANN: Data.List.Split

2008-12-21 Thread Brent Yorgey
I am pleased to announce the release of Data.List.Split, which provides a wide range of strategies and a unified combinator framework for splitting lists with respect to some sort of delimiter. It strives to be flexible yet simple. If you've ever wished there was a simple 'split' function you

Re: [Haskell-cafe] Re: Is this related to monomorphism restriction?

2008-12-21 Thread Iavor Diatchki
Hello, You can work around the monomorphism restriction with extensions but to fix the ambiguity in your program that Reiner pointed out you'll have to change the program to specify how you'd like to instantiate a. here are all the types once again: f :: (TestClass a) = a - Integer f = const 1 a

Re: [Haskell-cafe] Removing/Uninstalling cabal packages ?

2008-12-21 Thread brian
On Sun, Dec 21, 2008 at 12:12 PM, Laurent Giroud m...@niaow.com wrote: I have been doing a few experiments with cabal packages lately and I wish to uninstall these to return to a cleaner package base. However, there doesn't seem to be a cabal uninstall command and reading the documentation at

Re: [Haskell-cafe] Re: Is this related to monomorphism restriction?

2008-12-21 Thread Luke Palmer
2008/12/21 Iavor Diatchki iavor.diatc...@gmail.com g :: TestClass a = a - Integer g = fst (a :: (a - Integer, a - Integer)) Which I believe needs to be written: g :: forall a. TestClass a = a - Integer g = fst (a :: (a - Integer, a - Integer)) Here we are using another GHC extension

[Haskell-cafe] The Haskell re-branding exercise

2008-12-21 Thread Paul Johnson
A call has gone out for a new logo for Haskell. Candidates (including a couple of mine) are accumulating here. There has also been a long thread on the Haskell Cafe mailing list. I've lived through a couple of corporate rebranding exercises in my time, and I've read about some others. They

Re: intimidating terminology (was: Re: [Haskell-cafe] Time for a new logo?)

2008-12-21 Thread Brandon S. Allbery KF8NH
On 2008 Dec 19, at 4:13, Lennart Augustsson wrote: When accurate names for Haskell concepts already exist we should use them (as we have tried in the past). There has been too much invention of misleading terminology in computing already. If some people can't handle things having the right

Re: [Haskell-cafe] The Haskell re-branding exercise

2008-12-21 Thread Don Stewart
Wonderful, Paul. Could you add your list of adjectives to the wiki page. Note that the initial deadline was Dec 31, after which time we can filter out dupes and narrow down the logos to about 5 or so different directions to have a vote on. Anything you can do to help direct or improve quality is

[Haskell-cafe] GHC libraries documentation and links to source files

2008-12-21 Thread Manlio Perillo
Hi. I have noted that recent versions of the GHC libraries documentation, no longer have links to the source code. What is the reason? I find it very useful. Thanks Manlio Perillo ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] The Haskell re-branding exercise

2008-12-21 Thread Sebastian Sylvan
2008/12/21 Paul Johnson p...@cogito.org.uk This suggests that the current effort to find a new logo for Haskell needs to go back to the basics. Its no good expecting consensus on one of the suggestions because there are too many options and everyone has their favourite. Nothing will

Re: [Haskell-cafe] The Haskell re-branding exercise

2008-12-21 Thread Don Stewart
Would you be willing to set up a little online voting system (or do you know of one) so we can implement this? Assume there'll be 10 candidates. -- Don sylvan: 2008/12/21 Paul Johnson [1]p...@cogito.org.uk This suggests that the current effort to find a new logo for Haskell

Re: [Haskell-cafe] The Haskell re-branding exercise

2008-12-21 Thread Sebastian Sylvan
I am very shortly travelling abroad for several weeks and will not have (reliable access to) a computer, but isn't this a task for one of the haskell web-apps people (HSP, HAppS, Turbinado, etc.) to show us once and for all why *their* library is better than the competition? :-) On Sun, Dec 21,

Re: [Haskell-cafe] The Haskell re-branding exercise

2008-12-21 Thread Matthias Kilian
On Sun, Dec 21, 2008 at 01:23:33PM -0800, Don Stewart wrote: Would you be willing to set up a little online voting system (or do you know of one) so we can implement this? Assume there'll be 10 candidates. What about www.doodle.com? Ciao, Kili

Re: [Haskell-cafe] The Haskell re-branding exercise

2008-12-21 Thread Don Stewart
kili: On Sun, Dec 21, 2008 at 01:23:33PM -0800, Don Stewart wrote: Would you be willing to set up a little online voting system (or do you know of one) so we can implement this? Assume there'll be 10 candidates. What about www.doodle.com? That looks like it might be an option,

[Haskell-cafe] Threads with high CPU usage

2008-12-21 Thread Günther Schmidt
Hi, in an application of mine I start a long-running operation in a thread via forkIO so that the UI process doesn't get blocked. It just so happens, that the long-running process also takes the CPU to nearly 100% while it runs. During that time the run-time system does *not* switch back

Re: [Haskell-cafe] Threads with high CPU usage

2008-12-21 Thread Brandon S. Allbery KF8NH
On 2008 Dec 21, at 16:47, Don Stewart wrote: redcom: The long running process is pretty atomic, it's a single query to the database which takes up to a minute to complete so I don't see a chance to squeeze a mainIteration in there. How are you compiling this code (-O -threaded ?) and what

Re: [Haskell-cafe] GHC libraries documentation and links to source files

2008-12-21 Thread Donnie Jones
Hello Manilo and Haskell-cafe, On Sun, Dec 21, 2008 at 4:07 PM, Manlio Perillo manlio_peri...@libero.itwrote: Hi. I have noted that recent versions of the GHC libraries documentation, no longer have links to the source code. What is the reason? I find it very useful. I would like to

Re: [Haskell-cafe] Threads with high CPU usage

2008-12-21 Thread Mads Lindstrøm
Hi Günter Günther Schmidt wrote: Hi, in an application of mine I start a long-running operation in a thread via forkIO so that the UI process doesn't get blocked. It just so happens, that the long-running process also takes the CPU to nearly 100% while it runs. During that time the

[Haskell-cafe] Re: Threads with high CPU usage

2008-12-21 Thread Günther Schmidt
Hi Mads, I'm using HDBC with sqlite3 Günther ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Threads with high CPU usage

2008-12-21 Thread Peter Verswyvelen
Would forkOS instead of forkIO help in this case? On Sun, Dec 21, 2008 at 11:16 PM, Mads Lindstrøm mads_lindstr...@yahoo.dkwrote: Hi Günter Günther Schmidt wrote: Hi, in an application of mine I start a long-running operation in a thread via forkIO so that the UI process doesn't get

Re: [Haskell-cafe] Threads with high CPU usage

2008-12-21 Thread Mads Lindstrøm
Hi Peter, Peter Verswyvelen wrote: Would forkOS instead of forkIO help in this case? No, according to http://www.haskell.org/ghc/docs/latest/html/libraries/base/Control-Concurrent.html#v%3AforkOS : Using forkOS instead of forkIO makes no difference at all to the scheduling behaviour of the

Re: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-21 Thread Mads Lindstrøm
Hi Günther, Hi Mads, I'm using HDBC with sqlite3 Looking at http://software.complete.org/software/repositories/entry/hdbc-sqlite3/Database/HDBC/Sqlite3/Connection.hs and http://software.complete.org/software/repositories/entry/hdbc-sqlite3/Database/HDBC/Sqlite3/Statement.hsc you can see

Re: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-21 Thread Don Stewart
redcom: Hi Mads, I just noticed that too. I had been wondering why this problem does not occur with the sample app from RWH eventhough I was employing the same technics as they did. It just occured to me that all the DB interactions in their app are fairly short and thus the

Re: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-21 Thread Günther Schmidt
Hi Mads, I just noticed that too. I had been wondering why this problem does not occur with the sample app from RWH eventhough I was employing the same technics as they did. It just occured to me that all the DB interactions in their app are fairly short and thus the problem never becomes

Re: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-21 Thread Günther Schmidt
Hi Don, Modify the 'unsafe' inports to be 'safe'? I don't think HDBC is going to call back in, so should be fine. John? Sorry, total noob here, could you be more specific? Günther That said, we use Takusen or sqlite3 at work, without troubles. I might also check into that. -- Don

Re: [Haskell-cafe] Comparing on multiple criteria

2008-12-21 Thread David Menendez
On Sun, Dec 21, 2008 at 11:20 AM, Jan-Willem Maessen jmaes...@alum.mit.edu wrote: On Dec 21, 2008, at 8:52 AM, Martijn van Steenbergen wrote: Hello all, Data.Ord has a handy function called comparing, and its documentation shows an example of its use. But what if you want to sort a list of

[Haskell-cafe] Trouble with the ST monad

2008-12-21 Thread Andre Nathan
Hello, I'm trying to write a function that would take an STArray and and shuffle its elements. I'm having trouble with the ST monad, though, and couldn't find out how fix this issue. The problem happens when I use runST to extract the shuffled array from the ST monad. I'm getting the following

Re: [Haskell-cafe] The Haskell re-branding exercise

2008-12-21 Thread ajb
G'day all. Quoting Sebastian Sylvan syl...@student.chalmers.se: Personally I find the current logo horrendous. I think it's ugly and intimidating at the same time. I don't really care too much which one of the proposals should win, just so long as I can weed out some of the ones I really hate.

Re: [Haskell-cafe] Trouble with the ST monad

2008-12-21 Thread Ryan Ingram
The problem is that you are trying to return a mutable array out of an ST computation. This lets the mutability of the computation escape. That's what the s type variable is for; without it, runST is just unsafePerformIO. To solve your problem, you need to eliminate any references to the state

Re: [Haskell-cafe] Records and associated types

2008-12-21 Thread Wolfgang Jeltsch
Am Donnerstag, 11. Dezember 2008 22:04 schrieb Taru Karttunen: Hello What is the correct way to transform code that uses record selection with TypeEq (like HList) to associated types? Hello Taru, you might want to look at

Re: [Haskell-cafe] Threads with high CPU usage

2008-12-21 Thread Andrea Vezzosi
Tried running the program with +RTS -Nn where n = 2 or more? that should use more OS threads On Sun, Dec 21, 2008 at 10:43 PM, Günther Schmidt red...@fedoms.com wrote: Hi, in an application of mine I start a long-running operation in a thread via forkIO so that the UI process doesn't get

[Haskell-cafe] A hell of a question

2008-12-21 Thread Andrzej Jaworski
I just want to say Hello to let you know that there are some serious entities watching you besides monads and FBI:-) There has been a hell of a discussion recently about logos, languages and religion and I want to add to this. First let me disassociate Haskell from Taoism which to may taste

Re: [Haskell-cafe] Trouble with the ST monad

2008-12-21 Thread Andre Nathan
On Sun, 2008-12-21 at 16:47 -0800, Ryan Ingram wrote: The problem is that you are trying to return a mutable array out of an ST computation. This lets the mutability of the computation escape. That's what the s type variable is for; without it, runST is just unsafePerformIO. Thanks! If

Re: [Haskell-cafe] Threads with high CPU usage

2008-12-21 Thread Don Stewart
redcom: Hi, in an application of mine I start a long-running operation in a thread via forkIO so that the UI process doesn't get blocked. It just so happens, that the long-running process also takes the CPU to nearly 100% while it runs. During that time the run-time system does *not*

Re: [Haskell-cafe] Pattern combinators

2008-12-21 Thread Andrew Wagner
I'd love to see a copy of this go up on hackage for experimentation. Would you care to upload your code, or send it to me so I can upload it? On Sun, Dec 21, 2008 at 12:37 AM, David Menendez d...@zednenem.com wrote: On Sat, Dec 20, 2008 at 9:34 PM, Jacques Carette care...@mcmaster.ca wrote:

[Haskell-cafe] Can I build and install GHC 6.10.1 without previous installed ghc

2008-12-21 Thread Wang, Chunye (NSN - CN/Beijing)
Hi All, I have our own Linux distribution installed in my server. it is based on RedHat 9.0. Because it is the server, I can not update it to any other linux distribution Here is my situation, I have no machine with any version of ghc installed. This is

Re: [Haskell-cafe] Can I build and install GHC 6.10.1 without previous installed ghc

2008-12-21 Thread Don Stewart
chunye.wang: Hi All, I have our own Linux distribution installed in my server. it is based on RedHat 9.0. Because it is the server, I can not update it to any other linux distribution Here is my situation, I have no machine with any version of ghc

RE: [Haskell-cafe] Can I build and install GHC 6.10.1 without previous installed ghc

2008-12-21 Thread Wang, Chunye (NSN - CN/Beijing)
Hi Don, I tried to install the ghc 6.8.0 last year but failed for some reason. Now I decide to do it again, because I'd like to try some examples in Real World Haskell Now I remember why I try to install it from source code,

[Haskell-cafe] ANN: llvm-0.4.0.1

2008-12-21 Thread Lennart Augustsson
We have now released version 0.4.0.1 of the Haskell LLVM bindings. (This release that is quite incompatible with the old 0.0.2 release.) LLVM is a virtual machine and the bindings allow you to generate code for this virtual machine. This code can then be executed by a JIT or written to a file