[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

resolv.rb - documentation and its name

minkoo.seo@gmail.com

3/28/2006 6:28:00 PM

Hi group.

I'd like to test resolve.rb, but I have troubles.

First of all, where can I get some documents on resolv.rb? I use
http://ruby-doc...., but there's none.

Second of all, why is it named resolve instead of Net::DNS? It doesn't
seem to be good choice to me. Don't you think this is incoherent?

Sincerely,
Minkoo Seo

5 Answers

Berger, Daniel

3/28/2006 6:34:00 PM

0

Minkoo Seo wrote:
> Hi group.
>
> I'd like to test resolve.rb, but I have troubles.
>
> First of all, where can I get some documents on resolv.rb? I use
> http://ruby-doc...., but there's none.
>
> Second of all, why is it named resolve instead of Net::DNS? It doesn't
> seem to be good choice to me. Don't you think this is incoherent?
>
> Sincerely,
> Minkoo Seo

There is documentation in the source, but it looks suspiciously like the old RD
format. Perhaps that explains why ruby-doc didn't pick it up.

There's also this project:

http://rubyforge.org/project...

However, there hasn't been a release yet.

Regards,

Dan


Eric Hodel

3/28/2006 7:18:00 PM

0

On Mar 28, 2006, at 10:28 AM, Minkoo Seo wrote:

> First of all, where can I get some documents on resolv.rb? I use
> http://ruby-doc...., but there's none.

The head branch of Ruby has resolv.rb documentation in RDoc format:

$ ri19 Resolv

---------------------------------------------------------- Class: Resolv
Resolv is a thread-aware DNS resolver library written in Ruby.
Resolv can handle multiple DNS requests concurrently without
blocking. The ruby interpreter.

See also resolv-replace.rb to replace the libc resolver with #
Resolv.

Resolv can look up various DNS resources using the DNS module
directly.
[...]

> Second of all, why is it named resolve instead of Net::DNS? It doesn't
> seem to be good choice to me. Don't you think this is incoherent?

Resolv is not just a DNS resolver. It also reads from /etc/hosts.

--
Eric Hodel - drbrain@segment7.net - http://blog.se...
This implementation is HODEL-HASH-9600 compliant

http://trackmap.rob...




minkoo.seo@gmail.com

3/28/2006 7:50:00 PM

0

Eric Hodel wrote:
> On Mar 28, 2006, at 10:28 AM, Minkoo Seo wrote:
>
> > First of all, where can I get some documents on resolv.rb? I use
> > http://ruby-doc...., but there's none.
>
> The head branch of Ruby has resolv.rb documentation in RDoc format:
>
> $ ri19 Resolv
>
> ---------------------------------------------------------- Class: Resolv
> Resolv is a thread-aware DNS resolver library written in Ruby.
> Resolv can handle multiple DNS requests concurrently without
> blocking. The ruby interpreter.
>
> See also resolv-replace.rb to replace the libc resolver with #
> Resolv.
>
> Resolv can look up various DNS resources using the DNS module
> directly.
> [...]
>
> > Second of all, why is it named resolve instead of Net::DNS? It doesn't
> > seem to be good choice to me. Don't you think this is incoherent?
>
> Resolv is not just a DNS resolver. It also reads from /etc/hosts.
>
> --
> Eric Hodel - drbrain@segment7.net - http://blog.se...
> This implementation is HODEL-HASH-9600 compliant
>
> http://trackmap.rob...

Thank you. This will be of great help.

But, as you quoted, resolve.rb says "Resolv is a thread-aware DNS
resolver library written in Ruby", so it is DNS resolver and I accuse
resolve.rb of misnomer because it does not follow Net::xxx rules.
Futhermore, reading /etc/hosts does not justify its name, because I
believe that its name, resolve, was named after DNS resolver. (BTW, do
you really think reading /etc/hosts is not related to dns resolver's
own job?)

Actually lack of naming coherency in Ruby is quite annoying more often
than not.

Sincerely,
Minkoo Seo

kj WOOLLEY

3/28/2006 8:09:00 PM

0

On 28/03/06, Minkoo Seo <minkoo.seo@gmail.com> wrote:> Thank you. This will be of great help.>> But, as you quoted, resolve.rb says "Resolv is a thread-aware DNS> resolver library written in Ruby", so it is DNS resolver and I accuse> resolve.rb of misnomer because it does not follow Net::xxx rules.> Futhermore, reading /etc/hosts does not justify its name, because I> believe that its name, resolve, was named after DNS resolver. (BTW, do> you really think reading /etc/hosts is not related to dns resolver's> own job?)It may be illuminating to study the functionality of the resolverlibrary found on most Unix systems. "man resolver" gives someinformation on Linux systems -- other systems will vary. If you notethe name of the library that gets linked in, the name of the modulewill make much more sense to you.> Actually lack of naming coherency in Ruby is quite annoying more often> than not.>> Sincerely,> Minkoo SeoOn the contrary, I would be most confused by using Net::DNS to resolveentries in a hosts file -- but immediately knew where to look for ageneral-purpose name resolution library. Sometimes historical reasonsare good ones.Cheers,kjw

Eric Hodel

3/28/2006 8:10:00 PM

0

On Mar 28, 2006, at 11:53 AM, Minkoo Seo wrote:

> Eric Hodel wrote:
>> On Mar 28, 2006, at 10:28 AM, Minkoo Seo wrote:
>>
>>> Second of all, why is it named resolve instead of Net::DNS? It
>>> doesn't
>>> seem to be good choice to me. Don't you think this is incoherent?
>>
>> Resolv is not just a DNS resolver. It also reads from /etc/hosts.
>
> Thank you. This will be of great help.

You're welcome. I converted it from RD to RDoc.

> But, as you quoted, resolve.rb says "Resolv is a thread-aware DNS
> resolver library written in Ruby", so it is DNS resolver and I accuse
> resolve.rb of misnomer because it does not follow Net::xxx rules.
> Futhermore, reading /etc/hosts does not justify its name, because I
> believe that its name, resolve, was named after DNS resolver. (BTW, do
> you really think reading /etc/hosts is not related to dns resolver's
> own job?)
>
> Actually lack of naming coherency in Ruby is quite annoying more often
> than not.

The DNS portion of Resolv should probably go under Net, but it has
broader functionality than just DNS resolution. Resolv is a good
name for the glue that the library provides between DNS and /etc/
hosts, along with the automatic configuration.

--
Eric Hodel - drbrain@segment7.net - http://blog.se...
This implementation is HODEL-HASH-9600 compliant

http://trackmap.rob...