Re: [Haskell-cafe] Help me TH code.

2010-10-27 Thread Serguey Zefirov
2010/10/27 Andy Stewart lazycat.mana...@gmail.com: Hi all, I want use TH write some function like below:  data DataType = StringT                | IntT                | CharT  parse :: [(String,DataType)] - (TypeA, TypeB, ... TypeN) Example:  parse [(string, StringT), (001, IntT), (c,

Re: [Haskell-cafe] Help me TH code.

2010-10-27 Thread Andy Stewart
Serguey Zefirov sergu...@gmail.com writes: 2010/10/27 Andy Stewart lazycat.mana...@gmail.com: Hi all, I want use TH write some function like below:  data DataType = StringT                | IntT                | CharT  parse :: [(String,DataType)] - (TypeA, TypeB, ... TypeN) Example:

[Haskell-cafe] Understanding Iteratees

2010-10-27 Thread Arnaud Bailly
Hello, I am trying to wrap my head around the concept of Iteratee reading the article by John Lato in Monad Reader issue 16 (http://themonadreader.files.wordpress.com/2010/05/issue16.pdf). I followed the advice on page 34: I have frequently heard reports from Haskellers (including highly-talented

Re: [Haskell-cafe] Pretty-printer for Text

2010-10-27 Thread Stephen Tetley
Hi Ivan You're free to do what you want in your own package, but... Having a Pretty class plus primitive printers int, bool is an advantage. For ints, bools, ... code tends to look neater if you use int or bool rather than pretty. Plus for ints and others you tend to need things like hex

Re: [Haskell-cafe] In what language...?

2010-10-27 Thread Stephen Tetley
On 27 October 2010 00:21, Richard O'Keefe o...@cs.otago.ac.nz wrote: Here's the table of contents of a typical 1st year discrete mathematics book, selected and edited:        - algorithms on integers        - sets        - functions        - relations        - sequences        -

Re: [Haskell-cafe] Pretty-printer for Text

2010-10-27 Thread Ivan Lazar Miljenovic
On 27 October 2010 18:39, Stephen Tetley stephen.tet...@gmail.com wrote: Having a Pretty class plus primitive printers int, bool is an advantage. For ints, bools, ... code tends to look neater if you use int or bool rather than pretty. Plus for ints and others you tend to need things like hex

[Haskell-cafe] Does it deserve to be a hackage package?

2010-10-27 Thread Dmitry V'yal
Hello haskellers, While ago I had a question about opening the url in the default browser from haskell program. I didn't get any immediate answers so I wrote my own solution. On Linux it uses xdg-open and on Windows - ShellExecute Api. Later I received a letter saying what similar

Re: [Haskell-cafe] Pretty-printer for Text

2010-10-27 Thread Stephen Tetley
On 27 October 2010 08:57, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: What do you mean by prettyExpr? Without a type class I generally name pretty printers by the pretty 'pretty' then the type they print Expr (expression), Decl (declaration) etc. My main objection to having a

Re: [Haskell-cafe] Pretty-printer for Text

2010-10-27 Thread Ivan Lazar Miljenovic
On 27 October 2010 19:19, Stephen Tetley stephen.tet...@gmail.com wrote: On 27 October 2010 08:57, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: My main objection to having a Pretty type class is that when having a reasonably sized syntax tree, aren't you likely to want to have your

Re: [Haskell-cafe] Does it deserve to be a hackage package?

2010-10-27 Thread Christopher Done
On 27 October 2010 10:13, Dmitry V'yal akam...@gmail.com wrote: While ago I had a question about opening the url in the default browser from haskell program. I didn't get any immediate answers so I wrote my own solution. On Linux it uses xdg-open and on Windows - ShellExecute Api. Does it

Re: [Haskell-cafe] Help me TH code.

2010-10-27 Thread Jonas Almström Duregård
Unless you have a 'real' type for parse sometime during compile time, TH won't be able to generate it. A good rule of thumbs is that if you can't write the code yourself, then you can't get TH to do it either. /J On 27 October 2010 08:50, Andy Stewart lazycat.mana...@gmail.com wrote: Serguey

Re: [Haskell-cafe] Help me TH code.

2010-10-27 Thread Serguey Zefirov
2010/10/27 Andy Stewart lazycat.mana...@gmail.com: Serguey Zefirov sergu...@gmail.com writes: I think that you should use TH properly, without compiler and logical errors. What actually do you want? I'm build multi-processes communication program. You don't need TH here, I think. You can

[Haskell-cafe] Re: what is the status of haskell's mail libraries?

2010-10-27 Thread Günther Schmidt
Hi Michael, thanks for the link and congratulations on your other work too. Günther ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Haskell and a complete mail client lib?

2010-10-27 Thread Günther Schmidt
Hi all, do we Haskellers have a complete Mail client library? One that goes beyond an unstructured byte string? Günther ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] what is the status of haskell's mail libraries?

2010-10-27 Thread Henk-Jan van Tuyl
On Wed, 27 Oct 2010 04:46:07 +0200, Michael Snoyman mich...@snoyman.com wrote: I just release mime-mail[1], which can construct multipart messages. Note, that this will not run on Windows, as it gives command /usr/sbin/sendmail Regards, Henk-Jan van Tuyl -- http://Van.Tuyl.eu/

Re: [Haskell-cafe] Pretty-printer for Text

2010-10-27 Thread Stephen Tetley
On 27 October 2010 09:32, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: Why not write your own Pretty class for that project then? Personally I don't like type classes if they're solely for notational convenience. I want them to be a least a convention and its nicer still when they

Re: [Haskell-cafe] Pretty-printer for Text

2010-10-27 Thread Ivan Lazar Miljenovic
On 27 October 2010 20:13, Stephen Tetley stephen.tet...@gmail.com wrote: On 27 October 2010 09:32, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: I had to write my own [1] for two reasons: 1) I needed to be able to differentiate between quoted and un-quoted values, and 2) some of the

[Haskell-cafe] Re: Does it deserve to be a hackage package?

2010-10-27 Thread Andy Stewart
Christopher Done chrisd...@googlemail.com writes: On 27 October 2010 10:13, Dmitry V'yal akam...@gmail.com wrote: While ago I had a question about opening the url in the default browser from haskell program. I didn't get any immediate answers so I wrote my own solution. On Linux it uses

Re: [Haskell-cafe] what is the status of haskell's mail libraries?

2010-10-27 Thread Michael Snoyman
On Wed, Oct 27, 2010 at 10:39 AM, Henk-Jan van Tuyl hjgt...@chello.nl wrote: On Wed, 27 Oct 2010 04:46:07 +0200, Michael Snoyman mich...@snoyman.com wrote: I just release mime-mail[1], which can construct multipart messages. Note, that this will not run on Windows, as it gives command  

[Haskell-cafe] Re: Haskell and a complete mail client lib?

2010-10-27 Thread Andy Stewart
Günther Schmidt gue.schm...@web.de writes: Hi all, do we Haskellers have a complete Mail client library? One that goes beyond an unstructured byte string? I want mail-client library too, for my gtk2hs project (http://www.flickr.com/photos/48809...@n02/) If still haven't complete mail-client

[Haskell-cafe] who's in charge?

2010-10-27 Thread Günther Schmidt
Hi all, this may be an odd question to some, but I think it's actually quite an un-extraordinary one. Who's in charge? Of Haskell I mean. If there was some alien from Planet Java to land on Planet Haskell and demand to be taken to our leader, whom would we take him to? Günther

Re: [Haskell-cafe] who's in charge?

2010-10-27 Thread Ivan Lazar Miljenovic
2010/10/27 Günther Schmidt gue.schm...@web.de: Hi all, this may be an odd question to some, but I think it's actually quite an un-extraordinary one.        Who's in charge? Of Haskell I mean. If there was some alien from Planet Java to land on Planet Haskell and demand to be taken to our

Re: [Haskell-cafe] who's in charge?

2010-10-27 Thread Günther Schmidt
Hi Ivan, there is a committee? Günther Am 27.10.10 12:37, schrieb Ivan Lazar Miljenovic: 2010/10/27 Günther Schmidtgue.schm...@web.de: Hi all, this may be an odd question to some, but I think it's actually quite an un-extraordinary one. Who's in charge? Of Haskell I mean. If there

Re: [Haskell-cafe] who's in charge?

2010-10-27 Thread Ivan Lazar Miljenovic
2010/10/27 Günther Schmidt gue.schm...@web.de: Hi Ivan, there is a committee? Sure is: http://hackage.haskell.org/trac/haskell-prime/ -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list

[Haskell-cafe] ANN: Chart v0.14

2010-10-27 Thread Tim Docker
I'm pleased to announce v0.14 of the haskell chart library. This is a library for drawing 2D data plots. It's features include + Use of the cairo graphics engine, supporting a variety of output types: ps, pdf, png, and gtk windows. + A variety of plot types, including: points, lines,

[Haskell-cafe] Re: ANN: Chart v0.14

2010-10-27 Thread Eugene Kirpichov
Good news! Thanks, Tim! I'd like to also note that now the LocalTime axis supports millisecond precision, whereas earlier it only supported second precision. 2010/10/28 Tim Docker t...@dockerz.net: I'm pleased to announce v0.14 of the haskell chart library. This is a library for drawing 2D

Re: [Haskell-cafe] cross-platform compile

2010-10-27 Thread Ari Rahikkala
On Tue, Oct 26, 2010 at 9:51 PM, Hong Yang hyang...@gmail.com wrote: Just curious if Haskell can or will generate cross-platform executable code, e.g., generate code for Linux from a Windows machine. Thanks, Hong I don't know about other compilers, but at least GHC is not quite there yet:

Re: [Haskell-cafe] [ANNAUNCE] ghcjs-0.1.0 Haskell to Javascript compiler

2010-10-27 Thread Martijn Schrage
On 21-10-10 01:01, Victor Nazarov wrote: I've been working on this for some month and I think now I'm ready to share the results. Great stuff! I've been looking for something like this for a long time. If you add || transport.status == 0 to line 90 of examples/rts-common.js, it also works on

[Haskell-cafe] ANN: timeplot-0.2.1, a tool for visualizing time series from log files.

2010-10-27 Thread Eugene Kirpichov
Hi cafe, I'm pleased to announce timeplot-0.2.1. http://hackage.haskell.org/package/timeplot This is a tool for visualizing time series from log files. I'm myself using it for diagnosing performance of distributed systems: I aggregate their logs and plot various things, such as the number of

Re: [Haskell-cafe] who's in charge?

2010-10-27 Thread Dougal Stanton
2010/10/27 Ivan Lazar Miljenovic ivan.miljeno...@gmail.com: 2010/10/27 Günther Schmidt gue.schm...@web.de: Hi all, this may be an odd question to some, but I think it's actually quite an un-extraordinary one.        Who's in charge? Of Haskell I mean. If there was some alien from Planet

Re: [Haskell-cafe] who's in charge?

2010-10-27 Thread Steve Schafer
On Wed, 27 Oct 2010 14:13:31 +0100, you wrote: They're just figureheads for a shadowy cabal :-D You mean the Haskelluminati? -Steve Schafer ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] [ANNAUNCE] ghcjs-0.1.0 Haskell to Javascript compiler

2010-10-27 Thread Ryan Yates
I ran into a problem with line 31 of examples/rts-common.js when running on Chrome: var word16addCarry = function function(a, b, c) { Shouldn't that be: var word16addCarry = function(a, b, c) { With that change it runs fine for me (GHC 6.12.3). Chrome also wasn't happy loading from the

Re: [Haskell-cafe] who's in charge?

2010-10-27 Thread Malcolm Wallace
Who's in charge? If you mean the language, then the Haskell-prime committee is in charge. If you mean the compiler everyone uses (de-facto), then the two Simons are in charge. If you mean the website, online resources, and money earned from GSoC or donated, then there is a

Re: [Haskell-cafe] who's in charge?

2010-10-27 Thread Günther Schmidt
Hi Malcolm, well if I would like to point out that, for instance, Haskell exists for a lot more than 10 years now, and that, while the language per se rocks, and there are cool tools (cabal) and libraries (list, Set, Map), there still isn't even a mail client library, I wonder whom to

Re: [Haskell-cafe] Pretty-printer for Text

2010-10-27 Thread Antoine Latter
On Tue, Oct 26, 2010 at 9:50 PM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: I'm currently working on a pretty-printer for lazy text [1] values, basing the API on the wl-pprint [2] package. [1]: http://hackage.haskell.org/package/text [2]:

Re: [Haskell-cafe] [ANNAUNCE] ghcjs-0.1.0 Haskell to Javascript compiler

2010-10-27 Thread Victor Nazarov
On Wed, Oct 27, 2010 at 4:30 PM, Martijn Schrage mart...@oblomov.com wrote: On 21-10-10 01:01, Victor Nazarov wrote: I've been working on this for some month and I think now I'm ready to share the results. Great stuff! I've been looking for something like this for a long time. If you add

Re: [Haskell-cafe] [ANNAUNCE] ghcjs-0.1.0 Haskell to Javascript compiler

2010-10-27 Thread Victor Nazarov
On Wed, Oct 27, 2010 at 5:25 PM, Ryan Yates fryguy...@gmail.com wrote: I ran into a problem with line 31 of examples/rts-common.js when running on Chrome:    var word16addCarry = function function(a, b, c) { Shouldn't that be:    var word16addCarry = function(a, b, c) { Yes, that's my fault.

Re: [Haskell-cafe] [ANNAUNCE] ghcjs-0.1.0 Haskell to Javascript compiler

2010-10-27 Thread Ryan Yates
I wasn't able to run it in Chrome without dedicated HTTP-server, seems like it is the only way... It looks like running Chrome with the flag: -allow-file-access-from-files lets it work. Thanks for making this project, I'm looking forward to more! Ryan

[Haskell-cafe] If Python now has a good email library; how challenging is it to call Python from Haskell?

2010-10-27 Thread caseyh
:) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] If Python now has a good email library; how challenging is it to call Python from Haskell?

2010-10-27 Thread Thomas DuBuisson
How does python having an e-mail library change the situation with calling Python from Haskell? On Wed, Oct 27, 2010 at 10:43 AM, cas...@istar.ca wrote: :) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] If Python now has a good email library; how challenging is it to call Python from Haskell?

2010-10-27 Thread Christopher Done
On 27 October 2010 19:46, Thomas DuBuisson thomas.dubuis...@gmail.com wrote: How does python having an e-mail library change the situation with calling Python from Haskell? He's commenting, presumably, on the apparently disparate nature of Haskell email libraries and the fortuitousness

Re: [Haskell-cafe] Haskell and a complete mail client lib?

2010-10-27 Thread Don Stewart
gue.schmidt: Hi all, do we Haskellers have a complete Mail client library? As always, look on Hackage: http://www.google.com/search?hl=enas_sitesearch=hackage.haskell.org/packageas_q=email ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] If Python now has a good email library; how challenging is it to call Python from Haskell?

2010-10-27 Thread aditya siram
Are there any C libraries that you can use? I did a google search on email client in c and failed in an epic fashion but I figure parts of sendmail or mutt could be used. -deech On Wed, Oct 27, 2010 at 12:55 PM, Christopher Done chrisd...@googlemail.com wrote: On 27 October 2010 19:46, Thomas

[Haskell-cafe] Re: If Python now has a good email library; how challenging is it to call Python from Haskell?

2010-10-27 Thread Günther Schmidt
Am 27.10.10 19:43, schrieb cas...@istar.ca: :) Well I was considering using a foreign library too for email. It creates a whole lot of dependencies, so I'd prefer to be able to do it entirely in Haskell instead. I was also wondering if it's possible to create a DSL for the email stuff and

[Haskell-cafe] Need programming advice for Network Protocol Parsing

2010-10-27 Thread Günther Schmidt
Hi all, I'd like to write a client app that communicates with a server over TCP/IP. My question is in regard which parser to use for the servers responses. I'm quite familiar with parsec (2.x) but I'm not sure if it's the right choice for this. The code would necessarily constantly be

Re: [Haskell-cafe] If Python now has a good email library; how challenging is it to call Python from Haskell?

2010-10-27 Thread Donn Cave
Don't know, but probably challenging enough to make it worth challenging the assumption that Python now has a good email library. From a cursory look at the 3.0 library documentation, it looks to me like IMAP support still means the old imaplib module. That's pretty rudimentary, compared to the

Re: [Haskell-cafe] Need programming advice for Network Protocol Parsing

2010-10-27 Thread Christopher Done
2010/10/27 Günther Schmidt gue.schm...@web.de: My question is in regard which parser to use for the servers responses. I'm quite familiar with parsec (2.x) but I'm not sure if it's the right choice for this. The code would necessarily constantly be switching between checking for input,

Re: [Haskell-cafe] Haskell and a complete mail client lib?

2010-10-27 Thread Gwern Branwen
2010/10/27 Don Stewart d...@galois.com: gue.schmidt: Hi all, do we Haskellers have a complete Mail client library? As always, look on Hackage:     http://www.google.com/search?hl=enas_sitesearch=hackage.haskell.org/packageas_q=email Besides the tagged packages, there are a few other

Re: [Haskell-cafe] If Python now has a good email library; how challenging is it to call Python from Haskell?

2010-10-27 Thread Brandon Moore
On Oct 27, 2010, at 12:43 PM, cas...@istar.ca wrote: :) I will point out that Python Haskell Interface has an excellent axiom. Unfortunately, my attempt to write a nice wrapper around the Python FFI foundered years ago chasing segfaults. It doesn't seem like it should be too hard, if you

Re: [Haskell-cafe] who's in charge?

2010-10-27 Thread Albert Y. C. Lai
On 10-10-27 06:31 AM, Günther Schmidt wrote: this may be an odd question to some, but I think it's actually quite an un-extraordinary one. Who's in charge? Of Haskell I mean. If there was some alien from Planet Java to land on Planet Haskell and demand to be taken to our leader, whom would we

Re: [Haskell-cafe] Need programming advice for Network Protocol Parsing

2010-10-27 Thread Daniel Peebles
I'm occasionally working on making a friendly yet performant library that simultaneously builds parsers and generators, but it's non-trivial. If you want to see the general idea, there's a Functional Pearl on pickler combinators from a few years back that you can probably play with. But for a

[Haskell-cafe] Re: Haskell and a complete mail client lib?

2010-10-27 Thread Günther Schmidt
Hi Don, thank your this link. Also thank you for supplying a link to this page http://www.reddit.com/r/haskell_proposals/top/?t=year in another message, some time back. I can see that checking there first would have made my entire post redundant. Günther

Re: [Haskell-cafe] concurrency vs. I/O in GHC

2010-10-27 Thread Andrew Coppin
On 27/10/2010 05:00 PM, John Lato wrote: I am somewhat surprised that all capabilities must be ready for GC; I thought with the parallel GC that wouldn't be necessary. But I don't know much about GC implementations so I try not to let their behavior surprise me too much. GHC has a

Re: [Haskell-cafe] who's in charge?

2010-10-27 Thread Richard O'Keefe
On 28/10/2010, at 4:38 AM, Günther Schmidt wrote: As we are 10+ years now still without one of the most essential libraries any programming language needs I guess it's not that easy. It has just been recently that I wanted to do email via haskell. I was very surprised not find one in place

[Haskell-cafe] On being called a troll

2010-10-27 Thread Günther Schmidt
Hi everyone, this post is to argue my own case. Today I have made the most upsetting experience of being called a troll, twice. I have posted to this list for over 3 years now and until lately it was an enlightening experience. The responses to my questions have usually been helpful and

Re: [Haskell-cafe] who's in charge?

2010-10-27 Thread aditya siram
Careful. That might draw some unwarranted comparisons :) -deech 2010/10/27 Richard O'Keefe o...@cs.otago.ac.nz On 28/10/2010, at 4:38 AM, Günther Schmidt wrote: As we are 10+ years now still without one of the most essential libraries any programming language needs I guess it's not that

[Haskell-cafe] Where has GDK.GC gone?

2010-10-27 Thread Andrew Coppin
Today I noticed a small but interesting fact: Under Gtk2hs 0.10.x, the module Graphics.UI.Gtk re-exports (amoung countless others) the module Graphics.UI.Gtk.Gdk.GC. However, under Gtk2hs 0.11.x, it does not. After downloading the darcs repo (with took forever, by the way), I discovered that

[Haskell-cafe] New repo location for the network package

2010-10-27 Thread Johan Tibell
Hi all, To ease my maintenance burden, I've moved the network package repo to: http://github.com/haskell/network Patches are accepted either in the git mbox format, as normal (diff) patch files, or as GitHub pull requests. P.S. If you want to get added to the haskell GitHub organization,

Re: [Haskell-cafe] On being called a troll

2010-10-27 Thread Anton van Straaten
Günther, On 10/27/2010 05:12 PM, you wrote: For some reason it has become acceptable to politicalize a subject at the earliest convenience and take the gloves off. You were the first offender, when you wrote the following: since there is no mail client library even after 10+ years I suggest

Re: [Haskell-cafe] Need programming advice for Network ProtocolParsing

2010-10-27 Thread Claus Reinke
I'm occasionally working on making a friendly yet performant library that simultaneously builds parsers and generators, but it's non-trivial. If you I'm probably missing something in the friendly yet performant requirements, but I never quite understood the difficulty: A typical translation of

Re: [Haskell-cafe] If Python now has a good email library; how challenging is it to call Python from Haskell?

2010-10-27 Thread Brandon Moore
From: Brandon Moore brandon_m_mo...@yahoo.com On Oct 27, 2010, at 12:43 PM, cas...@istar.ca wrote: :) I will point out that Python Haskell Interface has an excellent axiom. Unfortunately, my attempt to write a nice wrapper around the Python FFI foundered years ago chasing segfaults.

[Haskell-cafe] Haskell Weekly News: Issue 156 - October 27, 2010

2010-10-27 Thread Daniel Santa Cruz
Welcome to issue 156 of the HWN, a newsletter covering developments in the [1]Haskell community in the week of October 17 - 28. I did not manage to filter out good posts from Haskell-Cafe this week. If you see a thread in -cafe that you think would be good to share with the

Re: [Haskell-cafe] On being called a troll

2010-10-27 Thread Antoine Latter
2010/10/27 Günther Schmidt gue.schm...@web.de: Hi everyone, this post is to argue my own case. Today I have made the most upsetting experience of being called a troll, twice. I have posted to this list for over 3 years now and until lately it was an enlightening experience. The responses

[Haskell-cafe] Red links in the new haskell theme

2010-10-27 Thread Victor Oliveira
Hi Cafe, I really liked the new colors of haskell theme, but... Is really red a good color for links? At least for me, red links looks like broken or already visited ones. And the worst is hackage docs. It is really eye tiring to read. It's just a thought. Maybe it just with me. What about

Re: [Haskell-cafe] Need programming advice for Network ProtocolParsing

2010-10-27 Thread Sterling Clover
On Oct 27, 2010, at 6:23 PM, Claus Reinke wrote: I'm occasionally working on making a friendly yet performant library that simultaneously builds parsers and generators, but it's non-trivial. If you I'm probably missing something in the friendly yet performant requirements, but I never quite