259192-264441

259137-269477 subjects 259397-412690

Re: [OT] Religion (was: god 0.1.0 released)
259192 [al_batuul@ya] ...

ERb with nested loops-- NG!
259197 [dangerwillro] How do you do nested loops in ERb?
259271 [jan.svitok@g] I see no problem there. Could you post your attempt to see what's wrong?
259354 [dangerwillro] Actually could anyone post some examples of ERb for web pages, but

gets
259219 [ja_bowen@ya ] Of course the code below will not work because gets is
+ 259223 [cdcarter@gm ] test1 = gets.chomp
+ 259250 [shortcutter@] Use chomp!
| 259254 [perrin@ap th] That was the first thing that occurred to me, too, but I think that Chris
| 259258 [shortcutter@] You're over cautious here. Your concerns do not apply because test1 is
| + 259263 [dangerwillro] this is definitely a case where the usual action people take is
| + 259533 [robert.dober] Robert I am a big fan of in place modification and you have already
|   259573 [perrin@ap th] Thanks.
|   + 259578 [robert.dober] My bad, I thought it was
|   | 259583 [shortcutter@] Actually you can have
|   | 259607 [perrin@ap th] My personal guideline is basically to avoid in-place modification unless
|   | 259623 [robert.dober] Yeah Robert, that was my feeling and that's what I really wanted to
|   + 259629 [sonoflilit@g] foo = gets.chomp! # eat the cake and leave it whole
|     + 259635 [robert.dober] Hmm it should not, but I am quite sure it is right now, maybe a
|     + 259636 [dblack@wo bl] $ echo -n "abc" | ruby -e 'puts gets.chomp!'
|       259641 [robert.dober] Oh noooo
|       259662 [dblack@wo bl] I specifically wanted to provide a gets-based example, but it's
+ 259312 [ja_bowen@ya ] Thanks
  259357 [dangerwillro] test.chomp = gets
  259439 [logancapaldo] ...
  259475 [dangerwillro] You're right I got ahead of myself while typing!

Want to convert html table to image file, how?
259244 [glenn@an te ] This is my first time on this list so I hope I'm not breaking any
259314 [AEtzold@gm .] welcome to the list!

Ruby.NET moves to full open source community model
259251 [w.kelly@qu .] The Gardens Point Ruby.NET project (http://www.plas.fit.qut.edu.au/Ruby.NET) would like to announce that we are moving to a new open source community model.
+ 259308 [horacio.lope] Kudos for the initiative !
+ 260581 [hal9000@hy e] I think this is the best news I've heard in a month.

Building ruby with bcc32
259253 [ycelik@oy ek] I am looking for someone who built ruby using Borland c.
+ 259256 [perrin@ap th] Actually, I think gcc is probably a more common C compiler than Borland
| 259260 [ycelik@oy ek] Thanks Chad,
| 259518 [perrin@ap th] You're quite welcome.
| 259520 [znmeb@ce ma ] On most "non-Gnu" systems, the native compiler (MS on Windows, Sun's
| 259951 [ycelik@oy ek] Thanks all,
| 260445 [ycelik@oy ek] At least you can lead me to an internet page.
| 260448 [shortcutter@] Adding to the mix of information: if you use cygwin anyway you can as
| 260462 [ycelik@oy ek] Thanks Robert,
| 260566 [perrin@ap th] just searching for "cygwin" gave me the main Cygwin website as the first
| 260678 [ycelik@oy ek] Thanks Chad for the response,
| 260687 [nobu@ru y- a] autoconf && ./configure CC='gcc -mno-cygwin' && make &&
| 260690 [ycelik@oy ek] Thanks Nobuyoshi,
| 260693 [nobu@ru y- a] Steps for mingw compiling on cygwin.
| 260700 [ycelik@oy ek] I've mingw and cygwin installed on my computer.
| + 260723 [nobu@ru y- a] You need to install autoconf package too, of Devel category in
| | 260752 [ycelik@oy ek] Thank you thank you and thank you Nobuyoshi,
| | 260877 [botp@de mo t] # And typed the command as you said (I don't even know what all in the
| | 260913 [ycelik@oy ek] Thank you Peña,
| + 260724 [logancapaldo] ...
|   260729 [ycelik@oy ek] I want to build ruby from source on windows WITHOUT using ms compiler.
+ 259261 [nobu@ru y- a] bcc32 support will be obsolete.
  259266 [ycelik@oy ek] Thanks for the reply.
  259294 [ycelik@oy ek] So no reason, ok, fair enough.
  + 259296 [ari@ar br wn] www.ubuntu.org
  | 259298 [robert.dober] Hmm Mingw should be enough[ still cygwin is a good thing to have IMHO]
  | 259317 [ycelik@oy ek] Thanks all,
  + 259433 [nobu@ru y- a] * it doesn't support C89 standard (can't initialize aggregate
  + 259517 [perrin@ap th] You probably just needed to wait a little bit for the answer to come

Regexp Question - Merb::Router
259262 [has.sox@gm i] ...
259265 [shortcutter@] It's actually *two* parts: (?:) is a non capturing regexp group.  The
259269 [has.sox@gm i] ...
+ 259270 [shortcutter@] irb(main):001:0> "/products/:model/:id".scan %r{/:([^/]+)}
| 259272 [has.sox@gm i] ...
+ 259322 [james@gr yp ] Yes.  The part without the colon is capture, because of the normal
  259329 [shortcutter@] irb(main):002:0> /foo/.to_s

How to colorize text in windows console?
259267 [m.tyman@in e] Is any way to highlight text in windows cmd? I have a script which
259268 [shortcutter@] There might even be a gem or a project in the http://raa.ruby-lang.org/
+ 259288 [phurley@gm i] or
+ 259324 [james@gr yp ] James Edward Gray II

Unit testing exception types and messages
259273 [dave.baldwin] Testing that an exception of the given type is raised is easy with
259277 [rff_rffREMOV] I do not think that there is a builtin assertion for exception
259297 [jameskilton@] ...

Help with passing a callback method
259275 [mickelax@ya ] I am trying to do the following. I can't get it to work, don't know if
+ 259278 [shortcutter@] I'd rather here where you want to put the callback and what it is
| 259280 [gethemant@gm] Damn you Robert. :)
+ 259279 [gethemant@gm] Hey Mike,
  259287 [mickelax@ya ] Thanks for the quick replies guys!

[ANN] xml-map
259281 [swistak@ma l] Thanks to my bas from softwarelab.eu (little advert)
+ 259283 [swistak@ma l] - this module was tested on nearly 20mb XML file and worked fine, it made
| 259285 [mark.gallop@] I am looking forward to this. I had just been looking at doing a project
+ 264441 [gregory.t.br] You quoted it in your reply.

Undocumented argument on Object#methods
259282 [apeiros@gm .] Due to a discussion in irc.freenode.org#ruby I stumbled over an
259284 [jan.svitok@g] Can you please create a patch according to
259327 [james.britt@] See also the documentation guidelines at
259340 [apeiros@gm .] Thanks to both of you. Any way to work around the read-onlyness (I use
259341 [florgro@gm i] You can use http://groups.google.com/group/ruby-core-google/ for

Loop over an array that changes the elements
259289 [djbearhand@g] I have a rather simple question. I have an array and want to change the
+ 259292 [robert.dober] numbers.map!{ |x| x*2 }
+ 259299 [benjohn@fy h] numbers = numbers.map {|number| numer * 2}
| + 259301 [fxn@ha hr f.] Even, to be closer to the in-place editing,
| + 259302 [robert.dober] Hmm what about the GC?
+ 259300 [benjohn@fy h] You're right.
  259305 [martin@sn wp] Actually, as I think someone already posted, map! is probably the most
  259311 [robert.dober] Daniel this is great I am *not* in your killfile :)

convert ASCII to byte an vice versa
259303 [chen_li3@ya ] I have a small script as follows. I wonder how I can
+ 259304 [matt.e.greer] ...
+ 259309 [martin@sn wp] In addition to manually using Integer.chr, you may find Array.pack
+ 259310 [doodpants@ma] irb(main):003:0> str.each_byte{|b|puts b.chr}

Installing under HP-UX
259306 [ralph.grothe] I am new to Ruby, and already struggle with the installation
259438 [nobu@ru y- a] I've thought that it is a part of C89, isn't it?
259895 [ralph.grothe] yes, the HP ansic is C89, but the expression it couldn't deal with,
259935 [nobu@ru y- a] Do you mean Compound Literal by the latter?  Yes, it's C99, and
259944 [ralph.grothe] But I did.
260145 [nobu@ru y- a] I thought if you found another way.
260415 [ralph.grothe] many thanks for your helpful hints.
+ 260420 [ralph.grothe] I've just discovered the gem_server binary
| 260430 [ralph.grothe] Ugh, this doesn't work right away
+ 260519 [nobu@ru y- a] Because configure doesn't take care of such unknown flags, but
  260773 [ralph.grothe] Ok, I don't bother about configure oddities anymore

Why no perl style 'use strict' in ruby.
259315 [funkytwig@gm] First let me say I much prefer developing in ruby that perl.  Ive been
+ 259316 [seebs@se bs ] Ruby's defaults are in some cases closer to "use strict" than perl's; for
| 259318 [brabuhr@gm i] ...
+ 259321 [james@gr yp ] The strict pragma does three things in Perl.  Two of the items are to

Real project -- general application structure
259319 [rjasinski@gm] I'm supposed to build a test application where a PC would communicate
+ 259402 [vjoel@pa h. ] Do you know about RRDTool? There are ruby bindings for it, too.
+ 259406 [chris.hulan@] So the data collection app stores it in the DB, and the web page just
| 259445 [rjasinski@gm] thanks for your input! Yes, it is really almost a piece of cake,
| + 259509 [snacktime@gm] Have a status table that gets updated whenever an update comes in, and
| | 259550 [rjasinski@gm] so there's no other way of making the two applications talk to each
| | 259559 [florian.assm] I haven't done anything with EventMachine for the time being but this
| | 259590 [rjasinski@gm] thanks a lot for pointing me out the existence of Eventmachine; I had
| | + 259616 [snacktime@gm] You might take a look at using mongrel (with the swiftiply patch to
| | + 259619 [florian.assm] I wouldn't either do polling nor use ajax because this method requires
| |   259646 [rjasinski@gm] this is starting to look good. I'd better ellaborate on the
| |   259683 [florian.assm] I'm not very in ASCII...
| + 259618 [has.sox@gm i] ...
|   259863 [has.sox@gm i] ...
|   259890 [florian.assm] Something like this I had in mind when I said Flash but it uses - aehrm
|   260142 [rjasinski@gm] Daniel,
+ 259659 [wayneeseguin] ...
| 259686 [florian.assm] Ok, don't think this would take more than 2 days and you have a proper
+ 260252 [coldredlemur] I have a javascript class, Ajax.Pull, which, I believe, does exactly

Class methods and modules
259320 [cardosojp@ne] I wan't to design a Module that defines some methods that I wan't as
259328 [tim.pease@gm] module MyModule
259336 [cardosojp@ne] I found another way.
259338 [apeiros@gm .] Extend includes the methods in the singleton class. E.g.

[QUIZ] Maximum Sub-Array (#131)
259323 [james@gr yp ] 1.  Please do not post any solutions or spoiler discussion for this quiz until
+ 259331 [matt.e.greer] ...
| 259332 [matt.e.greer] ...
| 259348 [dchelimsky@g] [1,2,3,-7,6]
| + 259352 [dchelimsky@g] [1,2,3,-6,6]
| | 259355 [kyleaschmitt] Am I missing something, or is this one of the easiest quizzes that's
| | + 259360 [aurelianocal] Well, you're missing the fizzfuzz quiz.
| | | 259367 [kyleaschmitt] Humm.  OK well fizbuzz could be done as a one liner.....
| | | 259374 [showaltb@gm ] I've golfed mine down to a 108-char method body for an exhaustive search...
| | + 259365 [james@gr yp ] It's a pretty easy problem.  I almost rejected it for that reason.
| | + 259410 [sam@po er ou] Well, you could put a maximum time complexity constraint on it and the
| |   259415 [robert.dober] Thank you I felt completely stupid in desperately searching for a
| + 259362 [james@gr yp ] I think either selection would be acceptable.  I would probably favor
|   259383 [kazaam@ol co] could someone explain this please? I really don't understand this quiz?
|   + 259386 [matt.e.greer] ...
|   | 259392 [ari@ar br wn] Being a nub at life, liberty, and ruby, what is the best way to
|   | + 259393 [james@gr yp ] Let's have this discussion after the no-spoiler period, please.
|   | + 259395 [m_goldberg@a] An exhaustive search would have execution time on the order of N**2,
|   + 259394 [kbloom@gm il] Because the subarrays in the quiz problem must be contiguous.
+ 259660 [list.push@gm] # Here is my solution.
+ 259661 [kbloom@gm il] =-=-=-=-=
+ 259663 [smurf@da mi ] *# The algorithm for max_subarray is a slightly adapted version of
+ 259672 [alexandru@gl] Here's my solution. It has no other merits than showing me
+ 259673 [list.push@gm] # Here is my matrix solution.
+ 259676 [m_goldberg@a] My solution to Quiz 131. It does a straight-forward O(N**2) search. I
| 259697 [sam@po er ou] Doesn't this basically make it order n cubed?
| 259840 [m_goldberg@a] Yes, the inject introduces another factor of N. I missed that.
+ 259679 [caduceass@gm] Just like many others, I went for brute force with some readability.
+ 259725 [justin.ethie] ...
+ 259797 [matthew.moss] I see I was not the only one to borrow inspiration from Programming
| 260285 [matthew.moss] Just a note on my "solution" I sent in earlier... Well, it's not
| 260288 [james@gr yp ] Next week's quiz:  debug Matthew's solution.  ;)
| 260486 [matthew.moss] Eh.... I got some better quizzes in mind than debugging my lousy
| 260488 [james@gr yp ] I always enjoy your quizzes Matthew.  Looking forward to it.
+ 259887 [Rob@Ag le on] This was a nice diversion on Friday morning at the start of my kids'
+ 260365 [list.push@gm] # This is roughly the same matrix solution I posted before.

Class variable
259325 [pshussain@gm] Hai
259347 [warlickt@op ] I don't understand your question -- What do you mean by "Rails view"?
259416 [gethemant@gm] Technically nothing prevents you from using a class variable in rails

Problem with example from pickax book
259333 [funkytwig@gm] Working through the Pickax Ruby programing book and cant get the
+ 259339 [AEtzold@gm .] Dear Ben,
| 259343 [funkytwig@gm] Its actually supposed to be a class method, but ive spotted the error.
+ 259342 [florgro@gm i] Songlist needs to be SongList. Or just change it to "self". :)

Hello!
259334 [chenhui0594@] Would you like to buy shoes and t-shirt?we update our website,now click

SOAP::RPC::Driver timeout
259335 [dcrissman@pe] I want to be able to control the timeout length on the
259487 [nakahiro@sa ] The 2nd and 3rd options only works when you've installed http-access2.
260052 [dcrissman@pe] Is there anyway to set the "receive_timeout" without http-access2
260151 [nakahiro@sa ] I was wrong.  soap4r + net/http should handle receive_timeout option as
260297 [dcrissman@pe] Let me rephrase my question from above, is there anyway to set the

More general multidimensional minimization in Rb-GSL ?
259344 [AEtzold@gm .] Dear all,
259498 [znmeb@ce ma ] I'm not familiar with the minimization algorithms in GSL, but if you

Re: Maximum Sub-Array (#131)
259346 [novakps@gm i] Nice quiz.  One question.
259361 [james@gr yp ] Let's say we are looking for a non-empty subarray.

Couple of questions from a new user.
259350 [funkytwig@gm] simple scripting (type of thing you used to do in perl).
259356 [gregory.t.br] Initialize does not override new, it is invoked by new().

issue with rake and model names that conflict with FileUtil methods
259358 [jack.dempsey] ...
259442 [gethemant@gm] This is classic case of open source ball game. Its a clear case of

Watir weirdness
259359 [kyleaschmitt] I'm using watir-1.5.1.1192 on windows XP with IE7 for a number of

Strange Segfault
259387 [damnbigman@g] ...
259401 [djberg96@gm ] What version of Windows are you on? Is there a backtrace you could
259414 [damnbigman@g] ...
259421 [damnbigman@g] ...
259430 [djberg96@gm ] For some reason my last post never made it...
259434 [damnbigman@g] ...
259989 [damnbigman@g] ...
260025 [djberg96@gm ] That's because MS insists on moving its documentation every 6 months
260084 [damnbigman@g] ...
threads.html
top