Re: [Haskell-cafe] my gsoc project topic

2010-03-29 Thread Edward Kmett
this kind of project could look really good, the community could not benefit from it. [..] While I personally enjoy working on 3d graphics in general, it is hard to sell the community benefit. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Re: Garbage collecting pointers

2010-03-29 Thread Edward Kmett
for Java, and bringing your own linker into the mix is a decidedly unpleasant option. I'm continuing to play with them in a JIT-only environment but they don't play nice with compilation. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Programming with categories

2010-03-29 Thread Edward Kmett
://hackage.haskell.org/package/data-category Beyond that feel free to ask questions. -Edward Kmett On Mon, Mar 29, 2010 at 6:09 AM, Francisco Vieira de Souza vieira.u...@gmail.com wrote: Hi Haskell-cafe. I'm trying to use Haskell to program with Categories, but I didn't have seeing some works in this area nor

Re: [Haskell-cafe] Haskell.org re-design

2010-03-29 Thread Edward Kmett
The main issue I would have with the site design proposed here is that the Download Haskell link that is currently fairly prominent on the page gets shuffled off into oblivion in the footer. However, overall, I think it serves as a good starting point for discussion. -Edward Kmett On Sun, Mar 28

Re: [Haskell-cafe] ANN: data-category, restricted categories

2010-03-26 Thread Edward Kmett
On Fri, Mar 26, 2010 at 11:04 AM, Edward Kmett ekm...@gmail.com wrote: -- as long as you're ignoring 'seq' terminateSeq :: a - Unit terminateSeq a = a `seq` unit Er ignore that language about seq. a `seq` unit is either another bottom or undefined, so there remains one canonical morphism

[Haskell-cafe] Google Summer of Code 2010.

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

[Haskell-cafe] [Haskell.org Google Summer of Code] trac signup issues

2010-03-12 Thread Edward Kmett
, please email me with your name and desired contact email address, and I'll make sure your name winds up on the list. I apologize for the inconvenience. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

Re: [Haskell-cafe] Re: Some great results on fused code with the LLVM backend

2010-02-24 Thread Edward Kmett
, so LLVM's garbage collection support isn't used at all, it is still a rather strange duck as far as the rest of the LLVM ecosystem is concerned. * GHC/LLVM bytecode with JIT-option? There is little preventing this one. -Edward Kmett ___ Haskell-Cafe

Re: [Haskell-cafe] The Related monad and constant values in type classes

2010-02-18 Thread Edward Kmett
-reflection/ -Edward Kmett 2010/2/17 Jonas Almström Duregård jonas.dureg...@gmail.com Hi, This literate haskell file was intended to be a quick question about a problem i have been pondering, but it developed into a short presentation instead. What i want to know is if there is already something

Re: [Haskell-cafe] Type arithmetic with ATs/TFs

2010-02-12 Thread Edward Kmett
| a b - c, b c - a, c a - b where foo :: a - b - c would require 3 different class associate types, one for each fundep. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Iteratee, parsec co.

2010-02-09 Thread Edward Kmett
of, but I hardly qualify as an expert in the mainline Iteratee implementation. 3. Why Seek FileOffset is error message? I'm not quite sure what you're asking here. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Lazy language on JVM/CLR

2010-02-09 Thread Edward Kmett
mostly on the native/VM stack fairly easily. The biggest problem is the generated code bloat factor of about 2-3x. http://www.ccs.neu.edu/scheme/pubs/stackhack4.html http://www.cs.brown.edu/~sk/Publications/Papers/Published/pcmkf-cont-from-gen-stack-insp/ -Edward Kmett

Re: [Haskell-cafe] Anyone up for Google SoC 2010?

2010-02-05 Thread Edward Kmett
. -Edward Kmett On Fri, Feb 5, 2010 at 12:48 PM, Gwern Branwen gwe...@gmail.com wrote: On Fri, Feb 5, 2010 at 6:20 AM, Sittampalam, Ganesh ganesh.sittampa...@credit-suisse.com wrote: Gwern Branwen wrote: On Wed, Feb 3, 2010 at 8:14 PM, Henk-Jan van Tuyl hjgt...@chello.nl wrote: On Wed, 03

Re: [Haskell-cafe] functional references and HList?

2010-02-03 Thread Edward Kmett
be chained together. HList/OOHaskell doesn't concern itself with the 'deep reference' problem, and functional references do not concern themselves directly with extensible records. -Edward Kmett 2010/2/2 Günther Schmidt gue.schm...@web.de Hi all, I wonder if there is some a field of use overlap

Re: [Haskell-cafe] Anyone up for Google SoC 2010?

2010-02-01 Thread Edward Kmett
I would happily participate as a mentor again and I am willing to step up as administrator if you want to get it off your plate. -Edward Kmett On Sun, Jan 31, 2010 at 6:04 AM, Malcolm Wallace malcolm.wall...@cs.york.ac.uk wrote: Google has announced that the Summer of Code programme

Re: [Haskell-cafe] Hierachical abstraction

2010-01-28 Thread Edward Kmett
/ParserCombinators -Edward Kmett On Thu, Jan 28, 2010 at 6:22 PM, Sebastian Fischer s...@informatik.uni-kiel.de wrote: On Jan 28, 2010, at 9:31 PM, Luke Palmer wrote: I don't remember the name, but there is a technique where you compose the features you want and then take its fixed point to get

Re: [Haskell-cafe] Hierachical abstraction

2010-01-28 Thread Edward Kmett
functor interface. Ah good point. I'd realized the class of 'codata CFGs' I was working with was very large, but I hadn't made that painfully obvious in retrospect connection! Just enumerate the inhabitants of the language via your Applicative, er well, technically, Alternative combinators. -Edward

Re: [Haskell-cafe] Codensity improvement of free monads

2010-01-25 Thread Edward Kmett
of certain operations over Free Bin, but Density doesn't change the asymptotics of anything non-trivial over Cofree Bin for the better. -Edward Kmett Luke ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell-cafe] Re: Data.Ring -- Pre-announce

2010-01-16 Thread Edward Kmett
a Data.Ring in the monoids package! -Edward Kmett On Sat, Jan 16, 2010 at 1:40 PM, Henning Thielemann schlepp...@henning-thielemann.de wrote: wren ng thornton schrieb: Tom Tobin wrote: - Heinrich Apfelmus apfel...@quantentunnel.de wrote: Since the name Ring is already taken

Re: [Haskell-cafe] Name overloading

2010-01-13 Thread Edward Kmett
value type and interoperability goes out the window. On the other hand, the mixture of fixed type slots and type family slots gets you a pretty good compromise. You typically know the type of the structs whose members you are asking for. -Edward Kmett On Wed, Jan 13, 2010 at 2:08 PM, John Millikin

Re: Re[2]: [Haskell-cafe] Name overloading

2010-01-13 Thread Edward Kmett
every use of open, which is even more verbose than prepending the type name. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Explicit garbage collection

2010-01-07 Thread Edward Kmett
performGC, hence the rename. This should let you call for a minor collection, which should be considerably less time consuming. Especially as if you call it frequently you'll be dealing with a mostly cleared nursery anyways. -Edward Kmett On Thu, Jan 7, 2010 at 4:39 PM, Miguel Mitrofanov miguelim

Re: [Haskell-cafe] Explicit garbage collection

2010-01-06 Thread Edward Kmett
You probably just want to hold onto weak references for your 'isStillNeeded' checks. Otherwise the isStillNeeded check itself will keep you from garbage collecting! http://cvs.haskell.org/Hugs/pages/libraries/base/System-Mem-Weak.html -Edward Kmett On Wed, Jan 6, 2010 at 9:39 AM, Miguel

Re: [Haskell-cafe] Explicit garbage collection

2010-01-06 Thread Edward Kmett
(True, False, True), because the oracle is able to see into the future (via backtracking) to see that refMaybe doesn't use the reference after all. This probably won't suit your needs, but it was a fun little exercise. -Edward Kmett On Wed, Jan 6, 2010 at 4:05 PM, Miguel Mitrofanov miguelim

Re: [Haskell-cafe] Explicit garbage collection

2010-01-06 Thread Edward Kmett
Here is a slightly nicer version using the Codensity monad of STM. Thanks go to Andrea Vezzosi for figuring out an annoying hanging bug I was having. -Edward Kmett {-# LANGUAGE Rank2Types, GeneralizedNewtypeDeriving, DeriveFunctor #-}module STMOracle( Oracle, Ref, newRef, readRef

Re: [Haskell-cafe] lawless instances of Functor

2010-01-05 Thread Edward Kmett
Given fmap id = id, fmap (f . g) = fmap f . fmap g follows from the free theorem for fmap. This was published as an aside in a paper a long time back, but I forget where. -Edward Kmett On Mon, Jan 4, 2010 at 5:14 PM, Paul Brauner paul.brau...@loria.fr wrote: Hi, I'm trying to get a deep

Re: [Haskell-cafe] Continuable and serializable parsers.

2009-12-27 Thread Edward Kmett
parser and build up a combinator set yourself, however. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing

Re: [Haskell-cafe] Continuable and serializable parsers.

2009-12-27 Thread Edward Kmett
with. =) http://hackage.haskell.org/packages/archive/category-extras/0.53.5/doc/html/Control-Category-Cartesian-Closed.html -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Continuable and serializable parsers.

2009-12-27 Thread Edward Kmett
another Action. Is my example contrived? Am I missing something? :) Assuming a sufficiently smart preprocessor you can do anything you'd like, but the result isn't an arrow. ;) -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Boxed Mutable Arrays

2009-12-16 Thread Edward Kmett
at its worst, or your costs were dominated by other factors than GC. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Boxed Mutable Arrays

2009-12-16 Thread Edward Kmett
version I have bottlenecks on the root of the tree, so would be better served by multiple root TVars. I can't find it on Hackage, but here it is: http://comonad.com/haskell/thash/ -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Why?

2009-12-14 Thread Edward Kmett
/%7Ekarczma/arpap/FDPE05/f20-karczmarczuk.pdf Given. But then people have written some amazing things in brainfuck too. That doesn't mean that I want to subject myself to working in such a sufficient computing environment :) -Edward Kmett ___ Haskell-Cafe

Re: [Haskell-cafe] Why?

2009-12-14 Thread Edward Kmett
-Edward Kmett On Mon, Dec 14, 2009 at 2:20 PM, Jason Dusek jason.du...@gmail.com wrote: 2009/12/14 Edward Kmett ekm...@gmail.com: [...] That doesn't mean that I want to subject myself to working in such a sufficient computing environment :) Sufficient? That word was meant

Re: [Haskell-cafe] How to show record syntax?

2009-11-19 Thread Edward Kmett
, but as I understand things that should come more or less for free, given that they just wrap the value. This would let values that were serialized on an older version continue to be read in the current version, for people who are using Show as a data storage format. -Edward Kmett On Tue, Nov 17

Re: [Haskell-cafe] surrogate code points in a Char

2009-11-18 Thread Edward Kmett
the surrogate pair. So, I suppose the answer would be it is functioning as designed, because the current behavior is the least bad option. =) -Edward Kmett On Wed, Nov 18, 2009 at 10:28 AM, Manlio Perillo manlio_peri...@libero.itwrote: Hi. The Unicode Standard (version 4.0, section 3.9, D31 - pag 76

Re: [Haskell-cafe] Status of TypeDirectedNameResolution proposal?

2009-11-18 Thread Edward Kmett
-- ^- syntax error. instance Baz.Quux Int where Baz.foo = 2 I suppose this could possibly be fixed if something deep in the parser allowed a QName there. -Edward Kmett Anyway, a few concerns about TDNR as prosposed: One thing I'd really like that this would provide is shorter record

Re: Re[Haskell-cafe] cursive to foldr

2009-11-18 Thread Edward Kmett
-to-be-Monoids where mempty = undefined -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Status of TypeDirectedNameResolution proposal?

2009-11-18 Thread Edward Kmett
Thanks! Learn something new every day. =) -Edward Kmett On Wed, Nov 18, 2009 at 4:29 PM, David Menendez d...@zednenem.com wrote: On Wed, Nov 18, 2009 at 4:12 PM, Edward Kmett ekm...@gmail.com wrote: Qualified imports are some times problematic when you need to work with classes from

Re: [Haskell-cafe] ANNOUNCE: parallel-2.0.0.0

2009-11-18 Thread Edward Kmett
I love the new Eval Applicative! Out of idle curiosity, can parListN be generalized to parTraverseN similar to how parList was generalized to parTraverse? Similarly, parListChunk? -Edward Kmett On Wed, Nov 18, 2009 at 9:21 AM, Simon Marlow marlo...@gmail.com wrote: I've just uploaded parallel

Re: [Haskell-cafe] omitting params in function bindings

2009-11-17 Thread Edward Kmett
There is the property that once you 'move across the = to the right', the pattern matcher isn't allowed to backtrack and try other patterns any more, which might introduce some funny business. Though, I can't -- at the moment -- come up with a way that it would break anything. -Edward Kmett

Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-16 Thread Edward Kmett
2009/11/15 Eugene Kirpichov ekirpic...@gmail.com Hey, I've found terrific slides about monoids! http://comonad.com/reader/wp-content/uploads/2009/08/IntroductionToMonoids.pdf Edward Kmett, you rock! Glad you enjoyed the slides. =) There's more http://comonad.com/reader/2009/iteratees

Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-13 Thread Edward Kmett
on monoids and my monoids package on my blog at comonad.com, which may help you get your head around their use outside of the realm of pure mathematics. -Edward Kmett On Fri, Nov 13, 2009 at 12:11 PM, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: That is OK. Since understand

Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-13 Thread Edward Kmett
is not to be confused with the notion of a semigroup, which is a binary associative operation, and is therefore much more similar to a monoid in that all it lacks is a unit. -Edward Kmett Best wishes Stephen ___ Haskell-Cafe mailing list Haskell

Re: [Haskell-cafe] A small (?) problem with type families

2009-11-13 Thread Edward Kmett
On Fri, Nov 13, 2009 at 3:36 PM, David Menendez d...@zednenem.com wrote: On Fri, Nov 13, 2009 at 3:26 PM, Andy Gimblett hask...@gimbo.org.uk wrote: First a type family where the type Y is functionally dependent on the type X, and we have a function from Y to (). class X a where type

Re: [Haskell-cafe] What's this pattern called?

2009-10-23 Thread Edward Kmett
relies on your recursive data type being implemented as a functor with an explicit fixpoint, so base 'functor' seems quite appropriate. -Edward Kmett On Thu, Oct 22, 2009 at 3:47 AM, Martijn van Steenbergen mart...@van.steenbergen.nl wrote: Bonjour café, data ExprF r = Add r r | Sub

Re: [Haskell-cafe] Non-traversable foldables

2009-10-09 Thread Edward Kmett
On Fri, Oct 9, 2009 at 10:45 AM, Henning Thielemann lemm...@henning-thielemann.de wrote: On Fri, 9 Oct 2009, Martijn van Steenbergen wrote: Hallo café, Can anyone think of datatypes that are Foldable but not Traversable? Data.Set.Set is a good example. The values contained in the Set are

Re: [Haskell-cafe] Applicative do?

2009-10-09 Thread Edward Kmett
Good trick. I just added 'ado' to my little scheme monad library. ;) -Edward Kmett On Fri, Oct 9, 2009 at 1:06 PM, Philippa Cowderoy fli...@flippac.orgwrote: I do a lot of work with parsers, and want to do more using Applicatives. That said, I'm finding it a little tedious being forced to use

Re: [Haskell-cafe] Applicative do?

2009-10-09 Thread Edward Kmett
that it warrants a syntax extension in the Haskell case, but it is pretty convenient. =) -Edward Kmett On Fri, Oct 9, 2009 at 1:52 PM, Daniel Peebles pumpkin...@gmail.com wrote: I'd prefer idiom brackets over something do-ish for Applicatives. Conor McBride's SHE already supports them, if you're

Re: [Haskell-cafe] Market Place for Haskell development teams?

2009-10-02 Thread Edward Kmett
how different your C compiler is now than it was in 1999. It feels, to me that there are more breaking changes in just upgrading to, say, C99 than there have been over the entire post-Haskell 98 life of GHC. -Edward Kmett Big business demands stability. Regards, John

Re: [Haskell-cafe] An issue with EDSLs in the ``finally tagless'' tradition

2009-09-26 Thread Edward Kmett
I would just like to add that Oleg and Chung-chieh made sure in their finally tagless paper to use monomorphic lifting of literals explicitly to avoid this sort of ambiguity. Using Num or another typeclass is fine as long as all you want to do is evaluate your EDSL. But what about partial

Re: [Haskell-cafe] Ambiguous type variable with subclass instance (also: is there a better way to do this?)

2009-09-19 Thread Edward Kmett
A few issues, you can remove the overlapping instances by using a newtype wrapper to disambiguate which instance you want. A little alarm bell goes off in my head whenever I read 'instance Foo a'. newtype Wrapped a = Wrapped a instance Target Foo where ... instance Enumerated a = Target

Re: [Haskell-cafe] Building a monoid, continuation-passing style

2009-09-16 Thread Edward Kmett
For reference Oleg's indexed continuation monad is packaged on hackage in category-extras as: http://hackage.haskell.org/packages/archive/category-extras/latest/doc/html/Control-Monad-Indexed-Cont.html -Edward Kmett On Wed, Sep 16, 2009 at 7:07 AM, Martijn van Steenbergen mart

Re: [Haskell-cafe] Do I have this right? Remembering Memoization!

2009-09-15 Thread Edward Kmett
selected recognizes that quux doesn't depend on its argument and rewrote your code with more sharing. -Edward Kmett On Sun, Sep 13, 2009 at 7:45 PM, Mark Wotton mwot...@gmail.com wrote: On 14/09/2009, at 9:28 AM, Casey Hawthorne wrote: Do I have this right? Remembering Memoization! For some

Re: [Haskell-cafe] Parallel graphics

2009-09-15 Thread Edward Kmett
, say, in C++ with Intel Thread Building Blocks to get a self-tuning decomposition of your range, which self-tunes by splitting stolen tasks. You don't get the same visibility into whether or not the task you are doing was stolen from elsewhere when using GHC's sparks. -Edward Kmett On Tue, Sep 15

Re: [Haskell-cafe] instance Monad (Either String) in Prelude or Data.Either?

2009-09-12 Thread Edward Kmett
You could, but then you need overlapping instances to define the one in Control.Monad.Error. -Edward Kmett On Sat, Sep 12, 2009 at 4:26 PM, Henning Thielemann lemm...@henning-thielemann.de wrote: Evan Laforge schrieb: On Fri, Sep 11, 2009 at 6:10 AM, Edward Kmett ekm...@gmail.com wrote

Re: [Haskell-cafe] instance Monad (Either String) in Prelude or Data.Either?

2009-09-11 Thread Edward Kmett
about apomorphisms as a generalized anamorphism, parameterized on the either monad so it can be symmetrical to paramorphisms. In practice, you link in someone's code that links in the MTL, and then you're stuck using the MTL instance anyways. -Edward Kmett On Thu, Sep 10, 2009 at 9:03 PM, Evan

Re: [Haskell-cafe] Parallel parsing multicore

2009-09-09 Thread Edward Kmett
, and with a variation on a Dyck language monoid it can be extended to Haskell-style layout or parenthesis matching/lisp parsing by applying the same techniques at a higher level. -Edward Kmett On Wed, Sep 9, 2009 at 10:42 AM, Anakim Border akbor...@gmail.com wrote: Very interesting idea! I think the big

Re: [Haskell-cafe] Parallel parsing multicore

2009-09-09 Thread Edward Kmett
On Wed, Sep 9, 2009 at 12:16 PM, Don Stewart d...@galois.com wrote: ekmett: Hi Anakim, Nice to see someone else working in this space. I have also been working on a set of parallel parsing techniques, which can use small Parsec parsers for local context sensitivity. See the

Re: [Haskell-cafe] Parallel parsing multicore

2009-09-09 Thread Edward Kmett
of the superposition of states into a single state. I'm using this approach for parsing CDATA sections in XML monoidally, which has the same issue. -Edward Kmett On Wed, Sep 9, 2009 at 3:58 PM, Anakim Border akbor...@gmail.com wrote: Hi Edward, I read your slides a few weeks ago when they were posted

Re: [Haskell-cafe] How to calculate de number of digits of an integer? (was: Is logBase right?)

2009-08-29 Thread Edward Kmett
by walking the raw Integer internals you need to know the 'finger' size for the GMP for your platform, which isn't possible to do portably. -Edward Kmett On Wed, Aug 26, 2009 at 10:42 AM, Uwe Hollerbach uhollerb...@gmail.comwrote: Here's my version... maybe not as elegant as some, but it seems

Re: [Haskell-cafe] Applicative and Monad transformers

2009-08-26 Thread Edward Kmett
applicatively the applicative P_f 'future' parser can be used, but when you use it monadically the context sensitive parts are glued together using the monadic P_h 'history' parser. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Observations about foldM

2009-08-19 Thread Edward Kmett
. See the monoids library or my slides from hac-phi for lots of (ab)uses of a monoid's associativity. http://comonad.com/reader/2009/hac-phi-slides/ -Edward Kmett On Wed, Aug 19, 2009 at 10:32 AM, Eugene Kirpichov ekirpic...@gmail.comwrote: 2009/8/19 Dan Doel dan.d...@gmail.com: On Wednesday 19

Re: [Haskell-cafe] containers and maps

2009-08-13 Thread Edward Kmett
an efficient parallel/incremental lexer. I'll see about posting the slides afterwards. -Edward Kmett On Thu, Aug 13, 2009 at 4:43 PM, John Lato jwl...@gmail.com wrote: On Thu, Aug 13, 2009 at 1:51 PM, Jake McArthurjake.mcart...@gmail.com wrote: John Lato wrote: This might work with UVector (I

Re: [Haskell] memory management

2009-08-06 Thread Edward Kmett
based memory management [ http://portal.acm.org/citation.cfm?id=993040 , pre-print: http://www.elsman.com/retro.pdf], which I think has the right balance of optimism and pragmatism where it comes to region-based memory management and talks about many of these issues. -Edward Kmett On Thu, Aug 6

Re: [Haskell-cafe] Cyclic data declarations

2009-08-04 Thread Edward Kmett
and there are a lot of options to explore around here, so don't take any of this as the one and only way to implement a syntax ADT. =) -Edward Kmett On Sun, Aug 2, 2009 at 1:25 AM, Michal D. michal.dobrog...@gmail.comwrote: I'm in the process of writing a toy compiler but I'm having some trouble trying

Re: [Haskell-cafe] Why is there no Zippable class? Would this work?

2009-07-19 Thread Edward Kmett
On Fri, Jul 17, 2009 at 10:37 PM, por...@porg.es wrote: 2009/7/18 Edward Kmett ekm...@gmail.com: I wrote a short blog post on this: http://comonad.com/reader/2008/zipping-and-unzipping-functors/ and one on the less powerful dual operations (less powerful because while every Haskell Functor

Re: [Haskell-cafe] is closing a class this easy?

2009-07-17 Thread Edward Kmett
or fundep. -Edward Kmett On Fri, Jul 17, 2009 at 11:38 AM, Conor McBride co...@strictlypositive.orgwrote: Friends Is closing a class this easy? -- module Moo ( Public(..) ) where class Private x = Public x where blah :: ... class Private x where

Re: [Haskell-cafe] Why is there no Zippable class? Would this work?

2009-07-17 Thread Edward Kmett
/ and one on the less powerful dual operations (less powerful because while every Haskell Functor is strong, much fewer are costrong): http://comonad.com/reader/2008/cozipping/ -Edward Kmett On Thu, Jul 16, 2009 at 5:56 PM, Job Vranish jvran...@gmail.com wrote: I was needing a way to zip generic

Re: [Haskell-cafe] can there be (hash-table using) O(n) version of this (I think currently) n log n algo?

2009-07-17 Thread Edward Kmett
Haskell hash tables are a notorious performance pig, mostly due to the fact that when we deal with big arrays, if the mutable array changes at all the garbage collector will have to retraverse the entire thing during the next collection. Guess the most common scenario for imperative hash tables

Re: [Haskell-cafe] Haskell used for data analysis - OLAP?

2009-07-12 Thread Edward Kmett
having been masochistic enough to build an interface to something like ADO MD from Haskell. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Problems with nested Monads

2009-07-10 Thread Edward Kmett
and a pointed endofunctor. -Edward Kmett On Fri, Jul 10, 2009 at 11:34 AM, Job Vranish jvran...@gmail.com wrote: I'm trying to make a function that uses another monadic function inside a preexisting monad, and I'm having trouble. Basically my problem boils down to this. I have three monadic functions

Re: [Haskell-cafe] Removing polymorphism from type classes (viz. Functor)

2009-07-09 Thread Edward Kmett
containers in the 'monoids' package as Data.Generator that you might want to look at for ideas. -Edward Kmett On Tue, Jul 7, 2009 at 7:03 PM, George Pollard por...@porg.es wrote: Ok, so I have a small idea I'm trying to work on; call it a Prelude-rewrite if you want. For this I want to be able

Re: [Haskell-cafe] Alternative IO

2009-07-09 Thread Edward Kmett
Hrmm. This should probably be made consistent with the MonadPlus instance for IO, so empty = ioError (userError mzero) Otherwse, I'm surprised this isn't already in the standard library. I'd suggest submitting it to librar...@. -Edward Kmett On Thu, Jul 9, 2009 at 9:27 AM, Cristiano Paris

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-07-05 Thread Edward Kmett
be naturally selected for (++) _is_ ambiguous. Should it be mappend or mplus? Recall that in Haskell 1.4 (++) worked on MonadPlus and it was changed in the great monomorphism revolution of '98. -Edward Kmett On Sun, Jul 5, 2009 at 4:41 PM, Henning Thielemann lemm...@henning-thielemann.de wrote

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-07-02 Thread Edward Kmett
) where id = M mempty M a . M b = M (a `mappend` b) Attempting to go any further and railroad that type to equal m fails when you go to define id. So the categorical notion of a monoid is pretty much a non-starter in Haskell. -Edward Kmett On Another disadvantage of this approach

Re: [Haskell-cafe] Re: Flipping *-*-* kinds, or monadic finally-tagless madness

2009-07-02 Thread Edward Kmett
Actually the problem lies in your definition of fz, it has the wrong type to be used in lam. The Z you get out of fz as type Z b String, but you need it to have Z (a - b) String so that when you strip off the Z you have a Y String (a - b) matching the result type of lam. To get there replace your

Re: [Haskell-cafe] Flipping *-*-* kinds, or monadic finally-tagless madness

2009-07-02 Thread Edward Kmett
++ + ++ runPretty y vars ++ ) lam f = Pretty $ \ (v:vars) - (\\ ++ v ++ . ++ runPretty (f (var v)) vars ++ ) where var = Pretty . const app f x = Pretty $ \vars - ( ++ runPretty f vars ++ ++ runPretty x vars ++ ) -Edward Kmett On Thu, Jul 2, 2009 at 5:52 PM, Kim-Ee Yeoh

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-07-01 Thread Edward Kmett
I'm rather fond of the () suggestion, but would be happy with anything better than mappend! ;) -Ed On Wed, Jul 1, 2009 at 8:56 AM, Brent Yorgey byor...@seas.upenn.edu wrote: On Wed, Jul 01, 2009 at 12:00:50AM -0400, a...@spamcop.net wrote: G'day all. On Tue, Jun 30, 2009 at 08:02:48PM

Re: [Haskell-cafe] Re: Reflections on the ICFP 2009 programming contest

2009-06-30 Thread Edward Kmett
and to validate results, which was kind of nice. We implemented the VM itself independently in python and C to cross-check ourselves and I later put together a small VM-C compiler once we knew we had the implementation right. -Edward Kmett 2009/6/30 Eugene Kirpichov ekirpic...@gmail.com We implemented

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-06-30 Thread Edward Kmett
I love the idea, but its tricky to come up with one that is good that won't break a lot of user code that imports Data.Monoid unqualified. -Edward Kmett On Tue, Jun 30, 2009 at 12:45 PM, Bryan O'Sullivan b...@serpentine.comwrote: I've thought for a while that it would be very nice indeed

Re: [Haskell-cafe] Why is Bool no instance of Num and Bits?

2009-06-26 Thread Edward Kmett
the constraint is that any code that uses Bits polymorphically might have to pick up a Num annotation, but I can't see it being a serious problem. -Edward Kmett On Wed, Jun 24, 2009 at 8:13 AM, John Meacham j...@repetae.net wrote: On Fri, May 08, 2009 at 04:36:41PM +0200, Stephan Friedrichs wrote

Re: [Haskell-cafe] Runtime strictness analysis for polymorphic HOFs?

2009-06-19 Thread Edward Kmett
assembly for a possibly commercial project. I have only recently started trying to adapt my research to a more functional setting. If you hop on #haskell some time, I'd be happy to talk further. -Edward Kmett On Thu, Jun 18, 2009 at 12:30 PM, Max Bolingbroke batterseapo...@hotmail.com wrote

Re: [Haskell-cafe] Re: curious about sum

2009-06-18 Thread Edward Kmett
in terms of foldr, not foldl. And foldl is not strict enough for strict sum. Therefore the current choice in the worst of both worlds. I definitely agree with that sentiment. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Runtime strictness analysis for polymorphic HOFs?

2009-06-18 Thread Edward Kmett
is possible. -Edward Kmett On Sun, Jun 14, 2009 at 7:42 PM, Paul Chiusano paul.chius...@gmail.comwrote: Hello, I was recently trying to figure out if there was a way, at runtime, to do better strictness analysis for polymorphic HOFs, for which the strictness of some arguments might depend

Re: [Haskell-cafe] Non Empty List?

2009-06-04 Thread Edward Kmett
Monad Container where return = Single In general Jake's non-empty list is a little nicer because it avoids a useless [] constructor at the end of the list. -Edward Kmett On Thu, Jun 4, 2009 at 5:53 PM, GüŸnther Schmidt gue.schm...@web.de wrote: Hi, I need to design a container data

Re: [Haskell-cafe] Functors and the Visitor Pattern

2009-06-03 Thread Edward Kmett
that that style of translation can't account for (i.e. polymorphic recursion). -Edward Kmett On Wed, Jun 3, 2009 at 9:10 AM, Tom.Amundsen tomamund...@gmail.com wrote: So, last night, I was having this problem with my Java code where I couldn't figure out for the life of me how to write a piece

Re: [Haskell-cafe] ANN: new version of uu-parsinglib

2009-06-03 Thread Edward Kmett
of these.) +1 As a justification, (*) and () serve much the same purpose, and () is already exposed via Monad to permit the same kinds of optimizations that an explicit override of (*) proffers. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Binary I/O options

2009-04-24 Thread Edward Kmett
The only caveat I would mention about using Data.Binary is that it traverses lists twice to encode them. Once to determine the length and once to output the list. As a result you may see space-leak-like behavior when encoding very long lists with Data.Binary. -Edward Kmett On Fri, Apr 24, 2009

Re: [Haskell-cafe] Dynamically altering sort order

2009-04-24 Thread Edward Kmett
to force them all to agree on the type parameter s. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: Is 78 characters still a good option? Was: [Haskell-cafe] breaking too long lines

2009-04-21 Thread Edward Kmett
cut off point. -Edward Kmett On Tue, Apr 21, 2009 at 10:53 AM, Richard Kelsall r.kels...@millstream.comwrote: Dusan Kolar wrote: ... Or is the reason much deeper? Or, is the bound set to 78 characters just because it is as good number as any other? ... As a little historical detour I

Re: [Haskell] deriving Show for GADT?

2009-04-14 Thread Edward Kmett
I seem to recall Matt Morrow having some code lying around for automatically generating such instances using haskell-src-exts. I wonder how hard it would be to adapt to Template Haskell. -Edward Kmett On Tue, Apr 14, 2009 at 2:03 AM, Ryan Ingram ryani.s...@gmail.com wrote: You might be able

Re: [Haskell-cafe] Looking for the fastest Haskell primes algorithm

2009-04-14 Thread Edward Kmett
You might want to start with the Sieve of Atkin: http://en.wikipedia.org/wiki/Sieve_of_Atkin -Edward On Tue, Apr 14, 2009 at 8:40 AM, Niemeijer, R.A. r.a.niemei...@tue.nlwrote: Today I happened to need a large list of prime numbers. Obviously this is a well-known problem, so I figured there

Re: [Haskell-cafe] Re: Configuring cabal dependencies at install-time

2009-04-07 Thread Edward Kmett
, it would allow me to fix my 'expression problem'. Others could introduce dependencies on the easier to install library allowing me to shrink the library and I would be able to install in more environments. -Edward Kmett On Tue, Apr 7, 2009 at 9:20 AM, John Dorsey hask...@colquitt.org wrote: John

Re: [Haskell-cafe] advice on space efficient data structure with efficient snoc operation

2009-04-07 Thread Edward Kmett
all of the instances. -Edward Kmett On Tue, Apr 7, 2009 at 7:49 AM, Manlio Perillo manlio_peri...@libero.itwrote: Hi. I'm still working on my Netflix Prize project. For a function I wrote, I really need a data structure that is both space efficient (unboxed elements) and with an efficient

Re: [Haskell-cafe] Hackage not updating package list

2009-04-05 Thread Edward Kmett
. -Edward Kmett On Sun, Apr 5, 2009 at 12:47 PM, Don Stewart d...@galois.com wrote: johan.tibell: Hi, I just uploaded network-2.2.1. It appears on Hackage [1] but a `cabal update` followed by `cabal install network-2.2.1` results in: Resolving dependencies... cabal: There is no available

[Haskell] Re: [Haskell-cafe] ANNOUNCE: fad 1.0 -- Forward Automatic Differentiation library

2009-04-03 Thread Edward Kmett
more-limited-than-Num classes and only included the equivalent of your 'lift' and 'diffUU' operations, however. -Edward Kmett On Thu, Apr 2, 2009 at 10:28 PM, Bjorn Buckwalter bjorn.buckwal...@gmail.com wrote: I'm pleased to announce the initial release of the Haskell fad library, developed

[Haskell] Re: [Haskell-cafe] ANNOUNCE: fad 1.0 -- Forward Automatic Differentiation library

2009-04-03 Thread Edward Kmett
be somewhat more pedantic about the name. =) -Edward Kmett On Fri, Apr 3, 2009 at 10:49 AM, Barak A. Pearlmutter ba...@cs.nuim.iewrote: I feel silly, did not even notice that! Thanks for the pointer. Would be sensible to merge the functionalities; will try to import functionality

Re: [Haskell-cafe] ANNOUNCE: fad 1.0 -- Forward Automatic Differentiation library

2009-04-03 Thread Edward Kmett
more-limited-than-Num classes and only included the equivalent of your 'lift' and 'diffUU' operations, however. -Edward Kmett On Thu, Apr 2, 2009 at 10:28 PM, Bjorn Buckwalter bjorn.buckwal...@gmail.com wrote: I'm pleased to announce the initial release of the Haskell fad library, developed

Re: [Haskell-cafe] ANNOUNCE: fad 1.0 -- Forward Automatic Differentiation library

2009-04-03 Thread Edward Kmett
be somewhat more pedantic about the name. =) -Edward Kmett On Fri, Apr 3, 2009 at 10:49 AM, Barak A. Pearlmutter ba...@cs.nuim.iewrote: I feel silly, did not even notice that! Thanks for the pointer. Would be sensible to merge the functionalities; will try to import functionality

Re: [Haskell-cafe] Problem with prepose.lhs and ghc6.10.1

2009-04-03 Thread Edward Kmett
be usable. -Edward Kmett On Thu, Apr 2, 2009 at 11:59 AM, Henry Laxen nadine.and.he...@pobox.comwrote: Dear Group, I'm trying to read the paper: Functional Pearl: Implicit Configurations at http://www.cs.rutgers.edu/~ccshan/prepose/ and when running the code in prepose.lhs I get: ../haskell

<    1   2   3   4   5   >