Yves Parès yves.pa...@gmail.com wrote:
I've been in the past told that mersenne-random was much better than
the standard random package.
This is relative. The Mersenne Twister algorithm has a large memory
footprint, but in relation to the size of the average Haskell program,
this is probably
First of all, ListT is not a monad transformer, since it breaks the
law of associativity of bind:
*Control.Monad.List let one = (lift $ putStrLn 1) :: ListT IO ()
*Control.Monad.List let two = (lift $ putStrLn 2) :: ListT IO ()
*Control.Monad.List let choice = return 1 `mplus` return 2 :: ListT
Although it's a bit off topic, I must say I agree with Malcolm on that.
Record-fields-selection-as-functions might be sometime unconvenient, but
it is simple and easy to reason about and deal with, with usual Haskell
strategies (prefixed names, modules, qualified imports ... business as
usual).
On 09.02.2012 01:56, Yves Parès wrote:
Hi,
I've been in the past told that mersenne-random was much better than the
standard random package.
...
So is it possible to use the fast and efficient mersenne generator with
the convenient and general random API?
I think design of Random type class
Aleksey Khudyakov :
I think design of Random type class basically precludes efficient
generators with large periods and consequently large state.
Look at next function:
next :: g - (Int, g)
It means that state has to be copied but for efficiency we want to
mutate it in place. I consider
As somebody who has very recently started working with Yesod -- I feel your
pain!
In truth Yesod is a huge bundle of packages, many of which aren't managed by
the Yesod developers. I get the impression that they work very hard to keep
everything coherent while Yesod continues its very active
On 09.02.2012 15:32, Jerzy Karczmarczuk wrote:
Aleksey Khudyakov :
1. Mersenne Twister, AND congruential generators AND the Marsaglia
stuff, all use some kind of seed, all are stateful. There are no
miracles. Just look the agressive monadization, the form of defaultSeed,
etc. within MWC.hs,
On Wed, Feb 8, 2012 at 10:56 AM, Ian Lynagh ig...@earth.li wrote:
That sounds right. It basically means you don't have to write the C
stubs yourself, which is nice because (a) doing so is a pain, and (b)
when the foreign import is inside 2 or 3 CPP conditionals it's even more
of a pain to
Aleksey Khudyakov:
On 09.02.2012 15:32, Jerzy Karczmarczuk wrote:
1. Mersenne Twister, AND congruential generators AND the Marsaglia
stuff, all use some kind of seed, all are stateful. There are no
miracles. Just look the agressive monadization, the form of defaultSeed,
etc. within MWC.hs,
Hi,
Am Donnerstag, den 09.02.2012, 11:39 + schrieb Chris Dornan:
(I do think that we could be delivering the tools with a little more
packaging that could significantly help with these situations. I have
found them to be highly useful in any case.)
if you are content with not always
On 9 February 2012 10:59, Aleksey Khudyakov alexey.sklad...@gmail.com wrote:
So is it possible to use the fast and efficient mersenne generator with
the convenient and general random API?
I think design of Random type class basically precludes efficient generators
with large periods and
On 09.02.2012 18:27, Duncan Coutts wrote:
Actually it is not true that the state has to be copied. Using the
lazy ST monad we can implement this interface and internally use
mutable ST arrays.
See for example
On 09.02.2012 17:28, Jerzy Karczmarczuk wrote:
Aleksey Khudyakov:
On 09.02.2012 15:32, Jerzy Karczmarczuk wrote:
1. Mersenne Twister, AND congruential generators AND the Marsaglia
stuff, all use some kind of seed, all are stateful. There are no
miracles. Just look the agressive monadization,
Nice explanation. However, at
http://stackoverflow.com/questions/4119730/cartesian-product it was pointed
out that this
cartProd :: [a] - [b] - [(a, b)]
cartProd = liftM2 (,)
is equivalent to the cartesian product produced using a list comprehension:
cartProd xs ys = [(x,y) | x - xs, y - ys]
On Wed, Feb 8, 2012 at 4:42 AM, Christoph Breitkopf
chbreitk...@googlemail.com wrote:
Hello Thomas,
On Wed, Feb 8, 2012 at 4:03 AM, Thomas Tuegel ttue...@gmail.com wrote:
First, as author of the test suite code, let me apologize for the
terrible documentation.
This is absolutely NOT how
Hi all,
I've just released stm-conduit [1] on Hackage. This package introduces
conduits to the wonderful world of concurrency.
My package solves the common problem of constant bottleneck switching
loaders have. This is when, for example, we stream XML from the disk and
then parse the XML in one
http://arstechnica.com/business/news/2012/02/transactional-memory-going-mainstream-with-intel-haswell.ars
would any haskell STM expert care to comment on the possibilities of hardware
acceleration?
best, ben
___
Haskell-Cafe mailing list
Duncan Coutts talked a bit about this on Reddit here:
http://www.reddit.com/r/programming/comments/pfnkx/intel_details_hardware_transactional_memory/c3p4oq7
On Thu, Feb 9, 2012 at 12:43 PM, Ben midfi...@gmail.com wrote:
Hello all
I am trying to install dph-examples on Mac OS X version 10.7.3 but getting this
error http://hpaste.org/57699. I am using ghc-7.4.1.
Error running clang! you need clang installed to use the LLVM backend
cabal: Error: some packages failed to install:
dph-examples-0.6.1.3 failed during
Dear list,
the Show class is extremely useful for exploring Haskell in a
terminal, but sometimes, I just want something fancier. For instance,
I'm currently dabbling with sound generation and it is only natural that
I want to hear the sound instead of seeing a textual representation.
Hello.
Thu, Feb 09, 2012 at 01:32:41PM -0500, Clark Gaebel wrote
Hi all,
I've just released stm-conduit [1] on Hackage. This package introduces
conduits
to the wonderful world of concurrency.
My package solves the common problem of constant bottleneck switching loaders
have. This is
Happy to help! I'm new to this whole package on hackage thing, so any
feedback would be great.
- clark
On Thu, Feb 9, 2012 at 2:19 PM, Alexander V Vershilov
alexander.vershi...@gmail.com wrote:
Hello.
Thu, Feb 09, 2012 at 01:32:41PM -0500, Clark Gaebel wrote
Hi all,
I've just
On Thu, Feb 09, 2012 at 04:52:16AM -0800, John Meacham wrote:
Since CSigSet has sigset_t associated with it, 'Ptr CSigSet' ends up turning
into 'sigset_t *' in the generated code. (Ptr (Ptr CChar)) turns into char**
and so forth.
What does the syntax for associating sigset_t with CSigSet
A good first step would be understanding how the other entry works:
cartProd :: [a] - [b] - [(a,b)]
cartProd xs ys = do
x - xs
y - ys
return (x,y)
It is about halfway between the two choices.
John
On Thu, Feb 9, 2012 at 9:37 AM, readams richard.ad...@lvvwd.com
Your package uses TMChans which AFAIK are unbounded. That means that
if the writer is faster than the reader, then everything will be kept
into memory. This means that using TMChans you may no longer say that
your program uses a constant amount of memory. Actually, you lose a
lot of your space
Does this mean we're going to see music FRP examples soon?!
amindfv / Tom
On Feb 9, 2012 2:17 PM, Heinrich Apfelmus apfel...@quantentunnel.de
wrote:
Dear list,
the Show class is extremely useful for exploring Haskell in a terminal,
but sometimes, I just want something fancier. For
On Thu, Feb 9, 2012 at 11:23 AM, Ian Lynagh ig...@earth.li wrote:
On Thu, Feb 09, 2012 at 04:52:16AM -0800, John Meacham wrote:
Since CSigSet has sigset_t associated with it, 'Ptr CSigSet' ends up
turning
into 'sigset_t *' in the generated code. (Ptr (Ptr CChar)) turns into char**
and so
Tom Murphy wrote:
Heinrich Apfelmus wrote:
For instance, I'm currently
dabbling with sound generation and it is only natural that I want to hear
the sound instead of seeing a textual representation.
Does this mean we're going to see music FRP examples soon?!
I'm not so sure about the soon
[Redirecting to haskell-cafe]
Congrats on your first release!
While I haven't looked into your package in more depth, I'd suggest
taking a look at http-conduit [1]. While I don't know of any
benchmarks, it should be faster or at least as fast the HTTP package.
It's also used by many people
Actually, that is a moderately fatal flaw. I just uploaded 0.2.2 which
addresses this by highly recommending using bounded channels, as well as
adding sources/sinks for them.
Thanks for catching that!
- clark
On Thu, Feb 9, 2012 at 2:29 PM, Felipe Almeida Lessa felipe.le...@gmail.com
wrote:
Quoth Evan Laforge qdun...@gmail.com,
...
The non-composing non-abstract updates are what bug me, and
make me scatter about tons of 'modifyThis' functions, both for
composability and to protect from field renames.
So ... at the risk of stating the obvious, is it fair to say the root
of this
On Thu, Feb 9, 2012 at 3:45 PM, Joachim Breitner nome...@debian.org wrote:
Hi,
Am Donnerstag, den 09.02.2012, 11:39 + schrieb Chris Dornan:
(I do think that we could be delivering the tools with a little more
packaging that could significantly help with these situations. I have
found
modifyConfig :: (Config - a) - (a - a) - Config - Config
modifyConfig fr fv a = a { fr = fv (fr a)
I like this Idea. The only problem I see is this: if I'm trying to write
code that is very generic and abstract, how does the compiler know if the
update
a { fr = 5 }
is targeting a field
Felipe Almeida Lessa wrote:
[Redirecting to haskell-cafe]
Congrats on your first release!
While I haven't looked into your package in more depth, I'd suggest
taking a look at http-conduit [1]. While I don't know of any
benchmarks, it should be faster or at least as fast the HTTP
On 10/02/2012, at 6:12 AM, mukesh tiwari wrote:
Hello all
I am trying to install dph-examples on Mac OS X version 10.7.3 but getting
this error. I am using ghc-7.4.1.
This probably isn't DPH specific. Can you compile a hello world program with
-fllvm?
Donn Cave donn at avvanta.com writes:
Quoth Evan Laforge qdunkan at gmail.com,
...
The non-composing non-abstract updates are what bug me, and
make me scatter about tons of 'modifyThis' functions, both for
composability and to protect from field renames.
So ... at the risk of stating
Quoth AntC anthony_clay...@clear.net.nz,
...
No, Donn, it's not the lack of syntax, it's the lack of semantics for first-
class (polymorphic) record update. And there's very little that's obvious.
Ah, you're right, I certainly shouldn't have used the word syntax there.
But just to be clear on
On Thu, Feb 9, 2012 at 3:04 PM, Heinrich Apfelmus apfel...@quantentunnel.de
wrote:
I'm not so sure about the soon part, but yes, using FRP to make music is
part of the plan.
you know, i've been thinking about this recently, and while i need more
haskell skillz if i want to do some sound
On Thu, Feb 9, 2012 at 12:49 PM, Donn Cave d...@avvanta.com wrote:
Quoth Evan Laforge qdun...@gmail.com,
...
The non-composing non-abstract updates are what bug me, and
make me scatter about tons of 'modifyThis' functions, both for
composability and to protect from field renames.
So ... at
Donn Cave donn at avvanta.com writes:
-- modifyRecord :: RecordType r = (a - a) - (r - a) - r - r
modifyRecord :: RecordType r = (r - a) - (a - a) - r - r
... while this does obviously represent a polymorphic function,
Exactly!
if I write
-- data Config { tempo :: Int, ...}
Quoth Evan Laforge qdun...@gmail.com,
On Thu, Feb 9, 2012 at 12:49 PM, Donn Cave d...@avvanta.com wrote:
...
For example, in a better world you could write stuff like
modifyConfig :: (Config - a) - (a - a) - Config - Config
modifyConfig fr fv a = a { fr = fv (fr a) }
upTempo config =
On Thu, Feb 9, 2012 at 6:57 PM, Thomas Tuegel ttue...@gmail.com wrote:
You need Cabal 1.12 for '--enable-library-coverage'. The only place
it's documented is in 'cabal configure --help' (a major oversight on
my part). The online docs for Cabal are only from version 1.10 anyway,
so that
It may be a problem with the gloss / opengl dependencies? do you have those
packages installed?
I had similar trouble earlier this week wrt dph-examples, and that was the
root of the matter in my case
-Carter
On Thu, Feb 9, 2012 at 7:04 PM, Ben Lippmeier b...@ouroborus.net wrote:
On
Quoth AntC anthony_clay...@clear.net.nz,
Donn Cave donn at avvanta.com writes:
...
The narrow issue we're trying to address is namespacing, and specifically name
clashes: two different records with the same named field.
...
Now in return for me answering that, please answer the questions in my
44 matches
Mail list logo