Re: [Haskell-cafe] Google Android

2008-09-25 Thread Adam Langley
, Java bytecode or DEX directly. A Google search for haskell java turns up at least one good candidate[1], but if you manage to get that working well, binding the APIs is a rather trivial task ;) [1] http://www.cse.unsw.edu.au/~pls/thesis-topics/ghcjava.html AGL -- Adam Langley [EMAIL PROTECTED

Re: [Haskell-cafe] Re: Iteratee-based IO

2008-09-21 Thread Adam Langley
, for indicating a parse failure. The actual implementation is unpleasant, although functional. [1] http://darcs.imperialviolet.org/darcsweb.cgi?r=binary-strict;a=headblob;f=/src/Data/Binary/Strict/IncrementalGet.hs -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org

Re: [Haskell-cafe] control-timeout with gtk

2008-09-18 Thread Adam Langley
that they be removed. Anyone who wants to maintain any of them should grab it now. The repos are all at http://darcs.imperialviolet.org On the chopping block: binary-strict codec-libevent control-timeout ctemplate LRU network-connection network-dns network-minihttp network-rpca system-inotify Cheers -- Adam

Re: [Haskell-cafe] control-timeout with gtk

2008-09-18 Thread Adam Langley
with. It's a constant cost for my name to be associated with them and, if nobody cares enough to take the maintainership, they should probably die - Hackage has a lot of packages these days. Do you want control-timeout? :) AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org

Re: [Haskell-cafe] Libevent FFI problems

2008-07-28 Thread Adam Langley
the use of GHC threads. But, with that error, you're correct that the current select based system is insufficient. AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Libevent FFI problems

2008-07-25 Thread Adam Langley
, but I don't see that you're ever poking a value into it. Indeed, I can't see that createEvent ever uses 'x'. Hope that helps. AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Libevent FFI problems

2008-07-25 Thread Adam Langley
note that the paper is 6 years old and GHC has come a long way since then. I'd suspect that the graph on page 15 would look much more favourable to Haskell these days. AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe

Re: [Haskell-cafe] Libevent FFI problems

2008-07-25 Thread Adam Langley
. Personally, some of my other projects are higher priorities at the moment. I'd suggest that you write your server on the select() based system as-is for now. Then, when you need epoll you'll be sufficiently motivated to hack up the RTS to include it ;) AGL -- Adam Langley [EMAIL PROTECTED] http

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

2008-06-26 Thread Adam Langley
? Specialised for 2d only, but: http://www.imperialviolet.org/binary/NearestNeighbour2D.hs AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell-cafe] safe vs unsafe

2008-06-24 Thread Adam Langley
. Section 5.6) may be moved or garbage collected by the storage manager. -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] safe vs unsafe

2008-06-24 Thread Adam Langley
On Tue, Jun 24, 2008 at 12:08 PM, Galchin, Vasili [EMAIL PROTECTED] wrote: yes I am invoking a callback function written in Haskell. Then you should just need to remove the unsafe from the foreign import decl which leads to the callback getting called. AGL -- Adam Langley [EMAIL PROTECTED

Re: [Haskell-cafe] Re: C buffer suggestions??

2008-06-23 Thread Adam Langley
the IO is still in progress, you don't want to stop the collector, but nor do you want the data moving because the kernel's pointer isn't going to move with it. AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing

Re: [Haskell-cafe] IMAP and NNTP libraries

2008-06-23 Thread Adam Langley
afraid. Perhaps you would care to write such libraries if you have a need? [1] http://hackage.haskell.org/packages/archive/pkg-list.html -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Re: C buffer suggestions??

2008-06-23 Thread Adam Langley
=mallocBytesmode=func [2] http://www.haskell.org/hoogle/hoodoc.cgi?module=Foreign.ForeignPtrname=newForeignPtrmode=func [3] http://www.haskell.org/hoogle/hoodoc.cgi?module=Foreign.ForeignPtrname=withForeignPtrmode=func -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org

Re: [Haskell-cafe] Re: C buffer suggestions??

2008-06-23 Thread Adam Langley
-- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Bit Streams

2008-06-19 Thread Adam Langley
library and made it slow :) AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Bit Streams

2008-06-19 Thread Adam Langley
should add Applicative too; maybe this weekend. AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Bit Streams

2008-06-18 Thread Adam Langley
;f=/src/Data/Binary/BitPut.hs -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] blas bindings, why are they so much slower the C?

2008-06-18 Thread Adam Langley
On Wed, Jun 18, 2008 at 9:16 AM, Anatoly Yakovenko [EMAIL PROTECTED] wrote: C doesn't work like that :) Yes it can. You would have to check the disassembly to be sure, but C compilers can, and do, perform dead code elimination. AGL -- Adam Langley [EMAIL PROTECTED] http

Re: [Haskell-cafe] Re: Bit Streams

2008-06-18 Thread Adam Langley
-strict is better. AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] who maintains the POSIX/Unix Unistd.hs?

2008-05-07 Thread Adam Langley
for c_nanosleep AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: RFC: A standardized interface between web servers and applications or frameworks (ala WSGI)

2008-04-14 Thread Adam Langley
call a single function to parse them all, but I no longer advocate that the base interface use parsed forms of headers. Also, parsing URLs seems to be pretty uncontroversial (maybe parsing key, value pairs from the path, maybe not) AGL -- Adam Langley [EMAIL PROTECTED] http

[Haskell-cafe] Re: RFC: A standardized interface between web servers and applications or frameworks (ala WSGI)

2008-04-13 Thread Adam Langley
/URL.hs AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: RFC: A standardized interface between web servers and applications or frameworks (ala WSGI)

2008-04-13 Thread Adam Langley
() Which can be put in 'main' (or equivalent) and can call error if there's a mismatch. AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo

Re: [Haskell-cafe] [GSoC] X Haskell bindings

2008-03-31 Thread Adam Langley
need not be in Haskell, although I suspect that it would be a good idea for them to be so) * The first, minimal, Haskell X client using XCB * Having sensible bindings for 25%/50%/75% and 100% of the XCB interface. AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org

Re: [Haskell-cafe] [GSoC] Student applications deadline extended one week

2008-03-31 Thread Adam Langley
-- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: HTTP client libraries

2008-03-30 Thread Adam Langley
but, other than that, I'm rather distracted with elliptic curve groups at the moment. AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo

Re: [Haskell-cafe] HTTP client libraries

2008-03-27 Thread Adam Langley
don't know what you would want from a client. Email me a list of use cases and ;) It does support HTTPS, however. See examples/webcat.hs AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] AMQP framing layer: design help requested.

2008-03-21 Thread Adam Langley
-- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] AMQP framing layer: design help requested.

2008-03-21 Thread Adam Langley
On Fri, Mar 21, 2008 at 6:41 PM, Adam Langley [EMAIL PROTECTED] wrote: Firstly, I would use the Get and Put monads directly, rather than making them instances of Binary. Also, while I'm at it - I believe that AMQP messages and small and delineated. In which case, the Data.Binary.Strict.Get

[Haskell-cafe] ANN: Network.MiniHTTP 0.2

2008-03-20 Thread Adam Langley
for talking to the network. However, these shouldn't be too hard. [1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/network-minihttp-0.2 -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Re: all threads are blocked by recvFrom

2008-03-18 Thread Adam Langley
? AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Satnam Singh of Microsoft Research

2008-03-18 Thread Adam Langley
. (It might have been very informal, in which case there wouldn't be a record of it, and nor would there be a video) Cheers, AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Re: all threads are blocked by recvFrom

2008-03-17 Thread Adam Langley
is set to non-blocking immediately. [1] http://haskell.org/ghc/docs/latest/html/libraries/network/src/Network-Socket.html#recvFrom -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

[Haskell-cafe] Re: GHC threaded RTS will call the finaliser of a ForeignPtr while references still exist

2008-03-16 Thread Adam Langley
On Sun, Mar 16, 2008 at 8:40 PM, Adam Langley [EMAIL PROTECTED] wrote: I believe that I've managed to distill a crash which has been driving me crazy for a few days into a short enough test case (22 lines) that it might be useful. Cale made a suggestion which shortens it: fptest.hs: http

Re: [Haskell-cafe] GHC threaded RTS will call the finaliser of a ForeignPtr while references still exist

2008-03-16 Thread Adam Langley
-- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: all threads are blocked by recvFrom

2008-03-14 Thread Adam Langley
in there. Alternatively, you can use the functions in Network.Socket, which should work fine. [1] http://haskell.org/ghc/docs/latest/html/libraries/base/Control-Concurrent.html#v%3AthreadWaitRead [2] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/network-bytestring-0.1.1.2 -- Adam Langley [EMAIL

Re: [Haskell-cafe] Re: all threads are blocked by recvFrom

2008-03-14 Thread Adam Langley
) working... working... (testing two\n,12,127.0.0.1:36179) working... [1] http://hpaste.org/6362 -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo

Re: [Haskell-cafe] Re: all threads are blocked by recvFrom

2008-03-14 Thread Adam Langley
On Fri, Mar 14, 2008 at 10:13 AM, Adam Langley [EMAIL PROTECTED] wrote: See [1] for an example which works for me. (If you're on Windows, you probably need to wrap main in withSocketsDo) AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org

Re: [Haskell-cafe] Problem making a program in ghc

2008-03-13 Thread Adam Langley
buffer the response. hFlush[1] may need to be called when you have finished generating it. [1] http://haskell.org/ghc/docs/latest/html/libraries/base/System-IO.html#v%3AhFlush AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell

Re: [Haskell-cafe] Constructing Data.Map from ByteString

2008-03-12 Thread Adam Langley
out which module they are going to resolve into all the time! Cheers, AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Constructing Data.Map from ByteString

2008-03-12 Thread Adam Langley
a better choice than HashMap. Exactly how large is the input? Like I said, I got about 2x bloat (measured by RSS), maybe you can send a fuller example code? AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Starting Haskell with a web application

2008-03-12 Thread Adam Langley
On Wed, Mar 5, 2008 at 12:25 PM, Adam Langley [EMAIL PROTECTED] wrote: I'm working towards, is an OpenID consumer. Once I have that working, I'll do a second release. It's not that far off, it's just a question of time. The darcs release of minihttp[1] can now do this. It's not a Hackage

Re: [Haskell-cafe] Starting Haskell with a web application

2008-03-12 Thread Adam Langley
On Wed, Mar 12, 2008 at 3:49 PM, Adam Langley [EMAIL PROTECTED] wrote: The OpenID example is running in EC2[4] at the moment if anyone wants to play. Well, thanks to all the people who hit it, there's nothing like users to find the stupid bugs ;) * Caching was wrong on the front page, so

Re: [Haskell-cafe] STM example code

2008-03-09 Thread Adam Langley
/index.htm -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: Difficulties implementing an incremental parser using Oleg-style left fold enumerator

2008-03-08 Thread Adam Langley
in your state and set it to Nothing when the input is exhausted. Then have combinators, like many, handle the EOF case sensibly. AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Network.Socket Woes

2008-03-07 Thread Adam Langley
out to htons or just assuming that the system is little-endian. We should really fix this unless there's some trick that I've been missing all this time. AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list

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

2008-03-07 Thread Adam Langley
missing all this time ;) I'll probably submit a documentation patch for this since I'm a Bear of Little Brain and this wasn't obvious to me. -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Starting Haskell with a web application

2008-03-06 Thread Adam Langley
quite happily. The darcs repo is just a mess at the moment. (darcs.imperialviolet.org/network-minihttp) [1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/network-minihttp-0.1 AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org

Re: [Haskell-cafe] Starting Haskell with a web application

2008-03-05 Thread Adam Langley
On Wed, Mar 5, 2008 at 11:07 AM, Bryan O'Sullivan [EMAIL PROTECTED] wrote: Indeed. In addition to the code you mention, people like Adam Langley and Johan Tibbell are taking on corners of the web app problem space in a more modern context. I should probably speak up then ;) I'm (slowly

Re: [Haskell-cafe] Connection helpers: for people interested in network code

2008-03-04 Thread Adam Langley
to wrap HsOpenSSL in this interface. I might try this this week. Then HTTPS should Just Work (maybe ;) AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org

Re: [Haskell-cafe] .cabal problem

2008-03-01 Thread Adam Langley
the directory package didn't exist before then, I believe the same modules were in the base package. In that case, the easy solution is probably to upgrade GHC. [1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/directory-1.0.0.0 AGL -- Adam Langley [EMAIL PROTECTED] http

[Haskell-cafe] Connection helpers: for people interested in network code

2008-02-29 Thread Adam Langley
hitting the monomorphism restriction in code. That might have been a mistake, I'm not sure yet. If it doesn't excite anyone enough to reply, I'll change the name and put it in Hackage, mostly as is. Then I'll tie HsOpenSSL into it so that SSL connections work transparently. Cheers, AGL -- Adam

Re: [Haskell-cafe] parsing c

2008-02-24 Thread Adam Langley
On Sun, Feb 24, 2008 at 4:08 PM, Evan Martin [EMAIL PROTECTED] wrote: So two questions: Is there an alternative C-parsing library? You could use gcc-xml[1] with one of the various XML parsers. [1] http://www.gccxml.org/HTML/Index.html -- Adam Langley [EMAIL PROTECTED] http

Re: [Haskell-cafe] A beginners question

2008-02-23 Thread Adam Langley
are just [Char], concating them is string concatenation. And so you have 1 16 81 (again, note the trailing space) AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] getSymbolicLinkStatus completely broken on some 6.8.2 systems

2008-02-14 Thread Adam Langley
Filed as: http://hackage.haskell.org/trac/ghc/ticket/2096 -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org 650-283-9641 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

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

2008-02-14 Thread Adam Langley
, however. It needs a few limits to stop DoS attackers from, for example, sending an infinite header and using up all the memory :) [4] http://hackage.haskell.org/packages/archive/network-dns/0.1.1/doc/html/Network-DNS-Client.html -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org 650

Re: [Haskell-cafe] getSymbolicLinkStatus completely broken on some 6.8.2 systems

2008-02-12 Thread Adam Langley
-- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org 650-283-9641 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] getSymbolicLinkStatus completely broken on some 6.8.2 systems

2008-02-12 Thread Adam Langley
On Feb 12, 2008 10:44 PM, Adam Langley [EMAIL PROTECTED] wrote: Currently I'm looking at hsc2hs for this bug. On a 32 bit box here: hsc2hs is forgiven; if you build with #define _FILE_OFFSET_BITS 32 then the structure is 96 bytes and the 64-bit offset is, indeed, at offset 88. However, if you

Re: [Haskell-cafe] getSymbolicLinkStatus completely broken on some 6.8.2 systems

2008-02-12 Thread Adam Langley
On Feb 12, 2008 11:04 PM, Adam Langley [EMAIL PROTECTED] wrote: structure filled in. HsUnix.h has a wrapper around lstat for exactly this reason, however ltrace shows it calling the wrong one. So (finally!) the real issue: hsc2hs has a C preprocessor prelude (utils/hsc2hs/template-hsc.h) which

Re: [Haskell-cafe] ANN: nano-hmac 0.2.0

2008-02-11 Thread Adam Langley
of OpenSSL: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/HsOpenSSL-0.3.1 AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org 650-283-9641 ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] example packages that use Storable in Hackage ??

2008-02-11 Thread Adam Langley
2008/2/11 Galchin Vasili [EMAIL PROTECTED]: http://hackage.haskell.org/packages/archive/pkg-list.html .. what are some packages that use Storable? binary and binary-strict at least. AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org

Re: [Haskell-cafe] question concerning ANSI void *

2008-02-08 Thread Adam Langley
/ -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org 650-283-9641 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] question concerning ANSI void *

2008-02-08 Thread Adam Langley
ioctlSomeIOCtlStruct :: CInt - CInt - SomeIOCtlStruct - IO () ioctlSomeIOCtlStruct = do ... (see the above linked to pointers to hsc2hs and c2hs about how to write this function) AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org

Re: [Haskell-cafe] reading from the cdrom drive on Red Hat

2008-02-01 Thread Adam Langley
catch and handle the resulting exception with the functions in: http://haskell.org/ghc/docs/latest/html/libraries/base/Control-Exception.html AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org 650-283-9641

Re: [Haskell-cafe] reading from the cdrom drive on Red Hat

2008-02-01 Thread Adam Langley
that the Posix.IO stuff was a closer wrapping than that. It does, indeed, throw an exception on 0. How unfortunate. AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org 650-283-9641

Re: [Haskell-cafe] Simple network client

2008-01-31 Thread Adam Langley
a unionfs over the top. It works well in my experience. AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org 650-283-9641 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Simple network client

2008-01-30 Thread Adam Langley
is a Get with a continuation monad that stops when it runs out of bytes and returns a continuation that you can give more data to in the future. AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org 650-283-9641

Re: [Haskell-cafe] ffi and pass by value structs

2008-01-30 Thread Adam Langley
call your wrapper function. You can make these functions by the dozen with the preprocessor. AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org 650-283-9641 ___ Haskell-Cafe

Re: [Haskell-cafe] Simple network client

2008-01-30 Thread Adam Langley
On Jan 30, 2008 12:04 PM, Bryan O'Sullivan [EMAIL PROTECTED] wrote: Adam Langley wrote: I'd have expected it to look more like this: data Result a = Failed String | Finished B.ByteString a | Partial (B.ByteString - Result a) (The change here is from a list

Re: [Haskell-cafe] Simple network client

2008-01-30 Thread Adam Langley
On Jan 30, 2008 1:07 PM, Adam Langley [EMAIL PROTECTED] wrote: So, if I don't hear otherwise soon, I'll probably push a new version of binary-strict later on today with the interface above. It's in the darcs now, http://darcs.imperialviolet.org/binary-strict AGL -- Adam Langley

Re: [Haskell-cafe] Performance Issues

2008-01-29 Thread Adam Langley
/libraries/base/src/GHC-List.html#foldr1 AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org 650-283-9641 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org

Re: [Haskell-cafe] Simple network client

2008-01-29 Thread Adam Langley
, with different binaries and output files) and send me the resulting traces? (They'll be quite big, so I don't know if you want to spam that whole list with them) Cheers AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org 650-283

Re: [Haskell-cafe] Upgrading ByteString causes (seemingly) impossible RTS linker errs

2008-01-27 Thread Adam Langley
...) Cheers, -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org 650-283-9641 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] ANN: RPCA and fec

2008-01-27 Thread Adam Langley
in advance the number of elements whose loss it can tolerate. Hackage: http://hackage.haskell.org/packages/archive/fec/0.1.1/doc/html/Codec-FEC.html It's new code, but the library that it's based on is well tested so should be sound. AGL -- Adam Langley

Re: [Haskell-cafe] bytea decoding

2008-01-20 Thread Adam Langley
. catMaybes . snd . mapAccumL f initState . B.unpack where initState = (0, 0) f (0, _) 92 = ((1, 0), Nothing) f (0, _) x = ((0, 0), Just x) f (1, _) 92 = ((0, 0), Just 92) f (3, n) x = ((0, 0), Just (n * 8 + (x - 48))) f (c, n) x = ((c + 1, n * 8 + (x - 48)), Nothing) AGL -- Adam Langley

[Haskell-cafe] CPP and INLINE pragmas

2008-01-20 Thread Adam Langley
to start at the beginning of a line. Has anyone a workaround for this, or a way to get the preprocessor to output a newline? Cheers AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org 650-283-9641

Re: [Haskell-cafe] Re: ANN: A triple of new packages for talking tothe outside world

2008-01-20 Thread Adam Langley
On Jan 15, 2008 7:33 PM, Adam Langley [EMAIL PROTECTED] wrote: Ok, no TH ;) I've just uploaded binary-strict 0.2.2 to Hackage which factors most of the common code out via CPP. Hopefully I didn't break anything. AGL -- Adam Langley [EMAIL PROTECTED] http

Re: [Haskell-cafe] CPP and INLINE pragmas

2008-01-20 Thread Adam Langley
Thanks Isaac and Malcolm. That neatly solves all my problems! AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org 650-283-9641 ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Re: ANN: A triple of new packages for talking tothe outside world

2008-01-17 Thread Adam Langley
ByteStrings.) A fully lazy BitGet would also be possible, of course, I've just not written it yet ;) Adam Langley agl at imperialviolet.org writes: Another thought: could e.g. getRightByteString be in the IO monad and then I don't have to run the Get(?) monad? Or is that a really stupid

Re: [Haskell-cafe] Re: ANN: A triple of new packages for talking tothe outside world

2008-01-16 Thread Adam Langley
) or at the beginning of the first byte (right aligned). If you did want a [Bool], you could use: bits - sequence $ take n $ repeat getBit AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org 650-283-9641

Re: [Haskell-cafe] Re: ANN: A triple of new packages for talking tothe outside world

2008-01-15 Thread Adam Langley
] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/binary-strict-0.2.1 AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org 650-283-9641 ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Re: ANN: A triple of new packages for talking tothe outside world

2008-01-15 Thread Adam Langley
binary and binary-strict. I think this code needs a whole lot of restructuring (maybe a bit of TH for generating the common bits). I'll get to that when it appears that the API seems reasonable. AGL -- Adam Langley [EMAIL PROTECTED] http

Re: [Haskell-cafe] Re: ANN: A triple of new packages for talking tothe outside world

2008-01-15 Thread Adam Langley
On Jan 15, 2008 5:01 PM, Neil Mitchell [EMAIL PROTECTED] wrote: That would be bad. Then you'll have gone from Data.Binary being portable code, to being GHC specific code, and I will cry :'-( Ok, no TH ;) AGL -- Adam Langley [EMAIL PROTECTED] http

Re: [Haskell-cafe] Data.Binary and serialising doubles in IEEE format

2008-01-09 Thread Adam Langley
` 23) .. 0xff (b, rest) = BS.splitAt 4 bytes n :: Word32 n = foldl1 (.|.) $ map (\(s, v) - (fromIntegral v) `shiftL` s) $ zip [0, 8, 16, 24] $ BS.unpack b AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org 650-283

Re: [Haskell-cafe] Re: ANN: A triple of new packages for talking tothe outside world

2008-01-09 Thread Adam Langley
in the Get monad? test :: Get () test = do runBitGet 2 (do getBitField 2) So the first argument to runBitGet is the number of bytes to parse for bit fields and then functions in BitGet can extract bit-length ints etc. Anyone like that idea? AGL -- Adam Langley

Re: [Haskell-cafe] ANN: A triple of new packages for talking to the outside world

2008-01-08 Thread Adam Langley
it up and push a new release of binary-strict. AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org 650-283-9641 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] ANN: A triple of new packages for talking to the outside world

2008-01-07 Thread Adam Langley
if it would be useful to you. AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org 650-283-9641 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org

[Haskell-cafe] ANN: A triple of new packages for talking to the outside world

2008-01-06 Thread Adam Langley
which occur after a given number of seconds and which can be canceled. It does it in a not-totally-stupid fashion so that you don't need to worry about setting hundreds of them. AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org

[Haskell-cafe] Getting links to Haddock documentation in Hackage

2007-12-29 Thread Adam Langley
) get the magic links. Cheers, AGL [1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/bzlib-0.4.0.1 [2] http://hackage.haskell.org/packages/archive/bzlib/0.4.0.1/doc/html/Codec-Compression-BZip.html [3] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/tar-0.1.1.1 -- Adam

Re: [Haskell-cafe] very elementary import problem .. help

2007-11-23 Thread Adam Langley
for Windows. System.Process is marked as portable, so I'm not sure why that one wouldn't be found. Finally, I believe that you want Control.Concurrent.STM. AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org 650-283-9641

Re: [Haskell-cafe] Distributed haskell using Hadoop

2007-10-16 Thread Adam Langley
MapReduce like framework etc. -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org 650-283-9641 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

Re: [Haskell-cafe] GHC optimisations

2007-08-23 Thread Adam Langley
can be sure that you don't ever get it. Floating point numbers make me sad :( AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org 650-283-9641 ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Parsing binary data.

2007-08-20 Thread Adam Langley
be useful for you, you should bug the binary team to add something similar. AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org 650-283-9641 data-binary-float.darcs Description: Binary data

Re: [Haskell-cafe] Parsing binary data.

2007-08-19 Thread Adam Langley
of lazyness in cases where you want to handle parse failures in pure code. Hopefully something will happen with this at the next sprint ;) ) [1] http://www.cse.unsw.edu.au/~dons/binary/Data-Binary.html#1 -- Adam Langley [EMAIL PROTECTED] http

[Haskell-cafe] What to do about an absent package maintainer?

2007-08-17 Thread Adam Langley
that this issue will start to occur more often now that we have Hackage. It's probably good to have some policy. Cheers, (*) It's been 1 month, with emails from several different addresses. [1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/HsOpenSSL-0.1 -- Adam Langley