From: Javier
Subject: OT: Ruby evangelists in c.l.l
Date:
Message-ID: <ge4c42$577$1@aioe.org>
On Sun, 26 Oct 2008 10:42:00 +0200, Alex Mizrahi wrote:
> WJ> Ruby:
>
> what is your point?
I think he is has just tried Ruby, and was a Lisp student before, he got
impressed about Ruby, and want to evangelize everybody here.
By the way, I'm reviewing the Ruby Netbeans plugin, and must admit that
it is very very good. When are we going to have a CL pluging for Netbeans?
Javier wrote:
> On Sun, 26 Oct 2008 10:42:00 +0200, Alex Mizrahi wrote:
>
>> WJ> Ruby:
>>
>> what is your point?
>
> I think he is has just tried Ruby, and was a Lisp student before, he got
> impressed about Ruby, and want to evangelize everybody here.
>
> By the way, I'm reviewing the Ruby Netbeans plugin, and must admit that
> it is very very good. When are we going to have a CL pluging for Netbeans?
As soon as you implement one.
Pascal
--
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/
From: Javier
Subject: Re: OT: Ruby evangelists in c.l.l
Date:
Message-ID: <ge4dku$b2t$1@aioe.org>
Pascal Costanza escribió:
>> By the way, I'm reviewing the Ruby Netbeans plugin, and must admit
>> that it is very very good. When are we going to have a CL pluging for
>> Netbeans?
>
> As soon as you implement one.
I think I have the Lisp disease: too much talk and learn about your
language, and too little actually doing useful things on it.
On Oct 27, 5:53 am, Javier <······@askmyadress.com> wrote:
> Pascal Costanza escribió:
>
> >> By the way, I'm reviewing the Ruby Netbeans plugin, and must admit
> >> that it is very very good. When are we going to have a CL pluging for
> >> Netbeans?
>
> > As soon as you implement one.
>
> I think I have the Lisp disease: too much talk and learn about your
> language, and too little actually doing useful things on it.
didn't mccarthy put smakdown on ruby in that youtube where he asked if
it is still neccesary to iterate to egt a result wen doing soem
operation in ruby, the commentator said no, and mccarthy said then
ruby is not where lisp was in 1960s
WJ>>> Ruby:
??>>
??>> what is your point?
J> I think he is has just tried Ruby, and was a Lisp student before, he got
J> impressed about Ruby, and want to evangelize everybody here.
i wonder what target audience it. it seems "mature" CL programmers
are very unlikely to get interested. and seducing newcomers is sort
of mean.
On Mon, 27 Oct 2008 15:12:26 +0200, Alex Mizrahi wrote:
> WJ>>> Ruby:
> ??>>
> ??>> what is your point?
>
> J> I think he is has just tried Ruby, and was a Lisp student before, he
> got J> impressed about Ruby, and want to evangelize everybody here.
>
> i wonder what target audience it. it seems "mature" CL programmers are
> very unlikely to get interested. and seducing newcomers is sort of mean.
If a newcomer who has spent at least 2 days with Lisp is "seduced" by
line noise, then he deserves it. People should think for themselves.
The Ruby troll has no target audience. All he has is an inferiority
complex which compels him to rewrite trivial code snippets in Ruby,
thinking he is demonstrating something.
I am not really reading other comp.lang.* newsgroups, but I am under the
impression that c.l.l gets more than its fair share of crackpots and
evangelists. Some think that they are ready to reform Lisp after
spending an afternoon with it. Others argue endlessly about some trivial
aspect of the language. Then there are those who think that just because
they got stuck at the level of some pitiful and powerless language,
everyone else should be using it, which sort of makes sense from their
point if view: "if I do not enjoy programming, nor should you".
Tamas
From: Javier
Subject: Re: OT: Ruby evangelists in c.l.l
Date:
Message-ID: <ge4hci$r3s$1@aioe.org>
Tamas K Papp escribió:
> On Mon, 27 Oct 2008 15:12:26 +0200, Alex Mizrahi wrote:
>
>> WJ>>> Ruby:
>> ??>>
>> ??>> what is your point?
>>
>> J> I think he is has just tried Ruby, and was a Lisp student before, he
>> got J> impressed about Ruby, and want to evangelize everybody here.
>>
>> i wonder what target audience it. it seems "mature" CL programmers are
>> very unlikely to get interested. and seducing newcomers is sort of mean.
>
> If a newcomer who has spent at least 2 days with Lisp is "seduced" by
> line noise, then he deserves it. People should think for themselves.
>
> The Ruby troll has no target audience. All he has is an inferiority
> complex which compels him to rewrite trivial code snippets in Ruby,
> thinking he is demonstrating something.
>
> I am not really reading other comp.lang.* newsgroups, but I am under the
> impression that c.l.l gets more than its fair share of crackpots and
> evangelists. Some think that they are ready to reform Lisp after
> spending an afternoon with it. Others argue endlessly about some trivial
> aspect of the language. Then there are those who think that just because
> they got stuck at the level of some pitiful and powerless language,
> everyone else should be using it, which sort of makes sense from their
> point if view: "if I do not enjoy programming, nor should you".
>
> Tamas
I don't completly agree with you. I tend to use all of the languages
just because of fun. I think Lisp is probably the funniest.
Anyway, I feel he is right at some level, I don't think he has an
inferiority complex (this is a too much tipical analysis), but perhaps
that he don't find the way to express how is he feeling about his
discoverings. You may think of him like an ignorant who doesn't want to
learn how newsgroups are, but I don't think he has anything really bad
in his mind, like a big complex or something like that.
Ok, I feel he is right at some points. For example, the way Ruby manages
functions, and blocks (treating code as data), how concise it is, how
easy is compared to Lisp...
I like to read everybody. I think I learn a lot, both from supposedly
trolls, and people who respond to them saying that they have some kind
of complex. ;-)
Tamas K Papp wrote:
> On Mon, 27 Oct 2008 14:57:34 +0100, Javier wrote:
>
>>I don't completly agree with you. I tend to use all of the languages
>>just because of fun. I think Lisp is probably the funniest.
Then why aren't you using Cells? It's even funnier.
>
>
> Good for you. I program to get work done.
Stop! You're both right! It's two virtues in one!
Programming fun is the ratio of functional accomplishment to tedious
effort. That's why some Lispers burn out: they are not really
programming anything so their numerator is zero.
hth, kt
From: Javier
Subject: Re: OT: Ruby evangelists in c.l.l
Date:
Message-ID: <ge4rcv$3gc$1@aioe.org>
Kenny escribió:
> Tamas K Papp wrote:
>> On Mon, 27 Oct 2008 14:57:34 +0100, Javier wrote:
>>
>>> I don't completly agree with you. I tend to use all of the languages
>>> just because of fun. I think Lisp is probably the funniest.
>
> Then why aren't you using Cells? It's even funnier.
Do you think I have enough IQ to understand Cells? ;-)
>> Good for you. I program to get work done.
>
> Stop! You're both right! It's two virtues in one!
>
> Programming fun is the ratio of functional accomplishment to tedious
> effort. That's why some Lispers burn out: they are not really
> programming anything so their numerator is zero.
So, if I program something, but with very little effort, for example, 1
for programming, but 0.1 of effort, do I obtain 10 of fun? :-)
Javier wrote:
> Kenny escribió:
>
>> Tamas K Papp wrote:
>>
>>> On Mon, 27 Oct 2008 14:57:34 +0100, Javier wrote:
>>>
>>>> I don't completly agree with you. I tend to use all of the languages
>>>> just because of fun. I think Lisp is probably the funniest.
>>
>>
>> Then why aren't you using Cells? It's even funnier.
>
>
>
> Do you think I have enough IQ to understand Cells? ;-)
>
>
>>> Good for you. I program to get work done.
>>
>>
>> Stop! You're both right! It's two virtues in one!
>>
>> Programming fun is the ratio of functional accomplishment to tedious
>> effort. That's why some Lispers burn out: they are not really
>> programming anything so their numerator is zero.
>
>
> So, if I program something, but with very little effort, for example, 1
> for programming, but 0.1 of effort, do I obtain 10 of fun? :-)
>
Sorry, it would be implementation independent. I'd suggest a ratio, but
most people do not consider fractions fun.
h,k
From: Javier
Subject: Re: OT: Ruby evangelists in c.l.l
Date:
Message-ID: <ge4mha$g8e$1@aioe.org>
Tamas K Papp escribió:
> WJ still hasn't got the idea that if some construct is useful in Lisp, we
> can turn it into extremely concise code using macros.
I understand you perfectly.
The question I do myself is: why?
If I continue to modify Lisp, I'm finally going to get something like
Ruby. Isn't it better to simply use Ruby?
The entire lisp is full of things like this:
(slot-value 'slot object)
If I want something like:
object.slot
which is much sorter, clearer, and more elegant, I have to modify Lisp.
But if I put myself doing the same with the entire language, at the end
I'm wasting my time modifying it rather than writing actual code.
Another thing I hate about what people say about Lisp not having syntax
or a very simple syntax. Well, take the last example:
(slot-value 'slot object)
You must remember:
1.- The name of the construct.
2.- That slot must be the first argument, and object the second.
3.- That 'slot must have '.
This might seem foolish. It is not. Almost for every constructor happens
the same thing, and they are all very different, that is, very little
coherent between them.
Yet, I haven't found ANYTHING for which an invented lisp-like syntax is
better than, for example, a ruby and/or smalltalk object oriented
syntax, and I think ruby/smalltalk one is simpler everytime.
Lispers tend to say that you can invent new languages with Lisp. The
question is: what's up if the language you use already has all the
constructors you need for making your application? Do you still use Lisp?
On Mon, 27 Oct 2008 16:25:26 +0100, Javier wrote:
> Tamas K Papp escribió:
>
>> WJ still hasn't got the idea that if some construct is useful in Lisp,
>> we can turn it into extremely concise code using macros.
>
> I understand you perfectly.
No, apparently you don't.
> If I continue to modify Lisp, I'm finally going to get something like
> Ruby.
What makes you think that?
> Isn't it better to simply use Ruby?
Go ahead then.
> The entire lisp is full of things like this:
>
> (slot-value 'slot object)
That's a strange Lisp. In CL, one would use (slot-value object 'slot).
> If I want something like:
>
> object.slot
>
> which is much sorter, clearer, and more elegant,
To me, that is not shorter, cleaner and more elegant. It is all in the
eye of the beholder. If you find Ruby better, use it, no one is stopping
you.
> I'm wasting my time modifying it rather than writing actual code.
You don't look like one who writes a lot of actual code, so this is
perhaps not something that should concern you.
> Another thing I hate about what people say about Lisp not having syntax
> or a very simple syntax. Well, take the last example:
>
> (slot-value 'slot object)
>
> You must remember:
> 1.- The name of the construct.
> 2.- That slot must be the first argument, and object the second. 3.-
> That 'slot must have '.
No, you don't have to remember it, your environment helps you with that.
If you still haven't figured out how to use SLIME or another IDE, then
you clearly haven't programmed any Lisp. At all. You just keep babbling
here about things you are not making an effort to understand.
So from now on I am filtering you out. Please go away and be an idiot
somewhere else.
Tamas
From: Javier
Subject: Re: OT: Ruby evangelists in c.l.l
Date:
Message-ID: <ge4pc2$pj6$1@aioe.org>
Tamas K Papp escribió:
> So from now on I am filtering you out. Please go away and be an idiot
> somewhere else.
You accused someone to have inferiority complex. But you have a
superiority complex as big as a cattle.
On Oct 27, 8:50 am, Tamas K Papp <······@gmail.com> wrote:
> On Mon, 27 Oct 2008 16:25:26 +0100, Javier wrote:
> > Tamas K Papp escribió:
>
> >> WJ still hasn't got the idea that if some construct is useful in Lisp,
> >> we can turn it into extremely concise code using macros.
>
> > I understand you perfectly.
>
> No, apparently you don't.
>
> > If I continue to modify Lisp, I'm finally going to get something like
> > Ruby.
>
> What makes you think that?
>
> > Isn't it better to simply use Ruby?
>
> Go ahead then.
>
> > The entire lisp is full of things like this:
>
> > (slot-value 'slot object)
>
> That's a strange Lisp. In CL, one would use (slot-value object 'slot).
>
> > If I want something like:
>
> > object.slot
>
> > which is much sorter, clearer, and more elegant,
>
> To me, that is not shorter, cleaner and more elegant. It is all in the
> eye of the beholder. If you find Ruby better, use it, no one is stopping
> you.
>
> > I'm wasting my time modifying it rather than writing actual code.
>
> You don't look like one who writes a lot of actual code, so this is
> perhaps not something that should concern you.
>
> > Another thing I hate about what people say about Lisp not having syntax
> > or a very simple syntax. Well, take the last example:
>
> > (slot-value 'slot object)
>
> > You must remember:
> > 1.- The name of the construct.
> > 2.- That slot must be the first argument, and object the second. 3.-
> > That 'slot must have '.
>
> No, you don't have to remember it, your environment helps you with that.
> If you still haven't figured out how to use SLIME or another IDE, then
> you clearly haven't programmed any Lisp. At all. You just keep babbling
> here about things you are not making an effort to understand.
>
> So from now on I am filtering you out. Please go away and be an idiot
> somewhere else.
>
> Tamas
yeah go get em!
Javier wrote:
> Another thing I hate about what people say about Lisp not having syntax
> or a very simple syntax. Well, take the last example:
>
> (slot-value 'slot object)
>
> You must remember:
> 1.- The name of the construct.
> 2.- That slot must be the first argument, and object the second.
> 3.- That 'slot must have '.
>
>
> This might seem foolish. It is not. Almost for every constructor happens
> the same thing, and they are all very different, that is, very little
> coherent between them.
You're criticizing the fact that Common Lisp lacks consistency in its
conventions, for example for passing parameters. That's a valid
criticism to a certain extent. But it's not hard to overcome.
> Yet, I haven't found ANYTHING for which an invented lisp-like syntax is
> better than, for example, a ruby and/or smalltalk object oriented
> syntax, and I think ruby/smalltalk one is simpler everytime.
It seems you have found your 'home' language then. Be happy. Why argue
with us?
> Lispers tend to say that you can invent new languages with Lisp. The
> question is: what's up if the language you use already has all the
> constructors you need for making your application?
That's never the case.
Pascal
--
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/
From: Javier
Subject: Re: OT: Ruby evangelists in c.l.l
Date:
Message-ID: <ge4n95$hui$1@aioe.org>
Pascal Costanza escribió:
> It seems you have found your 'home' language then. Be happy. Why argue
> with us?
I didn't found it. I still prefer Lisp.
Why argue at all?
Because it is funny, and we are in usenet.
Javier <······@askmyadress.com> writes:
> (slot-value 'slot object)
^^^^^^^^^^^^^^^^^^^^^^^^
(slot-value object 'slot)
It would be nice if you would at least learn enough Lisp for writing this
simple stuff correctly, before you start improving the language.
Nicolas
From: Javier
Subject: Re: OT: Ruby evangelists in c.l.l
Date:
Message-ID: <ge4ncs$hui$2@aioe.org>
Nicolas Neuss escribi�:
> Javier <······@askmyadress.com> writes:
>
>> (slot-value 'slot object)
> ^^^^^^^^^^^^^^^^^^^^^^^^
> (slot-value object 'slot)
>
> It would be nice if you would at least learn enough Lisp for writing this
> simple stuff correctly, before you start improving the language.
You see?
It is so easy to make such mistakes in CL.
Nobody would make this error in ruby/python/whatever which uses this syntax:
object.slot
Javier wrote:
> Nicolas Neuss escribi�:
>
>> Javier <······@askmyadress.com> writes:
>>
>>> (slot-value 'slot object)
>>
>> ^^^^^^^^^^^^^^^^^^^^^^^^
>> (slot-value object 'slot)
>>
>> It would be nice if you would at least learn enough Lisp for writing this
>> simple stuff correctly, before you start improving the language.
>
>
> You see?
>
> It is so easy to make such mistakes in CL.
> Nobody would make this error in ruby/python/whatever which uses this
> syntax:
>
> object.slot
And for some reason those languages do not have macros and Arc which has
both has limitations on when that syntax can be used because it cannot
be parsed when combined with other syntax. Jussst peachy.
ie, You are kinda missing the point about some of the Lisp design
decisions that have turned out terribly well, including eschewing
abbreviatory syntax to maintain uniformity, and less interestingly
opting for verbosity such as destructuring-bind.
Meanwhile, Python's significant indentation makes for visually very
clean code. And nothing else.
hth, kenny
ps. if you /really/ want to display your ignorance of Lisp and irritate
everyone learn Arc (you seem to master things like Lisp in a few days)
and come back and talk about that. h,k
From: Javier
Subject: Re: OT: Ruby evangelists in c.l.l
Date:
Message-ID: <ge4ust$hb8$1@aioe.org>
Kenny escribi�:
>> Nobody would make this error in ruby/python/whatever which uses this
>> syntax:
>>
>> object.slot
>
> And for some reason those languages do not have macros and Arc which has
> both has limitations on when that syntax can be used because it cannot
> be parsed when combined with other syntax. Jussst peachy.
And why would somebody create another syntax if he/she is happy with it?
Yeah, I know, I know, to create DSLs. But languages like Ruby are
supposed to cover most (if not all) of your needs about micro-syntaxes.
Just look at Rails... it is wonderful (or people say that).
> ie, You are kinda missing the point about some of the Lisp design
> decisions that have turned out terribly well, including eschewing
> abbreviatory syntax to maintain uniformity,
"Eschewing abbreviatory syntax to maintain uniformity"? Or my english is
very bad (and google translator doesn't help), or I don't understand
where are that uniformity. Oh my god, the entire CL is a mess!!
Ok, take Scheme and I can understand what you say, anyway.
> and less interestingly
> opting for verbosity such as destructuring-bind.
>
> Meanwhile, Python's significant indentation makes for visually very
> clean code. And nothing else.
>
> hth, kenny
>
> ps. if you /really/ want to display your ignorance of Lisp and irritate
> everyone learn Arc (you seem to master things like Lisp in a few days)
> and come back and talk about that. h,k
Is Arc in use? Las time I saw it was just a lose project.
Javier wrote:
> Kenny escribi�:
>
>>> Nobody would make this error in ruby/python/whatever which uses this
>>> syntax:
>>>
>>> object.slot
>>
>>
>> And for some reason those languages do not have macros and Arc which
>> has both has limitations on when that syntax can be used because it
>> cannot be parsed when combined with other syntax. Jussst peachy.
>
>
> And why would somebody create another syntax if he/she is happy with it?
Hunh? Who? What? The English for the above is "non sequitor"...
> Yeah, I know, I know, to create DSLs.
[desperately trying to extract sensibility from what you write] Oh, you
think macros are for DSLs? Could we continue this after you have written
your first 5kloc Lisp?
>...But languages like Ruby are
> supposed to cover most (if not all) of your needs about micro-syntaxes.
Trust me, you do not want to guess at my needs.
> Just look at Rails... it is wonderful (or people say that).
I see we have the same thorough in-depth approach to tools assessment. I
use Googlefight, you read Usenet subject lines.
>
>> ie, You are kinda missing the point about some of the Lisp design
>> decisions that have turned out terribly well, including eschewing
>> abbreviatory syntax to maintain uniformity,
>
>
> "Eschewing abbreviatory syntax to maintain uniformity"? Or my english is
> very bad (and google translator doesn't help), or I don't understand
> where are that uniformity.
Can we continue this after you have written 0.5kloc Lisp?
> Oh my god, the entire CL is a mess!!
No, it is a big ball of mud. Python is a mess.
> Ok, take Scheme and I can understand what you say, anyway.
Scheme is Lisp with the mud cleaned off. They did not realize the mud
was the language but were too embarrassed to admit it so they built
/implementations/ to get the mud back.
>
>> and less interestingly opting for verbosity such as destructuring-bind.
>>
>> Meanwhile, Python's significant indentation makes for visually very
>> clean code. And nothing else.
>>
>> hth, kenny
>>
>> ps. if you /really/ want to display your ignorance of Lisp and
>> irritate everyone learn Arc (you seem to master things like Lisp in a
>> few days) and come back and talk about that. h,k
>
>
> Is Arc in use? Las time I saw it was just a lose project.
I don't know, I deleted my toolbar link. But PG declared death to be a
feature, so we may need the Supreme Court to decide on the plug.
hth, kt
From: Javier
Subject: Re: OT: Ruby evangelists in c.l.l
Date:
Message-ID: <ge55fp$bcm$1@aioe.org>
Kenny escribi�:
> Can we continue this after you have written 0.5kloc Lisp?
I'm just a professional c.l.l participant.
You expect too much from me.
On 2008-10-27, Javier <······@askmyadress.com> wrote:
> Kenny escribi�:
>
>>> Nobody would make this error in ruby/python/whatever which uses this
>>> syntax:
>>>
>>> object.slot
>>
>> And for some reason those languages do not have macros and Arc which has
>> both has limitations on when that syntax can be used because it cannot
>> be parsed when combined with other syntax. Jussst peachy.
>
> And why would somebody create another syntax if he/she is happy with it?
> Yeah, I know, I know, to create DSLs. But languages like Ruby are
> supposed to cover most (if not all) of your needs about micro-syntaxes.
It's repulsively arrogant for anyone to claim he has designed a syntax and
semantic combination which covers all possible needs in software development.
Nobody has ever done that, and probably nobody can, let alone the myopic runts
who design languags like Ruby.
From: Javier
Subject: Re: OT: Ruby evangelists in c.l.l
Date:
Message-ID: <ge5dli$f1p$1@aioe.org>
Kaz Kylheku escribi�:
> On 2008-10-27, Javier <······@askmyadress.com> wrote:
>> Kenny escribi�:
>>
>>>> Nobody would make this error in ruby/python/whatever which uses this
>>>> syntax:
>>>>
>>>> object.slot
>>> And for some reason those languages do not have macros and Arc which has
>>> both has limitations on when that syntax can be used because it cannot
>>> be parsed when combined with other syntax. Jussst peachy.
>> And why would somebody create another syntax if he/she is happy with it?
>> Yeah, I know, I know, to create DSLs. But languages like Ruby are
>> supposed to cover most (if not all) of your needs about micro-syntaxes.
>
> It's repulsively arrogant for anyone to claim he has designed a syntax and
> semantic combination which covers all possible needs in software development.
Being better or worse, all general purpuse languages claim that. And I
think it is true. You can do anything even in assembler, for example.
But, some languages are better than others, I admit it.
We are talking here about Ruby syntax/semantic vs Lisp macros.
Well, I know that Lisp can adapt to any paradigm. But, can you
demonstrate that Ruby can't? Except for performance of its
implementations, I can't find anything that you can do easily in plain
CL that you can't do ALSO easily or even easier in plain Ruby. For any
macro you present to me, I can present a way of doing it using Ruby
object system.
> Nobody has ever done that, and probably nobody can, let alone the myopic runts
> who design languags like Ruby.
Apart from this, personally I think you suffer the same disease of c.l.l
users: you are being to much exaggerated, and arrogant too. You said
"repulsively arrogant", "myopic runts", etc. You may don't like what I
say, but truly I am not so much radical as you are defending or
attacking something.
Apart from this, have you tried to program a 5k lines program in Ruby?
;-) Note that I am asking the same question that Kenny asked me.
If you do that, you may still find that Lisp is superior. But, you'll
learn lot of things, and I am sure that you'll be greatly surprised to
find out that Ruby is no that bad as you thought. Perhaps it would be
useful to open your mind, too.
Den Mon, 27 Oct 2008 23:00:15 +0100 skrev Javier:
> Being better or worse, all general purpuse languages claim that. And I
> think it is true. You can do anything even in assembler, for example.
> But, some languages are better than others, I admit it. We are talking
> here about Ruby syntax/semantic vs Lisp macros. Well, I know that Lisp
> can adapt to any paradigm. But, can you demonstrate that Ruby can't?
> Except for performance of its implementations, I can't find anything
> that you can do easily in plain CL that you can't do ALSO easily or even
> easier in plain Ruby. For any macro you present to me, I can present a
> way of doing it using Ruby object system.
You're an annoying troll, but let's play your game. I happen to have a
nice piece of macrology here, and I'm dying to see you reimplement it in
Ruby. Here goes:
(defmacro with-retry ((&key (restart-name 'retry)
(report "Try executing the code again."))
&body forms)
"Provides a restart called RETRY (or RESTART-NAME, if provided),
invoking which causes BODY to be executed again. Optional REPORT
parameter (which should be a string or function) can be used to
provide a custom restart description."
(with-gensyms (ok retry)
`(restart-bind ((,restart-name
(lambda () (throw ',retry nil))
:report-function
,(if (stringp report)
`(lambda (stream)
(write ,report :stream stream))
report)))
(catch ',ok
(loop do
(catch ',retry
(throw ',ok
(progn
,@forms))))))))
Here's how it's used:
cl-user> (let (flag)
(with-retry (:report "This macro allows you to add a RETRY restart")
(unless flag
(setf flag t)
(error "this be an error"))))
;;; The above expands thusly
;; (let (flag)
;; (restart-bind
;; ((mathrick-utils::retry (lambda () (throw '#:retry822 nil)) :report-function
;; (lambda (stream)
;; (write "This macro allows you to add a RETRY restart" :stream stream))))
;; (catch '#:ok821
;; (loop do
;; (catch '#:retry822
;; (throw '#:ok821
;; (progn (unless flag (setf flag t) (error "this be an error")))))))))
====>
this be an error
[Condition of type simple-error]
Restarts:
0: [retry] This macro allows you to add a RETRY restart
1: [retry] Retry SLIME REPL evaluation request.
2: [abort] Return to SLIME's top level.
3: [terminate-thread] Terminate this thread (#<thread "repl-thread" running {AB010C9}>)
>0
====>
nil
Now, you can't really have restarts in Ruby, so you can't exactly
reimplement it. But you're allowed to implement anything you want,
as long as it's of comparable level of complexity (ie. a complex,
interleaved structure of several primitive construct whose lexical
structure and control flow doesn't correspond to any trivial nesting).
You even have catch/throw which happen to work almost exactly like CL's
counterparts, so you can play with that.
If you can show me a Ruby "equivalent" of the above macro which also
compresses it down to a single line with descriptive parameters,
you'll have proven some merit in your claims. Otherwise, just bugger
off and stop wasting my bytes.
Cheers,
Maciej
On Mon, 27 Oct 2008 12:59:04 -0400, Kenny wrote:
> ie, You are kinda missing the point about some of the Lisp design
> decisions that have turned out terribly well, including eschewing
> abbreviatory syntax to maintain uniformity, and less interestingly
> opting for verbosity such as destructuring-bind.
Speaking of uniformity, clojure is going a little reader macro crazy, but
maybe young languages need terser syntax.
>
> ps. if you /really/ want to display your ignorance of Lisp and irritate
> everyone learn Arc (you seem to master things like Lisp in a few days)
> and come back and talk about that. h,k
s/Arc/clojure
No beatitudes for clojure here. I am having fun, but the Java ecosystem
can be as much of a curse as a blessing. I wonder if all the Smalltalk
guys that worked on Eclipse have made their peace with the platform. If
so, maybe there is hope for lispers that actually have a good lisp to
hack on the damn thing.
Matt
--
You will be given a post of trust and responsibility.
Matthew D Swank wrote:
> On Mon, 27 Oct 2008 12:59:04 -0400, Kenny wrote:
...
>>ps. if you /really/ want to display your ignorance of Lisp and irritate
>>everyone learn Arc (you seem to master things like Lisp in a few days)
>>and come back and talk about that. h,k
>
>
> s/Arc/clojure
>
> No beatitudes for clojure here. I am having fun, but the Java ecosystem
> can be as much of a curse as a blessing. I wonder if all the Smalltalk
> guys that worked on Eclipse have made their peace with the platform. If
> so, maybe there is hope for lispers that actually have a good lisp to
> hack on the damn thing.
Until the Grand Unification when browsers switch from JS to Lisp for
scripting, the world is just Lisp+Javascript. The PHB argument for
basing it on Java is not admissible in kennycourt and the complaint that
Lisp is slow must have been a suck-up to the same PHBs who might be
reading the page. Then came the complaint that Lisp has not changed
since the standard. Hunh? Changed to fix what? Meanwhile it's a Scheme
in re nil/false and Lisp-1...ewwww.
But mostly its Lisp over Clojure 10.7m to 54k on googlefight. That and
the punchline you noted:
Fantastic! Unlimited access to Java!!!!....Hang on...
:)
kt
ps.
In article <············@aioe.org>, Javier <······@askmyadress.com>
wrote:
> Nicolas Neuss escribi�:
> > Javier <······@askmyadress.com> writes:
> >
> >> (slot-value 'slot object)
> > ^^^^^^^^^^^^^^^^^^^^^^^^
> > (slot-value object 'slot)
> >
> > It would be nice if you would at least learn enough Lisp for writing this
> > simple stuff correctly, before you start improving the language.
>
> You see?
>
> It is so easy to make such mistakes in CL.
> Nobody would make this error in ruby/python/whatever which uses this syntax:
>
> object.slot
slot.object
--
http://lispm.dyndns.org/
From: Javier
Subject: Re: OT: Ruby evangelists in c.l.l
Date:
Message-ID: <ge4o27$l7h$2@aioe.org>
Rainer Joswig escribi�:
> In article <············@aioe.org>, Javier <······@askmyadress.com>
> wrote:
>
>> Nicolas Neuss escribi�:
>>> Javier <······@askmyadress.com> writes:
>>>
>>>> (slot-value 'slot object)
>>> ^^^^^^^^^^^^^^^^^^^^^^^^
>>> (slot-value object 'slot)
>>>
>>> It would be nice if you would at least learn enough Lisp for writing this
>>> simple stuff correctly, before you start improving the language.
>> You see?
>>
>> It is so easy to make such mistakes in CL.
>> Nobody would make this error in ruby/python/whatever which uses this syntax:
>>
>> object.slot
>
> slot.object
>
It's not natural, as (slot-value object 'slot) isn't, and the reason I
made the mistake and changed object and slot positions.
In article <············@aioe.org>, Javier <······@askmyadress.com>
wrote:
> Rainer Joswig escribi�:
> > In article <············@aioe.org>, Javier <······@askmyadress.com>
> > wrote:
> >
> >> Nicolas Neuss escribi�:
> >>> Javier <······@askmyadress.com> writes:
> >>>
> >>>> (slot-value 'slot object)
> >>> ^^^^^^^^^^^^^^^^^^^^^^^^
> >>> (slot-value object 'slot)
> >>>
> >>> It would be nice if you would at least learn enough Lisp for writing this
> >>> simple stuff correctly, before you start improving the language.
> >> You see?
> >>
> >> It is so easy to make such mistakes in CL.
> >> Nobody would make this error in ruby/python/whatever which uses this syntax:
> >>
> >> object.slot
> >
> > slot.object
> >
> It's not natural, as (slot-value object 'slot) isn't, and the reason I
> made the mistake and changed object and slot positions.
The reason you made the mistake is that you were lazy not to
look up things and/or you did not learn the basics. Lisp
has many functions and macros. My Lisp Machine has something
like 60000 functions in its Lisp image. To use those
I consult the built-in documentation. The editor and the
listener will show the argument list to any of those functions.
Many Lisp IDEs will show you the argument on typing the function
and a space.
If you can't remember the arguments for a function, you need
to look up the argument list (as I said any self-respecting Lisp system
makes that easy). If you find that too difficult, you might want
to give up early and not waste time struggling with Lisp.
Not everybody needs to use Lisp. Ruby and other languages
are perfectly fine for many uses.
Really, the basic syntax of function calls like this
(function argument-1 argument-2 ... argument-n)
is at the heart of Lisp. If you have difficulties with that
or prefer another syntax you really really should not use Lisp.
--
http://lispm.dyndns.org/
Rainer Joswig wrote:
> In article <············@aioe.org>, Javier <······@askmyadress.com>
> wrote:
>
>
>>Rainer Joswig escribi�:
>>
>>>In article <············@aioe.org>, Javier <······@askmyadress.com>
>>>wrote:
>>>
>>>
>>>>Nicolas Neuss escribi�:
>>>>
>>>>>Javier <······@askmyadress.com> writes:
>>>>>
>>>>>
>>>>>>(slot-value 'slot object)
>>>>>
>>>>> ^^^^^^^^^^^^^^^^^^^^^^^^
>>>>> (slot-value object 'slot)
>>>>>
>>>>>It would be nice if you would at least learn enough Lisp for writing this
>>>>>simple stuff correctly, before you start improving the language.
>>>>
>>>>You see?
>>>>
>>>>It is so easy to make such mistakes in CL.
>>>>Nobody would make this error in ruby/python/whatever which uses this syntax:
>>>>
>>>>object.slot
>>>
>>>slot.object
>>>
>>
>>It's not natural, as (slot-value object 'slot) isn't, and the reason I
>>made the mistake and changed object and slot positions.
>
>
> The reason you made the mistake is that you were lazy not to
> look up things...
I thought you were going to say "look up at the status bar" where the
parameters are listed while we type".
kxo
From: Javier
Subject: Re: OT: Ruby evangelists in c.l.l
Date:
Message-ID: <ge4rna$4nm$1@aioe.org>
Kenny escribi�:
>> The reason you made the mistake is that you were lazy not to
>> look up things...
>
> I thought you were going to say "look up at the status bar" where the
> parameters are listed while we type".
The mini-buffer is the most important buffer in emacs. :-)
Anyway, you still need to know the name of the function you're looking
for, or at least figure it out.
In a conventional language like Java, Ruby, you write:
object.
and inmediatly after the point, it appears a complete list of public
slots, methods, so you can choose from. That would be nice to have in Slime.
Javier wrote:
> Kenny escribi�:
>
>>> The reason you made the mistake is that you were lazy not to
>>> look up things...
>>
>>
>> I thought you were going to say "look up at the status bar" where the
>> parameters are listed while we type".
>
>
> The mini-buffer is the most important buffer in emacs. :-)
>
> Anyway, you still need to know the name of the function you're looking
> for, or at least figure it out.
apropos, or apropos-list.
does ruby have either?
feel the walls closing in? any next of kin we should notify?
>
> In a conventional language like Java, Ruby, you write:
>
> object.
>
> and inmediatly after the point, it appears a complete list of public
> slots, methods, so you can choose from.
And paraplegics have motors on their chairs.
hth, kenny
From: Javier
Subject: Re: OT: Ruby evangelists in c.l.l
Date:
Message-ID: <ge4vhv$jt8$1@aioe.org>
Kenny escribi�:
>> Anyway, you still need to know the name of the function you're looking
>> for, or at least figure it out.
>
> apropos, or apropos-list.
>
> does ruby have either?
Oh yeah, RDoc, and it does that and more.
>> In a conventional language like Java, Ruby, you write:
>>
>> object.
>>
>> and inmediatly after the point, it appears a complete list of public
>> slots, methods, so you can choose from.
>
> And paraplegics have motors on their chairs.
Yeah, but the schizophrenic never manage to do useful things.
Javier wrote:
> Kenny escribi�:
>
>>> Anyway, you still need to know the name of the function you're
>>> looking for, or at least figure it out.
>>
>>
>> apropos, or apropos-list.
>>
>> does ruby have either?
>
>
> Oh yeah, RDoc, and it does that and more.
>
>
>>> In a conventional language like Java, Ruby, you write:
>>>
>>> object.
>>>
>>> and inmediatly after the point, it appears a complete list of public
>>> slots, methods, so you can choose from.
>>
>>
>> And paraplegics have motors on their chairs.
>
>
> Yeah, but the schizophrenic never manage to do useful things.
Yeah, but the manic depressives and hypomaniacs rule the world.
hth,kzo
On Mon, 27 Oct 2008 17:53:59 +0100, Javier wrote:
> In a conventional language like Java, Ruby, you write:
>
> object.
>
> and inmediatly after the point, it appears a complete list of public
> slots, methods, so you can choose from. That would be nice to have in
> Slime.
There's of course the other problem: where do you get the object from? I
doubt there is anyone who is using IntelliSense to find stuff in the Java
Standard library. That takes hours. Intelligent people use a search
function.
And the other thing is, where do you know the first part of the namespace
to be able to type the first dot? Have you ever typed museum. to find out
who wrote libraries and put them under a .museum-TLD?
In Python modules are usually named freely. Have you tried gfgdsf. ? Was
there a pop-up to choose? What's with dynamically generated attributes?
How to find that?
See, not as easy as one might think.
regards,
Marek
Javier wrote:
> Nicolas Neuss escribi�:
>> Javier <······@askmyadress.com> writes:
>>
>>> (slot-value 'slot object)
>> ^^^^^^^^^^^^^^^^^^^^^^^^
>> (slot-value object 'slot)
>>
>> It would be nice if you would at least learn enough Lisp for writing this
>> simple stuff correctly, before you start improving the language.
>
> You see?
>
> It is so easy to make such mistakes in CL.
> Nobody would make this error in ruby/python/whatever which uses this
> syntax:
>
> object.slot
But in Ruby there are also method taking two methods.
In Lisp, if you cannot remember the order of the arguments, you can
always write a wrapper function with keyword arguments.
(defun slot (&key object slot) (slot-value object slot))
(slot :slot 'slot :object object)
Do you have keyword arguments in 'your' language?
(And we won't speak of multiple dispatching...)
--
__Pascal Bourguignon__
http://www.informatimago.com
From: Javier
Subject: Re: OT: Ruby evangelists in c.l.l
Date:
Message-ID: <ge5ao7$21g$1@aioe.org>
Pascal Bourguignon escribi�:
> Javier wrote:
>> Nicolas Neuss escribi�:
>>> Javier <······@askmyadress.com> writes:
>>>
>>>> (slot-value 'slot object)
>>> ^^^^^^^^^^^^^^^^^^^^^^^^
>>> (slot-value object 'slot)
>>>
>>> It would be nice if you would at least learn enough Lisp for writing
>>> this
>>> simple stuff correctly, before you start improving the language.
>>
>> You see?
>>
>> It is so easy to make such mistakes in CL.
>> Nobody would make this error in ruby/python/whatever which uses this
>> syntax:
>>
>> object.slot
>
> But in Ruby there are also method taking two methods.
>
> In Lisp, if you cannot remember the order of the arguments, you can
> always write a wrapper function with keyword arguments.
>
> (defun slot (&key object slot) (slot-value object slot))
>
> (slot :slot 'slot :object object)
>
> Do you have keyword arguments in 'your' language?
> (And we won't speak of multiple dispatching...)
>
Ruby doesn�t have keyword parameters, like Python has. However, it can
be faked by using symbols and hashes. Ruby on Rails, among others, uses
this heavily. Example:
def some_keyword_params( params )
params
end
some_keyword_params( :param_one => 10, :param_two => 42 )
# => {:param_one=>10, :param_two=>42}
Other incredible features:
lambda is an object. In Lisp, is lambda an object whose class can be
modified in real time, and used in CLOS?
Look:
class Proc
def myslot
7
end
end
a = lambda {puts 'hello'}
puts a.class
puts a.myslot
a.call
Which prints:
>> Proc
>> 7
>> hello
Yes! A lambda with attributes!
And you can do this even with primitive types like integers, strings,
even with nil and false. You can also subtype that classes. In CLOS, you
can't without using implementation specific methods and very complicated
MOP.
class Fixnum
def hours
self * 3600 # number of seconds in an hour
end
alias hour hours
end
# 14 hours from 00:00 January 1st
# (aka when you finally wake up ;)
Time.mktime(2006, 01, 01) + 14.hours # => Sun Jan 01 14:00:00
In Ruby, you can even modify "class" class itself, so you can do MOP
incredible easy (for example, for persistence).
You can insert methods and attributes inside objects (not talking about
inserting in their classes), so you can create singletons, etc...
Ruby object model is simply much better than CLOS.
It seems that Ruby is a simple language, but it is very very complete
and can do incredible things for you...
That's all good, but have you considered what kind of restrictions this
puts on the implementation?
Common Lisp is the middle road, but it's quite a wide middle road. On
the right of that road, you have the bumpy, hard ride with C/C++, and on
the left you have the grassy, beautiful one with Python Perl and Ruby.
You can get Common Lisp code to be close to speeds to C/C++.
Realistically speaking probably x2-x3 slower.
And you can Get Common Lisp code to be as dynamic as Python, Perl and Ruby.
Where else you can get that in one language (really one language, not
FFI extensions, external libs, etc.)?
Where else?
Javier wrote:
> Pascal Bourguignon escribi�:
>> Javier wrote:
>>> Nicolas Neuss escribi�:
>>>> Javier <······@askmyadress.com> writes:
>>>>
>>>>> (slot-value 'slot object)
>>>> ^^^^^^^^^^^^^^^^^^^^^^^^
>>>> (slot-value object 'slot)
>>>>
>>>> It would be nice if you would at least learn enough Lisp for writing
>>>> this
>>>> simple stuff correctly, before you start improving the language.
>>>
>>> You see?
>>>
>>> It is so easy to make such mistakes in CL.
>>> Nobody would make this error in ruby/python/whatever which uses this
>>> syntax:
>>>
>>> object.slot
>>
>> But in Ruby there are also method taking two methods.
>>
>> In Lisp, if you cannot remember the order of the arguments, you can
>> always write a wrapper function with keyword arguments.
>>
>> (defun slot (&key object slot) (slot-value object slot))
>>
>> (slot :slot 'slot :object object)
>>
>> Do you have keyword arguments in 'your' language?
>> (And we won't speak of multiple dispatching...)
>>
>
> Ruby doesn�t have keyword parameters, like Python has. However, it can
> be faked by using symbols and hashes. Ruby on Rails, among others, uses
> this heavily. Example:
>
> def some_keyword_params( params )
> params
> end
> some_keyword_params( :param_one => 10, :param_two => 42 )
> # => {:param_one=>10, :param_two=>42}
>
> Other incredible features:
>
> lambda is an object. In Lisp, is lambda an object whose class can be
> modified in real time, and used in CLOS?
>
> Look:
>
> class Proc
> def myslot
> 7
> end
> end
>
> a = lambda {puts 'hello'}
> puts a.class
> puts a.myslot
> a.call
>
> Which prints:
>
> >> Proc
> >> 7
> >> hello
>
>
> Yes! A lambda with attributes!
> And you can do this even with primitive types like integers, strings,
> even with nil and false. You can also subtype that classes. In CLOS, you
> can't without using implementation specific methods and very complicated
> MOP.
>
> class Fixnum
> def hours
> self * 3600 # number of seconds in an hour
> end
> alias hour hours
> end
>
> # 14 hours from 00:00 January 1st
> # (aka when you finally wake up ;)
> Time.mktime(2006, 01, 01) + 14.hours # => Sun Jan 01 14:00:00
>
> In Ruby, you can even modify "class" class itself, so you can do MOP
> incredible easy (for example, for persistence).
>
> You can insert methods and attributes inside objects (not talking about
> inserting in their classes), so you can create singletons, etc...
>
> Ruby object model is simply much better than CLOS.
> It seems that Ruby is a simple language, but it is very very complete
> and can do incredible things for you...
From: Javier
Subject: Re: OT: Ruby evangelists in c.l.l
Date:
Message-ID: <ge5e96$hm8$1@aioe.org>
Dimiter "malkia" Stanev escribi�:
> That's all good, but have you considered what kind of restrictions this
> puts on the implementation?
Yes, speed.
> Common Lisp is the middle road, but it's quite a wide middle road. On
> the right of that road, you have the bumpy, hard ride with C/C++, and on
> the left you have the grassy, beautiful one with Python Perl and Ruby.
>
> You can get Common Lisp code to be close to speeds to C/C++.
> Realistically speaking probably x2-x3 slower.
>
> And you can Get Common Lisp code to be as dynamic as Python, Perl and Ruby.
>
> Where else you can get that in one language (really one language, not
> FFI extensions, external libs, etc.)?
>
> Where else?
There is not, really. I think you are right.
One could use Smalltalk, but yet its implementations are not as fast as
Lisp ones are.
One could use Python, and one of the newest implementations, which are
faster than before (still slower than, for example, SBCL) but Python is
not as good as Ruby. There are some implementations of Ruby, but all of
them are slow.
So, basically, I think you are right in this respect.
From: D Herring
Subject: Re: OT: Ruby evangelists in c.l.l
Date:
Message-ID: <ge5jnn$6fg$1@aioe.org>
Javier wrote:
> Ruby object model is simply much better than CLOS.
> It seems that Ruby is a simple language, but it is very very complete
> and can do incredible things for you...
Then why do you bother people who prefer an "inferior" language?
Drop it, and we'll all be happy.
- Daniel
> Javier wrote:
>
>> Ruby object model is simply much better than CLOS.
>> It seems that Ruby is a simple language, but it is very very complete
>> and can do incredible things for you...
You call yourself a professional c.l.l'er with /that/ weak crap? We have
standards, dammit.
kxo
From: Javier
Subject: Re: OT: Ruby evangelists in c.l.l
Date:
Message-ID: <ge5oh2$mhd$1@aioe.org>
Kenny escribi�:
>> Javier wrote:
>>
>>> Ruby object model is simply much better than CLOS.
>>> It seems that Ruby is a simple language, but it is very very complete
>>> and can do incredible things for you...
>
> You call yourself a professional c.l.l'er with /that/ weak crap? We have
> standards, dammit.
Standards are like ass holes: everyone has one.
Javier wrote:
> Kenny escribi�:
>
>>> Javier wrote:
>>>
>>>> Ruby object model is simply much better than CLOS.
>>>> It seems that Ruby is a simple language, but it is very very
>>>> complete and can do incredible things for you...
>>
>>
>> You call yourself a professional c.l.l'er with /that/ weak crap? We
>> have standards, dammit.
>
>
> Standards are like ass holes: everyone has one.
Jeez, yer in a slat spin. Eject, Javy! Eject!
meanwhile I have swapped in JQuery FlexiGrid for my own faster but
uglier version thereof gaining more functionality required by the
client, tho it looks I have to teach the beast that some grids are not
all that wide so maybe the toolbar should wrap? <sigh> Why do they let
non-me's write code?
kny
ps. Xello has begun. All your GUIs are belong to us. PWUA. Life is good,
and I have Palin 2012 to look forward to. k
pps. Probably 2016, too. k
On 2008-10-28, Kenny <·········@gmail.com> wrote:
> Why do they let non-me's write code?
:)
From: Javier
Subject: Re: OT: Ruby evangelists in c.l.l
Date:
Message-ID: <ge7885$sg$1@aioe.org>
Kenny escribi�:
>> Standards are like ass holes: everyone has one.
>
> Jeez, yer in a slat spin. Eject, Javy! Eject!
You can't make an idea of how much non-oficial/non-in-the-dictionaries
vocabulary I'm learning from you.
Is it some kind of jargon unique to NY, or is it just you? Do you think
that somebody in UK and/or Europe could understand me if I spit your
words to their faces? (Yet, I need to completly understand you, which is
not so trivial for a Spanish who lives in Spain, I assure you.)
> meanwhile I have swapped in JQuery FlexiGrid for my own faster but
> uglier version thereof gaining more functionality required by the
> client, tho it looks I have to teach the beast that some grids are not
> all that wide so maybe the toolbar should wrap? <sigh> Why do they let
> non-me's write code?
Why don't you rewrite it?
> ps. Xello has begun. All your GUIs are belong to us. PWUA. Life is good,
> and I have Palin 2012 to look forward to. k
>
> pps. Probably 2016, too. k
Not too bad, considering that it is written in the "best" language for
"getting things done quickly".
Javier wrote:
> Kenny escribi�:
>
>>> Standards are like ass holes: everyone has one.
>>
>>
>> Jeez, yer in a slat spin. Eject, Javy! Eject!
>
>
> You can't make an idea of how much non-oficial/non-in-the-dictionaries
> vocabulary I'm learning from you.
I have no idea why you would underestimate me thus: I am generally
cognizant of when I am testing the efficacy of ESL instructors and
especially so when responding to one as, um, creative as you in their
damn the torpedos full speed ahead approach to an unfamiliar language.
But that should be "flat spin", one of the hardest aviation gaffes to
correct.
> Is it some kind of jargon unique to NY, or is it just you? Do you think
> that somebody in UK and/or Europe could understand me if I spit your
> words to their faces?
I'd hold off on the spit.
Meanwhile, do what everyone else does when reading anything: if you do
not recognize something just keep going because most text is redundant
and you'll catch up eventually, or have some fun and look it up:
http://www.nationmaster.com/encyclopedia/Flat-spin
Yes, this relies on me not missing the keys so badly.
> (Yet, I need to completly understand you,..
Hmmm. My epistolary strategy relies on people ignoring most of what I
write, don't want to be looking over my shoulder all the time.
> which is
> not so trivial for a Spanish who lives in Spain, I assure you.)
When learning a new sport always seek practice partners better than you.
Just walking on the court with them will elevate your game. You'll lose
every point and in the end improve more than with any formal lessson.
But fair warning: I am not a touch typist and the eyes are shot so if
google comes up empty on anything like "slat spin" just let it go.
>
>> meanwhile I have swapped in JQuery FlexiGrid for my own faster but
>> uglier version thereof gaining more functionality required by the
>> client, tho it looks I have to teach the beast that some grids are not
>> all that wide so maybe the toolbar should wrap? <sigh> Why do they let
>> non-me's write code?
>
>
> Why don't you rewrite it?
Can we continue this when you are through underestimating me? But the
whole point of off-the-shelf widgets is not to have to write something
-- is it OK if I just tweak it?
kt
From: Javier
Subject: Re: OT: Ruby evangelists in c.l.l
Date:
Message-ID: <ge7kk6$ouq$1@aioe.org>
Kenny escribi�:
> But that should be "flat spin"
Ok, so you think I'm flat-spining?
>> (Yet, I need to completly understand you,..
>
> Hmmm. My epistolary strategy relies on people ignoring most of what I
> write, don't want to be looking over my shoulder all the time.
If you start becoming withdrawn and looking over your shoulder, being
careful about what you say, that's being paranoid.
Anyway, I think we must read others not to understand others but to
understand ourselves. I can see that your defects are my defects too. No
need to look over our shoulders. A fool thinks himself to be clever, but
a clever one knows himself to be a fool. We all are fool.
Isn't it c.l.l stupid at all? People here talking about computer
languages which are stupid things working in stupid machines, made by
stupid people, constructing a stupid world, everything is stupid!
>> Why don't you rewrite it?
>
> Can we continue this when you are through underestimating me?
I never estimated you. ;-)
Some entity, AKA Javier <······@askmyadress.com>,
wrote this mindboggling stuff:
(selectively-snipped-or-not-p)
> Standards are like ass holes: everyone has one.
That merely prevents being full of postdineralresidue
Cor
--
First directive to dissuade a criminals' intent: Present a Gun
I might be a blonde, but I am not stupid
Selfdefense is a basic human right
On Mon, 27 Oct 2008 19:18:26 -0400, D Herring wrote:
> Javier wrote:
>
>> Ruby object model is simply much better than CLOS. It seems that Ruby
>> is a simple language, but it is very very complete and can do
>> incredible things for you...
>
> Then why do you bother people who prefer an "inferior" language?
>
> Drop it, and we'll all be happy.
Good suggestion, but in case he persists (trolls often do that) could
people just not reply to him? Pretty please... I already have him
filtered out.
Tamas
Javier wrote:
> Other incredible features:
>
> lambda is an object. In Lisp, is lambda an object whose class can be
> modified in real time, and used in CLOS?
Yes, it's even can be something else than an object, since LAMBDA is
just a macro. In lisp we have macros, so we can extend the language in
ways that are just impossible in the others.
I'm still waitting for an implementation of COND in Ruby...
> And you can do this even with primitive types like integers, strings,
> even with nil and false. You can also subtype that classes. In CLOS, you
> can't without using implementation specific methods and very complicated
> MOP.
>
> class Fixnum
> def hours
> self * 3600 # number of seconds in an hour
> end
> alias hour hours
> end
>
> # 14 hours from 00:00 January 1st
> # (aka when you finally wake up ;)
> Time.mktime(2006, 01, 01) + 14.hours # => Sun Jan 01 14:00:00
(defun hours (hours) (* hours 3600))
(+ (encode-universal-time 0 0 0 1 1 2006) (hours 14))
Lisp is MULTI paradigm. We don't try to force everything into the OO mold.
> In Ruby, you can even modify "class" class itself, so you can do MOP
> incredible easy (for example, for persistence).
But in Lisp, if we need to write an application where you need to modify
classes as easily as in Ruby, we can quite easily implement such an
object system, be it using CLOS or with plain Lisp.
Can you easily implement a macro system in Ruby? I'd say no, first
you'd have to write a Ruby parser...
--
__Pascal Bourguignon__
http://www.informatimago.com
From: Javier
Subject: Re: OT: Ruby evangelists in c.l.l
Date:
Message-ID: <ge5flj$n0s$1@aioe.org>
Pascal Bourguignon escribi�:
> I'm still waitting for an implementation of COND in Ruby...
year = 2000
leap = case
when year % 400 == 0 then true
when year % 100 == 0 then false
else year % 4 == 0
end
puts leap # => true
>> In Ruby, you can even modify "class" class itself, so you can do MOP
>> incredible easy (for example, for persistence).
>
> But in Lisp, if we need to write an application where you need to modify
> classes as easily as in Ruby, we can quite easily implement such an
> object system, be it using CLOS or with plain Lisp.
Yes, but if you implement that, then you are creating a new Ruby. It
would be better to just use Ruby, I think.
> Can you easily implement a macro system in Ruby? I'd say no, first
> you'd have to write a Ruby parser...
I agree. And there are other inconveniences.
But:
http://taw.chaosforge.org/rlisp/
Javier wrote:
> Pascal Bourguignon escribi�:
>
>> I'm still waitting for an implementation of COND in Ruby...
>
>
> year = 2000
> leap = case
> when year % 400 == 0 then true
> when year % 100 == 0 then false
> else year % 4 == 0
> end
> puts leap # => true
Cond also exists in Common Lisp. That's not the point. The question
was to let you show us how you can create a new control flow instruction
in Ruby?
In Lisp, there is the BOOLEAN type that contains the values NIL and T,
and there is a special operator IF with the following syntax:
(IF <boolean-expression> <then-form> [ <else-form> ])
We are quite happy with it. But in this application, I need to deal
with ternary logic, so I introduce a TOOLEAN type:
(defconstant maybe 'maybe)
(deftype toolean () (member nil maybe t))
and then I define a TIF operator with the following syntax:
(TIF <toolean-expression> <then-form> [ <maybe-form> [ <else-form> ]])
as:
(defmacro tif (toolean-expression then &optional maybe else)
(let ((toolean (gensym)))
`(let ((,toolean ,toolean-expression))
(cond ((null ,toolean) ,else)
((eq 'maybe ,toolean) ,maybe)
(t ,then)))))
So now we can write:
(tif (is-ruby-better-p)
'I-doubt-it
'I-am-not-sure-either
'I-thought-so-too)
In Ruby, there is the Boolean class that contains the constants false
and true, and there is an operator if with the following syntax:
if <boolean-expression>
<then-form>
else
<else-form>
end
We are quite happy with it. But in this application, I need to deal
with ternary logic, so I introduce a Toolean class:
class Toolean
???
end
and then I define a tif operator with the following syntax:
tif <toolean-expression>
<then-form>
maybe
<maybe-form>
else
<else-form>
end
as
???
So now we can write:
tif is_lisp_better_p
:sure
maybe
:i_assure_you_it_is
else
:you_re_wrong
end
Can you fill the ??? spaces? If you can't you've got nothing to do on
c.l.l.
--
__Pascal Bourguignon__
http://www.informatimago.com
From: Javier
Subject: Re: OT: Ruby evangelists in c.l.l
Date:
Message-ID: <ge76q8$r73$1@aioe.org>
Pascal Bourguignon escribi�:
> Javier wrote:
>> Pascal Bourguignon escribi�:
>>
>>> I'm still waitting for an implementation of COND in Ruby...
>>
>>
>> year = 2000
>> leap = case
>> when year % 400 == 0 then true
>> when year % 100 == 0 then false
>> else year % 4 == 0
>> end
>> puts leap # => true
>
>
> Cond also exists in Common Lisp. That's not the point. The question
> was to let you show us how you can create a new control flow instruction
> in Ruby?
>
>
> In Lisp, there is the BOOLEAN type that contains the values NIL and T,
> and there is a special operator IF with the following syntax:
> (IF <boolean-expression> <then-form> [ <else-form> ])
> We are quite happy with it. But in this application, I need to deal
> with ternary logic, so I introduce a TOOLEAN type:
> (defconstant maybe 'maybe)
> (deftype toolean () (member nil maybe t))
> and then I define a TIF operator with the following syntax:
> (TIF <toolean-expression> <then-form> [ <maybe-form> [ <else-form> ]])
> as:
> (defmacro tif (toolean-expression then &optional maybe else)
> (let ((toolean (gensym)))
> `(let ((,toolean ,toolean-expression))
> (cond ((null ,toolean) ,else)
> ((eq 'maybe ,toolean) ,maybe)
> (t ,then)))))
> So now we can write:
> (tif (is-ruby-better-p)
> 'I-doubt-it
> 'I-am-not-sure-either
> 'I-thought-so-too)
>
>
> In Ruby, there is the Boolean class that contains the constants false
> and true, and there is an operator if with the following syntax:
> if <boolean-expression>
> <then-form>
> else
> <else-form>
> end
> We are quite happy with it. But in this application, I need to deal
> with ternary logic, so I introduce a Toolean class:
> class Toolean
> ???
> end
> and then I define a tif operator with the following syntax:
> tif <toolean-expression>
> <then-form>
> maybe
> <maybe-form>
> else
> <else-form>
> end
> as
> ???
> So now we can write:
> tif is_lisp_better_p
> :sure
> maybe
> :i_assure_you_it_is
> else
> :you_re_wrong
> end
>
>
>
> Can you fill the ??? spaces? If you can't you've got nothing to do on
> c.l.l.
The new operator is stupid at all. It is just simpler to use:
case
when condition == :maybe then form1
when condition form2
when not condition then form3
end
And you can add all the conditions you want at any time. That's why
"case" was invented, and that's why nobody uses "ternary" logic.
All the operator of this kind that you may need, are already in Ruby.
All the object oriented features you may need, are already in Ruby. All
the facilities and syntactic sugar you may need, are already in Ruby.
Javier wrote:
> The new operator is stupid at all. It is just simpler to use:
>
> case
> when condition == :maybe then form1
> when condition form2
> when not condition then form3
> end
No, it's simplier to write it with a sexp:
(tif ternary
:sure
:maybe
:nope)
> And you can add all the conditions you want at any time. That's why
> "case" was invented, and that's why nobody uses "ternary" logic.
If you don't want understand, you won't. This is but a simple example,
because there's no point in losing ourselves in irrelevant
implementation details when you cannot implement the base mechanism.
In Lisp, macros are used to improve the language everyday, as well for
small additions such as the above, as for bigger systems, implementing
all the shades of DSL from CL to entirely new languages.
> All the operator of this kind that you may need, are already in Ruby.
All the operators you may need are in the Turing Machines. Stop
programming Ruby and switch to Turing Machines!
> All the object oriented features you may need, are already in Ruby.
We've got them better in CLOS.
> All the facilities and syntactic sugar you may need, are
> already in Ruby.
What I need is to have homo-iconic code.
Come back when you'll be able to do the equivalent in Ruby:
C/USER[127]> (eval (eval (eval #1=(print '#1#))))
#1=(PRINT '#1#)
#1=(PRINT '#1#)
#1=(PRINT '#1#)
#1=(PRINT '#1#)
#1=(PRINT '#1#)
--
__Pascal Bourguignon__
http://www.informatimago.com
On Mon, 27 Oct 2008 23:09:20 +0100, Pascal Bourguignon wrote:
> Can you easily implement a macro system in Ruby? I'd say no, first
> you'd have to write a Ruby parser...
Things get fun because one cannot "easily" write a parser for Ruby
because it's hard to understand what the programmer really meant. I
talked to the JRuby guys and pople who wrote highlighters for Ruby code
and they both hit the same problem.
regards,
Marek
Marek Kubica wrote:
> On Mon, 27 Oct 2008 23:09:20 +0100, Pascal Bourguignon wrote:
>
>> Can you easily implement a macro system in Ruby? I'd say no, first
>> you'd have to write a Ruby parser...
>
> Things get fun because one cannot "easily" write a parser for Ruby
> because it's hard to understand what the programmer really meant. I
> talked to the JRuby guys and pople who wrote highlighters for Ruby code
> and they both hit the same problem.
Of course, to know it you just have to read the grammar of Ruby. It's
not as monstruous as the grammar of C++, but it's quite a complex one.
--
__Pascal Bourguignon__
http://www.informatimago.com
On Tue, 28 Oct 2008 12:28:09 +0100, Pascal Bourguignon wrote:
> Of course, to know it you just have to read the grammar of Ruby. It's
> not as monstruous as the grammar of C++, but it's quite a complex one.
It's harder than that since the lexer needs to know a bit of the AST
because the / in Regexp clashes with the division operator and to decide
which one to use, one needs to know the which methods are defined in the
file.
In case you want to see a code snippet where this happens, take a look at
the code here: <http://www.python-forum.de/post-102083.html#102083>. The
discussion is in german but the code is Ruby.
regards,
Marek
In article <············@aioe.org>, Javier <······@askmyadress.com>
wrote:
> Tamas K Papp escribió:
>
> > WJ still hasn't got the idea that if some construct is useful in Lisp, we
> > can turn it into extremely concise code using macros.
>
> I understand you perfectly.
> The question I do myself is: why?
> If I continue to modify Lisp, I'm finally going to get something like
> Ruby. Isn't it better to simply use Ruby?
>
> The entire lisp is full of things like this:
>
> (slot-value 'slot object)
>
> If I want something like:
>
> object.slot
>
> which is much sorter, clearer, and more elegant, I have to modify Lisp.
Lisp is about modifying Lisp. Lisp is a programmable programming language.
Some modifications are easy, some need some more work...
> But if I put myself doing the same with the entire language, at the end
> I'm wasting my time modifying it rather than writing actual code.
>
> Another thing I hate about what people say about Lisp not having syntax
> or a very simple syntax. Well, take the last example:
>
> (slot-value 'slot object)
>
> You must remember:
> 1.- The name of the construct.
> 2.- That slot must be the first argument, and object the second.
> 3.- That 'slot must have '.
>
>
> This might seem foolish. It is not.
It is foolish. Especially, because you get the basics wrong already.
http://www.lispworks.com/documentation/HyperSpec/Body/f_slt_va.htm
1. is difficult? Please...
2. is wrong.
It is (slot-value object slot-name) => value
So, the object is the first argument and the slot comes second.
3. is wrong, too.
SLOT-VALUE wants an object and a symbol. So it is perfectly
fine to compute the value of the slot name.
(slot-value object (I-will-compute-some-slotname))
or
(let ((slots '(foo bar baz)))
(slot-value object (second slots)))
You can also refer to slots by just using the slot name:
HTTP-USER 69 > (defclass foobar () ((a :initform 'foobar-a)))
#<STANDARD-CLASS FOOBAR 4020004693>
HTTP-USER 70 > (with-slots (a) (make-instance 'foobar) a)
FOOBAR-A
> Almost for every constructor happens
> the same thing, and they are all very different, that is, very little
> coherent between them.
I can't parse above sentence...
> Yet, I haven't found ANYTHING for which an invented lisp-like syntax is
> better than, for example, a ruby and/or smalltalk object oriented
> syntax, and I think ruby/smalltalk one is simpler everytime.
Maybe you want to use Ruby? Why not?
> Lispers tend to say that you can invent new languages with Lisp. The
> question is: what's up if the language you use already has all the
> constructors you need for making your application? Do you still use Lisp?
--
http://lispm.dyndns.org/
J> The entire lisp is full of things like this:
J> (slot-value 'slot object)
yep, there are a lot of functions :). and i'd say it is a good thing most
stuff
is handled by functions rather than by special syntax, because it's much
easier to remember function's order of arguments rather than syntatic
pecularities (also, Emacs suggest you order of arguments as you type).
J> If I want something like:
J> object.slot
ok. now what if slot's name is known only at runtime?
in JavaScript object.slot becomes object[slot-name]
in PHP $object->slot becomes $object->$slot
(and i suspect in Ruby it's yet another syntax weirdness)
but in Common Lisp you do not need any additional syntax because
slot-value is a function, and it works equally well whether slot name is
a quoted symbol or it is a variable or it is computed dynamically.
it is always (slot-value object slot-name)
and this uniformity is a good thing.
slot-name can be a variable, or it can be a function call, or it can be a
quoted
-- you can put simply anything there.
the bad thing about this is that it is more verbose, indeed.
J> which is much sorter, clearer, and more elegant, I have to modify Lisp.
J> But if I put myself doing the same with the entire language, at the end
J> I'm wasting my time modifying it rather than writing actual code.
modifying some aspects is relatively easy, but if you'd like to modify
whole language, that probably means you're using wrong one
J> Another thing I hate about what people say about Lisp not having syntax
J> or a very simple syntax. Well, take the last example:
J> (slot-value 'slot object)
J> You must remember:
J> 1.- The name of the construct.
J> 2.- That slot must be the first argument, and object the second.
J> 3.- That 'slot must have '.
you still have to remember some stuff, indeed, but it is much easier
than to remember "syntax" in other languages -- there are much less
constructs and it is much easier to lookup stuff if you've forgot something.
On Oct 27, 4:25 pm, Javier <······@askmyadress.com> wrote:
> Tamas K Papp escribió:
>
> > WJ still hasn't got the idea that if some construct is useful in Lisp, we
> > can turn it into extremely concise code using macros.
>
> I understand you perfectly.
No you don't, else you wouldn't writing thos
> The question I do myself is: why?
> If I continue to modify Lisp, I'm finally going to get something like
> Ruby.
Only if you want to get something like Ruby.
>Isn't it better to simply use Ruby?
If it works for you help yourself, I would be disgusted to turn
beautiful lisp into ugly bundle of hacks like ruby.
>
> The entire lisp is full of things like this:
>
> (slot-value 'slot object)
>
> If I want something like:
>
> object.slot
And if I want to have a method that specializes on type A, and type
B ...like:
(method loan ((l loanshark) (c casino) (g gambler) ... and
(method loan ((l bank) (c casino) (g gambler) ...
how I'm going to write that in your beloved syntax (btw it's called
message passing and it dropped from lisp just because it's inflexible)
Go read some books and learn lisp well before writing laymens
nonsense in the forums.
>
> which is much sorter, clearer, and more elegant, I have to modify Lisp.
> But if I put myself doing the same with the entire language, at the end
> I'm wasting my time modifying it rather than writing actual code.
>
> Another thing I hate about what people say about Lisp not having syntax
> or a very simple syntax. Well, take the last example:
>
> (slot-value 'slot object)
>
> You must remember:
> 1.- The name of the construct.
> 2.- That slot must be the first argument, and object the second.
> 3.- That 'slot must have '.
>
> This might seem foolish. It is not. Almost for every constructor happens
> the same thing, and they are all very different, that is, very little
> coherent between them.
> Yet, I haven't found ANYTHING for which an invented lisp-like syntax is
> better than, for example, a ruby and/or smalltalk object oriented
> syntax, and I think ruby/smalltalk one is simpler everytime.
>
> Lispers tend to say that you can invent new languages with Lisp. The
> question is: what's up if the language you use already has all the
> constructors you need for making your application?
Are you famigliar with language that has built in:
1. macros
2. first order anything (functions, macros , special operators)
3. unification
4. array programing
5. full blown continuations
6. direct stack manipulation
7. pointfree aka tacit programming
8. backtracking
9. rules
10. multimethods
>Do you still use Lisp?
If there was such language I WOULD use that language instead lisp.
bobi
From: Javier
Subject: Re: OT: Ruby evangelists in c.l.l
Date:
Message-ID: <ge7a6p$9rn$1@aioe.org>
Slobodan Blazeski escribi�:
> And if I want to have a method that specializes on type A, and type
> B ...like:
> (method loan ((l loanshark) (c casino) (g gambler) ... and
> (method loan ((l bank) (c casino) (g gambler) ...
> how I'm going to write that in your beloved syntax (btw it's called
> message passing and it dropped from lisp just because it's inflexible)
Polymorphism is there for something.
You can in Java, C++, and other languages directly. Yo can't in Ruby
directly, because it is not configured that way. But you can work with
'class' in order to support it.
> Go read some books and learn lisp well before writing laymens
> nonsense in the forums.
I'm not writing nonsenses, just things that you don't like to hear. I
don't like your insulting attitude.
>> Lispers tend to say that you can invent new languages with Lisp. The
>> question is: what's up if the language you use already has all the
>> constructors you need for making your application?
> Are you famigliar with language that has built in:
> 1. macros
If you have all the constructors you need, don't need macros.
> 2. first order anything (functions, macros , special operators)
First order Objects. Functions are just objects, and they are
manipulable in real time.
> 3. unification
What??? Unification of what? ;-)
> 4. array programing
This is too weak. Ruby has good array support.
> 5. full blown continuations
Common Lisp do not support continuations, you have to add them, and
modify defun and other fundamental functions, affecting the hole system,
or creating a parallel one, with all its drawbacks.
In Ruby, you have blocks, which are equivalent in some respect.
> 6. direct stack manipulation
Really? You can manipulate the stack in Lisp? Show me an example.
> 7. pointfree aka tacit programming
You mean pointerfree. I don't understand what tacit programming means.
Perhaps you can explain it to me, why it is better, and then compare
against Ruby.
> 8. backtracking
Do you mean decompilation, dissasembly, macro expansion, time measure an
such things?
Ruby does not need them (except performance measurement, which has), as
it does not need macros, and it is an interpreter.
> 9. rules
Rules of what?
> 10. multimethods
Methods and polimorphism?
>> Do you still use Lisp?
> If there was such language I WOULD use that language instead lisp.
You are too much alienated.
On Oct 28, 4:13 pm, Javier <······@askmyadress.com> wrote:
> Slobodan Blazeski escribió:
>
> > And if I want to have a method that specializes on type A, and type
> > B ...like:
> > (method loan ((l loanshark) (c casino) (g gambler) ... and
> > (method loan ((l bank) (c casino) (g gambler) ...
> > how I'm going to write that in your beloved syntax (btw it's called
> > message passing and it dropped from lisp just because it's inflexible)
>
> Polymorphism is there for something.
> You can in Java, C++, and other languages directly. Yo can't in Ruby
> directly, because it is not configured that way. But you can work with
> 'class' in order to support it.
>
> > Go read some books and learn lisp well before writing laymens
> > nonsense in the forums.
>
> I'm not writing nonsenses, just things that you don't like to hear.
No you're trying to teach your Grandma how to suck eggs.
You have no experience with other paradigms, you haven't written 500
lines of lisp yet you are trying to teach people who know much more
then you, and you even insult them.
> I don't like your insulting attitude.
And I don't like ignorant laymen, trolls and spammers. That's why I
alredy plonked you thanks to this wondeful tool http://www.penney.org/ggkiller.html
(Note works only with Firefox) but today I'm doing my semestral
windows reinstall and browsing with IE. You will be invisible to me
for the next 6 months.
>
> >> Lispers tend to say that you can invent new languages with Lisp. The
> >> question is: what's up if the language you use already has all the
> >> constructors you need for making your application?
There is no such language. Not for me. Lisp is the best but it's not
perfect.
> > Are you famigliar with language that has built in:
> > 1. macros
>
> If you have all the constructors you need, don't need macros.
Yes you do. Download On Lisp and try to implement things from it if
you don't have macros.
If you don't have macros you will have to write boilerplate code. No
langauge designer could think of all the things you need in your
codebase.
>
> > 2. first order anything (functions, macros , special operators)
>
> First order Objects. Functions are just objects, and they are
> manipulable in real time.
No no no. Objects are very limiting way of thinking.
>
> > 3. unification
>
> What??? Unification of what? ;-)
Ever heard of Prolog?
>
> > 4. array programing
>
> This is too weak. Ruby has good array support.
Don't make me laugh. Have you ever worked with any language from the
APL family like q, j, k, nial and of course APL?
Ruby has shit. Even lisp doesn't have anything close. Though series
library is something liek that, above langauges are THE REAL THING
especially q.
>
> > 5. full blown continuations
>
> Common Lisp do not support continuations,
I was talking what kind of language do I need to call it better than
lisp.
> In Ruby, you have blocks, which are equivalent in some respect.
Some respect is nothing , either I could control the control flow or
not.
Delimited continuations are equivalent in some respect but they're
not the real thing.
Delegates in C# are first order functions in some respect but they're
not the real thing.
You either have it or not. Some respect won't do.
>
> > 6. direct stack manipulation
>
> Really? You can manipulate the stack in Lisp? Show me an example.
Agin I was talking what kind of language do I need to call it better
than lisp.
See joy & factor for examples.
>
> > 7. pointfree aka tacit programming
>
> You mean pointerfree. I don't understand what tacit programming means.
> Perhaps you can explain it to me, why it is better, and then compare
> against Ruby.
I mean pointfree(point-free) or pointless or tacit style in j parle.
That's a style of programming without using variables.
;In j
mean =: +/ % #
; Herons' formula aka sqrt(s*(s-a)*(s-b)*s-c))
triarea =: [: %: [: */ ··@:(+/) - 0 , ]
Or verb by verb
semiperimeter =: ··@:(+/)
factors =: semiperimeter - 0,]
product =: [: */ factors
triarea =: [: %: product
Take a look at this excellent book for a full explanation:
http://www.jsoftware.com/jwiki/HenryRich?action=AttachFile&do=get&target=JforC20071003.pdf
>
> > 8. backtracking
>
> Do you mean decompilation, dissasembly, macro expansion, time measure an
> such things?
> Ruby does not need them (except performance measurement, which has), as
> it does not need macros, and it is an interpreter.
No I mean backtracking. See pointer at 3)
>
> > 9. rules
>
> Rules of what?
Again see pointer at 3)
>
> > 10. multimethods
>
> Methods and polimorphism?
Go read about types of other types of object systems beside message
passing and you'll understand
>
> >> Do you still use Lisp?
> > If there was such language I WOULD use that language instead lisp.
>
> You are too much alienated.
Oh no I tried your toy scripting language, togather with many other
like python, php, ocaml etc and it was a pure waste of my time. They
were little bit better than the standard languages I worked with c/c++/
c#/java & (Pascal / Delphi) but little bit is not enough for me.
There are very few langauges that I really like lisp/scheme, q/
j,prolog, joy/factor and Erlang everything else is pretty much the
same more or less or just not my type (like statically typed
languages :Haskell , ML).
Javier <······@askmyadress.com> writes:
> Another thing I hate about what people say about Lisp not having
> syntax or a very simple syntax. Well, take the last example:
>
> (slot-value 'slot object)
>
> You must remember:
> 1.- The name of the construct.
> 2.- That slot must be the first argument, and object the second.
> 3.- That 'slot must have '.
No, it can be a variable containing the slot-name (which is a symbol) like this:
CL-USER> (defclass a () ((a :initarg :a) (b :initarg :b) (c :initarg :c)))
#<STANDARD-CLASS A>
CL-USER> (make-instance 'a :a "hi" :b "there" :c "you")
#<A {BF62329}>
CL-USER> (loop for slot-name in (list 'a 'b 'c) do (format t (slot-value * slot-name)))
hithereyou
NIL
CL-USER>
Javier wrote:
> Ok, I feel he is right at some points. For example, the way Ruby manages
> functions, and blocks (treating code as data), how concise it is, how
> easy is compared to Lisp...
But MatzacredLisp^W Ruby has no macros, so the demonstrated conciseness
is equivalent to a bicycle that outspeeds cars when the semaphore goes
green, but as soon as the cars switch to the second gear, the bicycle is
outsped dramatically.
And code is data in Ruby, you have to parse it.
--
__Pascal Bourguignon__
http://www.informatimago.com
On Oct 27, 6:30 am, Tamas K Papp <······@gmail.com> wrote:
> On Mon, 27 Oct 2008 15:12:26 +0200, Alex Mizrahi wrote:
> > WJ>>> Ruby:
> > ??>>
> > ??>> what is your point?
>
> > J> I think he is has just tried Ruby, and was a Lisp student before, he
> > got J> impressed about Ruby, and want to evangelize everybody here.
>
> > i wonder what target audience it. it seems "mature" CL programmers are
> > very unlikely to get interested. and seducing newcomers is sort of mean.
>
> If a newcomer who has spent at least 2 days with Lisp is "seduced" by
> line noise, then he deserves it. People should think for themselves.
>
> The Ruby troll has no target audience. All he has is an inferiority
> complex which compels him to rewrite trivial code snippets in Ruby,
> thinking he is demonstrating something.
>
> I am not really reading other comp.lang.* newsgroups, but I am under the
> impression that c.l.l gets more than its fair share of crackpots and
> evangelists. Some think that they are ready to reform Lisp after
> spending an afternoon with it. Others argue endlessly about some trivial
> aspect of the language. Then there are those who think that just because
> they got stuck at the level of some pitiful and powerless language,
> everyone else should be using it, which sort of makes sense from their
> point if view: "if I do not enjoy programming, nor should you".
>
> Tamas
yeah you tell em!
On Mon, 27 Oct 2008 15:12:26 +0200, Alex Mizrahi wrote:
> i wonder what target audience it. it seems "mature" CL programmers are
> very unlikely to get interested. and seducing newcomers is sort of mean.
I don't see how providing an alternative for Emacs who don't want to use
it is mean. To get people to pick up Lisp (or any other language) you
have to provide them tools they like, not tools that you use and think
they should so too.
regards,
Marek
On Oct 27, 5:27 am, Javier <······@AskMyAdressBeforeWritingMe.com>
wrote:
> On Sun, 26 Oct 2008 10:42:00 +0200, Alex Mizrahi wrote:
> > WJ> Ruby:
>
> > what is your point?
>
> I think he is has just tried Ruby, and was a Lisp student before, he got
> impressed about Ruby, and want to evangelize everybody here.
I actually find the Ruby examples interesting. I wish he could post
them just as examples, and leave it at that. The smug superiority
thing gets very old very fast -- and assumes the examples prove
something, which they don't. "People who like this sort of thing will
find that this is the sort of thing they like."
I also think it's very cool that a heavily higher-order, mostly-
functional, highly dynamic language has caught on to this extent. In
a way this is a victory for Lisp, just as the success of Java is.
Yes, it's too bad most Ruby users probably don't know the history of
the ideas that went into their language, and how many of them came
from now-obscure languages like Lisp, APL, and SetL. Yes, it would be
nice if they would show us more respect. And yes, I know there are
still more good ideas from Lisp that are yet to be widely
appreciated. But hey, it's still progress.
-- Scott
On Oct 29, 7:06 am, Scott Burson <········@gmail.com> wrote:
> On Oct 27, 5:27 am, Javier <······@AskMyAdressBeforeWritingMe.com>
> wrote:
>
> > On Sun, 26 Oct 2008 10:42:00 +0200, Alex Mizrahi wrote:
> > > WJ> Ruby:
>
> > > what is your point?
>
> > I think he is has just tried Ruby, and was a Lisp student before, he got
> > impressed about Ruby, and want to evangelize everybody here.
>
> I actually find the Ruby examples interesting. I wish he could post
> them just as examples, and leave it at that. The smug superiority
> thing gets very old very fast -- and assumes the examples prove
> something, which they don't. "People who like this sort of thing will
> find that this is the sort of thing they like."
>
> I also think it's very cool that a heavily higher-order, mostly-
> functional, highly dynamic language has caught on to this extent. In
> a way this is a victory for Lisp, just as the success of Java is.
> Yes, it's too bad most Ruby users probably don't know the history of
> the ideas that went into their language, and how many of them came
> from now-obscure languages like Lisp, APL, and SetL. Yes, it would be
> nice if they would show us more respect. And yes, I know there are
> still more good ideas from Lisp that are yet to be widely
> appreciated. But hey, it's still progress.
>
> -- Scott
yes, ruby is interesting but this is comp.lang.lisp and it's quite
lame to hang on lisp list and troll about something better and smarter
then lisp, even if that is actually true
that is for 15-year olds