Lazy evaluation

Simon Strandgaard a écrit :

···

Florian Gross flgr@ccan.de wrote:

ts wrote:

Well, this is a P language for me this …

It should look more like a very powerful S language which is a major
influence of Ruby to you.

What is S and P language ?
Solving and Proving, as I could understand.
And R is Ruby I suppose.

Lio

I'm not solving, I'm providing.

Then, like I've said, it's a P language

Guy Decoux

Lionel Thiry a écrit :

Simon Strandgaard a écrit :

ts wrote:

Well, this is a P language for me this …

It should look more like a very powerful S language which is a major
influence of Ruby to you.

What is S and P language ?

Solving and Proving, as I could understand.
Solving and Providing, sorry.

Lio

···

Florian Gross flgr@ccan.de wrote:

There are lots of combinations…

P = Proving/Python/Perl/Prolog/Pascal
R = Ruby/Rebol/Rlang
S = Solving/Scheme/Smalltalk/Slang/SML

Im affraid I still don’t understand this thread.

···

Lionel Thiry lthiryidontwantspam@skynetnospam.be wrote:

Simon Strandgaard a écrit :

What is S and P language ?
Solving and Proving, as I could understand.
And R is Ruby I suppose.


Simon Strandgaard

ts wrote:

“F” == Florian Gross flgr@ccan.de writes:

I’m not solving, I’m providing.

Then, like I’ve said, it’s a P language

So Ruby is a P language because it has callcc?

Regards,
Florian Gross

Simon Strandgaard a écrit :

Simon Strandgaard a écrit :

What is S and P language ?

Solving and Proving, as I could understand.
And R is Ruby I suppose.

There are lots of combinations…

P = Proving/Python/Perl/Prolog/Pascal
R = Ruby/Rebol/Rlang
S = Solving/Scheme/Smalltalk/Slang/SML

Im affraid I still don’t understand this thread.
I don’t understand it either! :wink:

Perhaps it is about the P programming langage?
http://blrc.edu.cn/research/P/header.htm

And about the S programming langage?
http://cm.bell-labs.com/cm/ms/departments/sia/Sbook/

Or about some exotic way to classify langages? If someone could light up…

Lio

···

Lionel Thiry lthiryidontwantspam@skynetnospam.be wrote:

So Ruby is a P language because it has callcc?

No, ruby is a R language :slight_smile:

Guy Decoux

From a conceptual point of view is callcc very important.
It is not just added because it may seem like a good feature,
but because it makes Ruby a real functional language (like scheme).
In functional languages can continuations be seen as a
functions-calls.
I find one of the great things about Ruby, how it combines
both object oriented programming (smalltalk) and functional
programming (scheme) in such an elegant way.

···

On Sat, 01 May 2004 11:53:38 +0200, Florian Gross wrote:

ts wrote:

“F” == Florian Gross flgr@ccan.de writes:

I’m not solving, I’m providing.

Then, like I’ve said, it’s a P language

So Ruby is a P language because it has callcc?

obviously you missed the R language :slight_smile:
http://www.jbum.com/idt/r.html

···

il Sat, 01 May 2004 12:52:55 +0200, Lionel Thiry lthiryidontwantspam@skynetnospam.be ha scritto::

Or about some exotic way to classify langages? If someone could light up…

The page is rather empty… it only says: ‘Welcome to the P Language and System’

···

Lionel Thiry lthiryidontwantspam@skynetnospam.be wrote:

Perhaps it is about the P programming langage?
http://blrc.edu.cn/research/P/header.htm


Simon Strandgaard

ts wrote:

So Ruby is a P language because it has callcc?
No, ruby is a R language :slight_smile:

What’s the difference between P and R language in this case then if it
is not that a feature should try to solve concrete problems?

Regards,
Florian Gross

I think this sentence may be incorrect.
I mean, haskell, ocaml and lisp all does not have call/cc yet they’re
functional languages.
(actually I’m not sure if lisp, ocaml and scheme can be defined as
functional languages, cause they’re not pure ones, if I’m correct)

···

il Sat, 01 May 2004 12:29:59 +0200, Kristof Bastiaensen kristof@vleeuwen.org ha scritto::

From a conceptual point of view is callcc very important.
It is not just added because it may seem like a good feature,
but because it makes Ruby a real functional language (like scheme).

gabriele renzi a écrit :

Or about some exotic way to classify langages? If someone could light up…

obviously you missed the R language :slight_smile:
The R Programming Language
I forget to tell about it.
I’ve read somewhere there are one-caracter-name langages for almost all
letters of the latin alphabet (A → Z). It seems it still lefts U, I and
T. If someone want to create a one-caracter-name langage, he should
hurry! :slight_smile:
The original link where I found that is in french, look in the comments:
Les spécifications du langage D sont arrivées - LinuxFr.org

Lio

···

il Sat, 01 May 2004 12:52:55 +0200, Lionel Thiry > lthiryidontwantspam@skynetnospam.be ha scritto::

Hi,

···

In message “Re: Lazy evaluation (evil)” on 04/05/01, Kristof Bastiaensen kristof@vleeuwen.org writes:

From a conceptual point of view is callcc very important.
It is not just added because it may seem like a good feature,
but because it makes Ruby a real functional language (like scheme).
In functional languages can continuations be seen as a
functions-calls.

I have to mention callcc was added not because to make Ruby a real
functional language, but because we happened to succeed to implement
it, and there was no reason to remove.

						matz.

What's the difference between P and R language in this case then if it
is not that a feature should try to solve concrete problems?

You think, apparently, that it exist a concrete problem and you think that
you can, or need to, to solve it.

Personnaly I don't know :slight_smile:

Guy Decoux

gabriele renzi a écrit :

From a conceptual point of view is callcc very important.

It is not just added because it may seem like a good feature,
but because it makes Ruby a real functional language (like scheme).

I think this sentence may be incorrect.
I mean, haskell, ocaml and lisp all does not have call/cc yet they’re
functional languages.
(actually I’m not sure if lisp, ocaml and scheme can be defined as
functional languages, cause they’re not pure ones, if I’m correct)

Ocaml is a functionnal langage of the ML family. It means it abuses of
pattern matching and allows for side effects. As far as I know, lisp and
scheme are pure functionnal langage as they don’t allow side effects.
But perhaps I’m wrong. And I’m often wrong. :wink:

About Ruby, I must tell I find it hard to see where Ruby is functionnal
langage. Coding recursivity in ruby is most of the time so uneasy. I
just wonder, if someone can explain, he’ll be welcome.

Lio

···

il Sat, 01 May 2004 12:29:59 +0200, Kristof Bastiaensen > kristof@vleeuwen.org ha scritto::

Lisp is more or less the original functional language. However, it’s pretty
multi-paradigm, as you can do procedural or even object oriented (and logic?)
programming with it. It’s just not a pure functional language like Haskell.
Same with Scheme and OCaml. They just encourage programming in a functional
style (Scheme and OCaml more so than Lisp, maybe).

I’d say lambda expressions are more of a defining characteristic of functional
languages.

call/cc is an important function, conceptually, though, since with it you can
implement arbitrary control flow constructs (like conditionals and loops). So
when people ask for things like resumable exceptions, we can do them in pure
Ruby. :slight_smile:

  • Dan

You are right, I used the term “functional language” in a wrong
way. Ruby isn’t functional, because it doesn’t encourage a
functional programming style. A meant to say that Ruby treats
functions and continuations as first class objects (just as
in functional languages). You could take a scheme program and
rewrite it in Ruby. It is a pity that the current Ruby-interpreter
doesn’t handle tail-recursive call’s, I hope that will be in
Ruby 2.0.

Another point where Ruby would come short, is in
scoping rules. Ruby has no equivalent for scheme “let”.
Especially with the new local-scoping rules, I have the
impression that it isn’t possible to have block local
variables (or am I wrong?). Wouldn’t it be useful to have a
local indentifier, to mean the start of a new scope for
these variables:

a = “foo”
4.times do |i|
local a = i * i
end
puts a
=> “foo”

Kristof

···

On Sat, 01 May 2004 10:38:55 +0000, gabriele renzi wrote:

il Sat, 01 May 2004 12:29:59 +0200, Kristof Bastiaensen > kristof@vleeuwen.org ha scritto::

From a conceptual point of view is callcc very important.
It is not just added because it may seem like a good feature,
but because it makes Ruby a real functional language (like scheme).

I think this sentence may be incorrect.
I mean, haskell, ocaml and lisp all does not have call/cc yet they’re
functional languages.
(actually I’m not sure if lisp, ocaml and scheme can be defined as
functional languages, cause they’re not pure ones, if I’m correct)

I guess this really deserved to be called “pragmatism” :wink:

Yours,

Jean-Hugues

···

At 08:36 02/05/2004 +0900, you wrote:

Hi,

In message “Re: Lazy evaluation (evil)” > on 04/05/01, Kristof Bastiaensen kristof@vleeuwen.org writes:

From a conceptual point of view is callcc very important.
It is not just added because it may seem like a good feature,
but because it makes Ruby a real functional language (like scheme).
In functional languages can continuations be seen as a
functions-calls.

I have to mention callcc was added not because to make Ruby a real
functional language, but because we happened to succeed to implement
it, and there was no reason to remove.

                                                    matz.

Web: http://hdl.handle.net/1030.37/1.1
Phone: +33 (0) 4 92 27 74 17

ts wrote:

What’s the difference between P and R language in this case then if it
is not that a feature should try to solve concrete problems?

You think, apparently, that it exist a concrete problem and you think that
you can, or need to, to solve it.

No. As I said: I’m providing, not solving. I do the same that Ruby does
with callcc. And Ruby is no P language, as you said.

Regards,
Florian Gross