[Haskell-cafe] Re: Maybe off-topic -- Writing contracts or software specifications

2009-04-14 Thread Achim Schneider
Richard O'Keefe o...@cs.otago.ac.nz wrote: If you have a low level of trust, you'll need a great level of detail, and it still won't help. Heh. Keep your friends close, your enemies closer. Freelancing, I was always paid per hour, not per feature. From my experience, writing something like

Re: [Haskell-cafe] How the following works

2009-04-14 Thread Lennart Augustsson
Assuming you already think you know what cinits does, you can convince yourself using induction. On Tue, Apr 14, 2009 at 11:16 AM, Tsunkiet Man temp.t...@gmail.com wrote: Let's see, if I execute it by hand: cinits :: [a] - [[a]] cinits [] = [[]] cinits (x:xs) = [] : map (x:) (cinits xs)

Re: [Haskell-cafe] ANN: Elerea, another FRP library

2009-04-14 Thread Patai Gergely
And just as IO is unnecessary for behavior (functions of time), it's also unnecessary for imagery (functions of space). Continuing with the functional (non-IO) theme, you can give a semantically precise, composable and simple type of images. Yes, that's a further separation of concerns.

[Haskell-cafe] Re: Best text editor

2009-04-14 Thread Achim Schneider
FFT fft1...@gmail.com wrote: Has anyone tried Yi? Yes, and I figured I'd have to edit the keymap to get productive. While it features a fully functional subset of vim that's more than enough to efficiently edit files, it's not the subset I use... and then I was too lazy to actually do it.

Re[2]: [Haskell-cafe] Best text editor

2009-04-14 Thread Bulat Ziganshin
Hello Alexandr, Tuesday, April 14, 2009, 6:37:38 AM, you wrote: Hi I would like to follow the crowd and find out what text editor everyone uses for haskell on windows. * HippoEdit (http://www.hippoedit.com/) i've tried HippoEdit and don't recommend it. it's work in progress so i

Re: [Haskell-cafe] ANN: Elerea, another FRP library

2009-04-14 Thread Patai Gergely
Interesting. I'm testing it on Window though. You're using Linux? Maybe the scheduling is different. Now I tried it on Windows in VirtualBox, and it still looks quite smooth to me (except that hardware acceleration doesn't seem to work properly through virtualisation, but it's okay as long as I

[Haskell-cafe] Re: Best text editor

2009-04-14 Thread Achim Schneider
Melanie_Green jac_legend_...@hotmail.com wrote: Hi I would like to follow the crowd and find out what text editor everyone uses for haskell on windows. Have you considered using leksah? While it doesn't focus on being an editor, it's still a darn fine way to edit Haskell. -- (c) this sig

Re: [Haskell-cafe] How the following works

2009-04-14 Thread Tsunkiet Man
Let's see, if I execute it by hand: cinits :: [a] - [[a]] cinits [] = [[]] cinits (x:xs) = [] : map (x:) (cinits xs) cinits [1,2,3] = [] : map (1:) ( [] : map (2:) ( [] : map (3:) ( [[]]) ) ) = [] : map (1:) ( [] : map (2:) ( [] : map (3:) [[]] ) ) = [] :

[Haskell-cafe] Non-atomic atoms for type-level programming

2009-04-14 Thread Claus Reinke
The recent GHC trac ticket revision reminded me of the old open type-sharing problem with type tags and record labels: - if type-level tags (such as 'data TTrue'/'data TFalse') are declared repeatedly in separate modules, they represent separate types, preventing shared use (your

Re: [Haskell-cafe] Types and hashes of hashes, trouble for a Java-programmer...

2009-04-14 Thread John Smith
Thanks, I was close, but the I was trying to use (something like) this statement without the return: maybe (return Nothing) (flip HashTable.lookup 1000) More or less like this: maybe (Nothing) (flip HashTable.lookup 1000) Which did't work... Guess the return is needed because we use a new monad

Re: [Haskell-cafe] How the following works

2009-04-14 Thread Daniel Fischer
Am Dienstag 14 April 2009 10:39:28 schrieb Tsunkiet Man: Hello, I can hardly imagine how the following code works: cinits :: [a] - [[a]] cinits [] = [[]] cinits (x:xs) = [] : map (x:) (cinits xs) can someone give me a good explaination? Perhaps it's easier to follow as a list

[Haskell-cafe] Looking for the fastest Haskell primes algorithm

2009-04-14 Thread Niemeijer, R.A.
Today I happened to need a large list of prime numbers. Obviously this is a well-known problem, so I figured there would be something on Hackage that I could use. Surprisingly, there isn't, or if there is it's not easy to find. Searching for prime or primes on Hackage reveals nothing. Searching

Re: [Haskell-cafe] Looking for the fastest Haskell primes algorithm

2009-04-14 Thread Andrew Wagner
Some other ideas for things to put in this package possibly: is_prime :: Int - Bool nth_prime :: Int - Int -- or Int - Integer prime_factors :: Int - [Int] I'm assuming there are faster ways of doing the first 2 than by just simply looking through all of primes. Someone should also look through

Re: [Haskell-cafe] Looking for the fastest Haskell primes algorithm

2009-04-14 Thread Eugene Kirpichov
I'd suggest also primesFrom :: Integer - [Integer] and probably a separate function nextPrime :: Integer - Integer 2009/4/14 Andrew Wagner wagner.and...@gmail.com: Some other ideas for things to put in this package possibly: is_prime :: Int - Bool nth_prime :: Int - Int -- or Int - Integer

Re: [Haskell-cafe] Best text editor

2009-04-14 Thread Juan Pedro Bolivar Puente
and Visual Haskell had some unique features (such as hovering tooltips showing types) that are now found in the F# editor, and should now be easier to implement with the recent GHC API (I guess). haskell-mode for Emacs does show the type signature of standard functions in the mini-buffer when

[Haskell-cafe] The Monad.Reader (14) - Call for copy

2009-04-14 Thread Wouter Swierstra
Call for Copy The Monad.Reader - Issue 14 Please consider writing something for the next issue of The Monad.Reader. The deadline for Issue 14 is: ** May 15, 2009 ** The Monad.Reader is a electronic magazine about all things

Re: [Haskell-cafe] Looking for the fastest Haskell primes algorithm

2009-04-14 Thread Martijn van Steenbergen
Niemeijer, R.A. wrote: Since it’s such a common problem I’d say it would be a good idea to add a package to Hackage that exports primes :: [Integer] and hides the ugly implementation details. Data.Numbers.Primes seems a logical choice for the namespace, but I’m open to suggestions.

Re: [Haskell-cafe] Looking for the fastest Haskell primes algorithm

2009-04-14 Thread Edward Kmett
You might want to start with the Sieve of Atkin: http://en.wikipedia.org/wiki/Sieve_of_Atkin -Edward On Tue, Apr 14, 2009 at 8:40 AM, Niemeijer, R.A. r.a.niemei...@tue.nlwrote: Today I happened to need a large list of prime numbers. Obviously this is a well-known problem, so I figured there

Re: [Haskell-cafe] ANN: hmatrix-static: statically-sized linear algebra

2009-04-14 Thread Alberto Ruiz
Hi Reiner, Fantastic work! User-friendly static dimension checking is an essential feature for any decent linear algebra library. Your interface using quasiquotation and view patterns is very elegant and practical. I am happy that hmatrix is useful, but I'm afraid that its primitive dynamic

[Haskell-cafe] Printing list of enum type

2009-04-14 Thread michael rice
What do I need to add to this Color enum type to print a list of them? Michael === data Color     = Red     | Blue     | Green     | Yellow     | Orange     | Brown     | White     | Black instance Show Color where     show Red   = Red     show Blue  = Blue     show

Re: [Haskell-cafe] Printing list of enum type

2009-04-14 Thread Eugene Kirpichov
1. data Color = Red | Green | Blue deriving (Show) 2. [Red,Black,White] 2009/4/14 michael rice nowg...@yahoo.com: What do I need to add to this Color enum type to print a list of them? Michael === data Color     = Red     | Blue     | Green     | Yellow     | Orange     |

Re: [Haskell-cafe] Printing list of enum type

2009-04-14 Thread michael rice
Dumb, dumb, dumb, dumb, DUMB!, he Lisped. Thanks. Michael --- On Tue, 4/14/09, Andrew Wagner wagner.and...@gmail.com wrote: From: Andrew Wagner wagner.and...@gmail.com Subject: Re: [Haskell-cafe] Printing list of enum type To: michael rice nowg...@yahoo.com Cc: haskell-cafe@haskell.org Date:

Re: [Haskell-cafe] ANN: Elerea, another FRP library

2009-04-14 Thread Wolfgang Jeltsch
Am Freitag, 10. April 2009 18:41 schrieb Patai Gergely: is based on some unsafePerformIO dark magic (that might easily break depending on many factors) I wonder if this breaks referential transparency. Say, you define a signal s and use s twice in some expression. s may be evaluated once and

Re: [Haskell-cafe] ANN: Elerea, another FRP library

2009-04-14 Thread Wolfgang Jeltsch
Am Dienstag, 14. April 2009 11:33 schrieb Patai Gergely: and then the integration of a Grapefruit-like and a Reactive-like system could be the ultimate solution in the long run. What do you think, Grapefruit is lacking, compared to Reactive? Best wishes, Wolfgang

[Haskell-cafe] Converting IO [XmlTree] to [XmlTree]

2009-04-14 Thread rodrigo.bonifacio
Dear Sirs, I guess this is a very simple question. How can I convert IO [XmlTree] to just a list of XmlTree? Regards, Rodrigo.   ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Converting IO [XmlTree] to [XmlTree]

2009-04-14 Thread Luke Palmer
On Tue, Apr 14, 2009 at 8:54 AM, rodrigo.bonifacio rodrigo.bonifa...@uol.com.br wrote: Dear Sirs, I guess this is a very simple question. How can I convert IO [XmlTree] to just a list of XmlTree? This is very important: you cannot. But you can still get your hands on one inside a do block.

Re: [Haskell-cafe] Converting IO [XmlTree] to [XmlTree]

2009-04-14 Thread Alex Queiroz
Hallo, On 4/14/09, rodrigo.bonifacio rodrigo.bonifa...@uol.com.br wrote: Dear Sirs, I guess this is a very simple question. How can I convert IO [XmlTree] to just a list of XmlTree? The short answer is: You cannot. The longer answer is: Only put things in the IO monad when you need

Re: [Haskell-cafe] Converting IO [XmlTree] to [XmlTree]

2009-04-14 Thread Cristiano Paris
On Tue, Apr 14, 2009 at 4:54 PM, rodrigo.bonifacio rodrigo.bonifa...@uol.com.br wrote: Dear Sirs, I guess this is a very simple question. How can I convert IO [XmlTree] to just a list of XmlTree? Quick and dirty answer: unsafePerformIO. That's an easy finding on Hoogle:

Re: [Haskell-cafe] Converting IO [XmlTree] to [XmlTree]

2009-04-14 Thread Cristiano Paris
On Tue, Apr 14, 2009 at 5:01 PM, Luke Palmer lrpal...@gmail.com wrote: ... This is very important: you cannot. I'd answer You shouldn't, unless you know what you are doing. In some cases, not only is unsafePerformIO desirable but also necessary (I'm thinking of Debug.Trace). Cristiano

Re: [Haskell-cafe] ANN: Elerea, another FRP library

2009-04-14 Thread Wolfgang Jeltsch
Am Samstag, 11. April 2009 16:57 schrieb Patai Gergely: Any idea how Elerea compares to Grapefruit? It's great to see a lot of competition in the FRP arena, but I hope in the end this results in a really usable and scalable FRP system for Haskell :-) I think Wolfgang can judge this better,

Re: [Haskell-cafe] Converting IO [XmlTree] to [XmlTree]

2009-04-14 Thread Luke Palmer
On Tue, Apr 14, 2009 at 9:01 AM, Cristiano Paris fr...@theshire.org wrote: On Tue, Apr 14, 2009 at 4:54 PM, rodrigo.bonifacio rodrigo.bonifa...@uol.com.br wrote: Dear Sirs, I guess this is a very simple question. How can I convert IO [XmlTree] to just a list of XmlTree? Quick and

Re: [Haskell-cafe] Converting IO [XmlTree] to [XmlTree]

2009-04-14 Thread Andrew Wagner
Here's another way of looking at what others have already said. The only way you can do that is within the scope of another IO action. For example: outputXmlTrees :: IO () outputXmlTrees = do trees - inputXmlTrees; let newTrees = transform trees; print . show $ newTrees Notice a few things:

Re: [Haskell-cafe] Converting IO [XmlTree] to [XmlTree]

2009-04-14 Thread John Van Enk
Quick and dirty answer: unsafePerformIO. You can do a lot of cool things with a table saw if you take the blade guard off. On Tue, Apr 14, 2009 at 11:01 AM, Cristiano Paris fr...@theshire.orgwrote: On Tue, Apr 14, 2009 at 4:54 PM, rodrigo.bonifacio rodrigo.bonifa...@uol.com.br wrote: Dear

Re: [Haskell-cafe] Converting IO [XmlTree] to [XmlTree]

2009-04-14 Thread Bulat Ziganshin
Hello rodrigo.bonifacio, Tuesday, April 14, 2009, 6:54:07 PM, you wrote: I guess this is a very simple question. How can I convert IO [XmlTree] to just a list of XmlTree? IO [XmlTree] is an action returning [XmlTree]. so to convert it to [XmlTree] you just need to execute it in IO monad:

Re: [Haskell-cafe] Converting IO [XmlTree] to [XmlTree]

2009-04-14 Thread Cristiano Paris
On Tue, Apr 14, 2009 at 5:09 PM, Luke Palmer lrpal...@gmail.com wrote: ... Please don't say that.  He's a beginner. You realize that the path of least resistance will be to use it, right? You see why that's not a good thing? Even experts don't use this function. (To the O.P.:  don't use it)

win64 ghc version Re[4]: [Haskell-cafe] GHC needs a 64 bit machine to be fast?

2009-04-14 Thread Bulat Ziganshin
Hello Peter, Wednesday, April 8, 2009, 2:42:24 PM, you wrote: if you need win64 ghc version - add yourself to CC list of http://hackage.haskell.org/trac/ghc/ticket/1884 Well, make that 2! :-) On Wed, Apr 8, 2009 at 11:47 AM, Bulat Ziganshin bulat.zigans...@gmail.com wrote: Hello Peter,

Re: [Haskell-cafe] Converting IO [XmlTree] to [XmlTree]

2009-04-14 Thread Gwern Branwen
On Tue, Apr 14, 2009 at 10:54 AM, rodrigo.bonifacio rodrigo.bonifa...@uol.com.br wrote: Dear Sirs, I guess this is a very simple question. How can I convert IO [XmlTree] to just a list of XmlTree? Regards, Rodrigo. One good link on this topic is http://haskell.org/haskellwiki/Avoiding_IO

Re: [Haskell-cafe] Converting IO [XmlTree] to [XmlTree]

2009-04-14 Thread Luke Palmer
On Tue, Apr 14, 2009 at 9:24 AM, Cristiano Paris fr...@theshire.org wrote: On Tue, Apr 14, 2009 at 5:09 PM, Luke Palmer lrpal...@gmail.com wrote: ... Please don't say that. He's a beginner. You realize that the path of least resistance will be to use it, right? You see why that's not a

Re[2]: [Haskell-cafe] Converting IO [XmlTree] to [XmlTree]

2009-04-14 Thread Bulat Ziganshin
Hello Cristiano, Tuesday, April 14, 2009, 7:24:40 PM, you wrote: unsafePerformIO is not evil by itself, it's there for a purpose and, as for anything else in the language, it's better to understand when to use it we just think that author of original question don't yet have good knowledge of

Re: [Haskell-cafe] Converting IO [XmlTree] to [XmlTree]

2009-04-14 Thread Cristiano Paris
On Tue, Apr 14, 2009 at 5:42 PM, Luke Palmer lrpal...@gmail.com wrote: ... However, the way I see it is that unsafePerformIO *is* evil by itself, and it is only by the addition of Holy Water that it is benign to use. That's what I meant but your words are indeed more effective :) Ryan

Re: [Haskell-cafe] Converting IO [XmlTree] to [XmlTree]

2009-04-14 Thread Jules Bean
Cristiano Paris wrote: On Tue, Apr 14, 2009 at 5:09 PM, Luke Palmer lrpal...@gmail.com wrote: ... Please don't say that. He's a beginner. You realize that the path of least resistance will be to use it, right? You see why that's not a good thing? Even experts don't use this function. (To the

Re: [Haskell-cafe] Converting IO [XmlTree] to [XmlTree]

2009-04-14 Thread Cristiano Paris
On Tue, Apr 14, 2009 at 5:54 PM, Jules Bean ju...@jellybean.co.uk wrote: ... I'm convinced about what you say and perhaps I answered the way I did just because I'm convinced that, for a newbie, knowing about the existence of unsafePerformIO can't cause any harm. I was a bit surprised by the

Re: [Haskell-cafe] Converting IO [XmlTree] to [XmlTree]

2009-04-14 Thread Jake McArthur
rodrigo.bonifacio wrote: I guess this is a very simple question. How can I convert IO [XmlTree] to just a list of XmlTree? You can't, unless you use `unsafePeformIO`, as others have already pointed out. Yet others have, more correctly, suggested that you use do notation to bind a variable

[Haskell-cafe] Re: Converting IO [XmlTree] to [XmlTree]

2009-04-14 Thread Achim Schneider
rodrigo.bonifacio rodrigo.bonifa...@uol.com.br wrote: Dear Sirs, I guess this is a very simple question. How can I convert IO [XmlTree] to just a list of XmlTree? unsafeCoerce. Seriously, you just don't, you weld stuff together using =. It takes an 'IO a' and a function 'a - IO b' and

[Haskell-cafe] Re: Converting IO [XmlTree] to [XmlTree]

2009-04-14 Thread Achim Schneider
Cristiano Paris fr...@theshire.org wrote: I was a bit surprised by the strong reaction about my citation of unsafePerformIO. Maybe it'd useful, for the future, to write a document explaining how to help newbies properly, maybe putting it in the mailing list charter. 1) Tell them about

Re: [Haskell-cafe] Looking for the fastest Haskell primes algorithm

2009-04-14 Thread Max Rabkin
On Tue, Apr 14, 2009 at 2:47 PM, Andrew Wagner wagner.and...@gmail.com wrote: Some other ideas for things to put in this package possibly: is_prime :: Int - Bool I'd also add isProbablePrime using a Miller-Rabin test or somesuch, for use with large numbers. It'd have to be in a monad which

Re: [Haskell-cafe] Converting IO [XmlTree] to [XmlTree]

2009-04-14 Thread Donn Cave
Quoth Cristiano Paris fr...@theshire.org, I was a bit surprised by the strong reaction about my citation of unsafePerformIO. Well, there might be a couple of things going on here. Part of it is how to guess the unstated context of a question - I'm fairly sure that given a more thorough

[Haskell-cafe] GHC including System.Time but not Data.Time?

2009-04-14 Thread John Goerzen
Hi folks, Apologies in advance because this sounds rantish... So I went to my friendly API reference at http://www.haskell.org/ghc/docs/latest/html/libraries/index.html and noticed that I couldn't find Data.Time there anymore. Though it was still at

Re: [Haskell-cafe] GHC including System.Time but not Data.Time?

2009-04-14 Thread Bulat Ziganshin
Hello John, Tuesday, April 14, 2009, 8:44:12 PM, you wrote: I understand the goal of removing stuff from GHC, but the practical implications can be rather annoying. i think that Haskell Platform will eventually replace what GHC was for a years, i.e. out-of-box solution for practical haskell

Re: [Haskell-cafe] GHC including System.Time but not Data.Time?

2009-04-14 Thread Lennart Augustsson
Removing a package in a minor release is, to quote, an epic fail. I don't understand how that could be done. -- Lennart On Tue, Apr 14, 2009 at 6:56 PM, Bulat Ziganshin bulat.zigans...@gmail.com wrote: Hello John, Tuesday, April 14, 2009, 8:44:12 PM, you wrote: I understand the goal of

Re: [Haskell-cafe] Converting IO [XmlTree] to [XmlTree]

2009-04-14 Thread Lennart Augustsson
Never answer such newbie questions with unsafePerformIO. That's the wrong answer 99.99% of the time, but giving it to a newbie they might follow your advice. On Tue, Apr 14, 2009 at 5:01 PM, Cristiano Paris fr...@theshire.org wrote: On Tue, Apr 14, 2009 at 4:54 PM, rodrigo.bonifacio

Re: [Haskell-cafe] Looking for the fastest Haskell primes algorithm

2009-04-14 Thread Michael Matsko
You might want to look at Pari/GP ( http://pari.math.u-bordeaux.fr/ ) for ideas of what kind of functions to supply. Also, as a source of ideas for algorithms. Mike Matsko - Original Message - From: Max Rabkin max.rab...@gmail.com To: Andrew Wagner wagner.and...@gmail.com Cc: R.A.

Re: [Haskell-cafe] Non-atomic atoms for type-level programming

2009-04-14 Thread Tillmann Rendel
- if type-level tags (such as 'data TTrue'/'data TFalse') are declared repeatedly in separate modules, they represent separate types, preventing shared use (your type-level predicate doesn't return my version of 'TTrue'/'TFalse') How is the need for a common import for 'data TTrue;

Re: [Haskell-cafe] ANN: Elerea, another FRP library

2009-04-14 Thread Patai Gergely
I wonder if this breaks referential transparency. Say, you define a signal s and use s twice in some expression. s may be evaluated once and it maybe evaluated twice. Does this make a difference? I'm not sure about the answer at the moment, but I believe we'd simply get two identically behaving

[Haskell-cafe] error handling (esp. IO/exceptions)

2009-04-14 Thread brian
I'm finding it hard to write robust code that isn't really ugly. Suppose I want to write execute :: FilePath - [String] - IO (Either ExecuteError ExitCode) where 'ExecuteError' is a data type representing all the ways 'execute' could fail and that 'execute p args' is supposed to * ensure p

Re: [Haskell-cafe] Printing list of enum type

2009-04-14 Thread John Dorsey
Michael, What do I need to add to this Color enum type to print a list of them? You can also easily print a list of /all/ of them. Regards, John scratch$ cat color.hs data Color     = Red     | Blue     | Green     | Yellow     | Orange     | Brown     | White     | Black deriving

Re: [Haskell-cafe] error handling (esp. IO/exceptions)

2009-04-14 Thread Miguel Mitrofanov
What about ErrorT monad transformer? Well, if it's not what you really want, you can define your own one without ugly Error class, so it'd be something like execute :: FilePath - [String] - MyCoolErrorT ExecuteError IO ExitCode On 14 Apr 2009, at 23:29, br...@lorf.org wrote: I'm finding it

Re: [Haskell-cafe] error handling (esp. IO/exceptions)

2009-04-14 Thread brian
On Tuesday, 14.04.09 at 23:36, Miguel Mitrofanov wrote: What about ErrorT monad transformer? I don't see how it helps in my situation. ErrorT doesn't catch exceptions, for example. Suppose I did make something like ErrorT that catches exceptions and turn them into Lefts. Where would (=) get my

Re: [Haskell-cafe] error handling (esp. IO/exceptions)

2009-04-14 Thread Lennart Augustsson
There's no way to make all your tests atomically, e.g, between the test that p exists and executing p, some other process could removce p. So the right way to do this (like opening a file), is to try executing it and let the OS tell you if it failed. On Tue, Apr 14, 2009 at 9:29 PM,

Re: [Haskell-cafe] error handling (esp. IO/exceptions)

2009-04-14 Thread Henning Thielemann
On Tue, 14 Apr 2009, Miguel Mitrofanov wrote: What about ErrorT monad transformer? Well, if it's not what you really want, you can define your own one without ugly Error class, so it'd be something like execute :: FilePath - [String] - MyCoolErrorT ExecuteError IO ExitCode My MyCoolErrorT

Re: [Haskell-cafe] error handling (esp. IO/exceptions)

2009-04-14 Thread Henning Thielemann
On Tue, 14 Apr 2009, br...@lorf.org wrote: On Tuesday, 14.04.09 at 23:36, Miguel Mitrofanov wrote: What about ErrorT monad transformer? I don't see how it helps in my situation. ErrorT doesn't catch exceptions, for example. Suppose I did make something like ErrorT that catches exceptions

Re: [Haskell-cafe] error handling (esp. IO/exceptions)

2009-04-14 Thread brian
On Tuesday, 14.04.09 at 22:13, Lennart Augustsson wrote: So the right way to do this (like opening a file), is to try executing it and let the OS tell you if it failed. I know, but the various functions that create processes don't help me know whether the program actually ran or not. For

Re: [Haskell-cafe] ANN: Elerea, another FRP library

2009-04-14 Thread Peter Verswyvelen
I will test it on a couple of machines, desktops and laptops. I think the problem was my laptop going into power safe mode or something, since sometimes it runs smooth, sometimes it doesn't. This could indeed be a problem with GLFW's time attribute on windows (which uses the CPU tick frequency

Re: [Haskell-cafe] ANN: Elerea, another FRP library

2009-04-14 Thread Peter Verswyvelen
Ouch, I did not see Wolfgang's email nor your reply, sorry for the noise (which I'm doing again with this email ;-) On Tue, Apr 14, 2009 at 11:01 PM, Peter Verswyvelen bugf...@gmail.comwrote: I will test it on a couple of machines, desktops and laptops. I think the problem was my laptop going

Re: win64 ghc version Re[4]: [Haskell-cafe] GHC needs a 64 bit machine to be fast?

2009-04-14 Thread Peter Verswyvelen
I will add myself a million times then :-) On Tue, Apr 14, 2009 at 5:25 PM, Bulat Ziganshin bulat.zigans...@gmail.comwrote: Hello Peter, Wednesday, April 8, 2009, 2:42:24 PM, you wrote: if you need win64 ghc version - add yourself to CC list of

Re: [Haskell-cafe] Printing list of enum type

2009-04-14 Thread michael rice
I didn't know that, but there's a lot I don't know about Haskell. It works great. Thanks! Michael --- On Tue, 4/14/09, John Dorsey hask...@colquitt.org wrote: From: John Dorsey hask...@colquitt.org Subject: Re: [Haskell-cafe] Printing list of enum type To: michael rice nowg...@yahoo.com Cc:

[Haskell-cafe] [ANNOUNCE] hgettext 0.1.10 - last major release

2009-04-14 Thread Vasyl Pasternak
Hello, I've uploaded last (and latest) significant version on hgettext module. Currently it works fine, and has bindings to all gettext functions (from libintl.h). Next versions will be only bug fixes of this version. GNU GetText allows you only to create simple, standalone desktop applications

[Haskell-cafe] lift in TemplateHaskell?

2009-04-14 Thread Lyle Kopnicky
Hi folks, I'm having trouble reading the TemplateHaskell docs and trying to do something that seems like it should be simple. In MetaML, there is a 'lift' function which does exactly what I want to do. Here's an example function: let double n = [| 2 * $( litE (integerL n) ) |] This works as

[Haskell-cafe] Re: lift in TemplateHaskell?

2009-04-14 Thread Lyle Kopnicky
OK, I figured it out. The class is Language.Haskell.TH.Syntax.Lift. The function is Language.Haskell.TH.Syntax.lift. And I can rewrite my function as: let double n = [| 2 * n |] I wish this were explained in the TemplateHaskell documentation. - Lyle On Tue, Apr 14, 2009 at 2:51 PM, Lyle

Re: [Haskell-cafe] error handling (esp. IO/exceptions)

2009-04-14 Thread Donn Cave
Quoth br...@lorf.org, On Tuesday, 14.04.09 at 22:13, Lennart Augustsson wrote: So the right way to do this (like opening a file), is to try executing it and let the OS tell you if it failed. I know, but the various functions that create processes don't help me know whether the program

Re: [Haskell-cafe] error handling (esp. IO/exceptions)

2009-04-14 Thread Donn Cave
Quoth br...@lorf.org, execute :: FilePath - [String] - IO (Either ExecuteError ExitCode) where 'ExecuteError' is a data type representing all the ways 'execute' could fail and that 'execute p args' is supposed to * ensure p exists * get p's permissions * ensure p is readable * ensure p

Re: [Haskell-cafe] Re: Best text editor

2009-04-14 Thread Xiao-Yong Jin
Stefan Monnier monn...@iro.umontreal.ca writes: I'm a beginner, but I'll chime in and say I use Emacs with haskell-mode. It's auto-indentation is a bit complex in behavior which is unappealing (I feel like I never know what it's going to do when I hit tab), but I would be curious what someone

Re: [Haskell-cafe] Re: Best text editor

2009-04-14 Thread Jeff Wheeler
On Tue, 2009-04-14 at 11:34 +0200, Achim Schneider wrote: Yes, and I figured I'd have to edit the keymap to get productive. While it features a fully functional subset of vim that's more than enough to efficiently edit files, it's not the subset I use... and then I was too lazy to actually do

Re: [Haskell-cafe] glut installation using cabal failed

2009-04-14 Thread Henk-Jan van Tuyl
On Tue, 14 Apr 2009 08:25:52 +0200, Raja Koduru kscr...@gmail.com wrote: hi, I am a beginner to haskell. I am trying to install glut using cabal install glut Pasting here a tail of the output - checking for unistd.h... yes

Re: [Haskell-cafe] Re: Best text editor

2009-04-14 Thread Toby Hutton
On Wed, Apr 15, 2009 at 8:57 AM, Jeff Wheeler j...@nokrev.com wrote: As one of the Yi developers, I'd love to hear some more specific feedback on this. Do you remember any specific Vim features that were missing? My main gripe with the vi emulation in Yi was in vty mode[1] and how it was