Re: [Haskell-cafe] adjoint of coproduct diagonal

2008-08-03 Thread Jason Dusek
Derek Elkins [EMAIL PROTECTED] wrote: [id,id] is the counit. [id,id] : C+C - C Given a function f : A+B - C there exists a unique function f* : (A,B) - (C,C) that is a pair of functions h : A - C and k : B - C such that [id,id] . h+k = f. This f is what I have labelled [f,g] (or f+g) in

[Haskell-cafe] Re: poll: how can we help you contribute to darcs?

2008-08-03 Thread Trent W. Buck
Neil Mitchell [EMAIL PROTECTED] writes: The darcs 2.0 announcement read like an obituary I don't know why, but a lot of people I spoke to seemed to have that impression, and I essentially had to wave changelogs under their face to convince them that darcs was still being worked on *at all*. I

Re: [Haskell-cafe] adjoint of coproduct diagonal

2008-08-03 Thread Derek Elkins
On Sat, 2008-08-02 at 23:40 -0700, Jason Dusek wrote: Derek Elkins [EMAIL PROTECTED] wrote: [id,id] is the counit. [id,id] : C+C - C Given a function f : A+B - C there exists a unique function f* : (A,B) - (C,C) that is a pair of functions h : A - C and k : B - C such that [id,id] .

Re: [Haskell-cafe] Re: poll: how can we help you contribute to darcs?

2008-08-03 Thread Don Stewart
trentbuck: Neil Mitchell [EMAIL PROTECTED] writes: The darcs 2.0 announcement read like an obituary I don't know why, but a lot of people I spoke to seemed to have that impression, and I essentially had to wave changelogs under their face to convince them that darcs was still being worked

Re: [Haskell-cafe] Re: poll: how can we help you contribute to darcs?

2008-08-03 Thread Brandon S. Allbery KF8NH
On 2008 Aug 3, at 1:17, Trent W. Buck wrote: Neil Mitchell [EMAIL PROTECTED] writes: The darcs 2.0 announcement read like an obituary I don't know why, but a lot of people I spoke to seemed to have that impression, and I essentially had to wave changelogs under their face to That would

Re: [Haskell-cafe] adjoint of coproduct diagonal

2008-08-03 Thread Jason Dusek
Derek Elkins [EMAIL PROTECTED] wrote: Jason Dusek wrote: the unique arrow that goes from A+B to C+C is f+g -- but that would make C+C just the same as C. The unique arrow is f* : (A,B) - (C,C), -not- an arrow A+B - C+C. An arrow f : A+B - C does -not- uniquely determine an arrow A+B -

Re: [Haskell-cafe] Brainstorming on how to parse IMAP

2008-08-03 Thread Donn Cave
On Sat, 02 Aug 2008 21:04:28 -0500 John Goerzen [EMAIL PROTECTED] wrote: ... The braces mean that the given number of octets follows after the CRLF at the end of the given line. We could even see: A283 SEARCH {4} {21} TEXTstring not in mailbox I don't think it's quite that bad. The

[Haskell-cafe] timing question

2008-08-03 Thread Arie Groeneveld
Suppose I've: f = map g I want to know how much time it takes (interpreted mode) to fully process list xs (at least 1e6 elements) with function g. Is it sufficient to execute: *Main last . f $ xs result (x.xx secs, yyy bytes) Are there any hidden difficulties involved? Reason is:

Re: [Haskell-cafe] timing question

2008-08-03 Thread Arie Groeneveld
Sorry, should go the forum. Ok, thanks. In this case the list consists of 6-digit alphanumeric codes. So doing something like: foldl1 (\x y - g y) xs will do the job? =@@i Bulat Ziganshin schreef: Hello Arie, Sunday, August 3, 2008, 1:56:43 PM, you wrote: *Main last . f $ xs this way

Re: [Haskell-cafe] code review? store server, 220loc.

2008-08-03 Thread Tim Newsham
newsham: Anyone interested in critiquing some code? I'm looking for ideas for making it faster and/or simpler: What optimisation and runtime flags did you use (-threaded or not?) currently ghc -O --make $ -o $@. For some measurements I tried -threaded which seemed to have a slight slowdown

Re: [Haskell-cafe] timing question

2008-08-03 Thread Bulat Ziganshin
Hello Arie, Sunday, August 3, 2008, 1:56:43 PM, you wrote: *Main last . f $ xs this way you will get only spin of list computed, not elements itself. something like sum should be used instead -- Best regards, Bulatmailto:[EMAIL PROTECTED]

Re: [Haskell-cafe] adjoint of coproduct diagonal

2008-08-03 Thread Derek Elkins
On Sun, 2008-08-03 at 00:52 -0700, Jason Dusek wrote: Derek Elkins [EMAIL PROTECTED] wrote: Jason Dusek wrote: the unique arrow that goes from A+B to C+C is f+g -- but that would make C+C just the same as C. The unique arrow is f* : (A,B) - (C,C), -not- an arrow A+B - C+C. An arrow

Re: [darcs-users] [Haskell-cafe] Re: poll: how can we help you contribute to darcs?

2008-08-03 Thread Ashley Moran
Sorry for the duplication, I'm now on the haskell-cafe list and wanted to track the other half of this thread. On Aug 03, 2008, at 8:36 am, Don Stewart wrote: And all this delay while the git juggernaut takes over the internet. That's the biggest tragedy. It's the same disappointment I

Re: [Haskell-cafe] code review? store server, 220loc.

2008-08-03 Thread Duncan Coutts
On Sat, 2008-08-02 at 19:13 -1000, Tim Newsham wrote: My measurements show that a simple dummy server (accept, forkio, recv byte) handles roughly 7500 requests/connects per second, the server/client that do real messages do about 4500 req and connections per second. If all requests are on

Re: [Haskell-cafe] Re: poll: how can we help you contribute to darcs?

2008-08-03 Thread Ketil Malde
Brandon S. Allbery KF8NH [EMAIL PROTECTED] writes: Neil Mitchell [EMAIL PROTECTED] writes: The darcs 2.0 announcement read like an obituary I don't know why, but a lot of people I spoke to seemed to have that impression, and I essentially had to wave changelogs under their face to [...]

Re: [darcs-users] [Haskell-cafe] Re: poll: how can we help you contribute to darcs?

2008-08-03 Thread David Bremner
At Sun, 3 Aug 2008 12:23:21 +0100, Ashley Moran wrote: GitHub is responsible for git's popularity. Git is so popular not because it's the best, but because it has the best Web 2.0 site. I work primarily in web development and it did occur to me to have a stab at darcshub, but I didn't know

[Haskell-cafe] Kleisli composition operator

2008-08-03 Thread Roly Perera
Hi, I'm obviously missing something basic here but I don't seem to be able to use the = operator which is apparently defined in the Prelude and also in Control.Monad. My imports are: import Prelude hiding (abs, lookup, init) import Data.Maybe import Data.List as List hiding (lookup, insert,

[Haskell-cafe] Re: Kleisli composition operator

2008-08-03 Thread Roly Perera
I'm obviously missing something basic here but I don't seem to be able to use the = operator which is apparently defined in the Prelude and also in Control.Monad. Sorry, I wasn't very clear in my original posting. What I meant to say is that the compiler seems to be unable to find a

Re: [Haskell-cafe] Re: poll: how can we help you contribute to darcs?

2008-08-03 Thread Gwern Branwen
On 2008.08.03 16:26:32 +0200, Ketil Malde [EMAIL PROTECTED] scribbled 0.7K characters: Brandon S. Allbery KF8NH [EMAIL PROTECTED] writes: Neil Mitchell [EMAIL PROTECTED] writes: The darcs 2.0 announcement read like an obituary I don't know why, but a lot of people I spoke to seemed to

Re: [Haskell-cafe] Re: Kleisli composition operator

2008-08-03 Thread Duncan Coutts
On Sun, 2008-08-03 at 14:52 +, Roly Perera wrote: I'm obviously missing something basic here but I don't seem to be able to use the = operator which is apparently defined in the Prelude and also in Control.Monad. Sorry, I wasn't very clear in my original posting. What I meant to

Re: [Haskell-cafe] Re: Kleisli composition operator

2008-08-03 Thread Daniel Fischer
Am Sonntag, 3. August 2008 16:52 schrieb Roly Perera: I'm obviously missing something basic here but I don't seem to be able to use the = operator which is apparently defined in the Prelude and also in Control.Monad. Sorry, I wasn't very clear in my original posting. What I meant to say

[Haskell-cafe] Re: Kleisli composition operator

2008-08-03 Thread Roly Perera
Daniel Fischer daniel.is.fischer at web.de writes: Which implementation are you using? IIRC, GHC didn't have it in Control.Monad before the 6.8 branch. Duncan Coutts [EMAIL PROTECTED] writes: It's not in the Prelude but it is in Control.Monad in base version 3 and later. You're probably

Re: [darcs-users] [Haskell-cafe] Re: poll: how can we help you contribute to darcs?

2008-08-03 Thread Ashley Moran
On Aug 03, 2008, at 3:36 pm, David Bremner wrote: I think this view is probably coloured by your background in web development. I have used git for about a year now, and never visited GitHub. I'm not saying you have to like git, but it does have other features other than a snazzy web site.

Re: [Haskell-cafe] Re: poll: how can we help you contribute to darcs?

2008-08-03 Thread Ketil Malde
Gwern Branwen [EMAIL PROTECTED] writes: I just darcs get http://darcs.net, so I would guess it was either temporary or a problem on your end. Seems I needed a newer darcs - the one shipped with Ubuntu is 1.0.9, which appears to be too old, and it works when I build a new 2.0.2 from the

Re: [Haskell-cafe] timing question

2008-08-03 Thread Brad Larsen
Arie, foldl1 is not strict in its function argument. Using it will cause stack overflows for large lists. For example: GHCi, version 6.8.2: http://www.haskell.org/ghc/ :? for help Loading package base ... linking ... done. Prelude foldl1 (+) [0..100] *** Exception: stack overflow

Re: [Haskell-cafe] adjoint of coproduct diagonal

2008-08-03 Thread Jason Dusek
Derek Elkins [EMAIL PROTECTED] wrote: The notation f+g is the notation for the functorial action of + : CxC - C on arrows, that is, if f : A - B and g : C - D then f+g : A+C - B+D. So [f,g] and f+g different. I assumed that the functorial action of + on arrows was to take ((A - C), (B -

Re: [Haskell-cafe] adjoint of coproduct diagonal

2008-08-03 Thread Jason Dusek
So I guess the Wikipedia page has an error in it? http://en.wikipedia.org/wiki/Coproduct#Definition -- _jsn ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: poll: how can we help you contribute to darcs?

2008-08-03 Thread Ashley Moran
On Aug 03, 2008, at 5:36 pm, Ketil Malde wrote: Seems I needed a newer darcs - the one shipped with Ubuntu is 1.0.9, which appears to be too old, and it works when I build a new 2.0.2 from the tarball. (Anybody with write access to the front page who can make a note of minimum version

Re: [Haskell-cafe] poll: how can we help you contribute to darcs?

2008-08-03 Thread Luke Palmer
On Fri, Aug 1, 2008 at 3:45 PM, Eric Kow [EMAIL PROTECTED] wrote: Dear Haskellers, I would like to take an informal poll for the purposes of darcs recruitment. Could you please complete this sentence for me? I would contribute to darcs if only... I haven't used darcs much, so it's

Re: [Haskell-cafe] adjoint of coproduct diagonal

2008-08-03 Thread Daniel Fischer
Am Sonntag, 3. August 2008 19:03 schrieb Jason Dusek: So I guess the Wikipedia page has an error in it? http://en.wikipedia.org/wiki/Coproduct#Definition One typo, it must be f_j = f o i_j instead of f_j = i_j o f, apart from that it looks correct. Didn't go through the examples, though,

Re: [Haskell-cafe] timing question

2008-08-03 Thread Luke Palmer
On Sun, Aug 3, 2008 at 11:06 AM, Arie Groeneveld [EMAIL PROTECTED] wrote: Sorry, should go the forum. Ok, thanks. In this case the list consists of 6-digit alphanumeric codes. So doing something like: foldl1 (\x y - g y) xs No, that still doesn't force elements. Let's say g is (+1): f =

Re: [Haskell-cafe] timing question

2008-08-03 Thread Don Stewart
bradypus: Suppose I've: f = map g I want to know how much time it takes (interpreted mode) to fully process list xs (at least 1e6 elements) with function g. Is it sufficient to execute: *Main last . f $ xs result (x.xx secs, yyy bytes) Are there any hidden difficulties

Re: [Haskell-cafe] Re: poll: how can we help you contribute to darcs?

2008-08-03 Thread Andrew Coppin
Trent W. Buck wrote: I don't know why, but a lot of people I spoke to seemed to have that impression, and I essentially had to wave changelogs under their face to convince them that darcs was still being worked on *at all*. I had to point out that it was a *release* announcement -- how could a

Re: [Haskell-cafe] adjoint of coproduct diagonal

2008-08-03 Thread Jason Dusek
What about the part that reads: The unique arrow f making this diagram commute is then correspondingly denoted f1 ∐ f2 or f1 ⊕ f2 or f1 + f2 or [f1, f2] This would seem to say that [f,g] and f+g are the same thing -- but if I've understood Derek Elkins' remarks, the latter is

[Haskell-cafe] website update how-to

2008-08-03 Thread Simon Michael
Ketil Malde wrote: (Anybody with write access to the front page who can make a note of minimum version required to 'darcs get' the repository?) I've submitted a patch. For reference, here's how to change the website: 0. get yourself a working darcs 2 by installing a binary or building the

Re: [Haskell-cafe] Re: Kleisli composition operator

2008-08-03 Thread Duncan Coutts
On Sun, 2008-08-03 at 15:31 +, Roly Perera wrote: Daniel Fischer daniel.is.fischer at web.de writes: Which implementation are you using? IIRC, GHC didn't have it in Control.Monad before the 6.8 branch. Duncan Coutts [EMAIL PROTECTED] writes: It's not in the Prelude but it is in

Re: [Haskell-cafe] Re: poll: how can we help you contribute to darcs?

2008-08-03 Thread Austin Seipp
Excerpts from Andrew Coppin's message of Sun Aug 03 04:35:32 -0500 2008: Correct me if I'm wrong, but... I was under the impression that Darcs is a revision control system. It controls revisions. Well Darcs already does that. So... what's to develop? It's not like it's slow or buggy. I

Re: [Haskell-cafe] poll: how can we help you contribute to darcs?

2008-08-03 Thread Brandon S. Allbery KF8NH
On 2008 Aug 3, at 13:15, Luke Palmer wrote: On Fri, Aug 1, 2008 at 3:45 PM, Eric Kow [EMAIL PROTECTED] wrote: I would contribute to darcs if only... I haven't used darcs much, so it's possible that I'll be forced to start contributing by my own binding hypothetical. I would contribute

Re: [Haskell-cafe] Re: poll: how can we help you contribute to darcs?

2008-08-03 Thread Brandon S. Allbery KF8NH
On 2008 Aug 3, at 5:35, Andrew Coppin wrote: Well Darcs already does that. So... what's to develop? It's not like it's slow or buggy. I slow: see ghc moving away from darcs. once you reach a certain number of patches, it becomes *very* slow --- even with darcs 2's speedups. buggy:

Re: [Haskell-cafe] Re: poll: how can we help you contribute to darcs?

2008-08-03 Thread Brandon S. Allbery KF8NH
On 2008 Aug 3, at 5:35, Andrew Coppin wrote: Well Darcs already does that. So... what's to develop? It's not like it's slow or buggy. I Oh, two more under buggy: (a) as mentioned by others, the ghc repos often cause darcs2 to spin without doing anything. (This may secretly be the

Re: [Haskell-cafe] code review? store server, 220loc.

2008-08-03 Thread Tim Newsham
What kind of performance do you actually need? Can your network connection actually sustain the bandwidth of your synthetic benchmarks? This is just an exercise at the moment, so no particular performance goal beyond how fast can it go. (tested using apache-bench, loopback interface, amd64 @

Re: [Haskell-cafe] Re: poll: how can we help you contribute to darcs?

2008-08-03 Thread Jason Dagit
I've been lurking on this thread, collecting the valuable feedback. Thanks all. On Sun, Aug 3, 2008 at 12:06 PM, Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote: On 2008 Aug 3, at 5:35, Andrew Coppin wrote: Well Darcs already does that. So... what's to develop? It's not like it's slow

Re: [Haskell-cafe] adjoint of coproduct diagonal

2008-08-03 Thread Derek Elkins
On Sun, 2008-08-03 at 11:03 -0700, Jason Dusek wrote: What about the part that reads: The unique arrow f making this diagram commute is then correspondingly denoted f1 ∐ f2 or f1 ⊕ f2 or f1 + f2 or [f1, f2] This would seem to say that [f,g] and f+g are the same thing --

Re: [Haskell-cafe] poll: how can we help you contribute to darcs?

2008-08-03 Thread Duncan Coutts
On Fri, 2008-08-01 at 16:45 +0100, Eric Kow wrote: Dear Haskellers, I would like to take an informal poll for the purposes of darcs recruitment. Could you please complete this sentence for me? I would contribute to darcs if only... The answers I am most interested in hearing go

[Haskell-cafe] Memory problems reading a IntMap from a binary file

2008-08-03 Thread Ludger Steens
Hi, I have IntMap String with about 40,000 entries. After saving it to disk (via Data.Binary) the file is 3.5 Mb small. However if I load it and save it back again my program needs 180 MB memory. Is there anything I do wrong or does the map really need that much memory? The (simple) program

Re: [Haskell-cafe] adjoint of coproduct diagonal

2008-08-03 Thread Jason Dusek
Derek Elkins [EMAIL PROTECTED] wrote: Jason Dusek wrote: What about the part that reads: The unique arrow f making this diagram commute is then correspondingly denoted f1 ∐ f2 or f1 ⊕ f2 or f1 + f2 or [f1, f2] This would seem to say that [f,g] and f+g are the same thing --

Re: [Haskell-cafe] Memory problems reading a IntMap from a binary file

2008-08-03 Thread Don Stewart
lutzsteens: Hi, I have IntMap String with about 40,000 entries. After saving it to disk (via Data.Binary) the file is 3.5 Mb small. However if I load it and save it back again my program needs 180 MB memory. Is there anything I do wrong or does the map really need that much memory?

[Haskell-cafe] Re: poll: how can we help you contribute to darcs?

2008-08-03 Thread Ben Franksen
Luke Palmer wrote: On Fri, Aug 1, 2008 at 3:45 PM, Eric Kow [EMAIL PROTECTED] wrote: I would contribute to darcs if only... I haven't used darcs much, so it's possible that I'll be forced to start contributing by my own binding hypothetical. I would contribute to darcs if only it had

[Haskell-cafe] Re: question about faulting in Haskell packages ...

2008-08-03 Thread Ben Franksen
david48 wrote: for each package you have to type (*) : runhaskell Setup.hs configure runhaskell Setup.hs build sudo runhaskell Setup.hs install (*) sometimes it'll be Setup.lhs, I'm annoyed that it's not always the same name, can't rely on shell history :( Same here; my solution is to

Re: [Haskell-cafe] Re: poll: how can we help you contribute to darcs?

2008-08-03 Thread Brandon S. Allbery KF8NH
On 2008 Aug 3, at 19:16, Ben Franksen wrote: The naive way to emulate your split feature would be to create a branch where you delete all the stuff you don't want and then maybe move the subproject to a new directory (nearer the top-level). This doesn't work, however, at least not in

[Haskell-cafe] Re: Brainstorming on how to parse IMAP

2008-08-03 Thread Ben Franksen
John Goerzen wrote: I'm interested in writing a library to work with IMAP servers. I'm interested in thoughts people have on parsing libraries and methods. I'm a huge fan of Parsec overall -- it lets me have a single-stage parser, for instance. But it isn't sufficiently lazy for this task,

Re: [Haskell-cafe] HDBC-ODBC linking problems in windows.

2008-08-03 Thread Andrew Appleyard
Hi PJ, On 2/08/2008 4:09 AM, you wrote: I am having issues getting hdbc/odbc working on windows. When using GHC, I am not able to compile a simple program. It ends up with linker errors like [...] Is there an easy workaround for this? Or am I doing something wrong? MySetup === Windows XP

[Haskell-cafe] Re: Re: poll: how can we help you contribute to darcs?

2008-08-03 Thread Ben Franksen
Brandon S. Allbery KF8NH wrote: On 2008 Aug 3, at 19:16, Ben Franksen wrote: The naive way to emulate your split feature would be to create a branch where you delete all the stuff you don't want and then maybe move the subproject to a new directory (nearer the top-level). This doesn't work,

[Haskell-cafe] Re: poll: how can we help you contribute to darcs?

2008-08-03 Thread Trent W. Buck
Ashley Moran [EMAIL PROTECTED] writes: On Aug 03, 2008, at 5:36 pm, Ketil Malde wrote: Seems I needed a newer darcs - the one shipped with Ubuntu is 1.0.9, which appears to be too old, and it works when I build a new 2.0.2 from the tarball. (Anybody with write access to the front page who

Re: [darcs-users] [Haskell-cafe] Re: poll: how can we help you contribute to darcs?

2008-08-03 Thread John Goerzen
Ashley Moran wrote: On Aug 03, 2008, at 3:36 pm, David Bremner wrote: I think this view is probably coloured by your background in web development. I have used git for about a year now, and never visited GitHub. I'm not saying you have to like git, but it does have other features other

Re: [Haskell-cafe] Re: poll: how can we help you contribute to darcs?

2008-08-03 Thread John Goerzen
Andrew Coppin wrote: Trent W. Buck wrote: I don't know why, but a lot of people I spoke to seemed to have that impression, and I essentially had to wave changelogs under their face to convince them that darcs was still being worked on *at all*. I had to point out that it was a *release*

[Haskell-cafe] your RSA code

2008-08-03 Thread Galchin, Vasili
Hi John, I am reading your RSA code as suggested. 1) Do you have an example code that uses your RSA API? 2) a ForeignPtr is created in function createPkey and returned to the caller. I am trying to follow which function(s) GC the associated heap. ?? 3) My assertion: It seems in my Posix