2009/7/6 Matthias Görgens matthias.goerg...@googlemail.com:
A Las Vegas algorithm, like randomized quicksort, uses a source of
randomness to make certain decisions. However its output is
unaffected by the randomness. So a function
f :: RandomGen g = g - a - b
implementing a
A few days ago I had to randomly choose and element of a list and continue
execution, so here's what I did:
I made a infinite list of Random numbers [Int] (Not IO [Int]) and I passed
it around all the time in a Tuple and whenever I returned I also returned
the list, so I would always have it
Hi,
Anyone know where I can get the GHC compiler and libraries for Solaris?:
SunOS sun05 5.9 Generic_118558-30 sun4u sparc SUNW,Sun-Fire-280R
I tried to compile GHC myself and got the following error:
$ ./configure --enable-hc-boot
checking build system type... sparc-sun-solaris2.9
checking
Petr Pudlak wrote:
about a month ago, we were discussing sorting in Haskell with a friend. We
realized a nice property of lazy merge-sort (which is AFAIK the implementation
of Data.List.sort): Getting the first element of the sorted list actually
requires O(n) time, not O(n * log n) as in
Dear Hector,
Yes, I thought of a similar scheme. Say we want to implemented
randomized quicksort. Passing a list of random numbers would destroy
laziness and linearise the algorithm --- because the right recursion
branch would need to know at least how many random numbers where
consumed by the
So, a tree like Matthias implements it is the way to go. Basically, it
reifies the recursive calls of quicksort as a lazy data struture which
can be evaluated piecemeal.
Yes. I wonder if it is possible to use a standard (randomized
quicksort) and employ some type class magic (like
Erik de Castro Lopo wrote:
GHC in Ubuntu is a pain!
The same is also currently true for GHC on Debian stable and
testing. Debian unstable is also a bit broken.
I only use Debian Stable, but I don't find it very hard to use. I just
use the binary packages from www.haskell.org.
That said,
Matthias Görgens matthias.goerg...@googlemail.com writes:
Yes, I thought of a similar scheme. Say we want to implemented
randomized quicksort. Passing a list of random numbers would destroy
laziness and linearise the algorithm --- because the right recursion
branch would need to know at
What I wondered was, if one could hid the random plumbing in some data
structure, like the state monad, but less linear.
This problem cries for a State monad solution - but you don't need to
do it yourself, there's already a Random monad defined for you.
Yes, but I only need the random
Quoting John Ky newho...@gmail.com:
Hi,
Anyone know where I can get the GHC compiler and libraries for Solaris?:
I'm using this one:
http://www.haskell.org/ghc/download_ghc_683.html#sparcsolaris
Cheers,
G
--
-
Visit Pipex Business:
2009/7/7 Antoine Latter aslat...@gmail.com:
If I were writing it as a library function, I would leave the function
as you described and let the caller make the choice. Calling into
randomIO in a library function is extremely dubious, as a second
library could be getting and setting the random
Dan Doel dan.d...@gmail.com writes:
On Thursday 02 July 2009 6:36:09 am Jon Fairbairn wrote:
check :: (MonadPlus m) = (a - Bool) - a - m a
check p a
| p a = return a
| otherwise = mzero
I've often noticed the need for a similar function in conjunction with
unfoldr:
-- This is
Hello John,
Tuesday, July 7, 2009, 5:48:10 AM, you wrote:
you mean that on windows gcc, msvc and all other C compilers use the
same ABI for passing and packing structs?
Yes. If you think about it, otherwise it would be impossible to
interface with system provided shared libraries (like
2009/7/7 Matthias Görgens matthias.goerg...@googlemail.com
What I wondered was, if one could hid the random plumbing in some data
structure, like the state monad, but less linear.
This problem cries for a State monad solution - but you don't need to
do it yourself, there's already a
Luke Palmer lrpal...@gmail.com writes:
Random monad is a very natural choice for random cloud computations.
Don't think of it as a state monad -- that's an implementation detail. You
can think of a value of type Random a as a probability distribution of
a's; and there are natural
Ketil Malde ke...@malde.org writes:
data Distribution = Uniform low high | Normal mu sigma | StudentT ...
Of course, now that it occurs to me to check this, I notice
Data.Random.Distribution does the same thing, only more generally,
supporting more distributions, and no doubt with more
Ketil Malde ke...@malde.org writes:
sample :: Distribution - Random Double
Sorry, that's not entirely accurate. Rather:
sample :: RandomGen g = Distribution - Rand g Double
-k
--
If I haven't seen further, it is by standing in the footprints of giants
Hi everyone,
The Dutch HUG [1] will meet again tomorrow. This time we'll meet in
Utrecht again, at the Stairway To Heaven. The meeting will start at
19h. The venue is a sometimes a bit noisy, but there's beer and nice
big tables. If you want to hear everything about the Dutch HUG
On Mon, 2009-07-06 at 18:28 -0700, John Meacham wrote:
Well, without a replacement, it seems odd to remove it. Also, Haskell
currently doesn't _have_ a record syntax (I think it was always a
misnomer to call it that) it has 'labeled fields'. None of the proposed
record syntaxes fit the same
Karmic (9.10) will have GHC 6.10.3, possibly 6.10.4.
http://bugs.launchpad.net/ubuntu/+source/ghc6/+bug/302149
Cheers,
Simon
On 06/07/2009 23:54, Stefan Roggensack wrote:
Hello,
I have uploaded the ghc package to my ppa:
https://launchpad.net/~someone561/+archive/ppa
But I don't work
Karmic (9.10) will have GHC 6.10.3, possibly 6.10.4.
It currently spots 6.10.3, in the alpha release I run here.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Will the darcs (or.. ) repository for the code be made public?
I'm sure there are people in the community who'd like to contribute new
levels, etc.
I asked him, and he said that he plans to develop it further during the
summer and make a public repo somewhere. We'll probably have to wait a
few
Same over here, i would love to read about your discoveries :)
-- Matthias
On Sat, Jul 04, 2009 at 11:12:30PM +0200, minh thu wrote:
2009/7/4 Matthias Görgens matthias.goerg...@googlemail.com:
If anyboby is interested, I can document my program and put it online
somewhere. I also made
Since I have two readers now, I guess I'll have to start blogging. :o)
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
2009/7/7 Duncan Coutts duncan.cou...@worc.ox.ac.uk:
On Mon, 2009-07-06 at 18:28 -0700, John Meacham wrote:
Well, without a replacement, it seems odd to remove it. Also, Haskell
currently doesn't _have_ a record syntax (I think it was always a
misnomer to call it that) it has 'labeled fields'.
Luke Palmer wrote:
What I wondered was, if one could hid the random plumbing in some data
structure, like the state monad, but less linear.
This problem cries for a State monad solution - but you don't need to
do it yourself, there's already a Random monad defined for you.
Yes, but I only
On Wed, Jun 24, 2009 at 6:53 PM, Martin
Hofmannmartin.hofm...@uni-bamberg.de wrote:
I am looking for a good (preferably lazy) way to implement some kind of
best-first search.
So in fact, after one expansion, I need to fold over my complete search
space, maybe updating other nodes and
We are pleased to announce the availability of the package AspectAG, a
library of strongly typed Attribute Grammars implemented using
type-level programming.
The package contains the code associated with our paper at ICFP 2009:
@inproceedings{Viera:Attribute-Grammars,
Author = {Marcos Viera
Hello,
I do not think that we should remove the current record/named fields
syntax, at least for the moment. I use it a lot, and I do not want to
add extra pragmas or extensions to my cabal file. In fact, one of
the purposes of Haskell', the way I understand it, is exactly to just
choose a
On Tue, Jul 07, 2009 at 10:28:11AM -0400, Ravi Nanavati wrote:
2. Once deprecated, people will be encouraged to not depend on the
traditional record syntax where the cost of avoiding it is small (I'm
thinking of situations like the mtl-accessors / run functions where
the traditional syntax is
It seems to me that the Adaptive framework[1][2] is well-suited to STM
transactions. Consider this snippet:
expensive_transaction :: STM Int -- does a bunch of work
example :: TVar Int - STM Int
example t = (+) $ readTVar t * expensive_transaction
If the TVar passed to example is rapidly
Simon Marlow wrote:
Karmic (9.10) will have GHC 6.10.3, possibly 6.10.4.
http://bugs.launchpad.net/ubuntu/+source/ghc6/+bug/302149
Unfortunately thats only half the story. The GHC 6.10.3 that is going
into Kamic is the one from Debian Unstable.
It is important to note here that beyond doing
Ok, so I have a small idea I'm trying to work on; call it a
Prelude-rewrite if you want. For this I want to be able to have the
hierarchy Functor → Applicative → Monad.
For Functor, I would like to be able to implement it for a wider
variety of types, as there are types which have aren't
2009/7/7 Matthias Görgens matthias.goerg...@googlemail.com:
Karmic (9.10) will have GHC 6.10.3, possibly 6.10.4.
It currently spots 6.10.3, in the alpha release I run here.
A major problem is that the libraries are still for 6.8.2, so you
cannot install the required libs to install cabal. Grr.
Thanks Dan,
that gave me some new input I can continue working on.
Cheers,
Martin
Am Dienstag, den 07.07.2009, 10:18 -0700 schrieb Dan Piponi:
On Wed, Jun 24, 2009 at 6:53 PM, Martin
Hofmannmartin.hofm...@uni-bamberg.de wrote:
I am looking for a good (preferably lazy) way to implement some
On Mon, Jul 06, 2009 at 12:54:54PM -0400, Thomas Hartman wrote:
Can someone give some simple common scenarios where the state monad is
useful, besides labeling trees?
Implementing the Union-Find data structure[1] for unification based type
inference. As far as I know, no good alternative exists
I believe there might be an elegant solution for this using the `Last` monoid
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
37 matches
Mail list logo