Interesting, I hadn't thought of the SYB approach. I still need to get
through those papers. Actually, I wonder if this idea would help with
something else I was looking into. It seems like it might occasionally
be useful to have a monad that is the identity, except that it forces
evaluation as
Sounds great, thanks!
-Chad
On 10/16/06, Simon Marlow [EMAIL PROTECTED] wrote:
GHC 6.6 does run code in parallel on SMP hardware, but the GC is still single
threaded. We have a prototype parallel GC, and I'm planning to work on it some
more in the next few months... you'll probably see it in
--
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell
End of Haskell Digest, Vol 38, Issue 6
**
--
Chad Scherrer
Time flies like an arrow; fruit flies like a banana -- Groucho Marx
interactive:1:0: Not in scope: `tokens'
Any idea where it went?
Thanks,
--
Chad Scherrer
Time flies like an arrow; fruit flies like a banana -- Groucho Marx
___
Haskell mailing list
) - ByteString - [ByteString]
tokens f = List.filter (not.null) . splitWith f
Duncan
Ok, I'll just do it that way. Thanks!
--
Chad Scherrer
Time flies like an arrow; fruit flies like a banana -- Groucho Marx
___
Haskell mailing list
Haskell@haskell.org
http
Tamas,
try
scanl (+) 0
for the cumulative sum
From there the zipWith idea you mentioned seems like the way to go.
-Chad
Hi,
I have two lists, p and lambda (both are finite). I would like to
calculate
1) the cumulative sum of lambda, ie if
lambda = [lambda1,lambda2,lambda3,...]
then
I'm trying to use Data.Time, and I'm totally confused. DiffTime is
abstract, and I don't see anything that maps into it. How do I
construct one? I would like to then use the result to create a value
of type UTCTime, but it seems (currently) like this might be easier.
Thanks,
--
Chad Scherrer
Ok, that's much simpler than I was making it. fromIntegral or
fromRational does the trick. Obvious in hindsight, I guess. Thanks!
-Chad
On 10/2/06, Ashley Yakeley [EMAIL PROTECTED] wrote:
Chad Scherrer wrote:
I'm trying to use Data.Time, and I'm totally confused. DiffTime is
abstract, and I
Hang on, hang on, now I'm getting confused.
First you asked for the smallest (positive) x such that
1+x /= x
which is around x=4.5e15.
Then Joachim wondered if you wanted
1+x /= 1
which is around x=2.2e-16.
But not you claim to be looking for the smallest positive number that
a Double
--
Chad Scherrer
Time flies like an arrow; fruit flies like a banana -- Groucho Marx
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
not just do
something like this (in ghci)?
Prelude let sq x y = if x == x then y else y
Prelude 1 `sq` 2
2
Prelude (length [1..]) `sq` 2
Interrupted.
There must be a subtlety I'm missing, right?
--
Chad Scherrer
Time flies like an arrow; fruit flies like a banana -- Groucho Marx
There must be a subtlety I'm missing, right?
What if the types are not instances of Eq?
Jason
Thanks, I figured it was something simple. Now I just to convince
myself there's no way around that. Is there a proof around somewhere?
--
Chad Scherrer
Time flies like an arrow; fruit flies
! Of course there is no problem
if you don' use the higher order function $. Use parens instead
x = runST (return 1)
Simon
| -Original Message-
| From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
| Chad Scherrer
| Sent: 19 July 2006 23:02
| To: haskell-cafe@haskell.org
The IO monad hasn't given me too much trouble, but I want to be sure
to structure things the way they should be. If I get everything
running using IO first and then have type-checking problems with ST,
it will be tempting to just slap on an unsafePerformIO and call it
good. Sure, it's really
!
--
Chad Scherrer
Time flies like an arrow; fruit flies like a banana -- Groucho Marx
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
depends on the value
of x. Hence you get a circular problem, which would non-terminate, but
the compiler can spot this self-dependance and says loop instead.
Maybe one of your two other functions have this problem?
Thanks
Neil
--
Chad Scherrer
Time flies like an arrow; fruit flies like a banana
maybe I needed to replace 1 with (1 :: Int) so the state
representation didn't force the type, but it still gives the same
result.
Can someone point me to the simplest possible runST example that
actually works? Thanks!
--
Chad Scherrer
Time flies like an arrow; fruit flies like a banana
Whoa. That changes everything I thought I knew about ($). Come to
think of it, one of the examples that does work it written
main = print $ runST f
where f is defined separtely. So that's consistent.
I'll take a look at the references. Thanks!
Indeed. The short answer: use
runST (long
mapM_ (x0 +=) xs
x0
--
Chad Scherrer
Time flies like an arrow; fruit flies like a banana -- Groucho Marx
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Are the types of (result x) and result' not exactly the same?
--
Chad Scherrer
Time flies like an arrow; fruit flies like a banana -- Groucho Marx
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Now and again I see references to deepSeq, and I've never understood
how this could be any different than using rnf from
Control.Parallel.Strategies. Is there really any difference? When is
it better to use one or the other?
Thanks,
--
Chad Scherrer
Time flies like an arrow; fruit flies like
yet, and already the
mainstream-to-be is taking over the google results. Googling for
microsoft monad gives all powershell and no MS Research!
--
Chad Scherrer
Time flies like an arrow; fruit flies like a banana -- Groucho Marx
___
Haskell-Cafe mailing
Yep, that's its codename.
Now, I'm not much of a Windows person. Is the name just a weird
coincidence, or does it have anything to do with monads as we know
them?
http://en.wikipedia.org/wiki/MSH_(shell)
--
Chad Scherrer
Time flies like an arrow; fruit flies like a banana -- Groucho Marx
Hi,
I'm interested in attending the Hackathon, but I don't have any
previous experience working on compilers. I think it could be a great
learning experience, but I certainly don't want to slow progress on any
work by just hanging around asking questions. I'm a
mathematician/statistician, and my
Findler [EMAIL PROTECTED] wrote:
Just out of curiosity, did you try wc -l?RobbyOn Jun 29, 2006, at 1:18 PM, Chad Scherrer wrote: I have a bunch of data files where each line represents a data point. It's nice to be able to quickly tell how many data points I
have. I had been using wc, like this: % cat
Then I should be thanking Duncan as well (thanks!). I had seen the array fusion idea before in the NDP work, but I hadn't thought of applying to this area. I wonder where else the concept might apply? Is there a typeclass to be built?
-- Chad ScherrerTime flies like an arrow; fruit flies like a
Thanks for all the replies - this has helped a lot!
ChadOn 6/12/06, Chad Scherrer [EMAIL PROTECTED] wrote:
Ok, so I'm doing things somewhat backward. I've been using Haskell for
a while now, whenever I get a chance to. But in order to become more
involved in high-performance computing projects
Ok, so I'm doing things somewhat backward. I've been using Haskell for
a while now, whenever I get a chance to. But in order to become more
involved in high-performance computing projects at my work, I need to
learn C.
I've heard a lot of people say that experience in Haskell can improve
one's
Subject: Re: [Haskell-cafe] Learning C after HaskellTo: Chad Scherrer [EMAIL PROTECTED]hi,C is very different from Haskell.* you'lle have to manage explicitly memory de/allocation.
* c programming is a bit like haskell io monad programming (butwithout the functionnal part) :you'lle use = in place
Philip,you wrote:-I am trying to learn Haskell. As an exercise, I wrote afunction to create a binary tree in level-order. I am attaching
the code. I am sure there are a number of places wherethe code could be
On 5/20/06, Donald Bruce Stewart [EMAIL PROTECTED] wrote:
Data.ByteString is in the base libraries now.For a bit of the flavour, see:http://haskell.org/haskellwiki/Wc
In this message
http://article.gmane.org/gmane.comp.lang.haskell.general/13625
Bulat says,
i foresee that Streams + Fast Packed
Thanks, Bulat. I'm looking forward to trying it out this weekend.
Is there any indication what fast IO approach might work its way into
the standard libraries? It would be nice for idiomatic Haskell to be
really fast by default, and I'd love to be able to show off the language
shootout
It sounds like Bulat has gotten some impressive I/O speedups with his Streams library. I'd like to try this out, but I'm having some trouble installing it. I'm using GHC on Linux.My first attempt was looking around on this page:
http://www.haskell.org/haskellwiki/Library/StreamsThere's a really
://haskell.org/haskellwiki/Library/Streams and download it as
http://freearc.narod.ru/Streams.tar.gzfrom a thread in February entitled:Streams: the extensible I/O library (Feb 21)Googlesite:haskell.org bulat extensible I/O library for the thread, etc.
Hope that helps,Jared.On 5/19/06, Chad Scherrer
On Mon, 2006-05-08 at 12:19 +0100, Simon Marlow wrote:
My understanding is that for the 32-bit version, this all works in
parallel, but GC is sequential. Is that still the case? Is the 64-bit
version in the same state?
nested data parallelism: not yet. forkIO, MVars, STM, par, and
Phil, thanks for the response.
I was thinking about the dynamic behavior of par, and there's something that's a little confusing to me. Am I right in understanding that (x
`par` y) evaluates to y, and may or may not evaluate x along the way?The reason that par doesn't necessarily evaluate it's
Hi,
I'd like to get more involved in parallel programming in Haskell, and I
have access to an SGI Altix machine (a shared-memory multiprocessor).
Can someone tell me, if I download a 64-bit GHC 6.5 snapshot, to what
extent will parallelism just work? Specifically, I'm interested in
* parallel
.
Or, if you're using ghci, you could just do
s - load
parse s
This is because ghci executes in the IO monad (maybe there are some
details of this I'm missing, but that's how I think of it anyway.
BTW, your load function could be equivalently written simply as
load = readFile parse.hs
-Chad
101 - 138 of 138 matches
Mail list logo