On Fri, 31 Aug 2007, Brandon S. Allbery KF8NH wrote:
> On Aug 31, 2007, at 16:01 , Sterling Clover wrote:
>
> > In particular for a function -- n, m, etc or x, y, etc? What about
> > for f' defined in a let block of f? If I use x y at the top level I
> > need to use another set below -- is that w
Mitar wrote:
I did once try to learn Prolog. And failed. Miserably.
You should backtrack at this point and try again differently. :-)
There is likely a problem if he has inadvently walked past a cut. XD
___
Haskell-Cafe mailing list
Haskell-Cafe@has
Hi!
> I did once try to learn Prolog. And failed. Miserably.
You should backtrack at this point and try again differently. :-)
Mitar
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Aug 31, 2007, at 16:01 , Sterling Clover wrote:
In particular for a function -- n, m, etc or x, y, etc? What about
for f' defined in a let block of f? If I use x y at the top level I
need to use another set below -- is that where x' y' are more
appropriate, or x1, y1?
Usual style is x
On this topic, I'm just now teaching myself Haskell and am running into a
whole range of stylistic questions like this. My big bad Java habits tend
towards long camelCase function names, which I'm trying to wean myself off.
But the variable conventions are the real issue. As far as I can tell, if
y
Paul Hudak wrote:
ok wrote:
What is so bad about
f x = g x''
where x'' = x' + transform
x' = x * scale
(if you really hate inventing temporary names, that is).
There's nothing at all wrong with this, assuming it's what you meant
to type :-), and it might even correspon
[EMAIL PROTECTED] wrote:
Anyway, I believe strongly that ALL people who have problems with the
Haskell protocole, and they are numerous, I teach a good sample of them,
should be encouraged to learn Prolog. IN DEPTH, and I mean it, Andrew
Coppin and Peter Hercek !
In Prolog A=B is the unification,
ok wrote:
What is so bad about
f x = g x''
where x'' = x' + transform
x' = x * scale
(if you really hate inventing temporary names, that is).
There's nothing at all wrong with this, assuming it's what you meant to
type :-), and it might even correspond perfectly to the
What is so bad about
f x = g x''
where x'' = x' + transform
x' = x * scale
(if you really hate inventing temporary names, that is).
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo
On Thu, 2007-08-30 at 23:58 +0200, [EMAIL PROTECTED]
wrote:
> Dan Piponi writes:
>
> >> In mathematics, if you write "x = f y" you mean that these two
> >> expressions are equal. In Haskell, if you say "x = f y" you mean *make*
> >> then equal!
>
>
> > Haskell is a declarative language, not an
On 8/30/07, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Dan Piponi writes:
> > In Haskell, there is no box.
>
> Well, there are boxes...
> But there also thunks and latent, yet-unevaluated graphs...
But the point of Haskell is to provide an abstraction that hides these
details from you. (Though
Dan Piponi writes:
In mathematics, if you write "x = f y" you mean that these two
expressions are equal. In Haskell, if you say "x = f y" you mean *make*
then equal!
Haskell is a declarative language, not an imperative language. When
you write "x = f x" in Haskell, you're declaring to the co
On 8/30/07, Andrew Coppin <[EMAIL PROTECTED]> wrote:
> Yeah, but... programs aren't like mathematics. I know people claim that
> they are, but they aren't.
But the raison d'etre of Haskell is to make programming more like
mathematics. That motivates everything from the fact that it's a
declarativ
Dan Piponi wrote:
On 8/30/07, Andrew Coppin <[EMAIL PROTECTED]> wrote:
Obviously you might very well have *meant* to write x = f x. But would
it be possible to add some kind of optional compiler warning to find
such assignments?
The thing that convinced me to learn Haskell in the first
David Roundy wrote:
On Thu, Aug 30, 2007 at 06:16:12PM +0100, Andrew Coppin wrote:
Obviously you might very well have *meant* to write x = f x. But would
it be possible to add some kind of optional compiler warning to find
such assignments? It can be a nightmare trying to track down where yo
Brent Yorgey wrote:
It's really maddening to write 50,000 lines of code, eventually get it
to compile, run it, and have the program lock up and start
consuming so
much virtual memory that the entire PC becomes unstable within
seconds.
(This isn't helped by the fact that
On Thu, 30 Aug 2007, Peter Verswyvelen wrote:
> infixl 0 \> -- I just took the first weird symbol combination that came to
> mind, this does not mean anything (I hope ;-)
>
> x \> fx = fx x
>
> f x = x * scale \> \x ->
> x + transform \> \x ->
> g x
>
> like this you don't have to inv
gust 30, 2007 6:18 PM
To: haskell-cafe@haskell.org
Subject: [Haskell-cafe] let and fixed point operator
Hi,
I find the feature that the construct "let x = f x in expr"
assigns fixed point of f to x annoying. The reason is that
I can not simply chain mofifications a variable like e.g. t
Peter Hercek wrote:
So the question is what am I missing? Any nice use cases where
fixed point search is so good that it is worth the trouble with
figuring out new and new variable names for essentially the same
stuff?
When I write functional code, I do find myself writing recursions much
m
Another interesting example of the x = f x use :
coins = [1,2,5,10,20,50,100,200]
beautiful = foldl (\without p ->
let (poor,rich) = splitAt p without
with = poor ++
zipWith (++) (map (map (p:)) with)
Brent Yorgey quotes:
It's really maddening to write 50,000 lines of code, eventually get it
to compile, run it, and have the program lock up and start consuming so
much virtual memory that the entire PC becomes unstable within seconds.
...
Well, this is why you should test your program in bits
Andrew Coppin wrote:
OK, so it's only tangentally related, but... do you have *any idea*
how many times I've written something like
let x = (some complex function of x)
in (some other complex function of x)
when in fact what I *meant* to do was type x' instead of x?!
I try not to use prim
On 8/30/07, Andrew Coppin <[EMAIL PROTECTED]> wrote:
> Obviously you might very well have *meant* to write x = f x. But would
> it be possible to add some kind of optional compiler warning to find
> such assignments?
The thing that convinced me to learn Haskell in the first place was
the fact that
On Thu, Aug 30, 2007 at 06:16:12PM +0100, Andrew Coppin wrote:
> Obviously you might very well have *meant* to write x = f x. But would
> it be possible to add some kind of optional compiler warning to find
> such assignments? It can be a nightmare trying to track down where you
> made the mista
>
> It's really maddening to write 50,000 lines of code, eventually get it
> to compile, run it, and have the program lock up and start consuming so
> much virtual memory that the entire PC becomes unstable within seconds.
(This isn't helped by the fact that Ctrl+C doesn't seem to make either
> GH
OK, so it's only tangentally related, but... do you have *any idea* how
many times I've written something like
let x = (some complex function of x)
in (some other complex function of x)
when in fact what I *meant* to do was type x' instead of x?!
It's really maddening to write 50,000 lines o
On Thu, 2007-08-30 at 18:17 +0200, Peter Hercek wrote:
> Hi,
>
> I find the feature that the construct "let x = f x in expr"
> assigns fixed point of f to x annoying. The reason is that
> I can not simply chain mofifications a variable like e.g. this:
>
> f x =
>let x = x * scale in
>
On 8/30/07, Brent Yorgey <[EMAIL PROTECTED]> wrote:
>
>
>
> The way to combine functions into a pipeline is by using function
> concatenation:
>
Oops, of course I meant "function composition" instead of "function
concatenation".
-Brent
___
Haskell-Caf
On Thu, 2007-08-30 at 18:17 +0200, Peter Hercek wrote:
> I find the feature that the construct "let x = f x in expr"
> assigns fixed point of f to x annoying.
Any alternative? Non-recursive assignments?
> f x =
>let x = x * scale in
>let x = x + transform in
>g x
I think it is o
On 8/30/07, Peter Hercek <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I find the feature that the construct "let x = f x in expr"
> assigns fixed point of f to x annoying. The reason is that
> I can not simply chain mofifications a variable like e.g. this:
>
> f x =
>let x = x * scale in
>let
On 8/30/07, Peter Hercek <[EMAIL PROTECTED]> wrote:
> f x =
>let x = x * scale in
>let x = x + transform in
>g x
Why are you trying to call three different things by the same name 'x'
in one tiny block of code? That's very confusing and makes it hard to
reason equationally about the c
Hi,
I find the feature that the construct "let x = f x in expr"
assigns fixed point of f to x annoying. The reason is that
I can not simply chain mofifications a variable like e.g. this:
f x =
let x = x * scale in
let x = x + transform in
g x
When one is lucky then it results in a compi
32 matches
Mail list logo