Re: [Haskell-cafe] Problem with mailman at projects.haskell.org

2013-05-13 Thread Yitzchak Gale
, Tim Docker wrote: > Thanks - I can confirm all is working again. I believe than, within some > time window. some messages may have been dropped. > > Tim > > > On 14/05/13 07:06, Yitzchak Gale wrote: >> >> The mailman daemon process on the server apparently exite

Re: [Haskell-cafe] Catching up on Time and Directory

2010-11-16 Thread Yitzchak Gale
Jon Fairbairn wrote: > I'm probably terribly out of date with this, so I wonder if > anyone can save me the bother of working out what the > /preferred/ libraries are for (a) determining the > last-modified-time of a file or directory and (b) manipulating > the resulting time datum. > > I can find

Re: [Haskell-cafe] Catching up on Time and Directory

2010-11-16 Thread Yitzchak Gale
Michael Snoyman wrote: > * Move System.Locale into the time package, bumping version number to 1.3. > * Bump old-locale to 1.1 and have it simply re-export System.Locale > from time. (Maybe we don't actually need to make that bump, 1.0.1 may > be sufficient.) > * Bump old-time to 2.0 (make it clear

Re: [Haskell-cafe] Downloading web page in Haskell

2010-11-20 Thread Yitzchak Gale
José Romildo Malaquias wrote: > Web browsers like Firefox and Opera does not seem to have the same > problem with this web page. > I would like to be able to download this page from Haskell. Hi Romildo, This web page serves the head, including a lot of JavaScript, and the first few hundred bytes

Re: [Haskell-cafe] Downloading web page in Haskell

2010-11-20 Thread Yitzchak Gale
Albert Y. C. Lai wrote: > ...truncates when the web server chooses the identity encoding > The server chooses identity when > your request's Accept-Encoding field specifies identity or simply your > request has no Accept-Encoding field Excellent work! > My methodology of discovering and confirmin

Re: [Haskell-cafe] Most images broken on haskellwiki pages

2010-12-01 Thread Yitzchak Gale
Eugene Kirpichov wrote: > I looked at a couple pages of mine... > and looks > like the vast majority of images are not displaying. This probably has to do with moving the wiki to the new server during the past few days. I forwarded your email to the admin team there for them to have a look. Regar

Re: [Haskell-cafe] doesDirectoryExist is always returning False

2010-12-01 Thread Yitzchak Gale
On Sat, Nov 20, 2010 at 4:55 PM, Marcelo Sousa wrote: > I'm having currently a problem with System.Directory in my mac os. >   System Version: Mac OS X 10.6.5 >   Kernel Version: Darwin 10.5.0 > Prelude System.Directory> let dirTest = do {dir <- getCurrentDirectory; > doesDirectoryExist dir} > Prel

Re: [Haskell-cafe] doesDirectoryExist is always returning False

2010-12-02 Thread Yitzchak Gale
Marcelo Sousa wrote: >> I'm having currently a problem with System.Directory in my mac os. >> Prelude System.Directory> let dirTest = do {dir <- getCurrentDirectory; >> doesDirectoryExist dir} >> Prelude System.Directory> dirTest >> False I.e., System.Directory.doesDirectoryExist always returns Fa

[Haskell-cafe] ANN: The attosplit package splits lazy bytestrings lazily

2010-12-21 Thread Yitzchak Gale
This is a belated announcement of a package I uploaded to hackage last week. When processing a large input stream, one of the most important techniques is to split the input into smaller pieces and process each piece separately. If that large input stream happens to be a lazy bytestring, the atto

Re: [Haskell-cafe] Mailing lists on projects.haskell.org

2011-01-18 Thread Yitzchak Gale
Hi, Sorry, I haven't been reading the cafe for a few days, so I just saw this thread. Erik de Castro Lopo wrote: >>> I tried sending mail to the haskell-llvm mailing list ( AT >>> projects.haskell.org) several days ago and today I received a bounce >>> message. Looking into the issue a little

Re: [Haskell-cafe] Delivery to haskell-platf...@projects.haskell.org

2011-01-23 Thread Yitzchak Gale
After a reboot, community.haskell.org is now responding again on port 25. Please check to see if the mailing lists are working again. Thanks, Yitz ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-caf

Re: [Haskell-cafe] Delivery to haskell-platf...@projects.haskell.org

2011-01-24 Thread Yitzchak Gale
Erik de Castro Lopo wrote: > ...my mail server is rejecting the message coming back > to me... > Nun.haskell.org really should have a reverse DNS entry Ah, that is probably a casualty of the recent upgrade of the haskell.org server. As part of that process, control of the domain was moved from Yal

[Haskell-cafe] IsString instances for attoparsec-text

2011-01-25 Thread Yitzchak Gale
Hi Felipe, Thanks so much for implementing the attoparsec-text package. Could you please add an IsString instance for Parser Text, parallel to the one in attoparsec? You may have missed this because of it being an orphan instance in attoparsec. It should be something like: instance IsString (Pa

[Haskell-cafe] Using IsString with attoparsec

2011-01-25 Thread Yitzchak Gale
Using the IsString instance for Parser in attoparsec is really nice, but unfortunately, you can't use it out of the box for the most common case. One would like to be able to write parsers in this style: "(" *> stuff <* ")" But the types of *> and <* are too general - there is no way for the typ

Re: [Haskell-cafe] Data.Ranges show error

2011-01-25 Thread Yitzchak Gale
Christian Maeder wrote: > Let's notify the maintainer to use an ordinary minus sign I actually did that two days ago. Other people probably did too. But I haven't seen any response yet. -Yitz ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http:

[Haskell-cafe] community.haskell.org is down

2011-01-26 Thread Yitzchak Gale
The community server, on which resides the domains: community.haskell.org projects.haskell.org code.haskell.org trac.haskell.org planet.haskell.org is down, due to a hacker attack. Rather than trying to repair the old machine it was on, this is the time to migrate this server (finally) to the ne

Re: [Haskell-cafe] Using IsString with attoparsec

2011-01-29 Thread Yitzchak Gale
I wrote: >>> I suggest adding the following type-specialized variants to >>> Data.Attoparsec.Char8: >>> >>> (<*.) :: Applicative f => f a -> f ByteString -> f a >>> (<*.) = (<*) >>> >>> (.*>) :: Applicative f => f ByteString -> f a -> f a >>> (.*>) = (*>) Bryan O'Sullivan wrote: >> Sounds reasonab

Re: [Haskell-cafe] [Haskell] A few days to go before the old server goes down

2011-01-30 Thread Yitzchak Gale
Henk-Jan van Tuyl wrote: > I am trying to fetch the listed pages with commands like: >  wget -m http://oldhaskell.cs.yale.edu/hmake/ > but I only get the index.html files in the directories; what am I doing > wrong? The robots.txt file on the site is telling wget that downloading the site in an au

Re: [Haskell-cafe] ANN: unordered-containers - a new, faster hashing-based containers library

2011-02-24 Thread Yitzchak Gale
Gwern Branwen wrote: >>> You could look at them yourself; I attached the files. Max Bolingbroke wrote: >> Frankly I am surprised how much "size" gets used. >> It seems that making it fast is more important than >> I thought. Johan Tibell wrote: > IntMap (which shares data structure with HashMap)

[Haskell-cafe] A practical Haskell puzzle

2011-02-27 Thread Yitzchak Gale
You have written a large software system in Haskell. Wishing to play to Haskell's strength, you have structured your system as a series of composable layers. So you have data types Layer1, Layer2, ... and functions layer2 :: Layer1 -> Layer2 layer3 :: Layer2 -> Layer3 ... etc. Of course you'll

Re: [Haskell-cafe] A practical Haskell puzzle

2011-03-02 Thread Yitzchak Gale
Thanks to everyone for the nice solutions to this puzzle, here and on reddit: http://www.reddit.com/r/haskell/comments/fu6el/a_practical_haskell_puzzle/ There were two basic approaches. One was to use GADTs and higher-rank types to reduce the amount of type trickery needed. One nice example is ap

Re: [Haskell-cafe] A practical Haskell puzzle

2011-03-03 Thread Yitzchak Gale
Brandon Moore wrote: > This code produces and uses a table of all > allowed combinations. I think this makes it easier > to understand why the code works (and is H98). > It's just as easy to make a direct version that > produces one requested composition in linear time, > so I haven't worried wheth

Re: [Haskell-cafe] A practical Haskell puzzle

2011-03-03 Thread Yitzchak Gale
Eric Mertens wrote: > (but I've had my head in Agda lately) Indeed, coming across this problem tempted me to abandon the real world and take refuge in Agda. > http://hpaste.org/44469/software_stack_puzzle Wow, so simple, and no higher-rank types! This is the best solution yet. I am now truly in

Re: [Haskell-cafe] A practical Haskell puzzle

2011-03-03 Thread Yitzchak Gale
Brandon Moore wrote: > My solution does not serialize and deserialize between every > pair of layers. Ahhh, I see! Sorry I didn't look closely enough the first time. Yes, this is a very nice Haskell 98 solution! >>> This code produces and uses a table of all >>> allowed combinations. I think thi

Re: [Haskell-cafe] can't download haskell-mode for emacs: directory is empty

2011-03-06 Thread Yitzchak Gale
Richard Cobbe wrote: > I'm trying to see if I'm running the latest version of haskell-mode.el. > Unfortunately, the download link at the top of > points to a > directory with nothing in it. > Is there somewhere else I should be looking? I

Re: [Haskell-cafe] IPv6 issues for (code|community).haskell.org?

2011-03-10 Thread Yitzchak Gale
Erlend Hamberg wrote: > When I wanted to get the newest xmonad code from darcs today¹ it was > really, really slow... > Being on an IPv6 network, and having been burnt by > similar problems before, I tried adding IPv4 address for > code.haskell.org in /etc/hosts... > This fixed the issue > ...Conne

[Haskell-cafe] Saving changes to cabal config in cabal-dev

2011-03-26 Thread Yitzchak Gale
Thanks for the fantastic cabal-dev tool! Is there any convenient way to save changes to the package-specific cabal config file in cabal-dev? When I make changes to cabal-dev/cabal.config, cabal-dev seems to scribble over them next time I run it. The only solution I have found so far is to run ca

Re: [Haskell-cafe] timezone-series and timezone-olson

2011-03-27 Thread Yitzchak Gale
Hi Manfred, I am copying this response to the Haskell Cafe mailing list. Manfred Lotz wrote: > ...I'm trying to figure out how to use your > packages to get the time in a different timezone. > Do you have an example how to do that? What I want for example is to > provide the timezone preferably l

[Haskell-cafe] Please allow variation in the Yackage page title

2011-03-29 Thread Yitzchak Gale
Could you please add a way of varying the title of the Yackage web page? That would make it much easier to work with multiple Yackages at once. For my particular setup, including its port number in the web page title would do the trick. But perhaps the easiest and most general thing would be to add

[Haskell-cafe] Can't connect to local yackage server

2011-04-03 Thread Yitzchak Gale
On Mac OS X 10.6.7, after upgrading to yackage 0.1.0.1: After running yackage -l, I cannot connect to it even directly from localhost. I get the message: This Yackage server only talks to local clients On a Linux server it seems to work fine though. On the Mac, when I do "telnet localhost" I

Re: [Haskell-cafe] Can't connect to local yackage server

2011-04-03 Thread Yitzchak Gale
I wrote: >> After running yackage -l, I cannot connect to it even directly >> from localhost. I get the message: >>  This Yackage server only talks to local clients Michael Snoyman wrote: > ...it doesn't sound like your problem is caused by the mis-behaving > Yackage code: it *should* give you a "

Re: [Haskell-cafe] Encoding of Haskell source files

2011-04-04 Thread Yitzchak Gale
+1 for UTF-8 only. Brandon Moore wrote: > ...I don't see much to be gained by prohibiting other encodings. Universal portability of Haskell source code with respect to its encoding is to be gained. We can achieve that simplicity now with almost no cost. Why miss the opportunity? > In particular,

Re: [Haskell-cafe] Encoding of Haskell source files

2011-04-04 Thread Yitzchak Gale
malcolm.wallace wrote: >> BOM is not part of UTF8, because UTF8 is byte-oriented.  But applications >> should be prepared to read and discard it, because some applications >> erroneously generate it. For maximum portability, the standard should be require compilers to accept and discard an optiona

Re: [Haskell-cafe] Local copy of hackageDB

2011-04-07 Thread Yitzchak Gale
José Pedro Magalhães wrote: > I want to use cabal-install on a machine without internet access. Work is ongoing for a version of hackage that you can just install on your own server. Perhaps the people working on that can comment about the status. If all you want is a barebones server that you ca

Re: [Haskell-cafe] Local copy of hackageDB

2011-04-07 Thread Yitzchak Gale
José Pedro Magalhães wrote: > Thanks, but I don't really need a functional server or anything; I just want > to have a local copy of Hackage on disk (latest versions only will do) and > tell cabal-install to use that instead of the web. If you have the package tarball, you can unpack it manually a

[Haskell-cafe] Please add a method for optimized concat to the Semigroup class

2011-05-03 Thread Yitzchak Gale
Hi Edward, Thanks much for the very useful semigroups package. When using it in practice, it would be very useful to have an analogue to the mconcat method of Monoid. It has the obvious default implementation, but allows for an optimized implementation for specific instances. That turns out to be

Re: [Haskell-cafe] Please add a method for optimized concat to the Semigroup class

2011-05-03 Thread Yitzchak Gale
Stephen Tetley wrote: >> Does it have an obvious default implementation, bearing in mind it we >> might really want a total function? >> >> sconcat []     = error "Yikes - I wish this was total!" >> sconcat [a]    = a >> sconcat (a:as) = a <> sconcat as Holger Siegel wrote: > You have to provide t

Re: [Haskell-cafe] Please add a method for optimized concat to the Semigroup class

2011-05-03 Thread Yitzchak Gale
Stephen Tetley wrote: > There is that formulation, though usually I find I need to do it with > an alternative instead: > altconcat alt []     = alt > altconcat _   (a:as) = go a as >  where >    go acc [] = acc >    go acc (b:bs) = go (acc <> b) bs But the whole reason we need this as a method is

[Haskell-cafe] Please add instance Semigroup Text

2011-05-03 Thread Yitzchak Gale
Hi Edward, Could you please add a Semigroup instance for Text? Once you're doing that, I suppose you'd also want to add it for lazy Text and both kinds of ByteStrings. But what I currently need is strict Text. The reason, of course, is that in complex calculations <> is *so* much more readable t

Re: [Haskell-cafe] Please add a method for optimized concat to the Semigroup class

2011-05-03 Thread Yitzchak Gale
Edward Kmett wrote: > sconcat :: [a] -> a -> a > with either the semantics you supplied or something like > sconcat = appEndo . mconcat . map diff The sconcat we have been discussing is sconcat = flip $ appEndo . getDual . mconcat . map (Dual . Endo . flip (<>)) (avoiding the use of Dual.diff.Du

Re: [Haskell-cafe] Please add instance Semigroup Text

2011-05-03 Thread Yitzchak Gale
I wrote: >>> Could you please add a Semigroup instance for Text? Edward Kmett wrote: > Unfortunately, I don't think I can really bring myself to do either. > I was deliberately trying to keep the number of dependencies for the > semigroups as low as possible... You are quite right. These should r

Re: [Haskell-cafe] Those damned parentheses

2011-05-10 Thread Yitzchak Gale
Eitan Goldshtrom wrote: >> f p = putStrLn $ (show (Main.id p)) ++ " - message received" Brandon S Allbery KF8NH wrote: > f p = putStrLn $ (show $ Main.id p) ++ " = message received" wren ng thornton wrote: >    f p = putStrLn $ show (Main.id p) ++ " - message received" >    f p = putStrLn $ (sho

Re: [Haskell-cafe] Those damned parentheses

2011-05-10 Thread Yitzchak Gale
Andrew Butterfield wrote: >> Why not indeed ? Roel van Dijk wrote: > import Control.Category ( (>>>) ) > f = Main.id >>> show >>> (++ " - message received") >>> putStrLn Indeed, I agree. I sometimes do that, too, when I want to emphasize the idea of "applying tools one after the other". But most

Re: [Haskell-cafe] Those damned parentheses

2011-05-10 Thread Yitzchak Gale
Andrew Butterfield wrote: >> Why not indeed ? Roel van Dijk wrote: > import Control.Category ( (>>>) ) > f = Main.id >>> show >>> (++ " - message received") >>> putStrLn Indeed, I agree. I sometimes do that, too, when I want to emphasize the idea of "applying tools one after the other". But most

Re: [Haskell-cafe] Proposal to incorporate Haskell.org

2011-05-11 Thread Yitzchak Gale
Don Stewart wrote: > The haskell.org committee... has decided to > incorporate haskell.org as a legal entity. This email outlines our > recommendation, and seeks input from the community on this decision. Thanks, good news! And thanks for posting to multiple lists for maximum public notification t

Re: [Haskell-cafe] [Haskell] ANNOUNCE: time-recurrence-0.1

2011-05-22 Thread Yitzchak Gale
Moving the discussion from haskell to haskell-cafe. Chris Heller wrote: >> http://github.com/hellertime/time-recurrence >> A library for generating and inspecting recurring times. Very nice. Please put it up on hackage so we can see the haddocks, try it out easily, etc. >> hoping to solicit some

Re: [Haskell-cafe] [Haskell] ANNOUNCE: time-recurrence-0.1

2011-05-25 Thread Yitzchak Gale
I wrote: >> It's not a good idea for a basic time >> library to introduce possible crashes. At least you should >> provide an alternative safe interface. Similarly for toEnum. Chris Heller wrote: > are you suggesting something like doing modulo arithmetic rather > than calling error on undefined v

Re: [Haskell-cafe] Escaping of string literals

2011-05-28 Thread Yitzchak Gale
Michael Snoyman wrote: >    main = do >        fromAddr <- unsafePackAddressLen 7 $(return $ LitE $ > StringPrimL "123\0\&456") >        print fromAddr >        let fromStr = S.pack $ map (toEnum . fromEnum) $(return $ LitE > $ StringL "123\0\&456") >        print fromStr > > I get the result: > >

[Haskell-cafe] ANN: dtd-types 0.0.0.1

2011-05-30 Thread Yitzchak Gale
The dtd-types package provides types for processing XML DTDs in Haskell. These types are intended to be compatible with and extend the set of types provided by John Millikin's xml-types package. This is a very preliminary first version, pending discussion by the community on the web-devel list abo

Re: [Haskell-cafe] Please add a method for optimized concat to the Semigroup class

2011-05-31 Thread Yitzchak Gale
Edward Kmett wrote: > I felt I should probably mention that ultimately what was done is I moved > NonEmpty all the way down into semigroups and chose >> sconcat :: NonEmpty a -> a > at it was the closest analogue to the current mconcat behavior. > So, request accomodated. ;) Indeed, this is an exc

[Haskell-cafe] ANN: dtd-types 0.2.0.0

2011-06-01 Thread Yitzchak Gale
The dtd-types package provides types for processing XML DTDs in Haskell. These types are intended to be compatible with and extend the set of types provided by John Millikin's xml-types package. The consensus seems to be to leave this as a separate package and not to merge it with xml-types. This

[Haskell-cafe] Attoparsec concatenating combinator

2011-06-02 Thread Yitzchak Gale
I often find while using attoparsec and attoparsec-text that I need to match a number of text parsers consecutively and concatenate the result. By "text parser" I mean "Parser ByteString" for attoparsec and "Parser Text" for attoparsec-text. It seems the best I can do is to collect them all in a l

Re: [Haskell-cafe] Attoparsec concatenating combinator

2011-06-03 Thread Yitzchak Gale
Bryan O'Sullivan wrote: > I'd like a no-copy combinator for the same reasons, but I think it's > impossible to do without some low-level support. I wrote: >> ...does the internal representation easily admit such a combinator? > Not very easily. Internally, attoparsec maintains just three pieces o

Re: [Haskell-cafe] Attoparsec concatenating combinator

2011-06-03 Thread Yitzchak Gale
Mario Blažević wrote: > I don't know if this helps, but the incremental-parser library has > exactly the combinator you're looking for. Wow, that is a beautiful implementation of a general parser library. So much simpler than Parsec. Thanks for pointing it out. Why are you hiding those nice Mono

Re: [Haskell-cafe] License of hslogger, HDBC, etc.

2011-06-03 Thread Yitzchak Gale
John Goerzen wrote: > I've decided that I'm OK with re-licensing hslogger, HDBC, and well all of > my Haskell libraries (not end programs) under 3-clause BSD. Thanks John! -Yitz ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.

[Haskell-cafe] ANN: dtd-text DTD parser, V0.1.0.0

2011-06-05 Thread Yitzchak Gale
The dtd-text package[1] provides a parser for XML DTDs. It implements most of the parts of the W3C XML specification relating to DTDs, and is compatible with versions 1.0 and 1.1 of the specification.[2] The result of the parse is a Haskell DTD object from the dtd-types[3] package. This first prel

Re: [Haskell-cafe] ANN: dtd-types 0.3.0.1

2011-06-05 Thread Yitzchak Gale
The dtd-types[1] package provides types for processing XML DTDs in Haskell. These types are intended to be compatible with and extend the set of types provided by John Millikin's xml-types package[2]. This version, 0.3.0.1, was released in support of the dtd-text package[3]. It includes some major

Re: [Haskell-cafe] Attoparsec concatenating combinator

2011-06-05 Thread Yitzchak Gale
I wrote: >> I was thinking of even lower level: allocating a moderate chunk of >> memory and writing the results directly into it consecutively as a >> special case. Bryan O'Sullivan wrote: > Surely that would save only one copy compared to creating a list of results > and then concatenating them,

Re: [Haskell-cafe] Cons of -XUndecidableInstances

2011-06-05 Thread Yitzchak Gale
Scott Lawrence wrote: > More specifically, I have > >  class Model m a | m -> a where ... >  class Entropy d where ... >  instance (Model m a) => Entropy m where ... > > The first line requires MultiParamTypeClasses and > FunctionalDependencies... the third > requires UndecidableInstances... > Is t

Re: [Haskell-cafe] Cons of -XUndecidableInstances

2011-06-05 Thread Yitzchak Gale
Scott Lawrence wrote: > I'm modelling text in a markov-model-like way. I have an actual markov > model (albeit one in which X_n depends on a fixed range X_n-1 .. > X-n-k). I'm vaguely anticipating the presence of other models: > >  class Model m a | m -> a where >    lexemes :: m -> Set a >    genF

Re: [Haskell-cafe] Cons of -XUndecidableInstances

2011-06-06 Thread Yitzchak Gale
I wrote: >> You almost never want to use UndecidableInstances >> when writing practical programs in Haskell. >> When GHC tells you that you need them, it almost >> always means that your types are poorly designed, >> usually due to influence from previous experience >> with OOP. Gábor Lehel wrote:

Re: [Haskell-cafe] Cons of -XUndecidableInstances

2011-06-06 Thread Yitzchak Gale
Scott Lawrence wrote: > But... this prevents me from storing more information in a Model in the > future. While I don't really anticipate needing too (I can see this > function covering all likely use cases), it does seem sorta restrictive. I tend not to think about "storing information inside of

Re: [Haskell-cafe] Cons of -XUndecidableInstances

2011-06-06 Thread Yitzchak Gale
Scott Lawrence wrote: >  type Model a = (Ord a) => Set a -- the set of lexemes >                         -> [a] -- the original text to model >                         -> [a] -- list of previous lexemes >                         -> ProbDist a -- the next lexeme > > and then > >  entropy :: Model a

Re: [Haskell-cafe] Cons of -XUndecidableInstances

2011-06-06 Thread Yitzchak Gale
Gregory Collins wrote: > Surprisingly enough, mtl uses UndecidableInstances, so almost every > practical Haskell program uses it in one way or another. The library uses it, you don't use it directly in your program. Anyway, transformers does the job when you need to build on the basic monad trans

Re: [Haskell-cafe] How to install GhC on a Mac without registering?

2011-06-06 Thread Yitzchak Gale
Chris Smith wrote: >  I had to abandon a plan > to introduce Haskell in a class I taught this past semester > [12 to 13 years old] because of issues with getting it > installed on the Macintosh laptops that some of > the students had. Truth is, you obviously don't need support for FFI development

[Haskell-cafe] ANN: dtd-text DTD parser and renderer, V0.1.1.0

2011-06-06 Thread Yitzchak Gale
The dtd-text package[1] provides a parser and renderer for XML DTDs. It implements most of the parts of the W3C XML specification relating to DTDs, and is compatible with versions 1.0 and 1.1 of the specification.[2] The parser and renderer operate on Haskell DTD objects from the dtd-types[3] packa

Re: [Haskell-cafe] ANN: dtd-text DTD parser, V0.1.0.0

2011-06-06 Thread Yitzchak Gale
I wrote: >> I really should have edited the Cabal description of this package >> before I uploaded it. Max Rabkin wrote: > Could you upload a bugfix version with an accurate description? This > could be very frustrating to a random hackage-brower who hasn't read > the announcement (or me, in a few

Re: [Haskell-cafe] Attoparsec concatenating combinator

2011-06-07 Thread Yitzchak Gale
Bryan O'Sullivan wrote: >> Now that I think of it: in principle, you could >> write a specialised concat that would check the pointer/offset/length >> combinations of its arguments and, if they all abutted perfectly, would just >> return a new view into that same array, sans copying. Gregory Colli

Re: [Haskell-cafe] Cons of -XUndecidableInstances

2011-06-07 Thread Yitzchak Gale
I wrote: >>> You almost never want to use UndecidableInstances >>> when writing practical programs in Haskell. >>> When GHC tells you that you need them, it almost >>> always means that your types are poorly designed, >>> usually due to influence from previous experience >>> with OOP. wren ng thor

Re: [Haskell-cafe] SIGPLAN Programming Languages Software Award

2011-06-09 Thread Yitzchak Gale
> The SIGPLAN Programming Languages Software Award > For 2011, the winners of the award are > Simon Peyton Jones and Simon Marlow of > Microsoft Research, Cambridge, for GHC Congratulations! Well deserved recognition for visionary ideas backed by so many years of hard work. -Yitz __

Re: [Haskell-cafe] GHC 7.0.3 / Win32: Data.Time library?

2011-06-14 Thread Yitzchak Gale
Dmitri O.Kondratiev wrote: > It would also help to see a simple example of parsing "10/11/2009 7:04:28 > PM" to  time and date objects. Let's assume that 10/11/2009 means October 11, as in the U.S. Then you can use: import System.Locale (defaultTimeLocale) import Data.Time thatMoment :: Maybe UT

Re: [Haskell-cafe] GHC 7.0.3 / Win32: Data.Time library?

2011-06-15 Thread Yitzchak Gale
Dmitri O.Kondratiev wrote: > I have: > ds1 = "10/11/2009 7:04:28 PM" > ds2 = "10/17/2009 8:48:29 AM" > t1 = readTime defaultTimeLocale "%m/%d/%Y %l:%M:%S %p" ds1 :: UTCTime > t2 = readTime defaultTimeLocale "%m/%d/%Y %l:%M:%S %p" ds2 :: UTCTime > dif = diffUTCTime t2 t1 > > I need to: > 1) Find how

Re: [Haskell-cafe] Data.Time

2011-06-27 Thread Yitzchak Gale
Tony Morris wrote: > I recently set out to write a library that required a decent time > library. Having only had a flirt with Data.Time previously, I assumed > it would be robust like many other haskell libraries. I don't know > about consensus, but I have been massively let down. I won't go in to

Re: [Haskell-cafe] Possible bug in GHC 7.0.3

2011-06-29 Thread Yitzchak Gale
Ryan Ingram wrote: > So this is definitely a GHC bug, but I think the problem is probably > triggered by this line: > > instance  Serializable a b => IResource a > > I don't think this is a valid instance declaration without a functional > dependency on Serializable, as it's impossible to know whic

Re: [Haskell-cafe] Possible bug in GHC 7.0.3

2011-06-29 Thread Yitzchak Gale
Daniel Fischer wrote: > No, the instance head is just a type variable, not a type constructor > applied to type variables Oops, you're right. GHC was telling the truth, I should have paid closer attention! Fixing my minimal example, I get: {-# LANGUAGE MultiParamTypeClasses, UndecidableInstances

Re: [Haskell-cafe] Fwd: Data.Time

2011-07-02 Thread Yitzchak Gale
Ashley, heads up! I am CCing you on this message because I think a problem has been found with Data.Time.Format. Please see below. Daniel Patterson wrote: > I've found most of the time library to be quite useful, but > the parsing to be worthless The API for parsing and rendering time in Data.Tim

Re: [Haskell-cafe] Data.Time

2011-07-02 Thread Yitzchak Gale
Joe Healy wrote: >> One of the points I found "non obvious" were the fact that local time is >> just that. There is no knowledge of the actual timezone in the data >> type. If you wish to store that, it needs to be stored alongside. Erik Hesselink wrote: > Isn't that what ZonedTime [1] is for? No

Re: [Haskell-cafe] Data.Time

2011-07-02 Thread Yitzchak Gale
Oops, forgot the references: > ZoneSeriesTime in the timezone-series package[1]... > To get a TimeZoneSeries, representing a time zone with > all of its known clock changes throughout history and some > years into the future, use the timezone-olson package[2] [1]http://hackage.haskell.org/packag

Re: [Haskell-cafe] Fwd: Data.Time

2011-07-02 Thread Yitzchak Gale
Ashley Yakeley wrote: > This was fixed in time-1.2.0.5. From the haddock for parseTime: > > "Supports the same %-codes as formatTime, including %-, %_ and %0 > modifiers." Great, glad to hear this was recently fixed. I installed the latest version of the time package, and it works. It is importan

Re: [Haskell-cafe] Data.Time

2011-07-04 Thread Yitzchak Gale
I wrote: >> Not exactly. A "TimeZone" in Data.Time doesn't really >> represent a time zone - it represents a specific clock setting >> in a time zone. Ashley Yakeley wrote: > I still regret this! I should have called it TimeOffset or somesuch. Oh, it's not your fault. Every other time library in

[Haskell-cafe] The Typeable class is changing

2011-07-11 Thread Yitzchak Gale
Simon Marlow has announced[1] on the Haskell Libraries list that the Typeable class is changing. The standard way to create a Typeable instance is just to derive it. If you do that, you will not be affected by this change. But it seems that many packages create Typeable instances by explicitly us

Re: [Haskell-cafe] The Typeable class is changing

2011-07-12 Thread Yitzchak Gale
I wrote: > Please respond to this thread if you own a package > that will be affected by this change. Responding to my own request, here are some more packages that use mkTyCon explicitly: Ashley Yakeley's time package, which is part of the Haskell Platform. My timezone-series package, because i

Re: [Haskell-cafe] The Typeable class is changing

2011-07-12 Thread Yitzchak Gale
Jon Fairbairn wrote: > There’ll be a replacement for mkTycon (mkTycon3), so you can > still do manual instances… Right, it should be easy to fix manual Typeable instances. It's just that if no action is taken, they will eventually break. So it's good to make sure that there is public awareness, an

Re: [Haskell-cafe] Contacting Planet Haskell admins

2011-07-17 Thread Yitzchak Gale
Hi Michael, Don is no longer involved in planet AFAIK. The administrator of planet-haskell is Antti-Juhani Kaijanaho. I'll send you his email address off list. Regards, Yitz ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org

Re: [Haskell-cafe] New releases and BSD3 license

2011-08-11 Thread Yitzchak Gale
Thanks for the more permissive licenses. And most of all, thanks for all your great work on HDBC as maintainer. Thanks and good luck to Nicolas. Regards, Yitz ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listin

Re: [Haskell-cafe] Proposal #3339: Add (+>) as a synonym for mappend

2011-08-14 Thread Yitzchak Gale
Brandon Allbery wrote: > Anything useful has to be modified to depend on SemiGroup as well to get > mconcat or its replacement; that's why you jumped the proposal to begin > with Not at all. Types with Monoid instances need an additional instance, a Semgroup instance, in order to be able to us

Re: [Haskell-cafe] Solving the configuration problem with parametrized modules

2011-09-06 Thread Yitzchak Gale
Joachim Breitner wrote: > ...Usually in Haskell, you’d determine them in the main function and then > pass them in an argument to all functions needing them, or you wrap that > in a monad... > The big downside is the verbosity of the approach: A lot of parameters > need to be passed, and if one suc

Re: [Haskell-cafe] instance Enum Double considered not entirely great?

2011-09-26 Thread Yitzchak Gale
Chris Smith wrote: > class Ord a => Range a where... Before adding a completely new Range class, I would suggest considering Paul Johnson's Ranged-sets package: http://hackage.haskell.org/package/Ranged-sets Ranges have many more natural operations, and interactions with other classes, than you

Re: [Haskell-cafe] Attoparsec: Limiting Parsers to N Bytes, or Combing Parsers?

2011-09-26 Thread Yitzchak Gale
Evan Laforge wrote: >> hex2 = (+)<$>  ((*16)<$>  higit)<*>  higit >> higit = subtract (fromEnum '0')<$>  satisfy isHexDigit >> color = Color<$>  hex2<*>  hex2<*>  hex2 Twan van Laarhoven wrote: > How is "subtract (fromEnum '0')" supposed to convert a hex digit to an Int > or Word8? I think you nee

Re: [Haskell-cafe] haskell i18n best practices

2011-10-03 Thread Yitzchak Gale
Thanks for all the great information provided in this thread. The wiki page that Paulo originally linked had Vasyl's fantastic documentation for using his hgettext package, but it did not mention any of the other methods we discussed. I moved the gettext documentation to its own linked page and t

Re: [Haskell-cafe] The best way to call Java from Haskell?

2011-10-11 Thread Yitzchak Gale
Dmitri wrote: > I need to call Stanford NLP Parser from Haskell > (unfortunately Haskell does not have a similar one)... Just out of curiosity, why do you not consider GF at all similar? To an outsider like me, there does appear to be quite a bit of similarity. http://www.grammaticalframework.org

Re: [Haskell-cafe] hello Haskell

2011-10-24 Thread Yitzchak Gale
Daniel Fischer wrote: >> Just for the record, not a newcomer, and has non-spam >> messages Conrad Parker wrote: > There was a recent hotmail exploit, with people reporting their > account sent spam... No exploit is needed. It is trivial for an impostor to seem as if he is sending email from someo

Re: [Haskell-cafe] blanket license for Haskell Platform?

2011-10-25 Thread Yitzchak Gale
Eric Y. Kow wrote: > So I'm combining Haskell software with some non-free/closed source work. > I was wondering what sort of effort it would take to organise a blanket > license for everything in the Haskell Platform, and whether it would be > worthwhile to anybody... > - My user is concerned that

Re: [Haskell-cafe] Hackage feature request: E-mail author when a package breaks

2011-10-31 Thread Yitzchak Gale
Gregory Crosswhite wrote: > could [Hackage] have a feature where when a > working package breaks with a new version of > GHC the author is automatically e-mailed? This would be nice. However, there would have to be a way for it to be turned on and off by the author. (Spam is not nice.) Thanks, Yi

Re: [Haskell-cafe] Hackage feature request: E-mail author when a package breaks

2011-11-01 Thread Yitzchak Gale
I wrote: >> This would be nice. However, there would have to be >> a way for it to be turned on and off by the author. >> (Spam is not nice.) Ketil Malde wrote: > This is where it stranded the last time, IIRC.  That sentiment makes me > a bit uneasy; so you are the official maintainer of a package

Re: [Haskell-cafe] Time zones and IO

2011-11-06 Thread Yitzchak Gale
Ben Gamari wrote: > Recently I've been working on an iCalendar parser implementation with > support for recurrence rules. > For the recurrence logic, I've been > relying on Chris Heller's excellent time-recurrence > package. > Unfortunately, it seems we have both encountered great > difficulty in c

Re: [Haskell-cafe] timezone-series, timezone-olson dependencies

2011-11-10 Thread Yitzchak Gale
Ben Gamari wrote: > Is there a reason why the current version of the timezone-series and > timezone-olson packages depend on time<1.3? With time 1.4 being widely > used at this point this will cause conflicts with many packages yet my > tests show that both packages work fine with time 1.4. Could w

[Haskell-cafe] 1p function for NonEmpty

2011-11-15 Thread Yitzchak Gale
Hi Edward, I started @telling you on #haskell, but it has become too long for that. :) The following functions would be nice additions to Data.List.NonEmpty in the semigroups package: replicate1p :: Whole n => n -> a -> NonEmpty a take1p :: Whole n => n -> NonEmpty a -> NonEmpty a splitAt1p :: W

Re: [Haskell-cafe] 1p function for NonEmpty

2011-11-15 Thread Yitzchak Gale
I wrote: > The following functions would be nice additions > to Data.List.NonEmpty in the semigroups package... Here are two more requests: maximum, minimum :: Ord a => NonEmpty a -> a Two more unsafe Prelude functions become safe! Thanks, Yitz ___ H

Re: [Haskell-cafe] No instance for (Read POSIXTime)

2011-12-11 Thread Yitzchak Gale
dokondr wrote: > When I try to read POSIXTime... > No instance for (Read POSIXTime)... > What should I do to provide Read instance for POSIXTime? Short answer: if you are thinking about this as a moment in time that could be parsed from the usual kind of string representation for that, you probabl

<    1   2   3   4   5   6   >