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] 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] 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] 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

[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] 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

Re: [Haskell] Empty instance declaration

2007-12-28 Thread David Roundy
On Dec 27, 2007 2:20 PM, Jorge Marques Pelizzoni [EMAIL PROTECTED] wrote: The problem is, when you declare an empty instance, all functions (if any) assume their default definitions. Therefore, when you call show/showsPrec (even indirectly) you end up in an endless loop because of (ii). I

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] 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] 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

[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] 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.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] 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

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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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

[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] 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

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

[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: [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

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] 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] 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] 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-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] 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] 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] Re: a regressive view of support for imperative programming in Haskell

2007-08-13 Thread David Roundy
On Mon, Aug 13, 2007 at 01:27:45PM -0300, Isaac Dupree wrote: David Roundy wrote: The only cost is that this syntax relies on the do notation, and thus makes the desugaring of that do notation slightly more complicated when used. If I understand correctly, do blah f (do

Re: compiler-detected nontermination

2007-08-10 Thread David Roundy
programmer always has the fallback of generating non-terminating code (a good reason for allowing error in the language, I suppose). -- David Roundy Department of Physics Oregon State University ___ Glasgow-haskell-users mailing list Glasgow-haskell-users

Re: [Haskell-cafe] a regressive view of support for imperative programming in Haskell

2007-08-09 Thread David Roundy
On Thu, Aug 09, 2007 at 04:02:05PM +1200, ok wrote: On 9 Aug 2007, at 8:41 am, David Roundy wrote: I may be stating the obvious here, but I strongly prefer the do syntax. It's nice to know the other also, but the combination of do +indenting makes complicated code much clearer than the nested

Re: [Haskell-cafe] a regressive view of support for imperative programming in Haskell

2007-08-09 Thread David Roundy
On Thu, Aug 09, 2007 at 02:08:20PM +0100, Jules Bean wrote: David Roundy wrote: On Wed, Aug 08, 2007 at 02:20:39PM -0400, Paul Hudak wrote: As long as the sugar has a pretty obvious desugaring (which I seem to recall it did), I don't see how it's likely to make things worse. And Some

Re: [Haskell-cafe] Re: a regressive view of support for imperative programming in Haskell

2007-08-09 Thread David Roundy
On Thu, Aug 09, 2007 at 08:45:14PM +0200, Benjamin Franksen wrote: David Roundy wrote: Several times since reading the beginning of this discussion I've wished I had the new syntax so I could write something like: do if predicateOnFileContents (- readFile foo) then ... instead

Re: [Haskell-cafe] a regressive view of support for imperative programming in Haskell

2007-08-08 Thread David Roundy
variable. Every temporary variable declared adds that much syntactic overhead to a function, since the reader is forced to scan through the rest of the function to see if it is ever used again before he can understand what is being done and how it's being used. -- David Roundy Department of Physics

Re: [Haskell-cafe] Re: monad subexpressions

2007-08-03 Thread David Roundy
to implement whichever it deems most efficient. In the cases where this is actually used, all three of those are correct, the code is understandable, compact and unambiguous. -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing

Re: [Haskell-cafe] positive Int

2007-08-02 Thread David Roundy
is much harder to accidentally run into than negative values. A nicer option would be some sort of extra proof rather than a new type. But that sort of work is rather tricky, as I understand it. -- David Roundy Department of Physics Oregon State University

Re: [Haskell-cafe] ANNOUNCE: Dimensional 0.6 -- Statically checked physical dimensions

2007-08-02 Thread David Roundy
seems unlikely to pay off soon. :( -- 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: [Haskell] View patterns in GHC: Request?for?feedback

2007-07-31 Thread David Roundy
if someone declared [a] to be an instance of Num, and that's the risk one takes when using type classes... but that's why it's nice that there is a convenient way to write code that *doesn't* use type classes. -- David Roundy Department of Physics Oregon State University

Re: [Haskell-cafe] Re: [Haskell] View patterns in GHC: Request?for?feedback

2007-07-31 Thread David Roundy
On Tue, Jul 31, 2007 at 04:04:17PM -0700, Stefan O'Rear wrote: On Tue, Jul 31, 2007 at 03:31:54PM -0700, David Roundy wrote: On Mon, Jul 30, 2007 at 11:47:46AM +0100, Jon Fairbairn wrote: ChrisK [EMAIL PROTECTED] writes: And the readability is destroyed because you cannot do any type

Re: [Haskell-cafe] Re: [Haskell] View patterns in GHC: Request?for?feedback

2007-07-27 Thread David Roundy
interactions of home-made classes such as complex numbers, or string classes (which you might want to be automatically constructed from string constants). -- David Roundy Department of Physics Oregon State University signature.asc Description: Digital signature

Re: [Haskell-cafe] Abstraction leak

2007-06-29 Thread David Roundy
ends in the original stream! Sounds to me like you want a parsing monad. Generally, when you want state, you want a monad, and the field of parsing monads is pretty mature. You can either write up a monad of your own, or use one of the existing ones (parsec, frisby, read). -- David Roundy

Re: [Haskell-cafe] Best idiom for avoiding Defaulting warnings with ghc -Wall -Werror ??

2007-06-25 Thread David Roundy
it (the haskell-prime or libraries list). That would be great! -- 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] Best idiom for avoiding Defaulting warnings with ghc -Wall -Werror ??

2007-06-23 Thread David Roundy
was possible after all. -- 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] Best idiom for avoiding Defaulting warnings with ghc -Wall -Werror ??

2007-06-23 Thread David Roundy
On Fri, Jun 22, 2007 at 05:39:10PM -0700, Dave Bayer wrote: On Jun 22, 2007, at 4:37 PM, David Roundy wrote: You get strongly-typed code whether or not you enable warnings. In my opinion it's delusional to think one is using strong typing if one doesn't enable warnings. All the puffing

Re: [Haskell-cafe] Best idiom for avoiding Defaulting warnings with ghc -Wall -Werror ??

2007-06-22 Thread David Roundy
want to do, then you don't need the warning. ghc -Werr -Wall is a often good idea, but if you prefer a different programming style (e.g. no top-level type declarations required), ghc gives you the flexibility to do that. -- David Roundy Department of Physics Oregon State University

Re: [Haskell-cafe] directory tree?

2007-06-22 Thread David Roundy
) nice little monad DarcsIO, which allows us to do file/directory IO operations on either Slurpies or disk, or various other sorts of virtualized objects. Someday I'd like to write an industrial strength version of this monad (which addresses more than just darcs' needs). -- David Roundy Department

Re: [Haskell-cafe] Need for speed: the Burrows-Wheeler Transform

2007-06-22 Thread David Roundy
be ugly. -- 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] Best idiom for avoiding Defaulting warnings with ghc -Wall -Werror ??

2007-06-22 Thread David Roundy
On Fri, Jun 22, 2007 at 12:34:09PM -0700, Dave Bayer wrote: On Jun 22, 2007, at 11:42 AM, David Roundy wrote: On Fri, Jun 22, 2007 at 11:37:15AM -0700, Dave Bayer wrote: GHC issues a Warning: Defaulting the following constraint(s) to type `Int' for the definition of z. Why don't you just

Re: [Haskell-cafe] Best idiom for avoiding Defaulting warnings with ghc -Wall -Werror ??

2007-06-22 Thread David Roundy
On Fri, Jun 22, 2007 at 03:07:59PM -0700, Dave Bayer wrote: On Jun 22, 2007, at 2:46 PM, David Roundy wrote: I think of top-level type declarations as type-checked comments, rather than a seat-belt. It forces you to communicate to others what a function does, if that function may be used

[Haskell-cafe] Re: [darcs-devel] advice on GADT type witnesses needed

2007-06-21 Thread David Roundy
: a) a'' : c' - commute (c : a') return a' -- 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] haskell crypto is reaaaaaaaaaally slow

2007-06-20 Thread David Roundy
As its name implies, ByteString stores a string of bytes, which are Word8. It's a replacement for a list, not for Word8. David On Wed, Jun 20, 2007 at 09:23:51PM +0100, Dominic Steinitz wrote: I'm probably missing something here but writing MD5 (and for that matter SHA1) requires bit

Re: [Haskell-cafe] haskell crypto is reaaaaaaaaaally slow

2007-06-20 Thread David Roundy
compiler tricks, it's using a reasonable data structure for the problem (although the weird compiler tricks help, too). -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org

[Haskell-cafe] Re: [darcs-devel] advice on GADT type witnesses needed

2007-06-15 Thread David Roundy
Ian! :) -- 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] advice on GADT type witnesses needed

2007-06-14 Thread David Roundy
, this makes no sense to me. If any type gurus could help clarify, that would be great. Thanks! -- 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] Just for a laugh...

2007-06-01 Thread David Roundy
On Fri, Jun 01, 2007 at 07:28:07PM +0100, Andrew Coppin wrote: David Roundy wrote: Note also that you can use unsafePerformIO to safely get pure functions doing both these operations. I've always been puzzled by this one... how does unsafePerformIO circumvent the type system? I don't

Re: [Haskell-cafe] Just for a laugh...

2007-06-01 Thread David Roundy
On Fri, Jun 01, 2007 at 07:39:32PM +0100, Andrew Coppin wrote: David Roundy wrote: On Fri, Jun 01, 2007 at 07:28:07PM +0100, Andrew Coppin wrote: David Roundy wrote: Note also that you can use unsafePerformIO to safely get pure functions doing both these operations. I've

Re: [Haskell-cafe] Just for a laugh...

2007-05-31 Thread David Roundy
a = a - IO String Note also that you can use unsafePerformIO to safely get pure functions doing both these operations. -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Network.HTTP+ByteStrings Interface--Or: How to shepherd handles and go with the flow at the same time?

2007-05-28 Thread David Roundy
in your consumer, but that's where you'll almost certainly want it anyhow. And in many cases the feedback could come for free, in the form of output. -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe

[Haskell-cafe] hash of a lazy bytestring?

2007-05-13 Thread David Roundy
into trouble with laziness keeping safeInterleave from being called, with the result that we'd hang onto x even though the safeInterleave would have hoped to allow x to be GCed. -- David Roundy http://www.darcs.net ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] hash of a lazy bytestring?

2007-05-13 Thread David Roundy
On Sun, May 13, 2007 at 08:30:41AM -0700, David Roundy wrote: do l - readFile foo let len = length l writeFile bar l putStrLn $ Length is ++ show l Oops, of course this should have been show len in the last line. -- David Roundy http://www.darcs.net

Re: [Haskell-cafe] Monad pronounced like gonad?

2007-05-10 Thread David Roundy
hissing that is difficult to describe; when you say it correctly, the terminal may become slightly moist.) -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

Re: [Haskell-cafe] Safe forward-mode AD in Haskell?

2007-05-08 Thread David Roundy
an existential type, but I don't see that you need any branding. -- 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] Safe forward-mode AD in Haskell?

2007-05-08 Thread David Roundy
On Tue, May 08, 2007 at 05:59:48PM -0700, David Roundy wrote: Couldn't you do the same without branding if you simply made your function polymorphic: data Bundle a = Bundle a a d :: Num a = (forall b. Num b = b - b) - a - a d f x = let (Bundle y y') = f (Bundle x 1) in y' and defined

Re: [Haskell-cafe] Safe forward-mode AD in Haskell?

2007-05-08 Thread David Roundy
in a differentiation module. constant_one x = d (\l y - l x + y) 1 should_be_one_a = d (\_ x - x * (constant_one x)) 1 should_be_one_b = d (\_ x - x * 1 ) 1 violation_of_referential_transparency = should_be_one_a /= should_be_one_b -- David Roundy Department of Physics Oregon State University

Re: [Haskell-cafe] faster factorial function via FFI?

2007-04-23 Thread David Roundy
switch to using Ints. That'd gain you a lot more than an optimized Integer factorial. -- David Roundy Department of Physics Oregon State University signature.asc Description: Digital signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] faster factorial function via FFI?

2007-04-23 Thread David Roundy
! * ... * p_k! x n ps = product [max ps..n] / (product $ concat $ map (\p-[1..p]) $ delete (max ps) ps) and yes, that's pseudocode... max has wrong type. of course, this only helps if you've got a big p. At least there's always a biggest p. -- David Roundy Department of Physics Oregon State University

Re: [Haskell-cafe] question about Data.Binary and Double instance

2007-04-22 Thread David Roundy
On Sun, Apr 22, 2007 at 10:36:17PM +0100, Ian Lynagh wrote: On Wed, Apr 18, 2007 at 09:12:30PM -0700, David Roundy wrote: I just want to read in a file full of Doubles (written in binary format from C++) Note that if you write double's from C++ then you need to read CDoubles in Haskell

Re: [Haskell-cafe] Program optimisation

2007-04-20 Thread David Roundy
to be careful when removing bits of code, as this could cause other bits of code to not actually be run (e.g. if you never print the output, it might be that the next_frame is never evaluated, so you might need to print just the last frame, or compute the sum of each frame and print that). -- David Roundy

Re: [Haskell-cafe] Program optimisation

2007-04-20 Thread David Roundy
on the lazy Data.Map). I don't think eliminating all laziness is a good idea, but (optional) strict datatypes most certainly are, as they can go a very long ways towards eliminating memory leaks. -- David Roundy Department of Physics Oregon State University

Re: [Haskell-cafe] fftw bindings

2007-04-19 Thread David Roundy
On Thu, Apr 19, 2007 at 05:37:05PM +0200, Fawzi Mohamed wrote: I was wondering if someone had fftw bindings for haskell, or if I should roll my own. Not that I'm aware of, but if you roll your own, please make them public, as I'll be interested in fftw bindings before long. -- David Roundy

Re: [Haskell-cafe] Re: fftw bindings

2007-04-19 Thread David Roundy
instead) they sped up the library on a particular architecture by some some significant margin (I think I recall 20%). -- David Roundy http://www.darcs.net ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell

<    1   2   3   4   5   >