Ruby-dev summary: 22688-22826


(Masayoshi TAKAHASHI) #1

Hello all,

This is a summry of ruby-dev ML in these days.

[ruby-dev:22688] output directory for extensions

Nobu Nakada pointed out that some applications and libraries,
such as bin/rdoc and test/runner.rb, need external library
and they can not be executed before install.
So Nobu made a patch to make temporary directories
which has the same hierarchy as one after install.

[ruby-dev:22691] new standard library in the next release

Shinya Kawaji asked a plan of new standard library for the next
release(1.8.2 or 1.9.0).

Matz mentioned three points to decide to add as standard with:

  • need
  • maturity
  • maintainer

and we should review the candidates enough.

Kawaji recommended rss library made by Kouhei Sutou, and
Sutou agreed to be a mainteiner.

Kawaji also recommended ruby-dbi and o_dbm, and Keiju Ishitsuka,
the author of o_dbm, agreed to be a mainteiner, but he was afraid
of lack of documents in English.

Masahiro Tomita proposed to add Ruby/MySQL, MySQL client library
written in Ruby, in the standard distribution with ruby-dbi.

[ruby-dev:22763] $: trick in test/*
[ruby-dev:22788] relative load/require (Re: Re: $: trick in test/*)

NaHi pointed out that some test cases in src/ruby/test/*
changed the value of $: and load files in current directories.
But he didn’t think it smart because the value of $: were
shared with all test cases, so he proposed to delete
this $: trick.

But Tanaka Akira had a different opinion. He suggests
to solve this problem generally; to add a new method
to load with relative path.
Matz disagree to make the require method load libraries
with relative path, but he allowed other method to do it.
Some details are not determined yet:

  • name
  • handling of symbolic link

In addition, Tanaka made an advice to record the full path
in $:. Matz agreed and promised to implement it when
he has a time to do.

[ruby-dev:22790] avoid duplicate load/require in Win32

In relation to the previous topic, take_tk made a request to ignore
cases of library path in the file system which didn’t distinguish
cases. But Matz felt he should take case of case of path when
he uses case-insensitive platform, and rejected the request.

[ruby-dev:22802] [Oniguruma] Version 2.1.0

Kosako announced that Oniguruma 2.1.0 is released.

Changes:

  1. change prefix of API (REG_ --> ONIG_, regex_ --> onig_)
  2. fix some bugs
  3. add to support character set
    EUC-TW, EUC-KR, EUC-CN, KOI8, KOI8-R,
    ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5,
    ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-11

Regards,

TAKAHASHI ‘Maki’ Masayoshi E-mail: maki@rubycolor.org


(Paul Brannan) #2

But Tanaka Akira had a different opinion. He suggests
to solve this problem generally; to add a new method
to load with relative path.
Matz disagree to make the require method load libraries
with relative path, but he allowed other method to do it.
Some details are not determined yet:

  • name
  • handling of symbolic link

In addition, Tanaka made an advice to record the full path
in $:. Matz agreed and promised to implement it when
he has a time to do.

For the record, I really like both of these ideas; they would completely
eliminate the use I have for requirelocal/loadlocal in RubyTreasures.

[ruby-dev:22790] avoid duplicate load/require in Win32

In relation to the previous topic, take_tk made a request to ignore
cases of library path in the file system which didn’t distinguish
cases. But Matz felt he should take case of case of path when
he uses case-insensitive platform, and rejected the request.

What is “case of case of path”?

It seems to me the right way to handle this problem is to use a
case-sensitive require (if the case of the require doesn’t match the
case of the file being required, then raise an exception). The reason
is that code that assumes case doesn’t matter will break when it is
ported to a system where case does matter.

Paul

···

On Thu, Feb 12, 2004 at 03:45:47AM +0900, Masayoshi Takahashi wrote:


(NAKAMURA, Hiroshi) #3

Hi,

From: “Masayoshi Takahashi” maki@rubycolor.org
Sent: Thursday, February 12, 2004 3:45 AM

This is a summry of ruby-dev ML in these days.

My thanks go as well to ruby-dev summary team.

[ruby-dev:22763] $: trick in test/*
[ruby-dev:22788] relative load/require (Re: Re: $: trick in test/*)

NaHi pointed out that some test cases in src/ruby/test/*
changed the value of $: and load files in current directories.
But he didn’t think it smart because the value of $: were
shared with all test cases, so he proposed to delete
this $: trick.

Note: all tricks are removed from testcases. Run test through
test/runner.rb even if you run a test separately. test/runner.rb do
the trick instead. e.g.
$ ruby test/runner.rb test/soap/helloworld/test_helloworld.rb

Regards,
// NaHi


(Lyle Johnson) #4

Masayoshi Takahashi wrote:

Kawaji recommended rss library made by Kouhei Sutou, and
Sutou agreed to be a mainteiner.

Is it this one:

http://raa.ruby-lang.org/list.rhtml?name=rss

?


(Austin Ziegler) #5

No offense to Sutou intended, but I do not see a reason why an RSS library
should be included with Ruby by default. (And I’m not saying this as someone
who wrote a “competing” RSS library; I haven’t touched mine in over a year
and I don’t know that I expect to do so, either.)

I think it would be useful to have ruby-dbi, but my personal opinion is that
Ruby doesn’t need to be PHP, where everything comes “out of the box.”

Just my 2¥
-austin

···

On Thu, 12 Feb 2004 03:45:47 +0900, Masayoshi Takahashi wrote:

Hello all,

Matz mentioned three points to decide to add as standard with:

  • need
  • maturity
  • maintainer

and we should review the candidates enough.

Kawaji recommended rss library made by Kouhei Sutou, and Sutou agreed to
be a mainteiner.


austin ziegler * austin@halostatue.ca * Toronto, ON, Canada
software designer * pragmatic programmer * 2004.02.17
* 16.44.01


(Harpo) #6

I don’t know, but you should take care of this kind of things.

···

On Thu, 12 Feb 2004 05:25:50 +0900, Paul Brannan wrote:

But Matz felt he should take case of case of path when
he uses case-insensitive platform, and rejected the request.

What is “case of case of path”?


(Yukihiro Matsumoto) #7

Hi,

Matz disagree to make the require method load libraries
with relative path, but he allowed other method to do it.
Some details are not determined yet:

  • name
  • handling of symbolic link

In addition, Tanaka made an advice to record the full path
in $:. Matz agreed and promised to implement it when
he has a time to do.

For the record, I really like both of these ideas; they would completely
eliminate the use I have for requirelocal/loadlocal in RubyTreasures.

Any name suggestion?

[ruby-dev:22790] avoid duplicate load/require in Win32

In relation to the previous topic, take_tk made a request to ignore
cases of library path in the file system which didn’t distinguish
cases. But Matz felt he should take case of case of path when
he uses case-insensitive platform, and rejected the request.

What is “case of case of path”?

Read “Matz felt one should care about case of path even when he/she
uses case-insensitive platform”.

						matz.
···

In message “Re: ruby-dev summary: 22688-22826” on 04/02/12, Paul Brannan pbrannan@atdesk.com writes:


(Laurent Julliard) #8

I hope it is. This lib is really clean and easy to use, but I wonder
how stable/mature it is

···

il Thu, 12 Feb 2004 06:54:29 -0600, Lyle Johnson lyle@knology.net ha scritto::

Masayoshi Takahashi wrote:

Kawaji recommended rss library made by Kouhei Sutou, and
Sutou agreed to be a mainteiner.

Is it this one:

http://raa.ruby-lang.org/list.rhtml?name=rss

?


(Ara.T.Howard) #9
  • link

    as in ld. i say this because it would be used primarily with
    packages/libraires trying to ‘link’ to dependancies…

    the sematics of link would be

    • first try relative
    • then try $:

    a notion of version could be added if that could ever be agreed upon, eg

    link ‘foobar-1.0.0’

    mighit load foobar-2.1.1 if it were available (using libtool style
    versioning => interface.age.impl)

  • relative

    a keyword/method to transform a path into a relative one

    def this path
    require 'pathname’
    File.join(Pathname.new(File.dirname(File.expand_path(FILE))).realpath, path)
    end

    require relative ‘sub-package’

  • include

    effectively ‘require relative’

-a

···

On Thu, 12 Feb 2004, Yukihiro Matsumoto wrote:

Date: Thu, 12 Feb 2004 08:36:03 +0900
From: Yukihiro Matsumoto matz@ruby-lang.org
Newsgroups: comp.lang.ruby
Subject: Re: ruby-dev summary: 22688-22826

Hi,

In message “Re: ruby-dev summary: 22688-22826” > on 04/02/12, Paul Brannan pbrannan@atdesk.com writes:

Matz disagree to make the require method load libraries
with relative path, but he allowed other method to do it.
Some details are not determined yet:

  • name
  • handling of symbolic link

In addition, Tanaka made an advice to record the full path
in $:. Matz agreed and promised to implement it when
he has a time to do.

For the record, I really like both of these ideas; they would completely
eliminate the use I have for requirelocal/loadlocal in RubyTreasures.

Any name suggestion?

ATTN: please update your address books with address below!

===============================================================================

EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
PHONE :: 303.497.6469
ADDRESS :: E/GC2 325 Broadway, Boulder, CO 80305-3328
STP :: http://www.ngdc.noaa.gov/stp/
NGDC :: http://www.ngdc.noaa.gov/
NESDIS :: http://www.nesdis.noaa.gov/
NOAA :: http://www.noaa.gov/
US DOC :: http://www.commerce.gov/

The difference between art and science is that science is what we
understand well enough to explain to a computer.
Art is everything else.
– Donald Knuth, “Discover”

/bin/sh -c ‘for l in ruby perl;do $l -e “print “\x3a\x2d\x29\x0a””;done’
===============================================================================


(Sam Roberts) #10

Quoteing matz@ruby-lang.org, on Thu, Feb 12, 2004 at 08:36:03AM +0900:

Hi,

Matz disagree to make the require method load libraries
with relative path, but he allowed other method to do it.
Some details are not determined yet:

  • name
  • handling of symbolic link

In addition, Tanaka made an advice to record the full path
in $:. Matz agreed and promised to implement it when
he has a time to do.

For the record, I really like both of these ideas; they would completely
eliminate the use I have for requirelocal/loadlocal in RubyTreasures.

Any name suggestion?

Something really obvious, that describes what it does:

#require_relative()

Sam

···

In message “Re: ruby-dev summary: 22688-22826” > on 04/02/12, Paul Brannan pbrannan@atdesk.com writes:


(Paul Brannan) #11

Well obviously I’ve been using “requirelocal” to mean “require a file
with a path relative to the currently executing file”. I have a lot of
code that uses that method, but I’ve never liked the name.

I do like the “require relative” idea proposed in [ruby-talk:92655].

Whatever method name is used, IMO it should indicate that the operation
is similar in function to a require (so “import” and “include” are
out – though “include” is out for other reasons).

Paul

···

On Thu, Feb 12, 2004 at 08:36:03AM +0900, Yukihiro Matsumoto wrote:

For the record, I really like both of these ideas; they would completely
eliminate the use I have for requirelocal/loadlocal in RubyTreasures.

Any name suggestion?


(Masayoshi TAKAHASHI) #12

matz@ruby-lang.org (Yukihiro Matsumoto) wrote:

[ruby-dev:22790] avoid duplicate load/require in Win32

In relation to the previous topic, take_tk made a request to ignore
cases of library path in the file system which didn’t distinguish
cases. But Matz felt he should take case of case of path when
he uses case-insensitive platform, and rejected the request.

What is “case of case of path”?

Read “Matz felt one should care about case of path even when he/she
uses case-insensitive platform”.

Oops, sorry. I always thank for (a lot of) your patience.

···

Lyle Johnson lyle@knology.net wrote:

Masayoshi Takahashi wrote:

Kawaji recommended rss library made by Kouhei Sutou, and
Sutou agreed to be a mainteiner.

Is it this one:

http://raa.ruby-lang.org/list.rhtml?name=rss

?

Yes. He said he had a plan to improve it, but he wouldn’t
change the API ([ruby-dev:22726]).

Regards,

Masayoshi Takahashi (maki@rubycolor.org)


(Kouhei Sutou) #13

Hi,

In 1bdn20tgvgtsrp5mifoeg23lh5t8n5ha2n@4ax.com
"Re: ruby-dev summary: 22688-22826" on Fri, 13 Feb 2004 02:19:58 +0900,

···

gabriele renzi surrender_it@rc1.vip.ukl.yahoo.com wrote:

http://raa.ruby-lang.org/list.rhtml?name=rss

how stable/mature it is

I have used this with no problem recently and received no
bug report.


kou


(Tanaka Akira) #14

In article Pine.LNX.4.44.0402111759110.25224-100000@fattire.ngdc.noaa.gov,
“Ara.T.Howard” ahoward@fattire.ngdc.noaa.gov writes:

  • link

    as in ld. i say this because it would be used primarily with
    packages/libraires trying to ‘link’ to dependancies…

    the sematics of link would be

    • first try relative
    • then try $:

I can’t imagine a situation that needs relative path and $: in single
method because I know a file which pointed by the relative path is
exist or not when I write link ‘…’. If the file exists, $: is never
used. If not, ‘require’ can be used instead.

  • relative

    a keyword/method to transform a path into a relative one

The relative keyword needs language change. It’s too drastic to this issue.

I feel the relative method is too tricky.

  • include

It is already used as Module#include.

···


Tanaka Akira


(Laurent Julliard) #15

mh. just a question:
this feed:
http://www.scripting.com/rss.xml
is considered valid from feedvalidator.org, but I don’t know how to
parse it with rss/parser, would you please explain it to me?

···

il Fri, 13 Feb 2004 20:21:20 +0900, Kouhei Sutou kou@cozmixng.org ha scritto::

Hi,

In 1bdn20tgvgtsrp5mifoeg23lh5t8n5ha2n@4ax.com
"Re: ruby-dev summary: 22688-22826" on Fri, 13 Feb 2004 02:19:58 +0900,
gabriele renzi surrender_it@rc1.vip.ukl.yahoo.com wrote:

http://raa.ruby-lang.org/list.rhtml?name=rss

how stable/mature it is

I have used this with no problem recently and received no
bug report.


(Ara.T.Howard) #16

Date: Thu, 12 Feb 2004 13:50:54 +0900
From: Tanaka Akira akr@m17n.org
Newsgroups: comp.lang.ruby
Subject: Re: ruby-dev summary: 22688-22826

In article Pine.LNX.4.44.0402111759110.25224-100000@fattire.ngdc.noaa.gov,
“Ara.T.Howard” ahoward@fattire.ngdc.noaa.gov writes:

  • link

    as in ld. i say this because it would be used primarily with
    packages/libraires trying to ‘link’ to dependancies…

    the sematics of link would be

    • first try relative
    • then try $:

I can’t imagine a situation that needs relative path and $: in single method
because I know a file which pointed by the relative path is exist or not
when I write link ‘…’. If the file exists, $: is never used. If not,
‘require’ can be used instead.

the situation is the one where you include a module, say strinio or yaml, with
your distribution because it is not yet part of ruby. you would like,
however, for your ‘require’ line to pick up the system one if it is installed
locally - i’ve been here before…

  • relative

    a keyword/method to transform a path into a relative one

The relative keyword needs language change. It’s too drastic to this issue.

I feel the relative method is too tricky.

how so? wouldn’t a simple method to transform a path suffice?

~/eg/ruby > cat relative.rb
require ‘pathname’

module Kernel
def relative path
File.join(
Pathname.new(File.dirname(File.expand_path(FILE))).realpath.to_s,
path
)
end
end

p(relative(‘foo’))
p(relative(‘foo.rb’))
p(relative(‘foo/bar’))

#require relative ‘foo’

~/eg/ruby > ruby relative.rb
"/home/ahoward/eg/ruby/foo"
"/home/ahoward/eg/ruby/foo.rb"
"/home/ahoward/eg/ruby/foo/bar"

am i missing something?

  • include

It is already used as Module#include.

yes - meant to delete that before sending.

regards.

-a

···

On Thu, 12 Feb 2004, Tanaka Akira wrote:

ATTN: please update your address books with address below!

===============================================================================

EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
PHONE :: 303.497.6469
ADDRESS :: E/GC2 325 Broadway, Boulder, CO 80305-3328
STP :: http://www.ngdc.noaa.gov/stp/
NGDC :: http://www.ngdc.noaa.gov/
NESDIS :: http://www.nesdis.noaa.gov/
NOAA :: http://www.noaa.gov/
US DOC :: http://www.commerce.gov/

The difference between art and science is that science is what we
understand well enough to explain to a computer.
Art is everything else.
– Donald Knuth, “Discover”

/bin/sh -c ‘for l in ruby perl;do $l -e “print “\x3a\x2d\x29\x0a””;done’
===============================================================================


(Yukihiro Matsumoto) #17

Hi,

···

In message “Re: ruby-dev summary: 22688-22826” on 04/02/12, “Ara.T.Howard” ahoward@fattire.ngdc.noaa.gov writes:

  • relative

    a keyword/method to transform a path into a relative one

The relative keyword needs language change. It’s too drastic to this issue.

I feel the relative method is too tricky.

how so? wouldn’t a simple method to transform a path suffice?

The point is the word “relative” itself is not specifically related to
file path.

						matz.

(Ara.T.Howard) #18

at least it’s better than cousin or uncle! :wink:

i see your point… how about ‘Kernel.relpath’

module Kernel
def relpath path, origin = FILE
File.join(
Pathname.new(File.dirname(File.expand_path(origin))).realpath.to_s,
*(File.split(path))
)
end
end

tho perhaps that should belong in File instead of Kernel it nicer to see

require relpath ‘foo/bar’

than

require File.relpath ‘foo/bar’

maybe both…

-a

···

On Fri, 13 Feb 2004, Yukihiro Matsumoto wrote:

Date: Fri, 13 Feb 2004 01:07:25 +0900
From: Yukihiro Matsumoto matz@ruby-lang.org
Newsgroups: comp.lang.ruby
Subject: Re: ruby-dev summary: 22688-22826

Hi,

In message “Re: ruby-dev summary: 22688-22826” > on 04/02/12, “Ara.T.Howard” ahoward@fattire.ngdc.noaa.gov writes:

  • relative

    a keyword/method to transform a path into a relative one

The relative keyword needs language change. It’s too drastic to this issue.

I feel the relative method is too tricky.

how so? wouldn’t a simple method to transform a path suffice?

The point is the word “relative” itself is not specifically related to
file path.

  					matz.


(short sig)