Re: [Haskell-cafe] proposal: point free case expressions

2009-11-05 Thread Donn Cave
. Donn Cave, d...@avvanta.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

no-Haddock GHC build

2009-09-22 Thread Donn Cave
it. But not well versed in the intricacies of the GHC build, so please set me straight if I'm about to waste a lot of time untangling it in the makefiles. thanks! Donn Cave, d...@avvanta.com ___ Glasgow-haskell-users mailing list Glasgow-haskell-users

Re: [Haskell-cafe] Suggestion for Network.Socket in regards to PortNumber

2009-06-21 Thread Donn Cave
Quoth John Van Enk vane...@gmail.com, [... example showing that PortNum is stored in network byte order ] Notice that using the PortNum constructor does not at all do what the user expects. This really should be a hidden constructor. Could you elaborate, what does the user expect?

Re: [Haskell-cafe] Running a sub-process which dies with the main program

2009-06-18 Thread Donn Cave
Quoth Deniz Dogan deniz.a.m.do...@gmail.com, I have a small program which spawns a subprocess. However, when I hit C-c, the subprocess won't die, instead it will just keep running until it's done or until I kill it. I've looked around in System.Process for something suitable for my needs, but

Re: [Haskell-cafe] Can subclass override its super-class' default implementation of a function?

2009-04-27 Thread Donn Cave
Quoth siki ga...@karamaan.com, The actual problem is quite similar to the one that I provided or to the one in the description of the proposed extension that you linked. Someone on another forum suggested record functions but I'm not sure I understood correctly how that would work around

Re: [Haskell-cafe] compilation to C, not via-C

2009-04-24 Thread Donn Cave
Quoth Alex Queiroz asand...@gmail.com, Actually some Scheme compilers have a c-declare form that lets you create C functions, which can be called from C, Haskell, Java, Ruby etc. That would be like what you get with Haskell FFI export? When I do this with nhc98, I need a nhc98 main, and

Re: [Haskell-cafe] Converting IO [XmlTree] to [XmlTree]

2009-04-14 Thread Donn Cave
Quoth Cristiano Paris fr...@theshire.org, I was a bit surprised by the strong reaction about my citation of unsafePerformIO. Well, there might be a couple of things going on here. Part of it is how to guess the unstated context of a question - I'm fairly sure that given a more thorough

Re: [Haskell-cafe] error handling (esp. IO/exceptions)

2009-04-14 Thread Donn Cave
Quoth br...@lorf.org, On Tuesday, 14.04.09 at 22:13, Lennart Augustsson wrote: So the right way to do this (like opening a file), is to try executing it and let the OS tell you if it failed. I know, but the various functions that create processes don't help me know whether the program

Re: [Haskell-cafe] error handling (esp. IO/exceptions)

2009-04-14 Thread Donn Cave
Quoth br...@lorf.org, execute :: FilePath - [String] - IO (Either ExecuteError ExitCode) where 'ExecuteError' is a data type representing all the ways 'execute' could fail and that 'execute p args' is supposed to * ensure p exists * get p's permissions * ensure p is readable * ensure p

Re: [Haskell-cafe] ByteStrings, FFI, iovec

2009-03-28 Thread Donn Cave
Quoth Antoine Latter aslat...@gmail.com, ... I haven't put this into practice yet, Really? haven't even tried it? Well, this is just a comment, since I'm not a qualified guru or anything, but I have been using the foreign array functions to do some of the things you're doing by hand, which I

Re: [Haskell-cafe] Re: Exception handling in numeric computations

2009-03-27 Thread Donn Cave
Quoth John Lato jwl...@gmail.com, An exception is caused by some sort of interaction with the run-time system (frequently a hardware issue). The programmer typically can't check for these in advance, but can only attempt to recover after they've happened. An error is some sort of bug that

Re: [Haskell-cafe] Re: Exception handling in numeric computations

2009-03-27 Thread Donn Cave
Quoth Jonathan Cast jonathancc...@fastmail.fm, An `error' is any condition where the correct response is for the programmer to change the source code :) That's a broad category, that overlaps with conditions where there are one or more correct responses for the original program as well. If I

Re: [Haskell-cafe] Re: Exception handling in numeric computations

2009-03-27 Thread Donn Cave
Quoth Henning Thielemann lemm...@henning-thielemann.de, On Fri, 27 Mar 2009, Donn Cave wrote: Quoth Jonathan Cast jonathancc...@fastmail.fm, An `error' is any condition where the correct response is for the programmer to change the source code :) That's a broad category, that overlaps

Re: [Haskell-cafe] Use unsafePerformIO to catch Exception?

2009-03-25 Thread Donn Cave
Quoth Duncan Coutts duncan.cou...@worc.ox.ac.uk: You must not do this. It breaks the semantics of the language. Other people have given practical reasons why you should not but a theoretical reason is that you've defined a non-continuous function. That is impossible in the normal semantics

Re: [Haskell-cafe] Use unsafePerformIO to catch Exception?

2009-03-25 Thread Donn Cave
Quoth Lennart Augustsson lenn...@augustsson.net: Some examples of what might happen: OK, these are interesting phenomena. From a practical point of view, though, I could see someone weighing the potential costs and benefits of a exception handler outside IO like this, and these effects might

Re: [Haskell-cafe] Use unsafePerformIO to catch Exception?

2009-03-25 Thread Donn Cave
Quoth Jonathan Cast jonathancc...@fastmail.fm: On Wed, 2009-03-25 at 09:15 -0700, Donn Cave wrote: OK, these are interesting phenomena. From a practical point of view, though, I could see someone weighing the potential costs and benefits of a exception handler outside IO like

Re: [Haskell-cafe] Use unsafePerformIO to catch Exception?

2009-03-25 Thread Donn Cave
Quoth Jonathan Cast jonathancc...@fastmail.fm: On Wed, 2009-03-25 at 10:00 -0700, Donn Cave wrote: So I thought it would be interesting to explore statements like you must not do this, and pure Haskell is not allowed to be non-deterministic, in terms of practical effects. No one would make

Re: [Haskell-cafe] about Haskell code written to be too smart

2009-03-24 Thread Donn Cave
Manlio -- You may be missing the point of my suggestion, which is to help people *find* code that suits them, rather than changing anyone's coding style. Optimizing code for one segment of readers is pessimizing it for another. Instead of dumbing down the smart code, I'd like to help your

Re: [Haskell-cafe] Ease of Haskell development on OS X?

2009-03-20 Thread Donn Cave
mentioning HOC. Donn Cave, d...@avvanta.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Sugestion for a Haskell mascot

2009-03-09 Thread Donn Cave
Quoth Joe Fredette jfred...@gmail.com: | Hehe, I love it. Sloth is a synonym for Lazyness in English too, and | they're so freaking cute... :) ... and so freaking slow! :) Donn ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] do you have to use fix with forkio?

2009-03-05 Thread Donn Cave
in their vocabulary) and arguably better style. Would you mind presenting the better style argument? To me, the above could not be clearer, so it seems like the version with fix could be only as clear, at best. Thanks, Donn cave PS - granted that forever is a fine alternative to either, I

Re: [Haskell-cafe] Expect module?

2009-01-19 Thread Donn Cave
Quoth Neil Mitchell ndmitch...@gmail.com: Is there a Haskell-Expect module? Something that would allow me to control an external Unix program via its stdin/stdout/stderr? System.Process does what you want, I think: It might not. Expect uses pseudottys (cf. openpty()), and select().

Re: [Haskell-cafe] Haskell not ready for Foo [was: Re: Hypothetical Haskell job in New York]

2009-01-15 Thread Donn Cave
Quoth Robert Greayer robgrea...@yahoo.com: The Java reinventions largely exist because of the huge deployment-time benefits you get from pure-Java code (cross-platform portability of compiled (byte) code, dynamic loading of compiled code over a network, etc.). Such reinventions are much less

Re: [Haskell-cafe] Haskell not ready for Foo [was: Re: Hypothetical Haskell job in New York]

2009-01-10 Thread Donn Cave
Quoth John A. De Goes j...@n-brain.net: | Take a language like Ruby or Python (or Java, or C#, etc.). The vast | majority of code written in these languages does not get down to the | C level. When I say, vast majority, I'm referring to 99.999%. | That's because the standard libraries

pthread mutex error building 6.10 on NetBSD

2008-12-31 Thread Donn Cave
I tried to build GHC 6.10.1 on NetBSD 4.0 this afternoon, and ran into an error, where cabal-bin calls the stage2 ghc in utils/installPackage. pthread_mutex_unlock() is called, evidently from fileLock(), with an invalid mutex. NetBSD's pthread implementation differs from Linux in its intolerance

Re: [Haskell-cafe] Don't make 'show*' functions

2008-12-26 Thread Donn Cave
Quoth brian brianchina60...@gmail.com: | On Fri, Dec 26, 2008 at 1:55 PM, Jeff Heard jefferson.r.he...@gmail.com wrote: | Off the top of my head, I would say that the traditional meaning of | Show could be changed to Serial, where serial encompasses both Read | and Show -- possibly we could find

Re: [Haskell-cafe] detecting socket closure in haskell

2008-12-04 Thread Donn Cave
Quoth Tim Docker [EMAIL PROTECTED]: | Hence I seem to need a means of detecting that a socket has been closed | remotely, without actually reading from it. . Does anyone know how to do | this? One reference I've found is this: | | http://stefan.buettcher.org/cs/conn_closed.html | | Apparently

Re: [Haskell-cafe] Re: catting to cat gets stuck at 135K

2008-11-28 Thread Donn Cave
Quoth Duncan Coutts [EMAIL PROTECTED]: | On Thu, 2008-11-27 at 11:38 -0500, Brandon S. Allbery KF8NH wrote: | | The way this is usually handled in the non-threaded case is to either | use SIGCHLD or non-blocking waitpid() so that green threads can | continue running. I'm a little surprised

Re: [Haskell-cafe] FFI and returning structs

2008-11-19 Thread Donn Cave
Quoth Maurcio [EMAIL PROTECTED]: | I have not found examples of this in documentation | or hackage packages: how can I deal with funcions | returning not pointers to structs but structs | thenselves? | | struct example {... | | example function_name (... | | My intuition said I could try a data

Re: [Haskell-cafe] Re: FFI and returning structs

2008-11-19 Thread Donn Cave
Quoth Maurcio [EMAIL PROTECTED]: | (...) Ironically, that's actually just what the original | function is doing - cf. struct return convention, where the | caller allocates space and passes a pointer as a hidden | parameter. (...) | | Can I be sure things always goes like

Re: Unicode's greek lambda

2008-11-18 Thread Donn Cave
Quoth Duncan Coutts [EMAIL PROTECTED]: | On Tue, 2008-11-18 at 11:51 +, Ross Paterson wrote: | But it could be a reserved word synonymous with \. After all, \ can | occur in operator symbols, but the operator \ is reserved. | | Presumably that would let you do (\ x - ...) but not (\x - )

Re: [Haskell-cafe] Calling Haskell from other languages?

2008-11-11 Thread Donn Cave
Quoth Colin Paul Adams [EMAIL PROTECTED]: | Is there a way to call Haskell code from other languages? I have looked on | the wiki, and as far as I can see, it only talks about the other way | round (when Haskell is the main program). There sure is a way to call from other languages - cf. foreign

Re: [Haskell-cafe] File handles and pipes

2008-10-19 Thread Donn Cave
the importance of closing the write end of your own pipe, and not letting pipe fds leak into child processes. Donn Cave, [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Interesting new user perspective

2008-10-10 Thread Donn Cave
in this context, then maybe it isn't such a generally useful language that people ought to be worried about learning it. Donn Cave, [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo

Re: [Haskell-cafe] System.Process

2008-09-30 Thread Donn Cave
the arguments, but runCommand [only] invokes the shell. If you want runProcess to invoke the shell: runProcess /bin/sh [-c, commandLine] ... (... ought to be [sh, -c commandLine], but the way I remember it ghc gratuitously prevents you from specifying argv 0.) Donn Cave, [EMAIL

Re: [Haskell-cafe] Line noise

2008-09-21 Thread donn cave
! ;-) Well, to be precise, C++ got that from C. What C++ adds to it: fy(a.fx(b), c) (in Haskell, fy (fx a b) c) I wouldn't worry too much about one letter identifiers and so forth. Many programmers will secretly be rather attracted to this kind of thing. Donn Cave, [EMAIL PROTECTED

Re: [Haskell-cafe] Re: Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Donn Cave
should leave this to the programmer - support processes, OS threads, or user threads without undue work-around burdens. Otherwise we'll be stuck like the Python community is, defending this approach as a religious argument. We have enough of those already. Donn Cave, [EMAIL PROTECTED

Re: Making GHC work on BSD

2008-09-12 Thread Donn Cave
Quoth Philip Weaver [EMAIL PROTECTED]: | On Fri, Sep 12, 2008 at 5:13 AM, Ian Lynagh [EMAIL PROTECTED] wrote: | On Mon, Sep 08, 2008 at 10:08:27PM +0200, Thorkil Naur wrote: | | take the latest (7.0) FreeBSD and install that. | | So, it would be useful to know, which FreeBSD version would you

Re: [Haskell-cafe] Haskell stacktrace

2008-09-09 Thread Donn Cave
Prelude.catch and Control.Exception.catch Though in an example like that, you'll need to force evaluation to actually catch the exception. f _ = return something went wrong t = return $! show $ too short list !! 100 ... Control.Exception.catch t f (note $! instead of $ in t.) Donn Cave

Re: Making GHC work on BSD

2008-09-08 Thread Donn Cave
when it isn't in a path automatically searched by the compiler, and 2) NetBSD renamed system functions. (They also include the above mentioned ELF_ST_TYPE patch.) These patches are applied by the NetBSD package maintainer, but are also available separately through the package system. Donn

Re: [Haskell-cafe] Parsec and network data

2008-08-29 Thread Donn Cave
strings to parse. Donn Cave, [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Parsec and network data

2008-08-29 Thread Donn Cave
to a ByteString or something, would have to think about it. Donn Cave, [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Parsec and network data

2008-08-29 Thread Donn Cave
Quoth brian [EMAIL PROTECTED]: | On Fri, Aug 29, 2008 at 11:15 AM, Donn Cave [EMAIL PROTECTED] wrote: | Quoth brian [EMAIL PROTECTED]: | | | I want to use Parsec to parse NNTP data coming to me from a handle I | | get from connectTo. | | I would implement the network service | input data stream

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

2008-08-14 Thread Donn Cave
Quoth Thomas Schilling [EMAIL PROTECTED]: | ... Haskell can learn from | O'Caml, O'Caml can learn from Haskell. I also think that most users | of either language actually know that. I'd like to start with a name for it. - Objective CAML (name of the language) - ocaml (name of the

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

2008-08-05 Thread Donn Cave
Quoth John Goerzen [EMAIL PROTECTED]: ... | One problem with that is that if I use specific parsing library foo, | then only others that are familiar with specific parsing library foo can | hack on it. Well, you asked. For me, the parsing is a relatively minor part of the problem and maybe not

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

2008-08-05 Thread Donn Cave
Quoth John Goerzen [EMAIL PROTECTED]: | Donn Cave wrote: ... | So I would let the application come up with the data. In general, | | Well, your response here begs the question of how much you want to | automate from the application. Yes, there are multiple ways of | communicating with IMAP

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

2008-08-03 Thread Donn Cave
case the application gets more data from the server and tries again. -- Donn Cave [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] OpenSSL.Digest linking error: EVP_mdc2

2008-07-06 Thread Donn Cave
that the function hopenssl was looking for is commonly missing in SSL builds. Donn Cave, [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: *BSD support in 6.8.3

2008-06-07 Thread Donn Cave
On Sat, 07 Jun 2008 05:14:02 +0100 Simon Marlow [EMAIL PROTECTED] wrote: Donn Cave wrote: On Thu, 5 Jun 2008 09:23:36 -0700 Donn Cave [EMAIL PROTECTED] wrote: ... It looks like, in base anyway, this actually goes in a .h file, to a pattern like ... ah, never mind that, I see

Re: *BSD support in 6.8.3

2008-06-05 Thread Donn Cave
On Thu, 5 Jun 2008 09:23:36 -0700 Donn Cave [EMAIL PROTECTED] wrote: ... It looks like, in base anyway, this actually goes in a .h file, to a pattern like ... ah, never mind that, I see those wrappers are not the sort I need. -- Donn Cave [EMAIL PROTECTED

Re: *BSD support in 6.8.3

2008-06-03 Thread Donn Cave
On Mon, 02 Jun 2008 09:36:41 +0100 Simon Marlow [EMAIL PROTECTED] wrote: Donn Cave wrote: ... 20080531 and NetBSD-amd64 4.0, not so good: GHCi, version 6.8.2.20080531: http://www.haskell.org/ghc/ :? for help Loading package base ... linking ... done. Bad system call (core

Re: *BSD support in 6.8.3

2008-06-02 Thread Donn Cave
work around this problem? Yes, so the NetBSD package maintainer suggested, after I wrote to him about this. He expressed some interest in getting the amd64 build into the package system, as there have been requests (currently supports only the i386 platform), so I'm going to pursue that. -- Donn

Re: *BSD support in 6.8.3

2008-06-01 Thread Donn Cave
smoothly. -- Donn Cave [EMAIL PROTECTED] ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: [Haskell-cafe] haskell compiler on NetBSD amd64

2008-06-01 Thread Donn Cave
On Sat, 10 May 2008 10:35:12 +0100 Emil Skoeldberg [EMAIL PROTECTED] wrote: On Fri, May 09, 2008 at 10:21:19PM -0700, Donn Cave wrote: So here I am with 64 bit Athlon hardware, running amd64 NetBSD (a.k.a. x86_64), reasonably motivated to compile Haskell. So, we are in the same boat

Re: [Haskell-cafe] haskell compiler on NetBSD amd64

2008-06-01 Thread Donn Cave
(), unsetenv(), etc. So if that's agreeable, don't take the file I put on-line, I'll build up another one. thanks -- Donn Cave [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: *BSD support in 6.8.3

2008-05-29 Thread Donn Cave
don't use mmap(), then support for MAP_32BIT is no concern? -- Donn Cave [EMAIL PROTECTED] ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

integer size on NetBSD amd64

2008-05-22 Thread Donn Cave
! Donn Cave, [EMAIL PROTECTED] ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: [Haskell-cafe] haskell compiler on NetBSD amd64

2008-05-11 Thread Donn Cave
. I will follow up off list if I get anywhere interesting with it, either to parties to this exchange or maybe glasgow-haskell-users would be an appropriate place. -- Donn Cave [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] haskell compiler on NetBSD amd64

2008-05-10 Thread Donn Cave
/netbsd .hc files from i386/netbsd -- where there's already a working ghc. I have ghc 6.4.1 on NetBSD 3.0 i386. That's the idea, right? as apparently 6.8 is known to not build from .hc files. I don't understand `with headers starting to diverge'. Donn Cave, [EMAIL PROTECTED] -- Donn

[Haskell-cafe] haskell compiler on NetBSD amd64

2008-05-09 Thread Donn Cave
files to build 6.6.1 on NetBSD, and then use 6.6.1 to build 6.8 or whatever the current version may be by the time I get there? -- Donn Cave [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo

Re: [Haskell-cafe] runInteractiveProcess and hGetLine on Windows

2008-05-07 Thread Donn Cave
that runInteractiveProcess has an inadequate API, since you can't indicate whether the interaction with the other process should happen in text or binary mode. I don't see any reason to support text mode. Doesn't hGetLine imply text mode? What does Line mean, otherwise? Donn Cave

Re: [Haskell-cafe] Re: Writing an 'expect'-like program with runInteractiveCommand

2008-05-01 Thread Donn Cave
that causes the program to fail mysteriously. Donn Cave, [EMAIL PROTECTED] -- import System.Posix.Terminal (TerminalMode(..), TerminalState(..), withoutMode, getTerminalAttributes, setTerminalAttributes, openPseudoTerminal

Re: [Haskell-cafe] Laziness and Either

2008-04-21 Thread Donn Cave
would use error. Donn Cave, [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: I/O system brokenness with named pipes

2008-04-16 Thread Donn Cave
On Apr 16, 2008, at 10:25 AM, Brandon S. Allbery KF8NH wrote: On Apr 16, 2008, at 13:23 , Miguel Mitrofanov wrote: You are insulting other Unixes. It works on Mac OS X, for example. Not just that, but IIRC Linux was late to the party: Solaris got / dev/fd/ and /dev/stdin before Linux got

Re: [Haskell-cafe] I/O system brokenness with named pipes

2008-04-12 Thread Donn Cave
to work around the Haskell non-blocking, or the ReadWrite non-blocking? Donn Cave, [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Dynamic typing makes you more productive?

2008-03-18 Thread Donn Cave
On Mar 18, 2008, at 12:00 PM, Thomas Schilling wrote: ... I think it's worth to try to make it clear that static typing can help programmers new to the code easily check where things are used and gives them the confidence that their changes won't introduce unintended side effects. It's

Re: [Haskell-cafe] Exception handling when using STUArray

2008-03-13 Thread Donn Cave
be caught outside IO? (Of course, I do _not_ propose to write code per the expanded example above - that's only a partial expansion, and already too cumbersome to be useful. It's only a conceptual model.) Donn Cave, [EMAIL PROTECTED] ___ Haskell

Re: [Haskell-cafe] Exception handling when using STUArray

2008-03-12 Thread Donn Cave
On Mar 10, 2008, at 5:48 PM, Jonathan Cast wrote: On 10 Mar 2008, at 12:37 AM, Donn Cave wrote: ... An exception is, for me, any state that isn't properly accounted for in its immediate context. openFile could return 'Maybe Handle', but it doesn't, so the context demands a Handle

Re: [Haskell-cafe] Exception handling when using STUArray

2008-03-12 Thread Donn Cave
On Mar 12, 2008, at 6:34 AM, Brandon S. Allbery KF8NH wrote: On Mar 11, 2008, at 14:27 , Donn Cave wrote: readLDAPMessage s = let [(_, msgID), (tag, body)] = berList s in LDAPMessage (berInt msgID) (readResponse tag body) I go on to account for all the LDAP stuff I need in about

Re: [Haskell-cafe] Exception handling when using STUArray

2008-03-12 Thread Donn Cave
On Mar 12, 2008, at 12:32 PM, Brandon S. Allbery KF8NH wrote: On Mar 12, 2008, at 14:17 , Donn Cave wrote: Sure. It isn't a lot of code, so I subjected it to Either-ization as an experiment, and I did indeed take the monad procedural route. Monad != procedural, unless you insist on do

Re: [Haskell-cafe] Exception handling when using STUArray

2008-03-12 Thread Donn Cave
On Mar 12, 2008, at 2:10 PM, Henning Thielemann wrote: On Wed, 12 Mar 2008, Donn Cave wrote: On Mar 12, 2008, at 12:32 PM, Brandon S. Allbery KF8NH wrote: On Mar 12, 2008, at 14:17 , Donn Cave wrote: Sure. It isn't a lot of code, so I subjected it to Either-ization as an experiment

Re: [Haskell-cafe] Exception handling when using STUArray

2008-03-10 Thread Donn Cave
carry on regardless, however, so the implementation shouldn't be sensitive to these philosophical distinctions. Donn Cave, [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Exception handling when using STUArray

2008-03-09 Thread Donn Cave
the difference between errors and exceptions, but it doesn't come across and I don't think it's just me. Donn Cave, [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Exception handling when using STUArray

2008-03-08 Thread Donn Cave
. Donn Cave, [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Network.Socket Woes

2008-03-07 Thread Donn Cave
, and was just a minute short of sending in the FORTRAN Programmer's solution. It would have really made your eyes burn. Donn Cave, [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell-cafe] Re: Doubting Haskell

2008-02-17 Thread Donn Cave
enjoy puns, and mapped to an A/B form it seemed obvious that Success is A. Donn Cave, [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Doubting Haskell

2008-02-16 Thread Donn Cave
of these library functions came from? For the author of the original post ... can't make out what you actually found and tried, so you should know about catch in the Prelude, the basic exception handler. Donn Cave, [EMAIL PROTECTED] ___ Haskell-Cafe

Re: [Haskell-cafe] ANN: ctemplate, SSL server support in HsOpenSSL, network-minihttp, binary parsing, network-dns

2008-02-14 Thread Donn Cave
anything about it. Donn Cave, [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Re: Re: Re[2]: Wikipedia on first-class object

2007-12-30 Thread Donn Cave
the functional understanding of Chinese is intelligence or not, but the man inside is huge, stinking red herring. Donn Cave, [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Execution of external command

2007-12-13 Thread Donn Cave
redirection in the command, script params 21.) I imagine it would be easy enough to create the pipes to use with runProcess, but don't know how portable this would be outside the UNIX / POSIX world. Donn Cave, [EMAIL PROTECTED] ___ Haskell-Cafe

Re: [Haskell-cafe] IO is a bad example for Monads

2007-12-10 Thread Donn Cave
of earth by feasting on air and sunlight only. Donn Cave ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Why are OCaml and Haskell being used at these companies?

2007-11-12 Thread Donn Cave
. Donn Cave, [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] FP design

2007-11-07 Thread Donn Cave
my I/O functions are parameters to the open or init function, and the IMAP functions take over from there. In a more pure functional oriented model, could it be an extended API that exposes the IMAP functionality as operations on data, and leaves it to me to deal with the I/O? Donn Cave

Re: [Haskell-cafe] FP design

2007-11-07 Thread Donn Cave
control over the wire, that might give you a thinner API, and fewer problems to solve via typeclass. Donn Cave, [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Bug in runInteractiveProcess?

2007-10-18 Thread Donn Cave
system in its antique way, and UNIX (et al.) is built around it on a big scale. It isn't going away. Donn Cave, [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Bug in runInteractiveProcess?

2007-10-17 Thread Donn Cave
hand, erred toward the permissive/promiscuous, cf. your NetBSD source comparison.) My source observations may have been ambiguous. Old NetBSD popen closed all fds, current NetBSD popen closes only popen fds. Donn Cave, [EMAIL PROTECTED

[Haskell-cafe] Re: Bug in runInteractiveProcess?

2007-10-17 Thread Donn Cave
implementation issue. Donn Cave, [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Bug in runInteractiveProcess?

2007-10-16 Thread Donn Cave
the way to go, if closing fds. Donn Cave, [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Bug in runInteractiveProcess?

2007-10-16 Thread Donn Cave
/date False [] Nothing tr = executeFile /usr/bin/tr False [[A-Z], [a-z]] Nothing There's probably a nice way to wrap that up, so you're not keeping track of the file descriptors for all the pipes. Donn Cave, [EMAIL PROTECTED] ___ Haskell-Cafe

Re: [Haskell-cafe] Re: Bug in runInteractiveProcess?

2007-10-16 Thread Donn Cave
On Oct 16, 2007, at 9:52 PM, Brandon S. Allbery KF8NH wrote: On Oct 17, 2007, at 0:39 , Donn Cave wrote: ... As for closing file descriptors explicitly - if I remember right what I've seen in the NetBSD source, the UNIX popen() implementation may years ago have closed all file descriptors

Re: [Haskell-cafe] New slogan for haskell.org

2007-10-11 Thread Donn Cave
. Donn Cave, [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] New slogan for haskell.org

2007-10-05 Thread Donn Cave
to defeat this false recognition, that should help a lot. Or maybe that's good too, for more survivor self selection. Maybe a good slogan would be `like LISP, but with strong static typing!' Donn Cave, [EMAIL PROTECTED] ___ Haskell-Cafe

Re: [Haskell-cafe] Re: Re: Language support for imperative code. Was: Re: monad subexpressions

2007-08-13 Thread Donn Cave
. Donn Cave, [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] a regressive view of support for imperative programming in Haskell

2007-08-08 Thread Donn Cave
the inevitable and handles it well. Monads, the do syntax, whatever it takes (I have a soft spot for O'Haskell, but alas I must be nearly alone on that.) Hopefully, it's still better, and not at all irreconcilable with the Functional Way. Donn Cave, [EMAIL PROTECTED] (That's a genuine question

Re: [Haskell-cafe] IDE?

2007-06-18 Thread Donn Cave
. In particular, I'm interested in developing GUIs for languages like these. More specifically, a variation of Mathematica's notebook front-end, designed to make functional languages more accessible and useful for scientists and engineers. Donn Cave, [EMAIL PROTECTED

Re: [Haskell-cafe] Sneaking haskell in the workplace -- cleaning csv files

2007-06-16 Thread Donn Cave
in sed, but from what I gather so far, the following awk would do it -- awk '{ if (/~$/) print; else printf %s, $0 }' (literal separator for legibility.) I know we're not exactly looking for an awk or sed solution here, but thought it might add some context to the exercise anyway. Donn

Re: [Haskell-cafe] Lazy IO and closing of file handles

2007-03-14 Thread Donn Cave
, the host virtual memory management should ideally let you get away with that. And file data will be contiguous and sequential in memory, which in principle ought to be optimal for memory resources. Donn Cave, [EMAIL PROTECTED] ___ Haskell-Cafe

Re: [Haskell-cafe] Lazy IO and closing of file handles

2007-03-14 Thread Donn Cave
there's a lot less book-keeping needed if there's nothing to do in the end anyway. Donn Cave, [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Writing Haskell For Dummies Or At Least For People Who Feel Like Dummies When They See The Word 'Monad'

2006-12-14 Thread Donn Cave
others to suit particular applications. Donn Cave, [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: On improving libraries: wanted list

2006-12-13 Thread Donn Cave
directly support it, that would probably be just as well. Well, you asked for comments! Donn Cave, [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

<    1   2   3   4   >