[Haskell-cafe] ANN: lambdabot-4.3

2013-05-19 Thread James Cook
As discussed a couple months ago, I have assumed maintainership of Lambdabot and a a new release has been brewing for a while. It has now been Hackaged as lambdabot-4.3. There are quite a few changes in this release, mainly internal. Plugins written for older versions will require some

Re: [Haskell-cafe] package show needs QuickCheck2.6?

2013-03-20 Thread James Cook
The mueval build issue should be taken care of in a patch I just sent the maintainer which removes 'show' as a dependency. I believe the 'show' package itself is currently in a maintainer-less state, but I don't mind taking it over. It makes sense to do so since I am also taking over

Re: [Haskell-cafe] Maintaining lambdabot

2013-03-20 Thread James Cook
On Mar 15, 2013, at 5:33 PM, Jason Dagit dag...@gmail.com wrote: I was going to start making these changes and I noticed that it doesn't currently build with ghc 7.4.1 w/Haskell Platform: https://travis-ci.org/dagit/lambdabot/builds/5541375 Do you know if the constraints on:

Re: [Haskell-cafe] Maintaining lambdabot

2013-03-16 Thread James Cook
On Mar 15, 2013, at 5:33 PM, Jason Dagit dag...@gmail.com wrote: Do you know if the constraints on: regex-posix-0.95.1 regex-compat-0.95.1 Need to be what they are? Could we relax them without breaking anything? The constraints were added recently, and I believe they were a very

Re: [Haskell-cafe] Maintaining lambdabot

2013-03-15 Thread James Cook
On Mar 14, 2013, at 11:08 PM, Jason Dagit dag...@gmail.com wrote: My real reason for reviving this thread: Can I get a status update, please? Sure. I don't have as much time as I'd like these days for open-source projects, but with Jan's help the code has been cleaned up quite a bit in

Re: [Haskell-cafe] Maintaining lambdabot

2013-03-15 Thread James Cook
On Mar 15, 2013, at 2:45 PM, Jason Dagit dag...@gmail.com wrote: I haven't been following the thread closely. Is there also a github? If so, where? Some of us figured out a bug fix for the quotes plugin and I'll send a pull request if I get a chance. Yep, there is[1]. I'm not sure what the

Re: [Haskell-cafe] Maintaining lambdabot

2013-02-20 Thread James Cook
On Feb 19, 2013, at 9:54 PM, Jason Dagit dag...@gmail.com wrote: Random thought, feel free to ignore it: Would it make sense to split lambdabot up into core and contrib like is done with xmonad? Contrib could contain the sillier things like bf, unlambda, show, etc and would have a lower

Re: [Haskell-cafe] Maintaining lambdabot

2013-02-19 Thread James Cook
For what it's worth, I also have a fork of lambdabot[1] I've been using for quite a while now, which may provide a cleaner starting point. In particular, it updates the plugin and command API to be (IMO) quite a bit cleaner and easier to use and understand. It could probably use some

Re: [Haskell-cafe] Maintaining lambdabot

2013-02-19 Thread James Cook
Sorry, I uploaded it this morning since I knew it wasn't there (it's the dice repo from my github account, mokus0). Have you run cabal update in the last 4 or 5 hours? On Feb 19, 2013, at 2:36 PM, Jan Stolarek jan.stola...@p.lodz.pl wrote: Wow, this indeed looks like a nice starting point,

Re: [Haskell-cafe] Maintaining lambdabot

2013-02-19 Thread James Cook
On Feb 19, 2013, at 2:36 PM, Jan Stolarek jan.stola...@p.lodz.pl wrote: Anyway, how would you feel about changes that I would like to make: - move all modules into Lambdabot. namespace - remove unlambda, brainfuck and show from the repo. They are on hackage, no need to keep them here -

Re: [Haskell-cafe] Key-Parametrized Lookup Table

2012-07-31 Thread James Cook
Another option which allows you to define your own key type is the dependent-map[1] package. It requires implementing some classes for your key type that encode a proof that key equality entails equality of the type indices. If the documentation is insufficient feel free to ask me for more

Re: [Haskell-cafe] lambdabot-4.2.3.3

2012-07-18 Thread James Cook
For what it's worth, I've been maintaining a fork for personal use for quite a while[1]. It diverged from the official version quite a while ago, but it builds on the latest GHC and uses Safe Haskell for the @eval module. If someone happens to want to use it they are free to do so, and I'll

Re: [Haskell-cafe] lambdabot-4.2.3.3

2012-07-18 Thread James Cook
you shouldn't, it should be fine. This sort of thing is why safe Haskell exists. On Jul 18, 2012, at 11:17 AM, Gwern Branwen gwe...@gmail.com wrote: On Wed, Jul 18, 2012 at 11:12 AM, James Cook mo...@deepbondi.net wrote: It diverged from the official version quite a while ago, but it builds

Re: [Haskell-cafe] lambdabot-4.2.3.3

2012-07-18 Thread James Cook
I should probably be more clear - it supports all the same resource limiting mechanisms as Mueval because it uses Mueval (modified to support Safe Haskell). On Jul 18, 2012, at 11:37 AM, James Cook mo...@deepbondi.net wrote: The irc server it runs on has about 10 users, all of whom I know

Re: [Haskell-cafe] XDR library ?

2012-06-08 Thread James Cook
It's not on hackage because it's not really documented or maintained, but I have one on github: https://github.com/mokus0/xdr If it's too badly bit-rotted or if there are any other problems feel free to let me know or send pull requests. If it's something you'd like to see on hackage I can

Re: [Haskell-cafe] Most Important GHC extensions to learn/use?

2012-06-01 Thread James Cook
On Jun 1, 2012, at 6:11 AM, Gábor Lehel wrote: On Fri, Jun 1, 2012 at 6:29 AM, wren ng thornton w...@freegeek.org wrote: TypeFamilies (aka TFs) These are really nifty and they're all the rage these days. In a formal sense they're equivalent to fundeps, but in practice

Re: [Haskell-cafe] Quickest way to pass Text to C code

2012-03-21 Thread James Cook
On Mar 21, 2012, at 4:35 AM, Yves Parès wrote: Hello, I have to interact with a C++ library that accepts as string types (putting c++ strings aside) pointers of wchar_t (CWString in Haskell) or unsigned 32-bit int (Ptr Word32 for UTF-32 codepoints). The vector package has storable

Re: [Haskell-cafe] Why were unfailable patterns removed and fail added to Monad?

2012-01-20 Thread James Cook
On Jan 20, 2012, at 1:40 AM, Michael Snoyman wrote: On Jan 20, 2012 8:31 AM, John Meacham j...@repetae.net wrote: As expected, no warnings. But if I change this unfailable code above to the following failable version: data MyType = Foo | Bar test myType = do

Re: [Haskell-cafe] Why were unfailable patterns removed and fail added to Monad?

2012-01-20 Thread James Cook
Actually, that's not what this conversation is about - it's about what to with those types of bindings instead of the way 1.4 had been doing it. On Jan 19, 2012, at 10:19 PM, Edward Z. Yang wrote: Hello Gregory, The original (1998!) conversation can be found here:

Re: [Haskell-cafe] On the purity of Haskell

2012-01-02 Thread James Cook
On Jan 2, 2012, at 1:30 PM, Conal Elliott wrote: On 2012/1/1 Ertugrul Söylemez e...@ertes.de wrote: And that's fine, because IO is an embedded DSL. A better view of IO is a GADT like: data IO :: * - * where GetLine :: IO String PutStrLn :: String - IO () ...

Re: [Haskell-cafe] Overloaded Quotes for Template Haskell

2011-12-30 Thread James Cook
One possible option would be to make a library that has all the combinators lifted to your more general type and use lift or runQ or something similar for any quotes that need lifting, along with operations from monad-control or monad-peel to lift quotes that also need access to the StateT

Re: [Haskell-cafe] Splitting off many/some from Alternative

2011-12-14 Thread James Cook
On Dec 14, 2011, at 1:23 AM, Gregory Crosswhite wrote: On Dec 13, 2011, at 3:32 AM, Bryan O'Sullivan wrote: Don't be silly. The purpose of some and many is to be used with combinators that are expected to fail sometimes. If you use them with combinators that always succeed, of course

Re: [Haskell-cafe] Splitting off many/some from Alternative

2011-12-14 Thread James Cook
On Dec 14, 2011, at 12:37 PM, Bryan O'Sullivan wrote: On Tue, Dec 13, 2011 at 10:23 PM, Gregory Crosswhite gcrosswh...@gmail.com wrote: This way users of the classes will know whether their type has well-defined instance for some and many or not. But that's precisely what the

Re: [Haskell-cafe] Where is SNMap for stable names?

2011-09-22 Thread James Cook
I may be wrong, but I think the original SNMap was a map from 'StableName's to the specific values they were derived from, which also (IIRC) had some weak referencing aspect as well. Using them as keys for arbitrary elements of the phantom type is actually not type-safe, because equality of

Re: [Haskell-cafe] Why no Monoid, Num, Integral, or Floating RVarT instances?

2011-08-23 Thread James Cook
On Aug 22, 2011, at 10:17 PM, Barend Venter wrote: It seems like you should be able to get instances for: (Monoid m) = Monoid (RVarT n m) (Num m) = Num (RVarT n m) and so forth for integral and floating Just wondering if I am missing something here or if there is any particular thing

Re: [Haskell-cafe] why is Random in System?

2011-08-16 Thread James Cook
On Aug 16, 2011, at 4:04 PM, Evan Laforge wrote: I've noticed there's a convention to put modules having to deal with randomness into System.Random. I thought System was for OS interaction? Granted getting a random seed usually means going to the OS, but isn't the rest of it, like

Re: [Haskell-cafe] Fwd: C9 video in the Monadic Design Patterns for the Web series

2011-07-27 Thread James Cook
I'm always glad to see videos like this. I wish more people could have that much fun playing with math ;). It wouldn't really be suitable for your application but another interesting generalization is to insert the 'Either' at the top level: data ConwayT m a = Pure a | ConwayT

Re: [Haskell-cafe] Fwd: C9 video in the Monadic Design Patterns for the Web series

2011-07-27 Thread James Cook
For any who are interested, here's a quick and dirty Haskell version of the generalized Conway game monad transformer described in the video. It uses two newtypes, L and R, to select from two possible implementations of the Monad class. (all the LANGUAGE pragmas are just to support a derived

Re: [Haskell-cafe] Fwd: C9 video in the Monadic Design Patterns for the Web series

2011-07-27 Thread James Cook
Dang, I should have played with both versions before sending this. The 'R' instance has a very obvious error: return x = R (ConwayT (return (Left x)) mzero) should be changed to return x = R (ConwayT mzero (return (Left x))) Sorry! -- James On Jul 27, 2011, at 9:28 AM, James Cook

Re: [Haskell-cafe] Why the reluctance to introduce the Functor requirement on Monad?

2011-07-26 Thread James Cook
On Jul 25, 2011, at 4:55 PM, Ryan Ingram wrote: My guess is that nobody has put forward a clear enough design that solves all the problems. In particular, orphan instances are tricky. Here's an example: module Prelude where class (Functor m, Applicative m) = Monad m where return

[Haskell-cafe] ANN: Two new random-fu releases

2011-06-24 Thread James Cook
Announcing the Hackage release of two new versions[1,2] of the random- fu package: Version 0.1.4 is a build-fix release that extends support of the 0.1 API to GHC 7. Version 0.2 is a significantly restructured version of the package. Its API is mostly the same as the old for end users,

Re: [Haskell-cafe] Haskell-Cafe Digest, Vol 93, Issue 58

2011-06-09 Thread James Cook
On Jun 8, 2011, at 11:17 PM, Gregory Guthrie wrote: I rather had the feeling expressed by Robert Harper: Once you're in the IO monad, you're stuck there forever, and are reduced to Algol-style imperative programming. (http://existentialtype.wordpress.com/2011/05/01/of-course-ml-has-monads/

Re: [Haskell-cafe] Proposal: remove Stability from haddock documentation on hackage

2011-06-08 Thread James Cook
On Jun 8, 2011, at 11:08 AM, Tom Murphy wrote: On 6/7/11, James Cook mo...@deepbondi.net wrote: [...] The name of the field could be better, though. On first exposure, people tend to think stability: experimental or stability: unstable means the package is likely to crash (For those who

Re: [Haskell-cafe] Proposal: remove Stability from haddock documentation on hackage

2011-06-07 Thread James Cook
On Jun 6, 2011, at 10:57 PM, Chris Smith wrote: I got asked a question today about why Control.Applicative is labeled as experimental on Hackage. Perhaps that field is something of a failed experiment, and it remaining there is likely to confuse people. Just a thought... not sure of the

Re: [Haskell-cafe] Proposal: remove Stability from haddock documentation on hackage

2011-06-07 Thread James Cook
On Jun 7, 2011, at 9:22 AM, Tillmann Rendel wrote: Hi, James Cook wrote: As far as Control.Applicative, I'm not sure to what package you're referring. That label doesn't apply to modules, it applies to packages, and Control.Applicative is a part of the base package (which is not labeled

Re: [Haskell-cafe] Proposal: remove Stability from haddock documentation on hackage

2011-06-07 Thread James Cook
On Jun 7, 2011, at 10:17 AM, Christopher Done wrote: On 7 June 2011 15:05, James Cook mo...@deepbondi.net wrote: It's good, in my opinion, to be able to state succinctly in a standardized way that, although it does something now, what the code does and how it does it are probably going

Re: [Haskell-cafe] Library Versioning

2011-06-07 Thread James Cook
On Jun 7, 2011, at 11:10 AM, Luis Cabellos wrote: Hello, I have a question about cabal versioning. It's possible to export in a cabal library a version, so instead of getting version from: import Paths_my_package( version ) I want to get version from my library using: import

Re: [Haskell-cafe] Library Versioning

2011-06-07 Thread James Cook
On Jun 7, 2011, at 12:28 PM, Luis Cabellos wrote: You can export things from one module that are defined in other modules. For example: module MyPackage ( version, ... ) import Paths_my_package( version ) ... Yes indeed, but I getting ugly errors (undefined references to version I

Re: [Haskell-cafe] Cons of -XUndecidableInstances

2011-06-07 Thread James Cook
On Jun 7, 2011, at 12:43 PM, MigMit wrote: One particularly trivial example that comes to mind is: newtype Mu f = Mu (f (Mu f)) instance Show (f (Mu f)) = Show (Mu f) where show (Mu x) = Mu ( ++ show x ++ ) -- Or however you'd like to show it Ehm, that does look like poor

Re: [Haskell-cafe] ScopedTypeVariables in let-bindings (not where-bindings!) and bug 4347

2011-05-21 Thread James Cook
On May 21, 2011, at 8:55 AM, Paolo G. Giarrusso wrote: Hi all, I have some problem with ScopedTypeVariables, let and so on, at least in GHC 7. My aim is to be able to supply a polymorphic type signature in let bindings. Confusingly, I find no such example in the blog post about local let

Re: [Haskell-cafe] Advertisement: the Haskell Stack Overflow Q A site

2011-05-04 Thread James Cook
On May 4, 2011, at 4:50 PM, Andrew Coppin wrote: One of the benefits of a site like SO as a forum is the ability to record and link to prior work, edit for technical errors, and easily search and categorize past answers. It is also less prone to noise, for those suffering from

Re: [Haskell-cafe] Python is lazier than Haskell

2011-04-28 Thread James Cook
On Apr 28, 2011, at 11:27 AM, Ertugrul Soeylemez wrote: Gracjan Polak gracjanpo...@gmail.com wrote: Ketil Malde ketil at malde.org writes: In Haskell, I often need to add stubs of undefined in order to do this. I don't mind, since it is often very useful to say *something* about the

Re: [Haskell-cafe] Using _ on the RHS of an equation?

2011-04-05 Thread James Cook
It's quite hacky, but this can be done with CPP and quasiquoting (incidentally, it would be _REALLY_ nice if 'undefined' and 'error' had similar source-location-dependent error messages by default): https://github.com/mokus0/junkbox/commit/bad59f486c3457f1d880a1cfa5b1baa33aff4ade -- James

Re: [Haskell-cafe] HDF5 binding (was: why is ghci trying to load hsc file ??)

2011-04-04 Thread James Cook
On Apr 3, 2011, at 10:43 PM, mauricio.antu...@gmail.com wrote: I worked out a small hdf5 binding using cabal and bindings-DSL and sqlite3 as my example. I just wanted to add that I also started an HDF5 binding recently (using hsc2hs only). It does more than enough for me ATM, so I don't

Re: [Haskell-cafe] ANNOUNCE: enumerator 0.4.8

2011-03-28 Thread James Cook
On Mar 28, 2011, at 12:54 AM, wren ng thornton wrote: On 3/27/11 9:58 PM, John Millikin wrote: Resending is slightly more complex -- if the other end can say resend that last chunk, then it should be easy enough, but resend the last 2 bytes of that chunk you sent 5 minutes ago would be much

Re: [Haskell-cafe] bug in Prelude.words?

2011-03-28 Thread James Cook
On Mar 28, 2011, at 12:05 PM, Christopher Done wrote: On 28 March 2011 17:55, malcolm.wallace malcolm.wall...@me.com wrote: Does anyone else think it odd that Prelude.words will break a string at a non-breaking space? Prelude words abc def\xA0ghi [abc,def,ghi] I think it's predictable,

Re: [Haskell-cafe] How to use roots package?

2011-03-23 Thread James Cook
On Mar 23, 2011, at 6:57 PM, Henning Thielemann wrote: James Cook schrieb: Those are both options, as is to simply restart findRoot if it returns a 'Left' vaule. I personally would incline toward a custom driver function (findRoot). I should probably add one to the library that accepts

Re: [Haskell-cafe] How to use roots package?

2011-03-18 Thread James Cook
On Mar 18, 2011, at 7:39 PM, Artyom Kazak wrote: Hi Café! roots (http://hackage.haskell.org/package/roots) is a package to solve equations like f(x)==0. In RootFinder class there is an 'defaultNSteps' value, which is used as maximal count of iterations functions like findRoot and

Re: [Haskell-cafe] HDF5 binding

2011-03-04 Thread James Cook
On Mar 4, 2011, at 8:25 AM, Ferenc Wagner wrote: Hi, This is fairly extensive indeed! I got nowhere near this, but also took a somewhat different angle, especially by using StorableArrays for passing arrays around (I used HDF5 in conjunction with LaPack). I also experienced with going a

Re: [Haskell-cafe] Re: True Random Numbers

2010-04-05 Thread James Cook
are changing soon. It's nearing release, I'm mostly just trying to knock off rough edges and trying to decide whether to take the plunge and make some interface changes (mostly whether I want to hide some data constructors in order to better enforce some invariants). -- James Cook On Apr 3, 2010