Re: [Haskell-cafe] Re: sendfile leaking descriptors on Linux?

2010-02-18 Thread Taru Karttunen
file may take a few years. - Taru Karttunen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: sendfile leaking descriptors on Linux?

2010-02-17 Thread Taru Karttunen
. If you want to detect dead sockets somewhat reliably without a timeout then there is SO_KEEPALIVE combined with polling SO_ERROR every few minutes. - Taru Karttunen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

Re: [Haskell-cafe] Re: sendfile leaking descriptors on Linux?

2010-02-16 Thread Taru Karttunen
timeout. - Taru Karttunen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] setNonBlockingFD?

2010-02-04 Thread Taru Karttunen
6.12 support. - Taru Karttunen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Is Haskell capable of matching C in string processing performance?

2010-01-23 Thread Taru Karttunen
*new_state (Callback, void *); I tried using the Text type, but its conversions to Ptr Word16 are all O(n) -- not much better than String. Are you using unicode on the C side with wchar_t? You can have utf-8 inside ByteStrings. - Taru Karttunen

Re: [Haskell-cafe] Re: AlternativePrelude extension

2010-01-17 Thread Taru Karttunen
the proposed used-extensions field is correct, and thus not harder to implement. - Taru Karttunen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] From records to a type class

2010-01-16 Thread Taru Karttunen
MyUserType = UseRaw open' = \_ _ - return 22 - Taru Karttunen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] From records to a type class

2010-01-15 Thread Taru Karttunen
, fhRef = return . R } stablePtrEmpty :: Fuse anyfh stablePtrEmpty = Fuse {} -- implement fh* with StablePtrs (omitted) -- User file handle type might be like this: data Obj t where Dir :: {} - Obj IsDir File :: {} - Obj IsFile - Taru Karttunen

Re: [Haskell-cafe] Re: Cleaner networking API - network-fancy

2009-08-14 Thread Taru Karttunen
keep a wiki with the current design. This makes it easier for both the members and other interested developer to review the design and find flaws. +1 I would be interested in participating in this. - Taru Karttunen ___ Haskell-Cafe mailing list Haskell

[Haskell-cafe] Cleaner networking API - network-fancy

2009-08-13 Thread Taru Karttunen
the type of the server function in dgramServer make sense? or would (packet - Address - (packet - IO ()) - IO ()) be better? * Does the StringLike class make sense? * Any other suggestions? - Taru Karttunen ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Re: Cleaner networking API - network-fancy

2009-08-13 Thread Taru Karttunen
the different protocols and their various options. I'll think on it. UDP does not play nicely with Handles. TCP wants Handles. Thus using an unified API does not make much sense. The semantics are just too different. - Taru Karttunen ___ Haskell-Cafe mailing

[Haskell-cafe] Typeclass for functions taking different kinds of strings

2009-08-05 Thread Taru Karttunen
but would like comments first. With the library the above code is transformed into: foo :: StringLike string = string - Foo - Taru Karttunen StringLike.hs Description: Binary data ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Typeclass for functions taking different kinds of strings

2009-08-05 Thread Taru Karttunen
creates too much overhead for large chunks of data. - Taru Karttunen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Records and associated types

2008-12-11 Thread Taru Karttunen
at t.hs:19:9 type instance S (any :+: tail) field -- Defined at t.hs:23:9 How is it possible to get the TypeEq constraint into the type family? Attached is a complete example that illustrates the problem. - Taru Karttunen {-# LANGUAGE UndecidableInstances, OverlappingInstances