Re: [Haskell-cafe] question on types

2009-02-18 Thread Cristiano Paris
2009/2/18 Luke Palmer lrpal...@gmail.com: ... Using dependent types, you could have Prime come with a proof that the integer it contains is prime, and thus make those assumptions explicit and usable in the implementation. Unfortunately, it would be a major pain in the ass to do that in

Re: [Haskell-cafe] question on types

2009-02-18 Thread Luke Palmer
On Wed, Feb 18, 2009 at 1:20 AM, Cristiano Paris fr...@theshire.org wrote: 2009/2/18 Luke Palmer lrpal...@gmail.com: ... Using dependent types, you could have Prime come with a proof that the integer it contains is prime, and thus make those assumptions explicit and usable in the

Re: [Haskell-cafe] Memory

2009-02-18 Thread Magnus Therning
On Tue, Feb 17, 2009 at 5:53 AM, Jeff Douglas inbuni...@gmail.com wrote: Thanks Guys, Not only did I not run optimizations, I misread the profile. It looks like it was an imaginary problem from the beginning. I guess I should go through all the profiling documentation more carefully. Please

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: first Grapefruit release

2009-02-18 Thread Wolfgang Jeltsch
Am Dienstag, 17. Februar 2009 19:36 schrieben Sie: If you have problems with Gtk2Hs on Windows, it might be better to write a Win32-based backend for Grapefruit instead of a wxWidgets-based one. What do you think about that? Win32-based backend would make more sense as it is one less layer

Re: [Haskell-cafe] Haskell.org GSoC

2009-02-18 Thread Wolfgang Jeltsch
Am Dienstag, 17. Februar 2009 21:01 schrieben Sie: Wolfgang Jeltsch wrote: * making Applicative a superclass of Monad * getting rid of MonadPlus (use (Alternative m, Monad m) instead of (MonadPlus m) or, with another extension, even something like (forall a. Monoid (m

Re: [Haskell-cafe] Gtk2HS 0.10.0 Released

2009-02-18 Thread Lennart Augustsson
Perhaps you should update the download page for gtk2hs to have the new Windows .exe file on it. -- Lennart On Wed, Feb 11, 2009 at 4:40 AM, Peter Gavin pga...@gmail.com wrote: Hi everyone, Oh, dear... it seems I've forgotten how to spell cafe, and sent this message to

Re: [Haskell-cafe] Haskell.org GSoC

2009-02-18 Thread Max Bolingbroke
2009/2/18 Sterling Clover s.clo...@gmail.com: Something that hit me tonight: Last GSoC gave us GHC compiler plugins. We have examples, but no documented significant uses, suitable for production code. Plugins, in essence, as I understand them, let us extend the type system in useful ways.

Re: [Haskell-cafe] question on types

2009-02-18 Thread Lennart Augustsson
I just want to make one thing clear. With a type that just contains prime numbers the onus is on you (the programmer) to provide the proof that a number is a prime number whenever you claim it is. So you have to make the proof, and the compiler merely checks that your proof is correct. There is

[Haskell-cafe] darcs and Google Summer of Code

2009-02-18 Thread Eric Kow
Dear Haskellers, Recently, there has been a suggestion that darcs apply to be a mentoring organisation for Google Summer of Code in its own right. Thanks! I think we will definitely try this out! Ideas: GUI and hashed-storage - So far, we have two active projects,

Re: [Haskell-cafe] question on types

2009-02-18 Thread Ketil Malde
Luke Palmer lrpal...@gmail.com writes: 2009/2/17 Daryoush Mehrtash dmehrt...@gmail.com Is there a way to define a type with qualification on top of existing type (e.g. prime numbers)? Say for example I want to define a computation that takes a prime number and generates a string. Is

Re: [Haskell-cafe] question on types

2009-02-18 Thread Stephan Friedrichs
Daryoush Mehrtash wrote: Is there a way to define a type with qualification on top of existing type (e.g. prime numbers)? Say for example I want to define a computation that takes a prime number and generates a string. Is there any way I can do that in Haskell? Haskell's type system is

Re: [Haskell-cafe] question on types

2009-02-18 Thread Cristiano Paris
On Wed, Feb 18, 2009 at 10:50 AM, Lennart Augustsson lenn...@augustsson.net wrote: I just want to make one thing clear. With a type that just contains prime numbers the onus is on you (the programmer) to provide the proof that a number is a prime number whenever you claim it is. So you have

Re: [Haskell-cafe] question on types

2009-02-18 Thread Lennart Augustsson
Also, if you are using ghc you can turn on the extension that allows undecidable instances and make the type system Turing complete. -- Lennart On Wed, Feb 18, 2009 at 10:08 AM, Stephan Friedrichs deduktionstheo...@web.de wrote: Daryoush Mehrtash wrote: Is there a way to define a type with

[Haskell-cafe] estimating the speed of operation

2009-02-18 Thread Belka
Hello, communion people! I have a little problem and ask for an advice. I'm trying to estimate the performance speed of one pure function, but get some strange results. - import qualified module Data.ByteString.Lazy.Char8 as L8 import module

Re: [Haskell-cafe] question on types

2009-02-18 Thread Ryan Ingram
On Wed, Feb 18, 2009 at 2:12 AM, Lennart Augustsson lenn...@augustsson.net wrote: Also, if you are using ghc you can turn on the extension that allows undecidable instances and make the type system Turing complete. snarkAnd you get the additional pain of a potentially nonterminating compiler

[Haskell-cafe] Re: [darcs-users] darcs and Google Summer of Code

2009-02-18 Thread Wolfgang Jeltsch
Am Mittwoch, 18. Februar 2009 10:54 schrieb Eric Kow: The first is to work towards a sort of graphical interface for darcs (as has been suggested on this list). I suspect that we what we will likely do with this idea is to refine it into something that may either be part of a GUI (like a

Re[2]: [Haskell-cafe] Re: [Haskell] ANNOUNCE: first Grapefruit release

2009-02-18 Thread Bulat Ziganshin
Hello Wolfgang, Wednesday, February 18, 2009, 12:17:16 PM, you wrote: Win32-based backend would make more sense as it is one less layer to deal with. But how? Same thing with Mac. A student of mine wrote a fully automatic binding generator for C++ libraries which also supports Qt extensions

Re: [Haskell-cafe] estimating the speed of operation

2009-02-18 Thread Bulat Ziganshin
Hello Belka, Wednesday, February 18, 2009, 1:15:32 PM, you wrote: sequence_ (replicate n (return $ md5 input_row)) $! -- Best regards, Bulatmailto:bulat.zigans...@gmail.com ___ Haskell-Cafe mailing

Re: [Haskell-cafe] question on types

2009-02-18 Thread Conor McBride
Hi folks On 18 Feb 2009, at 10:35, Ryan Ingram wrote: On Wed, Feb 18, 2009 at 2:12 AM, Lennart Augustsson lenn...@augustsson.net wrote: Also, if you are using ghc you can turn on the extension that allows undecidable instances and make the type system Turing complete. snarkAnd you get the

Re: [Haskell-cafe] estimating the speed of operation

2009-02-18 Thread Belka
Thanks alot, Bulat! New results are much better: --- test_list = [L8.pack Hello world!] ++ [L8.replicate 100 ':'] --- The results are (iterations_count, microseconds): (1000, [300 +/- 200 , 18400 +/- 100]) (1, [1030 +/- 10 ,

Re[2]: [Haskell-cafe] question on types

2009-02-18 Thread Bulat Ziganshin
Hello Conor, Wednesday, February 18, 2009, 4:12:07 PM, you wrote: type-level integers that don't suck and then some... Start date will be October 2009 or so. hurray!!! -- Best regards, Bulatmailto:bulat.zigans...@gmail.com

[Haskell-cafe] concurrent haskell debugging

2009-02-18 Thread Jianzhou Zhao
Hi Folks, If I am using Control.Concurrent package, does GHC have any static or runtime tools or debuggers to detect problems, such as deadlock, data races? Cheers Jianzhou___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Fwd: [Haskell-cafe] question on types

2009-02-18 Thread Alberto G. Corona
As allways, I forgot to forward the message to the list, but the Conor response makes it irrelevant: -- Forwarded message -- From: Alberto G. Corona agocor...@gmail.com Date: 2009/2/18 Subject: Re: [Haskell-cafe] question on types To: Ryan Ingram ryani.s...@gmail.com

Re: [Haskell-cafe] concurrent haskell debugging

2009-02-18 Thread Svein Ove Aas
2009/2/18 Jianzhou Zhao jianz...@seas.upenn.edu: Hi Folks, If I am using Control.Concurrent package, does GHC have any static or runtime tools or debuggers to detect problems, such as deadlock, data races? Deadlocks should be detected out of the box if you compile with -threaded, with the

[Haskell-cafe] Re: Bug in Cabal?

2009-02-18 Thread Achim Schneider
Andrea Vezzosi sanzhi...@gmail.com wrote: On Tue, Feb 17, 2009 at 11:50 PM, Achim Schneider bars...@web.de wrote: Martin Huschenbett hus...@gmx.org wrote: $ cabal install ghci-haskeline Resolving dependencies... cabal.exe: dependencies conflict: ghc-6.10.1 requires process ==1.0.1.1

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: first Grapefruit release

2009-02-18 Thread Jeff Heard
When he gives you the code, could you let me know? I would really love to bind Open Scene Graph, but it's entirely C++ and that makes for a lot more difficult coding to say the least. On Wed, Feb 18, 2009 at 4:17 AM, Wolfgang Jeltsch g9ks1...@acme.softbase.org wrote: Am Dienstag, 17. Februar

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: first Grapefruit release

2009-02-18 Thread Wolfgang Jeltsch
Am Mittwoch, 18. Februar 2009 15:42 schrieben Sie: When he gives you the code, could you let me know? I would really love to bind Open Scene Graph, but it's entirely C++ and that makes for a lot more difficult coding to say the least. Yes, I will let you know. Best wishes, Wolfgang

Re: [Haskell-cafe] estimating the speed of operation

2009-02-18 Thread Thomas DuBuisson
Is this benchmark ment to measure something in particular? Did you not copy and paste it? It doesn't even compile: parse error on input `module' not in scope: `pack' Couldn't match expected type `(Integer, Integer)' against inferred type `IO Integer' Couldn't match expected type

[Haskell-cafe] what is [::]

2009-02-18 Thread Daniel van den Eijkel
Dear Haskellers, please can anybody tell me what [::] means or where to read about it? A few days ago I saw this for the first time in my life, at the list of instances of the Functor class, and I don't know where to look for information. The search engines I tried didn't produce results for

Re: [Haskell-cafe] what is [::]

2009-02-18 Thread Jonathan Cast
On Wed, 2009-02-18 at 16:28 +0100, Daniel van den Eijkel wrote: Dear Haskellers, please can anybody tell me what [::] means or where to read about it? A few days ago I saw this for the first time in my life, at the list of instances of the Functor class, and I don't know where to look for

Re: [Haskell-cafe] what is [::]

2009-02-18 Thread Daniel van den Eijkel
ah! ok, thanks for the hint... regards, daniel Jonathan Cast schrieb: On Wed, 2009-02-18 at 16:28 +0100, Daniel van den Eijkel wrote: Dear Haskellers, please can anybody tell me what [::] means or where to read about it? A few days ago I saw this for the first time in my life, at the

Re: [Haskell-cafe] ANN: The Typeclassopedia, and request for feedback

2009-02-18 Thread Edsko de Vries
Hey, Another comment: I feel that the Const datatype in Control.Applicative deserves to be better-known; you might mention it in your article, especially since it connects Applicative with Monoid. (In Conor's article, he calls that datatype 'Accy' and shows why it is so useful). Edsko

[Haskell-cafe] How to create an online poll

2009-02-18 Thread Bulat Ziganshin
Hello haskell-cafe, http://zohopolls.com/ -- Best regards, Bulat mailto:bulat.zigans...@gmail.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] question on types

2009-02-18 Thread Daryoush Mehrtash
Thanks, this explanation is what I was looking for. Wikipeidia has an explanation on it also: http://en.wikipedia.org/wiki/System_F#System daryoush On Wed, Feb 18, 2009 at 2:08 AM, Stephan Friedrichs deduktionstheo...@web.de wrote: Daryoush Mehrtash wrote: Is there a way to define a type

Re: [Haskell-cafe] Haskell users in the Houston area??

2009-02-18 Thread John Dorsey
Vasili, Are there Haskell users in the Houston area? At least one, but I'm behind on my cafe' reading. smiley Cheers, John ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] How to create an online poll

2009-02-18 Thread gregg reynolds
See also www.surveymonkey.com Bulat Ziganshin bulat.zigans...@gmail.com wrote: Hello haskell-cafe, http://zohopolls.com/ -- Best regards, Bulat mailto:bulat.zigans...@gmail.com ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] How to create an online poll

2009-02-18 Thread Anton van Straaten
There's also the Condorcet Internet Voting Service: http://www.cs.cornell.edu/andru/civs.html gregg reynolds wrote: See also www.surveymonkey.com Bulat Ziganshin bulat.zigans...@gmail.com wrote: Hello haskell-cafe, http://zohopolls.com/ ___

Re: [Haskell-cafe] How to create an online poll

2009-02-18 Thread Max Rabkin
On Wed, Feb 18, 2009 at 10:40 PM, Anton van Straaten an...@appsolutions.com wrote: There's also the Condorcet Internet Voting Service: http://www.cs.cornell.edu/andru/civs.html This looks like exactly what we need! Any objections? --Max ___

Re: [Haskell-cafe] How to create an online poll

2009-02-18 Thread Rick R
I'm sure Premier Election Solutions (formerly Diebold) can provide us with an online voting solution. Their value-add services allows us to set the outcome beforehand, so, in effect, the the voting process will be determinate. Which is certainly of interest to Haskell coders. On Wed, Feb 18,

Re: [Haskell-cafe] How to create an online poll

2009-02-18 Thread Don Stewart
This looks very promising! Investigating... anton: There's also the Condorcet Internet Voting Service: http://www.cs.cornell.edu/andru/civs.html gregg reynolds wrote: See also www.surveymonkey.com Bulat Ziganshin bulat.zigans...@gmail.com wrote: Hello haskell-cafe,

Re: [Haskell-cafe] How to create an online poll

2009-02-18 Thread gregg reynolds
But what about the side effects? Rick R rick.richard...@gmail.com wrote: I'm sure Premier Election Solutions (formerly Diebold) can provide us with an online voting solution. Their value-add services allows us to set the outcome beforehand, so, in effect, the the voting process will be

Re: [Haskell-cafe] How to create an online poll

2009-02-18 Thread gregg reynolds
I.e. war, plague.famine. etc. gregg reynolds d...@mobileink.com wrote: But what about the side effects? Rick R rick.richard...@gmail.com wrote: I'm sure Premier Election Solutions (formerly Diebold) can provide us with an online voting solution. Their value-add services allows us to set the

Re: [Haskell-cafe] How to create an online poll

2009-02-18 Thread Andrew Wagner
Just wrap it in a ReallySafeWePromiseMonad 2009/2/18 gregg reynolds d...@mobileink.com I.e. war, plague.famine. etc. gregg reynolds d...@mobileink.com wrote: But what about the side effects? Rick R rick.richard...@gmail.com wrote: I'm sure Premier Election Solutions (formerly Diebold)

Re: [Haskell-cafe] How to create an online poll

2009-02-18 Thread gregg reynolds
Ok, that might protect us against the 7 plagues, so I'm not so worried about locusts. But what about Java, PHP etc. Is the monad sufficient protection against ultra-supernatural evil? Andrew Wagner wagner.and...@gmail.com wrote: Just wrap it in a ReallySafeWePromiseMonad 2009/2/18 gregg

Re: [Haskell-cafe] How to create an online poll

2009-02-18 Thread Andrew Wagner
Sure it will. Don't worry, it uses unsafePerformIO under the hood, so it's pretty much indestructible. On Wed, Feb 18, 2009 at 4:47 PM, gregg reynolds d...@mobileink.com wrote: Ok, that might protect us against the 7 plagues, so I'm not so worried about locusts. But what about Java, PHP etc.

Re: [Haskell-cafe] Haskell.org GSoC - Units

2009-02-18 Thread Henning Thielemann
On Tue, 17 Feb 2009, Sterling Clover wrote: Something that hit me tonight: Last GSoC gave us GHC compiler plugins. Never heard of it. Sometimes I thought it would be nice to modify or extend GHCs error messages by libraries in order make they feel more like domain specific languages. E.g.

Re: [Haskell-cafe] How to create an online poll

2009-02-18 Thread Rick R
I can't comment on any quantitative side effects, but the some intangible side effects include Distrustful Populace and MaliciousDissenters. However, if ghc is run with the -XUnscrupulousPolitics flag, those can be suppressed. On Wed, Feb 18, 2009 at 4:33 PM, gregg reynolds d...@mobileink.com

[Haskell-cafe] Re: garbage collector woes

2009-02-18 Thread Chris Waterson
On Feb 17, 2009, at 12:22 PM, Chris Waterson wrote: I'm at wits end with respect to GHC's garbage collector and would very much appreciate a code review of my MySQL driver for HDBC, which is here: http://www.maubi.net/~waterson/REPO/HDBC-mysql/Database/HDBC/MySQL/Connection.hsc In

Re: [Haskell-cafe] How to create an online poll

2009-02-18 Thread Andrew Wagner
Help! Help! I'm being suppressed!! On Feb 18, 2009, at 5:05 PM, Rick R rick.richard...@gmail.com wrote: I can't comment on any quantitative side effects, but the some intangible side effects include Distrustful Populace and MaliciousDissenters. However, if ghc is run with the -

Re: [Haskell-cafe] How to create an online poll

2009-02-18 Thread Svein Ove Aas
2009/2/18 Andrew Wagner wagner.and...@gmail.com: Help! Help! I'm being suppressed!! Aha! Now we see the violence inherent in the system. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] How to create an online poll

2009-02-18 Thread gregg reynolds
Perhaps you are a subversive functor, hmm? We have monadic ways of conrolling you, fiend! Tellus who your natural tansformations are, or else! Andrew Wagner wagner.and...@gmail.com wrote: Help! Help! I'm being suppressed!! On Feb 18, 2009, at 5:05 PM, Rick R rick.richard...@gmail.com wrote:

Re: [Haskell-cafe] package for algebraic structures

2009-02-18 Thread Henning Thielemann
On Tue, 17 Feb 2009, Wolfgang Jeltsch wrote: Now, a package only for one class with one method seems like overkill. However, it could serve as a start for a package of all kinds of algebraic structures. So I called the package “algebra” and put it on Hackage. So if someone wants to implement

[Haskell-cafe] Re: permuting a list

2009-02-18 Thread Henning Thielemann
On Tue, 17 Feb 2009, Okasaki, C. DR EECS wrote: The discussion of randomly permuting a list comes up every few years.  Here’s what I wrote last time (2005): ... How about putting it on the Wiki?___ Haskell-Cafe mailing list

Re: [Haskell-cafe] ANNOUNCE: pqueue-mtl, stateful-mtl

2009-02-18 Thread Henning Thielemann
On Mon, 16 Feb 2009, Louis Wasserman wrote: Overnight I had the following thought, which I think could work rather well.  The most basic implementation of the idea is as follows: class MonadST s m | m - s where liftST :: ST s a - m a instance MonadST s (ST s) where ... instance MonadST s m

Re: [Haskell-cafe] ANNOUNCE: pqueue-mtl, stateful-mtl

2009-02-18 Thread Henning Thielemann
On Mon, 16 Feb 2009, Louis Wasserman wrote: I just posted stateful-mtl and pqueue-mtl 1.0.2, making use of the new approach to single-threaded ST wrapping.  I discovered while making the modifications to both packages that the MonadSTTrans type class was unnecessary, enabling a cleaner

Re: [Haskell-cafe] Haskell.org GSoC

2009-02-18 Thread sylvain
Le mercredi 11 février 2009 à 11:12 +0100, Daniel Kraft a écrit : Hi, Hi, Do you think something would be especially nice to have and is currently missing? In my humble opinion, Haskell presently fall short of its promises because it does not embed theorem proving. Quickcheck-like testing

[Haskell-cafe] Hoogle and Network.Socket

2009-02-18 Thread Thomas DuBuisson
I recall that Niel made sure hoogle doesn't search through non-portable libraries (a shame), but I thought Network.Socket could be used on Windows and yet Hoogle does not give any results for 'socket' or any other functions within Network.Socket. First, am I mistaken and Network.Socket is POSIX

[Haskell-cafe] Paper draft: Denotational design with type class morphisms

2009-02-18 Thread Conal Elliott
I have a draft paper some of you might enjoy, called Denotational design with type class morphisms. Abstract: Type classes provide a mechanism for varied implementations of standard interfaces. Many of these interfaces are founded in mathematical tradition and so have regularity not

Re: [Haskell-cafe] ANNOUNCE: pqueue-mtl, stateful-mtl

2009-02-18 Thread Louis Wasserman
Yes, it really is like MonadIO -- just capable of being used to produce guaranteed purely functional results ^^ Louis Wasserman wasserman.lo...@gmail.com On Wed, Feb 18, 2009 at 5:43 PM, Henning Thielemann lemm...@henning-thielemann.de wrote: On Mon, 16 Feb 2009, Louis Wasserman wrote: I

Re: [Haskell-cafe] Memory

2009-02-18 Thread Jeff Douglas
I'd love to. I'm thinking of starting a blog once I get more experience and familiarity with the language. Jeff On Wed, Feb 18, 2009 at 6:13 PM, Magnus Therning mag...@therning.org wrote: On Tue, Feb 17, 2009 at 5:53 AM, Jeff Douglas inbuni...@gmail.com wrote: Thanks Guys, Not only did I not

Re: [Haskell-cafe] Haskell.org GSoC

2009-02-18 Thread Daniel Kraft
Hi, sylvain wrote: In my humble opinion, Haskell presently fall short of its promises because it does not embed theorem proving. Quickcheck-like testing is truly great, but can not replace proofs to produce bug free software. With use of equational reasoning + induction, one can already prove

Re: [Haskell-cafe] How to create an online poll

2009-02-18 Thread Ketil Malde
Rick R rick.richard...@gmail.com writes: I'm sure Premier Election Solutions (formerly Diebold) can provide us with an online voting solution. You know, while the recent voting scandals have been milked for all they're worth by the open source community, FP has been very quiet about it. Isn't

Re: [Haskell-cafe] How to create an online poll

2009-02-18 Thread Ketil Malde
gregg reynolds d...@mobileink.com writes: I.e. war, plague.famine. etc. No, those are quite outdated by now. The new horsemen of the programming apocalypse are, of course, IO, MutableState, LazyMemoryLeak, and Bottom. -k -- If I haven't seen further, it is by standing in the footprints of