385415-385935

385214-385773 subjects 385626-387494

[ANN] launchy v2.0.3 released
385415 [jeremy@hi eg] launchy version 2.0.3
385419 [lake@la ed n] Nice work, Jeremy. `gem install launchy`.

ssh v2: how to use send_channel_request?
385430 [dongdan39@gm] Does anybody have some simple examples how to use the

Ruby output formater
385432 [raju.sathliy] I need to display number in 3 digit instead by defaul digit.
+ 385433 [mayank.kohal] Is this what you want?
+ 385434 [josh.cheek@g] You want printf http://ruby-doc.org/core/classes/IO.html#M000894 There is a
  + 385435 [steve@st ve ] puts "%03d" % val
  | 385438 [shortcutter@] Why is that?  As soon as you start using this with multiple arguments it
  | 385451 [steve@st ve ] I dunno, I find it conceptually cleaner, and aesthetically more
  | 385453 [shortcutter@] Absolutely!  I was just being curious.
  + 385436 [raju.sathliy] Thanks Josh for reply !
    385437 [josh.cheek@g] 1. You shouldn't have spaces between your method calls and the parentheses

Is this a float-bug or naive comprehension?
385439 [zipizap123@g] This is my first mail into the mailing list, so please be kind with any
385440 [samuel@ka ol] This is how floating point math works. If you want exact values use
385441 [zipizap123@g] Thanks Samuel for the tip about decimals

What is BasicObject (really)?
385442 [jdmaher@jd a] In a recent thread titled "Unexpected results from private_methods", I
+ 385443 [johnf@bi sb ] 1.) Which results seem inconsistent to you?
| 385450 [jdmaher@jd a] BasicObject's superclass is nil, yet it is both a kind and instance of
| 385460 [jdmaher@jd a] I think you're right.
+ 385463 [bbxx789_05ss] I doubt that memorizing that will be useful.  Understanding the

Ruby formatted output problem
385444 [amulan91@gm ] #include<stdio.h>
+ 385445 [b.candler@po] You'll find all the info you need at
+ 385448 [amulan91@gm ] I tried to find it in this book but I failed. But later found it in doc
  385467 [b.candler@po] No problem. The C program you gave doesn't do anything useful - the

Re: RubyInstaller 1.9.2-p290 released
385447 [rogerpack200] Sweet Tk works in 1.9 without hanging on exit. Thanks!  I don't need

Another year, another Ruby Conf, another round with the begging bowl
385449 [eleanor@ga e] A touch of deja vu here: UK-based full-time open source developer =
385535 [matt@te hn r] Looks like I may not make it.  RubyConf sold out before I even knew
385576 [eleanor@ga e] (http://golightly.games-with-brains.net) on a very restricted budget is =

Ruby + USB + CCTV Camera Driver?
385452 [rgc3679@ya o] I want to write a Ruby driver that handles the feed from A CCTV camera.
+ 385454 [steve@st ve ] I googled for "Ruby USB" and found this: http://www.a-k-r.org/ruby-usb/
| 385456 [rgc3679@ya o] I looked into libusb a month or so ago. Seems incomplete and no actual
| 385458 [steve@st ve ] Hm, well, maybe the serialport gem would work? I mean, USB is serial,
+ 385459 [wruyahoo05@c] Are you sure your camera actually delivers a digital signal and not
| 385461 [rgc3679@ya o] Horizontal resolution: 420TVL  480TVL  540TVL  600TVL  420TVL
| 385462 [hassan.schro] That sure sounds analog to me  :-)
| 385464 [rgc3679@ya o] Does that means 1.0 volt peak-to-peak at 750 Ohms?
| 385471 [hassan.schro] Uh, no. Short version, you need hardware to digitize the incoming
| 385474 [cmdjackryan@] To make this even worse: You need an analog-digital converter that is
| 385477 [rgc3679@ya o] It's not clear whether you guys think a software ADC is impractical or
| + 385478 [hassan.schro] Shortest possible answer:  Yes.
| + 385481 [cmdjackryan@] It's not impossible. It's just so very impractical that it might as well be=
| | 385510 [rgc3679@ya o] Thanks for the education - very much appreciated!
| | 385512 [cmdjackryan@] You are welcome! Though, it is a really, really abbreviated
| | 385545 [rgc3679@ya o] I agree, too much trouble trying to retrofit an analog to my product.
| | 385546 [cmdjackryan@] Sure. via HTTP, FTP, &c. Ruby doesn't much care about the hardware you
| | 385548 [rgc3679@ya o] Thanks again. I am studying the Ruby Sockets class now and will see if I
| | 385549 [cmdjackryan@] Take a look at Mechanize, too: It allows you to programmatically
| + 385488 [b.candler@po] Bog-standard "webcams" are about half that price, and plug straight into
|   + 385489 [b.candler@po] Ones which turn up in a quick search: Plantex CS-TX04F, Edimax IC-3005
|   + 385511 [rgc3679@ya o] Thanks Brian! I will study these cameras and start looking in this
+ 385466 [b.candler@po] Why not try wiring the centre pin of the BNC to Live, and the outer

RubyConf tickets
385457 [matt@te hn r] I didn't even see an annoucement that tickets had gone on sale and now
385491 [josh.cheek@g] I saw it announced on Twitter.
385507 [matt@te hn r] Ah, I don't do twitter.  In previous years it was announced on this list.

Ruby Readline - and why ruby can learn from python
385465 [shevegen@li ] Lately I wanted to have <TAB> completion work for some of my scripts
+ 385468 [justincollin] ...
| 385469 [markus@fi ch] Any noticed this?
+ 385473 [markus@fi ch] I really had to smile benignly when I read your post.
+ 385479 [bbxx789_05ss] Only the idiots that run the ruby world can answer that.  My favorite
+ 385483 [steve@st ve ] If you'd like to help make Ruby's documentation better, it's actually

Question about Ruby Gems
385470 [tyrelrichey@] Am I wrong in the understanding that the ruby gems that add
+ 385475 [cmdjackryan@] Yes and no. RubyGems *can* be used to distribute gems that include
+ 385480 [stu@ru yp og] It depends on what your needs are. You can also embed ruby( and any
+ 385482 [tyrelrichey@] Thank you guys... or gals
+ 385508 [mcpierce@gm ] Ruby gems aren't about extending Ruby, per se. Instead, they are a way

Sending variable from a controller to other file.rb
385472 [arturo@je co] ruby file that I have in the root of my application. The thing is that I
+ 385476 [sduncan@we a] Because you are invoking another ruby interpreter it won't share
+ 385484 [code@ap th o] If you're using a halfway sane platform, you could pipe a text stream
+ 385490 [shortcutter@] There is a number of choices some of which have been mentioned already.
+ 385519 [arturo@je co] Thanks to everybody, I solved this issue using the solution of the

forcing all http requests to follow system proxy configuration
385485 [gp.eunikorn@] I am working with a ruby application that uses some loosely coupled
+ 385486 [anurag08priy] require 'net/http'
| 385487 [anurag08priy] I meant,
| 385538 [samuel@ka ol] I've been working on a gem that lets you force TCPSocket to use a proxy.
+ 385559 [gp.eunikorn@] @Anurag
+ 385560 [gp.eunikorn@] @samuelkadolph
  385561 [samuel@ka ol] rake install works for me in 1.9.2 and 1.8.7. It does use bundler so you

Get common entries in two arrays
385492 [ibc@al ax ne] arrayA = ["qqq", "www", "eee"]
+ 385493 [ibc@al ax ne] Of course I mean a method which perhaps I miss in Array class. If not,
| 385494 [g.diemant@gm] arrayA | arrayB should do the trick
| + 385496 [g.diemant@gm] damn. arrayA & arrayB is it.
| + 385499 [jgabrielygal] That would be the union. He's looking for Array#&
+ 385495 [jgabrielygal] ruby-1.8.7-p334 :001 > arrayA =3D ["qqq", "www", "eee"]
| 385498 [ibc@al ax ne] El da 19 de julio de 2011 12:19, Jess Gabriel y Galn
+ 385497 [luc@ho k- on] arrayC =3D arrayA & arrayB

Best practice for writting test for my gem
385500 [g.marcilhacy] I want to start writting test but I don't know where to start, I never
+ 385504 [luislavena@g] It introduces the Red, Green, Refactor process endorsed by TDD.
+ 385505 [mikbe.tk@gm ] Well, first you should understand that while it's not uncommon to have to

How to change date format from Y/m/d to Y-m-d
385501 [annie.smith.] Do you know how to change date format from Y/m/d to Y-m-d in ruby?
+ 385502 [lake@la ed n] Check out strftime.=20
| 385506 [annie.smith.] Thanks!
+ 385503 [g.marcilhacy] DateTime.now.strftime("%Y-%m-%d")
+ 385515 [fighter.lyt@] def convert!(time)
  385522 [b.candler@po] Aside 1: it's unconventional to put an exclamation mark at the end of a method name, if the method does absolutely nothing dangerous, nor does it modify the receiver.

A beginner question.
385509 [cajus_@ho ma] grandmother who cannot hear well. you need to write everything in
+ 385514 [mikbe.tk@gm ] Test for BYE before answering.
+ 385516 [cajus.96@wi ] Sorry Im not sure what you mean. The program has two Rules, if your
| 385518 [mikbe.tk@gm ] You have something that tests for "BYE" and exits right? And you have
+ 385517 [hanmac@gm .d] pseudocode
+ 385520 [cajus_@ho ma] Sorry i uploaded the wrong file. Heres the right one.
| + 385521 [mikbe.tk@gm ] OK, so now do what we said. Move the logic for the BYE test to before the
| + 385524 [stu@ru yp og] homework. seen this before.
|   385525 [cmdjackryan@] That's because it's one of the first exercises for Chris Pine's Learn
|   385526 [stu@ru yp og] Ok now I understand where it came from. Just triggered the reaction as
|   385603 [rubyinfo@ap ] Is that Finnish?
+ 385523 [cajus.96@wi ] Thanks i I got It now and learned a bit more about looping.

[ANN] 23 More Days Until LSRC V
385513 [jimfreeze@gm] Howdy

[ANN] test-loop 12.3.0
385527 [sunaku@gm il] test-loop - Continuous testing for Ruby with fork/eval

Code works in IRB but not when saved and run (NET/TOC)
385528 [ovashena@gm ] I'm using the net-toc gem to connect to AIM with Ruby 1.8.7 since 1.9.2
+ 385529 [Carey.Nation] Irb is keeping the session alive.  Maybe it's not working because your script is exiting before it can?
+ 385530 [eric@le ur e] Do you get any errors?
+ 385533 [ovashena@gm ] Wouldn't a sleep(5) at the end of the script test for this?
+ 385534 [ovashena@gm ] No errors. The rb file completes-- but the account never signs on and no
| 385536 [eric@le ur e] So I ran your code.  I notice that client.connect returns a separate thread,
+ 385540 [ovashena@gm ] One big issue with my original code was not stripping the gets-- the

Question running Rubywmq sample program
385537 [ruby.student] I am trying to run the first Rubywmq sample program provided and I am having

Send Fax from a Linux Box
385539 [idealone5@ho] I am looking for a solution to send multiple emails to a fax
+ 385543 [nosuzuki@po ] This might not be you are looking for but sendfax in mgetty is my
+ 385552 [christophtra] You can use net/smtp to directly send mails from your script without
+ 385553 [trednu@gm il] 2011/7/20 Shekar Ls <idealone5@hotmail.com>

Splitting strings
385542 [ryan@so li s] I have a text file with phrases that I'm looking to split into chunks.
+ 385544 [bbxx789_05ss] lines = [
+ 385551 [ryan@so li s] You're right. I'm still a beginner to Ruby, however I have still tried
| + 385554 [shortcutter@] Ryan, since you brought up communication skills: from your original
| + 385557 [bbxx789_05ss] As a beginner to ruby programming, you should be writing all programs
|   + 385562 [shortcutter@] Did you really post this through the forum?  Interestingly there I
|   + 385563 [cmdjackryan@] Good artists create. Great artists steal.
|     385564 [lake@la ed n] I laughed out loud when I read this.=20
+ 385571 [ryan@so li s] Ok, taking on board all what has been said so far... this is what I'm
| + 385572 [cmdjackryan@] Check File#read (either "ri File#read" on the command line, or on
| + 385573 [shortcutter@] Unfortunately there is still a lot of room for interpretation left...
+ 385574 [ryan@so li s] Your example works perfectly, thank you!
| 385598 [shortcutter@] You're welcome!
+ 385640 [ryan@so li s] Ok, so far at the minute then I have included the counter hash so I have
  385659 [shortcutter@] At the moment I would be surprised to see any output from counts because
  385785 [ryan@so li s] Sorry that was a typo with the 'if'. I changed that to 'f'.
  385786 [shortcutter@] I think you got that information above (see
  385802 [ryan@so li s] Ah yes I see what you mean now. Ok so now I'm left with trying to use

copy range of lines to another file based on regex match
385547 [neubyr@gm il] I am writing a script to search for a particular string in a file and
+ 385550 [jgabrielygal] Forget about line numbers, you are already iterating over the lines,
+ 385555 [shortcutter@] $ sed -n -e '/rx/,$ {s/foo/bar/g; p}' a_file

File copy from Client to Server via web-services
385556 [mail2sanand@] I am trying to use Apache Thrift for creating an API offering many
385558 [jgabrielygal] File.new('<new_file_path>','wb'){|f| f << transferred_file_content}
385569 [mail2sanand@] Hats Off to you Jesus. Thanks for the help. I got it. Will revert if any other issues

error building ruby p290
385565 [devguy.ca@gm] I get the following build error on my Linux box while trying to build
+ 385566 [devguy.ca@gm] i currently have ruby 1.9.2p136 install with rdoc 3.8
| 385567 [shortcutter@] Obviously the wrong rdoc is invoked.  Strange, this did not happen to
| 385584 [devguy.ca@gm] my evn: i have rdoc 3.8 installed, still getting build error?
+ 385587 [drbrain@se m] ./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb
| 385588 [devguy.ca@gm] i assume that's all in one line? here is what I got
| 385589 [drbrain@se m] build
| 385646 [devguy.ca@gm] cument'
| + 385648 [devguy.ca@gm] ...
| + 385649 [drbrain@se m] 1.9.1 is the API compatibility version.  1.9.1 is expected.
|   385651 [devguy.ca@gm] workaround fixed my issue. i've opened a new ticke and assigned it too
+ 385727 [shevegen@li ] Don't forget to add a ticket so that other pure souls are not running

[RDoc internals] Changing the RDoc formatter
385568 [sutniuq@gm .] I'm currently writing on a PDF generator for RDoc based on LaTeX. I'm
385581 [drbrain@se m] and
385674 [sutniuq@gm .] (Sorry for the late response, been busy last days)
385675 [drbrain@se m] in needing it.  I'm also not sure what I should write about it. Using =

StringScanner using skip_until not detecting special characters
385577 [bcfruin@gm i] I am trying to parse a string until the first occurrence of a word. This
+ 385578 [bcfruin@gm i] I am trying to parse a string until the first occurrence of a word. This
+ 385579 [bbxx789_05ss] #encoding: utf-8
+ 385580 [bbxx789_05ss] 1.8.7

[ANN] rubygems-sandbox 1.0.0 Released
385583 [ryand-ruby@z] rubygems-sandbox version 1.0.0 has been released!

[ANN] omnifocus-github 1.0.2 Released
385585 [ryand-ruby@z] omnifocus-github version 1.0.2 has been released!

ArgumentError - invalid byte sequence in UTF-8
385590 [iainspeed@gm] Every now and then I get errors relating to UTF8 encodings, and each time I fail to (guess) find the right combination of words to get Ruby 1.92 to play nice with some string it doesn't like.
+ 385594 [bbxx789_05ss] 1) No matter what you do, there can always be an invalid byte sequence.
+ 385601 [b.candler@po] Are you sure it's that particular line which splits out the error?
  385739 [iainspeed@gm] design=20

Net:FTP hanging
385591 [patrick@re b] I have an odd situation occurring with Net::FTP.

array max value
385595 [dickyhide@gm] When I set an array k = [3,5,6,0,1,4,5,6,9,1]
+ 385596 [adgar@ca bo ] k.index(k.max) will work. It's not completely optimal, but it's concise =
| 385597 [shortcutter@] Here's another approach which is a tad more involved and iterates the
+ 385599 [list.push@gm] What if you have an array like this [3,5,6,0,1,4,5,6,9,1,9] ?
| 385600 [adam@ap es o] Excellent example. :)
+ 385916 [eshadesai_88] irb(main):035:0> k = [9, 9, 6, 0, 1, 4, 5, 6, 9, 1, 9]
+ 385924 [lleoem@gm il] @esha_d you walk the n-element array once for the collect call. And
+ 385927 [list.push@gm] k = [3,5,6,0,1,4,5,6,9,1,9]
+ 385935 [lleoem@gm il] @Harry Thanks. I am new to ruby. I look at these kinds of things to help

[ANN] Only 3 Weeks Until LSRC V!
385602 [jimfreeze@gm] Lone Star Ruby Conference V, held Aug 11-13 in Austin, TX, is only 21 days way.

How to replace "\" from string.
385611 [shahgomji@gm] I have string something like
+ 385613 [shortcutter@] This is a topic which comes up over and over again.  I am sure you'll
+ 385614 [hanmac@gm .d] path =  "C:\Gaurang\ruby\demo.xls"
+ 385616 [yourelguapo@] I believe you need to add delimiters, it should look like
| 385625 [mcpierce@gm ] No, you don't. It's two separate arguments.
+ 385618 [hanmac@gm .d] 1. var is named wrong
| 385621 [shahgomji@gm] I have used "\\" instead of "\" coz "\" is a escape character.
+ 385623 [hanmac@gm .d] ya
+ 385624 [mcpierce@gm ] Are you _assigning_ the return value of the above call to another object
+ 385668 [josh.cheek@g] At this point, print the string and you will see easily what the problem is.

How to find the character in string
385612 [shahgomji@gm] I have a string where i need to find out if particular character is
385617 [hanmac@gm .d] its because "\\" is not in your string see my post in your other thread
+ 385619 [shahgomji@gm] yes you are right my string doesn't contain "\\", however I am using
+ 385620 [shahgomji@gm] yes you are right my string doesn't contain "\\", however I am using

Building a tree from the leaves down
385615 [transfire@gm] Have a algorithmic problem, I can't quite get a clear idea of how to
+ 385622 [shortcutter@] A single Hash can never be a tree.
| 385634 [zettabyte@gm] For fun, here's my OO-oriented approach with inspiration (though different)
| 385791 [transfire@gm] t)
+ 385643 [josh.cheek@g] class CaseObject
+ 385645 [drbrain@se m] This is already a tree.
  385658 [shortcutter@] So it's a forest and not a tree. :-)
threads.html
top