2009/9/15 Matthias Kilian k...@outback.escape.de:
A fellow openbsd developer told me the URL below...
I hope this hasn't been posted on this list already (at least I
didn't find it in my local archives):
http://tommd.wordpress.com/2009/09/13/kernel-modules-in-haskell/
I don't think it was
Andrew U. Frank wrote:
I have a number of functions which have some arguments and produce a single
result. all the arguments are in a heterogenous list and the results should
update the list.
If I understand the problem correctly, you have a typed-indexed collection
TIP and you would like to
On Tue, Sep 15, 2009 at 11:38 PM, Daniel Fischer
daniel.is.fisc...@web.de wrote:
...
foo :: forall a. a - a
This is exactly the same type as
foo :: a - a
(unless you're using ScopedTypeVariables and there's a type variable a in
scope), since
type signatures are implicitly forall'd.
Hello Cristiano,
Wednesday, September 16, 2009, 12:04:48 PM, you wrote:
Yep, perhaps I used the wrong example. What about foo: (forall a. a) - Int?
it's a function that convert anything to integer. for example:
foo _ = 1
it's hard to find better examples, since haskell has very few
functions
On Wed, Sep 16, 2009 at 4:18 AM, Bulat Ziganshin
bulat.zigans...@gmail.com wrote:
Hello Cristiano,
Wednesday, September 16, 2009, 12:04:48 PM, you wrote:
Yep, perhaps I used the wrong example. What about foo: (forall a. a) - Int?
it's a function that convert anything to integer.
That would
I am pleased to announce the release of bindings-levmar-0.1.1:
http://hackage.haskell.org/package/bindings-levmar
The most important change compared to the previous version is a
custom configure script (copied from hmatrix) that detects which
libraries are needed. The cabal file also has some
Hello,
We like to announce a new release of the high-level
Levenberg-Marquardt library levmar:
http://hackage.haskell.org/package/levmar-0.2
Changes:
* There's one new major feature: automatic calculation of the Jacobian
using automatic differentiation with Conal Elliott's vector-space
I'm playing around with a little program that implements a simple virtual
machine. I want to use a monad to represent machine state. I created a data
type for the machine (VM) and a monadic type for the monadic computations using
it. I declared this an instance of MonadState and Monad and
Am Mittwoch, den 16.09.2009, 03:23 -0700 schrieb Gregory Propf:
I'm playing around with a little program that implements a simple
virtual machine. I want to use a monad to represent machine state. I
created a data type for the machine (VM) and a monadic type for the
monadic computations
Well, it's almost always better to reuse as much code as possible. But I
don't think type is an answer here. I recommend using a newtype,
enabling GeneralizedNewtypeDeriving and deriving as much as possible:
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
...
newtype VM a =
VM {runVM :: State
newtype VMT m a =
VMT {runVMT :: StateT VMState m a}
deriving (Monad, MonadIO, MonadTrans, TransM, MonadState VMState)
works here (ghc-6.10.3)
On Wed, Sep 16, 2009 at 11:42 AM, Miguel Mitrofanov
miguelim...@yandex.ru wrote:
newtype VMT m a =
VMT {runVMT :: StateT VMState m a}
O, great. I didn't know you can write it this way.
Tom Nielsen wrote:
newtype VMT m a =
VMT {runVMT :: StateT VMState m a}
deriving (Monad, MonadIO, MonadTrans, TransM, MonadState VMState)
works here (ghc-6.10.3)
On Wed, Sep 16, 2009 at 11:42 AM, Miguel Mitrofanov
miguelim...@yandex.ru
David Menendez wrote:
I'm reminded of the parameterized monad of continuations that Oleg
mentioned a few years back.
http://www.haskell.org/pipermail/haskell/2007-December/020034.html
This is all very interesting, thank you both for the pointers!
I was trying to get rid of the newtypes but
Just occurred to me that you can actually do this with a preprocessor.
If we extract the template declarations to a separate module, then
it can happen something like this (I have corrected some errors in the
above code):
main.hs
import Language.Haskell.TH
import QList
import
Oh, and output is as expected:
./test
(1,2,3)
1
(1,(2,3))
((1,2),3)
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Also (sorry for the triple-post!) I noticed that in the TH
documentation, it says:
Type splices are not implemented, and neither are pattern splices
This means, while we could write a preprocessor that would give us, e.g.:
x :: Set Int
x = {1,2,3,4}
We cannot splice in the right
One of the things I liked about Haskell was the notion of pure functions and
the fact that they can be, in theory, automatically parallelized on multicore
hardware. I think this will become a huge deal in a few years as cores
multiply. My question is simply this: under GHC is this what really
Hello Gregory,
Wednesday, September 16, 2009, 5:17:01 PM, you wrote:
no. additional threads are launched for i/o system and, as you
requested by -N2 for haskell workload. but ghc don't auto-parallelize
your code. it's a bit too hard, since making too much threads (e.g.
one for every addition)
For reference Oleg's indexed continuation monad is packaged on hackage in
category-extras as:
http://hackage.haskell.org/packages/archive/category-extras/latest/doc/html/Control-Monad-Indexed-Cont.html
-Edward Kmett
On Wed, Sep 16, 2009 at 7:07 AM, Martijn van Steenbergen
I heard that compiling Haskell to Java is not obvious since tail calls
are not supported.
.NET's intermediate language (IL) does support tail calls, however it
is currently slower than regular calls, and is not always supported by
all JITs.
But given that F# will soon be officially released, I
Hi Peter,
it seems that this question has been already raised before:
http://www.haskell.org/pipermail/haskell-cafe/2005-January/008244.html
and there are some .Net interop implementations on the net (it is a question
how mature they are, however):
Yes, but interop only touches the surface of what is possible.
When a Haskell compiler could create IL code, it would be possible to
use the generated code inside a sandbox, e.g. to be used on the web as
loadable Silverlight code.
Of course the same could be said about other virtual machines,
There was in fact another attempt as well, Salsa:
http://haskell.org/haskellwiki/Salsa
This showed quite a bit of promise but unfortunately was not more than just
an experiment.
Matt
On Wed, Sep 16, 2009 at 10:21 AM, Peter Verswyvelen bugf...@gmail.comwrote:
Yes, but interop only touches the
gregorypropf:
One of the things I liked about Haskell was the notion of pure functions and
the fact that they can be, in theory, automatically parallelized on multicore
hardware. I think this will become a huge deal in a few years as cores
multiply. My question is simply this: under GHC is
I think Sigbjorn's binding (http://haskell.forkio.com/dotnet/
http://haskell.forkio.com/dotnet/ as linked below) is the most
complete and likely to work, but it's still just a binding not a
compiler backend.
From: haskell-cafe-boun...@haskell.org
That makes sense. So maybe I should split my mapping into two parallel ones or
however many CPUs there are using par.
--- On Wed, 9/16/09, Bulat Ziganshin bulat.zigans...@gmail.com wrote:
From: Bulat Ziganshin bulat.zigans...@gmail.com
Subject: Re: [Haskell-cafe] GHC threaded runtimes and pure
When reading
http://www.macs.hw.ac.uk/~dsg/gph/papers/html/Strategies/strategies.html
I got the impression, that when I want to compute in parallel I have to
suppress laziness at all costs, otherwise only a neglible portion of the
code is run in parallel. How can I parallelize the
On 13/09/2009 07:45, Belka wrote:
Hello, Haskell Cafe!
I used an MVar to signalize to many threads, when it's time to finish their
business (I called it a LoopBreaker). Recently I realized, that it might be
too expensive (to use MVar) for cases when threads are many and all of them
read my
Hi all,
I try to binding Haskell to VTE library.
Below are Vte.chs file i wrote.
Vte.chs
Description: Binary data
I use c2hs with below command
LANG=C c2hs -d trace -l $(pkg-config --cflags vte | sed 's/-I/-C-I/g')
vte/vte.h Vte.chs
generate Vte.hs file.
When i compile Vte.hs
Hello!
On Wed, Sep 16, 2009 at 8:54 AM, Peter Verswyvelen bugf...@gmail.com wrote:
I heard that compiling Haskell to Java is not obvious since tail calls
are not supported.
.NET's intermediate language (IL) does support tail calls, however it
is currently slower than regular calls, and is
Hello Simon,
Wednesday, September 16, 2009, 7:05:04 PM, you wrote:
1. Might readMVar really be computationally expensive under heavy load,
(with all it's wonderful blocking features)? How much (approximately) more
expensive, comparing to a assembler's mov?
Probably 10-100 times more
Here's the difference between these two types:
test1 :: forall a. a - Int
-- The caller of test1 determines the type for test1
test2 :: (forall a. a) - Int
-- The internals of test2 determines what type, or types, to instantiate the
argument at
Or, to put it another way, since there are no
Would using
zipWith (\x y - x `par` y `pseq` x + y) (expensiveList 1) (expensiveList 2)
do it? it seems to help a bit on my machine, but doesn't give me twice
the performance
On Wed, Sep 16, 2009 at 10:59 AM, Henning Thielemann
lemm...@henning-thielemann.de wrote:
When reading
On Wed, Sep 16, 2009 at 7:12 PM, Ryan Ingram ryani.s...@gmail.com wrote:
Here's the difference between these two types:
test1 :: forall a. a - Int
-- The caller of test1 determines the type for test1
test2 :: (forall a. a) - Int
-- The internals of test2 determines what type, or types, to
Gregory Propf wrote:
That makes sense. So maybe I should split my mapping into two
parallel ones or however many CPUs there are using par.
If you're going to use par, it doesn't really matter how many sparks you
create. You just need to avoid creating millions of really tiny sparks.
You
Hello Andrew,
Wednesday, September 16, 2009, 11:31:22 PM, you wrote:
That makes sense. So maybe I should split my mapping into two
parallel ones or however many CPUs there are using par.
If you're going to use par, it doesn't really matter how many sparks you
create. You just need to
How does garbage collection work in an example like the one below? You
memoize a function with some sort of lookup table, which stores function
arguments as keys and function results as values. As long as the
function remains in scope, the keys in the lookup table remain in
memory, which means
There is no magic here. This is merely explicit type specialization from
the most general inferred type to something more specific. The
denotational semantics of a function whose type is specialized does not
change for those values belonging to the more specialized type.
f :: forall a. (Num
I'm trying to install the Haskell Platform. I'm using Ubuntu 9.02 and GHC
6.10.4 on a 64 bit AMD and keep getting this crap when I do 'make install'.
The stuff builds OK and the script in question does indeed exist. Anybody know
what this is. I've looked online and none of the other people
I just rejoined the list and am a bit new to things here anyway but this sounds
a lot Lisp's old macro system a little. I'm guessing you're not proposing
runtime execution of runtime generated code though. I don't know much about
Lisp internals but I suspect Lisp runtimes are quite different
Hi Gregory,
On Wed, Sep 16, 2009 at 6:51 PM, Gregory Propf gregorypr...@yahoo.com wrote:
I'm trying to install the Haskell Platform. I'm using Ubuntu 9.02 and GHC
6.10.4 on a 64 bit AMD and keep getting this crap when I do 'make install'.
The stuff builds OK and the script in question
41 matches
Mail list logo