Ruby wishlist

2008/6/8 jzakiya [email protected]:

On Jun 8, 5:05 am, Robert K. [email protected] wrote:

On 08.06.2008 06:00, jzakiya wrote:

n1, n2, n3, n4 += 5

ns.map! {|n| n + 5}

The names of the variables are not array values, they
are just different variable names, they could be any
names.

The names are irrelevant: the mere fact that you want to treat them
uniformly indicates that it is a bad idea to have them as separate
local variables and not in some type of collection.

Remember, I would LIKE ruby to be able to do this.
It is my “whishlist”. I know Ruby doesn’t do it now,
but I would like it to be able to in the future. OK! :slight_smile:

The question is whether it is reasonable to build this into the
language. It does not make sense to put something into the language
to support a) an esoteric case or b) sub optimal design.

Kind regards

robert

Thanks, David. I will be sure to meet up tomorrow night, I have 2 1/2
hours
to submit many assignments, XD. Anyways, thanks for your time, I look
forward to trying this out over the summer. :slight_smile:


From: “David K.” [email protected]
Sent: Monday, June 09, 2008 2:29 PM
To: “ruby-talk ML” [email protected]
Subject: Re: GUI library/framework?

On Jun 8, 2008, at 3:08 PM, Charles Oliver N. wrote:

structure for the program’s directory, say it’s in a folder called
Ecko (doh). It would look like this, if you outlined it.

Yeah, that’s the goal behind David K.'s stuff in Monkeybars and
Rawr. I’m pretty sure you can provide your own structure, but he’d
probably know better. David, you out there?

Alternatively, try #monkeybars on freenode during the week.

  • Charlie

Rawr will let you package everything up into a single jar that you can
double click on to launch your app. Inside your program you’ll want
to use the get_resource method Rawr provides to find your files inside
your jar (it works outside as well). The nice thing about that is if
you decide to later split out some data portion of your app into its
own jar (which rawr can generate for you as well) you don’t have to
change anything. The Java resource lookup system is pretty good, so
as long as the data jar file is loaded on your classpath (which rawr
takes care of for you) it “just works”. We can answer more specific
questions over on #monkeybars on Freenode.

David K.