Re: [Haskell-cafe] What class for splittable data / balanced-fold?

2013-09-30 Thread Jan-Willem Maessen
On Sun, Sep 29, 2013 at 9:13 PM, Ryan Newton rrnew...@gmail.com wrote: Thanks, that's interesting to know (re: Fortress). Interestingly, in my Fortress days we looked at both using a split-like interface and at a more foldMap / reduce - like interface, and it seemed like the latter worked

Re: [Haskell-cafe] What class for splittable data / balanced-fold?

2013-09-29 Thread Jan-Willem Maessen
if you've come up with an application that requires split itself, and that *isn't* zip. I recall we decided zip was better done with element-and-index iteration over one of the structures and indexing into the other since most tree structures don't actually zip properly anyway. -Jan-Willem

Re: [Haskell-cafe] Optimization flag changing result of code execution

2013-07-17 Thread Jan-Willem Maessen
This has all the marks of a 64-bit-only code running on a 32 bit machine. It looks like you're getting the high bits of the rng with a signed shift right, ultimately yielding only the sign bit. I suspect mwc-random needs to use Int64 rather than Int internally in a few critical places. On Wed,

Re: [Haskell-cafe] Defining a Strict language pragma

2012-11-06 Thread Jan-Willem Maessen
On Mon, Nov 5, 2012 at 5:52 PM, Johan Tibell johan.tib...@gmail.com wrote: The tricky part is to define the semantics of this pragma in terms of Haskell, instead of in terms of Core. While we also need the latter, we cannot describe the feature to users in terms of Core. The hard part is to

Re: [Haskell-cafe] strict version of Haskell - does it exist?

2012-01-30 Thread Jan-Willem Maessen
be tricky to bound the required sizes of inputs even if you know how much of the output you want (imagine a call to takeWhile or filter on an infinite list). -Jan-Willem Maessen Regards, Malcolm ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Question: Lazy Incremental Evaluation and Haskell?

2011-10-08 Thread Jan-Willem Maessen
-do rather too much computation (all of it, in particularly poor cases) compared to systems specifically tailored to self-adjustment. -Jan-Willem Maessen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo

Re: [Haskell-cafe] Robert Harper on monads and laziness

2011-05-03 Thread Jan-Willem Maessen
uu' = uu `addEquation` e This kind of thing happens all over the place in Haskell code -- it's a very natural coding style -- but if you want to preserve purity it's tough to compile without laziness. -Jan-Willem Maessen ___ Haskell

Re: [Haskell-cafe] Class constraints for associated type synonyms

2011-04-01 Thread Jan-Willem Maessen
On Thu, Mar 24, 2011 at 11:36 AM, Simon Peyton-Jones simo...@microsoft.com wrote: | class Monoid (GeneratorOf a) = Generable a where |   type GeneratorOf a :: * - * |   construct :: GeneratorOf a - a | | Now, it seems I need FlexibleInstances to do this when I'm using an | associated type

[Haskell-cafe] Class constraints for associated type synonyms

2011-03-23 Thread Jan-Willem Maessen
whenever I use associated types in my programs? -Jan-Willem Maessen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

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

2011-02-23 Thread Jan-Willem Maessen
On Wed, Feb 23, 2011 at 11:08 AM, Johan Tibell johan.tib...@gmail.com wrote: ... HashTable is not a concurrent data structure. You need e.g. a lock free mutable hash table. Good implementations of which are *not* thick on the ground. Even java.util.concurrent isn't fully lock-free. -Jan

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

2011-02-21 Thread Jan-Willem Maessen
caching sizes at nodes, one of which is to count overlap during union or intersection operations (since this involves counting leaves that are visited during these operations). -Jan-Willem Maessen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Misleading MVar documentation

2011-01-15 Thread Jan-Willem Maessen
and write primitives were prtty commonly used in Id programs. The take/put view can also usefully be thought of as a 1-element blocking channel. -Jan-Willem MAessen Thanks, Neil. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Guy Steele's Praise For Haskell @ Strange Loop Keynote

2011-01-15 Thread Jan-Willem Maessen
and Haskell-style classes rather than OO + generic typing. The Fortress type system actually approximates pattern matching in some interesting ways, but it's not the same. -Jan-Willem Maessen Experienced Fortress programmer (!) - Jake ___ Haskell

Re: [Haskell-cafe] Eta-expansion destroys memoization?

2010-10-07 Thread Jan-Willem Maessen
to unexpected space leaks (if you didn't intend to keep the list of fibs around forever). -Jan-Willem Maessen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Shared thunk optimization. Looking to solidify my understanding

2010-09-25 Thread Jan-Willem Maessen
optimization. Unoptimized call-by-need indeed evaluates (nthPrime 10) twice in test2, but only once in test1. (Challenge: prove observationl equivalence of these two fragments under call-by-need.) -Jan-Willem Maessen On Fri, Sep 24, 2010 at 5:58 PM, David Sankel cam...@gmail.com wrote: On Wed

Re: [Haskell-cafe] and from standard Prelude

2010-08-24 Thread Jan-Willem Maessen
they are fused using the RULES.* There's not really any benefit to inlining them otherwise, and it duplicates code. -Jan-Willem Maessen -- Live well, ~wren ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

Re: [Haskell-cafe] trees and pointers

2010-07-16 Thread Jan-Willem Maessen
of settings. It also offers really elegant implementations of union and unions. Whether that means they're quickish I leave to the benchmarkers. -Jan-Willem Maessen -- Live well, ~wren ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Speed of Error handling with Continuations vs. Eithers

2010-05-10 Thread Jan-Willem Maessen
that's rather unimportant compared to allocation time / memory footprint issues here. -Jan-Willem Maessen I implemented a ErrCPS monad which does exactly that, but the speed has been disappointing. It runs almost exactly 3x slower than a drop in replacement using the MonadError instance

Re: [Haskell-cafe] GHC vs GCC

2010-03-28 Thread Jan-Willem Maessen
On Sat, Mar 27, 2010 at 8:16 PM, Roman Leshchinskiy r...@cse.unsw.edu.auwrote: On 28/03/2010, at 01:36, Jan-Willem Maessen wrote: It's worth pointing out that there's a bit of bang-pattern mysticism going on in this conversation (which has not been uncommon of late!). A non-buggy

Re: [Haskell-cafe] Re: Are there any female Haskellers?

2010-03-28 Thread Jan-Willem Maessen
-Jan-Willem Maessen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] GHC vs GCC

2010-03-27 Thread Jan-Willem Maessen
the order of forcing of strict variables. Putting in bang patterns is a good idea to plug the obvious space leak when run without optimization, but isn't going to make a difference for optimizing compilation of obviously-strict functions. -Jan-Willem Maessen

Re: [Haskell-cafe] generalized newtype deriving allows the definition of otherwise undefinable functions

2010-03-09 Thread Jan-Willem Maessen
a = ...[internals go here]... Would this be enough to cue us that Set has a more interesting kind than just * - * ? -Jan-Willem Maessen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] generalized newtype deriving allows the definition of otherwise undefinable functions

2010-03-09 Thread Jan-Willem Maessen
On Mar 9, 2010, at 5:53 AM, Max Cantor wrote: Isn't this just an extension of the notion that multi-parameter typeclasses without functional dependencies or type families are dangerous and allow for type-naughtiness? I wondered the same thing, but came up with an analogous problematic

Re: [Haskell-cafe] Re: GHC's parallel garbage collector -- what am I doing wrong?

2010-03-07 Thread Jan-Willem Maessen
of the lightweight calls that Linux has added for the purpose). Obviously this has a cost if anyone falls out of the spin loop---and it's pretty likely some thread will have to wait a while. -Jan-Willem Maessen Cheers, Simon ___ Haskell-Cafe mailing

Re: [Haskell-cafe] vector stream fusion, inlining and compilation time

2010-03-07 Thread Jan-Willem Maessen
On Mar 4, 2010, at 9:05 PM, Roman Leshchinskiy wrote: On 05/03/2010, at 04:34, stefan kersten wrote: i've been hunting down some performance problems in DSP code using vector and the single most important transformation seems to be throwing in INLINE pragmas for any function that uses

Re: [Haskell-cafe] Seen on reddit: or, foldl and foldr considered slightly harmful

2010-02-11 Thread Jan-Willem Maessen
with a common interface (something like this one)? class Generator t e | t - e mapReduce :: (Monoid m) = t - (e - m) - m -Jan-Willem Maessen Another Fortress/Haskell crossover Greetings, Johann ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Map unionWith generalization

2010-01-27 Thread Jan-Willem Maessen
as one-liners. It's got a messy, ugly type signature, but it does everything you want as efficiently as you want.* -Jan-Willem Maessen * Actually, this is only true if you add the key as an argument to the third function, so that you can also encode unionWithKey etc! I've skipped that here

Re: [Haskell-cafe] Map unionWith generalization

2010-01-27 Thread Jan-Willem Maessen
On Jan 27, 2010, at 9:42 AM, Hans Aberg wrote: On 27 Jan 2010, at 14:56, Jan-Willem Maessen wrote: So here, one would want: (a - c) - (b - c) - (a - b - c) - Map k a - Map k b - Map k c where the two first functions are applied when the first or second key is missing. Ah, the swiss

Re: [Haskell-cafe] Map unionWith generalization

2010-01-27 Thread Jan-Willem Maessen
On Jan 27, 2010, at 10:54 AM, Hans Aberg wrote: On 27 Jan 2010, at 16:33, Jan-Willem Maessen wrote: I'm not sure why you want to throw in functions between maps in the two first arguments. Then there is no requirement that single keys are preserved. But it is a good idea to have

Re: [Haskell-cafe] Boxed Mutable Arrays

2009-12-16 Thread Jan-Willem Maessen
-Willem Maessen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

Re: [Haskell-cafe] Structural sharing in haskell data structures?

2009-05-14 Thread Jan-Willem Maessen
On May 13, 2009, at 6:58 PM, wren ng thornton wrote: Jan-Willem Maessen wrote: I wanted to clear up one misconception here... wren ng thornton wrote: In heavily GCed languages like Haskell allocation and collection is cheap, so we don't mind too much; but in Java and the like, both

Re: [Haskell-cafe] Structural sharing in haskell data structures?

2009-05-14 Thread Jan-Willem Maessen
On May 14, 2009, at 10:17 AM, Duncan Coutts wrote: On Thu, 2009-05-14 at 09:03 -0400, Jan-Willem Maessen wrote: Hmm, I think neither of the data structures you name actually support both O(lg n) indexing and O(lg n) cons or append. That said, your point is well taken, so let's instead state

Re: [Haskell-cafe] Structural sharing in haskell data structures?

2009-05-14 Thread Jan-Willem Maessen
On May 14, 2009, at 11:01 AM, Dan Doel wrote: On Thursday 14 May 2009 9:03:30 am Jan-Willem Maessen wrote: Hmm, I think neither of the data structures you name actually support both O(lg n) indexing and O(lg n) cons or append. That said, your point is well taken, so let's instead state

Re: [Haskell-cafe] Numeric Prelude and identifiers (Was: fad 1.0 -- Forward AutomaticDifferentiation library)

2009-04-05 Thread Jan-Willem Maessen
programs would become readable? And as a special bonus, though it may offend your sensibilities, numeric prelude programs might be able to use unqualified import in certain circumstances? -Jan-Willem Maessen [For each language, its own idiom

Re: [Haskell-cafe] Elegant powerful replacement for CSS

2009-02-04 Thread Jan-Willem Maessen
in progress, but there's a description and pointer to talk slides here: http://www.eecs.berkeley.edu/~lmeyerov/#projects Presumably their forthcoming HotPar paper will yield more details. -Jan-Willem Maessen On Feb 3, 2009, at 2:39 PM, Conal Elliott wrote: [Spin-off from the haskell-cafe

Re: [Haskell-cafe] ANN: HLint 1.2

2009-01-12 Thread Jan-Willem Maessen
, and humans get wrong. Surely it wouldn't be that hard for GHC to transform self recursion in this way (possibly subject to the condition that the result be worth inlining)? [phc did this, and I think it was inherited from Lennart's program transformations.] -Jan-Willem Maessen

Re: [Haskell-cafe] ANN: HLint 1.2

2009-01-12 Thread Jan-Willem Maessen
On Jan 12, 2009, at 12:47 PM, Max Bolingbroke wrote: 2009/1/12 Jan-Willem Maessen jmaes...@alum.mit.edu: On Jan 12, 2009, at 9:01 AM, Duncan Coutts wrote: No because the current definition are recursive and ghc cannot inline recursive functions. Then the map can be inlined

Re: [Haskell-cafe] Comparing on multiple criteria

2008-12-21 Thread Jan-Willem Maessen
that there is no documentation of any kind at all for the Monoid instance of Ordering; how were we supposed to know this behavior existed in the first place, except by hunting down the source code for the instance declaration? -Jan-Willem Maessen ___ Haskell-Cafe mailing

Re: Re[2]: [Haskell-cafe] implementing python-style dictionary in Haskell

2008-11-18 Thread Jan-Willem Maessen
be worth trying. Understanding the current GC strategy would make it easier to make the right tradeoffs here; we expect n insertions will touch O(n) subtables, so repeated insertion will make life worse if we're not careful. -Jan-Willem Maessen plus check GC times for every version: +RTS

Re: [Haskell-cafe] number of references to a variable

2008-11-01 Thread Jan-Willem Maessen
detector.] -Jan-Willem Maessen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Haskell on the JVM

2008-10-12 Thread Jan-Willem Maessen
On Oct 12, 2008, at 6:19 AM, Jon Harrop wrote: On Saturday 11 October 2008 17:45:39 John A. De Goes wrote: I have strong interest in hosting GHC on the JVM. And I suspect it would be good for the Haskell community, as the JVM already runs on nearly every machine known to man, has a wealth of

Re: Re[2]: [Haskell-cafe] Pure hashtable library

2008-08-28 Thread Jan-Willem Maessen
On Aug 27, 2008, at 4:31 PM, Bulat Ziganshin wrote: Hello Jan-Willem, Wednesday, August 27, 2008, 4:06:11 PM, you wrote: One obvious way to make non-modifiable hash tables useful is to eat your own tail non-strictly--- aggregate a set of hash table entries, construct a hash table from them,

Re: [Haskell-cafe] Pure hashtable library

2008-08-27 Thread Jan-Willem Maessen
On Aug 27, 2008, at 3:41 AM, Bulat Ziganshin wrote: Hello haskell-cafe, solving one more task that uses English dictionary, i've thought: why we don't yet have pure hashtable library? There is imperative hashtables, pretty complex as they need to rebuild entire table as it grows. There

Re: [Haskell-cafe] Data.Complex.magnitude slow?

2008-07-20 Thread Jan-Willem Maessen
Double# - Int64#... -Jan-Willem Maessen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Announce: Fortress talk in New York City

2008-06-13 Thread Jan-Willem Maessen
http://projectfortress.sun.com/Projects/Community Let me assure the readers there's nothing confidential or privileged about Christine's talk! :-) It is, after all, an open source project. -Jan-Willem Maessen Project Fortress, Sun Microsystems Laboratories [who will be off teaching Fortress

Re: [Haskell-cafe] Design your modules for qualified import

2008-06-06 Thread Jan-Willem Maessen
Haskell code: Haskell modules are not ML modules. -Jan-Willem Maessen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Design your modules for qualified import

2008-06-06 Thread Jan-Willem Maessen
On Jun 6, 2008, at 12:54 PM, Henning Thielemann wrote: On Fri, 6 Jun 2008, Achim Schneider wrote: Jan-Willem Maessen [EMAIL PROTECTED] wrote: There's one caveat: Always choose descriptive names, even if you are assuming that you will usually use a qualified import. The following

Re: [Haskell-cafe] lookup tables style guidelines

2008-04-26 Thread Jan-Willem Maessen
On Apr 26, 2008, at 7:41 AM, Adrian Hey wrote: Jan-Willem Maessen wrote: On Apr 24, 2008, at 11:33 AM, Adrian Hey wrote: Also, if you're likely to be using union/intersection a lot you should know that Data.Map/Set are very slow for this because they use the not efficient hedge algorithm

Re: [Haskell-cafe] lookup tables style guidelines

2008-04-25 Thread Jan-Willem Maessen
/IntMap of course the split structure of the tree is fixed (we can think of these as being compressed versions of a complete binary tree) and union and intersection are quite efficient. -Jan-Willem Maessen ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Stronger STM primitives needed? Or am I just doing it wrong?

2008-04-23 Thread Jan-Willem Maessen
to decide whether either of these is implementable in terms of `orElse`, in such a way that we immediately check the predicate upon retry before doing anything else. I can't quite make up my mind whether this is possible or not. -Jan-Willem Maessen -- ryan

Re: [Haskell-cafe] compressed pointers?

2008-04-16 Thread Jan-Willem Maessen
On Apr 16, 2008, at 4:45 AM, Ketil Malde wrote: I notice BEA uses something called compressed pointers to get the 64-bit (more registers, etc) benefits without paying the (cache-thrashing) cost. But only if you're not *actually* using a 64-bit address space. From their own documentation:

Re: [Haskell-cafe] floating point operations and representation

2008-03-13 Thread Jan-Willem Maessen
? A candidate for standardization, surely? -Jan-Willem Maessen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] STAMP benchmark in Haskell?

2008-03-02 Thread Jan-Willem Maessen
a better/different benchmark suite for STM? Good question. Because we tend to eschew mutable state in Haskell, I'd expect the characteristics of such an application to be *very* different. -Jan-Willem Maessen Thanks, Tom [1] http://openquark.org/Open_Quark/Welcome.html [2] http

Re: [Haskell-cafe] Re: fast graph algorithms without object identities

2008-02-26 Thread Jan-Willem Maessen
of whenever-I-get-time, along with generic splittable supplies. Note that getting the laziness right is somewhat tricky. -Jan-Willem Maessen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell-cafe] Designing DSL with explicit sharing [was: I love purity, but it's killing me]

2008-02-15 Thread Jan-Willem Maessen
. -Jan-Willem Maessen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] A question about monad laws

2008-02-12 Thread Jan-Willem Maessen
floating value for infinity (exploiting IEEE arithmetic in a simple, easily- understood way). If I'm right, it probably wasn't intended to be used as a Rational at all, nor to be exploited by user code. -Jan-Willem Maessen ___ Haskell-Cafe mailing

Re: [Haskell-cafe] fast graph algorithms without object identities

2008-02-01 Thread Jan-Willem Maessen
On Feb 1, 2008, at 9:41 AM, Alfonso Acosta wrote: You'd probably be interested to read http://www.cs.chalmers.se/~koen/pubs/entry-asian99-lava.html It is indeed an interesting paper (that I've read and referred to several times over the years). But it's tricky to get right in practice!

Re: [Haskell-cafe] fast graph algorithms without object identities

2008-01-31 Thread Jan-Willem Maessen
contains a reference, or that they are densely numbered, so we end up having to look them up in some fashion (though using a hash table can be reasonably quick if we uniquely number nodes). -Jan-Willem Maessen ___ Haskell-Cafe mailing list Haskell-Cafe

Re: The programming language market (was Re: [Haskell-cafe] Why functional programming matters

2008-01-28 Thread Jan-Willem Maessen
. If you want to hear an entertaining story some day, ask me in person about my Ph.D. thesis defense. -Jan-Willem Maessen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Why functional programming matters

2008-01-24 Thread Jan-Willem Maessen
of systems where read barriers are nearly free. Better still, everything that's been learned about and published in Java-land carries across to Haskell (though the tradeoffs in eg mutation behavior are often different). -Jan-Willem Maessen

[Haskell-cafe] Re: [Haskell] IVar

2007-12-05 Thread Jan-Willem Maessen
On Dec 5, 2007, at 3:58 AM, Simon Marlow wrote: Jan-Willem Maessen wrote: Consider this: do x - newIVar let y = readIVar x writeIVar x 3 print y (I wrote the let to better illustrate the problem, of course you can inline y if you want). Now suppose the compiler decided

Re: [Haskell-cafe] A tale of Project Euler

2007-11-29 Thread Jan-Willem Maessen
On Nov 29, 2007, at 6:19 PM, Stefan O'Rear wrote: On Thu, Nov 29, 2007 at 09:10:16PM +, Andrew Coppin wrote: Sebastian Sylvan wrote: On Nov 29, 2007 6:43 PM, Andrew Coppin [EMAIL PROTECTED] wrote: I don't understand the ST monad. ...[and ST uses language extensions Andrew doesn't

Re: [Haskell-cafe] isWHNF :: a - IO Bool ?

2007-09-27 Thread Jan-Willem Maessen
) then removingIndirections (ptrs closureData ! 0) else k a simpleIsWHNF :: a - IO Boolean simpleIsWHNF = fmap (isConstr . tipe) . getClosureData isWHNF = removingIndirections simpleIsWHNF -Jan-Willem Maessen ___ Haskell-Cafe

Re: [Haskell-cafe] transparent parallelization

2007-09-18 Thread Jan-Willem Maessen
, though the fundamental use of a foldP- like operation hasn't changed over time). -Jan-Willem Maessen Longtime Haskell Hacker Fortress Library Developer PS - By the way, working on Generators has increased my suspicion that comprehensions do NOT have a naturally monadic structure (which

Re: [Haskell-cafe] Dynamic thread management?

2007-08-13 Thread Jan-Willem Maessen
. On 8/13/07, Jan-Willem Maessen [EMAIL PROTECTED] wrote: The problem here is that while Cilk spawns are incredibly cheap, they're still more than a simple procedure call (2-10x as expensive if my fading memory serves me rightly). Let's imagine we have a nice, parallelizable computation that we've

Re: [Haskell-cafe] Dynamic thread management?

2007-08-13 Thread Jan-Willem Maessen
. For the latter problem there simply is no magic bullet. -Jan-Willem Maessen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Dynamic thread management?

2007-08-10 Thread Jan-Willem Maessen
using only 1 thread, you can expect to wait a long time for simulation results. Also, these things tend to require an awful lot of care and feeding. [Full disclosure: I don't personally work with Simics or its ilk, but my colleagues do.] -Jan-Willem Maessen

Re: [Haskell-cafe] A probably-stupid question about a Prelude implementation.

2007-06-22 Thread Jan-Willem Maessen
if it finds a zero. z is a left zero of op if for all x, z `op` x = z. This isn't the only time foldr will terminate early, but it is an important one. -Jan-Willem Maessen Dan smime.p7s Description: S/MIME cryptographic signature ___ Haskell-Cafe

Re: [Haskell-cafe] String Hashing

2007-06-18 Thread Jan-Willem Maessen
the result was faster than Data.Map, but not by much, and using strings probably wipes out that advantage vs. tries. -Jan-Willem Maessen smime.p7s Description: S/MIME cryptographic signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Finding points contained within a convex hull.

2007-06-07 Thread Jan-Willem Maessen
in each dimension, you should be able to do this using linear programming. This will yield non-integer coordinate bounds which you can narrow as appropriate. -Jan-Willem Maessen smime.p7s Description: S/MIME cryptographic signature

Re: [Haskell-cafe] Re: Frisby grammars that have context

2007-05-30 Thread Jan-Willem Maessen
maintained a symbol table and looked up expression occurrences in it as you parsed). That said, I wouldn't necessarily try to structure my parser that way. -Jan-Willem Maessen smime.p7s Description: S/MIME cryptographic signature ___ Haskell-Cafe mailing

Re: [Haskell-cafe] Language extensions

2007-05-28 Thread Jan-Willem Maessen
of all sorts, by the way. -Jan-Willem Maessen smime.p7s Description: S/MIME cryptographic signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] New HaskODell user groups

2007-04-27 Thread Jan-Willem Maessen
like the Diesel in Davis Sq. I've given this a teensy bit of thought, but I've had too many other fish to fry lately. :-) -Jan-Willem Maessen On Apr 27, 2007, at 11:22 AM, Seth Gordon wrote: Donald Bruce Stewart wrote: P.S. Some obvious user group candidates, in my opinion, would

[Haskell-cafe] Re: [Haskell] ANN: Data.Proposition 0.1

2007-04-18 Thread Jan-Willem Maessen
. The concurrency + unsafePerformIO mix was trickier than I initially expected, too. That said, this BDD implementation is pretty similar to the performance behavior you'd get from Data.IntSet (where the bits of your int correspond to the True/False values of your variables). -Jan-Willem

Re: [Haskell-cafe] Weaving fun

2007-04-13 Thread Jan-Willem Maessen
On Apr 12, 2007, at 9:39 PM, Matthew Brecknell wrote: Jan-Willem Maessen: Interestingly, in this particular case what we obtain is isomorphic to constructing and reversing a list. Jan-Willem's observation also hints at some interesting performance characteristics of difference lists. It's

Re: [Haskell-cafe] Re: [Haskell] Fixpoint combinator without recursion

2007-04-04 Thread Jan-Willem Maessen
the same bug, for much the same reason). -Jan-Willem Maessen Edsko ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe smime.p7s Description: S/MIME cryptographic signature

Re: [Haskell-cafe] idea for avoiding temporaries

2007-03-09 Thread Jan-Willem Maessen
job with Fortress we are looking at RULES-like approaches, but they founder quickly because the kind of problems David is trying to solve are 90% of what our programmers want to do. -Jan-Willem Maessen ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Re: Article review: Category Theory

2007-01-19 Thread Jan-Willem Maessen
('.') are not internalized correctly in Haskell. And this is why some of us think that adding polymorphic seq to Haskell was a mistake. :( I've often wondered why seq is the primitive and not $! Would this solve the problem? Sadly, no: seq = (const id $!) -Jan-Willem Maessen Is there any solution that would

Re: Stronger static types, was Re: [Haskell-cafe] Re: Versioning

2006-12-22 Thread Jan-Willem Maessen
with * somehow). -Jan-Willem Maessen [PS: hadn't seen the LNCS reference before, thanks to Jacques for sending that along.] smime.p7s Description: S/MIME cryptographic signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Re: Debugging partial functions by the rules

2006-11-15 Thread Jan-Willem Maessen
them as you go. I'm quite enjoying the escH paper, but I get through about a column per day between compiles. :-) -Jan-Willem Maessen smime.p7s Description: S/MIME cryptographic signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: non-total operator precedence order (was:Fractional/negative fixity?)

2006-11-10 Thread Jan-Willem Maessen
. Thus one single bad declaration can tear a gaping hole into an otherwise perfectly nice and consistent DAG of precedence order relations, possibly invalidating a whole lot of code. Requiring parenthesization solves these problems in a stroke. -Jan-Willem Maessen who can't reliably

Re: [Haskell-cafe] function result caching

2006-10-13 Thread Jan-Willem Maessen
in an amortized sense. -Jan-Willem Maessen Perhaps I would be possible to use some trick to rebalance an existing tree to account for what's currently evaluated. But it could be very tricky to get it right and it would certainly go beyond Haskell 98. Best regards Tomasz

Re: [Haskell-cafe] Traversing a graph in STM

2006-09-19 Thread Jan-Willem Maessen
On Sep 18, 2006, at 4:47 AM, Einar Karttunen wrote: On 18.09 01:23, Josef Svenningsson wrote: On 9/17/06, Jan-Willem Maessen [EMAIL PROTECTED] wrote: You can associate a unique name with each traversal, and store a set of traversals at each node (instead of a mark bit). But this set grows

Re: [Haskell-cafe] Traversing a graph in STM

2006-09-17 Thread Jan-Willem Maessen
to concurrently traverse a graph, you need to keep separate cycle-avoidance state for each traversal. Using TVars doesn't change that basic algorithmic detail. And is there a better way of getting TVar identity than StableNames? Would that there were! -Jan-Willem Maessen - Einar Karttunen

Re: [Haskell-cafe] Why does this program eat RAM?

2006-09-13 Thread Jan-Willem Maessen
. -Jan-Willem Maessen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe smime.p7s Description: S/MIME cryptographic signature ___ Haskell-Cafe

Re: [Haskell-cafe] practice problems?

2006-09-03 Thread Jan-Willem Maessen
multiplication algorithm turns out to be exciting. :-) -Jan-Willem Maessen smime.p7s Description: S/MIME cryptographic signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] multiple computations, same input

2006-03-28 Thread Jan-Willem Maessen
On Mar 28, 2006, at 1:02 AM, Tomasz Zielonka wrote: On Mon, Mar 27, 2006 at 03:10:18PM -0800, Greg Fitzgerald wrote: hold a part of the data in memory while you show the first one, Here would be a better example then. f lst = show (sum (filter ( 1) lst), sum (filter ( 2) lst)) It

Re: [Haskell-cafe] Positive integers

2006-03-27 Thread Jan-Willem Maessen
intervals). That said, I don't try to do everything at the type level---it became too tiring, with not enough plausible benefit. Any and all: Drop me a line if you are interested, it's a stack of 3-4 modules and at best half-baked. I'd just gotten a mostly- complete version. -Jan-Willem

Re: [Haskell-cafe] Badly designed Parsec combinators?

2006-02-17 Thread Jan-Willem Maessen
for ignore. I can see taste arguments in either direction, but really the language ought to pick an alternative and use it everywhere (including for ). -Jan-Willem Maessen John -- John Meacham - ⑆repetae.net⑆john⑈ ___ Haskell-Cafe mailing

Re: [Haskell-cafe] Re: Hashtable woes

2006-02-15 Thread Jan-Willem Maessen
On Feb 15, 2006, at 3:42 AM, Ketil Malde wrote: Not sure how relevant this is, but I see there is a recently released hash library here that might be a candidate for FFIing? https://sourceforge.net/projects/goog-sparsehash/ The real issue isn't the algorithms involved; I saw the best

Re: [Haskell-cafe] Re[2]: strict Haskell dialect

2006-02-05 Thread Jan-Willem Maessen
as work on the type system etc? I would answer resoundingly that there is still a good deal to learn / perfect in the compilation technology, but there's been a lack of manpower/funding to make it happen. -Jan-Willem Maessen Regards, Brian

Re: [Haskell-cafe] Re[2]: strict Haskell dialect

2006-02-04 Thread Jan-Willem Maessen
On Feb 3, 2006, at 8:16 PM, Brian Hulley wrote: Jan-Willem Maessen wrote: I pointed out some problems with strict Haskell in a recent talk, but I think it'd be worth underscoring them here in this forum. Is the text of this talk or points raised in it available online anywhere? snip

Re: [Haskell-cafe] Re[2]: strict Haskell dialect

2006-02-03 Thread Jan-Willem Maessen
. The use of lists as generators would need to be re-thought (and probably discarded), idioms involving infinite lists would have to go, etc., etc. But this is a simple matter of libraries (well, and which type(s) get(s) to use square brackets as special builtin notation). -Jan-Willem

Re: [Haskell-cafe] Re: Haskell Speed

2006-01-04 Thread Jan-Willem Maessen
On Jan 4, 2006, at 5:30 AM, Simon Marlow wrote: On 30 December 2005 01:23, Jan-Willem Maessen wrote: Probably. The minimum table chunk size was rather large. I have been experimenting (tests are running even as I type) with alternate implementations of Data.HashTable. So far the winning

Re: [Haskell-cafe] Progress on shootout entries

2006-01-04 Thread Jan-Willem Maessen
splitAtAndReverseAppend... -Jan-Willem Maessen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Progress on shootout entries

2006-01-03 Thread Jan-Willem Maessen
I was surprised to learn that indexed insertion: permutations (x:xs) = [insertAt n x perms | perms - permutations xs, n - [0..length xs] ] insertAt :: Int - a - [a] - [a] insertAt 0 y xs = y:xs insertAt n y (x:xs) = x:(insertAt (n-1) y xs) was faster than the

Re: [Haskell-cafe] Re: Haskell Speed

2005-12-29 Thread Jan-Willem Maessen
tried thus far. I need to get distribution clearance for a bunch of this code from my employer, and figure out how to package it. The latter may be tricky, as Data.Hashtable is currently rather intimately tied to a bunch of rather tricky bits of GHC. -Jan-Willem Maessen Second

Re: [Haskell-cafe] Can't Haskell catch up with Clean's uniqueness typing?

2005-12-07 Thread Jan-Willem Maessen
arrays. Copying such structures is terribly expensive, or even impossible (imagine copying a 1PB array). I'd think hard before I used them for, say, cons cells. Shae: All this is very, very different from eager / optimistic evaluation. -Jan-Willem Maessen

Re: [Haskell-cafe] Records (was Re: [Haskell] Improvements to GHC)

2005-11-17 Thread Jan-Willem Maessen
generally opposed to wasting good operator and function names as well as syntactic sugar of any kind on a /concrete/ data type, and especially not for stacks aka lists. Would you be happier if it were the yield operator for iterators? Yours lazily, Jan-Willem Maessen Just my 2 cent. Ben

Re: [Haskell-cafe] Re: FPS: Finalizers not running (was Memoryusageoutside of the Haskell heap)

2005-11-10 Thread Jan-Willem Maessen
On Nov 9, 2005, at 4:46 AM, Ketil Malde wrote: Sebastian Sylvan wrote: On 11/8/05, Jan-Willem Maessen [EMAIL PROTECTED] wrote: Just wanted to let people know that I've been working on improving Data.HashTable, with the help of Ketil Malde's badly performing code Always happy to help

  1   2   >