Re: [GHC] #2829: GHC_SEARCH_PATH broken

2008-12-01 Thread David Roundy
, glib-0.9.11.1, gtk-0.9.11.1, hscolour-1.10, xmonad-0.7 /tmp/foo: Cabal-1.2.2.0, GSL-0.6, X11-1.4.2, cairo-0.9.11.1, filepath-1.1.0.0, franchise-0.0.7, glib-0.9.11.1, gtk-0.9.11.1, hscolour-1.10, xmonad-0.7 -- David Roundy http://www.darcs.net

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

2008-11-02 Thread David Roundy
. ? It looks to me like this code requires a forkIO, not in the writing to inp, but rather in the reading of out and err. Otherwise, those buffers may fill up and your process will hang... -- David Roundy http://www.darcs.net ___ Haskell-Cafe mailing list

[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 my servers to

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. If there turns

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 considered desirable, but apparently some folks feel

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. No,

[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 such a

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

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

[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
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. -- David Roundy http://www.darcs.net ___ Haskell

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 the common cases right, rather than going

Re: Repair to floating point enumerations?

2008-10-15 Thread David Roundy
On Wed, Oct 15, 2008 at 10:41:25AM +0100, Malcolm Wallace wrote: Dear Haskell-Primers (and libraries). Recently, Phil Wadler has pointed out a weird anomaly in the Haskell'98 Prelude, regarding numeric enumerations for Floats/Doubles: Prelude [0, 0.3 .. 1.1]

Re: Repair to floating point enumerations?

2008-10-15 Thread David Roundy
. Floating point numbers are not the real numbers, and the sooner they learn that the better. We can fudge this all we like, but 0.1 is never going to be exactly representable as a binary floating point number no matter what we do. On Wed, Oct 15, 2008 at 3:44 PM, David Roundy [EMAIL PROTECTED

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 people who neither care nor know

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 there

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. Where do the semantics of haskell say this? You should

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 principle it's not fine. A 'constant' should be constant over all time

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 program

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 contain

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 'runProcess' and expecting the same result as 'runCommand

[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! Anyone

Re: [Haskell-cafe] readFile and closing a file

2008-09-18 Thread David Roundy
On Thu, Sep 18, 2008 at 05:38:51PM +0200, Henning Thielemann wrote: On Wed, 17 Sep 2008, Mitchell, Neil wrote: I tend to use openFile, hGetContents, hClose - your initial readFile like call should be openFile/hGetContents, which gives you a lazy stream, and on a parse error call hClose. Yes,

Re: [Haskell-cafe] readFile and closing a file

2008-09-17 Thread David Roundy
On Wed, Sep 17, 2008 at 01:31:26PM +0200, Henning Thielemann wrote: Say I acquire a text by readFile, feed it to a lazy parser and the parser stops reading because of a parse error. After the parser error I won't fetch more characters from the text file, but readFile does not get to know

Re: [Haskell-cafe] about openTempFile

2008-09-17 Thread David Roundy
On Wed, Sep 17, 2008 at 02:10:56PM +0100, Dougal Stanton wrote: On Wed, Sep 17, 2008 at 1:17 PM, Manlio Perillo [EMAIL PROTECTED] wrote: The Python tempfile module, as an example, implements a wrapper around mkstemp function that does exactly this, and the code is portable; on Windows it

Re: [Haskell-cafe] about openTempFile

2008-09-17 Thread David Roundy
On Wed, Sep 17, 2008 at 04:51:07PM +0100, Mitchell, Neil wrote: But since GHC does not implement such a function, I was curious to know why it don't even implement a function that make sure the temporary file is removed. Because it is two lines to write, so no one has yet

Re: [Haskell-cafe] about openTempFile

2008-09-17 Thread David Roundy
On Wed, Sep 17, 2008 at 10:11:28PM +0200, Manlio Perillo wrote: David Roundy ha scritto: [...] In particular, the code Don quoted is incorrect depending on which import statements are used. If we assume that the default is the bracket available in Haskell 98, then it is definitely incorrect

Re: [Haskell-cafe] Can you do everything without shared-memory concurrency?

2008-09-10 Thread David Roundy
2008/9/9 Jed Brown [EMAIL PROTECTED]: On Tue 2008-09-09 12:30, Bruce Eckel wrote: So this is the kind of problem I keep running into. There will seem to be consensus that you can do everything with isolated processes message passing (and note here that I include Actors in this scenario even if

Re: [Haskell-cafe] Can you do everything without shared-memory concurrency?

2008-09-10 Thread David Roundy
On Wed, Sep 10, 2008 at 03:30:50PM +0200, Jed Brown wrote: On Wed 2008-09-10 09:05, David Roundy wrote: 2008/9/9 Jed Brown [EMAIL PROTECTED]: On Tue 2008-09-09 12:30, Bruce Eckel wrote: So this is the kind of problem I keep running into. There will seem to be consensus that you can do

Re: [Haskell-cafe] Consequences of implementing a library in Haskell for C consumption?

2008-09-05 Thread David Roundy
On Thu, Sep 04, 2008 at 08:04:25PM -0500, Austin Seipp wrote: Excerpts from Justin Bailey's message of Thu Sep 04 17:00:58 -0500 2008: Looking at the package, I think would be pretty painful though. It seems I'd have to build the AST by hand, The AST Language.C defines for C is actually

Re: [Haskell-cafe] Top Level -

2008-09-02 Thread David Roundy
On Tue, Sep 02, 2008 at 10:10:31AM +0100, Sittampalam, Ganesh wrote: Contrived example follows: module Module1 (mod1) where import Module2 glob1 :: IORef Int glob1 - mod2 = newIORef mod1 :: IO Int mod1 = readIORef glob1 module Module2 (mod2) where import

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread David Roundy
On Thu, Aug 28, 2008 at 01:17:29PM -0400, Dan Doel wrote: On Thursday 28 August 2008 12:26:27 pm Adrian Hey wrote: As I've pointed out several times already you can find simple examples in the standard haskell libs. So far nobody has accepted my challenge to re-implement any of these

Re: [Haskell-cafe] Cleaning up the Debian act (report from the trenches)

2008-08-27 Thread David Roundy
On Wed, Aug 27, 2008 at 1:58 AM, Jason Dagit [EMAIL PROTECTED] wrote: 2) Compile GHC yourself. You can even compile and install GHC (and most Haskell software) on a dedicated user account. In this way you avoid messing up you Debian installation if something goes wrong. I find with Debian

Re: [Haskell-cafe] Haskell Propeganda

2008-08-26 Thread David Roundy
On Sat, Aug 23, 2008 at 6:15 PM, Daniel Fischer [EMAIL PROTECTED] wrote: Am Samstag, 23. August 2008 23:17 schrieb Thomas Davie: I'd be interested to see your other examples -- because that error is not happening in Haskell! You can't argue that Haskell doesn't give you no segfaults, because

Re: [Haskell-cafe] X Haskell Bindings

2008-08-18 Thread David Roundy
On 8/16/08, Antoine Latter [EMAIL PROTECTED] wrote: The following is a summary of my plan so far. I'm interested in hearing any suggestions or concerns about what a Haskell library for writing X clients should look like. This is not a release announcement, and I can't make any promises

Re: [Haskell-cafe] Re: A Monad for on-demand file generation?

2008-07-03 Thread David Roundy
On Thu, Jul 03, 2008 at 07:09:58PM +0100, ChrisK wrote: Joachim Breitner wrote: * The 5th line does not have this effect. Because this gets desugared to (), the special implementation of () means that the next line still sees the same dependency state as the before the call to liftIO. You

Re: [Haskell-cafe] A Monad for on-demand file generation?

2008-07-01 Thread David Roundy
On Tue, Jul 01, 2008 at 10:22:35AM +, Joachim Breitner wrote: Hi, Am Dienstag, den 01.07.2008, 11:53 +0200 schrieb Ketil Malde: Joachim Breitner [EMAIL PROTECTED] writes: 1) unsafeInterleaveIO seems like a big hammer to use for this problem, and there are a lot of gotchas

Re: [Haskell-cafe] history of tuples vs pairs

2008-06-25 Thread David Roundy
, this is exactly how lists are implemented in lisp (which is where we get the tern 'cons'). The other difference is that nested tuples have the number of elements specified in the type, while lists do not. -- David Roundy Department of Physics Oregon State University

Re: [Haskell-cafe] Re: C buffer suggestions??

2008-06-23 Thread David Roundy
See the Data.ByteString.Internal docs: http://www.haskell.org/ghc/docs/latest/html/libraries/bytestring/Data-ByteString-Internal.html#v%3AtoForeignPtr Of course, you'd better not write to the contents of that pointer, or bad things could happen... David On Mon, Jun 23, 2008 at 08:18:23PM

Re: [Haskell-cafe] blas bindings, why are they so much slower the C?

2008-06-18 Thread David Roundy
On Wed, Jun 18, 2008 at 09:16:24AM -0700, Anatoly Yakovenko wrote: #include cblas.h #include stdlib.h int main() { int size = 1024; int ii = 0; double* v1 = malloc(sizeof(double) * (size)); double* v2 = malloc(sizeof(double) * (size)); for(ii = 0; ii size*size; ++ii) {

Re: [Haskell-cafe] blas bindings, why are they so much slower the C?

2008-06-18 Thread David Roundy
On Wed, Jun 18, 2008 at 06:03:42PM +0100, Jules Bean wrote: Anatoly Yakovenko wrote: #include cblas.h #include stdlib.h int main() { int size = 1024; int ii = 0; double* v1 = malloc(sizeof(double) * (size)); double* v2 = malloc(sizeof(double) * (size)); for(ii = 0; ii

Re: [Haskell-cafe] Design suggestion for Data.Binary.Defer

2008-06-17 Thread David Roundy
On Tue, Jun 17, 2008 at 07:55:51AM +0100, Neil Mitchell wrote: Hi, Hello! David: Is there any reason not to just write all lazy fields of variable size in a deferred manner? I completely hadn't though of this! You will loose a bit of time, for example reading fields which were

Re: [Haskell-cafe] Suggestion for implementation of vector library

2008-06-17 Thread David Roundy
On Tue, Jun 17, 2008 at 08:24:58AM -0700, John Meacham wrote: You can also create helper functions like v3 = Vector3 so you can do (v3 1 2 3 + v3 4 5 6) Or just use data Vector3 = V3 !Float !Float !Float and you've got compact pattern matching as well as constructing. David

Re: 答复 : [Haskell-cafe] How to do this in FP way?

2008-06-17 Thread David Roundy
On Tue, Jun 17, 2008 at 08:56:31AM -0700, Don Stewart wrote: dons: magicloud.magiclouds: OK. Here it is. I want to make a monitor tool for linux. It runs for a long time, and give out a certain process's io stat per second. The way I get io stat is to read from /proc/pid/io. But

Re: [Haskell-cafe] How to do this in FP way?

2008-06-16 Thread David Roundy
2008/6/15 Magicloud Magiclouds [EMAIL PROTECTED]: Hello, I am getting familiar with FP now, and I have a program design kind of question. Say I have something like this in C: static int old; int diff (int now) { /* this would be called once a second */ int ret = now - old; old

Re: [Haskell-cafe] Design suggestion for Data.Binary.Defer

2008-06-16 Thread David Roundy
On Mon, Jun 16, 2008 at 9:43 AM, Neil Mitchell [EMAIL PROTECTED] wrote: == The Question == Is there a simple way of tagging fields in a constructor as deferred, just once for reading and writing, and ideally outside the instance definition and not requiring additional code to unwrap? I can't

Re: [Haskell-cafe] 1/0

2008-06-16 Thread David Roundy
On Mon, Jun 16, 2008 at 4:07 PM, Evan Laforge [EMAIL PROTECTED] wrote: So, I know this has been discussed before, but: 1/0 Infinity 0/0 NaN ... so I see from the archives that Infinity is mandated by ieee754 even though my intuition says both should be NaN. There is a good reason for 1/0

Re: [Haskell-cafe] 1/0

2008-06-16 Thread David Roundy
On Mon, Jun 16, 2008 at 4:18 PM, David Roundy [EMAIL PROTECTED] wrote: On Mon, Jun 16, 2008 at 4:07 PM, Evan Laforge [EMAIL PROTECTED] wrote: Every other language throws an exception, even C will crash the program, so I'm guessing it's telling the processor / OS to turn these into signals

Re: [Haskell-cafe] 1/0

2008-06-16 Thread David Roundy
On Mon, Jun 16, 2008 at 04:50:05PM -0700, John Meacham wrote: On Mon, Jun 16, 2008 at 04:41:23PM -0700, Evan Laforge wrote: But what about that NaN-Integer conversion thing? I think that may be a bug or at least a misfeature. The standard is somewhat vauge on a lot of issues dealing with

Re: [Haskell-cafe] 1/0

2008-06-16 Thread David Roundy
On Mon, Jun 16, 2008 at 05:08:36PM -0700, Don Stewart wrote: droundy: On Mon, Jun 16, 2008 at 04:50:05PM -0700, John Meacham wrote: On Mon, Jun 16, 2008 at 04:41:23PM -0700, Evan Laforge wrote: But what about that NaN-Integer conversion thing? I think that may be a bug or at least

Re: [Haskell-cafe] 1/0

2008-06-16 Thread David Roundy
On Mon, Jun 16, 2008 at 05:39:39PM -0700, Don Stewart wrote: decodeFloat really ought to be a partial function, and this should be a crashing bug, if the standard libraries were better-written. It's a bug in the H98 report then: Section 6.4.6: The function decodeFloat applied

Re: [Haskell-cafe] elem of infinite set of tuple

2008-05-16 Thread David Roundy
you just answer your own question? -- 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] Fun with Darcs

2008-05-14 Thread David Roundy
On Wed, May 14, 2008 at 08:37:53PM +0100, Andrew Coppin wrote: Andrew Coppin wrote: Henning Thielemann wrote: As said, the IDE Leksah can display code exactly like this ... I noticed the first time. Clearly this is another toy I'm going to have to try out sometime... ...and then he

Re: [Haskell-cafe] Re: Interesting critique of Haskell

2008-05-09 Thread David Roundy
/not imported at a go. Would that be a nice feature? I don't know, possibly. Ordinary functions are easily split off from the Prelude. The only tricky bit is classes and class instances, and that's a Hard Problem, as far as I can tell. And, of course, only is quite an understatement here. -- David

Re: [Haskell-cafe] Re: Interesting critique of Haskell

2008-05-09 Thread David Roundy
On Fri, May 09, 2008 at 05:19:05PM +0100, Andrew Coppin wrote: Brent Yorgey wrote: On Fri, May 9, 2008 at 10:02 AM, Andrew Coppin [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: While I'm here - I'm aware of how you control importing [or not] from the Prelude. Is there a way

Re: [Haskell-cafe] MonadPlus

2008-05-09 Thread David Roundy
a) or even Monad (Either String)...] I am pretty certain that there is a monad instance for Either, but also don't know where it's defined. -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] GHC predictability

2008-05-09 Thread David Roundy
pattern, but then you lose some of the very nice abstractions that laziness gives us. -- 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] runInteractiveProcess and hGetLine on Windows

2008-05-07 Thread David Roundy
running. \r\n as newline should die a rapid death... windows is hard enough without maintaining this sort of stupidity. -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] runInteractiveProcess and hGetLine on Windows

2008-05-07 Thread David Roundy
On Wed, May 07, 2008 at 08:33:23AM -0700, Bryan O'Sullivan wrote: David Roundy wrote: This is the correct behavior (although it's debatable whether kpsewhich should be outputting in text mode). I think it would be more accurate to say that runInteractiveProcess has an inadequate API

Re: [Haskell-cafe] runInteractiveProcess and hGetLine on Windows

2008-05-07 Thread David Roundy
On Wed, May 07, 2008 at 07:48:45PM +0400, Bulat Ziganshin wrote: Hello David, Hi Bulat! Wednesday, May 7, 2008, 7:46:11 PM, you wrote: I don't see any reason to support text mode. It's easy to filter by hand if you absolutely have to deal with ugly applications on ugly platforms. you

Re: [Haskell-cafe] runInteractiveProcess and hGetLine on Windows

2008-05-07 Thread David Roundy
On Wed, May 7, 2008 at 9:12 AM, Donn Cave [EMAIL PROTECTED] wrote: Doesn't hGetLine imply text mode? What does Line mean, otherwise? On normal operating systems, line means until you reach a '\n' character. In fact, that's also what it means when reading in text mode, it's just that when in

Re: [Haskell-cafe] runInteractiveProcess and hGetLine on Windows

2008-05-07 Thread David Roundy
On Wed, May 07, 2008 at 09:24:46PM +0100, Duncan Coutts wrote: On Wed, 2008-05-07 at 08:46 -0700, David Roundy wrote: On Wed, May 07, 2008 at 08:33:23AM -0700, Bryan O'Sullivan wrote: David Roundy wrote: This is the correct behavior (although it's debatable whether kpsewhich should

Re: [Haskell-cafe] approximating pi

2008-04-28 Thread David Roundy
Monte Carlo (although, alas the fermion problem means that for most QMC calculations one *doesn't* get a rigorous error bar on the calculation... it's just better than almost any other method, and for bosons you *can* get a rigorous error bar). -- David Roundy Department of Physics Oregon State

Re: [Haskell-cafe] Re: Laziness and Either

2008-04-23 Thread David Roundy
, you could take the silly metaphor even further data Creek a = a : (Creek a) | Ocean | Drought String :) -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

Re: [Haskell-cafe] Re: [Haskell] Matrix multiplication

2008-04-23 Thread David Roundy
haven't looked at 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

[Haskell-cafe] Re: [darcs-devel] announcing franchise 0.0

2008-04-23 Thread David Roundy
On Wed, Apr 23, 2008 at 06:43:42PM +0200, Marc Weber wrote: On Fri, Apr 18, 2008 at 08:37:06AM -0700, David Roundy wrote: I'm pleased to announce the existence (not release, properly) of franchise, a new configuration/build system for Haskell programs and packages. Hi David! I like

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

2008-04-23 Thread David Roundy
:: STM (TVar Int) vv - readTVar v unless (vv 50) retry -- 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] Cabalizing darcs

2008-04-23 Thread David Roundy
, and copy the files into it, the usual autoconf, and it should then work as normal; if this doesn't work for you, I'd appreciate knowing). It certainly doesn't work for me. -- David Roundy Department of Physics Oregon State University signature.asc Description: Digital signature

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

2008-04-23 Thread David Roundy
On Wed, Apr 23, 2008 at 01:46:53PM -0700, Ryan Ingram wrote: On 4/23/08, David Roundy [EMAIL PROTECTED] wrote: I'm confused as to how your retryUntil gains you anything. If any of the TVars used in the expensive_computation change while waiting for a retry, then the expensive_computation

[Haskell-cafe] Re: [Haskell] How to define tail function for Even/Odd GADT lists?

2008-04-23 Thread David Roundy
2008/4/23 Martijn Schrage [EMAIL PROTECTED]: It depends a bit on what you want to use these lists for, but the following encoding works for your examples and doesn't need the type class. data E data O type Even = (E,O) type Odd = (O,E) That's a nice little trick! I like how you

Re: [Haskell-cafe] Re: [Haskell] How to define tail function for Even/Odd GADT lists?

2008-04-23 Thread David Roundy
also do the following: data EvenList a = Nil | ConsE a (OddList a) data OddList a = ConsO a (EvenList a) This does not use any type system extensions. -Iavor On Wed, Apr 23, 2008 at 4:46 PM, David Roundy [EMAIL PROTECTED] wrote: 2008/4/23 Martijn Schrage [EMAIL

Re: [Haskell-cafe] Glome.hs-0.3 and other things

2008-04-21 Thread David Roundy
On Mon, Apr 21, 2008 at 11:54 AM, Andrew Coppin [EMAIL PROTECTED] wrote: I suppose the idea is that Haskell is supposed to help you work at a higher level of abstraction, so you can concentrate on building better *algorithms* which require less work in the first place. Surely using an

[Haskell-cafe] announcing franchise 0.0

2008-04-18 Thread David Roundy
--user --prefix=$HOME if you don't want to actually install it, just run runghc Setup.hs build I think that's all (and obviously, in no particular order). I hope you enjoy franchise, or if you don't enjoy franchise, I hope you don't tell me about it. David Roundy P.S. A franchise build file

Re: [Haskell-cafe] announce: Glome.hs-0.3 (Haskell raytracer)

2008-04-18 Thread David Roundy
core is running at something like 60% of it's CPU capacity due to memory contention. It's possible that your system is comparably limited, although I'd be suprised, somehow it seems unlikely that your ray tracer is stressing the cache all that much. -- David Roundy Department of Physics Oregon

Re: [Haskell-cafe] announce: Glome.hs-0.3 (Haskell raytracer)

2008-04-18 Thread David Roundy
memory accesses really would be localized (assuming that you actually do have localize memory-access patterns). Of course, also ask yourself how much memory your program is using in total. If it's not much more than 512kB, for instance, we may have misdiagnosed your problem. -- David Roundy

Re: [Haskell-cafe] Re: Shouldn't this loop indefinitely = take (last [0..]) [0..]

2008-04-07 Thread David Roundy
. And of course it is also not always more efficient than strict numbers. -- 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: Shouldn't this loop indefinitely = take (last [0..]) [0..]

2008-04-07 Thread David Roundy
On Mon, Apr 07, 2008 at 04:52:51AM -0700, John Meacham wrote: On Mon, Apr 07, 2008 at 04:45:31AM -0700, David Roundy wrote: I wonder about the efficiency of this implementation. It seems that for most uses the result is that the size of a Nat n is O(n), which means that in practice you

[Haskell-cafe] announcing the darcs 2.0.0 release

2008-04-07 Thread David Roundy
. This is quite a nice system. Unfortunately, it is also a rather labor-intensive process, and due to a lack of contributors, we've moving to a more streamlined process. Starting with the darcs 2.0.0 release, there will be just one central branch of darcs and only one maintainer: for now this is me, David

Re: [Haskell-cafe] announcing the darcs 2.0.0 release

2008-04-07 Thread David Roundy
that darcs 1.0.x isn't going to see another release. If you don't want to switch to eventually darcs 2.0, then I would strongly recommend that you switch to some other revision constrol system. -- David Roundy Department of Physics Oregon State University

Re: [Haskell-cafe] Re: Shouldn't this loop indefinitely = take (last [0..]) [0..]

2008-04-04 Thread David Roundy
where Haskell decided to remove mathematical elegance for pragmatic speed... (Not that it isn't a worthwhile trade off, but it is still loosing something to gain something else) Personally, I like Ints. -- David Roundy Department of Physics Oregon State University

Re: [Haskell-cafe] Role based access control via monads or arrows or... something

2008-04-03 Thread David Roundy
an elegant or satisfactory (or complete) solution. -- 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: Role based access control via monads or arrows or... something

2008-04-03 Thread David Roundy
On Thu, Apr 03, 2008 at 05:31:16PM +0200, apfelmus wrote: David Roundy wrote: Luke Palmer wrote: porrifolius wrote: (7) ideally required permissions would appear (and accumulate) in type signatures via inference so application code knows which are required and type checker can reject

Re: [Haskell-cafe] announce: Glome.hs raytracer

2008-03-26 Thread David Roundy
times it is called. The only trouble is that unsafePerformIO (I believe) can inhibit optimizations, since there are certain transformations that ghc won't do to unsafePerformIO code. -- David Roundy Department of Physics Oregon State University

Re: [Haskell-cafe] announce: Glome.hs raytracer

2008-03-26 Thread David Roundy
imagine that manual tracing is likely to be far less invasive (if you do it somewhat discretely) than profiling or using hpc. -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

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

2008-03-17 Thread David Roundy
On Wed, Mar 12, 2008 at 9:27 PM, Don Stewart [EMAIL PROTECTED] wrote: You could consider binding directly to the C functions, if needed, {-# OPTIONS -fffi -#include math.h #-} import Foreign.C.Types foreign import ccall unsafe math.h log10 c_log10 :: CDouble - CDouble

Re: [Haskell-cafe] Re: Small displeasure with associated type synonyms

2008-03-07 Thread David Roundy
as ordinary algebraic data constructors) are injective. So we have: Yay, that's what I though! (but was hesitant to suggest anything, since I've never actually used associated anything...) It's nice to hear that I do understand some of this stuff. :) -- David Roundy Department of Physics Oregon

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

2008-02-20 Thread David Roundy
actually be created. i.e. how could you implement fmapBS :: (a - b) - ByteString' a - ByteString' b -- David Roundy Department of Physics Oregon State University ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

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

2008-02-08 Thread David Roundy
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 Roundy Department of Physics

[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 do recommend that you try

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

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

2008-01-25 Thread David Roundy
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 add the --timings flag, which will add some timestamps (alas, with only 1s resolution) that might be helpful. -- David Roundy Department

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 about

Re: [Haskell-cafe] announcing darcs 2.0.0pre3

2008-01-23 Thread David Roundy
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 anything This is precisely what we do in darcs. :) -- David Roundy Department of Physics

[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 looking for help, from users willing

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

2008-01-23 Thread David Roundy
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
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 Physics Oregon State University

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

2008-01-23 Thread David Roundy
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't know. Is it reasonable? I suspect so. -- David Roundy Department of Physics Oregon

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 never died until I was testing

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

2008-01-19 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

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

2008-01-18 Thread David Roundy
, 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

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

2008-01-16 Thread David Roundy
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 performance problems, if you can... and I don't doubt that there are more out there. -- David Roundy Department of Physics Oregon

  1   2   3   4   5   >