Re: [Haskell-cafe] numeric minimization in Haskell

2007-02-28 Thread David Roundy
't know or don't care about efficiency is just not in general a good idea. I 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 ___

Re: [Haskell-cafe] ANN: HSH 1.0.0

2007-03-01 Thread David Roundy
nction is never read. Shouldn't this be called echo? Or just let people use the preexisting function "const", which does the same thing? catFromS just seems confusing. -- David Roundy Department of Physics Oregon State University ___ H

Re: [Haskell-cafe] wanted: haskell one-liners (in the perl sense of one-liners)

2007-03-02 Thread David Roundy
n I'd like to run echo hello world | hmap toUpper but there's no way that I can see to import Data.Char either on the command line, or as a flag passed by hrun to ghc. Ideally one would want the bash function to always deal with importing Data.Char,

Re: [Haskell-cafe] wanted: haskell one-liners (in the perl sense of one-liners)

2007-03-02 Thread David Roundy
uestion than a haskell question. It just checks whether ghc is in the path. -- 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] ANN: HSH 1.2.0

2007-03-03 Thread David Roundy
wrote the above example so the typechecker could determine the result of each line, because I use them... except for the last, which it'll bomb on, and currently needs to be written as runIO. But defaulting would be far cleaner... -- David Roundy http://www.darcs.net ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] idea for avoiding temporaries

2007-03-08 Thread David Roundy
think it'd be pretty cool, and would certainly (not immediately, but as my research group ramps up) be interested in being a guinea pig user of this stuff. Any thoughts? Am I crazy? Is this infeasible for some reason? Should I have patented this idea before mentioning it on the list? Has someon

Re: [Haskell-cafe] idea for avoiding temporaries

2007-03-08 Thread David Roundy
ton wrote: > Or possibly more generally copy-on-write, which requires one more level > of indirection (handle instead of ptr). Since you are talking about > using ForeignPtr, this is already within your power to prototype, I > should think. > > Dan > > Dan Piponi wr

Re: [Haskell-cafe] idea for avoiding temporaries

2007-03-08 Thread David Roundy
On Thu, Mar 08, 2007 at 02:50:51PM -0500, Brandon S. Allbery KF8NH wrote: > On Mar 8, 2007, at 14:21 , David Roundy wrote: > >I'm thinking you're missing the point. The point is to copy without > >writing, and that requires some knowledge (whether static or > >run

Re: [Haskell-cafe] idea for avoiding temporaries

2007-03-08 Thread David Roundy
lements, DiffArrays are as slow as their back end, and you may as well just use their back end without the DiffArray business. -- 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] idea for avoiding temporaries

2007-03-08 Thread David Roundy
his > broker business and steal back your data, just ask: the broker will > duplicate shared data needed by others, change their pointers to it, > then disown the pointer it returns to you. > > This is copying without writing (unnecessarily). Or am I missing something? > > D

Re: [Haskell-cafe] idea for avoiding temporaries

2007-03-08 Thread David Roundy
On Thu, Mar 08, 2007 at 04:32:01PM -0500, Brandon S. Allbery KF8NH wrote: > On Mar 8, 2007, at 16:27 , David Roundy wrote: > >The real issue for me is that DiffArrays only make any sense at all if > >you often update a subset of your array, which I never expect to do... > >

Re: [Haskell-cafe] idea for avoiding temporaries

2007-03-08 Thread David Roundy
On Thu, Mar 08, 2007 at 11:09:35PM +0100, Matthias Neubauer wrote: > David Roundy <[EMAIL PROTECTED]> writes: > > I see. But how would one manage these handles? What's to keep me from > > accidentally copying a handle? It sounds like it'd require explicit memory &g

Re: [Haskell-cafe] idea for avoiding temporaries

2007-03-08 Thread David Roundy
seems like some subset of concurrent programming. > > Dan > > David Roundy wrote: > >Ah, I was missing your point, I've heard something called copy-on-write, > >which wasn't what you describe (or I also misunderstood it when I heard it > >before). > >

Re: [Haskell-cafe] idea for avoiding temporaries

2007-03-09 Thread David Roundy
t; thing, writing and reading. I would gain a 20% reduction in memory use, which could come out to a few gigabytes for large problems. That's worth some degree of effort. Actually, it'd be a bit less than 20%, but for large problems it would approach 20%. -- David Roundy Departm

[Haskell-cafe] Re: [Haskell] ICFP programming contest results

2008-09-24 Thread David Roundy
On Wed, Sep 24, 2008 at 1:06 AM, Malcolm Wallace <[EMAIL PROTECTED]> wrote: > The ICFP programming contest results presentation: > http://video.google.com/videoplay?docid=-4697764813432201693 > > Feel free to pass on this link to any other appropriate forum. Yikes. Haskell did pretty terribly! An

Re: [Haskell-cafe] System.Process

2008-09-30 Thread David Roundy
On Tue, Sep 30, 2008 at 10:14:38AM +0200, Ketil Malde wrote: > "Svein Ove Aas" <[EMAIL PROTECTED]> writes: > > All programs want argument arrays, not un-split lines, and if you > > don't have the shell split it you'll have to do it yourself. words > > works fine. > > ...as long as the words don't

Re: [Haskell-cafe] System.Process

2008-09-30 Thread David Roundy
On Tue, Sep 30, 2008 at 06:33:52PM +0200, Ketil Malde wrote: > David Roundy <[EMAIL PROTECTED]> writes: > > Actually, it's no problem having any of those characters in your > > arguments, > > My point is that using 'words' on the argument sting to '

Re: [Haskell-cafe] Linking and unsafePerformIO

2008-10-14 Thread David Roundy
On Tue, Oct 14, 2008 at 04:39:38PM +0100, Claus Reinke wrote: >> Where do the semantics of haskell say this? How does it interact with >> fixing bugs (which means changing mathematical and universal constant >> functions--since all functions are constants)? > > What semantics of haskell?-) But if t

Re: [Haskell-cafe] Linking and unsafePerformIO

2008-10-14 Thread David Roundy
On Tue, Oct 14, 2008 at 05:20:35PM +0100, Jules Bean wrote: > David Roundy wrote: >> On Tue, Oct 14, 2008 at 04:05:23PM +0100, Jules Bean wrote: >>> Constants are mathematical and universal, like pi. That is what the >>> semantics of haskell say. >> >> Whe

Re: [Haskell-cafe] Linking and unsafePerformIO

2008-10-14 Thread David Roundy
On Tue, Oct 14, 2008 at 04:05:23PM +0100, Jules Bean wrote: > David Roundy wrote: >>>> (Sure this is a weird situation, but I do like to think about worst >>>> cases.) >>> In practice that is fine, with current RTSes and so on. >>> >>> In pr

Re: [Haskell-cafe] Linking and unsafePerformIO

2008-10-14 Thread David Roundy
On Tue, Oct 14, 2008 at 02:05:02PM +0100, Jules Bean wrote: > Mauricio wrote: > >If I have a Haskell wrapper (with unsafe...) over a function that's > >never going to return different values and is always side-effect free, > >but can change depending on compile time options of its library; my > >p

Re: [Haskell-cafe] Re: Repair to floating point enumerations?

2008-10-15 Thread David Roundy
On Wed, Oct 15, 2008 at 11:25:57PM +0200, Henning Thielemann wrote: > David Roundy schrieb: > > > Why not look for a heuristic that gets the common cases right, rather > > than going with an elegant wrong solution? After all, these > > enumerations are most often used by

Re: [Haskell-cafe] Re: Repair to floating point enumerations?

2008-10-16 Thread David Roundy
On Thu, Oct 16, 2008 at 05:36:35PM +0200, Henning Thielemann wrote: > On Wed, 15 Oct 2008, David Roundy wrote: >> On Wed, Oct 15, 2008 at 11:25:57PM +0200, Henning Thielemann wrote: >>> David Roundy schrieb: >>> >>>> Why not look for a heuristic that gets t

[Haskell-cafe] Re: [darcs-users] Poll: Do you need to be able to build darcs from source on GHC 6.6?

2008-10-28 Thread David Roundy
Yes, it's important for me to be able to use the latest darcs on my debian stable computers. David On Mon, Oct 27, 2008 at 10:24 PM, Jason Dagit <[EMAIL PROTECTED]> wrote: > Hello, > > I would like to find out if any darcs users who build from the source > are still using ghc 6.6? > > If you are

Re: [Haskell-cafe] Re: Why 'round' does not just round numbers ?

2008-10-28 Thread David Roundy
On Tue, Oct 28, 2008 at 04:07:12PM +, Bart Massey wrote: > I'm just saying that the name "round" is unfortunate, since > there's no single universally accepted mathematical > definition for it. For this reason many programming > languages either don't provide it or provide a different > version

Re: [Haskell-cafe] [Somewhat OT] Speed

2008-10-28 Thread David Roundy
On Tue, Oct 28, 2008 at 08:55:59PM +0100, Henning Thielemann wrote: >> For example, is integer arithmetic faster or slower than >> floating-point? > > In principle integer arithmetic is simpler and faster. But your > processor may do it in the same time. Indeed. Usually there are more integer ari

[Haskell-cafe] Re: [darcs-users] Poll: Do you need to be able to build darcs from source on GHC 6.6?

2008-10-28 Thread David Roundy
stable distros worry about telling us if it > breaks against whatever versions they care about. No, in the idea world we'd try to be supportive of our contributors and maintainers by not requiring that they install the latest tools. -- Davi

Re: [Haskell-cafe] Poll: Do you need to be able to build darcs from source on GHC 6.6?

2008-10-29 Thread David Roundy
On Wed, Oct 29, 2008 at 11:17:35AM -, Mitchell, Neil wrote: > Duncan, > > I believe the major darcs issue is the changed GADT implementation > between 6.6, so that neither 6.6 or 6.8 is a superset/subset of the > other - leading to a situation where they have to use a common subset of > both.

Re: [darcs-users] [Haskell-cafe] Poll: Do you need to be able to build darcs from source on GHC 6.6?

2008-10-30 Thread David Roundy
On Thu, Oct 30, 2008 at 12:16:17PM +1100, Trent W. Buck wrote: > David Roundy <[EMAIL PROTECTED]> writes: > > And as far as bundled versions, it's the desire to *remove* a bundled > > version that's apparently at issue. I'm not sure why this is > > consi

[Haskell-cafe] Re: [darcs-users] Poll: Do you need to be able to build darcs from source on GHC 6.6?

2008-10-31 Thread David Roundy
On Thu, Oct 30, 2008 at 01:30:51PM -0700, Jason Dagit wrote: > On Thu, Oct 30, 2008 at 1:22 PM, Juliusz Chroboczek > <[EMAIL PROTECTED]> wrote: > >> Also, note that Lenny has 6.8, and it is scheduled to become stable Real > >> Soon Now. > > > > That's irrelevant. Lenny going stable will not cause

Re: [Haskell-cafe] Re: [darcs-users] Poll: Do you need to be able to build darcs from source on GHC 6.6?

2008-10-31 Thread David Roundy
On Thu, Oct 30, 2008 at 03:08:29PM -0700, Don Stewart wrote: > dagit: > > On Thu, Oct 30, 2008 at 1:20 PM, Juliusz Chroboczek > > <[EMAIL PROTECTED]> wrote: > > >> I wanted to know if anyone who is using distros with 6.6 need to be > > >> able to build current releases of darcs from source. > > > >

Re: [Haskell-cafe] Can't figure out source of race condition when using System.Process

2008-11-02 Thread David Roundy
_ -> return () > > [...] > > Why do you use forkIO here? It's not necessary. The process will run in > background on its own. ? It looks to me like this code requires a forkIO, not in the writing to inp, but rather in the read

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

2007-09-26 Thread David Roundy
fe*-named functions, which ideally should be documented in regard to precisely what is required 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 Ph

Re: [Haskell-cafe] pi

2007-10-10 Thread David Roundy
uggy atan would certainly be punished by this default for pi, but those who recognize that there is no reason 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 _

Re: [Haskell-cafe] Re: pi

2007-10-10 Thread David Roundy
escribe? 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. Where is the abomination here? -- David Roundy Department of Physics Oregon State University __

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

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 lea

Re: [Haskell-cafe] Re: pi

2007-10-10 Thread David Roundy
ard treating things specially based on whether the argument is an integer, but also provides a rather dramatic optimization for those who 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
om: [EMAIL 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 Roun

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

2007-10-15 Thread David Roundy
(five time the time of the C version I give)--confirming that pow is indeed a very expensive operation (as I already knew) and that if you call the pow function it *ought* to dominate your timing. But we've also still clearly got some seriously painful loop overhead. :( -- David Roundy Department

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

2007-10-18 Thread David Roundy
handy function to know! Note that you almost never want to use the bracket defined in Haskell98, nor 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] string literals and haskell'

2007-10-22 Thread David Roundy
#x27;) to make the former legal? i.e. 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 potentia

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

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

2007-10-23 Thread David Roundy
have a Windows system to test against, for > example, then you'll *never* know if Windows-specific parts 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 ug

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

2007-10-30 Thread David Roundy
xmonad uses a function "mytests", which I guess 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 fai

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

2007-11-05 Thread David Roundy
y're confusing: let pairs = zip (randoms (-1,1) g0) (randoms (-1,1) g1) Now you don't have 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
the very useful possibility of mmapping read-only files 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 Rou

Re: [Haskell-cafe] Sinus in Haskell

2007-11-09 Thread David Roundy
On Fri, Nov 09, 2007 at 08:08:34PM +0100, Hans van Thiel wrote: > Can anybody explain the results for 1.0, 2.0 and 3.0 times pi below? > GHCi yields the same results. I did search the Haskell report and my > text books, but to no avail. Thanks in advance, Roundoff error. -- Dav

Re: [Haskell-cafe] Some More Sinus Results

2007-11-10 Thread David Roundy
of the double closest to your desired x value" which is the closest we could possibly come to a "true" sin. If you're taking the sine of a large number, your 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
ly use either where or let in lambda expressions--things just get too crowded. But let is great in monadic code, since you can leave out the "in", which is always what makes let ugly. -- David Roundy Department of Physics Oregon State University __

Re: [Haskell-cafe] let vs. where

2007-11-13 Thread David Roundy
= length ls someAuxFunction x y = ... listLen ... someOtherFunction x y = ... listLen ... in ... listLen ... it's just that you don't want to mix let and where clauses, because then

Re: [Haskell-cafe] Renaming constructors for readability

2007-11-13 Thread David Roundy
t using 'ampersand' function as replacement for the > constructor 'Just'? 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
to do some performance tuning, and it would be nice to have a > representation 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 impleme

Re: [Haskell-cafe] Chart plotting libraries

2007-11-15 Thread David Roundy
hart-2007.8.8 > > Using gtk and cairo. Homepage here: > > http://dockerz.net/twd/HaskellCharts Chart has rather a complicated API. I've written a simpler API (but somewhat less flexible), if anyone's interested (Tim wasn't). My API is closer in complexity (of use) to mat

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

2007-11-15 Thread David Roundy
claim is correct only if there are no correlations other than those taken into account in your known probability structure. Any chance you can tell us what this mysterious data is? But bit stream operations (and data compression) are seriously cool in any case, so I hope you'll go ahead with th

Re: [Haskell-cafe] Chart plotting libraries

2007-11-16 Thread David Roundy
verbose then. 5-10 lines to define a chart is 4-9 lines too many. -- 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
about one day using 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 que

Re: [Haskell-cafe] Progress indications

2007-11-28 Thread David Roundy
rleaveIO (f n >> return x) You could, of course, make this a function lessSafeMonitoryProgress :: (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

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

2007-11-30 Thread David Roundy
o use AD or symbolic differentiation, or just compute the derivatives by hand. Anything but finite difference (except at a carefully examined check for better derivatives). -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe

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

2007-12-06 Thread David Roundy
aths and nodes > in the call graph. Indeed, a visualization tool like this would be cool! -- 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] 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 b

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. We

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

2007-12-17 Thread David Roundy
> $ time darcs2 unpull --from-tag 2007-09-25 -a > Finished unpulling. > 385.22s real 52.18s user 12.62s system 16% darcs2 unpull --from-tag > 2007-09-25 -a > > $ time darcs2 pull /64playpen/simonmar/ghc-darcs2 -a > Finished pulling and applying. > 668.75s re

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

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 li

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

[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

Re: [Haskell-cafe] Refactoring status

2008-01-03 Thread David Roundy
pful for those who want to read your code. Of course, they could always fire up ghci (with the right incantations) to find out the types of your function, but that's not always convenient. Also, type signatures often make bugs much easier to pinpoint. -- 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-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

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 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 it ass

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 worc.ox.ac.uk> writes: > >

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

2008-01-10 Thread David Roundy
On Jan 9, 2008 8:25 PM, Adam Langley <[EMAIL PROTECTED]> wrote: > I believe that it would be an additional if statement in the fast path at > least. > > How about a BitGet monad which get be run in the Get monad? ... > Anyone like that idea? Sounds good to me. But then, I don't use Data.Binary (

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

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

2008-01-10 Thread David Roundy
any 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 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 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 a

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

2008-01-10 Thread David Roundy
elf, you know... but I suppose haskell-cafe isn't a bad interactive Haskell interpreter, perhaps more user friendly than 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 > &

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

2008-01-11 Thread David Roundy
he "true" answer here is that x/x == 1.0 (not 0 or +Infinity), but there's no way 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 > >>Prelu

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

2008-01-16 Thread David Roundy
ze (width) of the repository, not with the number of patches (which had been the obvious suspect), which was causing trouble when applying to the pristine cache. At this point, darcs-2 outperforms darcs-1 on most tests that I've tried, so it'd be a good time to find some more per

[Haskell-cafe] threads + IORefs = Segmentation fault?

2008-01-18 Thread David Roundy
scratch! Is this in fact that unsafe? Do I really need to switch to MVars, even though no locking is required? -- 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] threads + IORefs = Segmentation fault?

2008-01-19 Thread David Roundy
; Peter > > > On Fri, 2008-01-18 at 18:22 -0500, David Roundy wrote: > > Hi all, > > > > I'm working on some new progress-reporting code for darcs, and am getting > > segmentation faults! :( The code uses threads + an IORef global variable > > to do thi

Re: [Haskell-cafe] threads + IORefs = Segmentation fault?

2008-01-21 Thread David Roundy
On Sat, Jan 19, 2008 at 08:36:55PM +0100, Alfonso Acosta wrote: > On Jan 19, 2008 2:36 PM, David Roundy <[EMAIL PROTECTED]> wrote: > > Using ghc 6.6, but I've since isolated the bug as being unrelated to the > > IORefs and threading, it was in an FFI binding that somehow

[Haskell-cafe] announcing darcs 2.0.0pre3

2008-01-22 Thread David Roundy
We are happy to announce the third prerelease version of darcs 2! Darcs 2 features numerous improvements, and it seems that we have fixed most of the regressions, so we're looking for help, from users willing to try this release out. Read below, to see how you can benefit from this new release, and

Re: [Haskell-cafe] announcing darcs 2.0.0pre3

2008-01-23 Thread David Roundy
ogress is output be separate thread each 0.1 > second. operating threads just update global var with current state. > of course when operating thread need to interact with user, it just > sts another global var to False which prevents progress indicator > thread from showing anyt

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

2008-01-23 Thread David Roundy
On Wed, Jan 23, 2008 at 03:26:51PM +, Simon Marlow wrote: > David Roundy wrote: > > We are happy to announce the third prerelease version of darcs 2! Darcs 2 > > features numerous improvements, and it seems that we have fixed most of the > > regressions, so we're lo

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

2008-01-23 Thread David Roundy
15s for me. This makes me wonder whether it's worth looking into a faster sha1 implementation. -- 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: [darcs-devel] announcing darcs 2.0.0pre3

2008-01-23 Thread David Roundy
4.x). I've come across the gnulib sha1 routine, which is adequately-licensed, and is fast enough to give us a 10% speedup in my obliterate test (beyond which we probably hit diminishing returns--we're probably no longer spending much time in sha1 at all). -- David Roundy Department of Phys

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

2008-01-23 Thread David Roundy
eems like it's potentially quite a useful feature. On the other hand, using sha2, which is twice as expensive (and twice as large, right) would perhaps be too costly. I don't know. SHA-2 would cost more in disk space and network bandwidth, as well as in CPU time. Is SHA-1 optimal? I don

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

2008-01-24 Thread David Roundy
On Jan 23, 2008 5:47 PM, zooko <[EMAIL PROTECTED]> wrote: > > In principle it is good to provide a cryptographically secure hash, as > > this allows users to sign their repositories by signing a single file, > > which seems like it's potentially quite a useful feature. > > Can you be more specific

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

2008-01-25 Thread David Roundy
from you where the pain is before going ahead, since I've got more work right now than I can handle. Also, if you want (way!) more information when tracking down timings, the progress reporting now interacts with the --debug flag to generate enough data to kill a horse. You could also ad

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

2008-01-31 Thread David Roundy
On Thu, Jan 31, 2008 at 09:47:06AM -0600, John Goerzen wrote: > On 2008-01-22, David Roundy <[EMAIL PROTECTED]> wrote: > > We are happy to announce the third prerelease version of darcs 2! Darcs 2 > > I'm very happy to see this, and will be trying it out today! Great! I

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

2008-01-31 Thread David Roundy
On Thu, Jan 31, 2008 at 11:51:10AM -0700, zooko wrote: > I would suggest that strict get should be the default and lazy is a > command-line option. Okay. I'm convinced, and am pushing a patch to do this. -- David Roundy Department of Physics Oregon State

Re: [Haskell-cafe] Re: threads + IORefs = Segmentation fault?

2008-02-08 Thread David Roundy
modifying the IORef from > more than one thread you would need to use atomicallyModifyIORef, or MVars. If I did modify the IORef from more than one thread (e.g. if a bug were introduced), would this cause any trouble other than occasional missed updates or reads of wrong data? -- David Rou

Re: [Haskell-cafe] Re: The Proliferation of List-Like Types

2008-02-20 Thread David Roundy
ly overlooked something important here... The problem is that while this would change the kind of ByteString to the same as the kind expected by Functor, you still couldn't define a proper Functor instance, since only ByteString' Word8 can ever actually be created. i.e. how could you implement

Re: [Haskell-cafe] What is MonadPlus good for?

2005-02-13 Thread David Roundy
tarball from disk--which would be a monad that acts within the IO monad. -- 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] What is MonadPlus good for?

2005-02-13 Thread David Roundy
e you could do it for something like an ACID database, if you define === as meaning "has the same final result on the database", which of course would only be useful if the database had sufficient locking that it couldn't have been read between the original m and the later mzero. --

Re: [Haskell-cafe] What is MonadPlus good for?

2005-02-13 Thread David Roundy
On Sun, Feb 13, 2005 at 06:05:23PM -0500, [EMAIL PROTECTED] wrote: > G'day all. > > Quoting David Roundy <[EMAIL PROTECTED]>: > > > It might be interesting to write a "backtracking" IO-like monad which > > obeyed m >> mzero === mzero. I ima

Re: [Haskell-cafe] module Crypt_Discordian - code critique requested

2005-02-23 Thread David Roundy
the Principia Discordia. But I think we can generate and > test to break it. Isn't it guaranteed unbreakable simply because there's no way to decrypt it? Since there isn't a one-to-one mapping of cyphertext to plaintext, I don't think it's actually a form of encryption. B

<    1   2   3   4   5   >