Hi,
I am a newbie learning Haskell. I have used languages with functional
features before (R, Scheme) but not purely functional ones without
side-effects.
Most of the programming I do is numerical (I am an economist). I
would like to know how to implement the iterative algorithm below in
Hi,
I am working through Hal Daume's tutorial, trying to do the exercises.
I can't figure out how to output an integer with putStrLn (or any
other way), I think I need an Int - [Char] conversion but couldn't
find it. Specifically, in Exercise 3.10, I have the product of
numbers in pp, and would
On Thu, Aug 17, 2006 at 01:23:19AM -0400, [EMAIL PROTECTED] wrote:
G'day all.
Quoting Chris Kuklewicz [EMAIL PROTECTED]:
The compiler may not deforest that list, so creating the list may be a small
overhead of this method.
And in return, you get:
- Code that is smaller than the
On Thu, Aug 17, 2006 at 01:55:47AM +0400, Bulat Ziganshin wrote:
Hello haskell-cafe,
The http://haskell.org/haskellwiki/Special:Popularpages page lists
most popular pages on haskell wiki. I think this list is very
useful because it shows us what are the questions about Haskell
people most
The code in the subject generates an error. I understand why this is
(- is treated as part of the number), but I don't know how to solve
it, ie how to tell Haskell that - is a function/binary operator?
Thanks,
Tamas
___
Haskell-Cafe mailing list
Hi,
I would like to use Haskell to generate static HTML webpages,
preferably using XHTML 1.1. How can I do this? I found libraries to
generate XHTML 1.0 transitional, but not 1.1. Scheme has LAML [1],
which parses the DTD, uses S-expressions and validates the XHTML, I am
looking for something
On Fri, Aug 18, 2006 at 04:46:14PM +0400, Bulat Ziganshin wrote:
Hello Tim,
Friday, August 18, 2006, 4:26:46 PM, you wrote:
break p = span (not . p)
it's definitely better
and = foldr () True
i think that definitions with omitted arguments can be more hrd to
understand to newbie
Hi,
Now that I have read the tutorials, I think that the best way to learn
Haskell would be to use the language and write something simple yet
useful. I noticed that Haskell lacks a module for reading/writing csv
(comma separated value) files, so I thought I could implement that.
Questions:
1.
On Tue, Aug 22, 2006 at 11:26:45AM +0200, Henning Thielemann wrote:
See also
http://www.xoltar.org/languages/haskell.html
http://www.xoltar.org/languages/haskell/CSV.hs
Thanks. Haskell is incredibly neat ;-)
Now I need to find something else for practice. Is there anything
Hi,
Having read some tutorials, I would like to start using Haskell for
real, but I have some questions about data structures.
The mathematical description of the problem is the following: assume
there is a function V(a,b,theta), where a and b can have two values,
High or Low, and theta is a
On Thu, Aug 31, 2006 at 11:09:07AM +0400, Bulat Ziganshin wrote:
Hello Benjamin,
Wednesday, August 30, 2006, 11:40:09 PM, you wrote:
Matthias Fischmann wrote:
The trick is that Int is not the only index data type, but tuples of
index data types are, too. Do this:
| type Point =
Hi,
I am newbie, reading the Gentle Introduction. Chapter 7
(Input/Output) says
Pragmatically, it may seem that getContents must immediately read an
entire file or channel, resulting in poor space and time performance
under certain conditions. However, this is not the case. The key
Hi,
I am a Haskell newbie. Having read some tutorials (Yet Another,
Gentle Introduction) and some papers/tutorials on monads, I would like
to spend some time practicing what I have learned before embarking on
more abstract/obscure things and/or using Haskell for everyday tasks.
I am looking for
On Sun, Sep 03, 2006 at 12:47:45PM +0400, Bulat Ziganshin wrote:
Hello Tamas,
Sunday, September 3, 2006, 12:15:48 PM, you wrote:
I am looking for small to medium sized practice problems, preferably
with solutions. Hal Daume's tutorial had some good one-liners (eg
rewrite something
Hi,
I would like to learn a reasonable way (ie how others do it) to debug
programs in Haskell. Is it possible to see what's going on when a
function is evaluated? Eg in
f a b = let c = a+b
d = a*b
in c+d
evaluating
f 1 2
would output something like
f called with values
On Wed, Sep 06, 2006 at 06:33:32AM -0400, Lennart Augustsson wrote:
I've also used Visual Studio, and I wouldn't mind having something
like that for Haskell. But I have to agree with Jon, I think the
best way of debugging is to understand your code. I think people who
come from
Hi,
I have a question about coding and compilers. Suppose that a function
is invoked with the same parameters inside another function declaration, eg
-- this example does nothing particularly meaningless
g a b c = let something1 = f a b
something2 = externalsomething (f a b) 42
On Wed, Sep 06, 2006 at 11:34:05AM +0200, Pepe Iborra wrote:
Hi Tamas
There are several ways to debug a Haskell program.
The most advanced ones are based in offline analysis of traces, I
think Hat [1] is the most up-to-date tool for this. There is a Windows
port of Hat at [5].
Another
Hi Brian and others,
I posted the original question because I didn't know how to get map
(-2) working.
Since the original posting, many people have presented _a priori_
arguments about the merits of different approaches, most importantly
whether or not to abandon the unary - operator. As a
Hi,
Is there a built-in constant in Haskell (or, if it is
compiler-specific, in ghc) that gives the smallest positive floating
point number x such that 1+x /= x? Some languages refer to that as
double.eps or similar. I need it for numeric algorithms.
Thanks,
Tamas
On Sat, Sep 30, 2006 at 12:20:16AM +, Joachim Breitner wrote:
Hi,
Am Freitag, den 29.09.2006, 19:30 -0400 schrieb Tamas K Papp:
the smallest positive floating point number x such that 1+x /= x?
That would be the smallest positive number, woudn't it?
Do you mean the smalles postive
On Fri, Sep 29, 2006 at 09:26:27PM -0400, Lennart Augustsson wrote:
As for using such an eps in a convergence test I'd be very careful.
How do you know that your iteration doesn't make the value bounce
back and forth with more than eps?
Hi Lennart,
Thanks for the answer, I will try it.
On Mon, Sep 25, 2006 at 03:27:32PM +0200, Henning Thielemann wrote:
Hi Henning,
Actually, laziness allows me to formulate algorithms that look more like
the specification of the problem than the solution. E.g., I can formulate
the solution of a differential equation in terms of a power series
On Fri, Sep 29, 2006 at 06:53:35PM -0700, Chad Scherrer wrote:
Tamas,
You might want to read Joachim's post more carefully - he's trying to
help you, and I think he makes a good point.
Chad,
If his point is that there is no smallest positive number, then I
think I understand it, thanks. I
On Sat, Sep 30, 2006 at 04:19:50AM -0400, Lennart Augustsson wrote:
Hang on, hang on, now I'm getting confused.
First you asked for the smallest (positive) x such that
1+x /= x
which is around x=4.5e15.
Then Joachim wondered if you wanted
1+x /= 1
which is around x=2.2e-16.
Oops,
Hi,
I have a computation where a function is always applied to the
previous result. However, this function may not return a value (it
involves finding a root numerically, and there may be no zero on the
interval). The whole problem has a parameter c0, and the function is
also parametrized by
, 2006 at 06:00:43PM -0400, Tamas K Papp wrote:
To: Haskell Cafe haskell-cafe@haskell.org
From: Tamas K Papp [EMAIL PROTECTED]
Date: Sun, 1 Oct 2006 18:00:43 -0400
Subject: [Haskell-cafe] question - which monad to use?
Hi,
I have a computation where a function is always applied
On Mon, Oct 02, 2006 at 11:35:40AM -0400, Tamas K Papp wrote:
Matthias,
Sorry if I was not clear in stating the problem. Your solution works
nicely, but I would like to try writing a monad. This is what I came
up with:
type Failure = String
data Computation a = Computation (Either
Hi,
I have two lists, p and lambda (both are finite). I would like to
calculate
1) the cumulative sum of lambda, ie if
lambda = [lambda1,lambda2,lambda3,...]
then
csum lambda = [lambda1,lambda1+lambda2,lambda1+lambda2+lambda3,...]
2) the cumulative sum of p*lambda (multiplication
On Wed, Oct 11, 2006 at 09:16:57PM -0400, Bill Mill wrote:
I've been working through the Yet Anther Haskell Tutorial at
http://www.cs.utah.edu/~hal/docs/daume02yaht.pdf , and I've gotten up
to Excercise 4.6. It says:
Have you checked the solution? Page 167.
Tamas
Hi,
I noticed that searching on Haskell.org (using the Search feature at
the bottom) doesn't work as I expected. For example, searching for
memoise produces no results.
http://www.google.com/search?q=memoise+site%3Ahaskell.org produces 18
hits. Is this intentional?
Thanks,
Tamas
On Sun, Oct 15, 2006 at 12:17:20PM +, Vraj Mohan wrote:
I am new to Haskell and need help in debugging my code.
I wrote the following function for calculating square roots using Newton's
method:
my_sqrt :: Float - Float
my_sqrt x = improve 1 x
where improve y x = if abs (y
On Sun, Oct 15, 2006 at 03:41:53PM +0100, Neil Mitchell wrote:
Hi
I noticed that searching on Haskell.org (using the Search feature at
the bottom) doesn't work as I expected. For example, searching for
memoise produces no results.
This is searching haskellwiki.
Does anyone have the
33 matches
Mail list logo