[Haskell-cafe] How to properly design a Haskell TK

2009-02-06 Thread Achim Schneider
I've been thinking a bit, and come to the conclusion that we should just do it as others did it before: Start off with application-specific tk's, figure out what's cool and what's compatible and then put them into libraries. In short: Stop building cathedrals. -- (c) this sig last receiving data

Re: [Haskell-cafe] How to properly design a Haskell TK

2009-02-06 Thread Luke Palmer
On Fri, Feb 6, 2009 at 1:02 AM, Achim Schneider bars...@web.de wrote: I've been thinking a bit, and come to the conclusion that we should just do it as others did it before: Start off with application-specific tk's, figure out what's cool and what's compatible and then put them into

Re: [Haskell-cafe] (Off-topic) CUDA

2009-02-06 Thread Bulat Ziganshin
Hello Andrew, Thursday, February 5, 2009, 11:10:42 AM, you wrote: Does anybody know how to make this stuff actually work? nvidia has cuda site where you can download sdk. afair, dr dobbs journal has (online) series of arcticles which describes how to program it step-by-step (Also... Haskell

Re[2]: [Haskell-cafe] How to properly design a Haskell TK

2009-02-06 Thread Bulat Ziganshin
Hello Luke, Friday, February 6, 2009, 11:09:45 AM, you wrote: I've been thinking a bit, and come to the conclusion that we should just do it as others did it before: Start off with application-specific tk's, figure out what's cool and what's compatible and then put them into libraries.

Re: [Haskell-cafe] Re: Haddock

2009-02-06 Thread David Waern
2009/2/6 Max Rabkin max.rab...@gmail.com: On Thu, Feb 5, 2009 at 4:25 PM, David Waern david.wa...@gmail.com wrote: As for running arbitrary commands, I think we are opening up to a lot of unfamiliar syntax. I'd like to hear what everyone thinks about that. I personally find it useful to have

Re: [Haskell-cafe] (Off-topic) CUDA

2009-02-06 Thread Adrian Neumann
Am 05.02.2009 um 09:10 schrieb Andrew Coppin: And so, inspired by the marketing litrature, I just spent £££ on a very expensive new GPU that supports CUDA. The only problem is... I can't seem to get any software to use it. Does anybody know how to make this stuff actually work? (Also...

Re: [Haskell-cafe] (Off-topic) CUDA

2009-02-06 Thread Malcolm Wallace
(Also... Haskell on the GPU. It's been talked about for years, but will it ever actually happen?) gpu is just set of simd-like instructions. so the reason why you will never see haskell on gpu is the same as why you will never see it implemented via simd instructions :D Because SIMD/GPU

Re[2]: [Haskell-cafe] (Off-topic) CUDA

2009-02-06 Thread Bulat Ziganshin
Hello Malcolm, Friday, February 6, 2009, 11:49:56 AM, you wrote: gpu is just set of simd-like instructions. so the reason why you will never see haskell on gpu is the same as why you will never see it implemented via simd instructions :D Because SIMD/GPU deals only with numbers, not

[Haskell-cafe] Re: Switching from Mercurial to Darcs

2009-02-06 Thread Paolo Losi
Henning Thielemann wrote: 4) hg commit -m message this commits my changes locally. I always do this before pulling since then I'm sure my changes are saved in the case a merge goes wrong. In old darcs its precisely the other way round. Since it is so slow on merging ready patches, you better

Re: [Haskell-cafe] Haddock Markup

2009-02-06 Thread Magnus Therning
On Fri, Feb 6, 2009 at 12:35 AM, David Waern david.wa...@gmail.com wrote: [..] As for running arbitrary commands, I think we are opening up to a lot of unfamiliar syntax. I'd like to hear what everyone thinks about that. How do I find out what I need to install in order to build documentation

[Haskell-cafe] haddock-2.3.0 literate comments discarded from .lhs input

2009-02-06 Thread Alistair Bayley
I have this test case for Haddock (2.3.0): -- | Module : Test.Haddock Copyright : (c) 2009 Alistair Bayley License : BSD-style Maintainer : alist...@abayley.org Stability : stable Portability : portable Test case for Haddock.

Re: [Haskell-cafe] Just how unsafe is unsafe

2009-02-06 Thread Edsko de Vries
Hi, My opinion is that unsafeXXX is acceptable only when its use is preserved behind an abstraction that is referentially transparent and type safe. Others may be able to help refine this statement. I would agree with this. The problem is that impurity spreads easily. For example, suppose we

[Haskell-cafe] Re : OpenAL

2009-02-06 Thread Paul Langevin
For those who follow, I finally find the way to mix (simpler than I thought) import Sound.ALUT playSound :: IO () playSound = withProgNameAndArgs runALUT $ \ _ _ - do ↠ buffer1 - createBuffer $ Sine 440 0 1 ↠ buffer2 - createBuffer $ HelloWorld ↠ [source1,source2] - genObjectNames 2 ↠ buffer

[Haskell-cafe] Re: haddock-2.3.0 literate comments discarded from .lhs input

2009-02-06 Thread David Waern
2009/2/6 Alistair Bayley alist...@abayley.org: [1 of 1] Compiling Test.Fail( Test\Fail.hs, Test\Fail.o ) Test\Fail.hs:11:26: Can't make a derived instance of `Typeable Fail' (You need -XDeriveDataTypeable to derive an instance for this class) In the data type declaration

Re: [Haskell-cafe] How to properly design a Haskell TK

2009-02-06 Thread Roman Cheplyaka
* Luke Palmer lrpal...@gmail.com [2009-02-06 01:09:45-0700] On Fri, Feb 6, 2009 at 1:02 AM, Achim Schneider bars...@web.de wrote: I've been thinking a bit, and come to the conclusion that we should just do it as others did it before: Start off with application-specific tk's, figure out

Re: [Haskell-cafe] Haddock Markup

2009-02-06 Thread George Pollard
On Fri, 2009-02-06 at 01:35 +0100, David Waern wrote: I received this question from Lennart Augustsson (via Simon M) and thought I'd send out an inquiry to the Haskell community in general (Lennart, I hope you don't mind): Lennart writes: We have some local patches for haddock that extends

Re: [Haskell-cafe] How to properly design a Haskell TK

2009-02-06 Thread Peter Verswyvelen
I don't think we need one large GUI toolkit. We need orthogonal little pieces that could be combined together into a toolkit... Less is more... So first we need to identify what these pieces really are, what they mean and how they can be composed together to make a bigger thing... So what *is* a

Re: [Haskell-cafe] Re: Haskell tutorial for pseudo users?

2009-02-06 Thread Deniz Dogan
2009/2/6 Jonathan Cast jonathancc...@fastmail.fm: Emacs' terminal is also lacking all the modern conveniences, like addressable cursors and builtin line-editing designed for 1970s printing terminals and practically no searching capabilities. Alternatively, you could say it's incompatible with

[Haskell-cafe] Re: [Haskell-beginners] Just how unsafe is unsafe

2009-02-06 Thread Roel van Dijk
On Fri, Feb 6, 2009 at 1:00 PM, Antoine Latter aslat...@gmail.com wrote: Tangential to all of this - sometimes my unsafeXXX functions are pure, but partial.  So I'll have: foo :: a - b - Maybe c and unsafeFoo :: a - b - c I use the unsafe prefix in the same way. For me it means 'assume

[Haskell-cafe] Mutually recursive modules

2009-02-06 Thread Henning Thielemann
I have written a small overview, how mutually recursive modules are currently supported and how they can be avoided: http://haskell.org/haskellwiki/Mutually_recursive_modules Please add information about other compilers and more ideas on breaking cycles.

Re: [Haskell-cafe] Haddock Markup

2009-02-06 Thread Wolfgang Jeltsch
Am Freitag, 6. Februar 2009 11:31 schrieb George Pollard: I think that the TeX *language* is great for writing mathematics, but that we should be wary of blindly incorporating TeX *output* into Haddock. Most of Haddock's documentation is currently HTML-based, and if we add TeX mathematics in

Re: [Haskell-cafe] Re: [Haskell-beginners] Just how unsafe is unsafe

2009-02-06 Thread Colin Paul Adams
Roel == Roel van Dijk vandijk.r...@gmail.com writes: Roel On Fri, Feb 6, 2009 at 1:00 PM, Antoine Latter aslat...@gmail.com wrote: Tangential to all of this - sometimes my unsafeXXX functions are pure, but partial.  So I'll have: foo :: a - b - Maybe c and

RE: [Haskell-cafe] about integer and float operations

2009-02-06 Thread Simon Peyton-Jones
| By the way: it is possible to use a private constructor (via some | special GHC flag?). | I would like to do a quick performance check using the existing | fromRational specialization by constructing a Rational directly. | | I know that Haskell allows declaration hiding for program safety, but

Re: [Haskell-cafe] Re: Haddock

2009-02-06 Thread Jonathan Cast
On Fri, 2009-02-06 at 09:40 +0100, David Waern wrote: 2009/2/6 Max Rabkin max.rab...@gmail.com: On Thu, Feb 5, 2009 at 4:25 PM, David Waern david.wa...@gmail.com wrote: As for running arbitrary commands, I think we are opening up to a lot of unfamiliar syntax. I'd like to hear what everyone

[Haskell-cafe] Re: OpenAL

2009-02-06 Thread Paul Langevin
AL lib: alSource.c:2291: alcDestroyContext(): 1 Source(s) NOT deleted Brian, have you tried currentContext $= Nothing before closing the device ? It works for me now : no message from ALSA (and still the sounds) _ Téléphonez

[Haskell-cafe] Re : OpenAL

2009-02-06 Thread Paul Langevin
by the way, a mean to get it done without error is to not use runALUTUsingCurrentContext : import Sound.ALUT playSound :: IO () playSound = withProgNameAndArgs runALUT $ \ _ _ - do buffer1 - createBuffer $ Sine 440 0 1 buffer2 - createBuffer HelloWorld [source] - genOjectNames 1 queueBuffers

[Haskell-cafe] Re: haddock-2.3.0 literate comments discarded from .lhs input

2009-02-06 Thread Alistair Bayley
[1 of 1] Compiling Test.Fail( Test\Fail.hs, Test\Fail.o ) Test\Fail.hs:11:26: Can't make a derived instance of `Typeable Fail' (You need -XDeriveDataTypeable to derive an instance for this class) In the data type declaration for `Fail' Are you processing the above module

Re: [Haskell-cafe] Error in building profiling

2009-02-06 Thread Marco Túlio Gontijo e Silva
Hi, Em Qui, 2009-02-05 às 20:38 -0200, Marco Túlio Gontijo e Silva escreveu: I'm trying to package ghc-paths for debian, and I got to this: $ ./setup configure --enable-library-profiling --disable-library-vanilla Configuring ghc-paths-0.1.0.5... $ ./setup build Preprocessing library

Re: [Haskell-cafe] evaluation semantics of bind

2009-02-06 Thread Nils Anders Danielsson
On 2009-02-05 15:20, Gregg Reynolds wrote: I think I've just about got monads figured out, but [...] I don't think anyone has mentioned Simon's Tackling the awkward squad paper in this thread. This tutorial, which contains a semantics for a subset of IO, should answer some of the questions

[Haskell-cafe] Re: haddock-2.3.0 literate comments discarded from .lhs input

2009-02-06 Thread David Waern
2009/2/6 Alistair Bayley alist...@abayley.org: I have this test case for Haddock (2.3.0): -- | Module : Test.Haddock Copyright : (c) 2009 Alistair Bayley License : BSD-style Maintainer : alist...@abayley.org Stability :

Re: [Haskell-cafe] about integer and float operations

2009-02-06 Thread Henning Thielemann
On Thu, 5 Feb 2009, Manlio Perillo wrote: Yitzchak Gale ha scritto: Ah, OK. Thanks. Now we have a well-defined problem. :) Good :). I have used this example to describe how to avoid big integers at all: http://haskell.org/haskellwiki/Integers_too_big_for_floats

[Haskell-cafe] Re: [Haskell-beginners] Just how unsafe is unsafe

2009-02-06 Thread Antoine Latter
On Thu, Feb 5, 2009 at 3:11 PM, Andrew Wagner wagner.and...@gmail.com wrote: So we all know the age-old rule of thumb, that unsafeXXX is simply evil and anybody that uses it should be shot (except when it's ok). I understand that unsafeXXX allows impurity, which defiles our ability to reason

Re: [Haskell-cafe] Re: evaluation semantics of bind

2009-02-06 Thread Ketil Malde
Gregg Reynolds d...@mobileink.com writes: You've defined = in such a way that it carries additional semantic weight. Would it be appropriate to sum up this discussion thusly: 1. What gets and gets not optimized away in a monad depends on the implementation of (=) 2. For IO, (=) is - must

Re: [Haskell-cafe] about integer and float operations

2009-02-06 Thread Henning Thielemann
---BeginMessage--- Simon Peyton-Jones wrote: | By the way: it is possible to use a private constructor (via some | special GHC flag?). | I would like to do a quick performance check using the existing | fromRational specialization by constructing a Rational directly. | | I know that Haskell

Re: [Haskell-cafe] Happstack 0.1 Released!

2009-02-06 Thread Henning Thielemann
---BeginMessage--- Don Stewart wrote: andrewcoppin: So we've got HAppS, Happstack, WASH, Turbinado, probably others... Does anybody know how all these relate to each other? Where their strengths and weaknesses lie? A comparative analysis of the 10+ Haskell web frameworks would be

Re: [Haskell-cafe] Re: Haskell tutorial for pseudo users?

2009-02-06 Thread Jonathan Cast
On Fri, 2009-02-06 at 14:56 +0100, Deniz Dogan wrote: 2009/2/6 Jonathan Cast jonathancc...@fastmail.fm: Emacs' terminal is also lacking all the modern conveniences, like addressable cursors and builtin line-editing designed for 1970s printing terminals and practically no searching

Re: [Haskell-cafe] Happstack 0.1 Released!

2009-02-06 Thread Henning Thielemann
On Thu, 5 Feb 2009, Don Stewart wrote: andrewcoppin: Jochem Berndsen wrote: The HAppS project has been abandoned, see http://groups.google.com/group/HAppS/msg/d128331e213c1031 . The Happstack project is intended to continue development. For more details, see http://happstack.com/faq.html .

[Haskell-cafe] HGL window update problem

2009-02-06 Thread Rodrigo Queiro
In this program, the HGL window only updates when I mouseover it. Can someone tell me why this is / how I should avoid it? Thanks! Rodrigo module Main where import Graphics.HGL import Control.Concurrent import Control.Concurrent.MVar import Control.Monad main = do stringMVar -

Re: [Haskell-cafe] Re: ANN: diagrams 0.2

2009-02-06 Thread Chaddaï Fouché
On Wed, Feb 4, 2009 at 4:56 PM, Gwern Branwen gwe...@gmail.com wrote: Now, to implement it, I would probably say to myself, well, we'll create a temporary file, we'll write some basic imports into it, then we'll write the user's expression into it as the definition of a function 'foo', and

Re: [Haskell-cafe] Haddock Markup

2009-02-06 Thread Andy Smith
2009/2/6 Wolfgang Jeltsch g9ks1...@acme.softbase.org: So using TeX as a general language for math is a very bad idea, in my opinion. The problem is that there is no good language which provides enough structural information for conversion into MathML and is at the same time simple to write and

Re: [Haskell-cafe] Re: [Haskell-beginners] Just how unsafe is unsafe

2009-02-06 Thread Roel van Dijk
Do you document the preconditions? Yes. The 'safe' variants of those functions have all preconditions listed in the accompanying (haddock) comments. The 'unsafe' variants simply state that they promote exceptions to errors. It seems to me that this is more useful than naming a function

Re: [Haskell-cafe] Re: ANN: diagrams 0.2

2009-02-06 Thread Gwern Branwen
On Fri, Feb 6, 2009 at 1:13 PM, Chaddaï Fouché chaddai.fou...@gmail.com wrote: On Wed, Feb 4, 2009 at 4:56 PM, Gwern Branwen gwe...@gmail.com wrote: Now, to implement it, I would probably say to myself, well, we'll create a temporary file, we'll write some basic imports into it, then we'll

Re: [Haskell-cafe] Monad explanation

2009-02-06 Thread Tim Newsham
So if IO represents a program that when executed interacts with the world's state, is it safe to say that when I return (State Int Int), that I'm returning a State program? That'd make sense as it really does look like we force the State to be evaluated with runState, evalState or execState.

Re: [Haskell-cafe] Re: [Haskell-beginners] Just how unsafe is unsafe

2009-02-06 Thread Roel van Dijk
On Fri, Feb 6, 2009 at 5:22 PM, Alberto G. Corona agocor...@gmail.com wrote: then Data.List.head   Data.Maybe.fromMaybe etc are also unsafe?. Yes, I consider them unsafe. Whenever I see those functions I know that I have to look elsewhere to see if their preconditions hold. I would have preferred

[Haskell-cafe] Are you using Haskell on the job?

2009-02-06 Thread Kirk Martinez
Hello, fellow Haskell hackers! I am writing a term paper on Haskell in Business, and while I have gathered a lot of good information on the Internet, I would really like direct feedback from software professionals who have used Haskell in a business setting. I would really appreciate a few

Re: [Haskell-cafe] Haddock Markup

2009-02-06 Thread Lennart Augustsson
It doesn't really matter if TeX is a good or bad idea for writing maths. For our users, they might do a formula if it's TeX, they won't if it's something else. -- Lennart On Fri, Feb 6, 2009 at 4:03 PM, Wolfgang Jeltsch g9ks1...@acme.softbase.org wrote: Am Freitag, 6. Februar 2009 11:31

Re: [Haskell-cafe] Are you using Haskell on the job?

2009-02-06 Thread John Goerzen
Kirk Martinez wrote: Hello, fellow Haskell hackers! I am writing a term paper on Haskell in Business, and while I have gathered a lot of good information on the I do hope you will publish your results somewhere. * What were the pros and cons you considered when choosing a

Re: [Haskell-cafe] Haddock Markup

2009-02-06 Thread Max Rabkin
On Fri, Feb 6, 2009 at 12:17 PM, Lennart Augustsson lenn...@augustsson.net wrote: It doesn't really matter if TeX is a good or bad idea for writing maths. For our users, they might do a formula if it's TeX, they won't if it's something else. Generally, I'd agree, but I just took a look at

Re: [Haskell-cafe] Are you using Haskell on the job?

2009-02-06 Thread Don Stewart
kirk.martinez: Hello, fellow Haskell hackers! I am writing a term paper on Haskell in Business, and while I have gathered a lot of good information on the Internet, I would really like direct feedback from software professionals who have used Haskell in a business setting. I would really

Re: [Haskell-cafe] Re: [Haskell-beginners] Just how unsafe is unsafe

2009-02-06 Thread Alberto G. Corona
Then you are talking about something very different from the subject that Andrew started.. He clearly ask about unsafeXXX understood as impurity which defiles our ability to reason logically about haskell programs like we would like to. I also want to discuss here that any signature of type IO a

Re: [Haskell-cafe] about integer and float operations

2009-02-06 Thread Manlio Perillo
Henning Thielemann ha scritto: On Thu, 5 Feb 2009, Manlio Perillo wrote: Yitzchak Gale ha scritto: Ah, OK. Thanks. Now we have a well-defined problem. :) Good :). I have used this example to describe how to avoid big integers at all:

[Haskell-cafe] Re: haddock-2.3.0 literate comments discarded from .lhs input

2009-02-06 Thread Duncan Coutts
On Fri, 2009-02-06 at 11:48 +0100, David Waern wrote: 2009/2/6 Alistair Bayley alist...@abayley.org: [1 of 1] Compiling Test.Fail( Test\Fail.hs, Test\Fail.o ) Test\Fail.hs:11:26: Can't make a derived instance of `Typeable Fail' (You need -XDeriveDataTypeable to derive an

Re: [Haskell-cafe] Error in building profiling

2009-02-06 Thread Duncan Coutts
On Fri, 2009-02-06 at 08:28 -0200, Marco Túlio Gontijo e Silva wrote: $ ./setup configure --enable-library-profiling --disable-library-vanilla /usr/bin/ld: dist/build/Control/Monad/Cont.o: No such file: No such file or directory I'm using ghc6 6.10.1+dfsg1-5 and binutils 2.19-1~exp1.

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

2009-02-06 Thread Duncan Coutts
On Tue, 2009-02-03 at 19:25 +, Andrew Coppin wrote: Don Stewart wrote: The platform is a set of blessed libraries and tools. The distros will still need to package that. To do that for Windows, we're still going to need a windows packaging team, along side Debian, Arch, Gentoo, Mac

Re: [Haskell-cafe] Monad explanation

2009-02-06 Thread wren ng thornton
Tim Newsham wrote: The only difference with IO then is that to get IO programs to run, you have to do it inside another IO program. Almost. Add to your mental model a runIO that is invoked when your program runs as: runIO main. Your haskell compiler or interpretter arranges this for

Re: [Haskell-cafe] Fastest regex package?

2009-02-06 Thread Brandon S. Allbery KF8NH
On 2009 Feb 5, at 10:26, Eugene Kirpichov wrote: My benchmark (parsing a huge logfile with a regex like GET /foo.xml.*fooid=([0-9]++).*barid=([0-9]++)) shows that plain PCRE is the fastest one (I tried PCRE, PCRE-light and TDFA; DFA can't do capturing groups at all, TDFA was abysmally slow

Re: [Haskell-cafe] Fastest regex package?

2009-02-06 Thread Don Stewart
allbery: On 2009 Feb 5, at 10:26, Eugene Kirpichov wrote: My benchmark (parsing a huge logfile with a regex like GET /foo.xml.*fooid=([0-9]++).*barid=([0-9]++)) shows that plain PCRE is the fastest one (I tried PCRE, PCRE-light and TDFA; DFA can't do capturing groups at all, TDFA was

[Haskell-cafe] Re: Haskell tutorial for pseudo users?

2009-02-06 Thread Achim Schneider
Jonathan Cast jonathancc...@fastmail.fm wrote: Konsole ctrl+shift+f, incremental, all matches highlight, case (in)sensitive, regexen. Konsole 2.1 (KDE 4.1.2), that is. I'd use its tab support, but I have xmonad. In fact, it comes with a nice editor: I just have to type vi. -- (c) this sig

Re: [Haskell-cafe] Switching from Mercurial to Darcs

2009-02-06 Thread Brandon S. Allbery KF8NH
On 2009 Feb 5, at 9:44, Peter Verswyvelen wrote: 2) modify .hgignore to make sure only these files are added that are part of the project. I want this process to be automated, I don't want to check each time which files to add, since this is error prone. .darcs/prefs/boring (regexes of