342935-345579 subjects 343324-381003

^ formal and stochastic grammars  in ruby
343136 [george.githi] Given a string,
343188 [adam.oddfell] Well, I don't know a whole lot about stochastic grammars in Ruby, but
343242 [george.githi] the stochastic or any grammars yet. While i used the example of

^ Java code to Ruby code??
343138 [louposk gmai] I dont know if it is the right place to ask about java but i have a
343139 [b.candler po] 1. Start writing some Ruby code
343170 [brabuhr gmai] You might also try writing a test case to help you figure out what the

^ Re: Good web design
343141 [b.candler po] You're right of course. I would probably say the same if someone asked
+ 343164 [james graypr] I learned a little of that from "The Principals of Beautiful Web
+ 343165 [james graypr] I'm just curious what makes you say this?  I always figured it was a
  343168 [b.candler po] Erm, I think my left brain got my left brain and right brain mixed up
  343169 [james graypr] Well stop confusing my left brain!  :)

^ Re: Spreadsheet::ParseExcel
343142 [anu maxxion.] I am using ruby ruby 1.8.6 and spreadsheet (0.6.4).
343148 [smithno saic] nil usually means empty rows. Also each row is an array of cells. You
343150 [anu maxxion.] Thanks for the response.

^ IE crashing after about 70 open/close event
343145 [istvansebe y] I have to open links (about 3000) and then close them.

^ New Computer Forums
343147 [eldelmich_20] You are invited to come help and share your passion for programming at

^ Spreadsheet link to a file
343151 [nosp m.inval] I'm looking for a way to create a link to a local file with the
+ 343156 [cliveharber ] use
+ 343157 [cliveharber ] use
  + 343161 [nosp m.inval] it does... thanks!
  + 343166 [nosp m.inval] it seems to only work for absolute path...
    343174 [cliveharber ] As far as I am aware, you can only use absolute paths with file:///path_to_file as it is an address to a local file resource on your system, same as http://path_to_resource points to an address somewhere else in the world.

^ Soap4r envelope issue
343155 [veeraa2003 y] I'm trying to create soap envelope where I can't add my own attributes

^ method that runs an executable file
343162 [mdwright_76 ] i am quite new to programming, only began in february this year and am
343167 [brabuhr gmai] Though, be aware, particularly for web apps, of potential security
343175 [mdwright_76 ] thank you,

^ Python and ruby together?
343172 [goldmooneach] Is it possible to set up python scripts in such a way that they can
+ 343173 [gregory.t.br] Does that program allow shell access?  Easiest might be to just call
+ 343201 [bbxx789_05ss] puts "hello"
| 343202 [bbxx789_05ss] Hmm...now I wonder if you understand the difference between 'read' or
+ 343203 [vikkous gmai] Parsing ruby is very complex, and there are very few complete (or
  343210 [carhoden gma] Does this do what you want?

^ Loading precompiled code
343178 [husam senuss] Does ruby support storing and loading bytecode !!
+ 343180 [keburgett gm] As far as I know, there is no bytecode available from the Ruby compiler.  I
| 343181 [husam senuss] Will 1.9.1 has bytecode and you can get it  using
+ 343211 [Usenet Googl] Short answer: No, it doesn't.
  343214 [husam senuss] Thanks  thats clear things up :)

^ parameter passed by get
343179 [david-street] ...
343240 [bbxx789_05ss] As far as I can make out, I would liken your html form and your program

^ downloading large file with NET::SCP
343182 [husam senuss] I'm trying write script to download files using  NET:SCP, the APIs

^ Has anyoune tried Red Sun
343183 [orenshani na] Have anyone tried the Red Sun Flash Ruby VM?
343215 [Usenet Googl] Judging by the commit history, it looks rather dead, unfortunately.
343247 [orenshani na] Yea, I thought so too... Shame...
+ 343249 [howardrobert] Posted via http://www.ruby-forum.com/.
+ 343277 [rubyforum2 j] Yes, unfortunately I had very little interest in Red Sun either from the

^ Mod_ruby error reporting
343184 [brgsousa gma] Is there such thing?

^ Could not build html documentation for Ruby with rdoc19
343185 [taro mail333] I'm trying to build html documentation for  ruby-1.9.1-p129.
+ 343479 [rogerpack200] Hmm.  use the latest version of rdoc [what is rdoc19?]?
+ 343483 [matt_neuburg] ...

^ Bizarre Range behavior
343186 [scott.br gma] => ["2", "3", "4", "5", "6", "7"]
+ 343187 [ymendel pobo] It gets better.
| 343193 [Rob AgileCon] Well, you need to think about String#succ when the Range endpoints are
| 343196 [matt harpsta] It's doing a comparison of the strings -- it has to do with the
| 343199 [Rob AgileCon] Well, the Range#to_a is actually Enumerable#to_a and uses Range#each
| 343234 [matz ruby-la] What if I sprinkle more magic to the language and change String#upto
| + 343238 [djberg96 gma] I vote against. If people want numeric ranges, it's their job to use
| | + 343259 [shortcutter ] I strongly agree.  Typing .to_i isn't too hard and it makes clear what
| | + 343264 [james graypr] I agree.  I'm against the change.
| | + 344025 [piyush.pr gm] +1 for that. and -1 for the change.
| |   344031 [scott.br gma] If it was 20 years ago, I'd understand this sentiment.  What I don't
| |   344174 [ninja slapha] Because the semantics with which humans interact and think are ambiguous,
| |   344201 [jcoglan goog] 2009/8/19 David Masover <ninja@slaphack.com>
| + 343251 [b.candler po] -1 for added complexity with little benefit
| | + 343253 [jcoglan goog] 2009/8/5 Brian Candler <b.candler@pobox.com>
| | + 343261 [matz ruby-la] I admit it's a dark art of Perl-ish, but String#upto and String#succ
| |   343266 [dblack rubyp] If you make this change, how would you then accomplish the old
| |   343272 [matz ruby-la] The point is the current behavior is not really obeying
| |   343273 [rick.denatal] Well my vote is to cook it to use the methods of the endpoints rather
| |   + 343274 [jcoglan goog] 2009/8/5 Rick DeNatale <rick.denatale@gmail.com>
| |   | 344001 [matz ruby-la] I admit 1.8 behavior in above example is simpler to implement, but 1.9
| |   | 344023 [rick.denatal] Matz, FWIW, and I don't think I'm alone, my expectations are based on
| |   | 344032 [matz ruby-la] I repeat.  If String#upto has not contained magic (that inherited from
| |   | 344094 [dan-ml dan42] That sounds nice and consistent, but why limit ourselves to numbers?
| |   | 344097 [matz ruby-la] Indeed.  The issue is that it's not easily distinguishable whether
| |   | + 344098 [jcoglan goog] 2009/8/18 Yukihiro Matsumoto <matz@ruby-lang.org>
| |   | | 344099 [jcoglan goog] 2009/8/18 James Coglan <jcoglan@googlemail.com>
| |   | + 344284 [dan-ml dan42] => "\00110"
| |   | | 344287 [brabuhr gmai] I don't think so, the octal escape is 'eating' the "1" and leaving "9"
| |   | + 344290 [dan-ml dan42] My original reaction to this was that the succ rules may be complicated
| |   + 344002 [matz ruby-la] Well, since it's a magic, we need to draw some line according to
| |     344030 [josh.cheek g] very surprised when it breaks on "2".."10" So surprised that I probably
| + 343268 [Rob AgileCon] I'd actually prefer *less* magic here. (And I hope that your second
|   343270 [matz ruby-la] May bad for the error in the example.  It wouldn't include "20" in the
|   + 343271 [rick.denatal] This particular magic I don't like, since it would treat strings as
|   + 344026 [robert.dober] But I grant you that he was just the victim of yet another "I just
+ 343189 [matt harpsta] It's because you're using strings -- "11" comes before "2", hence the
  + 343191 [scott.br gma] Matt, that doesn't explain why "1".."11" works and "2".."11" doesn't
  | + 343192 [scott.br gma] Ah, I should clarify that.  When ruby interprets "11" as an integer 11
  | + 343194 [matt harpsta] irb(main):015:0> "1" < "11"
  + 343195 [Rob AgileCon] Well, it certainly isn't invalid. You can easily have a Range where
    343198 [matt harpsta] I guess the code for substring treats it differently than #to_a -- just

^ QtRuby Questions: Why does
343204 [hibridmatthi] Guten Tag, everyone-
343213 [kbloom gmail] #I snipped the extra stuff that was irrelevant to the example.
343218 [hibridmatthi] Ken-
343233 [kbloom gmail] ...

^ Why No QtRuby list under Misc?
343205 [hibridmatthi] I was just wondering if anyone knew why several GUI dev tools (FX, wx-,
343217 [james.britt ] What do you mean by "sublists"?
343221 [hibridmatthi] The gateway I am using breaks the subjects down on the left side of the

^ zero placeholder exponential sprintf?
343206 [Bil.Kleb nas] We have a request for 0.112345e+02 instead of,
+ 343219 [bbxx789_05ss] data = 112.3450
+ 343223 [list.push gm] I may be missing what you are after, but....
| 343252 [Bil.Kleb nas] Sorry for the confusion, String::% uses Kernel::sprintf -- see
| + 343263 [list.push gm] I am still not sure if you require sprintf.
| | 343287 [list.push gm] This is the same code I posted earlier, just a little DRYer.
| + 343297 [bbxx789_05ss] Uh, no.
+ 343265 [b.candler po] I'm not sure this works for all possible cases, but you could just
+ 343289 [list.push gm] Sorry for posting yet again.

^ Compiling Ruby scripts for distribution to Windows and OS X.
343224 [gberz3 gmail] I need to create a binary from ruby scripts for both Windows and OS
343226 [luislavena g] Work with OCRA developer to create a native OSX stub, which is written
343285 [renard nc.rr] There;s "crate"      google crate + ruby
343299 [gberz3 gmail] CRA

^ ParseException met when using Watir with xpath, please help.
343227 [northnashi h] I'm new here, and I met some problem while I was using Watir gem to
343231 [bpettichord ] We are now using a different xml parser for Watir (Nokigiri instead of
+ 343255 [northnashi h] Thank you very much for your reply, maybe I would try Nokigiri(What does
+ 343257 [northnashi h] I just begin to try Nokogiri1.3.3 now, it works fine for g.cn ^_^

^ [ANN] imap_processor 1.3 Released
343228 [drbrain segm] ...

^ remove commas from string
343235 [jason.lillyw] s = "B747-400, 8,357 miles, 561 mph, 4 Pratt & Whitney PW 4056
+ 343236 [sureshkkgvr ] new_string = s.gsub(",","")
| 343237 [headspin gma] Er, yes, you asking to replace \d+(,)\d+ with nothing, that's exactly what it does...
+ 343243 [zyzygy telst] there is an example of how to do this in the gsub documentation
+ 343245 [bbxx789_05ss] s = "|yes|"
| 343246 [bbxx789_05ss] But note that once again, the entire match is replaced by the return
+ 343248 [njus larshau] Ruby 1.9 supports look-behind in regular expressions (Ruby 1.8
  343250 [shortcutter ] irb(main):003:0> s.gsub(/(?<=3D\d),(?=3D\d{3})/, '')
  343296 [cwdinfo gmai] => "B747-400, 8357 miles, 561 mph, 56000 lbs."
  + 343336 [nick nick-br] Ruby has the neat ability to pass a block to gsub. This can be a more
  | 343342 [shortcutter ] It isn't needed though in this case.  Please also note that the block
  + 343339 [ruedi brahns] This would make 2344,667 from 2,344,667 (leave the second comma). (Why
  + 343346 [jason.lillyw] So I think I would like to try a non-block option but this code above
    343348 [shortcutter ] s.gsub(/(\d),(?=3D\d{3})/,'\\1')
    343350 [jason.lillyw] Thank you very much Robert.
    343392 [yangtt cools] Return Receipt

^ Any tool for examine ruby's thread?
343239 [femtowin gma] I want to examine the thread because the application's logic is quite complex,
343258 [shortcutter ] What kind of examination do you want to do?  Do you want to see how
343267 [femtowin gma] Yes, at least I need how many threads there are,
343304 [shortcutter ] Please do not top post.
343308 [femtowin gma] Yes,I've found the Thread.list fulfills my needs,Thanks.
+ 343337 [shortcutter ] You can do so as well when not top posting.  Please also consider that
+ 343345 [vikkous gmai] There does not seem to be a way to get the backtrace of another thread
  + 343349 [shortcutter ] You can certainly cook up something with set_trace_func.  This is
  + 343354 [vjoel path.b] IIRC this has been requested and discussed a few times, and it might be

^ [ANN] Lone Star Ruby Conference 2009 - One more week before Late Registration Begins
343260 [jimfreeze gm] ...

^ Change console forground to Red or Green
343276 [adamlauper g] I'm looking for a way to change a Window's console foreground color in
+ 343280 [hramrach cen] You might be able to do that with the ruby curses extension but on
+ 343281 [chust web.de] if you want complex text user interface functionality, you can use
| 343363 [adamlauper g] After installing the term-ansicolor gem, I copied and pasted your code
| 343364 [chust web.de] as Gordon Thiesfeld already mentioned in this thread, the Windows
| 343374 [hramrach cen] My hands-on experience suggests that this driver still exists but is
| 343380 [adamlauper g] Thank you everyone for your responses.
+ 343283 [gthiesfeld g] Windows cmd.exe doesn't support ANSI escape sequences out of the box.

^ daemon helper
343282 [jak isp2dial] daemon helper: start any program or script as a daemon.

^ Testing with Mechanize
343286 [me michaelbo] I'm trying to jump onto the habit of testing and I'm not finding to too
+ 343291 [mark thomasz] You may be able to do this with Mocha too. Perhaps someone with more
+ 343333 [mike.dalessi] I think maybe you're trying to test at the wrong level. Unless you're
  343383 [me michaelbo] Thanks for the replies Mark and Mike. I never thought about it the way

^ including gems with standalone app
343288 [ericdp mac.c] Morning,
343301 [gthiesfeld g] I'm not sure if it's the best way, but you could manipulate
343355 [ericdp mac.c] hmm.. well, something went wrong.  I already have fastercsv installed,
+ 343357 [ericdp mac.c] Also tried, but still get no such file to load -- html-table (LoadError)
| 343360 [renard nc.rr] y',
| 343361 [ericdp mac.c] Yes, I am developing on this Windows box.  Not happy about that.  Soon I
+ 343371 [gthiesfeld g] Try setting ENV['GEM_HOME'] before requiring rubygems.  Also, I don't
  343372 [ericdp mac.c] I must have something set up wrong on my box.  Using your code exactly I
  343373 [gthiesfeld g] The one-click installer for that version sets the rubyopt environment
  343376 [ericdp mac.c] Well, that is interesting.

^ How to logout when using Rake::Auth::Basic in Sinatra
343293 [slythic gmai] Sorry for the repost - I think I have the correct forum now!
343322 [richard.conr] Actually, this may be a limitation of HTTP basic authentication - there is
343329 [btricha gmai] Correct.  HTTP Basic Authentication is done via the browser.  The only real

^ Trimming some string using ruby
343300 [idealone5 ho] I have the following information in a text file, which looks
+ 343302 [srijayanth g] file = File.open("foo")
+ 343313 [bbxx789_05ss] line = "-rw-rw-r-- 1 user user 12203 Aug  6 01:02 app1.sql"
| 343314 [bbxx789_05ss] line = "-rw-rw-r-- 1 user user 12203 Aug  6 01:02 app1.sql"
+ 343315 [w_a_x_man ya] awk "{print $NF}" my_file
| 343318 [w_a_x_man ya] ruby -lane "puts $F[-1]" my_file
+ 343317 [lists bertra] As the file size will vary in width and the file names could
| 343332 [ruedi brahns] Why not just
| 343343 [lists bertra] Because it is still allowed that filenames contain spaces (and
+ 343353 [glennj ncf.c] ...

^ Terminal escape sequences
343305 [jcoglan goog] Looking through the PDoc source to see how it renders the build progress
+ 343307 [phasis gmail] "\c[[F" is invalid sequence. cf: "\c[[f" means "Move cursor to upper
| + 343309 [jcoglan goog] 2009/8/6 Heesob Park <phasis@gmail.com>
| + 343311 [phasis gmail] Refer to http://www.atariarchives.org/cfn/12/02/0075.php
| + 343319 [pjb informat] ESC [ <Pn> F is CPL, Cursor Preceding Line, in ECMA-048.
+ 343310 [pjb informat] Each terminal kind has its own escape sequences.  There are thousands
+ 343312 [lists bertra] This is the whole truth: <http://www.xfree86.org/current/ctlseqs.html>.

^ Kernel's module methods?
343316 [bbxx789_05ss] Module Kernel
343321 [b.candler po] If I understand it rightly: because self is the top level object 'main',
343323 [jcoglan goog] 2009/8/6 Brian Candler <b.candler@pobox.com>
343325 [b.candler po] Yes, but are you sure they are module methods, not just instance
+ 343326 [jcoglan goog] 2009/8/6 Brian Candler <b.candler@pobox.com>
| 343338 [b.candler po] irb(main):001:0> Object.private_instance_methods.grep(/puts/)
+ 343327 [james graypr] module_function(symbol, ...)    => self
  343330 [jcoglan goog] 2009/8/6 James Gray <james@grayproductions.net>
  343331 [james graypr] Yes, and I generally prefer extend(self) to module_function after much
  343356 [vjoel path.b] Can you post an example of the constant resolution problem next time you
  343368 [james graypr] Here's an example I remember from just the other day (though it

^ [ANN] 1.9 String and M17N documentation
343320 [b.candler po] I have put together a document which tries to outline the M17N
+ 343334 [gregory.t.br] Clever approach and looks to be a great resource.  Thanks for writing this up.
+ 343351 [james graypr] I just wanted to say that I enjoyed reading through what you have
  343378 [drbrain segm] I'm too lazy to dig this out of the archives, but there are some