Re: [Haskell-cafe] out of core computing in haskell

2007-08-13 Thread David Roundy
In the second case, if your numerical data is just a big array, why not just mmap it? Unless you're running on a 32 bit machine, or have a *seriously* large amount of data, that seems like the easiest option. Although if you're talking about mutable data, that's a whole 'nother can of worms... but

Re: [Haskell-cafe] Re: Explaining monads

2007-08-13 Thread David Roundy
; return (x*x); } in any monad you like, and you'll find that regardless of the *data* dependencies (the return value of this monadic action is unambiguous), the undefined is evaluated *before* the value 4 is returned. -- David Roundy Department of Physics Oregon State University

Re: [Haskell-cafe] Haskell on the Playstation 3? :-)

2007-08-30 Thread David Roundy
and human-readable. It'd be much nicer to do this in Haskell. -- David Roundy http://www.darcs.net ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] let and fixed point operator

2007-08-30 Thread David Roundy
... If you enable -Wall, ghc will warn you about this, provided that x was already bound in this context. -- David Roundy http://www.darcs.net ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Building production stable software in Haskell

2007-09-11 Thread David Roundy
types can help a lot in preventing space leaks, but can't always solve the problems. I long for a Data.Map.Strict, for instance, because it's so hard to use Data.Map without producing memory leaks... -- David Roundy Department of Physics Oregon State University

Re: [Haskell-cafe] Re: getting crazy with character encoding

2007-09-13 Thread David Roundy
The problem is that the type of openFile and getArgs is wrong, so there's no right way to get a Handle (other than stdin) to read from in the first place, unless we're willing to allow the current weird behavior of treating a [Char] as [Word8]. -- David Roundy Department of Physics Oregon State University

Re: [Haskell-cafe] Building production stable software in Haskell

2007-09-16 Thread David Roundy
I mean. -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Building production stable software in Haskell

2007-09-17 Thread David Roundy
obscure packages that perhaps have no code review, and perhaps have no users other than the author. -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo

Re: [Haskell-cafe] Building production stable software in Haskell

2007-09-17 Thread David Roundy
Data.Map.*). -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Building production stable software in Haskell

2007-09-17 Thread David Roundy
On Mon, Sep 17, 2007 at 04:50:13PM +0100, Ian Lynagh wrote: On Mon, Sep 17, 2007 at 07:54:02AM -0700, David Roundy wrote: cabal-install may help, but what I'd really want is packaging in debian. That's my (biased, because I used debian) standard of a maintained, useful library. It's

Re: [Haskell-cafe] Building production stable software in Haskell

2007-09-17 Thread David Roundy
know what type class interface would be best. But until one of them is generally accepted, I'm not likely to learn to use either of them. -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Building production stable software in Haskell

2007-09-17 Thread David Roundy
On Mon, Sep 17, 2007 at 07:38:00PM +0100, Malcolm Wallace wrote: David Roundy [EMAIL PROTECTED] writes: Data.Map is a standardized interface, *not* a standardized implementation. I'm not saying it's a *good* standardized interface, but it's the only one we've got. Not so

Re: [Haskell-cafe] unsafePerformIO: are we safe?

2007-09-26 Thread David Roundy
to use them safely). The general rule with unsafe functions is that if you don't understand what's required to use them safely, you shouldn't use them. -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] pi

2007-10-10 Thread David Roundy
to define a buggy atan at all and leave it undefined would have the same result as when there is no default for pi. -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org

Re: [Haskell-cafe] Re: pi

2007-10-10 Thread David Roundy
it's with the transcendental functions, and is implemented in terms of those transcendental functions. Where is the abomination here? -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: pi

2007-10-10 Thread David Roundy
On Wed, Oct 10, 2007 at 08:53:22PM +0200, Henning Thielemann wrote: On Wed, 10 Oct 2007, David Roundy wrote: It seems that you're arguing that (**) is placed in the correct class, since it's with the transcendental functions, and is implemented in terms of those transcendental functions

Re: [Haskell-cafe] Re: pi

2007-10-10 Thread David Roundy
On Wed, Oct 10, 2007 at 10:32:55PM +0200, Henning Thielemann wrote: On Wed, 10 Oct 2007, David Roundy wrote: I think it's quite sensible, for instance, that passing a negative number as the first argument of (**) with the second argument non-integer leads to a NaN. It would better

Re: [Haskell-cafe] Re: pi

2007-10-10 Thread David Roundy
don't know it's better to use (^) or (^^). -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] [EMAIL PROTECTED]: darcs patch: fix typo in docs.]

2007-10-11 Thread David Roundy
PROTECTED] To: [EMAIL PROTECTED] You are not allowed to post to this mailing list, and your message has been automatically rejected. If you think that your messages are being rejected in error, contact the mailing list owner at [EMAIL PROTECTED] To: [EMAIL PROTECTED] From: David Roundy [EMAIL

Re: Laziness (was: [Haskell-cafe] Performance problem with random numbers)

2007-10-15 Thread David Roundy
timing. But we've also still clearly got some seriously painful loop overhead. :( -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Automatic file closing after readFile

2007-10-18 Thread David Roundy
the one in IO.Error. You want the bracket defined in Control.Exception. -- David Roundy Department of Physics Oregon State University signature.asc Description: Digital signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

[Haskell-cafe] string literals and haskell'

2007-10-22 Thread David Roundy
. to treat string literals with '\\' followed by a character that doesn't describe an escape as a literal backslash? It makes the rules a bit more complicated, but doesn't modify the meaning of any currently-legal code, and removes a potential error. -- David Roundy Department of Physics Oregon State

Re: [Haskell-cafe] OS Abstraction module??

2007-10-23 Thread David Roundy
On Mon, Oct 22, 2007 at 09:44:11PM -0500, Galchin Vasili wrote: Hi Ryan, Thanks for your generous response. By the way, you don't want to use typeclasses here; they solve the problem of having more than one possible interface at runtime, whereas you only care about compile-time .. in

Re: [Haskell-cafe] OS Abstraction module??

2007-10-23 Thread David Roundy
of your code work, ifdefs or not. You would, at least, know that the Windows-specific Haskell bindings themselves compile. I don't think this is worth the ugliness, but it is something anyhow. -- David Roundy Department of Physics Oregon State University

Re: [Haskell-cafe] Letting the darcs test fail, if QuickCheck tests fail

2007-10-30 Thread David Roundy
is pretty much copied from the code of QuickCheck 1, with tracking of errors added in. It's ugly, but it's only a few dozen lines. Another option would be to grep the output of the test suite to look for failure. -- David Roundy Department of Physics Oregon State University

Re: [Haskell-cafe] Monte Carlo Pi calculation (newbie learnings)

2007-11-05 Thread David Roundy
to think backwards to figure out what the comprehension is doing. -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Memory-mapped arrays? (IArray interfaces, slices, and so on)

2007-11-08 Thread David Roundy
as IArrays (e.g. to access /usr/share/dict/words). So it seems reasonable that the mutable version would necesarily be primary, with the IArray version accessible only by an unsafe operation. -- David Roundy Department of Physics Oregon State University

Re: [Haskell-cafe] Some More Sinus Results

2007-11-10 Thread David Roundy
code is broken, and no sin function is going to fix it. -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] let vs. where

2007-11-13 Thread David Roundy
... in ... listLen ... it's just that you don't want to mix let and where clauses, because then things get confusing. Even if it worked with both, noone would know the binding rules. -- David Roundy Department of Physics Oregon State University

Re: [Haskell-cafe] Renaming constructors for readability

2007-11-13 Thread David Roundy
'? It wouldn't work in pattern matching. -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Using Data.Binary for compression

2007-11-15 Thread David Roundy
that's amenable to this. Any thoughts on speeding this up while keeping the interface reasonably clean would be much appreciated. I think a monad as above would have the advantage of separating the implementation from the interface, which should make it tuneable. -- David Roundy Department

Re: [Haskell-cafe] Chart plotting libraries

2007-11-15 Thread David Roundy
(but somewhat less flexible), if anyone's interested (Tim wasn't). My API is closer in complexity (of use) to matlab's plotting. -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Using Data.Binary for compression

2007-11-15 Thread David Roundy
data is? But bit stream operations (and data compression) are seriously cool in any case, so I hope you'll go ahead with this! -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Chart plotting libraries

2007-11-16 Thread David Roundy
. -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Stream fusion for Hackage

2007-11-19 Thread David Roundy
this with darcs. Right now we're using (in the unstable branch) our own list type so we can use type witnesses. I look forward to making this as efficient as the built-in lists (or more efficient?) one of these days... (and I've no suggestions on the namespace question). -- David Roundy

Re: [Haskell-cafe] Progress indications

2007-11-28 Thread David Roundy
:: (Int - IO ()) - [a] - [a] by using unsafePerformIO instead of unsafeInterleaveIO, but that seems slightly scary to me. In any case, you can stick this on whichever of the lists you want to monitor the progress of. -- David Roundy Department of Physics Oregon State University

Re: [Haskell-cafe] Hit a wall with the type system

2007-11-30 Thread David Roundy
but finite difference (except at a carefully examined check for better derivatives). -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Graph theory analysis of Haskell code

2007-12-06 Thread David Roundy
would be more interesting theoretically, but IMO less likely to be practical. Another option would be to couple this with profiling or coverage information to visualize something about the usage of paths and nodes in the call graph. Indeed, a visualization tool like this would be cool! -- David

[Haskell-cafe] announcing darcs 2.0.0pre1, the first prerelease for darcs 2

2007-12-10 Thread David Roundy
We are happy to announce the first prerelease version of darcs 2! Darcs 2 will feature numerous improvements, and this prerelease will also feature a few regressions, so we're looking for help, from both Haskell developers and users willing to try this release out. Read below, to see how you can

Re: [Haskell-cafe] class default method proposal

2007-12-11 Thread David Roundy
What about something like instance Monad MyMonad where (=) = ... return = ... deriving ( Functor, Applicative ) That sounds like a friendlier version of SPJ's proposal, in that you no longer have to search for the default method, and every instance is actually manually declared. (I'm

[Haskell-cafe] announcing darcs 2.0.0pre2

2007-12-16 Thread David Roundy
I am pleased to announce the availability of the second prerelease of darcs two, darcs 2.0.0pre2. This release fixes several severe performance bugs that were present in the first prerelease. These issues were identified and fixed thanks to the helpful testing of Simon Marlow and Peter Rockai.

Re: [Haskell-cafe] Re: announcing darcs 2.0.0pre2

2007-12-17 Thread David Roundy
-a $ time darcs2 pull /64playpen/simonmar/ghc-darcs2 -a Finished pulling and applying. 668.75s real 290.74s user 15.03s system 45% darcs2 pull /64playpen/simonmar/ghc-darcs2 -a -- David Roundy Department of Physics Oregon State University

Re: [Haskell-cafe] Re: announcing darcs 2.0.0pre2

2007-12-21 Thread David Roundy
On Mon, Dec 17, 2007 at 12:29:20PM +, Simon Marlow wrote: David Roundy wrote: I am pleased to announce the availability of the second prerelease of darcs two, darcs 2.0.0pre2. Thanks! Continuing my performance tests, I tried unpulling and re-pulling a bunch of patches in a GHC tree

Re: [Haskell-cafe] Missing join and split

2007-12-28 Thread David Roundy
On Dec 28, 2007 9:51 AM, Benja Fallenstein [EMAIL PROTECTED] wrote: If you use intercalate to join, I would presume that you would want to use an inverse of it to split. I'd write it like this: But alas, words and lines differ on how properly to split, so there's no hint from the standard

Re: [Haskell-cafe] Missing join and split

2007-12-29 Thread David Roundy
On Fri, Dec 28, 2007 at 04:24:38PM +0100, Benja Fallenstein wrote: On Dec 28, 2007 3:55 PM, David Roundy [EMAIL PROTECTED] wrote: On Dec 28, 2007 9:51 AM, Benja Fallenstein [EMAIL PROTECTED] wrote: If you use intercalate to join, I would presume that you would want to use an inverse

[Haskell-cafe] Re: [darcs-devel] announcing darcs 2.0.0pre2

2008-01-03 Thread David Roundy
On Thu, Jan 03, 2008 at 11:11:40AM +, Simon Marlow wrote: David Roundy wrote: Anyhow, could you retry this test with the above change in methodology, and let me know if (a) the pull is still slow the first time and (b) if it's much faster the second time (after the reverse unpull/pull

Re: [Haskell-cafe] Why purely in haskell?

2008-01-09 Thread David Roundy
On Jan 9, 2008 4:21 PM, Don Stewart [EMAIL PROTECTED] wrote: anton: OTOH, the freedom to change things on the fly can be nice to have, and if used with great responsibility (mainly an understanding of what's safe to do and what isn't), the downside can be vanishingly small. It can be

Re: [Haskell-cafe] Re: ANN: A triple of new packages for talking tothe outside world

2008-01-09 Thread David Roundy
On Jan 9, 2008 10:10 AM, Dominic Steinitz [EMAIL PROTECTED] wrote: Duncan Coutts duncan.coutts at worc.ox.ac.uk writes: The difficulty is in deciding what the api should be. Does it give you a real bitstream or only a byte aligned one? If I ask for 3 bits then 15 bytes what does it do? Does

Re: [Haskell-cafe] Re: ANN: A triple of new packages for talking tothe outside world

2008-01-09 Thread David Roundy
On Wed, Jan 09, 2008 at 11:43:52PM +0100, Achim Schneider wrote: David Roundy [EMAIL PROTECTED] wrote: On Jan 9, 2008 10:10 AM, Dominic Steinitz [EMAIL PROTECTED] wrote: Duncan Coutts duncan.coutts at worc.ox.ac.uk writes: The difficulty is in deciding what the api should be. Does

Re: [Haskell-cafe] Why purely in haskell?

2008-01-10 Thread David Roundy
On Jan 9, 2008 5:42 PM, Henning Thielemann [EMAIL PROTECTED] wrote: I just want to point out that unsafePerformIO is at the core of the (safe) bytestring library. As SPJ et al pointed out, this is crucial functionality, and is only unsafe if unsafely used. Indeed, there are hacks and they

Re: [Haskell-cafe] Re: Why purely in haskell?

2008-01-10 Thread David Roundy
aware of), so one has to rely on possibly-undocumented (and certainly never checked by a compiler) strictness behavior of many functions in order to write truly correct code. I wish there were a nice way around this issue (but can't really even imagine one). -- David Roundy Department of Physics

Re: [Haskell-cafe] Why purely in haskell?

2008-01-10 Thread David Roundy
On Thu, Jan 10, 2008 at 08:10:57PM +, Sebastian Sylvan wrote: On Jan 10, 2008 8:06 PM, Ketil Malde [EMAIL PROTECTED] wrote: David Roundy [EMAIL PROTECTED] writes: I just want to point out that unsafePerformIO is at the core of the (safe) bytestring library. As SPJ et al pointed

Re: [Haskell-cafe] Re: 0/0 1 == False

2008-01-10 Thread David Roundy
ghci.) -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: 0/0 1 == False

2008-01-10 Thread David Roundy
On Thu, Jan 10, 2008 at 09:41:53PM +0100, Achim Schneider wrote: David Roundy [EMAIL PROTECTED] wrote: On Thu, Jan 10, 2008 at 09:24:34PM +0100, Achim Schneider wrote: John Meacham [EMAIL PROTECTED] wrote: 1/0 = Infinity -1/0 = -Infinity Just out of curiosity: 1/-0

Re: [Haskell-cafe] Re: 0/0 1 == False

2008-01-11 Thread David Roundy
for the computer to know this, so it's NaN. -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: 0/0 1 == False

2008-01-14 Thread David Roundy
On Fri, Jan 11, 2008 at 07:10:20PM -0800, Jonathan Cast wrote: On 11 Jan 2008, at 10:12 AM, Achim Schneider wrote: David Roundy [EMAIL PROTECTED] wrote: Prelude let x=1e-300/1e300 Prelude x 0.0 Prelude x/x NaN The true answer here is that x/x == 1.0 (not 0 or +Infinity), but there's

Re: [Haskell-cafe] On GADT, phantom types, etc. terminology

2006-05-30 Thread David Roundy
On Mon, May 29, 2006 at 07:49:20PM -0700, [EMAIL PROTECTED] wrote: David Roundy wrote: I want the return type d to be a phantom type of some sort (although I'm not clear on the distinction between phantom and existential types). Well, they are, in a sense, dual to each other

Re: [Haskell-cafe] Efficient way to edit a file

2006-06-02 Thread David Roundy
), which may not be the case for you. And perhaps you don't need to be careful. I've found that if bad things can happen, they do. But that's largely because darcs has lots of users... -- David Roundy ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Deducing Show for GADTs

2006-06-28 Thread David Roundy
, doesn't need to be expressed as a GADT, I believe you can write something like: data MyData a = (forall a. Show a) = DC1 a which (this is untested) should do what you want. -- David Roundy ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] System.FilePath, Request for comments

2006-07-02 Thread David Roundy
! :) -- David Roundy ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] help with creating a DAG?

2006-07-08 Thread David Roundy
. These are getting to be data structures that are more complicated than anything I'm comfortable with. :( -- David Roundy ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Why is Day and Month bounded?

2006-07-14 Thread David Roundy
. -- David Roundy ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Why is Day and Month bounded?

2006-07-14 Thread David Roundy
On Fri, Jul 14, 2006 at 02:28:20PM +0100, David House wrote: On 14/07/06, David Roundy [EMAIL PROTECTED] wrote: Anyhow, just thought I'd mention that this isn't useful only for ordinary cyclic objects like dates. Correct. Which is why Chris Kuklewicz included instances for, e.g., Int :) Ah

Re: [Haskell-cafe] RE: ANN: System.FilePath 0.9

2006-07-17 Thread David Roundy
that your safe chroot monad won't die at runtime. -- David Roundy ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] RE: ANN: System.FilePath 0.9

2006-07-26 Thread David Roundy
always just use '/' as all the path separators, and it works fine... -- David Roundy ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] RE: ANN: System.FilePath 0.9

2006-07-26 Thread David Roundy
a portable library we might want it to work even on systems running an interesting filesystem like rieser4. -- David Roundy ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] if-then-else as rebindable syntax (was Re: Why does Haskell have the if-then-else syntax?)

2006-07-27 Thread David Roundy
cond is. -- David Roundy ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] RE: ANN: System.FilePath 0.9

2006-08-04 Thread David Roundy
dropped after considerable debate, and people using an older version of reiser4 still have the strange file-as-directory semantics. -- David Roundy http://www.darcs.net ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

Re: [Haskell-cafe] Re: does the compiler optimize repeated calls?

2006-09-06 Thread David Roundy
strictly), which is most likely another insanely dificult bit of compiler code, which would also involve figuring out which code paths would save memory, and which would increase the memory use. -- David Roundy ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Re: how do you debug programs?

2006-09-06 Thread David Roundy
. It's ugly, but beats any other choice I'm aware of. I wish that built in functions that call error could be automatically this way... -- David Roundy ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: how do you debug programs?

2006-09-07 Thread David Roundy
On Thu, Sep 07, 2006 at 06:21:01AM +0100, Jn Fairbairn wrote: David Roundy [EMAIL PROTECTED] writes: On Wed, Sep 06, 2006 at 09:56:17AM -0700, Jason Dagit wrote: Or maybe even more extreme you could use template haskell or the c preprocessor to fill in the line number + column

Re: [Haskell-cafe] a monad for secret information

2006-10-10 Thread David Roundy
On Mon, Oct 09, 2006 at 11:06:35PM -0400, Seth Gordon wrote: I finally (think I) understand monads well enough to make one up: [...] The not-so-nice thing is that the literal text of the password is baked into the data definition. I'd like to have a more general version of Secret that allows

[Haskell-cafe] Re: [Haskell] Animal guessing game - critique my code

2006-10-28 Thread David Roundy
= read_animal = run \end{code} As you can see, I also modified it so that it'll be a bit smarter about not saying things like a David Roundy or a elephant. -- David Roundy Dept. of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] RE: Safe forking question

2006-12-04 Thread David Roundy
, but they do occur together, and where they occur, programmers must have carefully thought out how they interact. -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

Re: [Haskell-cafe] (a - [b]) - [a - b] ?

2006-12-04 Thread David Roundy
) This also makes it explicit that by golly your function had better return an infinite list, or we're in trouble. -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org

Re: [Haskell-cafe] Picking out elements of a heterogenous list

2006-12-05 Thread David Roundy
A | ElemB B | ElemC C Again, it only works for lists containing a fixed set of types. -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell-cafe] Num is such a fat and greedy class

2006-12-08 Thread David Roundy
... -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Stack, Heap and GHC

2006-12-14 Thread David Roundy
, these compilation flags and --make? You pass +RTS -Ksize to your executable, not when compiling (which would affect the stack of ghc). :) -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Stack, Heap and GHC

2006-12-14 Thread David Roundy
it doesn't seem to have a stack error (although it hasn't completed on my computer, and uses something like 2G of memory). Perhaps the thunks are placed on the heap, and only when they are actually evaluated does anything go onto the stack? -- David Roundy Department of Physics Oregon State University

Re: [Haskell-cafe] Re: Aim Of Haskell

2006-12-16 Thread David Roundy
people hang out, so you can sit there and be dazzled by their arcane knowledge, and yet also find help for your more mundane problems. I don't think it hurts for a newbie to get a mixture of answers, including the simple ones that benefit them, along with a few to stretch their mind. -- David Roundy

[Haskell-cafe] rebinding = for restricted monads

2006-12-17 Thread David Roundy
f = lower $ do lift $ putStr Hello world lift $ getChar which seems rather heavy. Can anyone think of syntax-light way to allow my hypothesized rebound do-notation to also work with ordinary monads? -- David Roundy Department of Physics Oregon State University

Re: [Haskell-cafe] Re: rebinding = for restricted monads

2006-12-17 Thread David Roundy
On Sun, Dec 17, 2006 at 01:35:49PM -0500, Chung-chieh Shan wrote: David Roundy [EMAIL PROTECTED] wrote: class WitnessMonad wm where (=) :: wm w w' a - (a - wm w' w'' b) - wm w w'' b () :: wm w w' a - wm w' w'' b - wm w w'' b return :: a - wm w w' a fail :: String - wm w

Re: [Haskell-cafe] AT solution: rebinding = for restricted monads

2006-12-17 Thread David Roundy
x y = RepositoryMonad x y ... which would allow me to create a monad in which the actions are limited according to witness types, such as applyPatchToWorking :: Patch a b - RepositoryMonad (rec,a) (rec,b) () -- David Roundy http://www.darcs.net

Re: [Haskell-cafe] AT solution: rebinding = for restricted monads

2006-12-17 Thread David Roundy
I've now almost got a FD solution to this problem, except that it won't work, and I don't know why. Of course, it's possible that the AT solution won't work either (I'm still compiling ghc, should have it in the morning...), but at least it seems far simpler. My FD solution is below. My trouble

Re: [Haskell-cafe] AT solution: rebinding = for restricted monads

2006-12-19 Thread David Roundy
On Mon, Dec 18, 2006 at 06:52:41PM -0800, Iavor Diatchki wrote: Hi David, I don't think you need functional dependencies or associated type synonyms to get your example to work. In the past, I have used the abstraction that you are describing (I call it an indexed monad and it has a nice

Re: [Haskell-cafe] AT solution: rebinding = for restricted monads

2006-12-19 Thread David Roundy
On Tue, Dec 19, 2006 at 10:08:12AM -0500, Jacques Carette wrote: David Roundy wrote: The trouble is that your solution doesn't allow you to use do-notation with the IxMonad. And if you did allow yourself to use do-notation by rebinding (=), etc, then you wouldn't be able to use ordinary

Re: [Haskell-cafe] Re: proposal: HaBench, a Haskell Benchmark Suite

2007-01-26 Thread David Roundy
. But of course, the benchmark code should also be clean, since we want to ensure that our compilers are good enough that we can write useful beautiful code that is also fast. Just my $0.02. -- David Roundy http://www.darcs.net ___ Haskell-Cafe mailing

Re: [Haskell-cafe] Re: proposal: HaBench, a Haskell Benchmark Suite

2007-01-27 Thread David Roundy
benchmarks. e.g. the famous specmark log(sqrt(x)) optimization (which is equal to 0.5*log(x), but no decent programmer would ever write that code, and it's a special case the compiler shouldn't bother looking for). -- David Roundy http://www.darcs.net

Re: [Haskell-cafe] proposal: HaBench, a Haskell Benchmark Suite

2007-01-28 Thread David Roundy
no longer uses a true LCS (neither does diff), so you might try our LCS substitute. -- David Roundy http://www.darcs.net ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] How to write elegant Haskell programms? (long posting)

2007-01-29 Thread David Roundy
declarations for top-level functions, and it's worth adding them while debugging (to get better error messages), or for tricky functions where the types aren't obvious. But for code like this, they just make it harder to read. -- David Roundy Department of Physics Oregon State University signature.asc

Re: [Haskell-cafe] How to write elegant Haskell programms? (long posting)

2007-01-29 Thread David Roundy
path = (formatCalendarTime defaultTimeLocale %Y%m%d . toUTCTime) `liftM` getModificationTime path (although I prefer using fmap instead of liftM) -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Re: proposal: HaBench, a Haskell Benchmark Suite

2007-01-30 Thread David Roundy
case, I meant code that *uses* Data.Bytestring, which is certainly purely functional. -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: proposal: HaBench, a Haskell Benchmark Suite

2007-01-30 Thread David Roundy
, and there are certainly cases a clean optimized Haskell library should be able to outperform a clean optimized C++ library (if you can agree with me that template expressions are dirty), due to the possibility of array fusion. -- David Roundy Department of Physics Oregon State University

Re: [Haskell-cafe] Re: Very fast loops. Now!

2007-02-12 Thread David Roundy
... -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Very fast loops. Now!

2007-02-12 Thread David Roundy
On Mon, Feb 12, 2007 at 02:25:21PM -0800, Bryan O'Sullivan wrote: David Roundy wrote: I'm rather curious (if you're sill interested) how this'll be affected by the removal of the division from the inner loop. e.g. go :: Double - Double - Int - IO () go !x !y !i | i

Re: [Haskell-cafe] Map list of functions over a single argument

2007-02-20 Thread David Roundy
expressed using map directly: rmap fs x = map ($ x) fs -- David Roundy http://www.darcs.net ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Safe lists with GADT's

2007-02-26 Thread David Roundy
the power of the GADT, a line that will fail -- at compile time: t' = tailL t return c -- David Roundy http://www.darcs.net ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell-cafe] Safe lists with GADT's

2007-02-26 Thread David Roundy
that you define a stupid class, and is far, far prettier. -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] numeric minimization in Haskell

2007-02-28 Thread David Roundy
array syntax. Manuel is currently working on parallelization of arrays using this API, so this would be a good API to use, moving forward. -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] numeric minimization in Haskell

2007-02-28 Thread David Roundy
don't know what you use GSLHaskell for in your work, but I hope you don't use it for conjugate gradients, or only use it on easy problems. -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe

  1   2   3   4   >