Re: [Haskell-cafe] Reading pcap

2011-10-12 Thread Mike Dillon
Did you try using the pcap library on Hackage? http://hackage.haskell.org/package/pcap -md begin mukesh tiwari quotation: > Hello all > I was going through wireshark and read this > pcapfile

Re: [Haskell-cafe] possible bug in default module lookup scheme / or invalid haskell?

2010-07-18 Thread Mike Dillon
begin Brandon S Allbery KF8NH quotation: > The fundamental problem is that ghci has no concept of "projects". The > correct place for this is in Cabal, which *does* have project support, but > as yet it has no support for ghci. It's conceivable that the ghci user > commands capability could be us

Re: [Haskell-cafe] point-free ADT pattern matching ?

2010-07-15 Thread Mike Dillon
begin Mike Dillon quotation: > begin Vo Minh Thu quotation: > > I guess it is short because you make use of second... so you can > > define second' for your B data type, or make B an instance of Arrow. > > I don't think that's the case. The code for "f&q

Re: [Haskell-cafe] point-free ADT pattern matching ?

2010-07-15 Thread Mike Dillon
begin Vo Minh Thu quotation: > I guess it is short because you make use of second... so you can > define second' for your B data type, or make B an instance of Arrow. I don't think that's the case. The code for "f" is making use of the Arrow instance for (->): second :: Arrow a => a

Re: [Haskell-cafe] Re: The site has been exploited (again)

2010-07-13 Thread Mike Dillon
begin Gwern Branwen quotation: > Ashley has made me admin; I've spent the last 1.5 hours deleting all > the vandalism and indef blocking the accounts. I have Recent Changes > in my RSS reader, so hopefully in the future there will be no greater > than 24 hours delay before vandalism is dealt with.

Re: [Haskell-cafe] Re: The site has been exploited (again)

2010-07-11 Thread Mike Dillon
begin Mike Dillon quotation: > Being that there is only one active admin on the Haskell.org wiki > (User:Ashley Y), I believe the fact that this page is editable by any > user is a policy decision to allow the community to contribute. The > page could be protected, but then only two ad

Re: [Haskell-cafe] Re: The site has been exploited (again)

2010-07-11 Thread Mike Dillon
begin Gour quotation: > On Sun, 11 Jul 2010 14:40:03 -0300 > >> "Felipe" == Felipe Lessa wrote: > > Felipe> As far as I know, haskell.org doesn't run on top of Haskell > Felipe> software. > > That's the point. ;) > > haskell.org should work on Haskell software in order to prevent such > thi

Re: [Haskell-cafe] Memoization in Haskell?

2010-07-09 Thread Mike Dillon
begin Edward Kmett quotation: > The result is considerably faster: > > *Main> fastest_f 12380192300 > 67652175206 > > *Main> fastest_f 12793129379123 > 120695231674999 I just thought I'd point out that running with these particular values on a machine with a 32 bit Int will cause

Re: [Haskell-cafe] Monad transformers

2010-07-03 Thread Mike Dillon
begin Andrew Coppin quotation: > Roman Cheplyaka wrote: > >See above: > >-- Dynamic components may be retrieved with 'get', static components > >-- with 'ask'. > > > >So you use ask to get some configuration variable (reader monad is used > >for configuration in xmonad) and get/put/modify to deal w

Re: [Haskell-cafe] HaskellWiki and Wikipedia

2010-06-19 Thread Mike Dillon
ut there reflect at least some of the changes that have happened in the software in the last five years. -md begin Mike Dillon quotation: > This can be achieved by a wiki admin by adding the interwiki link to > MediaWiki:Nogomatch. It may be nice to edit MediaWiki:Searchresultext in a >

Re: [Haskell-cafe] HaskellWiki and Wikipedia

2010-06-18 Thread Mike Dillon
This can be achieved by a wiki admin by adding the interwiki link to MediaWiki:Nogomatch. It may be nice to edit MediaWiki:Searchresultext in a parallel way. -md "Jason Dagit" wrote: >On Fri, Jun 18, 2010 at 8:50 AM, Roman Beslik wrote: > >> On 18.06.10 07:41, Jason Dagit wrote: >> >> On Th

Re: [Haskell-cafe] Removing alternate items from a list

2010-06-08 Thread Mike Dillon
OK, here's mine: f as = [ x | (True,x) <- zip (cycle [True, False]) as ] -md begin R J quotation: > > What's the cleanest definition for a function f :: [a] -> [a] that takes a > list and returns the same list, with alternate items removed? e.g., f [0, 1, > 2, 3, 4, 5] = [1,3,5]? >

Re: [Haskell-cafe] name of this monadic combinator?

2010-06-01 Thread Mike Dillon
begin Brent Yorgey quotation: > On Sun, May 30, 2010 at 11:15:40AM -0700, Mike Dillon wrote: > > begin Michael Snoyman quotation: > > > http://hackage.haskell.org/packages/archive/base/4.2.0.1/doc/html/Control-Monad.html#v%3AliftM2 > > > > > > Strangely,

Re: [Haskell-cafe] name of this monadic combinator?

2010-05-30 Thread Mike Dillon
begin Michael Snoyman quotation: > http://hackage.haskell.org/packages/archive/base/4.2.0.1/doc/html/Control-Monad.html#v%3AliftM2 > > Strangely, > Hayoo didn't turn this one up... anyone know why? Hoogle finds it. I didn't think Hayoo was expected to do this sort of abstract type signature searc

Re: [Haskell-cafe] Why Either = Left | Right instead of something like Result = Success | Failure

2010-05-27 Thread Mike Dillon
begin C. McCann quotation: > Personally, I advocate instead using "Sinister" and "Dexter". Nice and > catchy, don't you think? Has anyone done a "translation" of the Prelude into Latin? > modulus PraeLudus ubi > > data Uter a b = Sinister a > | Dexter b > derivare (Aeq

Re: [Haskell-cafe] Writing a web service client

2010-05-25 Thread Mike Dillon
I've been playing around with creating a binding for Zenfolio's JSON-RPC API for the last few days. I've been looking at Sigbjorn Finne's excellent packages on Hackage for guidance, including flickr, delicious, and hs-twitter. I've also been looking at HTTP's Network.Browser and HAXR's Network.XmlR

Re: [Haskell-cafe] Would it be evil to add "deriving Typeable" to newtype Q?

2010-05-07 Thread Mike Dillon
begin Ivan Lazar Miljenovic quotation: > Neil Mitchell writes: > > You might want to try Derive > > (http://community.haskell.org/~ndm/derive) if DrIFT doesn't work for > > you. They do roughly the same jobs, but Derive has more output formats > > (it can be spliced in as Template Haskell, generat

Re: [Haskell-cafe] How to make way into a hadoop infrastructure

2010-04-30 Thread Mike Dillon
I think you'll want to look at the Hadoop Streaming or Hadoop Pipes API. Further down the line, I think somebody will want to implement a Haskell library to deal with the Avro serialization protocol when it becomes possible to write non-JVM mappers and reducers directly. This JIRA issue covers the

Re: [Haskell-cafe] Pointfree composition for higher arity

2010-02-17 Thread Mike Dillon
begin Stephen Tetley quotation: > On 17 February 2010 16:05, Mike Dillon wrote: > ... > > > Are you kidding me? I love writing code like this: > > > >    o = bunting bunting cardinal thrush blackbird > > > > :) > > Hi Mike > > Thanks! -

Re: [Haskell-cafe] Pointfree composition for higher arity

2010-02-17 Thread Mike Dillon
begin Stephen Tetley quotation: > On 17 February 2010 15:41, Mike Dillon wrote: > > That signature is the `oo` "specs" combinator in Data.Aviary: > > Hi Mike > > Thanks - indeed, I was just looking up the thread that covered them a > month or two ago: >

Re: [Haskell-cafe] Pointfree composition for higher arity

2010-02-17 Thread Mike Dillon
That signature is the `oo` "specs" combinator in Data.Aviary: > fun = runFun `oo` someFun someDefault -md begin Sean Leather quotation: > I find myself often writing this pattern: > > someFun x y z = ... > > > > fun y z = runFun $ someFun someDefault y z > > > > or, alternatively: > > fun