Re: [Haskell-cafe] Conditional lens

2013-10-10 Thread Edward Kmett
`ifL` isn't a legal lens for several reasons. Lens s t a b generally requires that the types a subsumes b and b subsumes a, and that s subsumes t and t subsumes s. Lens s (Maybe t) (Maybe a) b is a huge red flag. There is an 'illegal prism' provided by lens that is a more principled version of

Re: [Haskell-cafe] Proposal: Partitionable goes somewhere + containers instances

2013-09-30 Thread Edward Kmett
On Sun, Sep 29, 2013 at 8:20 AM, Edward Kmett ekm...@gmail.com wrote: I don't know that it belongs in the standard libraries, but there could definitely be a package for something similar. ConstraintKinds are a pretty hefty extension to throw at it, and the signature written

Re: [Haskell-cafe] Proposal: Partitionable goes somewhere + containers instances

2013-09-29 Thread Edward Kmett
I don't know that it belongs in the standard libraries, but there could definitely be a package for something similar. ConstraintKinds are a pretty hefty extension to throw at it, and the signature written there prevents it from being used on ByteString, Text, etc. This can be implemented with

Re: [Haskell-cafe] Impredicative types and Lens?

2013-09-08 Thread Edward Kmett
You can't write that lens by hand, so it isn't surprising that the template haskell can't generate it either. =) ImpredicativeTypes don't work all that well. -Edward On Sun, Sep 8, 2013 at 9:49 AM, Artyom Kazak y...@artyom.me wrote: Here’s a small example, which, when compiled, gives an

Re: [Haskell-cafe] Proposal: Non-recursive let

2013-07-31 Thread Edward Kmett
Or fmap in this case =) On Wed, Jul 31, 2013 at 11:33 AM, Erik Hesselink hessel...@gmail.comwrote: On Fri, Jul 26, 2013 at 6:44 PM, Andreas Abel andreas.a...@ifi.lmu.de wrote: mapSnd f = (id *** f) As a very small aside, this is just `second` from Control.Arrow. Erik

Re: [Haskell-cafe] Proposal: Non-recursive let

2013-07-25 Thread Edward Kmett
I'm just going to say that I'd rather we didn't resort to calling each others trolls. I happen to disagree with Oleg on this particular issue and find that it is better resolved by just using -Wall or a 2-line combinator, but I find that across the breadth and depth of issues in the Haskell

Re: [Haskell-cafe] Proposal: Non-recursive let

2013-07-24 Thread Edward Kmett
is a lazy constructor. On 22.07.13 4:54 PM, Edward Kmett wrote: let x = x +1 is perfectly cromulent when x is sufficiently lazy, e.g. in the one point compactification of the naturals: data Conat = S Conat | Z There it represents infinity with proper sharing. -Edward On Jul 22, 2013

Re: [Haskell-cafe] Proposal: Non-recursive let

2013-07-22 Thread Edward Kmett
let x = x +1 is perfectly cromulent when x is sufficiently lazy, e.g. in the one point compactification of the naturals: data Conat = S Conat | Z There it represents infinity with proper sharing. -Edward On Jul 22, 2013, at 10:24 AM, Andreas Abel andreas.a...@ifi.lmu.de wrote: On

Re: [Haskell-cafe] Proposal: Non-recursive let

2013-07-17 Thread Edward Kmett
This happened because I copied the surrounding style blindly. I fucked up. state f = get = \s - case f s of (a, s) - do put s return a would not have the problem and would have given a warning about name shadowing. I for one am somewhat neutral on the *adding* a non-recursive let

Re: [Haskell-cafe] Proposal: Non-recursive let

2013-07-17 Thread Edward Kmett
FWIW, I maintain, according to wc and sloccount, 220841 lines worth of Haskell code at present. I have been bitten this error one time, so it affects me .45% of the time and that was only because it was in the only package I was not using -Wall on. -Edward On Wed, Jul 17, 2013 at 12:23 PM,

Re: [Haskell-cafe] Proposal: Non-recursive let

2013-07-11 Thread Edward Kmett
On Wed, Jul 10, 2013 at 3:47 AM, o...@okmij.org wrote: Jon Fairbairn wrote: It just changes forgetting to use different variable names because of recursion (which is currently uniform throughout the language) to forgetting to use non recursive let instead of let. Let me bring to the

Re: [Haskell-cafe] Proposal: Non-recursive let

2013-07-11 Thread Edward Kmett
, Carter Schonwald wrote: Yup. Nested cases *are* non recursive lets. (Can't believe I forgot about that ) On Thursday, July 11, 2013, Edward Kmett wrote: On Wed, Jul 10, 2013 at 3:47 AM, o...@okmij.org javascript:_e({}, 'cvml', 'o...@okmij.org'); wrote: Jon Fairbairn

[Haskell-cafe] [haskell.org Google Summer of Code] The Summer of Code is officially under way.

2013-06-18 Thread Edward Kmett
The getting to know your mentor period has passed and the Summer of Code has officially begun. Keep in mind that mid-term evaluations will begin July 29th, so students will need to hit the ground running. I'm looking forward to seeing what we can accomplish together this year! -Edward

Re: [Haskell-cafe] [haskell.org Google Summer of Code 2013] Approved Projects

2013-06-02 Thread Edward Kmett
but there may be a free equivalent Dominic Steinitz domi...@steinitz.org http://idontgetoutmuch.wordpress.com On 28 May 2013, at 16:11, Edward Kmett ekm...@gmail.com wrote: Hi Dominic, The proposal is admittedly rather unfortunately opaque. The parts I can shed light on: Students come

Re: [Haskell-cafe] [haskell.org Google Summer of Code 2013] Approved Projects

2013-05-29 Thread Edward Kmett
There should be a link from the google-melange website, but one slight shift in focus is on either getting SWIG bindings or possibly even using Ian-Woo Kim's C++FFI tools. Carter may be able to go into more detail. On Wed, May 29, 2013 at 6:46 AM, harry volderm...@hotmail.com wrote: Edward

Re: [Haskell-cafe] [haskell.org Google Summer of Code 2013] Approved Projects

2013-05-29 Thread Edward Kmett
per se but it is good to keep such a concrete goal in mind when working on something as abstract as SWIG. I agree that Qt has a somewhat horrible API. =) -Edward On Wed, May 29, 2013 at 12:34 PM, harry volderm...@hotmail.com wrote: Edward Kmett ekmett at gmail.com writes: There should

Re: [Haskell-cafe] [haskell.org Google Summer of Code 2013] Approved Projects

2013-05-28 Thread Edward Kmett
or if my answer didn't suffice please feel free to follow up! -Edward Kmett On Tue, May 28, 2013 at 6:52 AM, Dominic Steinitz domi...@steinitz.orgwrote: Hi Edward, Although the project I am interested in (as a user) has been accepted :-), I can't help feeling the selection process is a bit

Re: [Haskell-cafe] [haskell.org Google Summer of Code 2013] Approved Projects

2013-05-28 Thread Edward Kmett
of such a proposal that we've had in recent years. -Edward On Tue, May 28, 2013 at 8:24 PM, Ben Lippmeier b...@ouroborus.net wrote: On 29/05/2013, at 1:11 AM, Edward Kmett wrote: This unfortunately means, that we can't really show the unaccepted proposals with information about how to avoid

[Haskell-cafe] [haskell.org Google Summer of Code 2013] Approved Projects

2013-05-27 Thread Edward Kmett
. Shachaf Ben-Kiki is helping out as this year's backup administrator and he should also be able to help out with administrivia or questions as well. I'd like to thank everyone for participating in the selection process and I think we can look forward to another excellent summer of code! Edward Kmett

Re: [Haskell-cafe] Infrastructure for testing the impact of a Functor/Applicative/Monad hierarchy

2013-05-16 Thread Edward Kmett
There is a chicken and the egg problem with this argument. Historically Haskell' has only considered changes that have been actually implemented. I would encourage the language standard to follow suit, but we survived a similar autocratic minor change to Num with very little ecosystem

Re: [Haskell-cafe] Backward compatibility

2013-05-03 Thread Edward Kmett
Tantamount to a new language to fix a minor detail in a typeclass hierarchy? That is just histrionic. *No* language is that stable. Scala makes dozens of changes like that between *minor* versions, and while I hardly hold up their development practices as the best in the industry it is still

Re: [Haskell-cafe] Backward compatibility

2013-05-03 Thread Edward Kmett
So basically it boiled down drop the haskell98 package dependency and use the new exception system, and import the right things to avoid the use of the no longer exported Prelude catch? On Fri, May 3, 2013 at 12:44 PM, Niklas Hambüchen m...@nh2.me wrote: While I certainly enjoy the discussion,

Re: [Haskell-cafe] Why were datatype contexts removed instead of fixing them?

2013-04-26 Thread Edward Kmett
That is because every other language conflates the notion of a class with a vtable smashed into every inhabitant of the class where everything has to be defined together in one monolithic definition. You also can't write sensible Monads in those languages (Where does return go?) or retroactively

Re: [Haskell-cafe] Automated Differentiation of Matrices (hmatrix)

2013-04-10 Thread Edward Kmett
Apr 2013, at 23:03, Edward Kmett ekm...@gmail.com wrote: hmatrix and ad don't (currently) mix. The problem is that hmatrix uses a packed structure that can't hold any of the AD mode variants we have as an Element. =( I've been working with Alex Lang to explore in ad 4.0 ways that we can

Re: [Haskell-cafe] Automated Differentiation of Matrices (hmatrix)

2013-04-09 Thread Edward Kmett
hmatrix and ad don't (currently) mix. The problem is that hmatrix uses a packed structure that can't hold any of the AD mode variants we have as an Element. =( I've been working with Alex Lang to explore in ad 4.0 ways that we can support monomorphic AD modes and still present largely the same

[Haskell-cafe] [haskell.org Summer of Code 2013] We're In!

2013-04-08 Thread Edward Kmett
to pester me (or Shachaf) with questions! -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Need some advice around lazy IO

2013-03-18 Thread Edward Kmett
Konstantin, Please allow me to elaborate on Dan's point -- or at least the point that I believe that Dan is making. Using, let bug = Control.DeepSeq.rnf str `seq` fileContents2Bug str or ($!!) will create a value that *when forced* cause the rnf to occur. As you don't look at bug until much

Re: [Haskell-cafe] Safe lens?

2012-10-29 Thread Edward Kmett
Actually Control.Lens.Getter doesn't use TH. The issue is more that it depends on some modules I didn't flag as Trustworthy and which require some more high-falutin type system extensions that GHC isn't happy about treating as Safe. I'll try adding a few Trustworthy flags. It previously was

Re: [Haskell-cafe] Safe lens?

2012-10-29 Thread Edward Kmett
in the event of Trustworthy. Particularly fancy if integrated into the haddocks. -mgsloan On Mon, Oct 29, 2012 at 2:33 PM, Edward Kmett ekm...@gmail.com wrote: Actually Control.Lens.Getter doesn't use TH. The issue is more that it depends on some modules I didn't flag as Trustworthy and which

Re: [Haskell-cafe] Safe lens?

2012-10-29 Thread Edward Kmett
future accidental toggleage. Still, it's puzzling that the status of Safe-Infered was lost. On Mon, Oct 29, 2012 at 2:46 PM, Edward Kmett ekm...@gmail.com wrote: I fixed it. Version 3.0.6 was just uploaded to hackage and is appropriately Trustworthy where needed. Please let me know if I

[Haskell-cafe] haddock changes between 2.10 and 2.12?

2012-09-24 Thread Edward Kmett
Was there some significant change/bug introduced to haddock made between 2.10 and 2.12? When I look at the haddocks for kan-extensions 3.1: Data.Functor.Yonedahttp://hackage.haskell.org/packages/archive/kan-extensions/3.1/doc/html/Data-Functor-Yoneda.html which purports to have been built by

Re: [Haskell-cafe] Have you seen this functor/contrafunctor combo?

2012-06-09 Thread Edward Kmett
Here is a considerably longer worked example using the analogy to J, borrowing heavily from Wadler: As J, this doesn't really add any power, but perhaps when used with non-representable functors like Equivalence/Comparison you can do something more interesting. -- Used for Hilbert {-# LANGUAGE

Re: [Haskell-cafe] Have you seen this functor/contrafunctor combo?

2012-06-09 Thread Edward Kmett
As an aside, the Union constraint on epsilon/gepsilon is only needed for the :+: case, you can search products just fine with any old contravariant functor, as you'd expect given the existence of the Applicative. -Edward On Sat, Jun 9, 2012 at 6:28 PM, Edward Kmett ekm...@gmail.com wrote: Here

Re: [Haskell-cafe] Problem Installing ad (Automatic Differentiation) Package

2012-04-21 Thread Edward Kmett
I'll need to get an older ghc version installed, so I can try to figure out what changes are needed to make template haskell bits compatible back to the current platform. 'ad' uses TH rather extensively, and sadly, the update to support ghc 7.4.1 broke a fair bit of the old code gen -- as I

Re: [Haskell-cafe] Un-memoization

2012-03-23 Thread Edward Kmett
It depends on how you are building the tree. If you are building up the tree from repeated substitution at the leaves and never reference its body before you do the final fold, you may be able to exploit the fact that trees form a free monad, and that there is a nice construction for increasing

[Haskell-cafe] Google Summer of Code 2012

2012-03-19 Thread Edward Kmett
very much and we look forward to another successful Summer of Code! -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] We *have* been accepted into the Google Summer of Code

2012-03-16 Thread Edward Kmett
Just to clarify, since I've been getting a ton of emails on the topic, we *have* been accepted to the Google Summer of Code this year. The list on their site is still updating, and we should appear there shortly. -Edward ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] ANN: Haskell OpenGL package updates

2011-10-30 Thread Edward Kmett
, 2011 at 2:07 PM, Edward Kmett ekm...@gmail.com wrote: Jason, Thank you for taking ownership of HOpenGL! Thanks! I would like to make a formal request for there to be some way to get access to either Graphics.Rendering.OpenGL.Raw.Core31.TypesInternal

Re: [Haskell-cafe] ANN: Haskell OpenGL package updates

2011-10-28 Thread Edward Kmett
Jason, Thank you for taking ownership of HOpenGL! I would like to make a formal request for there to be *some* way to get access to either Graphics.Rendering.OpenGL.Raw.Core31.TypesInternal or that Graphics.Rendering.OpenGL.Raw.Core31.Types re-export the newtype wrappers it places around

[Haskell-cafe] ANNOUNCE: Hac Boston from January 21-23rd at MIT

2011-10-25 Thread Edward Kmett
://haskell.org/haskellwiki/Hac_Boston/Talks . We look forward to seeing you at MIT! -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] ANNOUNCE: Hac Boston from January *20-22* at MIT

2011-10-25 Thread Edward Kmett
Correction: January 20-22nd ;) On Tue, Oct 25, 2011 at 5:45 PM, Edward Kmett ekm...@gmail.com wrote: I am very pleased to officially announce Hac Boston, a Haskell hackathon to be held January 21-23, 2012 at MIT in Cambridge, MA. The hackathon will officially kick off at 2:30 Friday

Re: [Haskell-cafe] haskell i18n best practices

2011-10-11 Thread Edward Kmett
haven't bundled it up for third party use yet, but its *my* practice. ;) -Edward Kmett This is what I've been looking at lately. The first thing I noticed was the GNU gettext implementation for Haskell. The wiki page [1] has a nice explanation by Aufheben. The hgettext package is found here [2

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

2011-09-23 Thread Edward Kmett
You still need IO to get the stable name out to use. :) Sent from my iPad On Sep 23, 2011, at 5:33 AM, Sean Leather leat...@cs.uu.nl wrote: Hi Edward, On Thu, Sep 22, 2011 at 16:50, Edward Kmett wrote: I have a stable-maps package that provides lookup and inserting into a map via stable

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

2011-09-23 Thread Edward Kmett
Import Data.HashTable import Data.Dynamic table :: HashTable StableName Dynamic table= new (==) hashStableName 2011/9/22 Edward Kmett ekm...@gmail.com I have a stable-maps package that provides lookup and inserting into a map via stable names. -Edward On Thu, Sep 22, 2011 at 5

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

2011-09-22 Thread Edward Kmett
I have a stable-maps package that provides lookup and inserting into a map via stable names. -Edward On Thu, Sep 22, 2011 at 5:47 AM, Sean Leather leat...@cs.uu.nl wrote: There is an abstract type called SNMap for stable names referred to in [1]. This has apparently disappeared from GHC a

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

2011-09-22 Thread Edward Kmett
Then don't do that. =) I should have mentioned, parametric keys are a no no and can do bad things. ;) -Edward On Thu, Sep 22, 2011 at 2:33 PM, James Cook mo...@deepbondi.net wrote: I may be wrong, but I think the original SNMap was a map from 'StableName's to the specific values they were

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

2011-09-21 Thread Edward Kmett
On Sep 18, 2011, at 11:28 AM, Brandon Allbery allber...@gmail.com wrote: 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

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

2011-08-14 Thread Edward Kmett
I originally didn't have the package exporting those things. I would be amenable to standardization without them, but I use them in about 20 packages that are built on top of semigroups, and naturals and non-empty lists come up when talking about semigroups a lot. Rather than having them live

[Haskell-cafe] [Haskell-Cafe] Constructive Probability Theory and RandProc's σ-algebras

2011-07-03 Thread Edward Kmett
On Sun, Jul 3, 2011 at 11:05 AM, David Banas dba...@banasfamily.net wrote: v0.4 of `RandProc` has just been posted to Hackage: http://hackage.haskell.org/package/randproc [NB: I transfered this discussion from haskell to haskell-cafe, and started another thread] I have been spending some

Re: [Haskell-cafe] Data Flow Programming in FP

2011-06-21 Thread Edward Kmett
and Vene is packaged in 'streams' as Data.Stream.Future: http://hackage.haskell.org/packages/archive/streams/0.8.0/doc/html/Data-Stream-Future.html -Edward Kmett On Mon, Jun 20, 2011 at 10:45 AM, Richard Senington sc06...@leeds.ac.ukwrote: Hi all, I have recently become interested in Dataflow

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

2011-05-30 Thread Edward Kmett
interconvert to [a]. -Edward On Tue, May 3, 2011 at 6:49 PM, Edward Kmett ekm...@gmail.com wrote: On Tue, May 3, 2011 at 3:43 PM, Yitzchak Gale g...@sefer.org wrote: Edward Kmett wrote: sconcat :: [a] - a - a with either the semantics you supplied or something like sconcat = appEndo . mconcat

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

2011-05-04 Thread Edward Kmett
On Wed, May 4, 2011 at 7:40 AM, John Lato jwl...@gmail.com wrote: From: Edward Kmett ekm...@gmail.com On Tue, May 3, 2011 at 3:43 PM, Yitzchak Gale g...@sefer.org wrote: I'm sure there are countless other natural examples of semigroups in the wild, and that the typical non-trivial ones

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

2011-05-03 Thread Edward Kmett
On Tue, May 3, 2011 at 12:04 PM, Bryan O'Sullivan b...@serpentine.comwrote: On Tue, May 3, 2011 at 8:00 AM, Yitzchak Gale g...@sefer.org wrote: Could you please add a Semigroup instance for Text? I'd strongly recommend writing an instance for the text package's Builder type instead.

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

2011-05-03 Thread Edward Kmett
On Tue, May 3, 2011 at 7:12 AM, Yitzchak Gale g...@sefer.org wrote: 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

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

2011-05-03 Thread Edward Kmett
On Tue, May 3, 2011 at 3:43 PM, Yitzchak Gale g...@sefer.org wrote: 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

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

2011-05-03 Thread Edward Kmett
:49 PM, Edward Kmett ekm...@gmail.com wrote: On Tue, May 3, 2011 at 3:43 PM, Yitzchak Gale g...@sefer.org wrote: 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

Re: [Haskell-cafe] SoC / Cabal project proposal: specify Setup.hs dependencies

2011-03-29 Thread Edward Kmett
On Tue, Mar 29, 2011 at 1:26 PM, Rogan Creswick cresw...@gmail.com wrote: I've been wanting to share code between cabal projects for some time, and I finally had a chance to write up the rough idea as a simple proposal. Here's the description, with links to the SoC trac and reddit

Re: [Haskell-cafe] ANNOUNCE: incremental-parser library package

2011-03-22 Thread Edward Kmett
2011/3/22 Mario Blažević mblaze...@stilo.com This seems very interesting. One question: The MonadPlus and the Alternative instance differ: the former's mplus combinator equals the asymmetric | choice. Why? Good question. Basically, I see MonadPlus as a union of Monad and

Re: [Haskell-cafe] Looking for feedback on my attempt at a tree construction edsl

2011-03-22 Thread Edward Kmett
If you add an instance of IsString to handle leaf construction you can get it down to Fruits + do Apple Mango Arbitrary + do 1 ... But I also don't see the point of doing this in a monad. -Edward On Tue, Mar 22, 2011 at 1:15 PM, Yves Parès

Re: [Haskell-cafe] Uncertainty analysis library?

2011-03-22 Thread Edward Kmett
21, 2011 at 4:57 PM, Edward Kmett ekm...@gmail.com wrote: On Mon, Mar 21, 2011 at 2:42 PM, Edward Amsden eca7...@cs.rit.eduwrote: So I'm feeling a bit elated that I've sparked my first theoretical discussion in cafe, though I don't have much to contribute. :\ However in the interests

Re: [Haskell-cafe] Uncertainty analysis library?

2011-03-21 Thread Edward Kmett
On Sun, Mar 20, 2011 at 5:46 PM, Tom Nielsen taniel...@gmail.com wrote: Interval arithmetic is of course not the same as uncertainty, although computer scientists like to pretend that is the case. (and uncertainty estimates do not have the be rough.) Very true. In general the propagation

Re: [Haskell-cafe] Uncertainty analysis library?

2011-03-21 Thread Edward Kmett
comment. I've pushed a new version of intervals to mollify hackage. It (or the old version) should cabal install just fine. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

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

2011-03-20 Thread Edward Kmett
If your function has nice derivatives, you may want to look at the Newton implementation in http://hackage.haskell.org/packages/archive/ad/0.44.4/doc/html/Numeric-AD-Newton.html#v:findZero http://hackage.haskell.org/packages/archive/ad/0.44.4/doc/html/Numeric-AD-Newton.html#v:findZeroor if you

Re: [Haskell-cafe] Uncertainty analysis library?

2011-03-20 Thread Edward Kmett
I have a package for interval arithmetic in hackage http://hackage.haskell.org/package/intervals-0.2.0 However it does not currently properly adjust the floating point rounding mode so containment isn't perfect. However, we are actively working on fixing up the Haskell MPFR bindings, which will

[Haskell-cafe] [haskell-gsoc] Haskell.org Google Summer of Code 2011

2011-03-19 Thread Edward Kmett
! -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] How large is the Haskell community ?

2011-03-17 Thread Edward Kmett
Clearly we need some sort of xbox live -like achievement system for these. Achievement Unlocked: Stumped Oleg! On Sat, Feb 12, 2011 at 6:57 PM, Jan Christiansen j...@informatik.uni-kiel.de wrote: On 12.02.2011, at 21:18, Aaron Gray wrote: I was wondering if anyone had an idea or estimate

Re: [Haskell-cafe] [Agda] Defining subtraction for naturals

2011-03-17 Thread Edward Kmett
On Thu, Mar 17, 2011 at 6:41 PM, wren ng thornton w...@freegeek.org wrote: On 3/17/11 5:12 PM, Conor McBride wrote: On 17 Mar 2011, at 18:35, wren ng thornton wrote: Another question on particulars. When dealing with natural numbers, we run into the problem of defining subtraction. There

Re: [Haskell-cafe] Custom monad using ST

2011-03-09 Thread Edward Kmett
On Wed, Mar 9, 2011 at 6:21 PM, Yves Parès limestr...@gmail.com wrote: Well, I want to hide the fact that I'm using ST, so if I can hide the existential type 's' it is better. In practice if you want to actually _use_ ST you'll find you'll need to let the world escape into your type.

Re: [Haskell-cafe] ANN: hmpfr-0.3.2 (requires integer-simple, supports mpfr 3.0.0)

2011-03-04 Thread Edward Kmett
repository up to date? -Edward Kmett On Fri, Mar 4, 2011 at 3:27 PM, Daniel Peebles pumpkin...@gmail.com wrote: According to Duncan Coutts (whom I asked about this issue in #ghc), the solution here is to use the new foreign import prim machinery to talk to MPFR. This prevents GC from occurring during

Re: [Haskell-cafe] ANN: hmpfr-0.3.2 (requires integer-simple, supports mpfr 3.0.0)

2011-03-03 Thread Edward Kmett
that were blocked by this. -Edward Kmett 2011/3/3 Michal Konečný m...@konecny.aow.cz Dear all, I am pleased to announce hmpfr-0.3.2, a new version of Aleš Bizjak's bindings to the MPFR arbitrary precision floating point arithmetic library. The changes in this version are quite small

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

2011-02-19 Thread Edward Kmett
On Sat, Feb 19, 2011 at 7:27 PM, Sterling Clover s.clo...@gmail.com wrote: On Sat, Feb 19, 2011 at 3:04 PM, Johan Tibell johan.tib...@gmail.com wrote: On Sat, Feb 19, 2011 at 11:58 AM, Louis Wasserman wasserman.lo...@gmail.com wrote: A couple thoughts: size takes O(n). That's just

Re: [Haskell-cafe] Instancing Typeable for monad transformers?

2011-02-01 Thread Edward Kmett
I would happily supply a patch to add the Typeable (and the few Data instances that can be made) to transformers. I had to make similar ones in my comonad-transformers package anyways. -Edward Kmett On Wed, Feb 2, 2011 at 1:02 AM, John Millikin jmilli...@gmail.com wrote: Is there any

Re: [Haskell-cafe] (Co/Contra)Functor and Comonad

2010-12-24 Thread Edward Kmett
+1 for adding a Contrafunctor/ContraFunctor to base somewhere. But I agree completely with Tony, please call it contramap. ;) Otherwise people will wonder why comonads are not cofunctors -- a matter which can be cleared up by avoiding sloppy terminology. +1 for adding Comonads. As an aside, since

Re: [Haskell-cafe] Random this! ;-)

2010-07-26 Thread Edward Kmett
that function using the approach you used will lead to a computation that won't terminate. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] monoids and monads

2010-07-26 Thread Edward Kmett
is the associativity of Kleisli arrow composition and the two identity laws. The three monad laws are precisely what you need to form this monoid. There are analogous laws for Applicative that serve the same purpose. -Edward Kmett ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-23 Thread Edward Kmett
runhaskell Setup.hs foo instead of cabal foo. You just need to tell cabal if you want to delegate to Setup.hs, by using something other than Simple as a build-type. The vast majority of the users of cabal never bother changing the behavior of Setup.hs. -Edward Kmett On Thu, Jul 22, 2010 at 11:58 PM

Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-23 Thread Edward Kmett
On Fri, Jul 23, 2010 at 8:07 AM, Edward Kmett ekm...@gmail.com wrote: That actually runs contrary to one of cabal's other practices, which is to add a 'simple' Setup.hs to your package as it makes the sdist is one is not present. er.. I meant if one is not present

Re: [Haskell-cafe] Hot-Swap with Haskell

2010-07-16 Thread Edward Kmett
mechanism. That way hot-swapping the current process would leave your GUI (and the pipe/IPC mechanism) intact. You may then need to pass along whatever changes affect the gui over the pipe in a fairly manual fashion. -Edward Kmett On Thu, Jul 15, 2010 at 11:05 PM, Andy Stewart lazycat.mana

Re: new haskell project (Was Re: [Haskell-cafe] Subtype polymorphism in Haskell)

2010-07-10 Thread Edward Kmett
of overloading and polymorphic instantiation in Haskell, e.g. dealing with portfolios that span multiple currencies, so take care with shackling yourself to the current design. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Memoization in Haskell?

2010-07-09 Thread Edward Kmett
' 1230891823091823018203123 93721573993600178112200489 *Main fastest_f' 12308918230918230182031231231293810923 11097012733777002208302545289166620866358 -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

Re: [Haskell-cafe] Memoization in Haskell?

2010-07-09 Thread Edward Kmett
a good idea to either filter the negative case like you do here, or, since it is well defined, extend the scope of the memo table to the full Int range by explicitly memoizing negative vales as well. -Edward Kmett On Fri, Jul 9, 2010 at 11:51 AM, Mike Dillon m...@embody.org wrote: begin Edward

Re: [Haskell-cafe] Re: Transformers versus monadLib versus...

2010-07-09 Thread Edward Kmett
On Thu, Jul 8, 2010 at 12:37 PM, Yitzchak Gale g...@sefer.org wrote: Hi Edward, Edward Kmett wrote: It looks like there is a fairly strong effort to fix most of the most egregious warts in the mtl. btw, does this overhaul include adding Applicative instances, perchance

Re: [Haskell-cafe] bug in ghci ?

2010-07-09 Thread Edward Kmett
could prove or disprove. ;-) I hope the above demonstrate that there are at least some fairly reasonable (and, given your request, appropriately category theoretic!) examples where one would want the ability to specify that there is more than one member of a minimal mutual definition. =) -Edward

Re: [Haskell-cafe] Re: Transformers versus monadLib versus...

2010-07-06 Thread Edward Kmett
flipping its lid. Of course, adding support for monadLib, which doesn't conflict with any of this is a completely concern. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] What is Haskell unsuitable for?

2010-07-06 Thread Edward Kmett
we're on the topic, does anyone else get funny looks when they say monads? Sadly, yes. ;) -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Transformers versus monadLib versus...

2010-07-06 Thread Edward Kmett
On Tue, Jul 6, 2010 at 10:01 PM, Ertugrul Soeylemez e...@ertes.de wrote: Edward Kmett ekm...@gmail.com wrote: You may want to review the thread here: http://www.haskell.org/pipermail/libraries/2009-November/012833.html The gist of it is, I would recommend sticking with MTL for right

Re: [Haskell-cafe] How easy is it to hire Haskell programmers

2010-07-02 Thread Edward Kmett
or ways to implement memoization in a purely functional setting, or how to abuse side effects to do so in a less pure way. Those are the kinds of things you get exposed to through actually using Haskell, rather than through reading a monad tutorial. -Edward Kmett

Re: [Haskell-cafe] Associated types

2010-07-01 Thread Edward Kmett
. This much works. However equality constraints in the body still blow up at last check. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Physical equality

2010-06-28 Thread Edward Kmett
with. Typically you can construct something purely and inspect the result using IO all in one go, so the unsafePerformIO machinery isn't required. -Edward Kmett 2010/6/28 José Romildo Malaquias j.romi...@gmail.com Is there in Haskell a non monadic function of type a - a - Bool which test

Re: [Haskell-cafe] Re: The mother of all functors/monads/categories

2010-06-27 Thread Edward Kmett
that Codensity Reader ~ State. Take a look at the code in monad-ran on hackage for how Ran (StateT s m) is implemented for an example. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] The mother of all functors/monads/categories

2010-06-27 Thread Edward Kmett
to have the constraint Y d. The above code then stays the same, only with Yoneda removed and constraints added. This is an encoding of the fact that all Functors in Haskell are strong, and that Yoneda i is a Functor for any i :: * - *. -Edward Kmett

Re: [Haskell-cafe] Re: The mother of all functors/monads/categories

2010-06-27 Thread Edward Kmett
On Sun, Jun 27, 2010 at 6:45 PM, Max Bolingbroke batterseapo...@hotmail.com wrote: On 27 June 2010 22:20, Edward Kmett ekm...@gmail.com wrote: I've pointed out the Codensity Set monad on the Haskell channel. I spend no time on #haskell but clearly I should :) It is an interesting

Re: [Haskell-cafe] Read instance for GATD

2010-06-25 Thread Edward Kmett
this time around. I will check with him to see if I can get permission to host them somewhere and post a link to them here. -Edward Kmett On Fri, Jun 25, 2010 at 5:04 AM, corentin.dup...@ext.mpsa.com wrote: Hello Haskellers, I'm having trouble writing a Read Instance for my GATD. Arg this GATD

Re: [Haskell-cafe] Manual Type-Checking to provide Read instances for GADTs. (was Re: [Haskell-cafe] Read instance for GATD)

2010-06-25 Thread Edward Kmett
I've obtained permission to repost Gershom's slides on how to deserialize GADTs by typechecking them yourself, which are actually a literate haskell source file, that he was rendering to slides. Consequently, I've just pasted the content below as a literate email. -Edward Kmett - Deserializing

Re: [Haskell-cafe] Rewriting a famous library and using the same name: pros and cons

2010-06-23 Thread Edward Kmett
the other way. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Rewriting a famous library and using the same name: pros and cons

2010-06-23 Thread Edward Kmett
On Wed, Jun 23, 2010 at 2:57 PM, Gregory Crosswhite gcr...@phys.washington.edu wrote: On 6/23/10 2:13 PM, Edward Kmett wrote: On Tue, Jun 22, 2010 at 4:54 PM, Gregory Crosswhite gcr...@phys.washington.edu wrote: There is no reason that your program couldn't link to multiple versions

Re: [Haskell-cafe] TH instance code.

2010-06-22 Thread Edward Kmett
What you're looking for is something like: deriveVariable _t = [d| instance Variable $t where toVariant = toVariant . show fromVariant x = fmap (\v - read v :: $t) $ fromVariant x|] deriveVariable (conT ''PageType) deriveVariable (conT ''Int) deriveVariable (conT ''Maybe

Re: [Haskell-cafe] TH instance code.

2010-06-22 Thread Edward Kmett
v-- I had accidentally elided the _'s before the t's in the quasiquotation before. What you're looking for is something like: deriveVariable _t = [d| instance Variable $_t where toVariant = toVariant . show fromVariant x = fmap (\v - read v :: $_t) $ fromVariant x|]

Re: [Haskell-cafe] Rewriting a famous library and using the same name: pros and cons

2010-06-22 Thread Edward Kmett
are not the answer. -Edward Kmett On Tue, Jun 8, 2010 at 2:21 PM, Gregory Crosswhite gcr...@phys.washington.edu wrote: Or you just put an upper bound on the versions of the fgl library that your program will build against, as you should be doing anyway, and then nothing breaks. Cheers, Greg On Jun 8

Re: [Haskell-cafe] Huffman Codes in Haskell

2010-06-22 Thread Edward Kmett
://hackage.haskell.org/packages/archive/monoids/0.1.36/doc/html/src/Data-Generator-Compressive-LZ78.html -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

  1   2   3   >