hoodwink.d enhanced
RSS
2.0
XHTML
1.0

RedHanded

Decisions and the Reasons For #

by why in cult
  • In Ruby v. Scheme, Don Box says, “While I’ll admit to having a short but pleasurable tryst with Ruby, I believe I have found true love in the dialect of Lisp called Scheme.” I see. So he was scheming with Ruby. That can’t be very fulfilling ultimately. [link]
  • In Ruby People v. Other People, Martin Fowler says, “[A camper] said that the Ruby community was generally more pleasant and more friendly to newbies. (He wondered if any of this was due to Ruby’s Japanese origins.)” Let’s continue to discuss this at MatzIsNiceSoWeAreNice.
  • In Linux Packagement v. RubyGems, we’ve seen progress. A discussion on ruby-core yielded all the pent up anxieties of the repackagers, giving us a good list of how RubyGems could be tailored to work. I think everyone’s feeling better and I hope repackagers everywhere are kicking it back with a cold one right now.
said on 28 Sep 2005 at 15:21

For me, it was the other way around. I had a short, but pleasurable, tryst with Scheme and then discovered Ruby. Scheme is just a little too hardcore (though delightfully so) for my tastes. I’d rather just get stuff done.

Although, I do admit to wishing that Ruby was a bit closer to Scheme in the “code is data and data is code” department. That and more scheme-like lambda stuffs. I don’t like having to say:

foo = lambda do
  puts 'hello world'
end
foo.call

It’s the “foo.call” that bugs me. There’s always this naggy thing that really just wants to just say “foo”. Oh, and I hate having to use the *params trick with blocks to pass optional parameters. But that’s just me.

said on 28 Sep 2005 at 15:56

Who are these shadowy repackagers and why are (were) their panties in a knot?

said on 28 Sep 2005 at 16:21

The issue with removing the #call is how does Ruby know when you’re calling the lambda and when you’re just passing it around? Like given your example, what would bar = foo mean? Are you copying the lambda? Or assigning the lambda to foo?

said on 28 Sep 2005 at 18:28

Oh, I know the reasons why there’s a #call. I know it’s a wish I can’t have.

said on 28 Sep 2005 at 19:03

How about:

def block(&b)
    b.call
    b
  end

  foo = block do
    puts "hello world" 
  end
said on 28 Sep 2005 at 19:57

Actually, the real issue is that Ruby is a “Lisp-2” where Scheme is a “Lisp-1”


foo = lambda {"foo is a variable"}

def foo
 "foo is a method" 
end

foo.call
=> "foo is a variable" 

foo()
=> "foo is a method" 

said on 28 Sep 2005 at 21:11

Give us a link to the ruby-core thread :)

said on 28 Sep 2005 at 23:44

I would, but oddly enough it’s rather missing.

said on 29 Sep 2005 at 11:31

The discussion is available on the MARC archives, although that color scheme is kind of hard on the eyes…

said on 30 Sep 2005 at 10:32

One of my recent decisions was to use array = []; count = -1; (followed by an each_byte block containing) array[count] = item. This turned out to be so much faster than array += [item]. (For a solution similar to John’s btw see www.rubycentral.com/ref/ref_c_method.html)

said on 30 Sep 2005 at 11:13

The each_byte block has to have count += 1 followed by array[count] = item, of course!

said on 30 Sep 2005 at 14:21

chap, if you do not need the counting for some reason, you may also use array << item!

said on 02 Oct 2005 at 11:19

I still prefer scheme over ruby but you guys are very nice. Keep it up!

Comments are closed for this entry.