288502-364733

288308-326370 subjects 288639-367235

Help Ruby with Vista
288502 [billkirschne] So I have used Ruby problem free on Windows XP however I am having
+ 288520 [luislavena@g] I'll suggest you open a command prompt and have it all the time,
| 288542 [billkirschne] thanks I will try it.
+ 288554 [jari.william] Use rubyw.exe rather than ruby.exe
  288559 [billkirschne] Thanks for your comments. Just wanted to thank you guys for your quick

Creating a canonicalized url
288506 [dancudds@gm ] I'm trying to track down an easy way to canonicalize a URL from with
288511 [Rob@Ag le on] I'd start looking at URI, in particular, URI#parse.
+ 288512 [jftran@ru yf] There's URI#normalize and URI#normalize! to downcase the host
+ 288513 [dancudds@gm ] Thanks for your help - I'll let you know how I get on
  288514 [dancudds@gm ] So it seems using the two together
  288532 [Rob@Ag le on] require 'uri'
  288541 [dancudds@gm ] Wow - thanks for the answer mate!
  288561 [Joerg.Mittag] There's also the Addressable Gem: <http://Addressable.RubyForge.Org/>.
  288620 [dancudds@gm ] Nice but shouldn't it go to ruby-lang.org?
  288688 [Joerg.Mittag] I'm not sure. I just scanned RfC3986 and RfC1034 and I'm not even sure

Changing an array data structure
288522 [michael.schm] I already asked about how I'd best re-order a datastructure. But
288616 [shortcutter@] This is not an Array but an object graph composed of nested Arrays.
288622 [michael.schm] Can I automatically create those elements of the Struct? I

Using a DLL that wants a function pointer
288525 [daniel.akeru] ...
+ 288557 [lloyd@2l ve ] It is with fear and trembling that I post here, but I did not want
+ 288558 [yermej@gm il] is
  288569 [daniel.akeru] ...
  288570 [daniel.akeru] ...
  288571 [djberg96@gm ] nd
  288573 [daniel.akeru] ...
  288592 [jari.william] Yes, that would work if you make the data queue thread safe, probably

strings that contain quote marks
288529 [jonsteenberg] Sorry if this post is a duplicate, I'm having problems with my posts
+ 288537 [aledonne.lis] On Jan 24, 2008 10:59 AM, jonsteenbergen@gmail.com
+ 288539 [AEtzold@gm .] Dear Jon,
  288640 [jonsteenberg] Thanks for the help Axel and Alex, I ended up finding out that the

ActiveRecord connect to SqlServer
288530 [donn@cm cm .] I know you guys have beaten this subject to death, but I'm just not
+ 288548 [donn@cm cm .] The above configuration yields a Login failed for user.  I've
+ 288551 [caduceass@gm] Why is this not DVN-P548?
  + 288595 [dejan.dimic@] You can make a User DSN throughout ODBC Data Source Administrator for
  | 288664 [donn@cm cm .] Thanks to all.  I setup the ODBC connection and it is working
  + 288695 [pmr16366@gm ] =A0 =A0 =A0 =A0 ** what is this supposed
    288710 [softmindtech] @ DVN

[SUMMARY] Longest Repeated Substring (#153)
288534 [james@gr yp ] I first saw this problem years ago.  It was one of the Perl's Quiz of the Week

"Parametric class" on inheritance
288536 [rofi@fu sh h] I found in "Ruby Cookbook" (recipe 8.8) a syntactically
+ 288538 [james@gr yp ] It is a method call actually.  You are allowed to create method that
| 288590 [rofi@fu sh h] Thanks a lot (also to Brian) for the helpful explanation!
+ 288540 [binary42@gm ] => true

ldap.modify error
288563 [damnbigman@g] ...

Smart Debugger (Ruby)
288566 [karthi.ir@gm] Please find the smart debugger for ruby. it is an enchanced version

??? TERROR FACTORY in PRESStigious COLUMBIA University JEW Professor  HOME ???
288572 [thermate2@in] This MOSSAD Agent IVAYLO IVANOV is a RARE E E E E E Mossad CATCH.

getting in lots of practice at begginner level.
288576 [adamtemporar] are fairly targeted on a particular area of ruby, perhaps short as well.
+ 288579 [e.ian@ho ma ] I'd also like to know! However, one thing i've been doing is looking for
| + 288580 [dave@pr gp o] Something that might help is to write stuff that you'll find useful.
| + 288582 [john@ja eo a] I've found that I learn faster when I have a system to play with or a
+ 288588 [wieczo.yo@go] "Practical Ruby Projects" is quite useful. I got it this week. It

rubyscript2exe and RMagick gem please help....
288578 [cameron@sn p] So I've been beating my head against a wall for a while now, trying to

What Exactly is Rubinius & Why Such Importance..?
288589 [softmindtech] I have been reading lots of headings about the New Rubinius Project and
+ 288601 [robert.dober] On Jan 25, 2008 8:48 AM, Softmind Technology
| + 288608 [radek.bulat@] SW5mb1EgKGh0dHA6Ly93d3cuaW5mb3EuY29tLykgaGFzIGdvb2Qgc3R1ZmYgb24gdG9waWNzIHJl
| + 288617 [rick.denatal] Also not to be missed is Evan's talk at Rubyconf 2007
|   288618 [pat.eyler@gm] on-ruby.blogspot.com/2006/12/rubinius-serial-interview-episode-ii.html
+ 288611 [chris.lowis@] An interesting part of the rubinius project is the development of a
+ 288621 [james.herdma] ...
  288628 [pat.eyler@gm] And if you're really interested in the answer, the 2008 MountainWest RubyConf

XMPP client with Ruby
288591 [ochomoz@gm i] Does anyone out there know how to implement an xmpp client to a server
288593 [stephane.wir] There are two xmpp library in the gem repository
288594 [ochomoz@gm i] thanks
288623 [brabuhr@gm i] Here's a test script I played with awhile ago to pipe the output of a
288871 [ochomoz@gm i] The code below is working with the xmpp4r form
+ 288908 [brabuhr@gm i] .../gems/xmpp4r-0.3.2/data/doc/xmpp4r/examples/
+ 288930 [misha@on t. ] Something like that, i believe.
| 288999 [ochomoz@gm i] Thanks for your help.
| 300637 [lokesh_agraw] `init
+ 317675 [veeraa2003@y] I can send IM to only by setting presence status, But my account have
  317676 [ochomoz@gm i] Veera,
  317682 [veeraa2003@y] No problem, thanks for instant reply. If I can solve the issue, I'l keep
  364733 [lareb.indore] I am trying to send some message over the gtalk, here is my code

Next Generation Web
288599 [rashida.guid] AJ Square's Next-Generation web solution is expressly designed to help

What this code means?
288602 [mohsinhijaze] I am new to Ruby, can anyone explain what this code snippet is
288605 [perfectly.no] class << some_object

regex issue
288610 [junkone1@gm ] my pattern should match either import or delete
+ 288612 [stefano.croc] 1) if you want to check that a string (in your case, 'import') matches a
| 288614 [ljjarvis@gm ] You don't need parenthesis..
+ 288613 [jgabrielygal] irb(main):004:0> pattern=/(import|delete)/

Searching for a working Ruby parser
288619 [saladin.mund] Hey folks!
+ 288624 [james@gr yp ] It's still young, so I'm sure it has rough edges but I've used it for
+ 288649 [devi.webmast] Also see
+ 288715 [ryand-ruby@z] Parser generator (for any grammar specified) or a _ruby_ parser?
  288723 [saladin.mund] Thank you very much for your help.
  + 288749 [devi.webmast] I you want some help getting started, I've been learning both Treetop
  | 288901 [faivrem@gm i] I just found Treetop and I was waiting for such a lib for quite a time
  + 288965 [no@sp m. le ] Check out the post at <http://www.infoq.com/news/2007/12/ruby_ruby_parser>
    289054 [saladin.mund] thanks for this website. the ruby_parser looks good.
    289107 [ryand-ruby@z] Seriously, ruby_parser is slow, ugly, and ... ugly.

[QUIZ] Making Change (#154)
288626 [james@gr yp ] 1.  Please do not post any solutions or spoiler discussion for this quiz until
+ 288630 [warrenb@aq i] James,
| 288634 [james@gr yp ] No preference.  Either is a valid answer.
+ 288653 [dominikho@gm] Are there any advanced combinations of change/array of coins which are likely to fail
| + 288656 [jgabrielygal] Is it ok to share test cases before the spoiler? I assume it is, and
| | 288658 [james@gr yp ] Sure.
| | + 288673 [jgabrielygal] require 'test/unit'
| | | + 288681 [jamesbkoppel] make_change(24,[10,8,2])  #=> [8,8,8]
| | | + 288771 [greut.lists@] There, mines, using rspec (a first try for the fun).
| | + 288700 [phillipsds@y] make_change 14, [10,7,3]
| |   288703 [andrew@an re] Why would this fail? The answer would be [7,7]
| |   + 288712 [pit.capitain] => [5, 3, 3, 3]
| |   | + 288720 [dominikho@gm] I wonder if it would be a big problem, if my script wouldnt handle this case.
| |   | + 288730 [andrew@an re] Nice Pit :-)
| |   |   288732 [denis@he ne ] make_change 1000001, [1000000, 1]	# => [1000000, 1] AND complete in a
| |   |   288758 [marcelo.maga] Didn't you have something like this in mind instead?
| |   |   288763 [denis@he ne ] No. I just meant that exhaustive searches should be avoided. Where a
| |   + 288713 [phillipsds@y] Because my code tried [10, 3] and saw it couldn't make 14 :-)
| + 288683 [denis@he ne ] # result may not be achievable using just  lowest value coin
+ 288682 [phillipsds@y] [200, 100, 50, 20, 10, 5]  # $2 and $1 are coins. We also have no 1c
| + 288702 [andrew@an re] Same here in South Africa. We're phasing out 1c & 2c coins so change of
| + 288809 [h.wickham@gm] And in New Zealand we've got rid of the 5c coin too.  Just another
|   288846 [rick.denatal] Man, if I only had a nickel for every time a Kiwi tried to stir up a
|   288898 [micathom@gm ] Actually, if I'm not totally mistaken, handling primes is a
+ 288795 [dominikho@gm] This is my solution. Handles the basic cases very well, but gets overwhelmed by complicated ones.
+ 288796 [denis@he ne ] Here's my submission to the making change quiz.  As Paolo mentioned,
+ 288803 [sander.land@] Here's my very simple recursive solution. It has a cache though, so
+ 288810 [rpotter@an .] Nothing particularly CS-y about my solution.  I just started with how I
+ 288814 [jgabrielygal] This is my solution. It explores a tree where each candidate solution
| 289004 [jgabrielygal] On Jan 27, 2008 7:21 PM, Jes=FAs Gabriel y Gal=E1n <jgabrielygalan@gmail.co=
+ 288821 [phil@s1 6. e] my solution(s).
+ 288825 [jontyjont@bt] As the aim is to find only the optimum solution all I do is
| 288828 [greut.lists@] 2 of coins of value 10
| 288830 [jontyjont@bt] Thanks Yoan - back to the drawing board!
+ 288902 [james@gr yp ] #!/usr/bin/env ruby -wKU
+ 288941 [adam.shelly@] Here's my somewhat simplisitc solution.  I just work upwards through
| 288990 [jamesbkoppel] My solution uses a queue of combinations of coins. In the basic algorithm, in each iteration, it dequeues the first element, creates a new combination combining it with one of each type of coin (i.e.: the Cartesian product of the set containing just the combination and the set of coins), and then inserts the new combination into the queue unless the sum is too large. When it encounters a combination whose sum equals amount, it saves that combination if it's smaller than the previous optimal combination or if the previous optimal combination is nil.
+ 289305 [asdhoke@gm i] ...

TextMate-like theme for NetBeans 6
288629 [mike.s.mckin] ...

Installing Ruby on Red Hat Enterprise Edition on a Terminal
288632 [rsteckly@wh ] ...
+ 288633 [fwmailinglis] HTH,
+ 288663 [cwdinfo@gm i] I'm running the same setup and I ftp downloaded it from the 1.8.6p111
+ 288782 [alexey.verkh] If you are looking for a precompiled Ruby RPM that was tested on RHEL
+ 288891 [vidar.hoksta] There are Ruby RPM's for most versions of Redhat - someone pointed you
  288900 [kyleaschmitt] Actually there really aren't modern ruby rpms for most RedHat

to sleep no more
288635 [westworld@pa] I'm a ruby noop trying his first steps. I'd like a little advice.
288643 [kratzers@pa ] class Animal
288650 [westworld@pa] Wow thnx Stephen for coocking up an example so fast :)
+ 288654 [nyarly@gm il] Thread.run do
| 288889 [westworld@pa] This is indeed what I needed. Many thnx
+ 288655 [kratzers@pa ] Ah, now I understand. Yes, if you want each Animal to be able to run through
+ 288657 [phil@s1 6. e] ok let's code a zoo. threads is what you are looking for, but there
  288890 [westworld@pa] Thnx for the example Philipp.

Re: Making Change (#154)
288636 [jballanc@gm ] I don't know...I hate pennies. IMHO, any answer that minimizes the
288646 [micathom@gm ] Are the coin values always given in descending order?
288651 [james@gr yp ] Is it that hard to call sort()?  :)
+ 288675 [robert.dober] funny mistake of yours James :)
| 288679 [james@gr yp ] I guess I should have said:  is it that hard to call sort { |a,b| b
| + 288686 [jens.wille@u] am i missing something? what's wrong with sort.reverse? apart from
| | 288704 [james@gr yp ] Because my first computer science teacher drilled into my head that
| | + 288719 [jens.wille@u] well, i guess i have to be glad to be unprejudiced in this regard,
| | + 288722 [micathom@gm ] I think reversing an array/list is rather cheap (especially when the
| + 288726 [robert.dober] Stupid me
|   288727 [summercoolne] Are you Pisces, Sharon?  Pisces like to make people feel happy.
|   288728 [summercoolne] # make_change(297, [100, 99, 1]) should return [99,99,99]
|   288733 [micathom@gm ] make_change(4563, [97, 89, 83, 79, 73, 71, 67, 61, 59, 53, 47, 43, 41,
|   + 288735 [denis@he ne ] It wasn't an explicit requirement, but I think the higher value coins
|   | 288736 [micathom@gm ] I took extra care to sort them this way in order to compensate for my
|   | 288756 [alex.shulgin] We have even richer set of common coins here in UA: [50, 25, 10, 5, 2,
|   | 288769 [james@gr yp ] I leave that to your best judgement.  We should probably remember that
|   | + 288783 [gm.vlkv@gm i] make_change(1023, (1..10).map{|n| 2**n}) # must be nil
|   | + 288784 [gm.vlkv@gm i] ###
|   |   + 288785 [bonzini@gn .] It should be obvious, but I'll point it out anyway: since make_change
|   |   | 288787 [micathom@gm ] What dh probably meant is that it's quite obvious that there is no
|   |   | 288789 [bonzini@gn .] Right, but what I've said is that, for all correct solutions, there
|   |   | 288794 [bonzini@gn .] def make_change(a, list = [25, 10, 5, 1])
|   |   | + 288798 [jjnoakes@gm ] I have two solutions. One is short and sweet, but since it doesn't use
|   |   | | 288800 [micathom@gm ] Here is my solution. It's ruby19 only.
|   |   | | 288815 [micathom@gm ] In order to make it pass all of phrogz test cases, this line has to be
|   |   | | 288816 [badcarl@gm i] def make_change(amount, coins = [25, 10, 5, 1])
|   |   | + 288804 [micathom@gm ] You aren't trying to make us convert?
|   |   | | + 288806 [phrogz@ma .c] Here's my solution. Unlike greedy or giving algorithms that round one
|   |   | | | 288808 [coder68@ya o] def make_change(amount, coins = [25,10,5,1])
|   |   | | | 288812 [jgabrielygal] [10,1,1,1,1] for make_change(14, [10,7,1]), instead of [7,7]
|   |   | | + 288813 [bonzini@gn .] No, but I admit I had more interest in GNU Smalltalk's performance
|   |   | + 288811 [phrogz@ma .c] Slim2:Desktop phrogz$ ruby -v
|   |   | + 288819 [rubytraining] My solution is somewhat similar to Paolo's in that it too does a
|   |   | + 288827 [rubytraining] I made a slight modification to Paolo's solution, so it avoids
|   |   | | + 288829 [rubytraining] If you're trying to make 14 from the coins [10, 7, 2], a test case
|   |   | | + 288834 [martin_luedt] def make_change(amount, coins = [25, 10, 5, 1])
|   |   | | + 288836 [bonzini@gn .] Cool, thanks!
|   |   | + 288905 [paddor@gm il] ...
|   |   |   288911 [micathom@gm ] Well, this is somewhat subjective.
|   |   |   + 288913 [james@gr yp ] Thanks!
|   |   |   | + 288918 [micathom@gm ] I excluded vsv's solution because it caused an error. I now realized
|   |   |   | + 288922 [badcarl@gm i] Thanks +1 !
|   |   |   + 288935 [rubytraining] Those times are awfully small, and I wonder if they're masking some
|   |   |     288947 [micathom@gm ] I also ran it with more iterations but the ranking remains about the
|   |   |     288954 [bonzini@gn .] Of course.  If every coin is a multiple of the immediately smaller
|   |   |     + 288958 [james@gr yp ] The book this quiz is based on explores that topic.  It recommended we
|   |   |     + 289039 [micathom@gm ] #1
|   |   |       289072 [atsuhiro1107] this is the first time I contribute to Ruby-forum.
|   |   |       + 289090 [james@gr yp ] Welcome!
|   |   |       | 289127 [atsuhiro1107] Ruby-Quiz!!Thank you so much!
|   |   |       | + 289128 [alex.shulgin] I've had some connectivity issues, so here is my a bit too late
|   |   |       | | 289146 [bermonruf@gm] ...
|   |   |       | + 289130 [raffaboss@gm] i found a solution that can process inputs like "make_change
|   |   |       | + 289141 [james@gr yp ] Some are for me too.  ;)
|   |   |       |   289149 [raffaboss@gm] - can process inputs like "make_change 1_000_000_000_000 4 3 7 6 85 98
|   |   |       |   + 289156 [raffaele_tes] some benchmark about generating the table for the un-ottimized algorithm
|   |   |       |   + 289294 [pit.capitain] Raffa, I think your algorithm doesn't always find the best solution. Try it with
|   |   |       + 289125 [jgabrielygal] The first problem is that your solution returns
|   |   |         289178 [atsuhiro1107] Now,I'm trying to fix this problem.
|   |   + 288786 [greut.lists@] make_change( 2**100-1, (1..100).map{ |n| 2**n } )
|   |     288835 [bonzini@gn .] I'm too lazy to run it... how does it fare for
|   |     288874 [bonzini@gn .] Badly :-P (30 seconds for s/100/7/g, of course I didn't try with
|   + 288757 [jjnoakes@gm ] [3, 17, 89, 89, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
|     288759 [micathom@gm ] 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97
+ 288714 [micathom@gm ] Not exactly hard. But since the coin sets in the examples were
threads.html
top