351553-352182

351333-352387 subjects 351755-356727

^ Re: Class variables, instance variables, singleton; Ruby v.
351553 [marnen marne] Yes.
351569 [marnen marne] Then read it 13 times, or find supplementary material on the Web.
351588 [marnen marne] Right.
351591 [ralphs dos32] Didn't the interpreter parse it?
351605 [ninja slapha] Yes, syntax errors are caught immediately by parsing. But think of instance
351623 [ralphs dos32] Cool.
+ 351633 [marnen marne] Wrong.  attr_accessor really doesn't break encapsulation in the
+ 351638 [flo andersgr] The reason that instance_variable_get exists is solely to allow dynamic
+ 351680 [ninja slapha] These are separate questions.
  + 351686 [ralphs dos32] Oh, wow, what a great explanation!  Thanks for taking the time.  Wow.
  | 351695 [marnen marne] Yes, and it's been discussed in this thread.  Go reread.
  + 351834 [ shot hot.pl] Also, if they=E2=80=99re accessing @slope directly, they deserve punishment

^ Ruby on Rails Mailing list: http://lists.rubyonrails.org/mailman/listinfo/rails
351555 [ralphs dos32] Is this list dead?  I'm trying to join but I'm not getting a response

^ Re: Ruby on Rails Mailing list: http://lists.rubyonrails.org
351557 [marnen marne] Where did you get that link?  The Rails list is hosted at Google Groups

^ Windows Pop Up
351559 [johnsheahan ] I don't normally run ruby scripts on my windows machine but in this
+ 351561 [rogerpack200] checkout visualuruby -- its examples probably contain one somewhere. Of
+ 351583 [sutniuq gmx.] For Windows, it should work with the MessageBox function from the
  351589 [johnsheahan ] Thanks ALOT Marvin...that worked perfectly and saved me a ton of time.
  351592 [sutniuq gmx.] I'm happy I could help you ;-)
  351597 [johnsheahan ] Thanks again Marvin...
  351610 [sutniuq gmx.] Change your script's file extension to ".rbw". That should cause Windows
  351611 [sutniuq gmx.] Ouch. rubyw.exe I meant.
  351621 [johnsheahan ] I changed the extention and it works but I have a couple of system calls

^ where is grep?
351566 [rubynewbee g] I tried to grep from a string, but got wrong.
351567 [flo andersgr] Grep is not defined on Ruby 1.9-Strings.
+ 351568 [rubynewbee g] Thanks, that sounds be more reasonable, b/c I like to grep from an
| 351573 [walton vyper] It's the difference betweeen floating point and integer arithmetic.
+ 351580 [dblack rubyp] string.lines.grep(/pattern/)
  + 351581 [flo andersgr] Jep, there is always room to improve. It also maps better to the old
  + 351599 [shortcutter ] Why not just string.scan(/pattern/) ?
    351601 [rick.denatal] d.
    351603 [shortcutter ] Stupid me, of course!  Thanks for the quick enlightenment.  I somehow

^ Local variables can't be accessed from outside, right?
351572 [parzival min] class A
+ 351576 [marnen marne] Well, it would be the only solution to a lame question. :)
+ 351578 [ninja slapha] That actually wouldn't work, though I can see why you think it'd be lame.
  351584 [eregontp gma] class_local_a = class A
  351615 [parzival min] No, it's just an example for learning about metaprogramming.  Which is
  351617 [xenogenesis ] On Nov 28, 1:15=A0pm, Michael Winterstein <parzi...@mindspring.com>
  + 351618 [rick.denatal] es
  + 351624 [ralphs dos32] Ah!  So local variables are created when parsed but instance and class
    351625 [xenogenesis ] Well its not exactly right (as Rick DeNatale explained) buts its a

^ closures
351574 [charliesmith] i'm having a little trouble with closures and i'd like to know what
+ 351575 [allenlooplee] def make_adder(n)
| 351582 [flo andersgr] f =3D ->(a,b){ a + b }
| 352182 [shortcutter ] The cool thing is that the result of f.curry can be used to curry the
+ 351644 [rogerpack200] I noticed this link describing some scheme style closures in ruby

^ SQLite and Ruby DLL problem
351587 [hypermeister] I am trying to get Ruby to work with SQLite under Windows.  I
+ 351590 [d_rems yahoo] There is difference beetween sqlite.dll and sqlite3.dll. Which are you
+ 351593 [luislavena g] ded
+ 351594 [luislavena g] ded
  + 351602 [hypermeister] Thanks for your replies.  I made a mistake, I thought I was installing
  | 351608 [luislavena g] ing
  | 351636 [hypermeister] I finally got it to work, but had to do a clean ruby install.  I
  + 351604 [hypermeister] error message.   I am doing this with Ruby 1.8 (The One Click Installer

^ iterate over a hash with values containing a array of hashes
351596 [brunormoura ] I need iterate over a hash with values containing a array of hashes for
+ 351600 [brabuhr gmai] How far were you able to get before getting stuck?  The basic way to
+ 351606 [dooby d10.ka] ###========================
  351631 [brunormoura ] Thanks guys, you rocks!

^ app/helpers in Rails
351607 [tuo_pe yahoo] I am new to ruby (and to ruby on rails). Having created some helpers
+ 351612 [ninja slapha] Probably, include them into the controller you need, or into
| 351651 [evanworley g] You can specify "helper :all" in ApplicationController.rb, which will make
+ 351654 [b.candler po] They are available in views already.

^ something broke ruby floats
351609 [vjoel path.b] Noticed this after rebuilding ruby (with configure args
351628 [ryand-ruby z] CC'ing ruby-core@
351646 [vjoel path.b] Thanks.

^ setting up lib/test/rakefile references for a testing task
351616 [rpardee gmai] Hey All,

^ Need help with tunnel connection issue in net-ssh
351619 [delano.mande] I need some help resolving an issue with running several connections

^ Which server component?
351622 [mail fabian-] I have the scenarion, that on the one hand, there are mobile devices
351626 [b.candler po] You are talking about two different things. Webservers talk HTTP(S). You
351630 [mail fabian-] Thank you very much for your reply!
351652 [b.candler po] Yes, eventmachine would replace your TCP server. You would have to rejig
351660 [mail fabian-] Yes, that´s right!
351663 [b.candler po] Ignore that. Write your application as a rack application (just a single
351670 [mail fabian-] Okay, I will do it that way. But I should prepare the load balancing, so
351673 [shortcutter ] In that case it sounds like as if HTTP was not the ideal protocol for
351675 [b.candler po] Another option is to use XMPP (aka Jabber). This is asynchronous and

^ What's the new hotness for packaging gems?
351629 [tony medioh.] I've used ad hoc stuff for packaging most of my gems.  Long ago there was
+ 351632 [luislavena g] as
+ 351643 [rogerpack200] jeweler is what I'm using these days.
| 351645 [james grayso] I've seen several uses of it now and it always strikes me that it's just =
| + 351666 [rick.denatal] about the same size as a traditional gem specification. =A0Which problem we=
| + 351669 [matt smajn.n] about the same size as a traditional gem specification. =A0Which problem we=
| + 351681 [ninja slapha] Mostly kidding, too, but I have to agree -- the only gems I've actually built
| + 351746 [rogerpack200] Yeah now that we no longer publish through github it's not as much of a
| + 351754 [ shot hot.pl] Well, I have never created a gem myself prior to two-days-ago (and
+ 351693 [ryand-ruby z] was

^ Best way to distribute an app
351637 [hypermeister] I am still sort of new to all things Ruby, but I am quickly learning
+ 351642 [rogerpack200] You may be interested in a question on the ruby-talk FAQ
+ 351682 [ninja slapha] Two main ways: As a gem, or as a git repository.
  351684 [hypermeister] lot, but thanks.  What did you mean about baking gems into apps?  I
  351712 [ninja slapha] If rawr fits your needs, Capistrano almost certainly doesn't, and vice versa.
  351723 [hypermeister] Duly noted.  I will not bake my gems :).  I will use rawr instead.
  + 351748 [ninja slapha] Well, rawr has exactly the same problems -- as I understand it, the only
  | 352064 [james.britt ] I may not; it depends on what you set in the config file.  But
  | 352078 [ninja slapha] And if you didn't do so, those gems would have to be installed somehow.
  | 352131 [rogerpack200] So what you would be looking for is instead of the equivalent of a "one
  | 352134 [ninja slapha] Well, now that I've seen rip, I'm not convinced gems are necessarily the end-
  + 351836 [ shot hot.pl] I have yet to try it, but OCRA is mentioned
    351837 [marnen marne] IIRC, it's Windows-only.  FWIW, I'm using JRuby and Monkeybars (which
    352040 [hypermeister] I have tried some of the alternatives suggested, and found the
    + 352044 [anthony.metc] =20
    + 352061 [luislavena g] Yes, it's JRuby only

^ Just found a round problem
351639 [rubynewbee g] irb(main):026:0> 10.499999999999999.round
351641 [flo andersgr] Thats IEEE 754 float behaviour, yes. python behaves exactly the same.
351647 [steve studio] And PHP 5 as well.
351656 [rubynewbee g] Thanks all~
351674 [thiagown gma] In C i think its 14/15 significant digits and its probably why.
351676 [marnen marne] BigDecimal and Rational will do the trick.

^ ruby language parser in ruby
351655 [b.candler po] I'm looking for a ruby language parser written in ruby, that I can hack
+ 351659 [ryand-ruby z] hack
| + 351661 [b.candler po] That's fine; if it's using a standard parser generator I don't need to
| + 351667 [rick.denatal] That would be cool if it's possible.  Old Smaltalkers love to see
| + 352089 [b.candler po] Question for you: as far as I can make out, the handling of embeeded
|   352093 [ryand-ruby z] My default answer to nearly any of these types of questions is going to =
+ 351668 [marnen marne] Rubinius, perhaps?  Or make your own with Treetop?
| 351677 [b.candler po] I'm pretty familiar with CFGs and tools like yacc, or at least, I was
| 351678 [shevegen lin] Awww...
| + 351679 [jameskilton ] Jason
| | 351690 [ryand-ruby z] also ruby_parser... WAY WAY WAY hacked up, but ruby_parser.
| + 351691 [ryand-ruby z] yeah. well. They left that idea FAR behind a long time ago. Sad really, =
|   351713 [ninja slapha] I'm not sure they wanted to do that for everything, from the parsing to the
|   351760 [ryand-ruby z] ruby. :/
+ 351734 [rogerpack200] redparse
| 351762 [ryand-ruby z] hack
| + 351764 [rogerpack200] LOL.
| + 352045 [vikkous gmai] I wish you had/would let me know about whatever problem(s) it was that
|   352049 [b.candler po] A minor problem with the redparse gem is that it gives most of the files
|   352058 [vikkous gmai] Yes, that is indeed most unfortunate and due to be fixed in the next
|   352059 [b.candler po] Well, all of it really.
|   352082 [vikkous gmai] Yes, that's right. babyparser.rb is an example of a minimal (3 rule)
|   352088 [b.candler po] Ugh. No doubt that sort of thing will bite me.
+ 351775 [masonkelsey ] Since I am taking some graduate level course in artificial intelligence at
| 351792 [b.candler po] Although many people find programming in Ruby more natural than
+ 351805 [dooby d10.ka] irb does quite a good job. ;)
  351807 [b.candler po] Interesting. I'd forgotten that irb would have to parse multi-line input

^ semantics of @x v. $x
351664 [ralphs dos32] Consider
351665 [stefano.croc] @xyzzy = 5 defines an instance variable for the global object. That instance
351685 [ralphs dos32] I thank you greatly for you explanation and your time.
351687 [stefano.croc] Well, these are among the basics of ruby, so any introduction to ruby should

^ how to enable debugging on the server?
351671 [lockwood.bry] Wanting to run the script/server in debugger mode, my dialog looked
351672 [marnen marne] This is a Rails question.  Please take it to the Rails list.

^ Date class method `once` wraps original call in Array. Why?
351683 [matt smajn.n] I'm reading the Pickaxe and on page 391, there is a code listing for
351783 [tennisbum200] They wrap it in an array so you that they can cache "nil" and "false"

^ Ruby Error Question
351696 [matt.bourgeo] I am new to Ruby.  I have been using in on Mac OSX and every time I
351697 [marnen marne] Looks like that gemspec file has some rather awful syntax errors in it!

^ NoMethodError at /delete/1 private method `delete'...
351698 [ehassick gma] I'm trying to work through the 'Meet Sinatra' PeepCode screencast and
351703 [ryand-ruby z] database

^ Generated View
351699 [dwhitekiss g] What is the problem when the generated view does't show in the
351700 [hassan.schro] <http://catb.org/~esr/faqs/smart-questions.html>

^ what's wrong in install dbi-0.4.3.gem?
351701 [wangxin46853] Dear all
351705 [technic.tec ] $ gem install dbi

^ Rainbows! 0.7.0 - Fibers and NeverBlock
351704 [normalperson] Rainbows! is an HTTP server for sleepy Rack applications.  It is based on

^ How i can take sites on the server same "reverse"
351715 [treep_ir yah] i wanna write program like same reverse lookup and it to can take sites

^ Oracle-oci8.2.0
351716 [vetrivel.bks] Problem in oci8.2.0.1.gem
351717 [luislavena g] On Nov 30, 8:08=A0am, Vetrivel Vetrivel <vetrivel.bk...@gmail.com>
351719 [vetrivel.bks] Thanks for your reply. But I have installed
351729 [luislavena g] On Nov 30, 10:43=A0am, Vetrivel Vetrivel <vetrivel.bk...@gmail.com>
351785 [vetrivel.bks] Thanks for your help ,

^ Re: Rails gem problem
351718 [marnen marne] With information like this, there's no way to know.  What errors did you
351721 [hypermeister] That's the thing, there were no error messages.  The Rails gem

^ Re: connecting to Oracle using OCI8 and DBI
351720 [vetrivel.bks] I followd your steps . But while connecting .

^ How does ActiveRecord do it?
351722 [ralphs dos32] I know it sounds like a Rails question ... but it isn't.
351726 [matt smajn.n] Yes, well it's not webrick doing the reloading, it is Rails, Rails
351727 [ralphs dos32] The question I was trying to ask was ...
+ 351747 [Markus reali] As a rough answer, Kernel#load and the various const-introspection
+ 351763 [ryand-ruby z] #load will always load a file (contrasted to #require). Rails does a few =

^ RubyGems nightmare due to 2 installs
351732 [adam codegar] I have a recurring problem with my RubyGems install atm.... actually

^ if statement modifier, with else, warning
351733 [gary oax.net] The following statement works fine, even though it generates a warning.
+ 351737 [marnen marne] What would be un-Rubyish about not using the statement modifier?  The
+ 351740 [shortcutter ] robert@fussel ~

^ Odd puts behaviour with REXML
351735 [dsainteclair] This is really weird, and I'm not sure if maybe there's a formatting
351736 [wishdev gmai] Morning David,
+ 351738 [dsainteclair] Thanks for the help, in terms of how to narrow it down, but if I change
| 351741 [wishdev gmai] Morning Again David,
+ 351739 [shortcutter ] One more hint: when posting things like this it is best to provide a
  351742 [dsainteclair] That's really interesting.  This works, but just gives that odd output
  351743 [wishdev gmai] David,
  351744 [dsainteclair] Hey John!  Thanks! You saved me so much time! I wasn't exactly

^ Unsubscribe
351745 [nbitspoken c] Sent from my iPhone.

^ Net::http
351750 [beny18241 gm] I know how to print simple website
+ 351758 [globyy3000 h] res = Net::HTTP.post_form(URI.parse('http://www.google.com'),
+ 351777 [yermej gmail] 'text', 'max'=3D>'50'})

^ regexing a file's contents without reading the whole thing?
351751 [rogerpack200] I see that it is possible currently to parse through a file without
+ 351752 [vjoel path.b] File.open('/usr/share/dict/words').grep /ruby/i
+ 351806 [shortcutter ] If you know that matches will never cross line breaks you can do
+ 351844 [vikkous gmai] The library which makes this possible is sequence. I'm coding this

^ have a problem with the loops and variable
351753 [magicc0d3r g] q = 1
351756 [globyy3000 h] You should be declaring s as an array:  s[]
351788 [marnen marne] Note that it would be far more idiomatic to use s.each.  Never use += to
351796 [magicc0d3r g] thank you friends.
351798 [magicc0d3r g] I want create a program like this.
351833 [globyy3000 h] It'd be faster to use a compiled language to do something of that sort.
351835 [marnen marne] I wonder how big the time difference would be.  It seems to me that most
351840 [globyy3000 h] For something small such as testing lets say a million keys, the
351842 [marnen marne] Not impressed with this explanation.  Most of the stuff in a Ruby
351845 [globyy3000 h] It wasn't supposed to be an involved explanation... there is only so
351846 [globyy3000 h] C++ GNU
351849 [marnen marne] I am *extremely* surprised by this.  What's the source code you're
351859 [steve studio] "Note that it would be far more idiomatic to use s.each.  Never use +=
351868 [marnen marne] Then write one! :)  If you're not sure how, do what you can and post it
+ 351927 [globyy3000 h] It's a recursive function that calculates the fibonacci sequence..
| + 351933 [marnen marne] There's no point in posting benchmarks if you're not going to show the
| + 351989 [gregory.t.br] That's a problem right there.  Ruby has extremely slow method
+ 352006 [steve studio] Okay, Sajjad's original code was
  + 352009 [aldric trevo] q, w = 1, 2
  + 352023 [marnen marne] I think you're probably right.
threads.html
top