Re: invoking a Haskell script without a .hs extension

2008-08-18 Thread Brandon S. Allbery KF8NH
On 2008 Aug 17, at 23:45, Paul Jarc wrote: A somewhat related issue: I'd like to avoid hard-coding the path to runhaskell or ghc in the #! line. Instead, I'd like to use #!/bin/sh, and have the shell find runhaskell or ghc in $PATH. This means the #! /usr/bin/env runhaskell ... -- brandon

Re: [Haskell-cafe] Reader monad, implicit parameters, or something else altogether?

2008-08-18 Thread Brandon S. Allbery KF8NH
On 2008 Aug 18, at 11:16, Henning Thielemann wrote: know implicit parameters break referential transparency. http://www.haskell.org/haskellwiki/The_Monad.Reader/Issue2/FunWithLinearImplicitParameters Are you making the same mistake I did? Linear implicit parameters are different from

Re: [Haskell-cafe] Reader monad, implicit parameters, or something else altogether?

2008-08-18 Thread Brandon S. Allbery KF8NH
On 2008 Aug 18, at 16:20, Evan Laforge wrote: Which is comparable to the Reader version (with the advantage/disadvantage of the body of 'escapeVelocity' not being monadic). In my opinion the implicit parameters don't make things simpler, only less portable, that's why I prefer the Reader

Re: [Haskell-cafe] Reader monad, implicit parameters, or something else altogether?

2008-08-18 Thread Brandon S. Allbery KF8NH
On 2008 Aug 18, at 17:09, Evan Laforge wrote: They also seem to be removed from ghc: http://www.haskell.org/pipermail/cvs-ghc/2006-September/031824.html Again, that's *linear* implicit parameters (%foo instead of ?foo). Oh, you're right. I made exactly the same mistake you made, and

Re: [Haskell-cafe] build depends: in a .cabal file

2008-08-18 Thread Brandon S. Allbery KF8NH
On 2008 Aug 18, at 17:30, Jason Dagit wrote: In my experience, with recent GHC there are only 3 packages needed to install cabal-install and it's pretty painless. You need zlib, HTTP and something else that I can't recall off the top of my head (but it tells you). Each of these packages can be

Re: [Haskell-cafe] X Haskell Bindings

2008-08-17 Thread Brandon S. Allbery KF8NH
On 2008 Aug 17, at 20:34, Spencer Janssen wrote: On Sat, Aug 16, 2008 at 04:07:25PM -0500, Antoine Latter wrote: Since the request to create a window has so many parameters, these parameters are all wrapped up into a CreateWindow data type, which is only ever used by the createWindow function.

Re: [Haskell-cafe] What's in a name?

2008-08-16 Thread Brandon S. Allbery KF8NH
On 2008 Aug 16, at 5:00, Andrew Coppin wrote: What to do at the module level is less obvious. Having several packages provide different implementations of the same thing is arguably useful. (E.g., I know Gtk2hs provies an SOE module. What about wxHaskell? If the interface is standard

Re: [Haskell-cafe] why isn't the thread blocked?

2008-08-16 Thread Brandon S. Allbery KF8NH
On 2008 Aug 16, at 12:22, Changying Li wrote: test.hs: /tmp/b: hGetChar: end of file test.hs: /tmp/c: hGetChar: end of file I think the thread will be blocked when /tmp/b has nothing. but it get EOF, why ? Because FIFOs are odd. Open them for read/write to avoid unexpected EOFs and

Re: [Haskell-cafe] What's in a name?

2008-08-16 Thread Brandon S. Allbery KF8NH
On 2008 Aug 16, at 13:22, Andrew Coppin wrote: Yeah, as I said, it's not immediately obvious exactly what the best solution is. Maybe we just need to get everybody to come up with more inventive names than just hashtable or binary. (E.g., We have several parsers already, but they all have

Re: [Haskell-cafe] whatever happened to sendFile?

2008-08-15 Thread Brandon S. Allbery KF8NH
On 2008 Aug 15, at 2:23, Richard A. O'Keefe wrote: On 15 Aug 2008, at 12:17 pm, Brandon S. Allbery KF8NH wrote: Actually, while I'm not sure how Linux does it, on the *BSDs pipes are actually socketpairs. This raises the question, which the documentation did not make clear to me, whether

Re: [Haskell-cafe] whatever happened to sendFile?

2008-08-15 Thread Brandon S. Allbery KF8NH
On 2008 Aug 15, at 9:34, Tony Finch wrote: On Thu, 14 Aug 2008, Brandon S. Allbery KF8NH wrote: Actually, while I'm not sure how Linux does it, on the *BSDs pipes are actually socketpairs. Not any more. FreeBSD replaced the socketpair implementation with a faster one in 1996

Re: [Haskell-cafe] whatever happened to sendFile?

2008-08-14 Thread Brandon S. Allbery KF8NH
On 2008 Aug 14, at 2:28, Ketil Malde wrote: Brandon S. Allbery KF8NH [EMAIL PROTECTED] writes: Your previously stated use case sounds like a good fit. I can easily imagine sendfile() implementations starving other network operations, though (and IIRC linux's early sendfile() implementation

Re: [Haskell-cafe] Re: Is www.haskell.org down?

2008-08-14 Thread Brandon S. Allbery KF8NH
On Aug 14, 2008, at 16:05 , Jon Harrop wrote: (spew) Where exactly did we pick up this, er, individual? Would they please take it back as defective? -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED] system administrator [openafs,heimdal,too many hats] [EMAIL

Re: [Haskell-cafe] whatever happened to sendFile?

2008-08-14 Thread Brandon S. Allbery KF8NH
On 2008 Aug 14, at 19:07, Richard A. O'Keefe wrote: to me, two of them don't have it, and the third seems to be saying you cannot use it to move data from a file (which is not a pipe) to a socket (which is not a pipe), which is the use-case for sendfile(). Actually, while I'm not sure how

Re: [Haskell-cafe] whatever happened to sendFile?

2008-08-13 Thread Brandon S. Allbery KF8NH
On 2008 Aug 13, at 15:01, Chaddaï Fouché wrote: 2008/8/13 Jason Dusek [EMAIL PROTECTED]: I found an old lib for it: http://www.haskell.org/ghc/docs/6.0/html/unix/System.Sendfile.html Hoogle turns up nothing, though. That don't sound very useful... Maybe when we only had String it was

Re: [Haskell-cafe] whatever happened to sendFile?

2008-08-13 Thread Brandon S. Allbery KF8NH
On 2008 Aug 13, at 15:04, Brandon S. Allbery KF8NH wrote: On 2008 Aug 13, at 15:01, Chaddaï Fouché wrote: 2008/8/13 Jason Dusek [EMAIL PROTECTED]: I found an old lib for it: http://www.haskell.org/ghc/docs/6.0/html/unix/System.Sendfile.html Hoogle turns up nothing, though. That don't

Re: [Haskell-cafe] whatever happened to sendFile?

2008-08-13 Thread Brandon S. Allbery KF8NH
On 2008 Aug 13, at 18:25, Jason Dusek wrote: Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote: Right. I intended that to be a heads-up in both directions: it is not simply a library convenience function, so one needs to think about when to use it. In particular, it's possible that overuse

Re: [Haskell-cafe] GLfloat on a Mac

2008-08-12 Thread Brandon S. Allbery KF8NH
On 2008 Aug 12, at 5:11, Conor McBride wrote: $ ghc -package GLUT HelloWorld.lhs -o HelloWorld Illegal instruction I'm using ghc 6.8.3 on a Mac PowerBook G4. Googling OpenGL illegal instruction produced an unending choice of horror stories. What message am I not getting? Is there some

Re: Version control systems

2008-08-10 Thread Brandon S. Allbery KF8NH
On 2008 Aug 10, at 2:12, Jason Dagit wrote: On Sat, Aug 9, 2008 at 10:44 PM, Roman Leshchinskiy [EMAIL PROTECTED] wrote: Maybe investing some time in fixing the most obvious darcs problems would be a better solution? We're working on that over at Darcs HQ, but there is no guarantee

Re: Version control systems

2008-08-10 Thread Brandon S. Allbery KF8NH
On 2008 Aug 10, at 20:17, Norman Ramsey wrote: For the last year I have been hoping to make 'a new darcs-like thing, with a real theory founding it' an important part (one of three) of a grant proposal in distributed computing. So you can see I am in favor of spending money to create a

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

2008-08-06 Thread Brandon S. Allbery KF8NH
On 2008 Aug 6, at 2:02, Ketil Malde wrote: Ben Franksen [EMAIL PROTECTED] writes: Can I convert my working repos to darcs-2? No. You cannot push or pull between darcs-2 format repos and darcs-1 or hashed format repos. This might not be optimal but is understandable, since the theory

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

2008-08-04 Thread Brandon S. Allbery KF8NH
On 2008 Aug 4, at 6:10, Malcolm Wallace wrote: A283 SEARCH {4} {21} TEXTstring not in mailbox Assuming the first line can be read strictly, and the remainder should be lazy, the parser might look something like this: FWIW, the actual data looks more like A283 SEARCH {4} TEXT {21}

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

2008-08-04 Thread Brandon S. Allbery KF8NH
On 2008 Aug 4, at 23:45, Tim Newsham wrote: Anyway, I haven't yet used any ByteString IO functions. I ran some tests when I was starting and it seems that using Handle IO functions was a bit slower than using the Socket IO functions directly. It looks like there are a bunch of Handle IO

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] 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] 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

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

2008-08-01 Thread Brandon S. Allbery KF8NH
On 2008 Aug 1, at 11:45, 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 darcs2 announcement strongly suggested that darcs would no

Re: [Haskell-cafe] carry state around ....

2008-07-28 Thread Brandon S. Allbery KF8NH
On 2008 Jul 28, at 1:54, Galchin, Vasili wrote: allocaBytes (#const sizeof(struct aiocb)) $ \ p_aiocb - do poke p_aiocb aiocb As I understand it, you can't do this;you must use the same aiocb throughout (that is, the same chunk of memory, not merely the same values; there is

Re: [Haskell-cafe] carry state around ....

2008-07-28 Thread Brandon S. Allbery KF8NH
On 2008 Jul 28, at 2:36, Galchin, Vasili wrote: Hi Brandon, So even if I go to ForeignPtr is a problem? And/Or is this a by reference vs by value issue? As I read your code, you're allocating a C object, poking the Haskell fields into it, and passing it on, then peeking the

Re: [Haskell-cafe] carry state around ....

2008-07-28 Thread Brandon S. Allbery KF8NH
On 2008 Jul 28, at 2:41, Galchin, Vasili wrote: So based on what you are saying I kind of need a Haskell AIO imperative/monadic function that basically returns a handle that is associated with this AIOCB chunk-of-memory This handle gets passed around during an AIO I/O session??

Re: [Haskell-cafe] Data Types a la Carte - automatic injections (help!)

2008-07-28 Thread Brandon S. Allbery KF8NH
On 2008 Jul 28, at 23:23, Kenn Knowles wrote: What confuses me is that IncoherentInstances is on, but it is still rejected by GHC 6.8.3 seemingly for being incoherent. I haven't tried it with any other version. Am I missing something? Any suggestions or pointers? Er? Looks to me like it

Re: [Haskell-cafe] ANNOUNCE: Sun Microsystems and Haskell.org joint project on OpenSPARC

2008-07-23 Thread Brandon S. Allbery KF8NH
On 2008 Jul 24, at 0:43, Richard A. O'Keefe wrote: So binary distributions for SPARC/Solaris and SPARC/Linux would be very very nice things for this new project to deliver early. (Or some kind of source distribution that doesn't need a working GHC to start with. I'm still working on

Re: [Haskell-cafe] Point-free style in guards

2008-07-22 Thread Brandon S. Allbery KF8NH
On Jul 22, 2008, at 13:18 , L29Ah wrote: outStanza | (isMessage) = outMessage | (isPresence) = outPresence | (isIQ) = outIQ Why such a style doesn't work, so I must write ugly code like that: Because the Haskell 98 Report specifies that guards are rewritten in a

Re: [Haskell-cafe] carry state around ....

2008-07-20 Thread Brandon S. Allbery KF8NH
On 2008 Jul 20, at 21:05, Richard A. O'Keefe wrote: For asynchronous I/O, this means that - you can allocate an aiocb object - an aiocb passed to aio_suspend, aio_error, aio_return, or aio_cancel should have been filled in by aio_read or aio_write and should be EXACTLY THE SAME object,

Re: [Haskell-cafe] carry state around ....

2008-07-19 Thread Brandon S. Allbery KF8NH
On 2008 Jul 19, at 2:40, Galchin, Vasili wrote: My viewpoint is that the above Internal members must be carried around in a Haskell program. Am I correct?? If I am correct, then the Linux implementation of Posix AIO is not portable to say Solaris? In hindsight, if I am correct, it seems

Re: [Haskell-cafe] carry state around ....

2008-07-19 Thread Brandon S. Allbery KF8NH
On 2008 Jul 19, at 16:42, Galchin, Vasili wrote: You lost me can you explain what an opaque aiocb would look like? In Haskell, it's a ForeignPtr --- you can't see inside it except by FFI calls. Although Duncan is correct and you can use an FFI preprocessor to access the

Re: [Haskell-cafe] Getting latest GHC-head/libraries takes forever

2008-07-15 Thread Brandon S. Allbery KF8NH
On 2008 Jul 15, at 20:45, Austin Seipp wrote: For the purpose of experimenting with NDP I went through the process of getting the GHC head from darcs.haskell.org. As specified in the developer wiki[1], using darcs get is basically not possible because there're so many patches. So I downloaded

Re: [Haskell-cafe] Human-friendly compiler errors for GHC

2008-07-13 Thread Brandon S. Allbery KF8NH
On 2008 Jul 13, at 9:36, Max Bolingbroke wrote: 2008/7/13 Claus Reinke [EMAIL PROTECTED]: Then again, we don't do fuzzy matching, only completion of partial identifiers and suggesting possible qualified names and imports for unqualified ones. Agreed: doing fuzzy matching on every available

Re: [Haskell-cafe] Human-friendly compiler errors for GHC

2008-07-13 Thread Brandon S. Allbery KF8NH
Following up on my own message... talking to yourself is a bad sign, right? :) On 2008 Jul 13, at 11:21, Brandon S. Allbery KF8NH wrote: Huh? Edit distance is a good way to handle typoes --- and, while some people have asserted that we don't need that because I can see it already, most

Re: [Haskell-cafe] Existential quantification problem

2008-07-13 Thread Brandon S. Allbery KF8NH
On 2008 Jul 13, at 19:50, Jonathan Cast wrote: On Sun, 2008-07-13 at 18:28 -0500, Derek Elkins wrote: On Thu, 2008-07-10 at 10:59 -0700, Jonathan Cast wrote: On Thu, 2008-07-10 at 14:53 -0300, Marco Túlio Gontijo e Silva wrote: Hello, how do I unbox a existential quantificated data type?

Re: [Haskell] Re: on starting Haskell-Edu, a new education-related Haskell-related mailing list

2008-07-11 Thread Brandon S. Allbery KF8NH
On 2008 Jul 11, at 11:33, Neil Mitchell wrote: Quite true. Any objections to [EMAIL PROTECTED] Google suggests that about 1 in 50 web pages spell beginner wrong, using only one n. Given that many Haskeller's are not native speakers, could we perhaps pick something that is easier to spell

Re: [Haskell-cafe] Getting module functions

2008-07-11 Thread Brandon S. Allbery KF8NH
On 2008 Jul 11, at 17:23, rodrigo.bonifacio wrote: Is there any function that can be used for retrieving the exposed functions of a given module? Not in the usual introspection/RTTI sense; but you could probably use the GHC API to read a .hi file. (At which point I direct you to

Re: [Haskell-cafe] Profiling nested case

2008-07-11 Thread Brandon S. Allbery KF8NH
On 2008 Jul 11, at 19:46, Mitar wrote: It is somehow award that passing function as an argument slow down the program so much. Is not Haskell a functional language and this such (functional) code reuse is one of its main points? That is in fact the case; GHC's version of various Prelude

Re: [Haskell-cafe] Trying to install cabal

2008-07-10 Thread Brandon S. Allbery KF8NH
On 2008 Jul 10, at 14:00, Eric wrote: I have downloaded cabal and am trying to install it but have gotten the following error message: C:\cabal\cabal-install-0.5.1runghc Setup configure Cabal itself is a special case; you need the same version of Cabal already installed to install it

Re: [Haskell-cafe] Avoiding lazy evaluation in an ErrorT computation

2008-07-07 Thread Brandon S. Allbery KF8NH
On 2008 Jul 7, at 11:14, Tim Bauer wrote: My problem is that I control `doTinIO', but someone else provides the computation (T a). I cannot force callers to strictly evaluate their computations. try (Control.Exception.evaluate ...) -- ? -- brandon s. allbery

Re: [Haskell-cafe] Having trouble with zip12..

2008-07-06 Thread Brandon S. Allbery KF8NH
On 2008 Jul 6, at 16:47, Tony Morris wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michael Feathers wrote: zip12 ((tails . nub) flightPaths) wayPoints etopsPackets (hd geoCaches) groundSpeeds headings (map windShift headings) (regulations !! 2) (foldr (\|/) (tail pathDistances)) [ghy

Re: [Haskell-cafe] Re: Definition of hidden instance members (bug in GHC or Hugs+Yhc)

2008-07-05 Thread Brandon S. Allbery KF8NH
On 2008 Jul 5, at 19:02, Neil Mitchell wrote: This is either a GHC bug, or a Yhc+Hugs bug - I'm not sure which, but the compilers disagree: import Prelude hiding ((==)) data Foo = Foo instance Eq Foo where (==) a b = True I was thinking that GHC's behaviour seems more sensible, but the

Re: [Haskell-cafe] Re: POSIX AIO (asych I/O) ...

2008-07-02 Thread Brandon S. Allbery KF8NH
On 2008 Jul 2, at 1:42, Galchin, Vasili wrote: errno - throwErrnoIfMinus1 aioError (c_aio_error p_aiocb) ghc thinks that Errno should be an instance of Num: System/Posix/Aio.hsc:117:15: No instance for (Num Errno) I expect so it can compare it to -1(throwErrnoIfMinusOne). But

Re: [Haskell-cafe] Re: POSIX AIO (asych I/O) ...

2008-07-02 Thread Brandon S. Allbery KF8NH
On 2008 Jul 2, at 2:15, Jonathan Cast wrote: It seems as though it can return -1 if given non-sensical input. But in The POSIX spec says it returns EINVAL in that case. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED] system administrator [openafs,heimdal,too

Re: [Haskell-cafe] Re: POSIX AIO (asych I/O) ...

2008-07-02 Thread Brandon S. Allbery KF8NH
On 2008 Jul 2, at 2:32, Jonathan Cast wrote: On Wed, 2008-07-02 at 02:17 -0400, Brandon S. Allbery KF8NH wrote: On 2008 Jul 2, at 2:15, Jonathan Cast wrote: It seems as though it can return -1 if given non-sensical input. But in The POSIX spec says it returns EINVAL in that case

Re: [Haskell-cafe] A Monad for on-demand file generation?

2008-07-01 Thread Brandon S. Allbery KF8NH
On 2008 Jul 1, at 17:52, Ryan Ingram wrote: Well, you're also (from your description) probably writing some tracking information to an IORef of some sort. That can happen in the middle of an otherwise pure computation, and it's difficult to know exactly when it'll get triggered, due to

Re: Implicit Function Arguments

2008-06-29 Thread Brandon S. Allbery KF8NH
On 2008 Jun 29, at 4:56, Philip Weaver wrote: I am under the impression they are deprecated and slated for removal. This is the second time I have seen someone comment on implicit parameters being planned for removal, so now you have my attention :). I'd like to mention that a rather large

Re: [Haskell-cafe] Error in configure script for GHC

2008-06-27 Thread Brandon S. Allbery KF8NH
On Jun 27, 2008, at 10:15 , Jefferson Heard wrote: checking for path to top of build tree... pwd: timer_create: Invalid argument Translated into plain English, this means your glibc is too old for this binary distribution. You will probably have to build from source with an older gcc as

Re: [Haskell-cafe] Error in configure script for GHC

2008-06-27 Thread Brandon S. Allbery KF8NH
On Jun 27, 2008, at 15:04 , Jefferson Heard wrote: Linux version 2.6.9-34.0.2.ELsmp ([EMAIL PROTECTED] build.centos.org) (gcc version 3.4.5 20051201 (Red Hat 3.4.5-2)) #1 SMP Fri Jul 7 18:22:55 CDT 2006 I can't help with much of anything Linux aside form having run into that error on

Re: [Haskell-cafe] Haskell, Microsoft, and interview questions

2008-06-25 Thread Brandon S. Allbery KF8NH
On 2008 Jun 25, at 16:49, Henning Thielemann wrote: On Wed, 25 Jun 2008, Andrew Wagner wrote: The recruiter even said something along the lines of anyone who knows haskell is certainly worth our time to talk to. Moral of the story: Haskell rocks, and even Microsoft knows it!

Re: [Haskell-cafe] Pretty little definitions of left and right folds

2008-06-20 Thread Brandon S. Allbery KF8NH
On 2008 Jun 20, at 19:15, George Kangas wrote: The type signature, which could be written (a - (b - b)) - ([a] - (b - b)), suggests generalization to another type constructor C: (a - (b - b)) - (C a - (b - b)). Would a foldable typeclass make any sense?

Re: [Haskell-cafe] Gtk2Hs and GCs

2008-06-19 Thread Brandon S. Allbery KF8NH
On 2008 Jun 18, at 23:23, Tim Newsham wrote: I can't seem to find any other way short of making a whole new GC (as is done in Gtk2Hs/demos/graphic/Drawing.hs). Am I missing something? Is there a reason the GC's arent retrievable? Join the gtk2hs list (

Re: [Haskell-cafe] type constructor confusion

2008-06-19 Thread Brandon S. Allbery KF8NH
On 2008 Jun 19, at 12:28, Stephen Howard wrote: Cool, Either looks like what I'm looking for. I'll have to look into that. What do I do about the fact that both HttpRequest and HttpResponse have some of the same named fields (headers and body, for example). Seems a pain to drop them

Re: [Haskell-cafe] type constructor confusion

2008-06-18 Thread Brandon S. Allbery KF8NH
On Jun 18, 2008, at 15:31 , Stephen Howard wrote: HttpMessage.hs:36:20: Not in scope: type constructor or class `HttpRequest' The troublesome line is the definition of the cookie function at the end of the code. I've made Right. HttpRequest is a data constructor associated with the

Re: [Haskell-cafe] 1/0

2008-06-16 Thread Brandon S. Allbery KF8NH
On 2008 Jun 16, at 19:18, David Roundy wrote: On Mon, Jun 16, 2008 at 4:07 PM, Evan Laforge [EMAIL PROTECTED] wrote: Every other language throws an exception, even C will crash the program, so I'm guessing it's telling the processor / OS to turn these into signals, while GHC is turning

Re: [Haskell-cafe] Lazy IO.

2008-06-14 Thread Brandon S. Allbery KF8NH
On 2008 Jun 14, at 12:59, Sebastiaan Visser wrote: But I'm still curious about how to lazily parse messages with arbitrary size Unicode headers and plain (possibly) binary bodies. Sounds like Data.Binary (see hackage) to me. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL

Re: Rebuilding ghc

2008-06-12 Thread Brandon S. Allbery KF8NH
On 2008 Jun 12, at 16:58, Dominic Steinitz wrote: Ok but doesn't that rebuild everything not just the bits that have changed? Enough stuff usually changes that it's necessary (and for whatever reason dependencies don't catch enough of it). -- brandon s. allbery

Re: Problems interrupting IO with -threaded

2008-06-11 Thread Brandon S. Allbery KF8NH
On 2008 Jun 11, at 0:43, Simon Marlow wrote: Unix semantics just isn't the right thing when it comes to non- blocking I/O. If only there were non-blocking read()/write() system calls, we'd be fine. Have you considered using aio_read() and company? -- brandon s. allbery

Re: [Haskell-cafe] What is the maturity of Haskell Web Frameworks

2008-06-04 Thread Brandon S. Allbery KF8NH
On 2008 Jun 4, at 22:30, Paul L wrote: The server is then very much like a VM or an interpreter of an embedded language, with execution stacks entirely encoded and stored in each HTML page sent to the user and back from the user as an encoded URL or form data. So the server is entirely

Re: [Haskell-cafe] ghc 6.8.2 issue

2008-06-03 Thread Brandon S. Allbery KF8NH
On 2008 Jun 3, at 16:40, Galchin, Vasili wrote: 1) How do I get the local package.conf built and populated? 2) How do I get a test case to link against this experimental local version of unix? Is there a --prefix or something like that I pass on runhaskell Setup.hs build? both

Re: [Haskell-cafe] Data.Tree.Zipper in the standard libraries

2008-05-23 Thread Brandon S. Allbery KF8NH
On 2008 May 23, at 13:34, Luke Palmer wrote: On Fri, May 23, 2008 at 10:55 AM, Jules Bean [EMAIL PROTECTED] wrote: Krasimir Angelov wrote: The monads design is used in Data.Map i.e. lookup :: (Monad m, Ord k) = k - Map k a - m a which is widely considered a poor design decision and a

Re: how do I abstract this pattern ?

2008-05-21 Thread Brandon S. Allbery KF8NH
On 2008 May 21, at 12:31, Bulat Ziganshin wrote: Wednesday, May 21, 2008, 8:11:56 PM, you wrote: Suppose p1, p2, p3 are 3 predicates that take an input -- say, a String. They return either (True, result) or False. if they return Just result or Nothing - yes, use Maybe as

Re: [Haskell-cafe] ghc-pkg package.conf files?

2008-05-21 Thread Brandon S. Allbery KF8NH
On 2008 May 21, at 1:37, Galchin, Vasili wrote: I fairly innocuous question ;^). How does ghc-pkg know where are the *package.conf files are located? The installed ghc-pkg is a shell script, to wit: #!/bin/sh GHCPKGBIN=/usr/local/lib/ghc-6.8.2/ghc-pkg.bin

Re: [Haskell-cafe] ghc-pkg package.conf files?

2008-05-21 Thread Brandon S. Allbery KF8NH
On 2008 May 21, at 2:35, Galchin, Vasili wrote: hmm ... ;^). I found and read through part of ghc-pkg.hs .. ghc-6.8.2/utils/ghc-pkg/ .. I have 6 broken Haskell package databases (not debian) under /usr/lib/haskell-packages/ghc6/lib/. When I run ghc-pkg on them I get [EMAIL

Re: [Haskell-cafe] question on ghc-pkg database

2008-05-20 Thread Brandon S. Allbery KF8NH
On 2008 May 20, at 7:53, Galchin, Vasili wrote: What is the difference between the following two ghc-pkg database instances: /usr/lib/ghc-6.8.2/package.conf /usr/local/lib/ghc-6.8.2/package.conf You somehow have two different ghc 6.8.2 packages installed, and the two package

Re: [Haskell-cafe] Performance: MD5

2008-05-18 Thread Brandon S. Allbery KF8NH
On 2008 May 18, at 4:40, Andrew Coppin wrote: Bulat Ziganshin wrote: if you need maximum efficiency, drop all this high-level code and map md5.c to haskell as it was done in Don's blog Wait... you're telling me to give up? To not even try?? Bulat is the naysayer of the group; according to

Re: [Haskell-cafe] Performance: MD5

2008-05-18 Thread Brandon S. Allbery KF8NH
On 2008 May 18, at 9:55, Andrew Coppin wrote: Brandon S. Allbery KF8NH wrote: Bulat is the naysayer of the group; according to him Haskell is a nice idea that will never actually work (but he uses it anyway, who knows how he rationalizes it to himself). Bulat is apparently not alone

Re: [Haskell-cafe] Mapping Haskell Concepts To C# 3

2008-05-18 Thread Brandon S. Allbery KF8NH
On 2008 May 18, at 9:59, Kaveh Shahbazian wrote: For something like: type Thing a b = ThisWay a | ThatWay b | NoWay actually there is no equivalents for data constructor I presume you mean data instead of type. Not that I can address your question directly, as I don't know C#. In C it's

Re: Re[2]: [Haskell-cafe] Performance: MD5

2008-05-18 Thread Brandon S. Allbery KF8NH
On 2008 May 18, at 10:45, Bulat Ziganshin wrote: and a few lines later you repeat what i said few years ago - ghc optimization research has got 100x times less attention than C++ optimization so we can't expect the same results in the next 5-10 Mmm, no. You tend to say, or at least very

Re: Re[4]: [Haskell-cafe] Performance: MD5

2008-05-18 Thread Brandon S. Allbery KF8NH
On 2008 May 18, at 11:10, Bulat Ziganshin wrote: we don't have ghc optimized as good as gcc. when i tell about it, you tell that i'm not right. then you tell that ghc may be improved in You're doing a remarkably good job of not hearing what I say. Hard numbers or etc. do nothing

Re: Re[6]: [Haskell-cafe] Performance: MD5

2008-05-18 Thread Brandon S. Allbery KF8NH
On 2008 May 18, at 11:21, Bulat Ziganshin wrote: Hello Brandon, Sunday, May 18, 2008, 7:15:17 PM, you wrote: we don't have ghc optimized as good as gcc. when i tell about it, you tell that i'm not right. then you tell that ghc may be improved in You're doing a remarkably good job of not

Re: [Haskell-cafe] Haskell-Cafe Info Page

2008-05-17 Thread Brandon S. Allbery KF8NH
On 2008 May 17, at 14:52, D. Gregor wrote: Common Lisp is a multiparadigm, general purpose programming language that supports imperative, functional, and object-oriented programming paradigms. Haskell is purely functional. Is this a reason why there is not macro feature in Haskell? I

Re: [Haskell-cafe] Another optimization question

2008-05-17 Thread Brandon S. Allbery KF8NH
On 2008 May 17, at 16:48, anton muhin wrote: Why not -O3? -O3 doesn't do anything over -O2 in ghc. -fvia-c -optc-O3 *might* be an improvement, or might not. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED] system administrator [openafs,heimdal,too many hats]

Re: [Haskell-cafe] Richer (than ascii) notation for haskell source?

2008-05-15 Thread Brandon S. Allbery KF8NH
On 2008 May 15, at 3:03, Yitzchak Gale wrote: Brandon S. Allbery KF8NH wrote: Adjacent different scripts in general is probably a reasonable token discriminator. A token combining LTR and RTL, for example, is just confusing. So you would like to ban identifiers that contain both letters

Re: [Haskell-cafe] Re: Richer (than ascii) notation for haskell source?

2008-05-15 Thread Brandon S. Allbery KF8NH
On 2008 May 15, at 3:25, Achim Schneider wrote: Yitzchak Gale [EMAIL PROTECTED] wrote: Brandon S. Allbery KF8NH wrote: Come to think of it, if you're after math notation, enough Greek letters are used as symbols that it might be necessary to just exclude them from use as letters. While I

Re: [Haskell-cafe] Re: Richer (than ascii) notation for haskell source?

2008-05-15 Thread Brandon S. Allbery KF8NH
On 2008 May 15, at 4:33, Yitzchak Gale wrote: Brandon S. Allbery KF8NH wrote: Come to think of it, if you're after math notation, enough Greek letters are used as symbols that it might be necessary to just exclude them from use as letters. Yitz Gale wrote: While I have not yet noticed

Re: [Haskell-cafe] Re: GHC predictability

2008-05-14 Thread Brandon S. Allbery KF8NH
On 2008 May 14, at 14:23, Andrew Coppin wrote: Neil Mitchell wrote: 1. What is ghc-core? You actually answer this question as part of question 2. Think of it as simple Haskell with some additional bits. I rephrase: I know what GHC's Core language is. But Dons said I suggest you install

Re: [Haskell-cafe] Richer (than ascii) notation for haskell source?

2008-05-14 Thread Brandon S. Allbery KF8NH
On 2008 May 14, at 14:32, Andrew Coppin wrote: Personally, I'd just like to be able to get rid of -, \ and other such hacks. Would it be possible to amend GHC so that it accepts - and [whatever the Unicode codepoint for left arrow is] and treats both the same? Both of those are already

Re: [Haskell-cafe] Re: Endianess

2008-05-14 Thread Brandon S. Allbery KF8NH
On 2008 May 14, at 14:34, Dan Weston wrote: So I've always wondered, if you are writing down a number being dictated (slowly) by someone else, like 234, do you write the 2, then leave space and write the 4, then go back and fill in with 3? Or do you push the 4 onto the stack until the 3

Re: [Haskell-cafe] Richer (than ascii) notation for haskell source?

2008-05-14 Thread Brandon S. Allbery KF8NH
On 2008 May 14, at 15:00, Andrew Coppin wrote: Brandon S. Allbery KF8NH wrote: On 2008 May 14, at 14:32, Andrew Coppin wrote: Personally, I'd just like to be able to get rid of -, \ and other such hacks. Would it be possible to amend GHC so that it accepts - and [whatever the Unicode

Re: [Haskell-cafe] Richer (than ascii) notation for haskell source?

2008-05-14 Thread Brandon S. Allbery KF8NH
On 2008 May 14, at 15:00, Andrew Coppin wrote: Brandon S. Allbery KF8NH wrote: On 2008 May 14, at 14:32, Andrew Coppin wrote: Personally, I'd just like to be able to get rid of -, \ and other such hacks. Would it be possible to amend GHC so that it accepts - and [whatever the Unicode

Re: [Haskell-cafe] Richer (than ascii) notation for haskell source?

2008-05-14 Thread Brandon S. Allbery KF8NH
On 2008 May 14, at 22:07, Richard A. O'Keefe wrote: On 15 May 2008, at 7:19 am, Brandon S. Allbery KF8NH wrote: Unfortunately, while I thought there was a distinct lambda sign that wasn't the lowercase Greek letter, there isn't. (That said, I don't see why it couldn't be a keyword. You'd

Re: [Haskell-cafe] Re: Richer (than ascii) notation for haskell source?

2008-05-14 Thread Brandon S. Allbery KF8NH
On 2008 May 14, at 22:23, Patrick Surry wrote: So maybe what I really want is to essentially write my source in (la)tex and be able to both compile and render to dvi at the same time? I suppose word's crazy equation editor or mathml is another option but it makes the source itself either

Re: [Haskell-cafe] Richer (than ascii) notation for haskell source?

2008-05-14 Thread Brandon S. Allbery KF8NH
On 2008 May 14, at 22:40, Richard A. O'Keefe wrote: I still suspect it would not be outside the pale to make λ a keyword. We already have several, after all. I'd rather not have to write \x as λ x with a space required after the λ. I suspect that λ is the lambda-symbol iff it is not

Re: [Haskell-cafe] Richer (than ascii) notation for haskell source?

2008-05-14 Thread Brandon S. Allbery KF8NH
On 2008 May 14, at 22:57, Derek Elkins wrote: On Thu, 2008-05-15 at 14:40 +1200, Richard A. O'Keefe wrote: I suspect that λ is the lambda-symbol iff it is not preceded by any identifier character and is not followed by a Greek letter might work. λω. ... λα. ... λδ ε. ... Come to think

Re: [Haskell-cafe] saner shootout programs

2008-05-13 Thread Brandon S. Allbery KF8NH
On 2008 May 13, at 0:26, J C wrote: On the other hand, if the experts can't help using malloc, unsafe*, global mutables and IO, I'll be able to conclude that this is probably what it takes to make Haskell run fast :-( Very few of the shootout entries have been revisited since most of the

Re: [Haskell-cafe] GHC predictability

2008-05-13 Thread Brandon S. Allbery KF8NH
On 2008 May 12, at 22:18, Jeff Polakow wrote: Then, I immediately blow my stack if I try something like: mean [1..10]. The culprit is actually sum which is defined in the base libraries as either a foldl or a direct recursion depending on a compiler flag. In either case, the

Re: [Haskell-cafe] GHC predictability

2008-05-13 Thread Brandon S. Allbery KF8NH
On 2008 May 13, at 17:01, Andrew Coppin wrote: That definition of mean is wrong because it traverses the list twice. (Curiosity: would traversing it twice in parallel work any better?) As for the folds - I always *always* mix up It might work better but you're still wasting a core that

Re: [Haskell-cafe] Endianess

2008-05-13 Thread Brandon S. Allbery KF8NH
On 2008 May 13, at 17:12, Andrew Coppin wrote: [Oh GOD I hope I didn't just start a Holy War...] Er, I'd say it's already well in progress. :/ -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED] system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]

Re: [Haskell-cafe] dropping hyphens and \n in words

2008-05-11 Thread Brandon S. Allbery KF8NH
On 2008 May 11, at 11:47, Ivan Amarquaye wrote: Now my problem is this...I'm assuming that the hyphen normally comes at the end of a sentence like this: there are so many guys ravis- hing our women and this can be demonstrated in haskell by \n which places the words or characters following

Re: [Haskell-cafe] Maybe a, The Rationale

2008-05-11 Thread Brandon S. Allbery KF8NH
On 2008 May 11, at 22:42, Don Stewart wrote: ok: Maybe types force you to deal with it, while simultaneously providing convenience functions to help you deal with it. I readily grant that Maybe is a wonderful wonderful thing and I use it freely and voluntarily. BUT it should not

Re: [Haskell-cafe] seeking advice on my POSIX wrapper

2008-05-10 Thread Brandon S. Allbery KF8NH
On 2008 May 10, at 16:47, Galchin, Vasili wrote: Last night I sent out an announcement about some POSIX work that I have been doing. In any case, one of the FFI wrappers is driving me crazy, i.e. the one for mq_receive:http://opengroup.org/onlinepubs/007908799/xsh/mq_receive.html .

Re: [Haskell-cafe] Maybe a, The Rationale

2008-05-10 Thread Brandon S. Allbery KF8NH
On 2008 May 10, at 18:56, PR Stanley wrote: Paul: Hi folks data Maybe a = Nothing | Just a What is the underlying rationale for the Maybe data type? is it the safe style of programming it encourages/ Something tells me this is going to start a lengthy discussion.

<    4   5   6   7   8   9   10   11   12   13   >