189653-191030
189446-190050 subjects 189823-190380
^ XML parser with file names and line numbers
189653 [pollak gmail] Howdy,
+ 189695 [shortcutter ] What exactly do you mean by that? AFAIK there is no place to store
| 189702 [zdennis mkte] It seems like this would be possible with a SAXParser when you're scanning the document to be able to grab what lineno an element
| 189721 [pollak gmail] It is possible with a SAX parser in Java, but the SAX parser in rexml does
| + 189725 [zdennis mkte] No, ruby-libxml is in development. I know because I am an active
| | 189732 [pollak gmail] Zach,
| + 189734 [hutch recurs] true, but I *use* it a lot. The most recent version is bundled with
+ 189780 [henrik.marte] XML does not have the concept of a line. XML deals only with describing
189784 [pollak gmail] Henrik,
^ CHM of documentation (core/stdlib)??
189658 [ruby philip.] Is there a CHM of the docs? I've googled and googled and haven't found
189669 [vjoel path.b] There is one in the one-click ruby installer, in the doc dir, made from
+ 189675 [phurley gmai] Also FYI you can generate chm with rdoc --fmt rdoc .....
| 189679 [james_b neur] You have to download and install the HtmlHelp software from Microsoft if
| 189711 [Jamal.Mazrui] I wish there were also a CHM of the 1.84 reference, including the core
+ 189677 [ruby philip.] *sigh*
189678 [james_b neur] Note, though, that this is not based on the current version of Ruby.
^ how to figure out what class a method is in for a *class method*?
189664 [ruby philip.] Given the following bit of code, I'd like it to spit out "Cat" followed by
+ 189666 [pollak gmail] Try
+ 189692 [A.M.Gimblett] I have a related question - a similar problem to the one just given,
| 189693 [robert.dober] class Animal
+ 189694 [shortcutter ] Let me get this straight: you have a class object and you want a
189735 [ruby philip.] method in the parent class is responsible for storing "stuff" in memcache
^ Re: how to figure out what class a method is in for a *class method*? (SOLVED)
189665 [ruby philip.] Naturally I find it right after posting...
^ BBEdit, Ruby and Intel Macs
189667 [gmacgregor g] Can anyone verify (as in "yes" or "no") that the Ruby language module
189668 [logancapaldo] I can't "verify" anything since I don't have an Intel Mac, but if you
189671 [gmacgregor g] Nope. haven't done that. I'm assuming that'll work though ...
189690 [pbattley gma] You can also force a Universal application to run its PPC code withRosetta (use 'Get Info' in the Finder) - that's necessary to be ableto use PPC plugins.
189755 [gmacgregor g] Did this and the module still isn't working.
189757 [james graypr] I really don't mean to start an editor war, but I feel like I can say
^ Basic OO ideas
189681 [gregcoit gma] Still struggling with writing a basic bot for rrobots. Thought I
^ Access the varibles
189683 [marni gmail.] I have problem to accees the perticuutr varible from conatool.rb to
189718 [phurley gmai] I am guessing this is a Rails question in which case you may want to
^ Threading example in FAQ 4.2 is slightly broken?
189691 [A.M.Gimblett] I just ran the example at the end of FAQ 4.2
+ 189698 [robert.dober] dave@pragmaticprogrammer.com ?
| 189699 [dblack wobbl] should connect you to the new one.
+ 189700 [dblack wobbl] I think that's the one you mean, and it looks OK.
189701 [A.M.Gimblett] Aha. Yes indeed.
189706 [ml.chibbs gm] I think Hal Fulton is in charge of the FAQ now.
189715 [logancapaldo] I believe Hal Fulton is in charge of the newsgroup/ML faq, not the
189882 [jmg3000 gmai] There's a newsgroup/ML faq? What's the URL?
189884 [jmg3000 gmai] is it.
^ Retrieving Rubyforge login info on Mac Os X
189697 [taschini.mli] rakefile task takes care of automatizing the release process.
^ [QUIZ] Text Munger (#76)
189703 [james graypr] 1. Please do not post any solutions or spoiler discussion for this quiz until
+ 189707 [dblack wobbl] Given a word like "there's" or "that's", does the letter before the
| 189716 [matthew.moss] Do it whichever way you like it...
| 189740 [dblack wobbl] I guess if the part after the ' isn't going to be mixed in with the
+ 189708 [florgro gmai] What about writing an unscrambler? Could that also be done for this quiz
| 189709 [james graypr] It's not part of the challenge this week or next, but you know I'm
| 189712 [hawkman.gelo] this quiz is probably easier than usually, as, for the first time
| 189714 [ruby anthrop] } this quiz is probably easier than usually, as, for the first time
| + 189719 [john-rubytal] Mmh, for my first participation, i get a quizz solved by a one-liner.
| | 189723 [matthew.moss] One line?
| | + 189727 [ruby anthrop] } One line?
| | | 189731 [hawkman.gelo] my attempts to one-line it failed, and since it was now three lines
| | + 189737 [gm.vlkv gmai] Looks like this Quiz is too easy.
| | + 189741 [james graypr] One of the easiest ones we have ever done, yes, and I think that's a
| | + 189744 [matthew.moss] James (being the host) can put forth his own comments on the goals of
| + 189738 [james graypr] Random playing around...
| + 189739 [ruby anthrop] }
| | 189742 [james graypr] Really? With everyone bragging about how easy this quiz is? :D
| + 189745 [leavengood g] My solution also did not munge rñÔumé® Seems that \w does not include
| + 189748 [ruby crazyte] Keep in mind that longer words with a purely randomly munged inside will not
| 189752 [hawkman.gelo] you know, it's great that this quiz is easy! when i had read the other
+ 189753 [jake.mcarthu] My first participation in Ruby Quiz, and it has to be easy. That
| 189756 [leavengood g] Strictly speaking, any Ruby code can be made into one line with
| + 189761 [jake.mcarthu] When I say "one-liner," I'm excluding cases of using semicolons. In
| + 189762 [ara.t.howard] my fully oo version is 12 lines and only 40 words.
| + 189765 [matthew.moss] Oh great... Now I have to read these solutions when writing up a summary.
| + 189766 [phil hagelb.] 86 chars after removing all the extraneous spaces. Of course, now it
| 189769 [leavengood g] I agree with you, and I'm very experienced with Ruby. In most cases
+ 189791 [adam.shelly ] I know everyone here is Nice(tm), so I'm sure this is not the
| + 189792 [dblack wobbl] Maybe we can use the techniques to filter those messages out :-)
| + 189800 [james graypr] I vote we assume the best instead of the worst.
| 189851 [al.barrett g] Hellfire and damnations. Just read the rules. I didn't realize about the
| 189854 [fxn hashref.] Argh, I assumed it was over after reading that email, I am very sorry.
| 189857 [al.barrett g] I can take off 3. "sort_by" can simply be "sort" as Array overwrites
| 189862 [al.barrett g] But now, sadly, I have to put them back on :/
| 189865 [al.barrett g] But not 100% satisfactorily. I'll stick with my first version :)
+ 189899 [hchoudh gmai] Here's my solution.
| + 189901 [robin nibor.] Try Rindfleischetikettierungserwachungsaufgabenertragungsgesetz :)
| + 189924 [smithav cshl] Is the performance better if you skip swaps when i == j ?
| | 189969 [hchoudh gmai] Yes. You are right. My memory didn't serve me well in this case.
| + 189954 [james graypr] James Edward Gray II
+ 189963 [dharple gene] Can you also suggest that people reply to the original thread instead
+ 189964 [smithav cshl] -a
| 189971 [james graypr] Thank you. I have updated the FAQ.
+ 189970 [james graypr] Done.
^ Austin, TX Ruby?
189710 [thomasblom l] Any user's group in Austin TX that meets?
189722 [jim freeze.o] Yes, there are a herd of Texas Rubyists in Austin.
189736 [thomasblom l] I get "internal server error" on just about any link I hit for
189804 [matt technor] Well, they do tend to lean more towards artistic than technical...
^ Synchronized object
189717 [simon.kroege] Dear ruby-talk,
+ 189720 [farrel.lifso] You could have a class wide Mutex.
+ 189726 [pollak gmail] Simon,
+ 189728 [james graypr] You could wrap it in a delegate object you strip of methods, then
+ 189729 [logancapaldo] obj.methods.each do |meth|
| 189759 [SimonKroeger] accepted answer ... well kind of. ;)
+ 189730 [A.M.Gimblett] If you want something like you get in Java with the "synchronized"
+ 189790 [dcorbin mach] It would be relatively easy to write a class that uses Monitor and delegates
189794 [phurley gmai] require 'monitor'
189821 [SimonKroeger] require 'monitor'
^ Ruby Users of Minnesota Meeting - April 25th, 7:30PM
189724 [headius head] We will have our next meeting on April 25th at 7:30PM.
^ Problems trying to feed a user agent header to Net::HTTP.get_response
189743 [xeno eskimo.] Say, I thought I had this working at one point, but I don't now seem to be
189746 [chanezon gma] I had a similar issue lately (not sure it is similar): I wanted to feed
^ Ruby, Constants, and the real world
189747 [pat.eyler gm] For as much flack as Ruby takes for having constants which can be
189763 [robert.dober] ccused-of-changing.html
^ Simple example of failed attempts to use a user agent header:
189749 [xeno eskimo.] $ ./tryua01.rb
^ RubyScript2Exe in Cygwin and gets/readline: unexpected EOFError
189754 [chucker23n g] I'm planning on distributing software using the very helpful
^ Newbie questoin of the day:A for loop that counts backwards?
189758 [mendake_ddud] How do I get a for loop to count backwards?
+ 189760 [gregory.t.br] 1.upto(8) { |i| .. }
+ 189853 [rubytalk gma] max=9
^ Re: Text Munger (#76)
189764 [ajohnson cpa] As a script, my one-liner is down to 70 chars including
189767 [billk cts.co] Wow, nice. Does that include the restriction in the quiz rules that
+ 189772 [nothanks exa] <pre>perl -pe
| 189787 [dblack wobbl] But \w includes underscore. I think punctuation is supposed to remain
| 189843 [nothanks exa] Point taken.
| 189847 [al.barrett g] Use negated word boundaries (\B) instead of the lookarounds to lose a few
| + 189856 [al.barrett g] Looks I've caused trouble :/
| + 189858 [nothanks exa] perl -pe 's/\B([a-z])([a-z])\B/rand>.5?$1.$2:$2.$1/egi'
| 189859 [mike stok.ca] Doesn't \B bring back the problems with _ ?
| 189959 [ajohnson cpa] Well, the simple regex based one-liner seems to have gotten
| 190033 [al.barrett g] @James Gray: Can you please only add my second listing on rubyquiz.com.
| 190035 [james graypr] Is it not the second link on this page?
| 190045 [al.barrett g] Sorry, I shouldn't have said "add." I meant could you _remove_ the first
| 190046 [james graypr] Nothing wrong with showing progress, is there?
| 190057 [al.barrett g] Aye, usually I'd agree with you. But in this case the two examples are
| 190064 [james graypr] I have removed the first link.
| 190088 [cardologist ] puts $<.read.split(/\W/).map{|x|x==""||nil
+ 189773 [jake.mcarthu] Well, I can make one in ~60 chars that rearranges both. Still working
+ 189774 [james graypr] I'm still waiting for someone to show off their solution properly
+ 189776 [jake.mcarthu] Working on my short version. 62 chars long and works for your
| 189793 [ruby crazyte] I've been able to condense mine to about 15 lines - I'm always impressed
+ 189815 [rossrt rosco] $ ./munger.rb test.txt
+ 189817 [rossrt rosco] (Sorry for the noise) - the test text used there doesn't go too well
| 189838 [ray warmroom] The pattern, "eu??????ne str?????que" is constant in your results.
| 189839 [rossrt rosco] Well, that's a question of more random, or more readable. A good point
| 189841 [al.barrett g] "text".gsub(/\B(\w{2,})\B/) { |s| s.length.times { |i| r =3D rand(s.length)=
+ 189828 [james graypr] Why are the e's not moving?
189837 [rossrt rosco] My solution scrambles only part of the inside of the word, depending on
^ Re: Newbie questoin of the day:A for loop that counts backwa
189768 [ath-admin vt] x = 8
+ 189770 [matthew.moss] (1...8).reverse.each { |x| puts x }
| + 189771 [matthew.moss] Ooops, one too many periods. That should be: (1..8)
| + 189782 [dave burt.id] for i in (1..8).reverse
| 189783 [matthew.moss] Not me... "for" can go hang out in my C++ code with the other schmuck keywords.
+ 189785 [farrel.lifso] 8.downto(1) {|x| puts x}
189846 [mendake_ddud] Wow, so many options. What a great language. Thanks, everyone.
189879 [jake.mcarthu] <sarcasm>
^ Testing a filter
189777 [gregory.t.br] I'm now filtering ruby-forum.com out from the RubyTalk traffic, so I'm
+ 189778 [gregory.t.br] Should be the last test, sorry folks.
+ 189779 [steve waits.] Please do tell what you're filtering on. My procmail is always in need
189781 [gregory.t.br] I'm just using the 'posted via ruby-forum.com' advertisement to label
^ [ANN] Ruby/Watchcat 1.0.0
189786 [andre digira] I'm pleased to announce the release of Ruby/Watchcat 1.0.0.
+ 189825 [ara.t.howard] so, in effect, this is a Timeout::timeout based on a child process?
| 189844 [andre digira] Yes, except that when the timeout expires, it triggers an action by the
+ 189866 [zedshaw zeds] Hmmm, me thinking...
189873 [andre digira] Yes, the library is better suited for a multi-process model, like the
^ Problem with String.my_custom_func! "Can't change the value of self"
189788 [ruby philip.] I'm extending the String class to include a tidy_up_html() method that
189789 [dblack wobbl] s = "abc"
^ [ANN] Annoucing DPP's Ruby Playground
189795 [pollak gmail] Folks,
+ 189796 [guslist free] Sure. What's the URL?
+ 189797 [gregcoit gma] Did I miss the url?
+ 189798 [leavengood g] Sounds neat...you might want to provide a link :)
189799 [gregcoit gma] Google says http://dppruby.com/dppsrubyplayground/show/HomePage
189802 [pollak gmail] D'oh!
^ ot: spam (was RE: [QUIZ] Text Munger (#76))
189801 [botp delmont] # I know everyone here is Nice(tm), so I'm sure this is not the
189803 [dave burt.id] Wer mit Ungeheuern kçÎpft, mag zusehn, dass er nicht dabei zum Ungeheuer
189805 [botp delmont] # Wer mit Ungeheuern kçÎpft, mag zusehn, dass er nicht dabei
+ 190074 [logancapaldo] "A witty saying proves nothing." - Voltaire
| + 190110 [dave burt.id] Voltaire was French.
| + 190112 [james_b neur] Well, Voltaire certainly understood irony.
| 190116 [botp delmont] # > "A witty saying proves nothing." - Voltaire
+ 191030 [steven lumos] Or was it: "All that is necessary for evil to triumph is for good men
^ nuby: %w to understand quotes
189807 [botp delmont] irb(main):007:0> %w{this is a test}
+ 189808 [jake.mcarthu] %w{this\ is a\ test}
+ 189809 [matz ruby-la] %w understands backslash escape
189810 [botp delmont] # %w{this\ is a\ test}
+ 189813 [collinsj sea] In that case, wouldn't it be easier to just do
+ 189826 [ara.t.howard] list = %Q[
^ Re: [typo] Typo as a Google Summer of Code project?
189811 [chanezon gma] I'd be delighted to see some work done on Typo (this is the engine I use fo=
+ 189812 [chanezon gma] resending after resubscribing in typo-list with my gmail address.
+ 190421 [dblack wobbl] I've taken it on myself to update that page based on incoming
^ class_eval used inline vs within class definition
189814 [pergesu gmai] I'm reading the Ruby for Rails book, and on page 350 it has the example
189818 [sean.ohalpin] A class definition introduces a new scope (similar to def) so for your
+ 189820 [pergesu gmai] The point of this is to be able to access 'var' even though it's
| 189822 [dblack wobbl] irb(main):001:0> var = "initialized variable"
| 189824 [pergesu gmai] Okay, that makes sense now. I think that's what Sean was telling me
+ 189827 [james graypr] We might as well drop the class_eval { ... }, since we are already in
+ 189829 [dblack wobbl] To be fair to Sean, though, the question really had to do with
| 189868 [sean.ohalpin] Thanks for leaping to my defence David but I think James is right.
+ 189864 [sean.ohalpin] Quite right! The perils of cut and paste ;)
^ YAML, ERB & nested maps problem
189816 [one.three gm] I'm trying to genereate YAML fixtures with ERB, but I can't get it to
+ 189819 [one.three gm] <%
+ 189830 [transfire gm] You've picked an interesting way to be generating YAML --with ERB?
| + 189832 [dblack wobbl] In Rails, the test fixture files are YAML files that get pre-processed
| + 189850 [one.three gm] Thanks for pointing me to this Facets library !
+ 189831 [dblack wobbl] Can you just do this?
189848 [one.three gm] I need to generate random data for testing. Dates will be between
189855 [dblack wobbl] or something like that.
189860 [one.three gm] Wow. Thanks, David. This is simple and straight forward, just what I need !
189861 [dblack wobbl] I think you'll want to call .inspect; otherwise it will all be strung
189867 [one.three gm] Yeah, forgot that ;)
threads.html
top