Re: [Haskell-cafe] regex-applicative library needs your help! (algorithmic challenge)

2011-09-18 Thread Roman Cheplyaka
* Anton Tayanovskyy anton.tayanovs...@gmail.com [2011-09-17 21:46:57-0400] So you want to encode priorities efficiently as far as I understand from [1]? Could bit-packing combined with prefix elimination do the trick? Choice boils down to binary choice. Attach a number N to every execution

Re: [Haskell-cafe] regex-applicative library needs your help! (algorithmic challenge)

2011-09-18 Thread Roman Cheplyaka
* Anton Tayanovskyy anton.tayanovs...@gmail.com [2011-09-17 22:11:00-0400] By the way, can Haskell have a type that admits regular expression and only those? I mostly do ML these days, so trying to write up a regex types in Haskell I was unpleasantly surprised to discover that there are all

Re: [Haskell-cafe] regex-applicative library needs your help! (algorithmic challenge)

2011-09-18 Thread Roman Cheplyaka
Chris, Thank you for an interesting overview. However, I'm not worried directly about DoS. I just want to build a regex library which would be convenient to use for parsing regular languages (by providing applicative interface and Perl semantics), and not worse than alternatives performance-wise

Re: [Haskell-cafe] regex-applicative library needs your help! (algorithmic challenge)

2011-09-18 Thread Brandon Allbery
On Sat, Sep 17, 2011 at 22:11, Anton Tayanovskyy anton.tayanovs...@gmail.com wrote: By the way, can Haskell have a type that admits regular expression and only those? I mostly do ML these days, so trying to write up a regex types in Haskell I was unpleasantly surprised to discover that there

[Haskell-cafe] ANN: usb-1.0, bindings-libusb-1.4.4 and usb-iteratee-0.4

2011-09-18 Thread Bas van Dijk
Fellow Haskellers, I would like to announce the 1.0 release of the usb library! This library lets you to communicate with USB devices from userspace. It is implemented as a high-level wrapper around bindings-libusb[1] which is a low-level binding to the portable C library: libusb-1.0 (

[Haskell-cafe] Function code generation (Template Haskell).

2011-09-18 Thread Serguey Zefirov
The task is that I have some function and I need to create another function alongside with it. The second function is based on first one. As a matter of fact, I already did this with Template Haskell. TH is quite good at that task, because I can load my module in ghci and have both functions

Re: [Haskell-cafe] Enumeratees are killing me

2011-09-18 Thread Alexander Kjeldaas
I am waiting for a web service where I can enter the type I want to process, the iterator package to use, and which will spit out the types and an example. Then life will be good. Alexander On 16 September 2011 22:46, tsuraan tsur...@gmail.com wrote: Well, I got it working. It seems to

Re: [Haskell-cafe] regex-applicative library needs your help! (algorithmic challenge)

2011-09-18 Thread Anton Tayanovskyy
I like the approach of Russ Cox[2]. One of the great ideas there (which I think he didn't emphasize enough) is to have a queue which allows O(1) testing whether an element is already there [3]. This solves the problem with priorities -- the states are guaranteed to be enqueued in the order of

Re: [Haskell-cafe] regex-applicative library needs your help! (algorithmic challenge)

2011-09-18 Thread Anton Tayanovskyy
Chris, Brandon, thank you for the input. I believe I understand what you are saying; to reiterate, yes, in the *general case*, neither ML nor Haskell types outrule nastiness such as non-termination. Yes I know about and use Coq a bit. However, ML has an important *special case*: not using