399454-410909

399263-400301 subjects 399702-400003

Aptana 3 code assist
399454 [neomex@on t.] From default Aptana 3 automatically closes ", brackets and
399460 [lists@ru y- ] Preferences.. Editors...
399462 [neomex@on t.] Thanks a lot.

FloatDomainError while rounding
399458 [lists@ru y- ] I am Trying to Round a number in my code which is as follows
+ 399459 [jgabrielygal] Can you print @den1 and @den2 after setting them? If they are equal,
+ 399464 [lists@ru y- ] Yes I have printed @den1 and @den2 but both of them are not same. even
| + 399465 [jgabrielygal] OK. Let's simplify. Can you show the minimal piece of code that
| + 399467 [alexg@ru ge ] In that case @num must be Infinity (or -Infinity). Possibly @a or @b
|   399468 [alexg@ru ge ] Apologies, I didn't read your second paragraph closely enough. If your
|   399528 [lists@ru y- ] 100000000000000001097906362944045541740492309677311846336810682903157585404911491537163328978494688899061249669721172515611590283743140088328307009198146046031271664502933027185697489699588559043338384466165001178426897626212945177628091195786707458122783970171784415105291802893207873272974885715430223118336
|   399543 [alexg@ru ge ] Are you really sure that such a large number is the correct output from
+ 399545 [lists@ru y- ] Thanks for that I'll definitely try it out.

Re: RubyFrontier 1.1 Released
399466 [lists@ru y- ] Nice work Matt. That's pretty cool.

Overriding Object#clone vs. Overriding Object#dup for Deep-Cloning
399472 [yaserbuntu@g] Is there a community convention that specifies which of the two methods,
+ 399477 [shortcutter@] Those answers are not good because in part they are just plain wrong.
+ 399478 [lists@ru y- ] both methods use internal an method called initialize_copy
+ 399554 [lists@ru y- ] There is a dclone() method that is added to the Array class, by the

[ANN] JRuby 1.6.8 Released
399476 [tom.enebo@gm] JRuby 1.6.8 Released

Ruby SQL Select Sum 2 Columns?
399479 [lists@ru y- ] I have the following definition which is looking at an apache database,
+ 399490 [lists@ru y- ] Can you put the code in some form of onine pastie or make it a gist?
+ 399513 [lists@ru y- ] Sorry, I don't know what either of those are.  Here is a smaller
| 399516 [keystonelemu] You might look into Sequel or Active Records for SQL. They take quite a bit o=
+ 399669 [lists@ru y- ] I have looked all over for this issue, and there is so little
| 399670 [hassan.schro] connection = java.sql.DriverManager.getConnection(db_url, user_name,
+ 399671 [lists@ru y- ] When I add
| 399674 [hassan.schro] irb, console, whatever REPL you're using is irrelevant.
+ 399675 [lists@ru y- ] I think that is my problem.  I have the statement executing, but I just
+ 399676 [lists@ru y- ] When I add puts rows.class
| 399677 [hassan.schro] One More Time: READ THE DOCS FOR THAT CLASS.
+ 399678 [lists@ru y- ] Thank you for talking through it with me.  I ended up figuring out I

win32ole used to work in 1.8, fails in 1.9 - help
399505 [lists@ru y- ] here is my code that fails in 1.9....it used to show a popup under
+ 399506 [lists@ru y- ] I should add windows is windows XP, sp3
+ 399507 [lists@ru y- ] Works for me.
+ 399512 [lists@ru y- ] def self.popup(msg)
+ 399521 [lists@ru y- ] Worked for me in the first way.
+ 399557 [lists@ru y- ] perhaps the local var wsh is going out of scope when the method ends ??

net-https error on x509 certs
399511 [lists@ru y- ] I am trying to send a GET request to a https URL which requires passing
+ 399539 [lists@ru y- ] expecting a String.
+ 399655 [lists@ru y- ] Thanks Brian, that solved the issue.

uninitialized constant VoiceSynth (NameError)
399515 [neomex@on t.] I'm trying to access singleton class from different file and above error
+ 399517 [matma.rex@gm] Have you tried using  require_relative 'vsynth'? require './vsynth'
| 399518 [neomex@on t.] None of these work.
+ 399520 [lists@ru y- ] How many files named vsynth.rb do you have in the current directory?
  399546 [neomex@on t.] Only one.

Just for knowledge sharing
399519 [raj_abc38@ya] ...

behavior of iterator methods
399523 [lists@ru y- ] I am a Ruby-beginner.
399526 [gennady-ruby] Just because you presented 2 totally different cases: in the first one =
399533 [tmaekawa@jc ] This explain makes sence. I've understood.

the behavior of iterator methods
399524 [lists@ru y- ] Sorry, I deleted my previous post on the ruby forum by mistake.
+ 399527 [jam@ja an be] Some methods change objects in place, others return a changed object and lea=
| + 399535 [keystonelemu] You may also want to look into the map method for similar functionality.
| | 399536 [tmaekawa@jc ] Thank you for the explanation.
| + 399592 [cliff.rosson] So you can accomplish what you want like so.
|   399620 [ruby-talk@la] a.map! {|x| x + 1}
+ 399532 [lists@ru y- ] Hmm....the typically crummy ruby docs are no help: each() returns an
| 399534 [tmaekawa@jc ] That's where I misunderstood.
+ 399538 [lists@ru y- ] s.each{|c| c << "X"}

[ANN] RubyWorld Conference 2012
399540 [shugo@ru y- ] I'm Shugo Maeda, the secretary general of the RubyWorld Conference.
399544 [botpena@gm i] wow.
399548 [matz@ru y. r] We provide simultaneous interpreting for some sessions.
399549 [rubytalk2dav] If that city is anything like Tokyo, you probably won't need much

Splat operator and different options to pass a block
399547 [calvin.bornh] I'm currently experimenting a bit in Ruby, to get a feeling of how the
399550 [lists@ru y- ] First of all, this isn't really a useful technique, because Ruby already
399551 [calvin.bornh] thanks for your answer. I really appreciate it.
399580 [stuartjrose9] I'm currently experimenting a bit in Ruby, to get a feeling of how the=20

still learning by doing - connecting rooms in a game
399556 [lists@ru y- ] I am facing another problem with my next "project".
+ 399570 [hmaddocks@me] Zed.
| + 399574 [lists@ru y- ] Why exactly?
| | 399575 [hmaddocks@me] It teaches you to write Ruby as if it's Python and this...
| | 399576 [lists@ru y- ] Could you be so kind as to suggest another book? I mean there are many
| | 399585 [lists@ru y- ] I've just bought the pickaxe 1.9 and I'll start there.
| | + 399593 [peterhickman] Ok just a few points on the code that you did write.
| | | 399962 [lists@ru y- ] I tried this and I removed the attr_accessor line and had the methods
| | | 399964 [lists@ru y- ] What do you mean by "doesn't work"? The class does exactly what it
| | | 399966 [lists@ru y- ] That's what I meant. I guess it wasn't clear from my initial code that I
| | | 399967 [lists@ru y- ] No, you only need to define setter methods (i. e. methods ending with a
| | | 399974 [lists@ru y- ] thank you for this explanation.
| | | 399981 [lists@ru y- ] OK, then you should have told us the exact error message.
| | | 399988 [lists@ru y- ] You're right, I should have put the exact error. It was an unintentional
| | + 399611 [hmaddocks@me] If you are going to learn ruby then you should have a copy of the PickAxe, but the issues I pointed out weren't specifically Ruby issues, more algorithm and object oriented design issues. Unfortunately OOD books tend to be a bit dry. The best way to become better at OOD is to look at good OO code and write lots of code yourself.
| |   399612 [jam@ja an be] On Sep 21, 2012, at 6:09 PM 9/21/12, Henry Maddocks <hmaddocks@me.com> =
| |   399613 [hmaddocks@me] I was going to suggest the refactoring book because it shows you how to make your code 'better' and gives you reasons why it's better. It's a bit advanced though.
| + 399656 [shortcutter@] Ack.
|   399680 [lists@ru y- ] Thank you all for recommending the reading and all the suggestions and
|   399681 [jgabrielygal] It looks that there is a common algorithm for handling all rooms, so
|   399682 [hmaddocks@me] initialize
|   399855 [lists@ru y- ] I've try to follow the above guidelines. I've read about the inheritance
|   399860 [lists@ru y- ] I've also just added the amended runner.rb. I used the same logic as in
|   399869 [lists@ru y- ] ROOMS = {"side_hallway" => side_hallway, "child_bedroom" =>
+ 399914 [lists@ru y- ] I have problems with pushing items to player's satchel.
+ 399917 [lists@ru y- ] the item does get pushed into the array, but when you call
  399918 [lists@ru y- ] it get reset by just calling it?
  399931 [lists@ru y- ] The method assigns a new array to @satchel. So each time you call it,

Ruby Conferences for Students
399558 [keystonelemu] I'd love to be able to go to a Ruby conference, but 350$ is somewhat
399562 [rubytalk2dav] There are occasional free conferences (and "unconferences").  For
399567 [keystonelemu] Keystone is a reference to the ski resort in Colorado, a normal addition to

Re-throwing an exception
399560 [lists@ru y- ] Within Ruby, what is the proper way of re-throwing caught (rescued)
+ 399561 [matma.rex@gm] You can re-raise the rescued exception by calling `raise` with the
| 399564 [lists@ru y- ] Thank you for the reply
+ 399565 [lists@ru y- ] begin
+ 399566 [lists@ru y- ] While your exception code works, it's not how you should use the "raise"
  399569 [ryand-ruby@z] "raise"=20

How would you allow variable from specific list of Fixnum?
399572 [eliezer@ng e] def initialize(type= nil,location=nil,mode=17)
+ 399573 [lists@ru y- ] class ModeError < Exception
| 399578 [matma.rex@gm] I'd use ArgumentError instead of SyntaxError.
+ 399584 [lists@ru y- ] Why is everybody using this Java-like exception syntax nowadays? Is
| 399595 [lists@ru y- ] Because that syntax is dumb?
| 399604 [eliezer@ng e] newregex = /[\d]+/
| + 399605 [keystonelemu] ult is the same.
| | + 399608 [eliezer@ng e] Thanks.
| | + 399614 [matthew@ke w] #=~ is the test-using-this-regex operator, #= is the assignment
| + 399673 [lists@ru y- ] In the first, you are using a Regexp literal. This is immutable, and you
+ 399652 [shortcutter@] I'd use one of

ruby - remote method invocation
399577 [lists@ru y- ] How to start/run a ruby program in a remote machine in a LAN using a
+ 399579 [jam@ja an be] Net-ssh. Or capistrano!
| 399599 [cliff.rosson] I am no expert but I use this to manage devices.
+ 399600 [keystonelemu] Either using ssh, the netssh gem, or by using sockets to implement communica=
  399621 [lists@ru y- ] Thank you everybody.. for you amazingly helping words.. I think I'll go
  399651 [shortcutter@] There's also DRb.  Although then you have to

Proc and lambdas
399582 [lists@ru y- ] I am confusing about Proc and lambdas.
+ 399583 [ruby-talk@la] Why is that a requirement?
+ 399586 [lists@ru y- ] This is not a homework forum. Apart from that, your description is far
  399596 [keystonelemu] Suggested reading is on Blocks, Procs and Lambdas: http://bit.ly/NGQTjT

Need advice on a process
399588 [lists@ru y- ] I am making a FB app that has just one page that needs to deal with the
399597 [keystonelemu] I would look into either Sequel (Ruby only app) or ActiveRecord (if you're
399598 [lists@ru y- ] Thanks for the reply. I have got the db etc sorted, I'm using sinatra,

run muliple scripts simultaneously!
399601 [lists@ru y- ] Im new in ruby and my english is really bad, so i hope you can
399606 [lists@ru y- ] What operating system are you running on, and what is your reason for

DB2CLI.dll issues..
399603 [lists@ru y- ] I've programmed before but never with anything involving databases, so

[ANN] ruby_parser 3.0.0.a7 Released
399607 [ryand-ruby@z] ruby_parser version 3.0.0.a7 has been released!

[ANN] hoe 3.1.0 Released
399609 [ryand-ruby@z] hoe version 3.1.0 has been released!

[ANN] minitest 3.5.0 Released
399610 [ryand-ruby@z] minitest version 3.5.0 has been released!

unsubscribe
399616 [drhapsody@ro] ...
399617 [egor.odessa@] unsubscribe

"percent-encoding" and "application/x-www-form-urlencoded"
399618 [lists@ru y- ] "Percent-encoding, also known as URL encoding, ... is also used in the
+ 399628 [lists@ru y- ] So yes the body of your POST must be encoded.  As far as what ruby does?
+ 399629 [matthew@ke w] I think there's some confusion here. The data you're sending looks like
+ 399630 [lists@ru y- ] Anybody know where the method req.set_form_data appears in the ruby
| 399653 [shortcutter@] robert
+ 399684 [lists@ru y- ] Thanks.

Very important question - survey
399623 [lists@ru y- ] Is matz more like a ninja or more like a samurai?
+ 399624 [neomex@on t.] ninja -> china
| 399625 [peterhickman] Ah and I was hoping no one would respond to this thread but as you
| 399631 [neomex@on t.] Sorry for not being omniscient, infallible being
| 399633 [peterhickman] Welcome to the internet where facts are just a search away :) - if you
| 399635 [neomex@on t.] You know, I can't recall where I heard that, I guess it was some forum
| 399636 [peterhickman] Yeah I was being a dick about it. Sorry about that
| 399637 [neomex@on t.] No problem, appreciate that.
| 399638 [keystonelemu] Remember, Matz is nice so we should be too. Let's not make this into OpenBSD=
| 399639 [jonanscheffl] Incidentally, his business card has a picture of a samurai on the back.
+ 399634 [lists@ru y- ] Get a life, Peter. I think this thread was supposed to be fun, not a

Fix to very serious and annoying issue of devise - Rails
399626 [raj_abc38@ya] ...
399627 [whitequark@w] First, this is not a Rails mailing list.

Webframework without monkey patching
399640 [perfectly.no] Is there a Ruby webframework that doesn't monkeypatch or extend
399642 [jam@ja an be] Sinatra doesn't, I think.=20

Webframework that separates validation from persistence
399641 [perfectly.no] Is there a Ruby webframework that doesn't couple validation with persistence?
399648 [lists@ru y- ] Do you mean you want something that validates forms rather than models,
399654 [perfectly.no] Yes, although I've never used Django.

How to parse a json output
399643 [lists@ru y- ] I am trying to read about json output , buts its getting little bit of
+ 399644 [lists@ru y- ] require 'json'
+ 399649 [lists@ru y- ] puts result.inspect
+ 399667 [sto.mar@we .] in case you do not know beforehand which exact key to look for,
+ 399668 [sto.mar@we .] in case you do not know beforehand which exact key to look for,

sandwhich principle (ruby koans)
399646 [rwobben@ho m] ...
399647 [carlos.agari] Roelof,
399650 [shortcutter@] Another pattern which has a similar structure and uses abstract
399657 [rwobben@ho m] ...
399660 [shortcutter@] DRY is a meta principle: the reduction of redundancy (or: repetition)
399662 [rwobben@ho m] ...

Insert at index
399658 [lists@ru y- ] Is there any alternative for insert in string. I need to insert
+ 399661 [wbrisett@at ] modifies
+ 399663 [lists@ru y- ] Thank you Wayne, But
| 399664 [shortcutter@] The last two outputs have order of "a" and "b" reversed - that can
| 399666 [lists@ru y- ] coooool,..
+ 399672 [lists@ru y- ] => "foobar"

Sending "\n" in socket programming.
399659 [lists@ru y- ] multiple lines, i.e. it contains "\n".
399665 [shortcutter@] That can be simplified to

beginner question.
399683 [lists@ru y- ] I'm sure this has been asked before, but I was looking for some help.
399686 [ian.asaff@gm] IMO, the best way to learn is to pick something you have no idea how to do.
399687 [carlos.agari] Ian's advice is a very good one. I started to pick programming when a group
399688 [lists@ru y- ] Thanks ill try to do that

Unable to run cucumber
399685 [lists@ru y- ] I have just created a new cucumber test framework and this is what it
399689 [jam@ja an be] ...

image processing
399690 [lists@ru y- ] I'm trying to build a program meant to recognize plants by looking at a
+ 399691 [eliezer@ng e] If you find something about the subject please send it to me on the way.
| 399692 [jam@ja an be] A crude start could be doing a diff in imagemagick.
| 399694 [ralf.mueller] +1
| 399703 [alexander.i.] I think you could use neural networks too.
| 399831 [markus@fi ch] Coursera.org provides a course starting next week, see details at
+ 399724 [lists@ru y- ] Thanks a lot everybody for all your answers and suggestions!
+ 399835 [sophrinix@gm] I'm doing this kind of detection with animals.
| 399836 [sophrinix@gm] One more thing, brush up on your calculus, matrix algebra, statistics, and
| 399879 [mpalhas@gm i] What you want to do, particularly the "combine two images from different
+ 410909 [lists@ru y- ] color adjustment, image sharpen can all be found in this image

Need Help With Ruby Event Manager(Jump Start Lab)
399693 [lists@ru y- ] language.
399701 [jam@ja an be] On Sep 25, 2012, at 12:34 AM, "Kaushik Sharma L." <lists@ruby-forum.com> wro=
399731 [lists@ru y- ] Hey Jam! Thank you very much for replying.

inject problem
399695 [rwobben@ho m] ...
+ 399696 [jgabrielygal] count = [1,2,1,1]
+ 399697 [peterhickman] Well the simplest error is the count.inject{| ... |} part. The stuff
| 399698 [prasad.c82@g] try this,
+ 399699 [lists@ru y- ] Using "inject" really isn't a good choice here. If at all, I'd use
| 399700 [jgabrielygal] count = [1,2,1,1]
| 399705 [rwobben@ho m] ...
| + 399706 [peterhickman] array = [ 1, 2 , 1 , 1]
| | 399709 [rwobben@ho m] ...
| | 399715 [sandor.szuec] = 1; x}
| | 399717 [rwobben@ho m] ...
| | 399721 [lists@ru y- ] Yeah, you seem to have forgot "return total" at the end of the method
| | 399722 [rwobben@ho m] ...
| + 399707 [lists@ru y- ] Haven't you read the other postings? :-(
|   399708 [rwobben@ho m] ...
+ 399710 [lists@ru y- ] The first parameter of the "inject" block is always the intermediate
| 399712 [rwobben@ho m] ...
| + 399713 [rubytalk2dav] This would imply that dice[el] is nil.  Not surprising, since |el| is
| + 399716 [lists@ru y- ] You want h[el] += 1, not dice[el] += 1. See the original code by Jess.
|   399719 [rwobben@ho m] ...
+ 399725 [lists@ru y- ] You're iterating over the wrong object. After you've build the hash, you
  399737 [rwobben@ho m] ...
  + 399740 [lists@ru y- ] Well, I wouldn't rely too much on the IDE. The danger of this is that it
  | 399743 [rwobben@ho m] ...
  + 399741 [jgabrielygal] I think you should not structure the code this way. I think you should
    399745 [rwobben@ho m] ...
threads.html
top