391996-413191 subjects 392386-393303

ruby summer of code?
392207 [rogerpack200] Anybody know who I should talk to to "nudge" them toward doing another
392216 [steve@st ve ] I'm not sure, but I'd be interested in helping getting this going.
392239 [serialhex@gm] +1 to get this going.... though more than likely i'll be participating as a
393640 [rogerdpack2@] Ok email me or reply to this if anybody out there'd be interested in
393642 [josen.figuer] I would be interested in contributing but maybe you can tell me what do =
393645 [rogerdpack2@] Current thought would be to have something like a uservoice instance

A very very beginner question.
392208 [brandon0981@] First off I apologize for the 'noobishness' of this question. I'm on a
+ 392210 [peter@va de ] Welcome to Ruby :-)
+ 392211 [ralphs@do 32] Brandon,
+ 392212 [brandon0981@] Thank you very much Peter, that cleared some things up for me, I
  392215 [peter@va de ] You're welcome.

Ocra makes windows built-in firewall ask to unblock ruby each time target exe launched
392213 [zhoran@in ox] into exe file with ocra. Each time I launch that exe, firewall asks me

embed ruby 1.9.3 source into an iOS Xcode project
392219 [fonseka@gm i] I'm looking for a way of embeding Ruby 1.9.3 on an iOS Xcode 4 project.
395796 [lists@ru y- ] Do you found answer for your question? I have the same problem.
395870 [lists@ru y- ] It is designed for embedding.

Help or Advice appreciated for parsing
392224 [shevegen@li ] I am working on some pseudo-www language.
+ 392228 [ymendel@po o] There's no reason that with appropriate parens wouldn't work. By
| 392229 [matma.rex@gm] Have you heard about Markaby and Haml? One of these might be what you
+ 392293 [shevegen@li ] - simplifies my life
+ 392294 [shevegen@li ] Oh, I see now. Markaby is pure ruby so one could connect it to other
+ 392300 [b.candler@po] h4 'Test'
  392319 [code@ap th o] Exactly . . . ?

Case menu - obtain the first conditions?
392225 [shevegen@li ] Consider I have a case menu like this.
+ 392226 [ymendel@po o] Don't use a case statement.
+ 392230 [ryand-ruby@z] self.methods # => ["list_cars", "list_whatever", "list_plants", ...]
+ 392292 [shevegen@li ] options = {

Including MySQL in a desktop application
392231 [gonzalezdami] best. I'm on the path to make a desktop application which needs to
392233 [hassan.schro] What "security" does MySQL offer for a desktop application?
+ 392234 [code@ap th o] That is an excellent question, and I found it an odd assertion that MySQL
+ 392235 [mike@os n. r] Just ask KDE4 folks...
  392236 [hassan.schro] No idea what that's supposed to mean; can you clarify, or provide a

rescue Exception => ex
392237 [ralphs@do 32] I am trying to grok
392240 [adam@ap es o] It's a fair question, since the "=>" is shared between the two. However, if
392279 [matma.rex@gm] If Adam's response only confused you further: yes, it's a special
392281 [ralphs@do 32] Well, I'm guessing it caused him to scratch his head and prove to himself (and me) that it was unrelated to hashes.
392282 [adam@ap es o] It didn't cause me to scratch my head, I just figure it's always good to

Is there a difference between these two kinds of raise
392238 [ralphs@do 32] Is there a semantic difference bewteen
392241 [abinoam@gm i] No difference (as far as I know).

The Better Code
392242 [transfire@gm] ...
+ 392243 [adam@ap es o] The latter. Because spending a little extra more time to make things more
| + 392244 [abinoam@gm i] +1 for the more verbose version. Same reasons as Adam Prescott.
| + 392256 [shortcutter@] +1
+ 392245 [gsinclair@gm] Anything with this line in it can't be considered "better" than anything el=
| + 392246 [darkintent@g] The second one.  Much easier to understand because it is explicit.
| + 392261 [transfire@gm] ...
+ 392247 [sean.ohalpin] Well, the second is clearer to read line by line. But I find it easier
+ 392248 [sungpae@gm i] ...
+ 392249 [josh.cheek@g] Explicit, because I was able to understand it. On the first one, when I got
+ 392250 [code@ap th o] It's not just a matter of concise vs. explicit code.  If you can make it
+ 392263 [transfire@gm] ...
  392267 [adam@ap es o] I think I'd rather just have the code speak for itself with meaningful
  + 392271 [shortcutter@] +2
  + 392275 [code@ap th o] . . . and, on top of everything else, if you have to change the code

Which library to write a parser
392252 [carlier.thom] I need to write an easy parser and i don't know if i can use an existing
+ 392253 [whitequark@w] WBR, Peter Zotov.
| + 392254 [eule@sp ce c] ...
| | 392255 [tony.arcieri] Tony Arcieri
| | 392258 [whitequark@w] Is there a PEG parser around here which does not keep all the symbols
| | 392264 [eule@sp ce c] As one of the authors of one of these libraries which are slow as a
| | 392342 [carlier.thom] Which one will you recommend for a simple grammar like
| | 392343 [ryand-ruby@z] Write your own by hand. It'll be faster and smaller than anything =
| | 392649 [eule@sp ce c] And for another definition of faster (faster to code): parslet.
| | 392859 [benedikt@vm ] I tried out parslet today, and I really appreciate its design (i.e.,
| + 392257 [carlier.thom] Thanks and nice blog, very useful informations.
+ 392888 [benedikt@vm ] I found one combinator-based parser library which seems to provide quite
| 392908 [matma.rex@gm] For heavy lifting, there's always Racc. ruby_parser uses it, and it's
| 392915 [ryand-ruby@z] 116.05s:    86.17 l/s:    6.23 Kb/s:  722 Kb:10000 loc:../dev/blah1_10k.rb
| 392922 [benedikt@vm ] in racc, and repeated the experiments (on a different machine, ruby
+ 392916 [garthy_lmklt] I use ANTLR to generate C++ code which I subsequently extend into Ruby.

global array
392259 [eme@me ic l-] Im trying to make an array a global array, but I cannot make it work.
392260 [shortcutter@] "server" references a Hash.
392346 [eme@me ic l-] That was the intention, if the hash is empty create it.
392347 [shortcutter@] But this won't work as intended: you create the Hash stored in

uniq with count; better way?
392262 [ralphs@do 32] a = [4,5,6,4,5,6,6,7]
+ 392266 [cu9ypd@gm il] The first that came to my mind.
| 392268 [adam@ap es o] I think this is a misuse of inject, personally, every time I see it. It's
| + 392269 [cu9ypd@gm il] Well it's one of the possible solutions.
| | 392270 [adam@ap es o] In what sense is that more "accurate"?
| | 392278 [cu9ypd@gm il] Well,
| | 392283 [shortcutter@] Please do not top post.
| | 392285 [cu9ypd@gm il] convention that the last statement in method is a return.
| | 392295 [shortcutter@] ion that the last statement in method is a return.
| + 392277 [judofyr@gm i] [4,5,6,4,5,6,6,7].each_with_object(Hash.new(0)) { |x, res| res[x] += 1 }
|   392287 [abinoam@gm i] 1 }
|   392289 [abinoam@gm i] 's
|   + 392290 [ralphs@do 32] Abinoam,
|   + 392291 [abinoam@gm i] t's
|     392303 [peter@va de ] Thanks. Very interesting.
|     392351 [shortcutter@] There is no sorting going on.  Some tests explicitly use a Hash others
|     392355 [peter@va de ] I beg to differ ...
|     392356 [ralphs@do 32] Peter,
|     + 392357 [jon.forums@g] Have you had a chance to look at Yura Sokolov's Hash optimization
|     + 392358 [ryand-ruby@z] The nice thing about open source is you guys don't need to sit around =
|     | 392360 [peter@va de ] I stand corrected ... (should have looked instead of speculated).
|     | 392369 [shortcutter@] Peter, a Hash uses _hashing_ to keep lookup cost low.  This has complexity =
|     | + 392378 [ralphs@do 32] Robert,
|     | + 392379 [peter@va de ] Thank you, indeed.
|     + 392359 [peter@va de ] Very sorry for that ... This is the second time on short notice
|       + 392380 [abinoam@gm i] Sorry Ralph Shenlvar!
|       + 392381 [abinoam@gm i] Sorry Ralph Shenlvar!
+ 392272 [kachick1@gm ] I like this
| 392284 [ralphs@do 32] Kenichi,
| 392302 [kachick1@gm ] Abinoam,
| 392307 [abinoam@gm i] I would like to have it.
| 392309 [kachick1@gm ] I found a below discussion in rails. (via google)
| 392330 [abinoam@gm i] Kenichi let's add the word "histogram" to the search.
| 392331 [adam@ap es o] A histogram is a diagram, visually representing frequencies. A hash is not
| 392333 [joelvanderwe] It's a reasonable suggestion.
| 392335 [adam@ap es o] Hm! I haven't heard that use before. Still, would that be well-understood?
+ 392549 [developer@ha] If your data items are integers, and from a rather small range (compared
| 392553 [shortcutter@] Don't expect, measure.  There's Benchmark...
+ 392565 [developer@ha] Ok, I tried some benchmarks. We have now even more variables, as they
  + 392566 [shortcutter@] You could also do
  + 392567 [peter@va de ] Interesting.
    392568 [peter@va de ] Peter

Safe to reusing the same Exception instance?
392273 [transfire@gm] ...

Safe to reuse the same Exception instance?
392274 [transfire@gm] ...

Announcing: ActiveGist v0.6.2
392276 [sinisterchip] I needed a Ruby library to perform basic create, read, update and delete

Parsing log with date time entry
392286 [gravescl@gm ] The log file looks like this
+ 392299 [shortcutter@] I am not sure what you mean by "collect a range".  Parsing can be done
| 392308 [gravescl@gm ] Thanks Robert,
| 392311 [peter@va de ] 1.9.3p0 :006 > Time.now.to_s
| 392312 [peter@va de ] Actually, for log files, it may be better to use uniform UTC times. So,
| 392315 [gravescl@gm ] Unfortunately I have no control over the format of the logs. I am trying
| 392317 [peter@va de ] Maybe s_time and e_time are swapped here ?
| 392320 [kachick1@gm ] Range#=3D=3D=3D , need #succ method in Ruby1.9.3
| 392321 [peter@va de ] Thank you. For Time class, I could get it to work.
| 392322 [kachick1@gm ] Sorry, I have no skills for C programming.
+ 392324 [gravescl@gm ] Thanks for pointing me in the right direction.
| 392326 [shortcutter@] irb(main):005:0> CompareRange = Struct.new :first, :last do
| 392393 [gravescl@gm ] I finally got a little more time to work on this. I went the route of
+ 392395 [gravescl@gm ] hmm ok I see the issue
+ 392416 [Reid.Thompso] $ cat test.log
+ 392422 [gravescl@gm ] The Rio way looks interesting but even after installing the gem it is
  + 392425 [Reid.Thompso] you can ignore rio -- use any file io that will read and pass |line| to
  + 392468 [peter@va de ] I am afraid this version will fail to select any line for the first 15
    392485 [kachick1@gm ] Is this log fomart below meanings?
    392492 [peter@va de ] Thank you for the correction.
    392502 [kachick1@gm ] Peter
    392508 [peter@va de ] No prob :-)
    392577 [gravescl@gm ] hmm interesting
    392580 [peter@va de ] /^(\d{2}\/\d{2})\/(\d{4})(\s\d{1,2}\:\d{2}\:\d{2}\:\d{1,3})/

[ANN] graph 2.4.0 Released
392288 [ryand-ruby@z] graph version 2.4.0 has been released!

[ANN] TestR 14.2.0
392296 [sunaku@gm il] TestR - Continuous testing tool for Ruby

Cross-Compile Ruby with OpenSSL for Angstrom Linux ?
392297 [capiman26061] (attention, newbie, if there is a better forum, please tell me)
392304 [luislavena@g] Did you succeed cross-compiling OpenSSL?
392306 [martin.bossl] I'm not 100% sure about this (can't verify from where I'm at), but IIRC

392298 [gmspro@ya oo] ...

[ANN] Data Plotting Library DISLIN
392301 [michels@mp .] ...

concat set of files
392305 [harshadmehta] I have a set of files with file names like -
392341 [jakekaiden@y] maybe the Find module will help -

Finding a <p> text which contains <br>
392316 [snomys@ho ma] I am trying to locate using exists? a <p> in my page which is seperated
392353 [shortcutter@] $ irb -r nokogiri

Passing reference to a class
392323 [tridib04@gm ] How to pass reference to a class in Ruby?
+ 392325 [steve@st ve ] Classes are just constants.
+ 392327 [josh.cheek@g] reference to a class (I assume you mean class as in Array, String, Object,
+ 392328 [shortcutter@] 1. func is not a class, it's a method.
+ 392329 [jeremy@bo p.] Instances of classes such as Fixnum, from your example, are immutable.
+ 392340 [jakekaiden@y] class Fixnum

Re: Data Plotting Library DISLIN
392332 [sunaku@gm il] If I may suggest, the examples would look better with anti-aliasing.

Compile Psych to link with @executable_path?
392338 [mitchell.has] Compiling Ruby with "--enable-load-relative" sets the binary to link to
392657 [ammarabuali@] I had a similar problem and ended up using install_name_tool to

[ANN] minitest 2.10.1 Released
392339 [ryand-ruby@z] minitest version 2.10.1 has been released!

[ANN] jobQueue 1.0.5
392345 [ralf.mueller] jobQueue is a set of classes to run Ruby methods and shell commands in parallel with a user defined number of

Ruby to exe.
392348 [dragon7000@h] A ruby compler made in vb
392354 [dragon7000@h] The Demo.exe is Ruby scrpt compled into exe

give "gem install" options for "ruby extconf.rb"
392349 [ralf.mueller] I'd like to install ruby-netcdf, but my netcdf-installation is in a non-standard directory. Is there any
392350 [luislavena@g] $ gem help install
392352 [ralf.mueller] Thanks Luis!

Extending/embedding Ruby
392361 [matejuh@gm i] challenge for me, because I have never write any extension.
+ 392364 [garthy_lmklt] I might be able to offer a few starting points. I'll just pre-warn you
+ 392373 [matejuh@gm i] Thank you Garth for your answer.
| 392375 [garthy_lmklt] Data_Wrap_Struct essentially bundles up any C pointer into a Ruby
+ 392383 [matejuh@gm i] specify a Ruby class. If I understand well this Ruby class will wrap my
| 392396 [garthy_lmklt] The Ruby class you specify (as a Ruby "VALUE") defines the class of the
+ 392387 [matejuh@gm i] I tried to use API to make a struct and its working like a charm... But
+ 392408 [matejuh@gm i] As you can see from my link on gist, I have that program for

Understanding 'require'
392363 [ddjolley@gm ] I am clearly missing something WRT 'require'. I have a program file
+ 392366 [zachary@za h] # test1a.rb
| 392397 [ddjolley@gm ] OMG!  I researched many posts and articles relating to the topic of
+ 392414 [mcpierce@gm ] var1 is not a global variable, but is instead scoped only to the content

Elegant expression of sorting
392365 [garthy_lmklt] I've found that for the current project I am working on that I am
+ 392367 [gilbertly@gm] tly
| 392370 [garthy_lmklt] Cool- thanks for that. I won't be able to use it directly as the last
| 392372 [shortcutter@] nd
| + 392374 [garthy_lmklt] Very true.
| | 392377 [shortcutter@] Right. :-)
| | 392403 [garthy_lmklt] I just reread my previous response and my explanation was really poor-
| + 392402 [gilbertly@gm] till
+ 392368 [botpena@gm i] try,
  392371 [garthy_lmklt] Very nice use of short-circuiting. :) It made me think of Bourne shell

Beginner Questions
392384 [tlamanna42@g] I'm hoping someone can give me a hand. I've having trouble recalling
+ 392390 [ryand-ruby@z] trailing whitespace...
| 392391 [shortcutter@] mounts of trailing whitespace...
| 392392 [ryand-ruby@z] Huh. I didn't know you could do that. Normally I use YAML.dump and pass =
| 392413 [shortcutter@] Even better!  That way you can easily exchange persistence with Marshal.
+ 392418 [tlamanna42@g] I'm trying to teach myself, so I appreciate all the feedback, I still
  392419 [shortcutter@] You need to extract the top level object and all nested objects that

XmlMarkup gives 2 root elements
392385 [velovity@gm ] I try to check out what's the best way to create a small XML File (need
392389 [flo@an er gr] (need