62321-63584

62134-62900 subjects 62389-62860

Definition: iterator
62321 [dcarrera@ma ] I sort of know what an iterator is, but not well enough to explain it.
62322 [bruce@co ed ] <programming> An object or routine for accessing items
62325 [dcarrera@ma ] So,
+ 62326 [bruce@co ed ] Yes, an iterator can be a method that functions thus.
| 62328 [hal9000@hy e] What is an iterator? Hmmm.
| + 62330 [bruce@co ed ] Just because it uses a block doesn't make it an iterator; a block is used in
| | 62331 [dblack@ca dl] I think this is why Hal said that the usage in Ruby is not necessarily
| + 62332 [martindemell] I'd distinguish iterators from the general case of yield-calling
| | 62334 [hal9000@hy e] Yes, in a sense I agree.
| | 62336 [martindemell] Hm - something involving the phrase 'coroutines', perhaps. What's the
| | 62526 [bulatz@in eg] technically speaking, it's a higher-order function, or functional
| | 62543 [pbrannan@at ] I don't understand what you mean.  I believe that functions that take blocks
| | 62544 [simon@si on ] That would be true if you could essentially "yield" back to the calling
| | 62546 [bulatz@in eg] ... and can't reexecute block from start. the above 2 criteries
| + 62430 [gsinclair@so] I certainly complain about it, but limit my complaints to muttering
|   62525 [bulatz@in eg] ... but full-featured cotoutines can do YIELD on both sides
+ 62333 [pbrannan@at ] That would be true for normal Ruby iterators, but not all iterators.
  62527 [bulatz@in eg] technically speaking, iterator is a way to access elements of collection

THX
62323 [jonnypichler] thx for your prompt replies

Enumerable hacks
62335 [martindemell] Generalising the two methods in
62338 [vjoel@PA H. ] def #{meth}_with_index(*args)

portably turning off the cursor
62337 [ian@ca ib n.] Is there a way to portably disable the cursor in Ruby?
62339 [ysantoso@je ] afaik, not in any language since this is runtime-environment related.
+ 62341 [ian@ca ib n.] Yes, but I can't even find a way of doing it using Ruby curses.
+ 62353 [phasis@no nu] In win32

mod_ruby: what's persistent and what's shared?
62340 [transami@tr ] i'm tired of being confused about this and i'm hoping someone can clear this
+ 62343 [drbrain@se m] y=20
+ 62346 [paul@sn ke n] It depends?
| 62375 [transami@tr ] thanks you very much. i understand now. since i did not know for sure i have
| 62408 [kentda@st d.] <plug>
| + 62413 [julian@be a4] Ugh, try writing IOWA *in* PHP (with a few Seaside-isms thrown in),
| + 62449 [drbrain@se m] The other option is to have a simple mod_ruby handler and passing
+ 62403 [billk@ct .c ] Sadly, from what I understand so far, it's the "worst of both
  62414 [roberto@RE O] [courtesy cc of this posting sent to cited author via email]
  62487 [billk@ct .c ] My guess is that this would be problematic.  Forked children
  62494 [ahoward@fs .] that approach also makes me queasy... why not simple make a little drb
  + 62505 [drbrain@se m] he
  | 62509 [ahoward@fs .] tell me more!  i will be needing that capability soon.  perhaps i could
  + 62515 [transami@tr ] would one say DRb is production strength? this approach intrigues me as well.
  | + 62516 [ahoward@fs .] i sure hope so, otherwise my 'production' is doomed! ;-)  seriouly though, i
  | | 62649 [transami@tr ] by the way, this queasy solution works fairly well as long as you have a
  | | 62674 [ahoward@fs .] have you had any issues sharing one connection between many processes?  i mean
  | | + 62685 [transami@tr ] i get around this by storing the connections in a hash based on connection
  | | + 62792 [roberto@RE O] My class implement per-database pools so this can't happen. It also
  | + 62611 [drbrain@se m] the
  + 62790 [roberto@RE O] Because my Ruby skills are not up to that level... :)

Can we attack the 'not enough libraries' thing straight on?
62344 [dblack@ca dl] We've all heard this: "Ruby is great, but it doesn't have the
+ 62348 [joey@jo yg b] I've been using Ruby since 2000 (I think) and I considered abandoning it
| + 62354 [hal9000@hy e] True, but a meta-issue.
| | 62359 [dblack@ca dl] And Haskell's, and whatever.  Yes, I was asking a non-meta question --
| + 62355 [dave@pr gm t] I was sitting across the table from Bruce last week (while Andy was
| + 62361 [ahoward@fs .] a very good point.  just today i had to write a perl script and was
|   + 62366 [tim@ba es id] Debian GNU/Linux gets this just right, IMHO. They have a policy that packages
|   | + 62424 [christl@ba d] I would like to contribute a few thoughts on the topic. When installing
|   | + 62590 [bard@pr sm l] rpkg was meant to be just that and went as far as handlig dependencies
|   + 62368 [dblack@ca dl] The standard library is a different matter -- at least, that term is
|   | 62396 [ahoward@fs .] look at boost and you'll understand what i meant : the idea is that _very
|   + 62426 [gsinclair@so] Good ideas.  It's great to have a repository that anybody can
|     + 62433 [djberge@qw s] A few of us here in Denver are working on this issue.  See
|     + 62583 [drbrain@se m] =20
+ 62349 [simon@si on ] David, I respect you and I agree with you; but on this point I have to
| + 62357 [hal9000@hy e] Pardon me while I play David's Advocate. :)
| + 62358 [dblack@ca dl] Would it surprise you to learn that I rather knew I'd hear from you in
| | + 62362 [dcarrera@ma ] I don't know what Simon thinks, but I really do think that exactly.  It
| | | 62369 [simon@si on ] Right. I believe there are decent Ruby modules for handling MIME mails;
| | | 62373 [dblack@ca dl] Any package that doesn't turn up on an RAA search for "mime" doesn't
| | | + 62381 [transami@tr ] want to here a crazy idea?
| | | | + 62385 [waisun.chia@] Any security guy/gal will freak out here!
| | | | + 62399 [ahoward@fs .] ever use the cpan module?
| | | | + 62419 [nahi@ke na t] I find a joy to hear this kind of "crazy" idea that seems
| | | | + 62545 [warren@fr ed] dear devels
| | | |   62549 [gsinclair@so] This would be nice.  In the volunteer, every man do his bit, world of
| | | |   + 62550 [simon@si on ] That's odd; I wonder how it's possible that it works in the volunteer,
| | | |   | + 62551 [gsinclair@so] Fair point, but it's a matter of where the community's at.  I'm sure
| | | |   | | 62552 [roger.sperbe] rubyarchive.org
| | | |   | | 62864 [mike@os n. r] DNS problems.
| | | |   | + 62553 [gsinclair@so] Sorry, another reply.
| | | |   |   62555 [simon@si on ] Nope. People who are given CPAN access (anyone who asks for it,
| | | |   + 62565 [dcarrera@ma ] Gavin,
| | | |     + 62568 [djberge@qw s] I'm not sure what you mean here.  Are you referring to stuff in the 'etc'
| | | |     | 62573 [daniel@ze ed] Yes, I guess so. I can't find any documentation on it, but I know it is
| | | |     | 62574 [daniel@ze ed] Well, for those who know the 'C' equivelants, I suppose no documentation
| | | |     | 62577 [vjoel@PA H. ] BTW...
| | | |     | 62579 [djberge@qw s] require "resolv" - part of the standard distro (under 'lib').  In fact,
| | | |     | 62592 [daniel@ze ed] Well, see, there you go. Everything I've ever needed in a Perl module is
| | | |     + 62585 [gsinclair@so] Well, it's just that it takes a lot of non-core effort for
| | | |       62623 [warren@fr ed] i dont mind helping u dudes to sort it out
| | | |       62634 [gsinclair@so] Well, the first and difficult step is to create a plain text file that
| | | + 62607 [davegaramond] 1) what if i have installed, say, 150 packages from RAA. i forgot which
| | |   62625 [dblack@ca dl] I was talking specifically about searching on RAA, which I thought was
| | |   62639 [davegaramond] well, in the CPAN world, a/b indicates category. no single person
| | |   62643 [dblack@ca dl] I certainly do -- I even started a thread trying to encourage it :-)
| | + 62379 [transami@tr ] not to get on the name issue, but the easy solution is to have a very-brief
| | | 62386 [waisun.chia@] I agree exactly.
| | + 62645 [mikkelfj-ant] We have seen this with Test::Unit which as I understand is a merger of two
| |   62648 [ahoward@fs .] i think all branches in the naming tree should be 'well accepted' (perhaps
| |   62658 [mwilson13@co] The following is my initial, and not yet complete, proposal on
| |   62696 [spoon@de la ] Um, why is Jabber in WWW?
| |   62699 [mwilson13@co] CPAN puts Jabber stuff under WWW.  But if that's silly, it shouldn't be
| |   + 62702 [piers@om a. ] Well - Jabber is out with the IETF, in an attempt to get it to become a
| |   + 62705 [spoon@de la ] Ah. I think it's because Net::Jabber can operate via http. Or something.
| |     62725 [dave@pr gm t] I think there's a hint here. The real world isn't hierarchical. Why are
| |     + 62729 [transami@tr ] Dave makes a very good point. and it was mentioned before that having multiple
| |     | 62735 [ahoward@fs .] if you mean something like
| |     + 62731 [michael_s_ca] Careful there...  You want the archive to be USABLE, regardless of how
| |     | 62738 [dave@pr gm t] One word:  Google.
| |     | + 62748 [rich@in oe h] Thank you Dave, I was going to bring this up as well.  Google indexes
| |     | + 62750 [dcarrera@ma ] I certainly think that RAA should have a search feature.
| |     |   62808 [nahi@ke na t] There are many articles overnight...
| |     |   + 62814 [gsinclair@so] Good to know.
| |     |   | + 62920 [transami@tr ] and it's not a wooden nickel either! :) nicely put.
| |     |   | + 63046 [nahi@ke na t] Sure.  Our test drive are running here.
| |     |   |   63059 [gsinclair@so] Yes, the categories would be keywords (that doesn't stop them from
| |     |   |   63078 [mwilson13@co] After this discussion, I now better understand the reasons why the RAA
| |     |   |   63097 [ahoward@fs .] i agree with you here.  however, i think that the _users_ should rank the
| |     |   |   63152 [gsinclair@so] Good thinking, but it's important not to get ahead of ourselves.  If
| |     |   |   63158 [hal9000@hy e] I agree... first things first.
| |     |   |   63160 [gsinclair@so] Yes.  I expect all "official" keywords will be checkboxed, and a free
| |     |   + 62840 [mwilson13@co] Leaving aside broader changes, the following could be implemented
| |     |   | 63047 [nahi@ke na t] Definitely.
| |     |   | 63056 [gsinclair@so] There can be no reasonable objection to unifying these categories.
| |     |   + 62854 [chad@ch df w] Nahi, when do you plan to implement this?  I think this would go a really
| |     |   | 63048 [nahi@ke na t] We just installed tcpwrap and WEBrick and setup a prototype
| |     |   | + 63055 [gsinclair@so] Hmmmm... I'm a bit confused about this feature.  When you introduced
| |     |   | | 63058 [nahi@ke na t] Ahh.  I should not write about vaporware.
| |     |   | + 63067 [chad@ch df w] Great, Nahi.  Thanks!  This will be excellent.
| |     |   + 62857 [dcarrera@ma ] No.  This sentence does not imply that RAA doesn't have a search feature.
| |     |   | 63049 [nahi@ke na t] I see.  Teacher, give me "F" at English reading (and composition). :-)
| |     |   | 63071 [hal9000@hy e] feature.
| |     |   | 63077 [nakahiro@sa ] No, no.  I didn't have to excerpt only 1 line.
| |     |   + 63400 [jbritt@ru y-] I've been working on a topic map wiki at www.ruby-doc.org/wiki/topicwiki.rb
| |     |     63433 [gsinclair@so] Wow, that's interesting!
| |     + 62733 [ahoward@fs .] i think that what's been proposed is categorical and not hierarchical.
| |       62770 [alan@di ik t] I liked the proposals which separated the functions of searching in the
| |       + 62785 [mwilson13@co] I agree that search functionality is necessary for RAA.  Archive
| |       | 62789 [transami@tr ] i want to make a distinction here over the word category. these are
| |       | 62791 [dcarrera@ma ] A complex graph is harder to browse than a tree.
| |       | 62797 [transami@tr ] it would still be browsed just like a tree, only some packages would appear
| |       | + 62798 [dcarrera@ma ] Sure.  3 sounds like a good number to me.
| |       | | 62829 [martindemell] It's your parent's bowl, of course :)
| |       | + 62799 [ahoward@fs .] super what?
| |       | + 62800 [vjoel@PA H. ] What about mimicking the ruby class/module structure. Every package
| |       + 62826 [simon@si on ] I think my thoughts on this at the moment are that all the modules in the
| |         62828 [botp@de mo t] I agree but is it ok to put search somewhere on top? (like google right?). I
| |         63045 [nahi@ke na t] That wiki should allow you to post any RD formatted text.
| + 62367 [waisun.chia@] But then, what the heck is a "mozilla" anyway? Is it some sort of a
|   62370 [matz@ru y- a] Or a "Ruby"?  Gem? ;-)
|   62372 [simon@si on ] Precisely. It's all covered in
|   62374 [akr@m1 n. rg] Rouge is a program.  Maybe Amrita is a better example?
+ 62352 [dcarrera@ma ] <disclaimer>These are opinions.  Other people might disagree</disclaimer>
| + 62360 [dossy@pa op ] I've been thinking (okay, dreaming) of a small snippet of Ruby code that
| | + 62363 [dcarrera@ma ] I think that's a great idea.  I don't know if it's been done.
| | + 62377 [ruby-talk@wh] why@stungun:~/cvs/yaml4r$ irb --simple-prompt
| + 62547 [nahi@ke na t] For me as well.
|   + 62554 [gsinclair@so] It's logical and compelling.
|   | + 62564 [daniel@ze ed] Getting back to the original poster's question, "what is not available?",
|   | | 62616 [nahi@mw .b g] Do you see
|   | | 62621 [daniel@ze ed] No, No, you misunderstood, sablot and the interface to UCD-SNMP were
|   | | 62622 [nahi@mw .b g] Oops.  I'm very sorry for bothering you with the post.
|   | + 62570 [gemerson@ev ] This only takes into account the web site for CPAN... the real power is in
|   | + 62615 [nahi@mw .b g] We ruby-lang.org admins are talking about its possibility.
|   |   62632 [gsinclair@so] No, I saw that RAA had it just recently, and it's better than the CPAN
|   + 62556 [jbritt@ru y-] Name                       Short Description
|   | 62617 [nahi@mw .b g] As you may know, it's from historical reason.
|   + 62560 [dcarrera@ma ] Sounds great.  I like it.
+ 62402 [matt@li ke .] In fact, I think we are attacking the 'not enough libraries' thing
+ 62407 [piers@om a. ] OK.
+ 62473 [gemerson@ev ] My only response is a vague one.  I mostly agree with you, re: naming and
| 62481 [matt@li ke .] [ruby-talk:20560]
+ 62517 [daniel@ze ed] libwww-ruby
  62548 [daniel@ze ed] Oh never mind, there is http-access. I guess I didn't look hard enough.

Hash#+ ?
62345 [dcarrera@ma ] I think that there should be a Hash#+ method, aking to Array#+.
62347 [dblack@ca dl] Have a look at the thread starting at http://www.ruby-talk.org/59777
62350 [transami@tr ] David, what value can be lost? i don't understand.
+ 62351 [dcarrera@ma ] hash1 = { "key1" => "foo", "key2" => "bar" }
| 62376 [transami@tr ] i see what youre saying. indeed, + is not really the right method for this.
| 62378 [matz@ru y- a] So you guys are OK for value losing "or" or "|" methods?
| + 62382 [jason@pe sa ] Just an idea, can Hash#| check to see if the data types of the conflicting keys already HAVE an
| | 62384 [matz@ru y- a] FYI, "update" can resolve conflict using blocks.
| + 62387 [transami@tr ] yes. a number of times in my experience a non in-place version of update would
|   + 62388 [matz@ru y- a] Handiness is not my point.  I know it must be handy.
|   | 62393 [transami@tr ] tom sawyer, aka transami
|   | 62398 [ahoward@fs .] i second that.  the 'normal' semantics of '|' are preserved, IMHO, iff the
|   | 62401 [transami@tr ] glad to be in agreement. i only disagree about the 'normal' semantics. where
|   | + 62404 [bruce@co ed ] I agree- second hash should win.
|   | + 62436 [ahoward@fs .] 0 | 0 -> 0
|   + 63547 [knu@iD em ns] What's wrong with 'hash3 = hash1.dup.update(hash2)' ?  And I'd like to
|     63561 [transami@tr ] well, i don't have any LIVE examples b/c hash#| dosen't exist, now does it!
|     63572 [transami@tr ] by the way, whats wrong with 'arr3 = arr1.dup.concat(arr2)' ?
|     63577 [knu@iD em ns] We have live examples that show that Array#+ is useful.  Try grepping
|     + 63580 [transami@tr ] well, that's kind of unfair in that i can't do the same grep on Hash#|. if it
|     + 63584 [ms@ia ta e. ] I've argued before that this is a natural thing to want when using
+ 62356 [matz@ru y- a] What if two hashes have same keys with different values?

Ruby, C, and garbage collection
62364 [taw@us rs so] VALUE a, b, c;
62371 [matz@ru y- a] I don't think so.  Ruby uses conservative GC, which scans C stack
62394 [nobu.nokada@] Or use StringValuePtr() provided for such cases.
62439 [pbrannan@at ] I don't understand.  How would using StringValuePtr() help in these
62447 [matz@ru y- a] The macro StringValuePtr() uses the variable's address internally, so

Amrita & Narf Invitation
62365 [ tom@u2 .c m] I would like to extend an invitation to anyone who would like to

Missing libraries??
62383 [hal9000@hy e] I'm starting a new thread to get away from
+ 62390 [waisun.chia@] A single wrapper around OpenSSH client package will do the above three.
+ 62397 [ahoward@fs .] 26. Numerical ruby (solidify NArray ?)
| 62410 [chad@ch df w] We have Oracle and RSS (I have an old version that I've recently updated
+ 62432 [gsinclair@so] Thanks for the enumeration, Hal.  I've created a Wiki page for people
+ 62448 [drbrain@se m] It provides minimal parsing of the .9, .91, and 1.0 formats.  If you
| 62541 [nahi@ke na t] Agree.  I created quick-and-dirty rss parser with xmlscan
+ 62450 [peter@se an ] There is a text to MIDI compiler (mine), what sort of midi tools do
| 62463 [ms@ia ta e. ] We have been using a ruby postscript module extensively here, but it's
| 62520 [peter@se an ] That was my plan, it would be easier to do a regression test for the
+ 62456 [smythb@al eg] The mcrypt library is fairly complete wrt available cryptographic
| 62468 [feldt@ce ch ] I disagree if it only contains symmetric ciphers according to
| + 62469 [djberge@qw s] In addition, see the openssl package (by Michal Rokos) on the RAA.
| + 62480 [smythb@al eg] Agreed, only symmetric ciphers are available in that library. Do you see
|   62519 [feldt@ce ch ] Not when it comes to symmetric ciphers.
+ 62670 [tcovert@sa u] Something I've been looking for an found only aborted attempts. Ruby
+ 62671 [tcovert@sa u] Something I've been looking for an found only aborted attempts. Ruby
threads.html
top