[#2320] Problems in mathn, rational, complex, matrix — Gavin Sinclair <gsinclair@...>
I received a message from Richard Graham mentioning a problem in the
[#2346] Patch for socket.c: control reverse lookup for every instance — Thomas Uehlinger <uehli@...>
Hi all
[#2357] Use the BasicSocket#do_not_reverse_lookup flag in Webrick — Thomas Uehlinger <uehli@...>
Hi
[#2367] Standard libraries — Dave Thomas <dave@...>
From ruby-dev summary:
Hi,
Hi,
By the way, this issue is about a matter of taste, so the debate is somewhat
Hi,
On Thu, Feb 12, 2004 at 02:58:22PM +0900, NAKAMURA, Hiroshi wrote:
On Thursday, February 12, 2004, 8:18:32 PM, Mauricio wrote:
On Thursday 12 February 2004 04:37, Gavin Sinclair wrote:
On Friday, February 13, 2004, 12:44:15 AM, Sean wrote:
(Dave Thomas: there's a question for you in the second paragraph; if you're
[#2397] PATCH: deprecate cgi-lib, getopts, importenv, parsearg from standard library — Gavin Sinclair <gsinclair@...>
Index: cgi-lib.rb
* Gavin Sinclair (gsinclair@soyabean.com.au) wrote:
On Thursday, February 12, 2004, 11:39:37 PM, E wrote:
Hi,
Hi,
[#2422] Re: [ruby-cvs] ruby: * lib/ftools.rb: documented — "U.Nakamura" <usa@...>
Hello,
[#2449] make install not getting through rdoc phase — "David A. Black" <dblack@...>
Hi --
[#2465] PATCH: OpenStruct#initialize to yield self — Gavin Sinclair <gsinclair@...>
This is a common approach I use to object initialization; I don't know
On Fri, 20 Feb 2004 02:42:00 +0900, Dave Thomas wrote:
> > As more general suggestion. Could 'new' yield the new object is a block
On Fri, 20 Feb 2004 08:24:31 +0900, Carlos wrote:
Hi,
Yukihiro Matsumoto wrote:
On Feb 20, 2004, at 4:33 PM, Joel VanderWerf wrote:
[#2494] rehash segfault — Nathaniel Talbott <nathaniel@...>
I don't have a lot of information on this bug at this point, but
Hi,
On Wed, Feb 25, 2004 at 03:30:54AM +0900, Yukihiro Matsumoto wrote:
[#2504] foldl and foldr — "Sean E. Russell" <ser@...>
Sorry if I'm opening old wounds; I have a hard time believing that nobody has
Re: Standard libraries
On Thursday 12 February 2004 11:54, Dave Thomas wrote: > Quite often though you can get away with some common sense parameter > naming. ... > def each_person > . . . > yield name, address_book_entry > . . . > end I agree: rdoc is great about extracting this sort of information for users. Type is not identified here, though. Is "name" a Name object, or a String? What is the return value for each_person? You may think that "address_book_entry" may be self-explainatory as far as type, but in some cases it isn't this clear: # XML: class Element ... def attribute[]( name ) ... def element[]( foo ) ... end attribute returns... a string value? Or an Attribute? I could have named it attribute_value[], but then we're starting to add significantly to the method names. And what is the foo argument for elements()? Well, maybe it has three legal types: a String representation of an XPath, an XPath object, or an integer, which is the child index. I can't think of a good name for "foo" that makes it obvious what the type is. I'm not being difficult -- this isn't uncommon; in Java, we'd be overloading the methods, but in Ruby you have to rely on the documentation for type constraints. Most of what I'm talking about has to do with type, and this is specifically because of the loose typing of Ruby. I'm not complaining about loose typing, mind you, but I do think that if a language is loosely typed, it pays to be careful about documenting what types are legal. > I was concerned about the security issues of this, and to be frank > right now I don't have the time to dig deeper in to it. If someone > wants to come up with a proposal, and eventually some code, I'm game... Hm. Ok. I'll look into it. I'm not too concerned about security issues. I'd say that it would either be a separate tool or an optional argument. In any case, it'd be of more use to developers than users, and if you're installing and running somebody else's software, malicious code in the documentation is hardly more dangerous than malicious code in the sourcefiles. I believe it is the domain of RDoc because it'd be nice if RDoc was able to do something interesting with the code -- use it in the documentation as an example, for instance. That, and since RDoc is parsing the documentation anyway... But it could easily be a separate tool. > FWIW, I think we need to resist the temptation to add too much > documentation to the files. I agree with Gavin: a section at the top > explaining intent and usage, and enough information on each public > method and class to get someone started. Many public methods get a > single line comment, some get a lot more. IMO, constraint documentation is important, but examples are even more important, and I still believe that having them merged with the API documentation that RDoc produces would be a big win. How this happens, well... we've had this conversation before, and I still don't have a good answer. There are two (as I see it) options: 1) Put the tests/examples directly in the documentation 2) Make RDoc URI aware, and provide relative URLs in the documentation to specific test cases, and then have RDoc inline code from the tests. (2) is more work, but solves the "inline bloat" issue. Example: MyProject/ tests/ MyTester.rb ... def test_blah ... source/ MyClass.rb ... # ... some rdoc documentation # %% ../tests/MyTester.rb#test_blah where "%%" is shorthand for "example URI:", and the "file:" protocol is implicit. RDoc would, in this case, inline the entire method in the documentation. It would be up to the developers to ensure that the method is small and clear enough to be useful as an example. Is what's in the Ruby CVS your current codebase? -- ### SER ### Deutsch|Esperanto|Francaise|Linux|XML|Java|Ruby|Aikido ### http://www.germane-software.com/~ser jabber.com:ser ICQ:83578737 ### GPG: http://www.germane-software.com/~ser/Security/ser_public.gpg