[Haskell-cafe] Re: [Haskell] Google Summer of Code

2009-02-11 Thread John Lato
ghc can generate very fast code for binary I/O.Check out (shameless self-promotion) http://johnlato.blogspot.com for my recent writeup on creating a high-performance, pure-Haskell, Iteratee-based WAVE file reader. Sincerely, John Lato anyway it's impossible due to slow code generated by ghc

[Haskell-cafe] Re: Re[2]: [Haskell] Google Summer of Code

2009-02-11 Thread John Lato
On Wed, Feb 11, 2009 at 8:05 PM, Bulat Ziganshin bulat.zigans...@gmail.com wrote: Hello John, Wednesday, February 11, 2009, 8:54:35 PM, you wrote: I know you've talked about performance in the past, and I don't want to start a huge argument, but do you have recent data to back this up?

[Haskell-cafe] Re: 1,000 packages, so let's build a few!

2009-02-02 Thread John Lato
to C libraries, this is great news. John Lato ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: C-like Haskell

2009-01-29 Thread John Lato
the same. Can this be ascribed to an overflow error? C version: $ time ./circ 3141592649589764829 ^^ Haskell version: time ./circ2 3141592653589764829 ^^ John Lato ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Re: C-like Haskell

2009-01-29 Thread John Lato
On Thu, Jan 29, 2009 at 11:30 AM, Duncan Coutts duncan.cou...@worc.ox.ac.uk wrote: On Thu, 2009-01-29 at 10:35 +, John Lato wrote: On Wed, 2009-01-28 at 20:11 -0500, sam lee wrote: Did you print it? I'm using same code with ghc --make -O2 and it takes forever to finish. Yes, you

[Haskell-cafe] Re: Why binding to existing widget toolkits doesn't make any sense

2009-01-28 Thread John Lato
with widgets and layout? John Lato ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread John Lato
consider using a Writer for. Hence, it's a specific example of both the advantages that generality provides* and a programming use for a monoid. John Lato *) just being more general isn't always an advantage. As abstractions progress, iIt becomes increasingly difficult to apply abstract concepts

[Haskell-cafe] Re: Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread John Lato
that many Haskellers would find it interesting at the least. John Lato ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: State Monad - using the updated state

2009-01-08 Thread John Lato
, it takes progressively longer to traverse the list to retrieve the current value. (N.B. I haven't tested these specific examples, but I think I'm right.) Cheers, John Lato ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

[Haskell-cafe] Re: Iteratee-based IO and lightweight monadic

2008-12-10 Thread John Lato
From: Artyom Shalkhakov [EMAIL PROTECTED] Hello, Is anybody planning to use these shiny new ways for doing IO? I'm also interested in a fair comparison of ByteString/Binary with iteratee-based IO. Has anybody done this? I would like to use Iteratee-based IO, and have been doing some

[Haskell-cafe] Re: Go Haskell! - array libraries

2008-11-29 Thread John Lato
From: Andrew Coppin [EMAIL PROTECTED] My view would be to let the free market of developers decide what is best. No bottlenecks -- there's too many Haskell libraries already (~1000 now). And this approach has yielded more code than ever before, more libraries than ever before, and library

Re: [Haskell-cafe] build tools and Cabal

2008-11-26 Thread John Lato
On Tue, Nov 25, 2008 at 8:18 PM, Duncan Coutts [EMAIL PROTECTED] wrote: On Tue, 2008-11-25 at 01:30 +, John Lato wrote: Hello, Cabal allows specifying arguments for tools it recognizes on the command line, e.g. runhaskell Setup.hs configure --c2hs-option=some_option Unfortunately, I

[Haskell-cafe] build tools and Cabal

2008-11-24 Thread John Lato
Hello, Cabal allows specifying arguments for tools it recognizes on the command line, e.g. runhaskell Setup.hs configure --c2hs-option=some_option Unfortunately, I can't find a way to make this work with .cabal (or .buildinfo) files, except for the specific cases of ghc, hugs, and nhc98

[Haskell-cafe] Re: Haskell-Cafe Digest, Vol 63, Issue 23

2008-11-14 Thread John Lato
next week, but there's a lot of tidying to be done in the current state. How many people care about reading/writing audio files? I've been re-working the HSoundFile API, experimenting with different designs, comparing packages, etc., and I could do a write-up if anyone is interested. John Lato

Re: [Haskell-cafe] performance difference for binary-0.4.3.1 with ghc-6.8.3 and ghc-6.10

2008-10-29 Thread John Lato
On Tue, Oct 28, 2008 at 5:43 PM, Don Stewart [EMAIL PROTECTED] wrote: jwlato: Hello, I was experimenting with using ghc-6.10.0.20081007 on a project, and it seems that binary-0.4.3.1 has markedly worse performance in certain cases. With the following simple test: import qualified

Re: [Haskell-cafe] performance difference for binary-0.4.3.1 with ghc-6.8.3 and ghc-6.10

2008-10-28 Thread John Lato
On Mon, Oct 27, 2008 at 12:34 AM, Alexander Dunlap [EMAIL PROTECTED] wrote: On Sun, Oct 26, 2008 at 9:36 AM, John Lato [EMAIL PROTECTED] wrote: Hello, I was experimenting with using ghc-6.10.0.20081007 on a project, and it seems that binary-0.4.3.1 has markedly worse performance in certain

[Haskell-cafe] performance difference for binary-0.4.3.1 with ghc-6.8.3 and ghc-6.10

2008-10-26 Thread John Lato
? Thank you, John Lato ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] building c2hs on Mac

2008-10-23 Thread John Lato
, John Lato ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] building c2hs on Mac

2008-10-23 Thread John Lato
On Thu, Oct 23, 2008 at 1:00 PM, Svein Ove Aas [EMAIL PROTECTED] wrote: On Thu, Oct 23, 2008 at 12:38 PM, John Lato [EMAIL PROTECTED] wrote: Hello, I've been trying to build c2hs-0.15.1 on an Intel Mac (10.4), and am having some difficulty. It has dependencies on happy and alex, which would

Re: [Haskell-cafe] building c2hs on Mac

2008-10-23 Thread John Lato
I don't know; I'll look into this. John On Thu, Oct 23, 2008 at 2:16 PM, Sean Leather [EMAIL PROTECTED] wrote: except that alex itself seems to require alex (using alex 2.2). Is this also true for the Hackage package? I seem to remember using the alex and happy packages for some reason.

[Haskell-cafe] Re: What I wish someone had told

2008-10-17 Thread John Lato
Richard O'Keefe wrote: On 17 Oct 2008, at 9:53 am, Daryoush Mehrtash wrote: So does this mean that the reason for complexity of generics is the Java inheritance? No. The reason for the complexity of generics in Java is that they weren't designed into the language in the first place. It

[Haskell-cafe] Re: What I wish someone had told me...

2008-10-15 Thread John Lato
I'd like to thank everyone who replied to my OP, and also perhaps clarify one point. I wasn't trying to be argumentative or negative about any work people have done to make Haskell approachable for OO programmers (or any other programmers, for that matter). I simply wanted to know what others

[Haskell-cafe] Re: What I wish someone had told me...

2008-10-15 Thread John Lato
Albet Lai wrote: John Lato wrote: Are you advocating introducing existential types to beginning Haskellers? I think something with the scary name existential quantification would greatly increase the head'splodin' on the learnin' slope. OOP(*) advocates introducing existential types

Re: [Haskell-cafe] What I wish someone had told me...

2008-10-14 Thread John Lato
different kinds of types from getListOfData depending on circumstances. -- Lennart On Tue, Oct 14, 2008 at 1:11 PM, John Lato [EMAIL PROTECTED] wrote: I was just thinking about what I wish someone had told me when I started working with Haskell (not that long ago). It would have saved me

[Haskell-cafe] Re: What I wish someone had told me...

2008-10-14 Thread John Lato
complicated a relationship to be useful to somebody's first introduction to FP. Better to avoid the whole issue completely. John Lato Alexey Romanov wrote: Well, they act like interfaces in argument types, just not variable or return types. Yours, Alexey Romanov

[Haskell-cafe] enumeration I/O and non-sequential access

2008-10-02 Thread John Lato
would scale well. Is this an actual problem? Is there already a solution that I'm not aware of? Thanks, John Lato ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] enumeration I/O and non-sequential access

2008-10-02 Thread John Lato
On Thu, Oct 2, 2008 at 4:28 PM, Johan Tibell [EMAIL PROTECTED] wrote: On Thu, Oct 2, 2008 at 3:50 PM, John Lato [EMAIL PROTECTED] wrote: Hello, I've recently been looking at Oleg's Iteratee approach to I/O (http://okmij.org/ftp/Haskell/Iteratee/), and I was wondering about something

[Haskell-cafe] RE: readFile and closing a file

2008-09-22 Thread John Lato
it would read strictly, the action could end the read when it has enough data. That's another approach that I think would work with your problem. Well, that's my 2cents. John Lato ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org

[Haskell-cafe] FRP (was: Semantic Domain, Function, and denotational model)

2008-09-17 Thread John Lato
... Thanks, John Lato ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Cabal files on Windows

2008-08-01 Thread John Lato
On Fri, Aug 1, 2008 at 8:39 AM, Duncan Coutts [EMAIL PROTECTED] wrote: On Sun, 2008-07-27 at 21:01 -0500, John Lato wrote: Use Haskell String syntax for paths that contain spaces: include-dirs: C:\\Program Files\\program\\include Hi Duncan, Thanks, this worked (mostly). Although I

Re: [Haskell-cafe] Cabal files on Windows

2008-07-27 Thread John Lato
On Sun, Jul 27, 2008 at 3:25 PM, Duncan Coutts [EMAIL PROTECTED] wrote: On Sat, 2008-07-26 at 20:23 -0500, John Lato wrote: Hello, Can anyone point me to a method for including path names with spaces in a cabal file? I would like to add a line similar to the following: include-dirs: C

[Haskell-cafe] Cabal files on Windows

2008-07-26 Thread John Lato
and quoting, and nothing seems to work. Is this possible at all? I'm using Cabal-1.2.4.0 on Windows. I've tried running with a Windows shell and MSYS bash, with the same results. Thanks, John Lato ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] question about STM and IO

2008-02-20 Thread John Lato
I take it that this follows from the lack of any mechanism to rollback IO? If so, I think that the following guidelines suffice for when it's acceptable to use unsafeIOtoSTM: 1. The IO action must be able to be safely repeated. 2. The IO action must be able to be safely performed with

[Haskell-cafe] question about STM and IO

2008-02-12 Thread John Lato
Hello, I was recently looking at the STM library, and I have a question about the function unsafeIOToSTM. Can anyone explain to me what is unsafe about it, and what sort of use would be considered safe? Thanks, John ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] question about STM and IO

2008-02-12 Thread John Lato
Thanks. Both this answer and Luke's make perfect sense. John On Feb 12, 2008 12:41 PM, Stephan Friedrichs [EMAIL PROTECTED] wrote: Hello, John Lato wrote: I was recently looking at the STM library, and I have a question about the function unsafeIOToSTM. Can anyone explain to me what

Re: [Haskell-cafe] Mutable arrays

2008-02-07 Thread John Lato
Ok, I've done some testing on different array accessing strategies, and at this point I believe that, as Stefan previously suggested, using an Oleg-inspired fold for access offers the best performance. My first non-unsafe idea was to try: import Data.Array.MArray import Data.Array.IO import

Re: [Haskell-cafe] Mutable arrays

2008-02-05 Thread John Lato
calculate ary_max before you start to modify the array, which is true for normalization. It's worth a try, anyway. John Lato Changing the subject slightly, I once wrote code in Concurrent Clean that filtered a file that was larger than the available memory on my PC. I did this by creating

Re: [Haskell-cafe] Mutable arrays

2008-02-05 Thread John Lato
better to me, even with the caveats of inlinePerformIO. John On Feb 5, 2008 7:26 PM, Stefan O'Rear [EMAIL PROTECTED] wrote: On Tue, Feb 05, 2008 at 06:00:38PM -0600, John Lato wrote: -- let ary_max = foldl1' max $ elems $ unsafeFreeze myArray If you use a boxed array type (IOArray or STArray

Re: [Haskell-cafe] Re: Why functional programming matters

2008-01-24 Thread John Lato
In addition to STM, another item that should interest serious programmers is forkIO. Lightweight threads that (unlike in Python) can use multiple cpu's. Coming from Python, I personally appreciate this. Using STM to handle concurrency issues often greatly simplifies multithreaded code.

[Haskell-cafe] library to read/write audio files

2007-12-11 Thread John Lato
suggestions (or patches), they would be greatly appreciated. This is my first real project in Haskell, so please be kind. I've successfully build it on ubuntu linux with GHC 6.6.1 and 6.8.1, and I don't see any reason it won't work on other platforms. Thank you, John Lato PS I'd appreciate knowing

[Haskell-cafe] Re: Why is this strict in its arguments? (Jules Bean)

2007-12-05 Thread John Lato
Wow, thanks. I had a similar function (long if/then/else chain, fromJust) that I haven't been happy with, but couldn't see how to improve it. Now I have a much better idea for how to fix that function. Thanks again, John Lato the general pattern is : replace isNothing with a case match

[Haskell-cafe] Re: let vs. where

2007-11-16 Thread John Lato
This actually clears up something that's been bothering me for some time. I've never really like syntax of types for functions with multiple arguments. Using the same token, -, to separate both arguments and the result seems very poor, because when reading a type you don't know if the value

[Haskell-cafe] let vs. where

2007-11-13 Thread John Lato
or preferences for one structure over the other. Currently my choice is guided by aesthetics more than anything else ( I prefer the look and ordering of a where clause). Is there anything else I should consider? What do veteran Haskell programmers prefer? Thank you, John Lato

Re: [Haskell-cafe] let vs. where

2007-11-13 Thread John Lato
I'd like to thank Henning for pointing out the wiki page, which describes one consequence I hadn't considered. I knew I couldn't have been the first person to have this question, but I somehow missed it before. I agree with Neil, though, that it doesn't seem very neutral. On Nov 13, 2007 1:58

[Haskell-cafe] newbie question about list performance

2007-10-28 Thread John Lato
to or exceed C. Thank you, John Lato ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

<    1   2   3   4