351133-352907 subjects 351553-352182

^ [ANN] re_template
351333 [ninja slapha] A very simple template engine based on Regular Expressions.

^ Programming ruby 1.9- question on page 37
351340 [677zn5 gmail] not sure what to do which that code at the bottom of page 37. I enter
+ 351345 [b.candler po] For the benefit of those of use without the 1.9 version of the book, can
+ 351359 [rick.denatal] Well the code under the box telling you where to download it (at least

^ Simple Ruby Project
351353 [tadej.slamic] I've just started with Ruby and decided to do a little project. Since
+ 351355 [ralf.mueller] there is a good library for similar things: http://nokogiri.org/
+ 351356 [b.candler po] So you will need to run this under a web server, to allow your client to
+ 351360 [marnen marne] It's probably a good idea to use one of the lighter-weight Web
  351362 [tadej.slamic] Thanks for all the help guys, I appreciate it. I also thought rails is

^ can't understand for String.delete
351357 [rubynewbee g] Returns a copy of _str_ with all characters in the intersection of
351375 [jgabrielygal] What it means is that it builds a character set performing the
351404 [rubynewbee g] ah~ thanks, I got it.
351412 [jgabrielygal] "^" for negating and "-" for character ranges are usual syntax of

^ Difference between << and += for Strings and Arrays. Bug?
351367 [pieter inter] I have been programming with Ruby for about 1 year and am loving it. I
+ 351371 [rick.denatal] This is another example of the classic confusion between variables and objects.
+ 351372 [brabuhr gmai] "Concatenation=97Returns a new array built by concatenating the two
+ 351373 [tom therye.o] b=3Da means 'the variable b points to the same object as the variable
  351377 [pieter inter] Thanks for the quick responses and insights. While I understand the
  + 351378 [tom therye.o] Depending on your needs, try
  + 351380 [brabuhr gmai] Consider that b+=a is just a nice shorthand for b = b + a (or b = b.+(a)).
  + 351388 [b.candler po] cout << "Hello world!";
  + 351414 [shortcutter ] << does not always modify the receiver
    351474 [pieter inter] I'll get the hang of it I'm sure
    + 351480 [b.candler po] For me the natural way to do this would be recursively, but an iterative
    + 351481 [shortcutter ] sly
      351484 [shortcutter ] require 'set'

^ Re: Best way to search through an array for an item matching
351369 [marnen marne] Because it's not finding the string, so the index is nil, and you can't
351384 [dan.m.webb g] Thanks I need to just stare at that API for a lot longer...

^ Where should I put my config file, and how to load it?
351379 [theadmiral g] I have a small app/set of libraries I'm developing at work called
+ 351382 [marnen marne] Only if your gem is meant as an executable application.
+ 351389 [ninja slapha] Depending what the config file looks like, you may want to allow the global
+ 351418 [b.candler po] If your config is simple, you could just load the hard-coded defaults
+ 351421 [transfire gm] Please, don't use ~/.sweetrc. Be cool and kind and use XDG standard.
  351478 [theadmiral g] Thanks for all the responses, guys, this has given me plenty to think about! :)

^ Re: Difference between << and += for Strings and Arrays. Bug
351381 [marnen marne] According to Matz, POLS is only meant to apply within Ruby, not with

^ Game Development, anyone?
351383 [EJoe VonChur] charset="us-ascii"

^ Help with each_with_index method
351386 [chris.pelow ] I'm looking for help with my work here.I'm just learning Ruby.
+ 351392 [jeremywoerti] I was a bit confused by your post, but if I understand correctly, you
+ 351393 [lyle lylejoh] For starters, your Person class doesn't need to mix-in Enumerable, and
  351398 [chris.pelow ] Thank you very much for your time in helping me here and for your
  351399 [Rob AgileCon] Look very closely at the line having the error and match up all the
  351402 [chris.pelow ] Ugh i'm an idiot. Thanks man.
  351403 [chris.pelow ] Never mind I got it working.
  351419 [shortcutter ] Still a few more remarks: Method #to_s should return something usable
  351420 [chris.pelow ] Thanks alot Robert you've been a great help to me. This is the first

^ welcome here
351390 [one4time gma] ...

^ DRb::DRbObject.alive?
351400 [eregontp gma] I found a feature that seem to be missing to me in DRb.
351408 [shortcutter ] Well, but this is the usual approach.
351460 [eregontp gma] Yeah, you're right.
351479 [shortcutter ] e.

^ RSpec via Ant
351411 [ayumu.aizawa] I'm looking for how to use RSpec via Ant.

^ Help with meta programming
351413 [revshillo ya] I came across the following code in a class called Marker
351425 [marnen marne] Right -- because the parameter is the literal value :drop_location, not

^ Re: Detective - a new ruby gem
351416 [ahmed.eldawy] That's correct. It is not meant to be a kind of reverse-engineering. It

^ Rango 0.1 Released!
351422 [stastny 101i] I am happy to announce the first public release of my new framework
351423 [aldric trevo] Conga Rats! (if I use the full word, apparently I'm spamming).
351424 [stastny 101i] Thanks for interesting link Aldric, I haven't seen it. However this

^ Ruby internals & other questions
351426 [ralphs dos32] Is there a document or website that describes how Ruby works?
+ 351427 [Rob AgileCon] Yes, plenty.  You could start with ruby-lang.org or ask Google for
+ 351428 [marnen marne] Well, every interpreter could be implemented a bit differently.  There
| 351438 [ralphs dos32] Ugh ... you _know_ that is not what I meant!
| + 351440 [aldric trevo] Ralph, you do have to be careful. I got yelled at for answering the
| + 351444 [marnen marne] Why not?  You'd rather do that iteratively?  What kind of masochist are
|   351445 [ralphs dos32] Next time I'll be more of a masochist and lay out a more arbitrary set
|   351447 [aldric trevo] It's a pretty interesting read. Since I've read it, it's occurred
+ 351429 [shortcutter ] Of course not.
+ 351430 [aldric trevo] y = (1..1_000_000).inject { |a, b| a + b }
| + 351432 [Rob AgileCon] y=0
| + 351433 [wyhaines gma] Ugh.  His, while wrong for what he is trying to do (sum from 1 to 1000000)
| | + 351436 [ninja slapha] I find this is actually significantly easier to read, though it's probably
| | + 351627 [eregontp gma] Ah?
| + 351443 [shortcutter ] There is an issue with this approach.  The proper implementation for the
+ 351431 [wyhaines gma] You have the source.  That's often the best way to really understand how a
+ 351434 [ninja slapha] You're going to have to get a lot more specific.

^ Re: ruby-191-p243 or ruby-192-preview Compile error with openssl
351437 [peter.havens] I'm also having this problem. I'm trying to use gcc 4.2.2 to compile
351439 [peter.havens] I should note that I've attempted to replace "STACK" with "_STACK" (a

^ Ruby a good choice for CGI?
351448 [nickhannum g] Ive been messing around with Ruby for a few weeks now, and I'm fairly
+ 351450 [walton vyper] CGI is ok, if and only if your web traffic is very low.  If you
+ 351451 [jgabrielygal] I've been doing little apps with Sinatra and I'm very happy with it.
+ 351452 [ninja slapha] That sounds tailor-made for Sinatra. However, you should learn something about
| + 351453 [marnen marne] You do not RC. :)  Passenger is the same as mod_rails.  mod_ruby is an
| | 351455 [ninja slapha] Ah. And probably not.
| | 351456 [nyarly gmail] get the benefits of mod_ruby (not restarting the interpreter with each
| | 351461 [ninja slapha] I'm confused. Wasn't mod_ruby the one which restarts the interpreter with each
| | + 351464 [marnen marne] Sort of, although I think you can use it with Nginx and Thin.
| | | 351518 [ninja slapha] There's actually some debate about whether or not it can scale. Not something
| | + 351465 [b.candler po] That would be CGI. Each incoming request forks off a new CGI handler,
| |   351467 [nyarly gmail] I wanted to amplify with use cases that run more than one app on the same
| |   + 351468 [marnen marne] And running multiple Rails apps with one Passenger installation is
| |   | 351476 [b.candler po] - although there's some possibility for interaction between them. In
| |   | 351493 [marnen marne] I think it may not be, but don't quote me. :)
| |   + 351519 [ninja slapha] Right, that's the reason most of the older setups called for something like
| |     + 351524 [marnen marne] Trivial.  IIRC, each Passenger app runs as whichever user owns (I think)
| |     + 351528 [b.candler po] *and* ongoing management and tuning - it handles dynamic pools of
| |       351529 [ninja slapha] So does Unicorn, or maybe I'm not understanding.
| |       351533 [b.candler po] From reading this, and the FAQ/Philosophy, it sounds like you configure
| |       351550 [ninja slapha] Ah. Thanks for the clarification.
| + 351498 [nickhannum g] Ok I tried sinatra. It seems like it fires up webrick on port 4567, so I
|   + 351499 [paul pollyan] You can use Sinatra with JRuby to host the app via Google AppEngine,
|   + 351501 [b.candler po] If you have a Rails hosting provider, they can probably host Sinatra
|   + 351520 [ninja slapha] Well, yes and no. Sinatra by default fires up on 4567 using supported servers
+ 351458 [billk cts.co] Others have already mentioned Sinatra, which looks nice.  Another
+ 351463 [usenet-nospa] How many hundred thousand hits a day do you have to process?
  351500 [nickhannum g] Well, HOPEFULLY I'm expecting a lot of hits, but these scripts will also

^ Gem.bin_path LoadError - gem bin directories are not found
351459 [james jcalfe] I installed ruby gems and have been working with rails just fine.  Now,

^ Mocha multiple_yields with arrays
351469 [nappin713 ya] I believe there's a bug in mocha that causes an unnecessary and annoying
351487 [jamesmead44 ] That code snippet looks wrong. The multiple_yields method is a method

^ [ANN] New Ruby Group in Toronto
351470 [devguy.ca gm] we're creating a new Ruby Mentor+hack fest weekend event group here in

^ Reia: goings on of a Ruby-like language for Erlang
351472 [tony medioh.] I was asked about it quite a bit at RubyConf.  Erlang has a certain degree

^ watch the new  http://pilottraininginindia.com/
351475 [varun.m786 g] related to aviation and i used basic html to design this website but

^ Ruby gem , require and version problem
351477 [marc.hoeppne] I am trying to specify the version a gem, which is installed in two
351482 [ryand-ruby z] gem doesn't load any files, it just activates the right gem.

^ DRB class in array
351483 [marvin.mun g] i would like to store an array of this very simple class on a drb server
351485 [b.candler po] class IEB_wrapper1
+ 351489 [marvin.mun g] this seems to let the class reside wherever it has been generated.
| + 351491 [b.candler po] DRb has no real concept of a "server" or a "client" - connections can be
| + 351709 [shortcutter ] DRb does not implement the concept of moving *code* around.  You
+ 352379 [sausheong gm] I have a slightly different problem. I have an array stored in the
  352381 [b.candler po] @observers = [].extend DRb::DRbUndumped
  352387 [sausheong gm] Thanks! That worked, though a bit messier than I would have liked it.

^ Net::SSH and STDIN / Pending jobs
351488 [felipe.coury] I am writing a library that allows the user to run some commands over

^ Heatmaps in Ruby
351490 [marc.hoeppne] I am currently thinking about doing a heatmap for data visualization,
351514 [mguterl gmai] I think there are ruby bindings for R too, so that may help.
351540 [marc.hoeppne] thanks for the link - I suspected that R would probably have that
+ 351546 [jan.svitok g] what you are looking for is "color ramp" or "color gradient", there
+ 351552 [jeanjulien.f] You could be interested in Tioga which can do exactly what you are

^ Net::Telnet - How to send keystrokes like ESC
351492 [rajbabu hotm] Could you pls let me know how I can send in keystrokes such as ENTER and
+ 351505 [ryand-ruby z] and
+ 351507 [b.candler po] Have you tried

^ creating certificates and public and private keys
351494 [adamtemporar] clients and would like to automate the process by using a script (in
351534 [dave lutnos.] Akhtar <adamtemporary@gmail.com> writes
+ 351537 [eleanor game] Akhtar <adamtemporary@gmail.com> writes
| 351543 [Dave lutnos.] Eleanor McHugh <eleanor@games-with-brains.com> writes
| 351564 [eleanor game] <28A32784-C0C7-4B7F-B612-CFBCB7A955F8@games-with-brains.com>, Eleanor =
+ 351551 [yermej gmail] There are also some example uses of Ruby's OpenSSL library in the Ruby

^ Module.nesting strangeness
351496 [alexandre_mu] i'm encountering a weird behavior of the Module.nesting methodd. Here is

^ fft for Ruby?
351497 [efqdalton uo] Anyone know any library for Ruby that implements low level fft n-
351531 [shortcutter ] Found via http://raa.ruby-lang.org/search.rhtml?search=fft leads to
351545 [efqdalton uo] Thanks, it's exactly what i need

^ Pattern match to fail if two periods in a row
351502 [ralphs dos32] Ok ... I really tried.  And I used http://rubular.com/  (really nice)
+ 351503 [jgabrielygal] iods
| 351506 [ralphs dos32] =>> false
| + 351510 [default spir] /\w+\.?\w*/
| + 351525 [shortcutter ] You could try negative lookahead
| + 351571 [steve studio] From http://github.com/alexdunae/validates_email_format_of
+ 351504 [default spir] if ! /\.{2,}/
+ 351539 [aldric trevo] /\.{2,}/
  351541 [shortcutter ] That only positively matches strings which contain at least two dots
  351542 [aldric trevo] I did test it. Just not well. :(

^ Ruby byte access to disk sectors like dd does
351508 [gary oax.net] I have been unable to find any reference to Ruby methods that provide
+ 351521 [billk cts.co] [i think my previous post didn't make it to the list]
| 351544 [shortcutter ] Just a small remark: when using #read for reading I would prefer to
| + 351554 [shevegen lin] Hex Dumping in Ruby! I can hear a code puzzle coming up already!
| + 351565 [billk cts.co] Hmm.  From my point of view, symmetry-for-symmetry's sake can't
|   351598 [shortcutter ] What makes it stop working properly if the file size is a multiple of 16?
|   351614 [billk cts.co] It works OK in either case, is what I was trying to say.  :)
|   + 351634 [gary oax.net] Thank you all for your guidance. I am now able to do with Ruby what I
|   | 351658 [shortcutter ] Question is why do you use #sysread in the first place?  As far as I can
|   + 351662 [shortcutter ] Ah, OK.  Thanks for the clarification!
|     351692 [Rob AgileCon] That sounds like quiz #171 - hexdump - from early this year.
|     351708 [shortcutter ] o be
|     351731 [gary oax.net] My reasons for wanting to use Ruby in place of dd is that I wanted to be
+ 351522 [gwtmp01 mac.] byte-level
| 351536 [eleanor game] byte-level
+ 351635 [djberg96 gma] gem install sys-filesystem

^ Help with regex
351509 [lucasfazprog] Text1\n
+ 351511 [default spir] try putting word metacharacter instead of an any metacharacter
+ 351512 [eregontp gma] s = "Text1\n
  351515 [lucasfazprog] thanks guys. I did not know about string scan!
  351526 [shortcutter ] irb(main):006:0> s="t1

^ Re: invalid date error when installing syntax gem
351513 [marcin.doman] I was getting the same error when installing cucumber (it depends on
351516 [luislavena g] The problem is related to gcc 4.4 and some issue with date parsing.
351549 [vjoel path.b] Thanks!
351935 [bluestar007 ] Any news on this? I'm having the same issue and I guess I'll have to
351937 [vjoel path.b] Victor,

^ Do the inplace edit without backup file generated.
351517 [hongyi.zhao ] Can I do the inplace edit without backup file generated by using ruby?
351527 [shortcutter ] -0[octal]       specify record separator (\0, if no argument)

^ The Best gift for this year christmas day!
351523 [58251896 qq.] The Best gift for this year christmas day!

^ Racc fails on install
351530 [stumpz888 ho] I am very new to ruby but have got things up and running. I'm now trying
351535 [ryand-ruby z] trying
351538 [stumpz888 ho] Thanks for your quick response. I'm actually trying to get Cucumber up
+ 351556 [ryand-ruby z] % cp -r C:\ruby\lib\ruby\gems\1.8\gems\racc-1.4.6 $HOME
+ 351563 [aaron tender] Can you run gem -v?  I highly doubt that cucumber needs a newer version
  351725 [stumpz888 ho] Thanks for the help guys.
  351728 [luislavena g] handy-tips/
  351730 [stumpz888 ho] Thanks so much for this! I think all my problems were caused by a dodgy

^ suggestion: Pathname#freespace
351547 [rogerpack200] Pathname#freespace # tells you how much freespace is available on that

^ Class variables, instance variables, singleton; Ruby v. C++
351548 [ralphs dos32] Newb here coming from C++
+ 351558 [ninja slapha] Yes.
| 351562 [ralphs dos32] I am clueless what all of the above does.  It is WAY over my head.
| 351577 [ninja slapha] What is it you don't get?
| 351585 [ralphs dos32] It is the gestalt ... the world-view ... that I am not getting.  It is
+ 351570 [steve studio] 'The Ruby Programming Language' by Flanagan and Matsumoto describes the
  351579 [dblack rubyp] they make obscure the otherwise rather simple notion that classes can
  351586 [ralphs dos32] David ... this may be the higher-level gestalt that I was missing.  It
  + 351595 [rick.denatal] an
  | + 351620 [ralphs dos32] Rick,
  | + 351689 [dblack rubyp] $ irb191
  + 351688 [dblack rubyp] I have often made the observation that the answer to 75% of all
    351694 [ralphs dos32] Do you mean to say there is a way around using class variables in
    351706 [dblack rubyp] What people usually want to do when they reach for class variables is
    351707 [ralphs dos32] So ... let's see if I get this.
    + 351710 [dblack rubyp] class X
    + 351711 [ninja slapha] Sorry, I don't remember enough C++ to help you here.
      351714 [paul pollyan] Does it?  I thought this would only give @count the value 0 if it
      351749 [ninja slapha] Whoops, yes, I did. You're right.