Re: [Haskell-cafe] ANN: bytestring-lexing 0.3.0

2012-01-28 Thread Erik de Castro Lopo
wren ng thornton wrote: > * The readDecimal function in particular has been highly optimized. The > new version is wicked fast[1] and perfectly suitable for hot code > locations like parsing headers for HTTP servers like Warp. In addition, > attention has been paid to ensuring that parsing is e

Re: [Haskell-cafe] ANN: pointless fun

2012-01-28 Thread Joachim Breitner
Hi, Am Samstag, den 28.01.2012, 23:34 -0500 schrieb wren ng thornton: > * Perhaps the most useful is that it packages up Matt Helige's classic > multicomposition trick[1]. These combinators allow you to easily modify > the types of a many-argument function with syntax that looks like giving > t

Re: [Haskell-cafe] ANN: pointless fun

2012-01-28 Thread wren ng thornton
On 1/28/12 11:34 PM, wren ng thornton wrote: * Perhaps the most useful is that it packages up Matt Helige's classic multicomposition trick[1]. Apologies, that should be Hellige. -- Live well, ~wren ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.

[Haskell-cafe] ANN: pointless fun

2012-01-28 Thread wren ng thornton
-- pointless-fun 1.1.0 The pointless-fun package offers some common point-free combinators (common for me at least). -- Long Description -

Re: [Haskell-cafe] Contributing to http-conduit

2012-01-28 Thread Michael Snoyman
Thanks, looks great! I've merged it into the Github tree. On Sat, Jan 28, 2012 at 8:36 PM, Myles C. Maxfield wrote: > Ah, yes, you're completely right. I completely agree that moving the > function into the Maybe monad increases readability. This kind of function > is what the Maybe monad was des

[Haskell-cafe] ANN: data-or

2012-01-28 Thread wren ng thornton
-- data-or 1.0.0 The data-or package offers a data type for non-exclusive disjunction. This is helpful for things like a generic merge function on sets/maps which could be union, mutual difference, etc. ba

[Haskell-cafe] ANN: combinatorics

2012-01-28 Thread wren ng thornton
-- combinatorics 0.1.0 The combinatorics package offers efficient *exact* computation of common combinatorial functions like the binomial coefficients and factorial. (For fast *approximations*, see the mat

[Haskell-cafe] ANN: bytestring-lexing 0.3.0

2012-01-28 Thread wren ng thornton
-- bytestring-lexing 0.3.0 The bytestring-lexing package offers efficient reading and packing of common types like Double and Integral types. -- Administrativ

Re: [Haskell-cafe] Named captures in regex-pcre?

2012-01-28 Thread Roman Cheplyaka
* Ilya Portnov [2012-01-29 01:26:29+0500] > Hi haskell-cafe. > > Is there a way to get named captures from regex using regex-pcre (or > maybe other PCRE-package)? For example, I want to write something > like > > let result = "ab 12 cd" =~ "ab (?P\d+) cd" :: SomeCrypticType > > and then have na

Re: [Haskell-cafe] Named captures in regex-pcre?

2012-01-28 Thread Brandon Allbery
On Sat, Jan 28, 2012 at 15:26, Ilya Portnov wrote: > Is there a way to get named captures from regex using regex-pcre (or maybe > other PCRE-package)? For example, I want to write something like > regex-pcre is constrained by the common Haskell regex API (used by all the regex-* packages), which

Re: [Haskell-cafe] Contributing to http-conduit

2012-01-28 Thread Erik de Castro Lopo
Michael Snoyman wrote: > On Sat, Jan 28, 2012 at 1:20 AM, Myles C. Maxfield > wrote: > > the fromJust should never fail, beceause of the guard statement: > > > >     | 300 <= code && code < 400 && isJust l'' && isJust l' = Just $ req > > > > Because of the order of the && operators, it will only

[Haskell-cafe] Named captures in regex-pcre?

2012-01-28 Thread Ilya Portnov
Hi haskell-cafe. Is there a way to get named captures from regex using regex-pcre (or maybe other PCRE-package)? For example, I want to write something like let result = "ab 12 cd" =~ "ab (?P\d+) cd" :: SomeCrypticType and then have namedCaptures result == [("number", "12")]. I do not see so

Re: [Haskell-cafe] Contributing to http-conduit

2012-01-28 Thread Myles C. Maxfield
Ah, yes, you're completely right. I completely agree that moving the function into the Maybe monad increases readability. This kind of function is what the Maybe monad was designed for. Here is a revised patch. On Sat, Jan 28, 2012 at 8:28 AM, Michael Snoyman wrote: > On Sat, Jan 28, 2012 at 1:2

Re: [Haskell-cafe] Contributing to http-conduit

2012-01-28 Thread Michael Snoyman
On Sat, Jan 28, 2012 at 1:20 AM, Myles C. Maxfield wrote: > the fromJust should never fail, beceause of the guard statement: > >     | 300 <= code && code < 400 && isJust l'' && isJust l' = Just $ req > > Because of the order of the && operators, it will only evaluate fromJust > after it makes sur

Re: [Haskell-cafe] TCP Server

2012-01-28 Thread Yves Parès
Yes, I was forecasting a little... Concerning conduit, yes it's not another implementation of Oleg's iteratees, yet its API looks a lot like 'enumerators'. Plus it aims at solving the same problem, only the implementation that differs (roughly state variables instead of pure closure-based automata

Re: [Haskell-cafe] TCP Server

2012-01-28 Thread Alexander V Vershilov
Hello. -- Resending reply to maillistmail Sat, Jan 28, 2012 at 11:51:32AM +0100, Jean-Marie Gaillourdet wrote > Hello, > > On 27.01.2012, at 00:47, Alexander V Vershilov wrote: > > Recently I asked about tcp server libraries [1] and there was only one > > answer haskell-scallable-server [2], but

Re: [Haskell-cafe] Some thoughts on Type-Directed Name Resolution

2012-01-28 Thread Paul R
AntC> Steve, I think that proposal has been rather superseeded by AntC> http://hackage.haskell.org/trac/ghc/wiki/Records/OverloadedRecordFields, which AntC> draws on TDNR. But SORF is best seen as an evolving design space, with precise AntC> details yet to be clarified/agreed. I've put my own

Re: [Haskell-cafe] Natural Transformations and fmap

2012-01-28 Thread Janis Voigtländer
Ryan Ingram wrote: However, the type of natural transformations comes with a free theorem, for example concat :: [[a]] -> [a] has the free theorem forall f :: a -> b, f strict and total, fmap f . concat = concat . fmap (fmap f) The strictness condition is needed; consider broke

Re: [Haskell-cafe] TCP Server

2012-01-28 Thread Erik de Castro Lopo
Felipe Almeida Lessa wrote: > I find it funny that conduit is said to be an iteratee library since > it has no iteratees! We've had more than one iteratee library since > at least 1.5 years with the iteratee (Mar 2009) and enumerator (Aug > 2010) packages, and AFAIK now we have four iteratee libr

Re: [Haskell-cafe] TCP Server

2012-01-28 Thread Felipe Almeida Lessa
On Sat, Jan 28, 2012 at 9:40 AM, Yves Parès wrote: >> I think there is still no consensus on which iteratee library is the one >> to use. There are at least iteratee, enumerator, iterIO, conduit, and >> pipes. The reusability of your libary depends on the choice of >> iteratee-style library you se

Re: [Haskell-cafe] TCP Server

2012-01-28 Thread Erik de Castro Lopo
Yves Parès wrote: > Yes, and IMO this is a growing problem. Since iteratees were designed, a > lot of different libraries providing this kind of service have appeared. Thats mainly because the solution space was new and lots of unexplored terrain. > Or else, we have to make sure that each one (i

Re: [Haskell-cafe] TCP Server

2012-01-28 Thread Yves Parès
> http://hackage.haskell.org/package/network-server Straightforward to use, but unfortunately uses "unix" package. I take it it is not portable. However its first version did not use it, so maybe the concerned part could be rewritten. > I think there is still no consensus on which iteratee librar

Re: [Haskell-cafe] TCP Server

2012-01-28 Thread Jean-Marie Gaillourdet
Hello, On 27.01.2012, at 00:47, Alexander V Vershilov wrote: > Recently I asked about tcp server libraries [1] and there was only one > answer haskell-scallable-server [2], but in that package there was some > dependencies and server logic that are not good for my task. A simple search for "serve

Re: [Haskell-cafe] Some thoughts on Type-Directed Name

2012-01-28 Thread Anthony Clayden
> There is an effort underway to make Haskell's Records > better. The discussion is ongoing on the ghc-users mail > list, ... > in the direction of making the most minimal changes > possible to achieve some simple record name-spacing. > > Thanks, > Greg Weber Thank you Greg, Yes I know, and I ha