Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Fwd: Lisp macros
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 46 - Collapse all  -  Translate all to Translated (View all originals)   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Joe Van Dyk  
View profile  
 More options Sep 26 2005, 9:25 pm
Newsgroups: comp.lang.ruby
From: Joe Van Dyk <joevan...@gmail.com>
Date: Tue, 27 Sep 2005 10:25:52 +0900
Local: Mon, Sep 26 2005 9:25 pm
Subject: Fwd: Lisp macros
Whoops, this belongs on ruby-talk... Sorry.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Britt  
View profile  
 More options Sep 26 2005, 9:46 pm
Newsgroups: comp.lang.ruby
From: James Britt <jame...@neurogami.com>
Date: Tue, 27 Sep 2005 10:46:41 +0900
Local: Mon, Sep 26 2005 9:46 pm
Subject: Re: Fwd: Lisp macros

Joe Van Dyk wrote:
> Whoops, this belongs on ruby-talk... Sorry.

I trust the accidental exposure to Lisp wasn't too traumatizing.

Anyway, there have been sporadic discussions both here and on ruby-core
about adding true Lisp-style macros to Ruby.  My understanding is that
while Ruby can do assorted flips and twists, it cannot do quite the same
sort of things as found in Lisp (and I hope a true Lisper here can
elaborate on this); I also believe that Matz is less than enamored with
idea of adding this to Ruby (and I hope a true Matz can elaborate on
this, too).

James
--

http://www.ruby-doc.org - The Ruby Documentation Site
http://www.rubyxml.com  - News, Articles, and Listings for Ruby & XML
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com  - Playing with Better Toys


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Devin Mullins  
View profile  
 More options Sep 26 2005, 9:50 pm
Newsgroups: comp.lang.ruby
From: Devin Mullins <twif...@comcast.net>
Date: Tue, 27 Sep 2005 10:50:09 +0900
Local: Mon, Sep 26 2005 9:50 pm
Subject: Re: Fwd: Lisp macros
The big thing Lisp has that Ruby can't do is code-as-data. I wish I
could provide a good example of how that might be used practically, but
it's been quite a while since I touched lisp.

Devin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lyndon Samson  
View profile  
 More options Sep 26 2005, 9:52 pm
Newsgroups: comp.lang.ruby
From: Lyndon Samson <lyndon.sam...@gmail.com>
Date: Tue, 27 Sep 2005 10:52:50 +0900
Local: Mon, Sep 26 2005 9:52 pm
Subject: Re: Fwd: Lisp macros

On 9/27/05, James Britt <jame...@neurogami.com> wrote:

> Joe Van Dyk wrote:
> > Whoops, this belongs on ruby-talk... Sorry.

> I trust the accidental exposure to Lisp wasn't too traumatizing.

> Anyway, there have been sporadic discussions both here and on ruby-core
> about adding true Lisp-style macros to Ruby. My understanding is that
> while Ruby can do assorted flips and twists, it cannot do quite the same
> sort of things as found in Lisp (and I hope a true Lisper here can
> elaborate on this); I also believe that Matz is less than enamored with
> idea of adding this to Ruby (and I hope a true Matz can elaborate on
> this, too).

Almost here with this http://rubyforge.org/projects/parsetree/ Just need to
able able to modify it and feed it back.

This http://boo.codehaus.org/Syntactic+Macros is also interesting reading.

Lyndon


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe Van Dyk  
View profile  
 More options Sep 26 2005, 9:53 pm
Newsgroups: comp.lang.ruby
From: Joe Van Dyk <joevan...@gmail.com>
Date: Tue, 27 Sep 2005 10:53:02 +0900
Local: Mon, Sep 26 2005 9:53 pm
Subject: Re: Fwd: Lisp macros
On 9/26/05, James Britt <jame...@neurogami.com> wrote:

> Joe Van Dyk wrote:
> > Whoops, this belongs on ruby-talk... Sorry.

> I trust the accidental exposure to Lisp wasn't too traumatizing.

> Anyway, there have been sporadic discussions both here and on ruby-core
> about adding true Lisp-style macros to Ruby.  My understanding is that
> while Ruby can do assorted flips and twists, it cannot do quite the same
> sort of things as found in Lisp (and I hope a true Lisper here can
> elaborate on this); I also believe that Matz is less than enamored with
> idea of adding this to Ruby (and I hope a true Matz can elaborate on
> this, too).

I'm just repeating what I've heard numerous times, but apparently, you
can only get Lisp macros if the language has lots of silly irritating
parenthesis.  And since Ruby has syntax, it wouldn't be possible.

Or something.  Don't pay attention to me.  I have no clue what i'm
talking about.  :(


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alexey Verkhovsky  
View profile  
 More options Sep 26 2005, 10:18 pm
Newsgroups: comp.lang.ruby
From: Alexey Verkhovsky <a...@verk.info>
Date: Tue, 27 Sep 2005 11:18:26 +0900
Local: Mon, Sep 26 2005 10:18 pm
Subject: Re: Fwd: Lisp macros

Joe Van Dyk wrote:
>On 9/26/05, Devin Mullins <twif...@comcast.net> wrote:

>>The big thing Lisp has that Ruby can't do is code-as-data. I wish I
>>could provide a good example of how that might be used practically, but
>>it's been quite a while since I touched lisp.

>If anyone wants to chime in with an example of what code-as-data is or
>how it could be used, I'd appreciate it!

--- foo.properties ---
foo_name = 'MyFoo',
foo_description = 'A code-as-data foo'
foo_question = 'Why is this useful?'
foo_answer = "Ah, well, sometimes it is"

--- foo_properties_loader.rb ---
puts File.read('foo.properties')
puts

load 'foo.properties'
puts  foo_question
puts foo_answer

:)

Alex


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Schuerig  
View profile  
 More options Sep 26 2005, 10:20 pm
Newsgroups: comp.lang.ruby
From: Michael Schuerig <mich...@schuerig.de>
Date: Tue, 27 Sep 2005 04:20:19 +0200
Local: Mon, Sep 26 2005 10:20 pm
Subject: Re: Fwd: Lisp macros

James Britt wrote:
> Joe Van Dyk wrote:
>> Whoops, this belongs on ruby-talk... Sorry.

> I trust the accidental exposure to Lisp wasn't too traumatizing.

> Anyway, there have been sporadic discussions both here and on
> ruby-core
> about adding true Lisp-style macros to Ruby.  My understanding is that
> while Ruby can do assorted flips and twists, it cannot do quite the
> same sort of things as found in Lisp (and I hope a true Lisper here
> can elaborate on this); I also believe that Matz is less than enamored
> with idea of adding this to Ruby (and I hope a true Matz can elaborate
> on this, too).

I'm neither a true Matz nor a true Lisper. The basic facility Lisp
macros offer over what is available in Ruby is that they do *not*
evaluate their arguments. Where this is not an issue, you can get very
far with what is there in Ruby.

Michael

--
Michael Schuerig                           The more it stays the same,
mailto:mich...@schuerig.de                        The less it changes!
http://www.schuerig.de/michael/      --Spinal Tap, The Majesty of Rock


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe Van Dyk  
View profile  
 More options Sep 26 2005, 11:58 pm
Newsgroups: comp.lang.ruby
From: Joe Van Dyk <joevan...@gmail.com>
Date: Tue, 27 Sep 2005 12:58:35 +0900
Local: Mon, Sep 26 2005 11:58 pm
Subject: Re: Fwd: Lisp macros
On 9/26/05, Michael Schuerig <mich...@schuerig.de> wrote:

Thank you!

Does Lisp have any other advantages over Ruby that I should be looking
for?  When would I want to use Lisp over Ruby?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kev Jackson  
View profile  
 More options Sep 27 2005, 12:08 am
Newsgroups: comp.lang.ruby
From: Kev Jackson <kevin.jack...@it.fts-vn.com>
Date: Tue, 27 Sep 2005 13:08:26 +0900
Local: Tues, Sep 27 2005 12:08 am
Subject: Re: Fwd: Lisp macros

>Thank you!

>Does Lisp have any other advantages over Ruby that I should be looking
>for?  When would I want to use Lisp over Ruby?

When you want to write your own language, Lisp is very useful, I'm sure
that you can do this quite well with ruby (but I'm no ruby expert), but
Lisp is teh poster child for domain specific languages.

Kev


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jim Freeze  
View profile  
 More options Sep 27 2005, 1:01 am
Newsgroups: comp.lang.ruby
From: Jim Freeze <j...@freeze.org>
Date: Tue, 27 Sep 2005 14:01:00 +0900
Subject: Re: Fwd: Lisp macros
On 9/26/05, James Britt <jame...@neurogami.com> wrote:

> Joe Van Dyk wrote:

> Anyway, there have been sporadic discussions both here and on ruby-core
> about adding true Lisp-style macros to Ruby.  My understanding is that
> while Ruby can do assorted flips and twists, it cannot do quite the same
> sort of things as found in Lisp (and I hope a true Lisper here can
> elaborate on this); I also believe that Matz is less than enamored with
> idea of adding this to Ruby (and I hope a true Matz can elaborate on
> this, too).

Matz has said (at the Lightweight Language Conf) that Ruby will never
have macros because they are too easily abused, by the average person,
to mutate the language.

Yes, Ruby has continuations and one can abuse them, but you have to
be really smart. The average person won't even use them, let alone
abuse them. :)

--
Jim Freeze


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe Van Dyk  
View profile  
 More options Sep 27 2005, 1:45 am
Newsgroups: comp.lang.ruby
From: Joe Van Dyk <joevan...@gmail.com>
Date: Tue, 27 Sep 2005 14:45:58 +0900
Local: Tues, Sep 27 2005 1:45 am
Subject: Re: Fwd: Lisp macros
On 9/26/05, Jim Freeze <j...@freeze.org> wrote:

> On 9/26/05, James Britt <jame...@neurogami.com> wrote:
> > Joe Van Dyk wrote:

> > Anyway, there have been sporadic discussions both here and on ruby-core
> > about adding true Lisp-style macros to Ruby.  My understanding is that
> > while Ruby can do assorted flips and twists, it cannot do quite the same
> > sort of things as found in Lisp (and I hope a true Lisper here can
> > elaborate on this); I also believe that Matz is less than enamored with
> > idea of adding this to Ruby (and I hope a true Matz can elaborate on
> > this, too).

> Matz has said (at the Lightweight Language Conf) that Ruby will never
> have macros because they are too easily abused, by the average person,
> to mutate the language.

Was he joking?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
gabriele renzi  
View profile  
 More options Sep 27 2005, 2:30 am
Newsgroups: comp.lang.ruby
From: gabriele renzi <surrender...@-remove-yahoo.it>
Date: Tue, 27 Sep 2005 06:30:18 GMT
Local: Tues, Sep 27 2005 2:30 am
Subject: Re: Fwd: Lisp macros
Joe Van Dyk ha scritto:

well you can get lisp macros only in a s-exp based language, but there
are other mcro systems :)
Take a look at Dylan (close relative of lisp with more syntax), Nemerle
  and Logix. All succed to put a powerful macro system in a syntax which
does not need prefix based everything :)

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Martin DeMello  
View profile  
 More options Sep 27 2005, 3:37 am
Newsgroups: comp.lang.ruby
From: Martin DeMello <martindeme...@yahoo.com>
Date: Tue, 27 Sep 2005 07:37:11 GMT
Local: Tues, Sep 27 2005 3:37 am
Subject: Re: Fwd: Lisp macros
Joe Van Dyk <joevan...@gmail.com> wrote:

> I'm just repeating what I've heard numerous times, but apparently, you
> can only get Lisp macros if the language has lots of silly irritating
> parenthesis.  And since Ruby has syntax, it wouldn't be possible.

> Or something.  Don't pay attention to me.  I have no clue what i'm
> talking about.  :(

No, all you need is a way to manipulate the abstract syntax tree from
code (or, indeed, the bytecode representation from code, for languages
that work that way). Lisp gets it for free because s expressions *are*
an abstract syntax tree.

martin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jim Freeze  
View profile  
 More options Sep 27 2005, 7:22 am
Newsgroups: comp.lang.ruby
From: Jim Freeze <j...@freeze.org>
Date: Tue, 27 Sep 2005 20:22:38 +0900
Local: Tues, Sep 27 2005 7:22 am
Subject: Re: Fwd: Lisp macros
On 9/27/05, Joe Van Dyk <joevan...@gmail.com> wrote:

> On 9/26/05, Jim Freeze <j...@freeze.org> wrote:
> > On 9/26/05, James Britt <jame...@neurogami.com> wrote:
> > > Joe Van Dyk wrote:

> > Matz has said (at the Lightweight Language Conf) that Ruby will never
> > have macros because they are too easily abused, by the average person,
> > to mutate the language.

> Was he joking?

Judge for yourself:

  http://ll2.ai.mit.edu/

--
Jim Freeze


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Devin Mullins  
View profile  
 More options Sep 27 2005, 8:21 am
Newsgroups: comp.lang.ruby
From: Devin Mullins <twif...@comcast.net>
Date: Tue, 27 Sep 2005 21:21:07 +0900
Local: Tues, Sep 27 2005 8:21 am
Subject: Re: Fwd: Lisp macros

Devin Mullins wrote:
> The big thing Lisp has that Ruby can't do is code-as-data. I wish I
> could provide a good example of how that might be used practically,
> but it's been quite a while since I touched lisp.

> Devin

Well, nobody's provided an example. The best I can do is provide more
explanation. Since code is just (blah blah (blah blah)) -- that is, just
a list -- and Lisp has the capability to delay evaluation (I think with
an '), you can pass code into another function and have that function
actually manipulate the internals of your code, and build some new code
out of it. You could, maybe, write something that stripped all the print
statements out at runtime... Crappy example...

Help! Is there a Lisper in the house?

Devin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ben  
View profile  
 More options Sep 27 2005, 8:44 am
Newsgroups: comp.lang.ruby
From: Ben <benbe...@gmail.com>
Date: Tue, 27 Sep 2005 21:44:36 +0900
Local: Tues, Sep 27 2005 8:44 am
Subject: Re: Fwd: Lisp macros
On 9/27/05, Jim Freeze <j...@freeze.org> wrote:

> Matz has said (at the Lightweight Language Conf) that Ruby will never
> have macros because they are too easily abused, by the average person,
> to mutate the language.

  This is a cop-out.  Every time a new language comes around and
doesn't support some feature, the reason is always "too easily
abused".  Macros in lisp are about abstraction.  Like every other
abstraction - interfaces, classes, pointers, etc, they can be abused
horribly.  They can also be a powerful tool.
  If I recall my CS 101, computer programming is built on the pillars
of algorithms and data structures.  Lisp and its variants are neat
because they represent the code as a native data structure.  With that
in place it becomes easy to create algorithms to manipulate the data
structure, changing the syntax as you write, and the code as it runs.
If you're familiar with the more complex metaprogramming techniques
C++ provides with templates, you'll start to get the idea of what lisp
macros offer you.  Macros are less limiting than C++ templates though,
and more naturally represented.

  Consider an array in Ruby whose first element is a method call:
a = [method, param1, param2]
eval "${a[0]} ${a[1]} ${a[2]}"
If param1 becomes an array, that is a nested call:
a = [method, [method2, x, y], param2]

In Lisp, if 'method' is a macro:
a = [macro, [method2, x, y], param2]
then macro gets 'expanded' at compile time WITHOUT evaluating the parameters:
a = [method [do-crazy-thing param2 [do-cool-thing [method2, x, y] ] ]
[ [param2 method2, x, y] ] ]
; Did I match all my braces?

I really like Lisp.  :)

-Ben


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ben  
View profile  
 More options Sep 27 2005, 9:00 am
Newsgroups: comp.lang.ruby
From: Ben <benbe...@gmail.com>
Date: Tue, 27 Sep 2005 22:00:35 +0900
Local: Tues, Sep 27 2005 9:00 am
Subject: Re: Fwd: Lisp macros
On 9/27/05, Ben <benbe...@gmail.com> wrote:

> (much rambling snipped)

Alright, now I am intrigued.  How much work would it be to create a
Ruby Lisp-like parser?

class Risp
  def Risp.eval(code)  # code should be an array!
    # What happens here?  We need to create a string to be eval'ed.  As
    # the string is created, if we find an array jump in to eval that first


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Edward Faulkner  
View profile  
 More options Sep 27 2005, 9:54 am
Newsgroups: comp.lang.ruby
From: Edward Faulkner <e...@alum.mit.edu>
Date: Tue, 27 Sep 2005 22:54:48 +0900
Local: Tues, Sep 27 2005 9:54 am
Subject: Re: Fwd: Lisp macros

On Tue, Sep 27, 2005 at 09:21:07PM +0900, Devin Mullins wrote:
> Crappy example...

> Help! Is there a Lisper in the house?

Part of the attraction of Lisp macros is that they allow you to keep
the core language very small, and add the features you want with
macros.  For example, as long as you have the lambda operator, you can
define things like "while" and "let" as macros, not keywords.  This is
in fact how many Lisp implementations work, because it keeps the
compiler/interpreter simple.

Another use for macros is to perform some of your computation at
compile time, saving you from ever needing to perform it again at
runtime.

In the general case, macros can be used to rewrite whole programs.
For example, even though Lisp doesn't natively support continuations,
you can build them with macros that rewrite your program into an
explicit continuation-passing style.

Paul Graham's "On Lisp" is available online and contains several
chapters about macros.  It gives many more examples:

http://www.paulgraham.com/onlisptext.html

regards,
Ed

  signature.asc
< 1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
itsme213  
View profile  
 More options Sep 27 2005, 10:03 am
Newsgroups: comp.lang.ruby
From: "itsme213" <itsme...@hotmail.com>
Date: Tue, 27 Sep 2005 14:03:22 GMT
Local: Tues, Sep 27 2005 10:03 am
Subject: Re: Fwd: Lisp macros

"Lyndon Samson" <lyndon.sam...@gmail.com> wrote in message
> Almost here with this http://rubyforge.org/projects/parsetree/ Just need
> to able able to modify it and feed it back.

Will parsetree (and Rubyinline) run on Windows, and is a precompiled version
available?

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jim Freeze  
View profile  
 More options Sep 27 2005, 10:09 am
Newsgroups: comp.lang.ruby
From: Jim Freeze <j...@freeze.org>
Date: Tue, 27 Sep 2005 23:09:48 +0900
Local: Tues, Sep 27 2005 10:09 am
Subject: Re: Fwd: Lisp macros
On 9/27/05, Ben <benbe...@gmail.com> wrote:

> On 9/27/05, Jim Freeze <j...@freeze.org> wrote:

> > Matz has said (at the Lightweight Language Conf) that Ruby will never
> > have macros because they are too easily abused, by the average person,
> > to mutate the language.

>   This is a cop-out.  Every time a new language comes around and

Hmm, that is strong language. Do you think Matz has made a bad decision
here? Ruby does have lambda's. If you really need a lisp like language,
there is always Lisp. :)

Seriously, can you put your statement in words that define exactly
what you mean? What exacly 'macro like' feature are you looking for?
Are you really looking for macro capability or just a lazy eval?

--
Jim Freeze


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robbie Carlton  
View profile  
 More options Sep 27 2005, 10:50 am
Newsgroups: comp.lang.ruby
From: Robbie Carlton <robbie.carl...@gmail.com>
Date: Tue, 27 Sep 2005 23:50:29 +0900
Local: Tues, Sep 27 2005 10:50 am
Subject: Re: Fwd: Lisp macros

code as data is what makes lisp macros so powerful.

In a c macro you have the power of a little macro language to manipulate
strings, in a lisp macro you have the power of lisp language to manipulate
lisp data structures. I'll elaborate.

When the compiler sees a call to a macro it passes all of the arguments to
the macro, before evaluating.
so in a call like

(dotimes (i 10)
(do-some-crazy-thing)
(print i))

the macro dotimes is passed the list (i 10) and the list
((do-some-crazy-thing) (print i))
the macro can then operate on them as data, using the full power of lisp. At
the end of all this, the macro returns another piece of data, a list, which
is then interpreted as a lisp form, code, and evaluated.

If lisp code wasn't the same as lisp data, macros would be a lot less
powerful as you would have to have two languages, one for manipulating lisp
data, and another for manipulating lisp code (this is what you get in c).

Hope this helps. Sorry the example isn't very enlightening, it's difficult
to illustrate the power of macros in (< 500 words) as they're very
complicated. If you'd like to know more* ... learn lisp :)

Now I will stop with the lisp advocacy.

*on lisp by Paul Graham is the bible on macros, but it's a little hard for
someone who's new to lisp, try practical common lisp by Peter Siebel, (both
are available free online).

On 9/27/05, Devin Mullins <twif...@comcast.net> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeff Wood  
View profile  
 More options Sep 27 2005, 10:55 am
Newsgroups: comp.lang.ruby
From: Jeff Wood <jeff.darkli...@gmail.com>
Date: Tue, 27 Sep 2005 23:55:02 +0900
Local: Tues, Sep 27 2005 10:55 am
Subject: Re: Fwd: Lisp macros

Based on the discussion, if he's watching ( Matz? ) ... would you please
enlighten us with your feelings?

.. I for one have never minded having "too much power". It's the exercise
of responsibility that makes programming an art.

j.

On 9/27/05, Ben <benbe...@gmail.com> wrote:

--
"http://ruby-lang.org -- do you ruby?"

Jeff Wood


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sean O'Halpin  
View profile  
 More options Sep 27 2005, 10:57 am
Newsgroups: comp.lang.ruby
From: Sean O'Halpin <sean.ohal...@gmail.com>
Date: Tue, 27 Sep 2005 23:57:24 +0900
Local: Tues, Sep 27 2005 10:57 am
Subject: Re: Fwd: Lisp macros
On 9/27/05, Ben <benbe...@gmail.com> wrote:

> On 9/27/05, Ben <benbe...@gmail.com> wrote:
> > (much rambling snipped)

> Alright, now I am intrigued.  How much work would it be to create a
> Ruby Lisp-like parser?

You might be interested in Rouge, a (simple) Lisp interpreter in Ruby:

http://raa.ruby-lang.org/project/rouge/

Sean


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jim Freeze  
View profile  
 More options Sep 27 2005, 11:05 am
Newsgroups: comp.lang.ruby
From: Jim Freeze <j...@freeze.org>
Date: Wed, 28 Sep 2005 00:05:04 +0900
Local: Tues, Sep 27 2005 11:05 am
Subject: Re: Fwd: Lisp macros
On 9/27/05, Ben <benbe...@gmail.com> wrote:

> On 9/27/05, Jim Freeze <j...@freeze.org> wrote:
> > On 9/27/05, Ben <benbe...@gmail.com> wrote:
> I'm probably overreacting, but I feel patronized when I'm told I can't
> have something because it's "too easy to abuse".  :)

Well, it goes without saying that I am not Matz and that I am only giving
my version of what Matz said at the LLC. I encourage you to watch
the video and give us your opinion.

   http://ll2.ai.mit.edu/

IIRC, he is in the afternoon session near the front.

--
Jim Freeze


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ben  
View profile  
 More options Sep 27 2005, 10:42 am
Newsgroups: comp.lang.ruby
From: Ben <benbe...@gmail.com>
Date: Tue, 27 Sep 2005 23:42:32 +0900
Local: Tues, Sep 27 2005 10:42 am
Subject: Re: Fwd: Lisp macros
On 9/27/05, Jim Freeze <j...@freeze.org> wrote:

> On 9/27/05, Ben <benbe...@gmail.com> wrote:

> >   This is a cop-out.  Every time a new language comes around and

> Hmm, that is strong language. Do you think Matz has made a bad decision
> here? Ruby does have lambda's. If you really need a lisp like language,
> there is always Lisp. :)

  I'm not meaning to be insulting, but saying that something is too
dangerous to put in the hands of the uneducated is almost always a way
of evading a question rather than answering it.  How about:
"The goals I am pursuing with Ruby (list goals) will not be achieved
any better with macros"
"The syntax and language structure I like for Ruby will not support
macros in an intuitive, maintainable way"  (I certainly agree with
this)
"I don't believe the benefits of macros are worth the effort of
supporting them in the interpreter and training developers to use
them."

If the reason is really that they are too scary, say why:
"The delayed evaluation necessary to support macros runs contrary to
the rest of the language.  This lack of clarity will prove a hindrance
to the quick development I intended Ruby to support.  Also, exporting
to the client of a class those implementation details (method or
macro) violates encapsulation which will increase the learning curve
of the language."

I'm probably overreacting, but I feel patronized when I'm told I can't
have something because it's "too easy to abuse".  :)

-Ben


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 1 - 25 of 46   Newer >
« Back to Discussions « Newer topic     Older topic »