Do not understand this closure

. . . except that in Lisps the () is list syntax, and the reason
closures and methods share that syntax is that everything is a list.
That's my understanding, anyway. Then again, I'm no Lisp expert.

On the other hand, Perl might be a good example of unified syntax for
methods and closures. In both cases, calling the thing involves a
dereferencing, for which ->() is the syntax.

True, I was thinking of invocation and typed () where that doesn't apply to Lisp. The point was that in some languages invocation is accomplished in the same way since the two forms of definition are semantically equivalent. If I remember correctly (it has been quite a while since I've looked at Lisp and Scheme) this is actually a difference between Scheme and Lisp. Scheme has a single namespace for variable definitions and function definitions whereas in Common Lisp the two are separate. I actually much prefer the Scheme approach and consider it to be more beautiful and simple. The biggest barrier to something like this in Ruby (at least in 1.8.x) is that the parameters are handled slightly differently for the two (ex. procs cannot take a block).

Matthew

I wasn't aware of that -- it seems like a pretty severe (if rarely
imposing) limitation. At first glance, it also looks like a largely
arbitrary limitation, though I'm pretty sure there are at least
implementation issues involved, since last I checked the Ruby community
doesn't seem to suffer from Guidoism (aka: lambdas are one line of code,
period, because I say so, also period).

···

On Fri, Aug 25, 2006 at 10:17:11PM +0900, Matthew Johnson wrote:

>. . . except that in Lisps the () is list syntax, and the reason
>closures and methods share that syntax is that everything is a list.
>That's my understanding, anyway. Then again, I'm no Lisp expert.
>
>On the other hand, Perl might be a good example of unified syntax for
>methods and closures. In both cases, calling the thing involves a
>dereferencing, for which ->() is the syntax.

True, I was thinking of invocation and typed () where that doesn't
apply to Lisp. The point was that in some languages invocation is
accomplished in the same way since the two forms of definition are
semantically equivalent. If I remember correctly (it has been quite
a while since I've looked at Lisp and Scheme) this is actually a
difference between Scheme and Lisp. Scheme has a single namespace
for variable definitions and function definitions whereas in Common
Lisp the two are separate. I actually much prefer the Scheme
approach and consider it to be more beautiful and simple. The
biggest barrier to something like this in Ruby (at least in 1.8.x) is
that the parameters are handled slightly differently for the two (ex.
procs cannot take a block).

--
CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]
print substr("Just another Perl hacker", 0, -2);

Hey

I can't seem to get this simple DRb client to access the server over my network...
I get a bad file descriptor error.
############# The Client Script ################
require 'drb'
DRb.start_service
server = DRbObject.new(nil, "druby://#{ARGV.shift}")
my_id = server.initialize_me
puts my_id

############# The Server Script ###############
require 'drb'
class PerformAlexaUpdate
  def initialize_me
    return 'hello'
  end
end
h_server = DRb::DRbServer.new 'druby://127.0.0.1:5555', PerformAlexaUpdate.new
h_server.thread.join

···

###########################################

Any ideas will be greatly appreciated!

Thanks in advance,
Gustav

I wasn't aware of that -- it seems like a pretty severe (if rarely
imposing) limitation. At first glance, it also looks like a largely
arbitrary limitation, though I'm pretty sure there are at least
implementation issues involved, since last I checked the Ruby community
doesn't seem to suffer from Guidoism (aka: lambdas are one line of code,
period, because I say so, also period).

This has been changed in Ruby 1.9 so it seems to open the possibility of changing things in the future (to a unified method and variable namespace), although I would be surprised if such a change were to happen.

Matthew

Gustav - Railist wrote:

Hey

I can't seem to get this simple DRb client to access the server over my network...

...

h_server = DRb::DRbServer.new 'druby://127.0.0.1:5555',

What about using an eternally visible network interface, in place of loopback? (Or did you just put that in for the question to a public list?) Try druby://localhost:5555, for example.

···

--
       vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

An eternally visible network interface! I can't decide if that's every
sysadmin's dream or nightmare.

Sorry, Joel, no offense meant, but I couldn't resist :slight_smile:

···

On 9/9/06, Joel VanderWerf <vjoel@path.berkeley.edu> wrote:

What about using an eternally visible network interface, in place of
loopback?

Francis Cianfrocca wrote:

···

On 9/9/06, Joel VanderWerf <vjoel@path.berkeley.edu> wrote:

What about using an eternally visible network interface, in place of
loopback?

An eternally visible network interface! I can't decide if that's every
sysadmin's dream or nightmare.

Sorry, Joel, no offense meant, but I couldn't resist :slight_smile:

I am externally grateful to you for pointing that out :wink:

--
       vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407