[This message is literate Haskell]
Hi -cafe,
I was trying to use Monad.foldM in the State monad recently and ran into some
performance issues. They were eventually fixed with seq, but along the way I
made some discoveries, which I thought I would share.
The Report defines foldM as
foldM
k2msmith:
> I'm using the Control.Parallel package on ghc version 6.10.4 and I don't seem
> to be getting any parallel threads or sparks created at all with the
> "-threaded" compilation option using runtime flags "+RTS -N2". I'm using
> simple examples from the paper "A Tutorial on Parallel and C
I'm using the Control.Parallel package on ghc version 6.10.4 and I don't
seem to be getting any parallel threads or sparks created at all with the
"-threaded" compilation option using runtime flags "+RTS -N2". I'm using
simple examples from the paper "A Tutorial on Parallel and Concurrent
Programm
Sorry for a mistake.
"Shiyou Wang" is my identity in a private chinese group.
Sorry for the confusing. :-(
Eric
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
> By "simulation way", do you mean "object-oriented way"?
they are similar, but not equal, I think.
OO is great for simulation, but simulation does not necessarily use OO.
Virtual machine simulates real machines, you can use OO language to
do it, but most use C in the real world I think. So, simu
When I was using C and Python, I used to think of most applications in an
simulation way. I think it's right to say that programs are simulations.
But now I have to change my mind in Haskell, I have to think in a data-flow
way, that is: data in, processing using function composition, data out.
On Tue, Aug 18, 2009 at 5:19 PM, Eric Wong wrote:
> Thanks for all your post.
>
> When I was using C and Python, I used to think of most applications in an
> simulation way. I think it's right to say that programs are simulations.
On a philosophical note, this is a sign of expertise. Humans tend
2009/08/18 Eric Wong :
> When I was using C and Python, I used to think of most
> applications in an simulation way.
By "simulation way", do you mean "object-oriented way"?
--
Jason Dusek
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://w
Thanks for all your post.
When I was using C and Python, I used to think of most applications in an
simulation way. I think it's right to say that programs are simulations.
But now I have to change my mind in Haskell, I have to think in a data-flow
way, that is: data in, processing using function
It is interesting to note that recent work on AFRP (arrow-based FRP) -
namely "Causal Commutative Arrows" - optimizes a complete circuit of arrows
("interconnected objects" if you prefer to think that way) that all have
local state and local feedback loops into one large state and feedback loop,
Eric Wong wrote:
> I used to think about a physical engine in a similar way, and I think
> it can work. But in some simulations that objects have lots of
> dependencies on others can be tricky. For instance, object o1 depends
> on o2, if we represent them in pure values, when we update o2, then o
You could read:
http://www.cs.nott.ac.uk/~nhn/FoPAD2007/Talks/nhn-FoPAD2007.pdf
http://haskell.cs.yale.edu/yale/papers/haskell-workshop03/yampa-arcade.pdf
http://www.cs.nott.ac.uk/~nhn/Talks/HW2002-FRPContinued.pdf
http://www.haskell.org/yale/papers/haskellworkshop02/index.html
http://www.haskell.o
Here is something:
http://cpansearch.perl.org/src/AUTRIJUS/Language-Haskell-0.01/hugs98-Nov2003/fptools/hslibs/text/html/doc/doc.htm
(Link found in an old haskell-cafe message)
Sjoerd
On Aug 18, 2009, at 4:18 PM, Johan Tibell wrote:
On Tue, Aug 18, 2009 at 4:02 PM, Colin Paul
Adams wrote:
ht
I used to think about a physical engine in a similar way, and I think it
can work. But in some simulations that objects have lots of dependencies
on others can be tricky. For instance, object o1 depends on o2, if we
represent them in pure values, when we update o2, then o1 must be
updated with a
> Then what's the best way to simulate private states or just
> instead how to
> solve simulation problems such as a physical engine using
> the haskell way?
perhaps Hipmunk ?
http://hackage.haskell.org/package/Hipmunk
___
Haskell-Cafe mailing list
H
Max Desyatov wrote:
Bernhard Lehnert writes:
Windows has a command "start" which you can use e.g. via System.Process.proc.
Thank you, Magnus - this is exactly what I was looking for. (By the way,
someone should implement something like this for GNOME and KDE,
too ;-) )
You can do that using
On Mon, Aug 17, 2009 at 12:12 AM, Thomas van Noort wrote:
> Somehow I didn't receive David's mail, but his explanation makes a lot of
> sense. I'm still wondering how this results in a type error involving rigid
> type variables.
"rigid" type means the type has been specified by the programmer som
On Tue, 2009-08-18 at 22:37 +0200, Krzysztof Skrzętnicki wrote:
> It is. From command line:
>
> cabal install package --enable-documentation
>
> or add line
> "documentation: True"
> to .cabal/config or equivalent.
>
> Best regards
>
> Krzysztof Skrzętnicki
>
Thanks a lot.
Regards
signatur
It is. From command line:
cabal install package --enable-documentation
or add line
"documentation: True"
to .cabal/config or equivalent.
Best regards
Krzysztof Skrzętnicki
On Tue, Aug 18, 2009 at 22:29, Maciej Piechotka wrote:
> Is it possible to automatically (or non-automatically) install
Is it possible to automatically (or non-automatically) install
documentation when installing package with cabal-install?
Regards
signature.asc
Description: This is a digitally signed message part
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
h
On Tuesday 18 August 2009, Maurício CA wrote:
> > ...) But for simulation kind-of problems, in which I think OO
> > really fits the best, what's the haskell way to structure such problems?
> > I once thought maybe I can use the State monad to simulate objects. But
> > it's really hard for me to im
Simon Michael writes:
> I can give a +1 vote for the Hack api and related libs. (Jinjing Wang
> is a one-man army.) Below hack you'll run happstack or another
> web-serving lib. Above hack you might run some combination of loli,
> maid, the hack middleware modules, hsp.
>
> The advantage is that
I've been in a situation a lot lately where I need to keep a collection of
values, and keep track of them by a persistent index.
IO and ST refs can do this, but for various reasons I can't/don't want to
use them.
My first hacked up attempt is as follows:
data IndexedCollection a = IndexedCollecti
I'd also give a read to this website:
http://jekor.com/article/is-haskell-a-good-choice-for-web-applications
Interesting read about a guy who actually used Haskell to create his website
from the ground up.
On Tue, Aug 18, 2009 at 9:56 AM, Colin Paul Adams
wrote:
> > "Jake" == Jake McArthur
Bernhard Lehnert writes:
>> Windows has a command "start" which you can use e.g. via System.Process.proc.
>
> Thank you, Magnus - this is exactly what I was looking for. (By the way,
> someone should implement something like this for GNOME and KDE,
> too ;-) )
You can do that using MIME, look at
I can give a +1 vote for the Hack api and related libs. (Jinjing Wang is a one-man army.) Below hack you'll run
happstack or another web-serving lib. Above hack you might run some combination of loli, maid, the hack middleware
modules, hsp.
The advantage is that changing the low-level server in
...) But for simulation kind-of problems, in which I think OO
really fits the best, what's the haskell way to structure such problems?
I once thought maybe I can use the State monad to simulate objects. But it's
really hard for me to implement, because I think State monad is used to
simulate a g
2009/8/18 Dusan Kolar :
> Dlists maybe good it all the app is written using them. Probably not good
> idea to switch to them in the middle of project...
I have a different criterion for DLists. I think they are best to use
in small scopes (I think the same of monads), as opposed to
interfacing be
On Tue, Aug 18, 2009 at 18:23, Bulat Ziganshin wrote:
> Hello Sean,
>
> Tuesday, August 18, 2009, 7:49:21 PM, you wrote:
>
> > writeFile "/dev/null" $ show $ [1 .. 10001000]
>
> it may be dominated by show+writeFile. i suggest you to compute, say,
> sum of all elements instead
>
Thank you, Bula
Hello Sean,
Tuesday, August 18, 2009, 7:49:21 PM, you wrote:
> writeFile "/dev/null" $ show $ [1 .. 10001000]
it may be dominated by show+writeFile. i suggest you to compute, say,
sum of all elements instead
--
Best regards,
Bulatmailto:bulat.zigans...@gmail.com
> >>> During a small project I'm trying to develop a small application. It
> >>> becomes quite often that I need a function mapapp:
> >>>
> >>> mapapp _ [] ap = ap
> >>> mapapp f (a:as) ap = f a : map f as ap
>
> >> Of course,
> >>> (map f list) ++ append
> >>> would do the same as
> >>>
> >>>
> "Jake" == Jake McArthur writes:
Jake> Colin Paul Adams wrote:
>> One problem will be to get GHC ported to DragonFly BSD, but
>> that can wait until I have a test version of the site working
>> on Linux.
Jake> I would love to see this. It's the biggest thing blocking me
I forgot to also mention this somewhat recent announcement for a
pedantically type safe HTML library:
http://www.haskell.org/pipermail/haskell-cafe/2009-August/064907.html
- Jake
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskel
Colin Paul Adams wrote:
One problem will be to get GHC ported to DragonFly BSD, but that can
wait until I have a test version of the site working on Linux.
I would love to see this. It's the biggest thing blocking me from trying
Dragonfly more seriously.
WASH attracts me, with it's guarante
On Tue, Aug 18, 2009 at 4:02 PM, Colin Paul
Adams wrote:
> http://www.haskell.org/ghc/docs/latest/html/libraries/xhtml/Text-XHtml.html
> says:
>
> "Based on the original Text.Html library by Andy Gill. See
> http://www.cse.ogi.edu/~andy/html/intro.htm for an introduction to
> that library. "
>
> Bu
I'm intending to replace my current website - which uses Drupal, with
a hand-written-in-Haskell version this autumn, for a number of reasons
(a principal one is the lack of an upgrade path in Drupal). So I'm
currently looking into the libraries available to see how much I'll
have to write myself.
Hello Zefirov,
Tuesday, August 18, 2009, 5:55:19 PM, you wrote:
> Why isn't possible to lookup and call user-defined functions while
> performing Template Haskell actions?
if i understood correctly what you mean - it's possible. the function
just need to be defined in module imported by current
http://www.haskell.org/ghc/docs/latest/html/libraries/xhtml/Text-XHtml.html
says:
"Based on the original Text.Html library by Andy Gill. See
http://www.cse.ogi.edu/~andy/html/intro.htm for an introduction to
that library. "
But that link gives a not-found page.
Anyone know where it is know?
--
There was a missing include in the cabal file. fixed...
On Mon, Aug 17, 2009 at 7:49 PM, Jeff Heard wrote:
> All, I've released a raw binding to the OpenCL platform on Hackage.
> The main differences between it and the C bindings are that constants
> have been replaced by newtypes for type safety
You need to look into functional reactive programming, but be warned, this
is active research :-)
Two libraries I know of in which you can currently make working simulations
are Yampa and Elerea. But the former doesn't scale really well, and the
latter might not really be functional (I think it's n
Why isn't possible to lookup and call user-defined functions while performing
Template Haskell actions?
Just like the way Template Haskell looks up and calls 'f' in $(f ...). 'f' gets
looked up and called. And user of Q monad cannot do that.
A colleague of mine, a Lisp user, says that almost ev
Ertugrul Soeylemez wrote:
> computation :: State [Object] Result
> computation = do
> objs0 <- get
> (result, objs1) <- doSomethingWith objs0
> put objs1
> return result
Misindented, sorry. Again:
computation :: State [Object] Result
computation = do
objs0
Eric Wong wrote:
> I'm relatively new to haskell and due to my strong imperative
> background, it's really a pain to learn haskell. But I'm really
> indulged in it. :)
>
> Now I think I understand the basics of Haskell very well, such as the
> type system and monad. And for those data-flow kind o
module Main where
mymap f xs = m xs
where m [] = []
m (x:xs) = f x:m xs
mymapp1 f xs ys = m xs
where m [] = ys
m (x:xs) = f x:m xs
mymapp2 f [] ys = ys
mymapp2 f (x:xs) ys = f x:mymapp2 f xs ys
mapp1 f xs ys = (f`map`xs) ++ ys
mapp2 f xs ys = (f`mymap`xs)
> "Magnus" == Magnus Therning writes:
Magnus> Ouch, there only seems to be a version of 6.10.3 in Fedora
Magnus> 11, if I read this correctly:
Magnus> https://admin.fedoraproject.org/pkgdb/packages/name/ghc
Magnus> (I'm not a Fedora user so I might be completely confused
M
Clemens Fruhwirth writes:
> 2009/8/18 Dusan Kolar :
>> Hello all,
>>
>> During a small project I'm trying to develop a small application. It
>> becomes quite often that I need a function mapapp:
>>
>> mapapp _ [] ap = ap
>> mapapp f (a:as) ap = f a : map f as ap
>>
>> I tried hoogle to find suc
Dusan Kolar writes:
> Dlists maybe good it all the app is written using them. Probably not good
> idea to switch to them
> in the middle of project...
>
> I know it is lazy, but I don't think it is able to eliminate operations, is
> it?
>
> At least intuitively, the map f list takes n*C ticks (
Hello, Haskellers!
I'm relatively new to haskell and due to my strong imperative background, it's
really a pain to learn haskell. But I'm really indulged in it. :)
Now I think I understand the basics of Haskell very well, such as the type
system and monad. And for those data-flow kind of applic
2009/8/18 Dusan Kolar :
> Hello all,
>
> During a small project I'm trying to develop a small application. It
> becomes quite often that I need a function mapapp:
>
> mapapp _ [] ap = ap
> mapapp f (a:as) ap = f a : map f as ap
>
> I tried hoogle to find such a function with no success. Is there
Dlists maybe good it all the app is written using them. Probably not
good idea to switch to them in the middle of project...
I know it is lazy, but I don't think it is able to eliminate operations,
is it?
At least intuitively, the map f list takes n*C ticks (C is for
application of f and lis
> > mapapp _ [] ap = ap
> > mapapp f (a:as) ap = f a : map f as ap
>
> What does mapapp do? What is its type?
Never mind, I've got it now.
Alistair
*
Confidentiality Note: The information contained in this message,
and any attachmen
Hello Dusan,
Tuesday, August 18, 2009, 2:50:38 PM, you wrote:
> but with less efficiency. Or am I wrong?
probably wrong. haskell is lazy language
also there is differential lists (dlist) implementation on hackage
--
Best regards,
Bulatmailto:bulat.zigans...@gma
Dusan Kolar wrote:
> Hello all,
>
> During a small project I'm trying to develop a small application. It
> becomes quite often that I need a function mapapp:
>
> mapapp _ [] ap = ap
> mapapp f (a:as) ap = f a : map f as ap
>
> I tried hoogle to find such a function with no success. Is there any
>
> From: haskell-cafe-boun...@haskell.org
> [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Dusan Kolar
>
> During a small project I'm trying to develop a small
> application. It
> becomes quite often that I need a function mapapp:
>
> mapapp _ [] ap = ap
> mapapp f (a:as) ap = f a : m
Hi.
Have you done any measurements that prove that such a function would
indeed increase performance noticeably?
2009/8/18 Dusan Kolar :
> Hello all,
>
> During a small project I'm trying to develop a small application. It
> becomes quite often that I need a function mapapp:
>
> mapapp _ [] ap =
Hello all,
During a small project I'm trying to develop a small application. It
becomes quite often that I need a function mapapp:
mapapp _ [] ap = ap
mapapp f (a:as) ap = f a : map f as ap
I tried hoogle to find such a function with no success. Is there any
function/functions built-in "st
> -Original Message-
> From: Eugene Kirpichov [mailto:ekirpic...@gmail.com]
> Sent: Tuesday, August 18, 2009 11:28 AM
> To: Zefirov Sergey
> Cc: haskell-cafe@haskell.org
> Subject: Re: [Haskell-cafe] Grouping and SIMD in parallel Haskell
> (using Nested Data Parallel Haskell ideas in legacy
> "Magnus" == Magnus Therning writes:
Magnus> On Tue, Aug 18, 2009 at 10:25 AM, Colin Paul
Magnus> Adams wrote:
>> I installed GHC 6.10.4 (as ./configure said it was required)
>> from a .bz2 file on the GHC downloads page. I then tried
>> ./configure for the platform again
On Tue, Aug 18, 2009 at 10:25 AM, Colin Paul
Adams wrote:
> I installed GHC 6.10.4 (as ./configure said it was required) from a
> .bz2 file on the GHC downloads page. I then tried ./configure for the
> platform again, and got:
What distribution of Linux do you use?
I'd strongly suggest getting it
I installed GHC 6.10.4 (as ./configure said it was required) from a
.bz2 file on the GHC downloads page. I then tried ./configure for the
platform again, and got:
checking ghc actually works... no
configure: error: Your installation of ghc does not appear to work.
It cannot compile a simple prog
The full details of the event are here:
http://groups.google.com/group/bostonhaskell/browse_thread/thread/71243e7d2ec57300
I'm just sending out this reminder to make sure more people hear about
the event (especially as, with Brent on vacation, there wasn't a
Haskell Weekly News this week).
If you
Now I finally understood the idea that you were talking about :) I
didn't quite get it during the MskHUG meeting.
The idea is brilliant to my mind; I am surprised that none of the
gurus are answering.
So, if I understood it correctly, you are suggesting to:
- make a separate spark queue (implemen
62 matches
Mail list logo