[#927] UnboundMethod#to_proc — Dave Thomas <dave@...>
I'm wondering what I can do with a Proc generated by
17 messages
2003/04/06
[#929] Re: UnboundMethod#to_proc
— "Chris Pine" <nemo@...>
2003/04/06
----- Original Message -----
[#934] Re: UnboundMethod#to_proc
— Mathieu Bouchard <matju@...>
2003/04/06
[#940] Re: UnboundMethod#to_proc
— chr_news@...
2003/04/07
>
[#941] Re: UnboundMethod#to_proc
— Dave Thomas <dave@...>
2003/04/07
>> If they have diverging interfaces such that the contracts conflict
[#936] docs on implementation of ruby and/or ruby-gc ? — Ruben Vandeginste <Ruben.Vandeginste@...>
4 messages
2003/04/07
[#964] Range in logical context — Dave Thomas <dave@...>
If I run
7 messages
2003/04/16
[#965] Re: Range in logical context
— Mauricio Fern疣dez <batsman.geo@...>
2003/04/16
On Thu, Apr 17, 2003 at 06:10:40AM +0900, Dave Thomas wrote:
[#973] problem with rb_rescue2() ? — Mathieu Bouchard <matju@...>
5 messages
2003/04/19
Re: IPaddr design
From:
Hajimu UMEMOTO <ume@...>
Date:
2003-04-24 18:43:11 UTC
List:
ruby-core #990
Hi,
Since I was not on the list, knu-san notified me of your mail. So,
I've just subscribed the list.
>>>>> On Thu, 24 Apr 2003 19:34:14 +0200
>>>>> "Stephane D'Alu" <Stephane.DAlu@nic.fr> said:
Stephane> - having sub classes IPv4, IPv6 (and IPv6::Compatible) instead
Stephane> of one class doing it all (fall better in the object oriented design)
When I made ipaddr, I thought whether IPv4 and IPv6 should be
implemented as separate class or not. If IPv4 and IPv6 are separate
classes, a user of the classes has to care which address family is
using. I prefer address family independent programing which means we
don't care address family as possible. So, I decide to implement it
as one class.
Stephane> - when creating an address from a string, being able to select
Stephane> how the string should be interpreted (ipv4 or ipv4 mapped)
Stephane> (OrderStrict, OrderCompatibility, OrderIPv6Only, OrderIPv4Only)
Stephane> This will give finer control on the type of addresses that
Stephane> should be created (and could allow to easily swap to IPv6 only
Stephane> or remover IPv4 mapped addresses (there are already some talk about it))
It's a good idea. Someone may want to traet an address strictly.
Stephane> - keeping some regular expression to test if a string match an ip address
Stephane> (IPv6StrictRegex, IPv6Regex, IPv6LooseRegex, ...)
How do you use these regular expressions? I think it can be tested by
whether a string can be converted to an address or not.
Stephane> - having some commonly used constant defined (Loopback)
It's good idea having constant. However, once we decide to have some
constants, we need more constants than only Loopback. This is why I
didn't add constants, yet.
Stephane> - the method name 'reverse' for ipaddr seems confusing when compared
Stephane> to class string or array
Yup, I think so. Do you have any idea about the name?
Stephane> - scope_id or prefixlen are not directly part of an ip address
Stephane> and so should not be included in the class, if someone want/need
Stephane> them a new class should be created, this could be in the
Stephane> case of scope_id a class called SockAddr.
I implemented ipaddr as you say at the begining. But, it was somewhat
diffuse. So, I merged these into one class.
Stephane> - the | or & operator has some usefullness when dealing with netmask,
Stephane> but netmask and IPv4 classes (A, B, C, ..) have been depretiated in
Stephane> favor of prefixlen. now for the operators '<<' '>>' and '~', I should
Stephane> say that I have difficulties to find a real use for them.
It is useful when getting some part of the address or makeing IP
address. Especially, IPv6 address is structured.
Sincerly,
--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
ume@mahoroba.org ume@bisd.hitachi.co.jp ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/