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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
-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
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.
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
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
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
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
:: (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
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
.
--
David Roundy
Department of Physics
Oregon State University
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
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
(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
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
...
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
'?
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
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
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
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
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
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
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
. 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
...
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
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
; 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
) 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
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
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
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
: 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
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
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
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
, 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
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
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
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
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
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
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
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
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
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
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
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
! * ... * 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
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
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
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
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
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
101 - 200 of 445 matches
Mail list logo