306587-308055

306396-349836 subjects 306759-311518

^ Is Logger thread safe?
306587 [ibc aliax.ne] thread. Must I do something to make the Logger thread safe?

^ Newbie Question On Ruby Quiz
306595 [kmurph79 hot] I'm a programming and Ruby newbie.  I wanted to build some programs, so
306600 [s.korteling ] It's trying to tell you that you're supossed to run madlib.rb with an

^ data structure
306596 [nairvan gmai] I would like to implement a tree with the following properties.
+ 306597 [shashank_hi ] If the number of nodes are known, then an array based implementation
| 306664 [shortcutter ] This might not even be needed depending on the usage of the tree, i.e.
| 306682 [nairvan gmai] Thanks for your replies. My problem is i dont know how to keep the
| + 306685 [AEtzold gmx.] Vandana,
| + 306686 [benjohn fysh] Am I right that given a number of nodes N, you want to know how to
| + 306688 [shortcutter ] Not sure what you are after.  If you need a balanced tree you can just
|   306695 [nairvan gmai] Thanks all.
|   306797 [B.Candler po] Then you're not looking in the right text books. See for example the classic
+ 306634 [usenet-nospa] I would suggest the use of an algorithm.

^ Newby question about Variables
306599 [smurf_bp ats] All,
306648 [sepp2k googl] They're called instance variables, not instant variables. And they're called

^ stretchy NVector
306602 [vjoel path.b] Anyone know a way to make a NVector (from the narray extension)

^ File question
306607 [tekmc hotmai] File.open('file.txt', 'r').each do |line|
306611 [botp delmont] RnJvbTogSnVzdGluIFRvIFttYWlsdG86dGVrbWNAaG90bWFpbC5jb21dIA0KIyBqdXN0IHdvbmRl
306612 [tekmc hotmai] Thanks, helps a lot. How about if I am using FasterCSV?
306613 [botp delmont] RnJvbTogdGVrbWNAaG90bWFpbC5jb20gW21haWx0bzp0ZWttY0Bob3RtYWlsLmNvbV0gDQojIHJl
306614 [tekmc hotmai] Terrific, thanks so much!

^ BUG: Ruby 1.8.7 - io.c Argument Error in syscall,"string contains  null byte"
306609 [john.carter ] I have opened this as bug...

^ Tk Table and Rails
306618 [ponravikumar] I want to use the TkTable in Rails application.
+ 306646 [uzimonkey gm] I think you would be better off making a client for your application
+ 307245 [nagai ai.kyu] Well...

^ Threads and Ruby
306620 [barjunk attg] I've been hunting around for information regarding threads, and to me,
+ 306621 [ara.t.howard] for any situation you want processes.  use fork or systemu if you want
| + 306624 [ara.t.howard] *or* checkout the slave lib - it may be quite appropriate.
| + 306651 [charles.nutt] I hope you mean "for this situation". Processes are definitely not the
|   + 306653 [gelios gmail] Ruby doesn't have _real_ threads AFAIK, so DRb+fork it's the only way
|   | 306780 [charles.nutt] JRuby has native threads that are _really_ parallel.
|   + 306719 [ara.t.howard] well, given that the difference between processes and threads is an
|     306779 [charles.nutt] The fact that Ruby's threading has many breakages and pitfalls does not
|     306782 [ara.t.howard] yeah i agree 100% in principle.  however i was programming java when
|     306840 [charles.nutt] The deprecation of thread stop, suspend, and exception raising was
|     306861 [ara.t.howard] i think java is correct to have done so, precisely because people have
|     306876 [charles.nutt] Since DRb operates over a network it's not reliable by definition; you
|     306880 [vjoel path.b] Yes, sqlite does synchronize, but a potential problem is granularity: a
|     + 306881 [vjoel path.b] between programs written in C and ruby, and haven't had major problems
|     + 306885 [ara.t.howard] but only very briefly, in practice the throughput is close to what you
|       + 306912 [charles.nutt] Of course that's mostly a factor of Ruby's rather simplistic thread
|       | 307097 [vieuxtech gm] Reminds me of the last time I looked at ruby's thread scheduling,
|       + 307020 [barjunk attg] OK, I'm going to try to recap what I learned so far from reading links
|         307038 [shortcutter ] Native threads do this as well.  The difference between native and green
|         307045 [charles.nutt] Ruby 1.9's threads are native, but they are not allowed to run in
|         307047 [ibc aliax.ne] AFAIK one of the advantages of green threads is that they are a bit faster.=
|         307061 [charles.nutt] I think there are several, but one I know of is that it simplifies the
|         + 307112 [shortcutter ] That's what I believe, too.
|         | 307150 [charles.nutt] It's fast, but it's not nothing...JRuby has a thread pool option
|         + 308014 [ninja slapha] I really hope this is true. I've been building a threading toy that I've since
|           308055 [smparkes smp] but I can't bring it up with Erlang people without being=20
+ 306623 [vjoel path.b] - use 1.9 if you need _native_ threads (e.g. to take advantage of
| 306652 [gelios gmail] really advantage on multiply processors? Ruby 1.9 does't use GIL???
| 306712 [vjoel path.b] You're quite right.
| 306731 [ibc aliax.ne] =2D-=20
+ 306667 [shortcutter ] As Ara said, in this case processes are the better choice for several
  306781 [charles.nutt] This is an eventual goal, but I asked ko1 about it and such work has not
  306895 [ibc aliax.ne] Now I'm doing a server in Ruby using green threads (Ruby MRI).
  306914 [charles.nutt] You should not need to do anything and the threads will "just be
  306918 [ibc aliax.ne] Great. Thanks a lot.

^ Win32OLE and SAPI5 voice recognition problem
306622 [agemoagemo y] I stumbled across the ruby library for this while poking around for
306680 [kyleaschmitt] Err, from what I see, I don't even think that's a ruby library, it
306700 [agemoagemo y] I'm not sure there isn't something a bit ruby-specific in here somewhere

^ What am I doing wrong! Arrays
306625 [nonstickglue] title = "word word1 word2 word3 word4 word5 word6 word7 word8 word9
+ 306626 [daniels pron] word9
| 306629 [nonstickglue] twelve = "12" and then changed it to array.length == twelve it does the
| + 306633 [thomas.pekla] if(array.length == 12)
| + 306647 [sepp2k googl] You're still compating array.length to "12", but Array#length returns
|   306683 [flo andersgr] Are you a PHP programmer by trade?
|   306756 [davebass mus] Similar thing with Perl. Perl scalars can be numbers or strings,
+ 306673 [krusty.ar gm] The previous mails have nailed the problem, but your array length is

^ leadtoasia help you explore Asian market
306628 [xian leadtoa] Lead To Asia One-Stop Service for your Asian Market Entry

^ [ANN] UPnP 1.0.0 Released
306632 [drbrain segm] UPnP version 1.0.0 has been released!
306649 [uzimonkey gm] I think there may be a dependency problem with your GemSpec.  The UPnP
306776 [drbrain segm] Yes, I am a bad person.

^ [ANN] UPnP-IGD 1.0.0 Released
306635 [drbrain segm] UPnP-IGD version 1.0.0 has been released!

^ multi-threaded access to shared memory space
306638 [lists gregwi] I have a pure Ruby project (no Rails) where I would like multiple
+ 306639 [drbrain segm] At present, 1.9 has a global VM lock, so only one C thread can be
+ 306643 [tim.pease gm] Take a look at mmap
+ 306660 [eleanor game] If you want to stay in pure Ruby, take a look at DRb and Rinda. Even
+ 306847 [charles.nutt] No, but JRuby's threads can.
+ 306858 [ara.t.howard] tim is right i think, mmap is a great approach.  i've used the

^ Sleep in a multithreaded environment
306650 [emanuelef ti] I'm trying to control an external process I'm running and quit it in
306654 [gelios gmail] pipe=IO.popen("executable.exe")
306656 [emanuelef ti] test_th.rb:20:in `select': can't convert nil into IO (TypeError)
306657 [gelios gmail] oh, sorry.: io=select([pipe],nil,nil,10)
306662 [emanuelef ti] pipe=IO.popen("hang.exe")
306668 [emanuelef ti] Actually I checked and the process is running but it became a zombie.

^ creating tables with internal borders with RedCloth
306658 [stefano.croc] I'm having a problem using RedCloth. I know this question is more suited for a
306661 [uzimonkey gm] You want a border around every cell?  If so, try something like this.
306666 [stefano.croc] Thanks for your answer, but this is not what I need. It seems I wasn't very
+ 306669 [uzimonkey gm] The same can be used with some minor tweaks.  Play with the padding and
+ 306670 [rimantas gma] Just add this to your CSS (change table.mytable as needed)
| 306687 [stefano.croc] Thanks, but this only puts a border around the whole table (unless I
+ 306690 [hassan.schro] If you're going to do web work, you need to learn CSS. In this case,
  306692 [stefano.croc] I read that document before sending the first post, but not well enough, it

^ problems reading xml from a db field and using it in REXML
306671 [aidy.lewis g] I have pulled some xml from a field in the database

^ How can I run url without using port ?
306675 [zangs.dev gm] I have developed 2-3 sample ruby application...
306811 [zangs.dev gm] no one here have the ability to help me ?
306819 [jan.svitok g] 1. is your application written in Ruby ON RAILS? This question is
306823 [zangs.dev gm] Thanks Jano for the reply and help...
306826 [jan.svitok g] [1] google.com
306827 [zangs.dev gm] Thanks so much again...
306830 [fox nscl.msu] Use port 80 if you just want to test with URL's that don't have ports.
306833 [zangs.dev gm] Thanks Ron for your help.
306989 [fox nscl.msu] All browsers I'm aware of will treat

^ How to Fetch list of Bounce emails??
306676 [shahpriyank0] Can Any one know how to fetch bounce emails list from application??

^ How install a gem which needs library at a special locatin
306677 [phlucas tech] I tried to install fxruby-1.6.15 with gem 1.2 under ruby 187 on a Linux
306681 [igal pragmat] Please see this page for instructions: http://www.fxruby.org/doc/gems.html

^ Cscope for Ruby?
306678 [odunkl gmx.n] does anybody know a tool with the functionallity of cscope, or is

^ nested methods good or bad design
306701 [jayeola gmai] =begin
+ 306703 [ara.t.howard] this is *exactly* what closures are for
| 306846 [charles.nutt] method_2 and method_3 are not long-lived, so if OP intention was to
+ 306845 [charles.nutt] If you intend to skip defining those other methods, you need a state
+ 306902 [krusty.ar gm] I'm not sure I understand completely, but how is having a variable (or
+ 306909 [micathom gma] Like Eiffel, Smalltalk, Java, Ruby doesn't have nested methods
  306915 [krusty.ar gm] But this has the additional (somewhat usefull) effect that calling b
  306961 [micathom gma] ...         print(1)
  + 306963 [ara.t.howard] def a
  | 306967 [micathom gma] This referred to the Python counter example -- because KA asked how
  + 307003 [krusty.ar gm] Y get it, it's as if each method defines a namespace, can
    307028 [micathom gma] I'd say no. You'd probably have to ask this on a python list for more
    307041 [krusty.ar gm] I was asking out of mere curiosity, but in any case it should be
    307046 [jayeola gmai] Um, thanks for all of the replies chaps. Most of it makes sense. In
    307133 [micathom gma] I don't know when you check the server. Maybe something like this

^ Tables: Unnecessary duplication of id fields
306702 [brian arielp] =begin
306705 [caduceass gm] While not really a Ruby or Rails question, it seems you have
306716 [brian arielp] =begin
306749 [caduceass gm] Hmm.  I'm no Rails expert, but maybe you should check the type/class
306751 [damnbigman g] It sounds to me like Itemprice.find(params[:ItemSerial]) is returning nil
307588 [brian arielp] Thanks all for the response. I will have to play with it some more this

^ Database stuff!
306704 [tekmc hotmai] I know this is a Ruby forum, but it has been the most helpful to me in
+ 306707 [caduceass gm] I'm not really a fan of MySQL, but they certainly have some decent
+ 306711 [ara.t.howard] use sqlite to get started
+ 306733 [shortcutter ] No, definitively not a programming language.  SQL is a declarative
| 306737 [tekmc hotmai] I've been reading mysql.com, but I can't even seem to test if the server
| + 306743 [damnbigman g] Justin, as far as Ruby and database interaction goes I would recommend an
| + 306750 [caduceass gm] Still don't know much about MySQL, but maybe you need to run mysqld-nt.exe.
|   306760 [tekmc hotmai] I've finally figured it out. http://www.w3schools.com/sql/ helped a lot.
|   306873 [tekmc hotmai] What is recommended... using the Ruby MySQL module or using the Ruby DBI
+ 306987 [brainychip g] Ah,

^ is it possible to create a hash dynamically?
306706 [aidy.lewis g] I am trying to build a dynamic hash map
+ 306708 [stefano.croc] The problem is in the line
| + 306717 [aidy.lewis g] it
| + 306720 [aidy.lewis g] it
+ 306709 [rick.denatal] def extract(xml, path)

^ help with threads
306713 [olifoxpaul g] i'm trying to do some automated tasks with threads.
+ 306757 [rubytraining] Have you looked at the Monitor class and using MonitorMixin?  I
+ 306816 [Guillermo.Ac] I needed to do something similar than you once, but in my case I needed to
+ 306844 [charles.nutt] A thread won't die without reason. If the thread completes normally, you

^ Errror: Both user and Secret Are Required
306714 [an2584 gmail] error

^ Something like import/package in java?
306715 [lerno dragon] I keep feeling frustrated with my ruby project.
306718 [uzimonkey gm] Not really.  If you're worried about namespace pollution, you can put
306724 [lerno dragon] Readability, clear division of responsibilities, ease of development.
+ 306747 [shevegen lin] I am not entirely sure where you are heading here. For my latest project
+ 306843 [charles.nutt] Think of require in terms of "load this file" rather than "import
  306998 [lerno dragon] For me it is not so much a namespace-issue. It is rather dependency =20
  307044 [charles.nutt] I think what you're looking for is a static dependency tracking
  307561 [lerno dragon] Static dependency tracking? Yes perhaps sort of that. It doesn't have =20=

^ Hiding a password in code.
306721 [dmerrick ics] My=20
306722 [uzimonkey gm] Store your password in an encrypted file.  When you start the script up,
+ 306726 [dmerrick ics] ,=20
| 306738 [leslieviljoe] "Interpreted language" is pretty much irrelevant though. The hackers
| + 306744 [leslieviljoe] It seems Gnome-keyring can be accessed from Python, so this may help
| + 306745 [dmerrick ics] That's sort of true. If I didn't employ any string obfuscation, it would =
| | 306755 [jeremy hineg] It was initially for just storing my own passwords and making them avaialble
| + 306752 [uzimonkey gm] Come to think of it, I used to use KDE's KWallet via dcop to store
+ 306831 [shortcutter ] Frankly, I'd rather let the user enter the password.  The security is

^ Ruby patch level
306723 [caliwildman2] I have Ruby 1.8.5 on Windows XP and unable to identify the patch level
+ 306758 [davebass mus] ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
| 306769 [caliwildman2] ruby --version is the same as ruby -v, it doesn't give me a patch level.
+ 306768 [jan.svitok g] If you installed your ruby from one-click installer, it's vulnerable
  306771 [caliwildman2] Thanks Jano, that's helpful, my Ruby installation was from Jan 2007 so

^ how to - quickly make permutations?
306728 [toastkid.wil] can anyone provide an elegant implementation for this method?
+ 306753 [AEtzold gmx.] Max,
+ 306761 [frederick.ch] def subsets(n, max_k)
  + 306778 [jimrails gma] each new element tries to double the size of the list
  | 306807 [toastkid.wil] Jim, this wins the elegance prize i think!  It's almost magical...i
  | 306848 [robert.dober] It runs into biiig performance issues for n >> size, and worse it does
  | 306850 [toastkid.wil] That's good to know actually, my real numbers are likely to be n =
  | + 306852 [AEtzold gmx.] Max,
  | | 306855 [toastkid.wil] Maybe there is...it's a little program to help my wife out with a bit of
  | | + 306862 [ara.t.howard] gem install permutation
  | | | 306866 [toastkid.wil] thanks - i looked at that but couldn't see how to only get distinct
  | | + 306865 [AEtzold gmx.] Max,
  | |   306867 [toastkid.wil] Thanks axel - i was thinking that some sort of 'homing in' approach
  | |   306893 [krusty.ar gm] If you find it hard to define your "steps", you should try a genetic
  | + 306854 [robert.dober] Oh that will be tough in Ruby, if I have some time I will try to
  |   306917 [adam.shelly ] Here's an alternate implementation using the "bankers order" algorithm from
  |   306933 [jimrails gma] 1.  I believe 50/10 is over ten billion long.
  + 306803 [toastkid.wil] Thanks everyone - Fred, this is perfect, having the different sized

^ working around frozen hash
306734 [danyc18 gmai] I need to parse the following date string (part of a file I need to
+ 306735 [fred lacave.] Why don't you change the timezone in the sting beforehand ?
| 306741 [danyc18 gmai] Because that is too easy and makes too much sense ;-)  I did not know
+ 306740 [robert.dober] <snip>i
  306742 [danyc18 gmai] Awesome.  I was expecting a way to 'workaround' the freeze.  Trying to
  306790 [robert.dober] I believe that you described the process very well :).

^ using gems without installing them (like jar files)
306746 [ snk gna.org] Is it possible to use gem files without having to install them, like you
306762 [drbrain segm] No.
306766 [ snk gna.org] Awesome!  Did not know about GEM_HOME.
306775 [drbrain segm] Were I writing it, I would make a Kernel#require overlay that knows
threads.html
top