On Sat, 12 Jan 2008 13:23:41 +0200, Kalman Noel
[EMAIL PROTECTED] wrote:
Achim Schneider wrote:
Actually, lim( 0 ) * lim( inf ) isn't anything but equals one, and
the anything is defined to one (or, rather, is _one_ anything) to be
able to use the abstraction. It's a bit like the difference
On Sat, 12 Jan 2008 13:55:19 +0200, Kalman Noel
[EMAIL PROTECTED] wrote:
Cristian Baboi:
Suppose lim a_n = a , lim b_n = b, c_2n = a_n, c_2n+1 = b_n.
What is lim c_n ?
If my intuition was of any importance here, it would claim that c_n
diverges, because if I roughly approximate c_n
On Thu, 10 Jan 2008 19:38:07 +0200, Tillmann Rendel
[EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
Although it could be argued that laziness is the cause of some very
obscure bugs... g Niko
Example, PLEASE.
Prelude sum [1..100]
*** Exception: stack overflow
Not true in Hugs.
On Fri, 11 Jan 2008 09:16:12 +0200, Lennart Augustsson
[EMAIL PROTECTED] wrote:
Thank you Duncan, you took the words out of my mouth. :)
On Jan 10, 2008 5:42 PM, Duncan Coutts [EMAIL PROTECTED]
wrote:
So let's imagine:
ones = 1 : ones
ones' = repeat 1
where repeat n = n : repeat n
On Fri, 11 Jan 2008 09:11:52 +0200, Lennart Augustsson
[EMAIL PROTECTED] wrote:
Some people seem to think that == is an equality predicate.
This is a big source of confusion for them; until they realize that == is
just another function returning Bool they will make claims like
[1..]==[1..]
On Fri, 11 Jan 2008 09:11:52 +0200, Lennart Augustsson
[EMAIL PROTECTED] wrote:
Some people seem to think that == is an equality predicate.
This is a big source of confusion for them; until they realize that == is
just another function returning Bool they will make claims like
[1..]==[1..]
On Fri, 11 Jan 2008 13:29:35 +0200, Wolfgang Jeltsch
[EMAIL PROTECTED] wrote:
Am Freitag, 11. Januar 2008 10:54 schrieb Wilhelm B. Kloke:
Wolfgang Jeltsch [EMAIL PROTECTED] schrieb:
However, the fact that (0 / 0) == (0 / 0) yields False is quite
shocking.
It doesn?t adhere to any
On Fri, 11 Jan 2008 14:21:45 +0200, [EMAIL PROTECTED]
wrote:
Ketil Malde:
Wolfgang Jeltsch:
However, the fact that (0 / 0) == (0 / 0) yields False is quite
shocking.
It doesn’t adhere to any meaningful axiom set for Eq.
Tough luck, but that's how floating point works, and what the
The thing is that y already is a *builtin* function in Haskell.
On Fri, 11 Jan 2008 15:59:50 +0200, Achim Schneider [EMAIL PROTECTED] wrote:
Cristian Baboi [EMAIL PROTECTED] wrote:
So let's imagine:
ones = 1 : ones
ones' = repeat 1
where repeat n = n : repeat n
(==) :: Eq
On Thu, 10 Jan 2008 10:22:03 +0200, Mitar [EMAIL PROTECTED] wrote:
Hi!
Why is 0/0 (which is NaN) 1 == False and at the same time 0/0 1 ==
False. This means that 0/0 == 1? No, because also 0/0 == 1 == False.
I understand that proper mathematical behavior would be that as 0/0 is
On Thu, 10 Jan 2008 10:48:51 +0200, Benja Fallenstein
[EMAIL PROTECTED] wrote:
Hi Mitar,
On Jan 10, 2008 9:22 AM, Mitar [EMAIL PROTECTED] wrote:
I understand that proper mathematical behavior would be that as 0/0 is
mathematically undefined that 0/0 cannot be even compared to 1.
My
On Thu, 10 Jan 2008 10:48:51 +0200, Benja Fallenstein
[EMAIL PROTECTED] wrote:
Hi Mitar,
On Jan 10, 2008 9:22 AM, Mitar [EMAIL PROTECTED] wrote:
I understand that proper mathematical behavior would be that as 0/0 is
mathematically undefined that 0/0 cannot be even compared to 1.
My
and there is no such thing as the same bottom right ?
On Thu, 10 Jan 2008 11:13:05 +0200, Ketil Malde [EMAIL PROTECTED]
wrote:
Cristian Baboi [EMAIL PROTECTED] writes:
I think it's a bug.
Here is why:
let f = (\x - x/0) in f 0 == f 0
Referential transparency say that f 0 must equal to f
On Thu, 10 Jan 2008 11:23:51 +0200, Yitzchak Gale [EMAIL PROTECTED] wrote:
Cristian Baboi wrote:
and there is no such thing as the same bottom right ?
Yes and no.
Semantically, Yes and No is bottom ?
Information from NOD32
This message was checked by NOD32 Antivirus
On Thu, 10 Jan 2008 10:22:03 +0200, Mitar [EMAIL PROTECTED] wrote:
Hi!
Why is 0/0 (which is NaN) 1 == False and at the same time 0/0 1 ==
False. This means that 0/0 == 1? No, because also 0/0 == 1 == False.
I understand that proper mathematical behavior would be that as 0/0 is
On Fri, 11 Jan 2008 08:34:10 +0200, Don Stewart [EMAIL PROTECTED] wrote:
NaN is not 'undefined'
(0/0) /= (0/0) is True
(0/0) == (0/0) is False
You can use these to test for NaN.
You can also use isNaN :)
Prelude isNaN (1/0)
False
Prelude isNaN (0/0)
True
Not true in
On Sun, 06 Jan 2008 17:19:31 +0200, Daniel Fischer
[EMAIL PROTECTED] wrote:
Am Sonntag, 6. Januar 2008 15:54 schrieb Achim Schneider:
Daniel Fischer [EMAIL PROTECTED] wrote:
Am Sonntag, 6. Januar 2008 15:18 schrieb Andrew Coppin:
Daniel Fischer wrote:
Just because I don't know:
what
I recommend you read Extending the database relational model to capture
more meaning by E.F. Codd.
On Wed, 02 Jan 2008 13:50:46 +0200, Peter Verswyvelen [EMAIL PROTECTED]
wrote:
As I'm a selfmade man, I never really studied relational databases in
detail. My intuition told me that the
It give Something.
On Mon, 31 Dec 2007 10:27:38 +0200, Achim Schneider [EMAIL PROTECTED] wrote:
Cristian Baboi [EMAIL PROTECTED] wrote:
How about
a :: Something
a = let x = x in x
:t a
would give (a - [a]), not Something, or am I mistaken?
Information from NOD32
On Mon, 31 Dec 2007 10:40:13 +0200, Achim Schneider [EMAIL PROTECTED] wrote:
It seems like you're trying to solve the halting problem.
I didn't know that.
Slurping any
infinite data structure makes your program perform rather badly, I'm
afraid.
What is infinite in let x = x in x ?
What I
On Mon, 31 Dec 2007 10:59:28 +0200, Achim Schneider [EMAIL PROTECTED] wrote:
Achim Schneider [EMAIL PROTECTED] wrote:
Cristian Baboi [EMAIL PROTECTED] wrote:
What is infinite in let x = x in x
On Mon, 31 Dec 2007 11:14:39 +0200, Achim Schneider [EMAIL PROTECTED] wrote:
Cristian Baboi [EMAIL PROTECTED] wrote:
I could have written this instead:
a :: Something
a = a
Which is nicer than undefined.
[EMAIL PROTECTED] ~ % ghci
GHCi, version 6.8.2: http://www.haskell.org/ghc
On Mon, 31 Dec 2007 11:14:39 +0200, Achim Schneider [EMAIL PROTECTED] wrote:
Cristian Baboi [EMAIL PROTECTED] wrote:
On Mon, 31 Dec 2007 10:59:28 +0200, Achim Schneider [EMAIL PROTECTED]
wrote:
I could have written this instead:
a :: Something
a = a
Which is nicer than undefined
Nice! Thank you.
On Mon, 31 Dec 2007 12:56:42 +0200, Ryan Ingram [EMAIL PROTECTED]
wrote:
On 12/30/07, Cristian Baboi [EMAIL PROTECTED] wrote:
Thank you.
data Something = This | S Something
ppp :: Something - String
ppp This =
ppp (S x) = 'S':(ppp x)
How can I prevent one to pass
On Mon, 31 Dec 2007 14:36:02 +0200, Joost Behrends [EMAIL PROTECTED]
wrote:
I forgot 2 things:
The distinction between '=' and '==' is much like in C, although mixing
them up is not so dangerous like in C. ':=' and '=' like in Wirth
languages would be nicer.
Strangely nobody reacted on
On Sat, 29 Dec 2007 21:12:21 +0200, Achim Schneider [EMAIL PROTECTED] wrote:
Try writing a program that makes me say hello world as many times as
you press my nose.
Be careful what you wish for. :-)
___
Haskell-Cafe mailing list
On Sat, 29 Dec 2007 21:49:16 +0200, Jonathan Cast
[EMAIL PROTECTED] wrote:
On 29 Dec 2007, at 5:01 AM, Cristian Baboi wrote:
By portable I mean: works on the same machine, with the same OS, but
with different Haskell implementation.
Ah, you can't. But, again, what are you trying to do
On Sun, 30 Dec 2007 18:39:51 +0200, Jonathan Cast
[EMAIL PROTECTED] wrote:
On 30 Dec 2007, at 10:14 AM, Cristian Baboi wrote:
On Sat, 29 Dec 2007 21:49:16 +0200, Jonathan Cast
[EMAIL PROTECTED] wrote:
On 29 Dec 2007, at 5:01 AM, Cristian Baboi wrote:
By portable I mean: works
On Sun, 30 Dec 2007 18:34:08 +0200, Daniel Fischer
[EMAIL PROTECTED] wrote:
True, but again, what are you trying to do?
I've already did what I was trying to do.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
In section 4.3.3., chapter 4: Structured types and the semantics of
pattern-matching, by S.Peyton Jones and Philip Wadler, there is this
equation:
Eval[[\(s p1 p2 ... pt).E]] (s a1 a2 ...at) = Eval[[\p1 ... \pt.E]] a1 ...
at
The text say:
To apply \(s p1 ... pt).E to an argument A we
On Sun, 30 Dec 2007 19:10:44 +0200, Daniel Fischer
[EMAIL PROTECTED] wrote:
Am Sonntag, 30. Dezember 2007 17:55 schrieb Cristian Baboi:
On Sun, 30 Dec 2007 18:34:08 +0200, Daniel Fischer
[EMAIL PROTECTED] wrote:
True, but again, what are you trying to do?
I've already did what I
On Sun, 30 Dec 2007 19:02:11 +0200, Jonathan Cast
[EMAIL PROTECTED] wrote:
On 30 Dec 2007, at 10:54 AM, Cristian Baboi wrote:
On Sun, 30 Dec 2007 18:39:51 +0200, Jonathan Cast
[EMAIL PROTECTED] wrote:
On 30 Dec 2007, at 10:14 AM, Cristian Baboi wrote:
On Sat, 29 Dec 2007 21:49:16 +0200
On Sun, 30 Dec 2007 19:13:47 +0200, Jonathan Cast
[EMAIL PROTECTED] wrote:
On 30 Dec 2007, at 11:10 AM, Cristian Baboi wrote:
In section 4.3.3., chapter 4: Structured types and the semantics of
pattern-matching, by S.Peyton Jones and Philip Wadler, there is this
equation:
Eval[[\(s p1
On Sun, 30 Dec 2007 19:16:04 +0200, Jonathan Cast
[EMAIL PROTECTED] wrote:
If you want help, you would have an easier time getting it if you came
here with /programming/ problems. Most of us enjoy programming quite a
bit, and are eager to help with such, but this sort of thing is more of
On Sun, 30 Dec 2007 19:19:11 +0200, Jonathan Cast
[EMAIL PROTECTED] wrote:
When you can convince me that continuing this discussion will be of use
/to the Haskell community/, I will until then, goodbye.
I won't even try to do that.
Goodbye.
___
,
On Dec 30, 2007 6:10 PM, Cristian Baboi [EMAIL PROTECTED] wrote:
What I don't get it :
(s a1 a2 ... at) must be the value of A in the semantic domain. Let call
that value a.
Then how can one know if a was built with (s a1 a2 ... at) and not with
(egg b1 b2) ?
Because the semantic domain is chosen
On Sun, 30 Dec 2007 20:00:05 +0200, Daniel Fischer
[EMAIL PROTECTED] wrote:
Am Sonntag, 30. Dezember 2007 18:16 schrieb Cristian Baboi:
A simple question:
Can you write the value of x to a file where x = (1:x) ?
Not in finite time and space :)
I used the word 'value' by mistake
On Sun, 30 Dec 2007 20:24:23 +0200, Daniel Fischer
[EMAIL PROTECTED] wrote:
Am Sonntag, 30. Dezember 2007 19:04 schrieb Cristian Baboi:
On Sun, 30 Dec 2007 20:00:05 +0200, Daniel Fischer
[EMAIL PROTECTED] wrote:
Am Sonntag, 30. Dezember 2007 18:16 schrieb Cristian Baboi:
A simple question
On Sun, 30 Dec 2007 21:07:44 +0200, Daniel Fischer
[EMAIL PROTECTED] wrote:
Am Sonntag, 30. Dezember 2007 19:31 schrieb Cristian Baboi:
I mean this:
module Module where
a= let x=1:x in x
main = do something to write a (a notation for a) to file
The function must work if one change
PROTECTED]:
2007/12/30, Cristian Baboi [EMAIL PROTECTED]:
A simple question:
Can you write the value of x to a file where x = (1:x) ?
Yes, but you'll have to write it yourself, because Haskell can't
decide by itself that this value is infinite and try to print it with
a recursive definition
How about
a :: Something
a = let x = x in x
ppp a
On Mon, 31 Dec 2007 09:11:12 +0200, Cristian Baboi [EMAIL PROTECTED]
wrote:
Thank you.
data Something = This | S Something
ppp :: Something - String
ppp This =
ppp (S x) = 'S':(ppp x)
How can I prevent one to pass 'let x = S x
On Sat, 29 Dec 2007 01:42:54 +0200, Jonathan Cast
[EMAIL PROTECTED] wrote:
Here is how I want print to be in Haskell
print :: (a-b) - (a-b)
with print = id, but the following side effect:
- I want to call the print function today, and get the value tomorrow.
Sorry, simply couldn't
On Sat, 29 Dec 2007 02:08:14 +0200, Jonathan Cast
[EMAIL PROTECTED] wrote:
How can one make portable dynamic libraries then ?
If by portable you mean, works on /both/ OSs, then GHC-specific should
be portable enough for you...
By portable I mean: works on the same machine, with the
On Sat, 29 Dec 2007 13:01:44 +0200, Cristian Baboi
[EMAIL PROTECTED] wrote:
On Sat, 29 Dec 2007 02:08:14 +0200, Jonathan Cast
[EMAIL PROTECTED] wrote:
How can one make portable dynamic libraries then ?
If by portable you mean, works on /both/ OSs, then GHC-specific should
be portable
In The Implementation of Functional Programming Languages by S.P. Jones,
section 2.5.3, page 32 it is written:
Eval [[*]] a b = a x b
Eval [[*]] _|_ b = _|_
Eval [[*]] a _|_ = _|_
but in section 2.5.2 it is said that _|_ is an element of the value domain.
What business does it have on the
Sorry, I think a and b are from the value domain.
On Sat, 29 Dec 2007 13:14:09 +0200, Cristian Baboi
[EMAIL PROTECTED] wrote:
In The Implementation of Functional Programming Languages by S.P. Jones,
section 2.5.3, page 32 it is written:
Eval [[*]] a b = a x b
Eval [[*]] _|_ b
On Sat, 29 Dec 2007 13:30:03 +0200, Luke Palmer [EMAIL PROTECTED] wrote:
On Dec 29, 2007 11:14 AM, Cristian Baboi [EMAIL PROTECTED]
wrote:
In The Implementation of Functional Programming Languages by S.P. Jones,
section 2.5.3, page 32 it is written:
Eval [[*]] a b = a x b
Eval [[*]] _|_ b
On Sat, 29 Dec 2007 16:01:51 +0200, Achim Schneider [EMAIL PROTECTED] wrote:
Cristian Baboi [EMAIL PROTECTED] wrote:
It appears as if lambda calculus is defined by lambda calculus.
Yes. id (lambda calculus) = lambda calculus. You might try to point
back to yourself when being asked who
Thank you.
It sounds like a limit. xn -- x for n -- :-)
How can I get that maximal value when I start from a non maximal one ?
[1 .. ] and x=1:x are maximal ?
On Fri, 28 Dec 2007 11:21:36 +0200, Miguel Mitrofanov
[EMAIL PROTECTED] wrote:
How can I test that partial order in Haskell ?
On Fri, 28 Dec 2007 12:01:51 +0200, Miguel Mitrofanov
[EMAIL PROTECTED] wrote:
It sounds like a limit. xn -- x for n -- :-)
Yeah, that's right.
If xn is monotone, then I only have to worry when it is not bounded, right
?
How can I get that maximal value when I start from a non
Thank you.
This is what I understand so far:
- the maximal values is what is usually called data
- the non maximal are what is usually called code
- in functional languages one can be given non maximal values (code) as
input
Is that right ?
On Fri, 28 Dec 2007 12:01:51 +0200, Miguel
On Fri, 28 Dec 2007 12:01:51 +0200, Miguel Mitrofanov
[EMAIL PROTECTED] wrote:
[1 .. ] and x=1:x are maximal ?
Yes.
How can a Haskell implementation recognize a maximal value ?
x=1:x for example.
Information from NOD32
This message was checked by NOD32 Antivirus
On Fri, 28 Dec 2007 12:03:04 +0200, apfelmus [EMAIL PROTECTED]
wrote:
Cristian Baboi wrote:
http://en.wikipedia.org/wiki/First-class_object
The term was coined by Christopher Strachey in the context of
“functions as first-class citizens” in the mid-1960's.[1]
Depending on the language
Here is how I want print to be in Haskell
print :: (a-b) - (a-b)
with print = id, but the following side effect:
- I want to call the print function today, and get the value tomorrow.
On Fri, 28 Dec 2007 12:03:04 +0200, apfelmus [EMAIL PROTECTED]
wrote:
Cristian Baboi wrote:
http
But I guess it won't work because the compiler will optimize it and the
call will disappear.
On Fri, 28 Dec 2007 14:58:53 +0200, Cristian Baboi [EMAIL PROTECTED]
wrote:
Here is how I want print to be in Haskell
print :: (a-b) - (a-b)
with print = id, but the following side effect:
- I
On Fri, 28 Dec 2007 15:29:00 +0200, Miguel Mitrofanov
[EMAIL PROTECTED] wrote:
take 5 [1,2,3,4,5,undefined]
(What would GHCi print?
[1,2,3,4,5]
Then please square that with your comment that we don't care how much of
the list gets evaluated.)
I don't care if it evaluates it, reads it's
to
convert that something to a Haskell String
- I want to be able to use a function defined in one process in other
process even if the two does not run at the same time
Cristian Baboi wrote:
But I guess it won't work because the compiler will optimize it and the
call will disappear
On Fri, 28 Dec 2007 16:34:23 +0200, apfelmus [EMAIL PROTECTED]
wrote:
Jules Bean wrote:
Cristian Baboi wrote:
But I guess it won't work because the compiler will optimize it
and the call will disappear.
I'm not quite sure what you're trying to say here.
(That's the world view on Haskell
On Fri, 28 Dec 2007 18:32:05 +0200, Jules Bean [EMAIL PROTECTED]
wrote:
Cristian Baboi wrote:
Let me ask you 3 simple questions.
Can one use Haskell to make dynamically linked libraries (DLL on
Windows, so on Linux) ?
The short answer is yes.
The long answer
schrieb Cristian Baboi:
I'll have to trust you, because I cannot test it.
let x=(1:x); y=(1:y) in x==y .
I also cannot test this:
let x=(1:x); y=1:1:y in x==y
In these examples, x and y denote the same value but the result
of x == y is _|_ (undefined) in both cases. So
On Fri, 28 Dec 2007 19:18:33 +0200, ChrisK [EMAIL PROTECTED]
wrote:
This thread is obviously a source of much fun. I will play too.
Well, it starts with Wikipedia ... :-)
What is the definition of an entry point in Haskell ?
Haskell does not have such a concept. At all. An
Here is what I was able to come up with:
module Store where
data FStore1 a b = Empty1 | FS1 ( a-b , FStore1 a b )
store1 :: (a-b) - (FStore1 a b)
store1 f = let x = FS1 (f, x) in x
data FStore2 a b = Empty2 | FS2 ( a-b , FStore2 a b, FStore2 a b )
store2 :: (a-b) - (FStore2 a b)
store2 f
--- Forwarded message ---
From: Cristian Baboi [EMAIL PROTECTED]
To: Yitzchak Gale [EMAIL PROTECTED]
Cc:
Subject: Re: [Haskell-cafe] Wikipedia on first-class object
Date: Thu, 27 Dec 2007 12:21:44 +0200
I think I found the answer to why functions cannot be written to files
Thinking about files and types, I recalled that in Pascal files must have
types.
On Thu, 27 Dec 2007 12:40:22 +0200, Yitzchak Gale [EMAIL PROTECTED] wrote:
I'm not sure that in Haskell one can say that storing a value of some
type
to disk is an operation defined on that type.
It is. For
On Thu, 27 Dec 2007 14:37:51 +0200, Yitzchak Gale [EMAIL PROTECTED] wrote:
I wrote:
Like any type, only certain operations make
sense on functions...
Yes, but one can store the result of an operation to disk except in
the
particular case the result happen to be a function.
No, you can
On Thu, 27 Dec 2007 14:37:51 +0200, Yitzchak Gale [EMAIL PROTECTED] wrote:
I wrote:
Like any type, only certain operations make
sense on functions...
Yes, but one can store the result of an operation to disk except in
the
particular case the result happen to be a function.
No, you can
On Thu, 27 Dec 2007 14:02:36 +0200, Lennart Augustsson
[EMAIL PROTECTED] wrote:
Comparing functions is certainly possible in Haskell, but there's no
standard function that does it.
If course, it might not terminate, but the same is true for many other
comparable objects in Haskell, e.g.,
How about x below:
let x=(1:x) in x ?
Is x a single value in Haskell ?
--- Forwarded message ---
From: Cristian Baboi [EMAIL PROTECTED]
To: Lennart Augustsson [EMAIL PROTECTED]
Cc: haskell-cafe@haskell.org haskell-cafe@haskell.org
Subject: Re: [Haskell-cafe] Wikipedia on first-class
On Thu, 27 Dec 2007 14:42:37 +0200, Bulat Ziganshin
[EMAIL PROTECTED] wrote:
Hello Cristian,
Thursday, December 27, 2007, 12:19:08 PM, you wrote:
Yes, but one can store the result of an operation to disk except in the
particular case the result happen to be a function.
how can values of
Good to know. I intended to use Haskell for algorithms, but it seems it is
not so good at them.
On Thu, 27 Dec 2007 17:52:19 +0200, Jonathan Cast
[EMAIL PROTECTED] wrote:
On 27 Dec 2007, at 9:47 AM, Cristian Baboi wrote:
I don't know. I'm a beginner in Haskell, and I down't know
On Thu, 27 Dec 2007 16:50:10 +0200, Lennart Augustsson
[EMAIL PROTECTED] wrote:
Absolutly. Every expression in Haskell denotes a value.
Now, we've not agreed what value means, but to me it is a value. :)
It is one value, or several ?
Information from NOD32
This message
On Thu, 27 Dec 2007 16:12:04 +0200, Bulat Ziganshin
[EMAIL PROTECTED] wrote:
Hello Cristian,
Thursday, December 27, 2007, 3:51:17 PM, you wrote:
Yes, but one can store the result of an operation to disk except in
the
particular case the result happen to be a function.
how can values
I'll have to trust you, because I cannot test it.
let x=(1:x); y=(1:y) in x==y .
I also cannot test this:
let x=(1:x); y=1:1:y in x==y
On Thu, 27 Dec 2007 17:29:12 +0200, Lennart Augustsson
[EMAIL PROTECTED] wrote:
One value. One infinite value.
On Dec 27, 2007 3:53 PM, Cristian
I don't know. I'm a beginner in Haskell, and I down't know about T.
You mean they cannot ?
I was under the impression that the purpose of computers cannot be
fulfiled if we cannot get the result of computations out of the
computers.
Haskell is not a computer programming language; Haskell
On Thu, 27 Dec 2007 17:39:25 +0200, Jonathan Cast
[EMAIL PROTECTED] wrote:
On 27 Dec 2007, at 6:51 AM, Cristian Baboi wrote:
On Thu, 27 Dec 2007 14:42:37 +0200, Bulat Ziganshin
[EMAIL PROTECTED] wrote:
Hello Cristian,
Thursday, December 27, 2007, 12:19:08 PM, you wrote:
Yes, but one
On Thu, 27 Dec 2007 18:45:23 +0200, Jonathan Cast
[EMAIL PROTECTED] wrote:
On 27 Dec 2007, at 9:57 AM, Cristian Baboi wrote:
Good to know. I intended to use Haskell for algorithms, but it seems it
is not so good at them.
Very sad. The entire point of Haskell is that it allows the user
On Thu, 27 Dec 2007 18:13:57 +0200, Wolfgang Jeltsch
[EMAIL PROTECTED] wrote:
Am Donnerstag, 27. Dezember 2007 16:57 schrieb Cristian Baboi:
On Thu, 27 Dec 2007 17:52:19 +0200, Jonathan Cast
Which is why Haskell treats IO as a domain specific language.
Good to know. I intended to use
On Thu, 27 Dec 2007 18:14:53 +0200, Wolfgang Jeltsch
[EMAIL PROTECTED] wrote:
Am Donnerstag, 27. Dezember 2007 15:53 schrieb Cristian Baboi:
On Thu, 27 Dec 2007 16:50:10 +0200, Lennart Augustsson
[EMAIL PROTECTED] wrote:
Absolutly. Every expression in Haskell denotes a value.
Now, we've
On Thu, 27 Dec 2007 18:19:47 +0200, Wolfgang Jeltsch
[EMAIL PROTECTED] wrote:
Am Donnerstag, 27. Dezember 2007 16:34 schrieb Cristian Baboi:
I'll have to trust you, because I cannot test it.
let x=(1:x); y=(1:y) in x==y .
I also cannot test this:
let x=(1:x); y=1:1:y in x==y
On Thu, 27 Dec 2007 17:35:54 +0200, Jonathan Cast
[EMAIL PROTECTED] wrote:
Only on Von Neuman machines. Haskell implementations are not required
to run on Von Neuman machines. That's why the language is called
functional. (Imperative languages, by contrast, are just abstractions
of
On Thu, 27 Dec 2007 17:39:25 +0200, Jonathan Cast
[EMAIL PROTECTED] wrote:
Haskell is not a computer programming language; Haskell implementations
are not required to run on computers. Haskell is a formal notation for
computation (completely unrelated to the Von Neuman machine sitting on
On Wed, 26 Dec 2007 17:16:22 +0200, Neil Mitchell [EMAIL PROTECTED]
wrote:
Hi,
Are CAF's specified in the Haskell report? I couldn't find them
mentioned.
If not, why do all Haskell compilers support them? Is there some paper
which persuaded everyone they were a good idea, or some
http://en.wikipedia.org/wiki/First-class_object
The term was coined by Christopher Strachey in the context of “functions
as first-class citizens” in the mid-1960's.[1]
Depending on the language, this can imply:
1. being expressible as an anonymous literal value
2. being storable in
On Tue, 25 Dec 2007 11:05:59 +0200, Derek Elkins
[EMAIL PROTECTED] wrote:
On Mon, 2007-12-24 at 11:15 +0200, Cristian Baboi wrote:
How can I define a function to do the inverse operation ?
g :: String - ( a - b )
This time I cannot see how referential transparency will deny it.
What's
While reading the Haskell language report I noticed that function type is
not an instance of class Read.
I was told that one cannot define them as an instance of class Show
without breaking referential transparency or printing a constant.
f :: (a-b)-String
f x = bla bla bla
How can I
On Mon, 24 Dec 2007 11:27:11 +0200, apfelmus [EMAIL PROTECTED]
wrote:
Cristian Baboi wrote:
How can I define a function to do the inverse operation ?
g :: String - ( a - b )
This time I cannot see how referential transparency will deny it.
What's the excuse now ?
The new excuse
Let me show you an example to prove it.
The example is limited to composition of unary functions defined on int
u::Int-Int
v::Int-Int
o ::(Int-Int)-(Int-Int)-(Int-Int)
o u v= \x-u(v(x))
#include stdio.h
#include conio.h
#include functional.h
int f1(int x){
return x+x;
}
On Sat, 22 Dec 2007 14:28:56 +0200, Paul Johnson [EMAIL PROTECTED]
wrote:
Cristian Baboi wrote:
Let me show you an example to prove it.
This reminds me of arguments in the late 80s and early 90s that C could
do OO programming via function pointers, so there was no need for OO
languages
--- Forwarded message ---
From: Cristian Baboi [EMAIL PROTECTED]
To: Jules Bean [EMAIL PROTECTED]
Cc:
Subject: Re: [Haskell-cafe] Functions are first class values in C
Date: Sat, 22 Dec 2007 15:58:50 +0200
On Sat, 22 Dec 2007 14:09:13 +0200, Jules Bean [EMAIL PROTECTED]
wrote
On Sat, 22 Dec 2007 14:55:44 +0200, Peter Verswyvelen [EMAIL PROTECTED]
wrote:
Before I knew Haskell, the OO community started to embrace the concept
of interfaces more and more (aka purely abstract classes). Furthermore
in OO, many bugs are caused IMO by keeping track of mutable state and
On Sat, 22 Dec 2007 16:25:26 +0200, Miguel Mitrofanov
[EMAIL PROTECTED] wrote:
That's not C.
That's the C preprocessor, which is a textual substitution macro
language.
Well, the preprocessor is part of the language in a way. These two come
together.
No. In fact, these are even two
On Sat, 22 Dec 2007 16:26:18 +0200, Miguel Mitrofanov
[EMAIL PROTECTED] wrote:
Lazy constant in C:
int C1 (){
return 7;
}
C1 is computed only when you apply the operator () to it.
But that's not the point of lazyness. Lazy value is computed only ONCE.
Ok. I guess I cannot be
On Sat, 22 Dec 2007 16:55:08 +0200, Miguel Mitrofanov
[EMAIL PROTECTED] wrote:
In Haskell I cannot pass a function to a function, only its expansion.
What do you mean by expansion? Can you clarify this?
f1=\x-x+1
f2=\x-2*x
g=\x-x.f1
h=\x-x.(\x-x+1)
h is g
Not clear. Try starting with
On Sat, 22 Dec 2007 16:48:51 +0200, Peter Verswyvelen [EMAIL PROTECTED]
wrote:
Cristian Baboi wrote
Lazy constant in C:
int C1 (){ return 7; }
Not really, this is not lazy, since it always recomputes the value 7.
To have lazy values in C you would have to do something like:
struct
On Sat, 22 Dec 2007 17:13:55 +0200, Philippa Cowderoy [EMAIL PROTECTED]
wrote:
function's expansion is ... just like macro expansion.
No, it's not. Expanding variables (swapping f1 for \x-x+1) isn't the
evaluation mechanism in haskell, g and h really are semantically
equivalent values and
On Sat, 22 Dec 2007 17:18:18 +0200, Philippa Cowderoy [EMAIL PROTECTED]
wrote:
The thing is I think that for a language to have first-class
functions,
it must be homoiconic if I understand the terms correctly.
You're confusing functions with the terms that are used to define them.
The
On Sat, 22 Dec 2007 17:25:34 +0200, Philippa Cowderoy [EMAIL PROTECTED]
wrote:
On Sat, 22 Dec 2007, Cristian Baboi wrote:
On Sat, 22 Dec 2007 17:13:55 +0200, Philippa Cowderoy
[EMAIL PROTECTED]
wrote:
Here's a trivial example that does so:
(\x - x) (\x - x)
A lambda calculus classic
On Tue, 18 Dec 2007 10:29:43 +0200, Miguel Mitrofanov
[EMAIL PROTECTED] wrote:
What I should have been told about upfront:
- the syntax for an expression
- the syntax for a block
Don't see your point.
The point is the syntax is introduced as transformation of layout form to
non layout
On Tue, 18 Dec 2007 11:56:36 +0200, Jon Fairbairn
[EMAIL PROTECTED] wrote:
Cristian Baboi [EMAIL PROTECTED] writes:
- the syntax for a block
Not sure what you mean by block.
do a - [1..10]
b - [3,4]
return (a,b)
is an expression... you can write that same expression as
do
On Tue, 18 Dec 2007 12:25:18 +0200, Miguel Mitrofanov
[EMAIL PROTECTED] wrote:
- the syntax for an expression
- the syntax for a block
Don't see your point.
The point is the syntax is introduced as transformation of layout form
to
non layout form.
As a user, I just want to be able to
1 - 100 of 106 matches
Mail list logo