Jeremy == Jeremy Shaw jer...@n-heptane.com writes:
Jeremy Hello, I hacked your code into a runnable example, and it
Jeremy seems to work for me.
Jeremy Which looks correct to me. Your code looks fine to me as
Jeremy well... Perhaps the error is not in the code you pasted,
2009/08/27 Bulat Ziganshin bulat.zigans...@gmail.com:
...stop reusing Prelude operators, in particular, replace -
with $?
I have to say, the `$ do` construct is an eyesore and `- do` is a
lot easier on the eyes.
Would it introduce ambiguity in the Haskell grammar if
foo do...
Lennart Augustsson lenn...@augustsson.net writes:
Prelude toRational 697.04157958259998
3065621287177675 % 4398046511104
Prelude toRational 697.0415795826
3065621287177675 % 4398046511104
As you can see, both numbers are represented by the same Double.
Haskell prints a Double with the
Raynor Vliegendhart shinnon...@gmail.com writes:
Just wondering, what should be the expected output be of something
like mavg 4 [1..3]? [3%2] or []?
[0%1, 1%4, 3%4, 3%2, 3%2, 5%4, 3%4, 0%1], of course ;-P
--
Jón Fairbairn jon.fairba...@cl.cam.ac.uk
Dear Haskellers,
Last minute reminder: We will be having a Hack Day in Edinburgh on
Sunday 30 August (ICFP venue). That's this weekend!
For the interested, we will also be meeting up the day before 09:30
Saturday 29 August just outside the RCPE (ie. the ICFP venue again).
We'll have a quick
What is the procedure to uninstall a cabal package?
--
Colin Adams
Preston Lancashire
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Thanks for the memo trick! Now I understand that the haskell compiler
cannot memoize functions of integers, because it could change the space
behaviour. However I think it could memoize everything else. Because all
types that are data objects sitting in memory (so the arg is essentially a
Hello staafmeister,
Friday, August 28, 2009, 1:54:38 PM, you wrote:
it just works other way. imagine a whole haskell program as a graph.
i.e. expression 1+2, for example, forms a node with (=) in its root
and 1 and 2 as its subtrees. computation of program is a series of
graph reductions,
On Fri, Aug 28, 2009 at 3:54 AM, staafmeisterg.c.stave...@uu.nl wrote:
Thanks for the memo trick! Now I understand that the haskell compiler
cannot memoize functions of integers, because it could change the space
behaviour. However I think it could memoize everything else. Because all
types
Bulat Ziganshin-2 wrote:
this graph can share computations in only one way - when you give
sharec node a name and use this name twice. for example, the following
sum[1..1000] + prod[1..1000]
don't share anything, but this
let list = [1..1000]
in sum list + prod list
share the
As far as I know the current stable release of Cabal doesn't
keep track of installed packages, so you can only
# ghc-pkg unregister pkg-id
and then manually delete the files.
Peter
2009/8/28 Colin Paul Adams co...@colina.demon.co.uk:
What is the procedure to uninstall a cabal package?
--
Hello staafmeister,
Friday, August 28, 2009, 2:34:07 PM, you wrote:
Well in case I call (prod list) again it could lookup the reference and see
so it should keep a list of all values ever computed in program,
together with their expressions? :) are you like idea of prod[1..10^6]
computation
Bulat Ziganshin-2 wrote:
Hello staafmeister,
Friday, August 28, 2009, 2:34:07 PM, you wrote:
Well in case I call (prod list) again it could lookup the reference and
see
so it should keep a list of all values ever computed in program,
together with their expressions? :) are you like
On Fri, Aug 28, 2009 at 1:03 PM, staafmeisterg.c.stave...@uu.nl wrote:
The list you give prod is also 10 MB so it not a terribly inefficient
program.
That list takes memory only if it is forced. If it is passed to a lazy
function, all the list may not be in memory at once.
Hello staafmeister,
Friday, August 28, 2009, 3:03:13 PM, you wrote:
so it should keep a list of all values ever computed in program,
together with their expressions? :) are you like idea of prod[1..10^6]
computation taking 10 mbytes of memory?
The list you give prod is also 10 MB so it not a
david48 wrote:
On Fri, Aug 28, 2009 at 1:03 PM, staafmeisterg.c.stave...@uu.nl wrote:
The list you give prod is also 10 MB so it not a terribly inefficient
program.
That list takes memory only if it is forced. If it is passed to a lazy
function, all the list may not be in memory at
Bulat Ziganshin-2 wrote:
Hello staafmeister,
Friday, August 28, 2009, 3:03:13 PM, you wrote:
so it should keep a list of all values ever computed in program,
together with their expressions? :) are you like idea of prod[1..10^6]
computation taking 10 mbytes of memory?
The list you
Peter == Peter Robinson thaldy...@gmail.com writes:
Peter As far as I know the current stable release of Cabal
Peter doesn't keep track of installed packages, so you can only #
Peter ghc-pkg unregister pkg-id and then manually delete the
Peter files.
Thanks. That works.
--
Colin == Colin Paul Adams co...@colina.demon.co.uk writes:
Jeremy == Jeremy Shaw jer...@n-heptane.com writes:
Colin apparent data corruprion is occurring. I am suspecting a
Colin bug in the formlets library (I have version 0.6).
Colin So I have created a slightly cut-down (no
staafmeister g.c.stave...@uu.nl writes:
The list you give prod is also 10 MB so it not a terribly
inefficient program. It's a factor of 2.
No, it is not. The expression:
prod [1..1000] + sum [1..1000]
will first evaluate prod [1..1000], generating values from 1 to 1000
lazily and
Hello staafmeister,
Friday, August 28, 2009, 3:31:13 PM, you wrote:
All the values that are computed but are also GCed (and they will be, 10^9
bytes
is the mem limit). If the GC removes a value then all references in cache to
those
values can also be removed.
it looks like cache of
Arrows syntax supports Arrow, ArrowChoice(if, case etc.) and
ArrowLoop(rec) - but not ArrowApplicable. Therefore it is not possible
to write:
proc x - do
a - someArrow - x
a - x
but
proc x - do
a - someArrow - x
app - (a, x)
and
proc x - do
a -
hask...@kudling.de wrote:
You are asked to iterate over the list and calculate the average value
of each 3 neighbouring values.
Lambda Fu, form 72 - three way dragon zip
averages3 xs = zipWith3 avg xs (drop 1 xs) (drop 2 xs)
where avg a b c = (a+b+c) / 3
Regards,
apfelmus
--
On Fri, Aug 28, 2009 at 02:33:08PM +0200, Maciej Piechotka wrote:
Arrows syntax supports Arrow, ArrowChoice(if, case etc.) and
ArrowLoop(rec) - but not ArrowApplicable. Therefore it is not possible
to write:
proc x - do
a - someArrow - x
a - x
You can write
proc x - do
Hi!
I am not really sure if this is correct term for it but I am open to
better (search) terms.
pure
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Hi!
Ups, missed save button and pressed send. ;-)
So I am not really sure if this is correct term for it but I am open
to better (search) terms.
I am wondering if it is possible to make a time constrained
computation. For example if I have a computation of an approximation
of a value which can
I'm reading the book Modern Compiler
Designhttp://www.cs.vu.nl/~dick/MCD.html,
and in the chapter about functional programming it is stated that strictness
analysis in the presence of ADTs (aka records) is a very hard problem to
tackle.
I'm not sure what the current state of art is here (e.g GHC
Hi all,
My app has to use rather large amounts of static data in order to run. I
have been using an SQLite database to hold this data so far. The largest
chunk of data was a table with roughly 80k records.
I only make use of this table to see if a particular key is present.
Reading RWH
On Fri, Aug 28, 2009 at 6:01 AM, Mitarmmi...@gmail.com wrote:
Hi!
Ups, missed save button and pressed send. ;-)
So I am not really sure if this is correct term for it but I am open
to better (search) terms.
I am wondering if it is possible to make a time constrained
computation. For
I tried this using timeout, but was never able to get it to work. The
timeout doesn't behave like I expect. I can take several seconds for it to
timeout, even with very low timeouts.
Any ideas?
- Job
module Main where
import Data.IORef
import System.Timeout
import System.IO.Unsafe
tailScan f
This is my go at the problem:
module Main where
import Control.Concurrent
import Data.IORef
-- From the Haskell wiki
primes :: [Integer]
primes = sieve [2..]
where sieve (p:xs) = p : sieve [x | x - xs, x `mod` p /= 0]
producePrimes :: IORef [Integer] - IO ()
producePrimes ref = go primes
On Aug 28, 2009, at 03:24 , Ketil Malde wrote:
What puzzled me (and the parent article indicated), was that Python
appeared to be able to work with more precision, and thus be more
numerically correct than GHC. Since it's all machine precision
floating point, this is even more strange, and I
On Fri, Aug 28, 2009 at 6:04 AM, Bulat
Ziganshinbulat.zigans...@gmail.com wrote:
Hello staafmeister,
Friday, August 28, 2009, 3:31:13 PM, you wrote:
All the values that are computed but are also GCed (and they will be, 10^9
bytes
is the mem limit). If the GC removes a value then all
Hello,
Nobody any idea?
I want to paint in some widget, but this will be in front of some
background, so the bg should be transparent.
--
best regards
h.
--
View this message in context:
http://www.nabble.com/rotate-image-tp25122912p25198054.html
Sent from the Haskell - Haskell-Cafe
Hi,
is there any haskell code for SLD-resolution; I wanna learn it.
Thanks a lot.
Steffen.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Not really. Best thing I can think to do is use the X11 library to
pull the pixels under your window then draw them as a surface on the
drawingarea, then draw your rotated image on top of that. You have to
have a window, and Gtk windows do not have an alpha. You'll want it
to be undecorated,
Just thought I'd point out that my old GHC install is now broken by the
update to Snow Leopard.
Dave
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
My 6.10.1 install still works alright after upgrade to 10.6/Snow
Leopard. What version did you have?
-Ross
On Aug 28, 2009, at 7:15 PM, David Leimbach wrote:
Just thought I'd point out that my old GHC install is now broken by
the update to Snow Leopard.
Dave
6.10.4. Did you try to build any binaries? It doesn't produce correct
assembly code (it looks like).
Dave
On Fri, Aug 28, 2009 at 4:55 PM, Ross Mellgren rmm-hask...@z.odi.ac wrote:
My 6.10.1 install still works alright after upgrade to 10.6/Snow Leopard.
What version did you have?
-Ross
I did a trivial compile and it worked yes (the binary it produced was
alright, also). Did the binary it generate have problems, or was it
the compilation that failed?
-Ross
On Aug 28, 2009, at 7:57 PM, David Leimbach wrote:
6.10.4. Did you try to build any binaries? It doesn't produce
The compilation failed.
On Fri, Aug 28, 2009 at 4:58 PM, Ross Mellgren rmm-hask...@z.odi.ac wrote:
I did a trivial compile and it worked yes (the binary it produced was
alright, also). Did the binary it generate have problems, or was it the
compilation that failed?
-Ross
On Aug 28, 2009,
The same here:
$ghc hw.hs
/var/folders/1J/1JKije6yHpm78qqdjF5N2U+++TI/-Tmp-/ghc7743_0/
ghc7743_0.s:1357:0:
suffix or operands invalid for `push'
/var/folders/1J/1JKije6yHpm78qqdjF5N2U+++TI/-Tmp-/ghc7743_0/
ghc7743_0.s:1401:0:
suffix or operands invalid for `push'
...
I've tried to
I cleaned up the code, partitioned it into a library and an
executable, and made the package available on hackage as agum-1.0.
Enjoy.
John
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Fri, Aug 28, 2009 at 6:03 PM, Steffen Bockbock.stef...@yahoo.de wrote:
Hi,
is there any haskell code for SLD-resolution; I wanna learn it.
What's SLD-resolution?
Antoine
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Hey Steffen,
I actually made it one time, remember me to send it to you on monday...
Hector Guilarte
-Original Message-
From: Steffen Bock bock.stef...@yahoo.de
Date: Fri, 28 Aug 2009 23:03:24
To: Haskell-Cafe@haskell.org
Subject: [Haskell-cafe] SLD resolution code in Haskell
Hello,
Thanks for your answers and your time, but I fear that I didn't described
the problem accurately enough.
The background is in the window created with gtk2hs (windowNew). It's just a
fixed layout (fixedNew):
bg - imageNewFromFile bg.jpg
fixedPut fBox bg (0,0)
If I now create the
On Fri, Aug 28, 2009 at 5:28 PM, Dmitri Sosnik dim...@gmail.com wrote:
The same here:$ghc hw.hs
/var/folders/1J/1JKije6yHpm78qqdjF5N2U+++TI/-Tmp-/ghc7743_0/ghc7743_0.s:1357:0:
suffix or operands invalid for `push'
leimy2k:
On Fri, Aug 28, 2009 at 5:28 PM, Dmitri Sosnik dim...@gmail.com wrote:
The same here:
$ghc hw.hs
/var/folders/1J/1JKije6yHpm78qqdjF5N2U+++TI/-Tmp-/ghc7743_0/
ghc7743_0.s:1357:0:
suffix or operands invalid for `push'
48 matches
Mail list logo