179331-181617

179092-365237 subjects 179515-180544

Rubyforge releasing
179331 [tobias.luetk] Hey everyone,
+ 179334 [ara.t.howard] hth.
| 179765 [ml@ku t. in ] I couldn't get it to work.  The gem file doesn't seem to check deps nor
| + 179781 [ara.t.howard] that should only happen if http-access2 is not installed?
| + 179782 [ara.t.howard] btw.  there is no http-access2 gem.
|   179788 [ml@ku t. in ] I'm using Gentoo...
|   179792 [ara.t.howard] dunno anything about gentoo
+ 179802 [halostatue@g] I use meta_project on MIME::Types (recently updated to 1.15) and PDF::Writer.

Debugging
179333 [BPaatsch@ac ] ...
+ 179343 [james@gr yp ] begin
+ 179478 [drbrain@se m] ruby -d prints out every exception raised.

ruby/dl question
179339 [ara.t.howard] struct flock {
+ 179408 [vjoel@pa h. ] I don't understand. If the flock struct fields are not in a predictable
| 179415 [ara.t.howard] that's what to compiler does - it's why one must say
| 179419 [vjoel@pa h. ] Ah I see. It isn't that the data structure itself is unpredictable (I
| + 179423 [vanek@ac .n ] And, for what it's worth, both gcc 3.4.4 and VC++ 13.10 pack the two shorts together
| + 179438 [ara.t.howard] lol!
+ 179476 [drbrain@se m] You have a bigger problem, off_t is usually 8 bytes and the built-in
  + 179497 [vanek@ac .n ] good pickup.
  + 179502 [ara.t.howard] i can pack my own struct easily enough... but knowing the layout is

why would i want to put my mysql password in the yml file?
179340 [trevor@id er] i don't understand - the tutorial says to edit the database.yml file and
+ 179341 [james_b@ne r] You should ask on the Rails mailing list.
+ 179342 [pergesu@gm i] Wouldn't you have to store the password SOMEWHERE?  This comes up
+ 179375 [anibalrojas@] Using a DataSource (like in J2EE) you will still need to store the
  179378 [stefan.arent] Most app servers or frameworks like Spring allow you to
  + 179390 [gwtmp01@ma .] This only works if a person is starting the app at a keyboard.
  + 179392 [james@gr yp ] You can do this with Rails too.
  + 179394 [wjl@ic ca er] charset="iso-8859-1"
  + 179547 [rasputnik@gm] Then it will show up in 'ps' output.
    179760 [tony@ob ec f] ... and be in the shell history file. Including passwords on the command

Re: why would i want to put my mysql password in the yml fil
179344 [trevor@id er] ok, again i'm a bit confused by this.  (sorry if it has been discussed,
+ 179345 [wilsonb@gm i] Typically the server component (like MySQL) doesn't store your
| 179352 [pergesu@gm i] Exactly.  If you design an authentication system for your app, chances
+ 179348 [billk@ct .c ] It's kind of a client vs. server issue.  The server (the database in this
  + 179349 [billk@ct .c ] Sorry for being unclear here.  What I meant was what Wilson Bilkovich
  + 179350 [trevor@id er] thanks for the clear-up, i do follow that logic
    179353 [pergesu@gm i] You'd probably be way better off just making a quick PHP script.  No
    179549 [rasputnik@gm] Be sure to take note of how PHP stores your DB connection
    179560 [pergesu@gm i] I was just commenting on the scope of his project.  Collects some

test message
179346 [eric.wenbl@g] ...
+ 179347 [james@gr yp ] I was, but I'm off to bed now.  Nighty, night.
+ 179461 [david@va ln ] Of course not.

Private methods - only available to oneself?
179351 [minkoo.seo@g] I'm a somewhat newbie in ruby realm, and trying to write some codes.
+ 179354 [ksruby@gm il] The short answer would be: because Ruby is not Java or C++.
| 179364 [minkoo.seo@g] Thanks, Kent.
+ 179367 [pan@er kv en] Private methods are only callable from within the same objects.
  179369 [minkoo.seo@g] It does in Ruby. However, Java and C++ allows that if the method is
  179373 [gavin@re in ] The reason of what design decision?
  + 179374 [minkoo.seo@g] Thank you Phrongz. Now I understand what Erik said.
  + 179377 [google@er kv] f = Foo.new
    179380 [minkoo.seo@g] Okay. Now I got totally confused. What's the purpose of instance_eval?
    179381 [google@er kv] Instance_eval evaluates the given block within the context of
    + 179382 [minkoo.seo@g] I'm sorry Erik. I'm not native English speaker. So, sometimes it's not
    | 179385 [google@er kv] I ain't either... :)
    | 179395 [gavin@re in ] I think the purpose of instance_eval is one of those "sharp knife"
    | + 179399 [gene.tani@gm] There's a few loopholes around private and protected, e.g. subclass a
    | | + 179400 [dblack@wo bl] I think there's still hope that that will disappear by 2.0 :-)
    | | | 179403 [matz@ru y- a] Do you mean you are expecting funcall's vanishment?
    | | | 179405 [dblack@wo bl] Yes, kind of.  I'm worried that we'll get a lot of "Which one does
    | | + 179416 [lukfugl@gm i] An easier bypass, which I don't think[1] is closing in 1.9/2.0: reopen
    | |   179417 [lukfugl@gm i] [1] I don't have a 1.9 version installed to test it on.
    | + 179742 [thorin@th sh] The other main thing to be concerned about when accessing private
    |   + 179762 [nugend@gm il] 1) When you're using an object in Ruby, the *only* way to interact
    |   | 179780 [thorin@th sh] I'm not intending to talk about mixing methods with accessing fields.  I
    |   + 179767 [gwtmp01@ma .] Are you saying that the only visibility attributes should be public
    |     + 179791 [thorin@th sh] No, I think the three levels of protection are all useful.  I was just
    |     | + 179813 [gwtmp01@ma .] Well singleton methods are implemented by tucking them away in a
    |     | | 179878 [minkoo.seo@g] I believe that the class method is implemented transparently in Ruby,
    |     | | 179882 [gwtmp01@ma .] I wasn't suggesting that private was needed to implement class methods
    |     | + 179915 [david@va ln ] And I don't see the point of drawing a restriction in Java's private /
    |     |   179950 [minkoo.seo@g] Private/protected meaning of Ruby is unique, and I believe some kind of
    |     |   + 179955 [dblack@wo bl] ...
    |     |   + 179967 [david@va ln ] I don't see the concept of method access restrictions as anything
    |     |   + 180152 [david@va ln ] Also, a minor mental exercise just came to mind. Presuming Ruby private would
    |     |   | 180164 [bob.news@gm ] It's valid.  And it should be IMHO.
    |     |   + 181617 [jim@we ri hh] It is good to ask questions to come to a better understanding.  With
    |     + 179837 [minkoo.seo@g] I don't think the following statement make sense.
    + 179383 [minkoo.seo@g] Thanks, Erik. I'm afraid that I'm not a native English spearker, so
      + 179391 [james_b@ne r] To let you know when code is being used contrary to its design.  The
      + 179396 [hal9000@hy e] 'private' is not like a locked door. It is like a sign saying "Do Not
        181463 [byrnejb@ha t] I do not understand why within the class definiton the Ruby interpreter
        + 181464 [dblack@wo bl] I'm mostly guessing, but I imagine because it would be hard to
        + 181467 [none@no e. e] Think of the self.foo call just accessing an object called
        | 181468 [byrnejb@ha t] Which is why I do not understand the purpose of the distinction between
        | 181471 [none@no e. e] Conceptually, self.foo= should not require the 'self' part but it
        + 181470 [jim@we ri hh] Possibly because it allows you[1] to examine the code and statically

Starting Ruby
179355 [vadhavane_an] i m a web-developer(php).I just started learning ruby.
179356 [adamjspooner] Howdy!
179360 [vadhavane_an] Thank you very much.
+ 179425 [david@va ln ] If you want something along the lines of an IDE, try either FreeRIDE or
| 179446 [mail@ko fe n] If you are using eclipse anyway, you could also give "rubyeclipse"
+ 179806 [jussij@ze se] It offers features like syntax highlighting, code folding,

NC Ruby group?
179357 [adamjspooner] I was just wondering if there was a Ruby group in NC (triad area).  If there
179358 [pat.eyler@gm] enjoy!
179363 [adamjspooner] Thanks a ton!

OpenStruct problem
179366 [minkoo.seo@g] OpenStruct class seems to be misbehave when it comes to hashing.
+ 179370 [interfecus@g] Hashes don't behave well as keys either so it's no surprise openstructs
| + 179371 [gavin@re in ] Or rather, if you are going to use objects as keys, think of them as
| + 179376 [minkoo.seo@g] What I want to do with OpenStruct is to store bigram in hash table.
| | + 179393 [hal9000@hy e] Well, I talked to the author once (on this list -- you could look
| | + 179414 [shortcutter@] Probably not. That being said, an OpenStruct does not fit well as a
| + 179384 [g_ogata@op u] Careful!  @table.to_a is ordered arbitrarily, so that hash function
|   179422 [interfecus@g] You're right. The order depends on the order keys were added (although
|   179432 [hal9000@hy e] Your comments about order lost me, can you clarify?
|   179485 [interfecus@g] I meant to say "The .hash (of the hash) depends on the order keys were
|   179491 [g_ogata@op u] Hash does not provide a #hash method at all; it falls back to
+ 179379 [google@er kv] That's because the hash (I mean the result of #hash) of both

Insights into Ruby from Lua
179372 [gavin@re in ] In my job, I have to use Lua to program some of our software. For
+ 179406 [gene.tani@gm] Excellent.  This post deserves to be preserved in rubygarden wiki
+ 179407 [petite.abeil] Bondage?
  179411 [gavin@re in ] Yup, that chapter in PIL is exactly what I'm talking about. That

Graphics in irb
179386 [a.mcguinness] I'm starting to teach my 7-year-old programming in Ruby, but unlike
179409 [gdprasad@gm ] I think you can look here for a solution

Determining system information
179401 [info@ja eo a] Chaps,
+ 179404 [cyclists@nc ] irb is helping you out a bit. In a script, try
+ 179410 [info@ja eo a] Thanks for that reply. In response to your tip I writen the
+ 179413 [djberg96@gm ] require "rbconfig"

[ANN] LibIDN Ruby Bindings Release 0.0.2
179402 [erikabele@ru] LibIDN Ruby Bindings Release 0.0.2

facet gem versions
179420 [briankbuckle] ...
179424 [david@va ln ] #require_gem does that, requires a gem by its name. But requiring 'rubygems'
179474 [transfire@gm] As of 1.0.3 I've instructed RubyGems to search in two places, namely

extending NArray
179421 [cameron.mcbr] ...
179625 [masa@ir is s] This is probably because a function (SetFuncs) is called
179666 [cameron.mcbr] ...

Adding variables to a binding
179426 [m-lists@br s] I need to run an ERB template (a normal Rails view template) in a Rails
+ 179430 [vikkous@gm i] def outerscope
| 179431 [m-lists@br s] The problem is that ERB#result(binding) takes a binding so I need the
+ 179457 [david@va ln ] I -think- instance variables get exported from the ERB template into the

Upgrading to Ruby 1.8.4 and strange problems!
179427 [h.dunnil@gm ] ...

The ruby way of interrupting a Kernel::select?
179428 [lerno@dr go ] As a newbie with too much java-experience, I found it strange that I

Quickly before all is lost!
179434 [alex.combas@] ZOMG! Ruby RSS feeds growing exponentially!
179435 [james_b@ne r] There are a few.  Artima's Ruby Buzz is one.
179439 [alex.combas@] Thanks!
179453 [james_b@ne r] There are two "Planet Ruby" sites, one in Japanese, one in English.
+ 179459 [david@va ln ] Right. I'm worried. Now comes the part where you knock on my door with a trout
+ 179490 [dave@bu t. d] Here? --> http://rubygarden.org/ruby?RssFeeds
  179493 [dblack@wo bl] James had already mentioned that URL.  I think his latter point was
  179526 [alex.combas@] But my point was that if you go here http://rubygarden.org/
  179529 [james_b@ne r] Which was part of the point I was trying to make.
  179533 [alex.combas@] Sorry I didn't mean to come across with any attitude but
  179553 [james_b@ne r] Oh, of course, and I didn't read any attitude into your post.

Getting last character from a string
179440 [thedraco@go ] I'm new to Ruby. I've a simple question.
+ 179441 [Nuralanur@ao] ...
+ 179442 [james@gr yp ] Welcome then.
+ 179443 [wilsonb@gm i] last_char = x[-1,1]
+ 179444 [cyclists@nc ] last_char = x[-1,1]
| 179469 [Gennady.Byst] x[-1].chr
+ 179480 [w_a_x_man@ya] "abc"[ -1..-1 ]
  179482 [thedraco@go ] Wow :)

Rake Friday?
179447 [Bil.Kleb@NA ] Is there a Friday,
+ 179448 [james@gr yp ] That is a great idea.  :)
| 179449 [marcel@ve ni] Yes. Please. But don't let that get in the way, Jim, of you writing a Friday
| 179450 [agorilla@gm ] I'll take one of each.
| 179458 [nugend@gm il] How about a double whammy?  A book on DSL design using Rake as the
+ 179611 [joshknowles@] ...
+ 179752 [james_b@ne r] In the interim, any chance of the Rake  wiki being restored from spam hell?
  179761 [jim@we ri hh] The wiki is a lost cause.  It was way to much work to keep it despammed.
  179764 [james_b@ne r] Ah.  Sad.
  + 179766 [tom@in oe he] Yup, I need to fix that... it's been on my List Of Things To Do for a
  | 179770 [billk@ct .c ] Sorry for jumping into the middle of the thread, if this has
  | 179772 [tom@in oe he] Yup, that's a good idea.  If UseMod (that's the Wiki RubyForge uses)
  + 179769 [jim@we ri hh] Lacking shell access on rubyforge makes this difficult to do stuff like
    + 179771 [tom@in oe he] Yup, priority += 1... and now I've actually written it down!
    + 179776 [james_b@ne r] Jim, you're the greatest.

Itterating through one's path(s)
179454 [info@ja eo a] I'd like to see if I can itterate through the directories
179463 [bauer.mail@g] I'm not exactly sure what your're trying to accomplish.  If you're
179495 [info@ja eo a] John Maclean

February Ruby events in the SF Bay Area
179455 [rdm@cf l. om] Although it's getting late in the month for this announcement,

methods and default values
179465 [jarnaud@pr s] class Text
+ 179467 [manveru@we z] Hey jarnaud,
| 179484 [malteNOSPAM@] By the way, I assume that the default "no" should be omitted here, simply
+ 179489 [shortcutter@] I'd represent false by nil or false and not "no". That way you can

ruby course confusion
179466 [alex.combas@] Working my way through the "ruby course"
179470 [M.B.Smillie@] A function in this case would be a method.  The two terms are often
179537 [alex.combas@] Thanks Matthew, I appreciate you taking the time
+ 179544 [david@va ln ] D'oh.
+ 179616 [M.B.Smillie@] Well, it's meant to illustrate a very handy property of blocks, but

the problem of install mysql driver using gem for Rails
179471 [gaoxtwarrior] No more words, see the console text´╝?
179527 [david@va ln ] The MySQL driver apparently requires compilation of the native bindings. Do

Simultaneous text input/output in a command line game
179472 [rubyvic@gm i] ____________________________
+ 179473 [Gennady.Byst] t = Thread.new {
+ 179486 [interfecus@g] require 'timeout'
  179519 [r.mark.volkm] I thought this was a good example, so I tried running your code. It

accessing Class from class symbol
179487 [stephen.hill] I'm trying to work out how to access Class methods when I only have the
179492 [g_ogata@op u] Kernel does have `send', but classes aren't methods... :-)

immutable and enumerable?
179496 [info@ja eo a] Every language and profession has it's own language. Ruby is no
179500 [dave@bu t. d] Immutable is not a Ruby-specific term. Its meaning in this group is pretty
179501 [bob.news@gm ] The term "enumerable" is also often used to denote classes that include this

SAFE levels
179498 [tallison@ta ] Is there somewhere I can find some description on the proper care and feeding of
179535 [david@va ln ] irb(main):001:0> require 'ostruct'
179601 [ssmoot@gm il] What's that "_" method/object? Google doesn't search on punctuation
179608 [david@va ln ] irb automatically populates the _ variable with the result of the last line

Framework for storing objects in a relational database
179499 [thomas.gies@] I know, off course, that there is an implementation of the active record
179704 [lukfugl@gm i] I don't know a lot, but am willing to investigate with you, I find ORM

Cutting a piece of text
179503 [szczupienczy] Helo !
+ 179506 [james@gr yp ] You can do it with a regular expression like the following, but I
| + 179508 [szczupienczy] regular expresion works :). Anyway thank you, you helped me very much.
| | 179513 [james@gr yp ] / <      # find a < character
| | 179514 [szczupienczy] Big thank you too all of you guys for such a response. This helped me
| + 179517 [lopexx@au og] p "<lyrics artist=XXX album=XXX title=XXX> Lalalalala
|   179521 [james@gr yp ] Are you sure?
|   179540 [david@va ln ] The nongreedy match has to "back up" and retry on every character after the
|   179545 [lopexx@au og] Ooops.. You are right!
|   179567 [david@va ln ] Yes, they do backtrack. The point is in using the one that you expect to
+ 179507 [david@va ln ] The very geeky, and most probably least error-prone way would be whacking the
| 179511 [james@gr yp ] The following is how you do it for valid XML, but the posted example
+ 179512 [samuel.murph] a =  "<lyrics artist=XXX album=XXX title=XXX> Lalalalala </lyrics>"
+ 179669 [w_a_x_man@ya] p " <lyrics artist=XXX album=XXX title=XXX> Lalalalala </lyrics>".
threads.html
top