[#1215] Tk widget demo; English Tk docs?; Java 1.2 Swing — "Conrad Schneiker" <schneiker@...>
Hi,
[#1218] Trivial FAQ bug — Dave Thomas <Dave@...>
[#1229] A vote for old behavior — Dave Thomas <Dave@...>
[#1232] Any FAQ requests, updates, ... — Dave Thomas <Dave@...>
[#1233] Singleton classes — Dave Thomas <Dave@...>
[#1263] Draft of the updated Ruby FAQ — Dave Thomas <Dave@...>
[#1307] Ruby/GTK 0.23 released — Hiroshi IGARASHI <igarashi@...>
Hi all,
From: Hiroshi IGARASHI <igarashi@ueda.info.waseda.ac.jp>
From: "Conrad Schneiker" <schneiker@jump.net>
On Fri, Feb 18, 2000 at 09:37:27PM -0500, Yasushi Shoji wrote:
[#1322] FAQ: Ruby acronyms — "Conrad Schneiker" <schneiker@...>
In the spirit of TABWTDI (there are better ways to do it), I'd like to
[#1341] Vim syntax file — Mirko Nasato <mirko.nasato@...>
Hi,
On Mon, Feb 14, 2000 at 05:44:39PM +0100, Mirko Nasato wrote:
[#1354] Say hi (bis) — Pixel <pixel_@...>
hi all,
[#1355] nice sample for functional stuff — Pixel <pixel_@...>
what about having map in standard (and map_index too)?
[#1373] Ruby Language Reference Manual--Glossary — "Conrad Schneiker" <schneiker@...>
I was going to print the Ruby Language Reference Manual when I noticed that
[#1376] Re: Scripting versus programming — Andrew Hunt <andy@...>
Conrad writes:
[#1379] Re: Yield — Andrew Hunt <andy@...>
>From: "Conrad Schneiker" <schneiker@jump.net>
[#1384] Re: Say Hi — mengx@...
My suggestion was to try to find a more comfortable method name (to me, and
[#1392] Re: Some Questions - Parameterised Types / Invariants — Andrew Hunt <andy@...>
>1. Parameterised Types / Template Classes
[#1398] Bignum aset — Andrew Hunt <Andy@...>
[#1488] Discussion happens on news.groups — Clemens Hintze <c.hintze@...>
Hi,
[#1508] Ruby/GTK and the mainloop — Ian Main <imain@...>
Hello Ian,
On Wed, Feb 23, 2000 at 02:56:10AM -0500, Yasushi Shoji wrote:
[#1516] Ruby: PLEASE use comp.lang.misc for all Ruby programming/technical questions/discussions!!!! — "Conrad Schneiker" <schneiker@...>
((FYI: This was sent to the Ruby mail list.))
From: "Conrad Schneiker" <schneiker@jump.net>
[#1528] ruby <=> python — Quinn Dunkan <quinn@...>
Hello! I'm new to ruby-talk, and mostly new to ruby. I'm making a document
[#1551] Ruby thread scheduling buglet — Ian Main <imain@...>
[#1569] Re: Ruby: constructors, new and initialise — Yukihiro Matsumoto <matz@...>
The following message is a courtesy copy of an article
[#1591] Certain char's not recognized by "." in regex? — Wes Nakamura <wknaka@...>
[#1592] Race condition in Singleton — Dave Thomas <Dave@...>
[ruby-talk:01273] Re: Draft of the updated Ruby FAQ
Dave Thomas writes:
>
> Wow! Thanks for taking the time with such a detailed reply.
Thank you! For taking this responsible work of maintaining a FAQ.
>
> Clemens Hintze <clemens.hintze@alcatel.de> writes:
>
...
> > 1.4 What is the history of Ruby?
> > ... wanted a genuine object-oriented, easy-to-use object-oriented
> > scripting language.
> >
> > Perhaps delete one 'object-oriented'? If matz agrees, of course!
>
> I don't want to change a direct quote. To be honest, if I wanted to
> delete a word in the preceedind quote, it'd be 'scripting'--I think
> Ruby's far more general that that.
I think, if it is clarified with matz you should change/correct also
parts of direct quotes of him. And he seems to agree to change it as
he has answered in [ruby-talk:01270].
See ... my English is not the best as I am not a native speaker. If I
write something to e.g. you I will not very concentrate of my English
grammar, spellings and the like...
But then, if you quote me, I would like I had more concentrate on what
I have written, you know? But regardless of how much I concentrate the
result will never be perfect!
So correction e.g. quotations of mine, I would consider as first
correcting my English, and then let me say/write/send/post this
corrected version again. And this corrected version you would take
then. :-)))
But because I would do so, and you know I would do it this way, and I
know you know... we can spare this complex scenario. Simply correct my
English in what you would like to quote from me, show it to me and ask
permission, and then quote it... :-))) We are not writing scientific
material, nor do you quote scientific material that I have written!
;-)
Of course, I only speak for myself! But I dare to guess, that matz
point-of-view would not be too different from mine in that case, would
it matz?
> > 4.1 What does :var mean?
> > A colon followed ..., but the ``:'' form will create a local
> > variable if it doesn't already exist.
> >
> > I could not verify it! I have tried
>
> You're right. It creates the symbol, but not as a variable or method.
But then, is it important for the newbie/user to know, that a symbol
is created? What can I do with a symbol? Better not to mention it
here? Do not forget I am trying to write from a user's point-of-view.
>
> > 4.10 What's the difference between ``or'' and ``\\''?
...
> > I think you mean '&&' instead of &&, yes? I do not know right
> > now, but can I overload '||'? I do not think so.
>
> Just slightly over quoted ;-) Fixed
Additionally matz has stated, that '~' and '|' *can* be overloaded.
> > 5.7 What's the difference between private and protected?
> >
> > But the visibility thing is the same? That means protected is somewhat
> > superfluos, isn't it (from the newbie point-of-view)?
>
> No, because (for example)
>
> def <=>(other)
> func <=> other.func
> end
Ahh! :-O This I had not thought! Nice, really! :-)
>
> will work if 'func' is protected, but not if it's private. I've added
> an example.
But in this example you have not even mentioned the word 'protected' ;-)
> What can I say. 's' and 'd' _are_ next to each other on the keyboard.
:-))))
...
> > 7.21 Does Ruby have function pointers?
...
> But a variable pointing to a proc object is effectively a function
> pointer (or at least is used in the same way function pointers
> are). I've changed the wording a tad.
The new description is much better :-)
>
> > o thread does not cause thrashing.
> >
> > What does that mean in opposition to processes spawned with 'fork'?
>
> Just that fork may cause thrashing.
:-/ That was not very helpful to me. But matz has already explained
it to me, what thrashing mean here! :-)
...
So this were the answers to your remarks! No I will add remarks to the
corrected FAQ!
2.2 What is the scope of a local variable?
A block (``{'' ... ``}'' or do ... end) introduces creates a new
scope, ...
First, please delete 'create' or 'introduce'. Second, I would
reformulate it so that it mention all scope creators in the first
sentence (blocks also). Then I would like to have an example for every
creator. I, for example, cannot imagine what you mean by saying
'(main)'? I know, however, what you mean with 'toplevel' ;-)
The last sentence beginning with 'while, until, and ...' could also be
attached above the examples. So seeing the examples, I would have
already read the whole description. I do not like, that a description
is spread thru many sections. Only if it is a complex one, that would
be appropiate, IMHO.
3.3 How is a block used in an iterator?
You have mentioned here three ways! But if I see this 'Proc.new.call'
thingy I feel you should also mention the 'proc' and 'lambda'
constructs. Then we have five ways and more examples ;-)
(3b) def myIterator(b=Proc.new)
b.call(2,3)
end
(4a) def myIterator(b=proc)
b.call(2,3)
end
(4b) def myIterator
proc.call(2,3)
end
(5a) def myIterator(b=lambda)
b.call(2,3)
end
(5b) def myIterator
lambda.call(2,3)
end
Although you mention 'proc' and 'lambda' in the last example, I feel
they deserve own examples. A further hint you could give, would be:
attached blocks are not consumed! I was struggle about that in my
beginning. Only because of that fact, your last example is possible!
...
6.6 What is a singleton class?
Has all this about 'anonymous classes' to be mentioned here? I feel
your second example should be called something like 'object
extension'. That there are used 'anonymous classes' used to do that,
is regardless for the user/newbie. He even cannot find it simply out,
as 'anchestors' would not show this 'anonymous class'.
HTH!
Much fun,
\cle.