45883-47186

45702-47288 subjects 46130-47617

^ Q's about rubydbc
45883 [ rtan vt.edu] I just downloaded the ruby design by contract code, and I have a couple
+ 45890 [andy toolshe] Sadly, no.  I whipped that up as an experiment a while ago,
+ 45895 [justinj mobi] I'd be interested to know if anybody is using this too.
  45897 [andy toolshe] I think so, despite the fact that I haven't used it much myself :-)

^ Re: Emacs is dead, ...
45887 [michael_s_ca] It's been thought of, a lot.  I've heard/read threads for years about

^ Re: GridFlow 0.6.0 (fwd)
45893 [matju sympat] Here is a new release of GridFlow (a multi-dimensional dataflow processing

^ How to copy string from in a file from some string onward?
45910 [keuler porta] All-
+ 45912 [dblack candl] /#{x}.*/.match(y)[0]   # =>"jumped over the lazy dogs back."
+ 45913 [alan digikat] x = y.slice(Regexp.new("#{z}.*$"))
| 45916 [keuler porta] Thanks Alan, Dave!
+ 45917 [batsman.geo ] x = y[(y =~ /#{z}/)..-1]
  + 45936 [keuler porta] Dang, that's compact! Thanks!
  + 45963 [behrends cse] Does not work reliably if 'z' contains special regular expression

^ OT: Editors, Tabs & Spaces (Re: Style question)
45914 [tsiivola cc.] Hmmm. I believe emacs can be made to EAT UP little innocent spaces and

^ Para o educador a psicologia muito mais que uma ferramenta de trabalho
45924 [promocao seg] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

^ ftp
45925 [adavies optu] ftp = Net::FTP.new('www.4gigs.com', user, pass, )
45955 [J.Hawkeswort] I think what you are asking for is outside the remit of ftp.
+ 45956 [J.Hawkeswort] Whoops - incomplete message.  As I was saying
| 45962 [tsiivola cc.] puts (Net::FTP.methods - Object.methods).sort,
+ 46116 [adavies optu] Thank you for your help.

^ How to make a virtual 2nd column!!!
45938 [keuler porta] All-
+ 45941 [dblack candl] # Very quick, home-rolled text wrapper (there are others out
+ 45944 [pabs pablotr] #!/usr/bin/env ruby
| 45970 [dblack candl] $ ruby -ve 'ARGV.each {|f| p File.readlines(f)}' file1 file2
+ 45978 [rubel crhc.u] You might want to look into FormatR ;)

^ Problem reading $stdin on Windows
45939 [patrick.benn] Using the rubycentral/1.6.6 install of Ruby, I'm having problems reading
45943 [nobu.nokada ] Once I've heard same issue occurs also with Perl in that way.

^ Any way to disable command-line expansion?
45940 [patrick.benn] Is there any way (windows / Ruby 1.6.6) to disable the automatic
45945 [nobu.nokada ] Or if you run cygwin ruby from non-cygwin shell, add "noglob" to

^ win32ole and excel
45942 [martin massi] @app = WIN32OLE.new("excel.application")
+ 45967 [masaki.suket] Try to specify full path of racetemplate.xls.
+ 46162 [mikkelfj-ant] file
  46191 [masaki.suket] Oops, the ie.rb sample is not correct. I'll repack win32ole-0.4.8.1-01.zip
  46227 [mikkelfj-ant] this
  46295 [masaki.suket] FYI, The "method_missing" is because of the trick of Win32OLE.
  46336 [mikkelfj-ant] Right - I see that now.
  46407 [masaki.suket] I am not sure but I hope to fix.
  46483 [mikkelfj-ant] I think they generate wrapper code from the typelib. So the wrapper uses
  46519 [masaki.suket] FYI, sample/olegen.rb creates wrapper code from the typelib.
  46704 [mikkelfj-ant] Well, I tried patch, but I've never done that before and got
  + 46811 [masaki.suket] Hmmm...
  + 46812 [masaki.suket] <mikkelfj-anti-spam@bigfoot.com>
    46823 [mikkelfj-ant] You should remove "-anti-spam"
    + 46824 [hal9000 hype] to
    | 46828 [mikkelfj-ant] I'm not sure - I think I am.
    + 46889 [masaki.suket] I understand what is the problem now.
      47119 [masaki.suket] Done. Please try Win32OLE 0.5.0.
      47156 [mikkelfj-ant] Works on my test script :-)

^ How to format the 2nd field in a record with word wrap?
45946 [keuler porta] All-
46020 [gsinclair so] I'll throw my hat in the ring as well!

^ GetoptLong#to_hash
45947 [pabs pablotr] I find myself converting the results of option parsing into a hash.  I
45949 [pit capitain] I used a similar approach, too, and found it very useful. Otherwise I
45968 [djberge qwes] Let's take it a step further.  Scrap the current implementation and make
46035 [gsinclair so] That doesn't sound like a great idea to me, unless *all* the methods of Hash
46048 [djberge qwes] I disagree.  Why must *all* the options be *useful*?  I'm sure more than one
+ 46049 [hgs dmu.ac.u] Doesn't it need to be an ordered hash, for the case where successive
| + 46075 [charleshixsn] Sounds like a tree is what you are really after.  Or a hash that has
| | 46083 [pbrannan atd] Or an array of pairs (which can be generated from a hash, if necessary)
| + 46093 [pabs pablotr] The conversation here seems to be assuming I was talking about replacing
+ 46058 [nobu.nokada ] GetoptLong doesn't act like a Hash, but does as an Enumerable.

^ "gets" blocking process not thread (in Windows only)
45948 [mfp cs.mu.OZ] The problem with my program is that (in Windows) gets seems to block the entire
+ 45983 [Laurent.Jull] I don't know if this relates in any way with what Curt Hibbs is trying
| 45987 [hal9000 hype] I think this *may* be unrelated.
| 45990 [curt hibbs.c] It might be related. The one of the test cases I am currently using does not
+ 46029 [nobu.nokada ] This limitation comes from that the current implementation uses
  + 46056 [pbrannan atd] What issues are there with using rb_f_select() instead?
  | 46333 [nobu.nokada ] I meant that rb_f_select() is implemented with select().
  | 46335 [pbrannan atd] Could rb_f_select() be changed to work in terms of
  | 46343 [nobu.nokada ] I heard it's not guaranteed to work with sockets, and
  | 46419 [pbrannan atd] I wonder what "not guaranteed" means.
  | 47186 [nobu.nokada ] It means, it depends on the implementation and MAY work.  It just
  + 46294 [mfp cs.mu.OZ] Is this a problem in the cygwin as well as the vc++ compiled versions of ruby?
    46334 [nobu.nokada ] Under cygwin, apparently once you type any key and "gets" block

^ tail - latest incarnation
45984 [djberge v55h] Here's the latest incarnation I've come up with, stealing bits of code from James Hranicky and

^ vim indenteation for ruby
45998 [lists debona] Hey,
+ 45999 [lists debona] found the culprit.
| + 46001 [hal9000 hype] There's obviously no real standard. That is
| | 46028 [alwagner tca] Yes, that's true.  I received the same revelation.
| + 46003 [ned bike-nom] Yes, it is; I'd add "set et".
|   46007 [gsinclair so] There's no good reason.  It should be removed.
|   46011 [gsinclair so] While we're on the subject, comments shouldn't be forcibly continued when
|   46016 [rawlins cs.u] Oh God! can I not save=20
|   46021 [gsinclair so] Oh, I realise that, but it shouldn't be in the standard ftplugin.
+ 46050 [martine cs.w] (and :set noet, but that's the default, I think)
  46066 [tom.hurst cl] Note the automatic indenting is set by shiftwidth, which is set to 2 in
  46171 [lists debona] I don't mind tab being represented by two spaces, I prefer 3, but sw

^ Checking whether a process exists (unix)
46004 [harryo zip.c] To check whether a process with a given ID is still running on unix, I would
+ 46006 [harryo zip.c] As usual, I just realised that I've misunderstood the problem.  Given the way
| 46008 [harryo zip.c] Ignore my previous ramblings.  I've worked it out.
| 46025 [djberg96 att] command called "Sys/ProcTable".  It's available on the RAA and works for
+ 46057 [pbrannan atd] When kill() doesn't actually kill a process, it seems to raise an

^ .irbrc (was Re: ftp)
46022 [gsinclair so] Very nice.  I've appropriated it.  Thanks!

^ Style: where to require in libs?
46023 [comp.lang.ru] When writing libraries for other programs to use
46026 [gotoken notw] [1] and [2] have the same effect for ruby interpreter at all because
+ 46045 [meier meiste] =2E..and make debugging harder. But aren't we all doing unit testing? :)
| 46081 [gotoken notw] By the way, unit testing is big fun but useful only if that testing is
+ 46079 [comp.lang.ru] - - So require is not just a "smart" include, but something that
  46092 [gotoken notw] Yes.  require doesn't "insert" code there.  require only loads a

^ IO.readlines is slow ?
46030 [ADATE kc.rr.] arr = IO.readlines("test1.txt")
+ 46031 [ned bike-nom] On my machine it takes 0.1 seconds or so to read a 4Mb file made
| 46038 [nobu.nokada ] It would depend on the version.
| 46052 [ned bike-nom] Hmm... quite right... Ruby 1.6.7 is three or four times as slow as the
+ 46033 [gsinclair so] Fair enough to enquire about performance, especially relative to similar
+ 46043 [pierre.baill] oct@carafon:~$ ls -la sample.txt
| 46053 [ned bike-nom] $ time ruby -e 'a=File.open("bigfile").sysread(4194304).split("\n")'
+ 46085 [briqueabraqu] Just to report, I have a similar problem: on my system (Ruby 1.66,
| + 46086 [ned bike-nom] This is a file on your local disk?
| | 46087 [briqueabraqu] Yes. EMACS takes less than 2 seconds to open it.
| + 46088 [Dave pragmat] I believe this is a known problem on 1.6.6: I believe the installer
+ 46089 [lyle users.s] I hope this isn't a big step-out on my part, but ISTR that there is
+ 46103 [ADATE kc.rr.] Thank you all for pointing me in the right direction.

^ Pagetemplate queries
46037 [waisun.chia ] Just started out with PageTemplate 0.3.2 with mod_ruby 0.9.9 and ruby
46106 [alex pressur] No, the package doesn't have built-in support for 'include' type directives.
46268 [waisun.chia ] Thanks for the hint. I'll try it out right away..

^ How to Load Script from a C Extension?
46072 [billtj z.glu] Is it possible to load (and execute) a Ruby script from within a C
+ 46076 [billtj z.glu] My current temporary solution is to open the Ruby script file in C, get it
| 46108 [ptkwt shell1] Why call Ruby from the C side?  It seems to me to be easier to call your C
| + 46120 [decoux moulo] Well, probably it exist different problems with different solutions :-)
| + 46298 [billtj y.glu] Yes, in my application, initially it is a Ruby script that calls my C
|   46303 [erik bagfors] Why go ruby->C->ruby?  Why not do
|   46316 [billtj y.glu] I am not too clear regarding the meaning of "send the parsed data to
+ 46080 [nobu.nokada ] Perhaps, the code in that several lines is something wrong.
| 46084 [billtj z.glu] I checked the code and it appears that all those lines are just global
| + 46102 [nobu.nokada ] Could you show me the code fragment and backtrace?  And what's
| | 46300 [billtj y.glu] My environment is
| + 46117 [decoux moulo] It's best to use rb_load_protect(), this give you the possibility to catch
+ 46134 [alv poczta.o] rb_require("conf.rb");
  46308 [billtj y.glu] Yes, in my C extension Init_xxx function, I have a rb_require right after
  46314 [decoux moulo] You have a bug. Post your source or nobody will be able to help you

^ Modifying files.
46074 [khabibiuf ho] I'm trying to modify a file that has tab delimited fields.  I want to
+ 46077 [tom linuxbri] You should be looking to write out the file again with modifications
+ 46078 [ned bike-nom] f.join("\t")
+ 46082 [nobu.nokada ] File.open("blah.txt.new", "w") do |b|
  46153 [gsinclair so] Should be b.print f.join("\t") ?
  46158 [nobu.nokada ] Yes, sorry, it's untested.

^ yet another vim/ruby question
46090 [rawlins cs.u] I was somewhat confused as to who the current maintainer of the ruby
+ 46094 [ned bike-nom] I believe Doug Kearns <mailto:djkea2@mugca.its.monash.edu.au> took it
+ 46302 [hgs dmu.ac.u] I believe that my mods to the Ruby syntax file introduced folding.
  46351 [djkea2 mugca] No, it looks like this problem has always been there, so unfortunately
  46352 [cparrish cox] Ops I suddenly feel like I deleted some files I shouldn't have Does this mean that there is a better Ruby syntax file somewhere that I should add to my system? Does anyone have a web page on hints and tips to coding ruby apps with VIM? For instance is there a way to run ruby apps from within vim? (I just figured out how to use ant from within vim hence the question).
  46354 [djkea2 mugca] questions.

^ JRuby changes breaking code?
46091 [adamon maila] I am running the sample code straight out of Ruby Developer's Guide,
46112 [ndrsbngtssn ] I don't know which version of JRuby that Ruby Developer's Guide refers
46118 [ndrsbngtssn ] A few minutes later: It turned out it wasn't a bug in JRuby at all. But
46176 [adamon maila] Thanks!  Much obliged.

^ Overriding Assignment
46095 [raganwald ya] Is it possible to override the assignment operator?
+ 46098 [ned bike-nom] What would be the receiver?
+ 46099 [ned bike-nom] It works, but you're just not calling it the right way (though this is
  46927 [raganwald ya] Thanks for your help. As you guessed, that wasn't what I wanted,

^ ANN: The GUtopIa Project
46101 [transami tra] I should say, given that Ruby is arguably the best programming language

^ Upgrading to 1.7.2 !
46104 [ADATE kc.rr.] I am thinking of  upgrading our Windows NT servers from Ruby 1.6.7

^ Ruby on the Sharp Zaurus PDA
46105 [ian caliban.] The Sharp Zaurus is a really cool StrongArm powered PDA that comes
+ 46111 [vincent.fiac] Argh ! There's currently a contest organized by Sharp. The goal is to
| 46115 [ian caliban.] Very cool!
+ 46135 [jerome gotan] I talked to matz about this a few weeks ago and he invited me to ruby-
  46282 [ian caliban.] Well, no porting is really necessary to get the basic package
  46531 [mike_thomas ] Just FYI,
  46548 [kero chello.] I maintain the ipkg for ruby for iPAQ, good to hear it works on Zaurus as
  46583 [henryso pani] Do you compile this directly on ARM-based hardware or do you

^ embed or swig?
46107 [ptkwt shell1] I'm working a C++ project for a contract I'm doing.  Originally, the
+ 46121 [transami tra] i am not too fimiliar with swig. but it's starting to sound like one of
+ 46122 [jim freeze.o] You are doing just what I would have done.
+ 46126 [hal9000 hype] This sounds very interesting to me... can you
  46139 [ptkwt shell1] First take a look at Swig at: http://www.swig.org
  + 46141 [list NOSPAMc] Wait a minute.  Do you really mean that, after you've written your C++
  | + 46145 [hal9000 hype] Well, from what I see on the SWIG site, it appears
  | | 46150 [list NOSPAMc] /me drools copiously
  | + 46172 [ptkwt shell1] Well, that is a bit simplified, though there are cases where that would
  | + 46173 [vor_lord hot] That is not simplifying at all for basic functionality.  Certainly depending
  | | 46190 [transami tra] i was just reading over a little of the swig docs and HOLY CODING! from
  | | + 46194 [robert.calco] I'm working on a wxWindows port for Ruby (called, predictably, wxRuby),
  | | | + 46197 [robert.calco] Sincerely,
  | | | + 46205 [transami tra] i discover your sight about a week or so ago. have been meaning to chat
  | | |   46211 [robert.calco] I want to make sure the wxRuby port is sufficiently well-thought out to take
  | | |   46247 [rich infoeth] mine,
  | | + 46243 [leon ugcs.ca] As a matter of fact, I attempted to swig a ParaGUI binding for Ruby
  | |   + 46288 [ptkwt shell1] You definately should try it again.  From what I understand swig 1.3.12
  | |   + 46355 [transami tra] will you give it another go? i, for one, am very interested in seeing a
  | + 46388 [pi_ml source] I saw this thread on the Ruby Weekly News and was surprised, that some Ruby
  + 46143 [hal9000 hype] "Curiouser and curiouser," said Alice.

^ Cannot enter Thai Character in TkEntry
46110 [titasak heal] I am trying to input a Thai character into TkEntry but failed when I enter english

^ Deprecation and Unicode
46125 [danny frouke] There's a nice article at
+ 46127 [ned bike-nom] Actually, we've pretty much beat this to death in the past few days.
| + 46129 [gehlker fast] I think you have it. Unicode is formally a 31 bit character set but the
| | + 46180 [cjs cynic.ne] Been here before, just the other day. Unicode is *not* a 31-bit
| | + 46186 [matz ruby-la] I think "Unicode" here should be replaced by "ISO 10646".
| + 46159 [nobu.nokada ] I guess you mean UTF-16, one of variable length encodings, it
| + 46179 [cjs cynic.ne] Right.
+ 46178 [cjs cynic.ne] I'd be careful with this article; it's got errors in it. I'm not going
+ 46183 [nobu.nokada ] What methods do you mean? open3?
  + 46187 [kentda stud.] Just want to chime in and let you know that I agree with Danny. Now,
  | 46213 [nobu.nokada ] I forgot it, thank you.
  + 46188 [danny frouke] Yes, names like that. But I didn't mean to open a flamewar on naming
    46189 [decoux moulo] Well, it depend what you call "official" but actually you have

^ Assoc Class (Hash Pairs)
46128 [transami tra] i've been thinking about posting this as an RCR.
+ 46137 [harryo zip.c] This piques my interest, but I'm at a loss to see what one would DO with one
| + 46138 [hal9000 hype] Interesting idea. Some comments...
| | 46148 [transami tra] z = ordhash[0]['a']
| | + 46152 [hal9000 hype] Yes, but that's my point: It's not a hash any more. It's
| | | 46269 [charleshixsn] Generally the right way to implement an ordered "hash" is with a tree.
| | | 46276 [hal9000 hype] of
| | | 46470 [charleshixsn] That sounds like a balanced tree to me.  I think I saw a Ruby implementation
| | | 46525 [alwagner tca] <sniip>
| | | 46547 [charleshixsn] Humh... the closest I could come to that was a Red-Black Tree (RBTree,
| | + 46160 [list NOSPAMc] z = { 1 => 'bar', 'foo' => String }
| |   46163 [transami tra] i'll take a look at this ZigZag. thanks.
| + 46144 [transami tra] i recall having a need for it some time ago, but i don't recall off hand
|   46149 [list NOSPAMc] This way, the parent won't know it has a child, and the child won't
+ 46196 [dblack candl] I *think* you can do everything you need in this area in Ruby as it
| 46204 [transami tra] thanks david, that was very helpful. i had forgotten that hashes could
| 46209 [dblack candl] It's an interesting thing to think about, in part because it raises
| 46214 [transami tra] i think i understand what your getting at.
| + 46216 [dblack candl] You could argue that an array is basically a hash whose keys are
| + 46218 [gsinclair so] Hashes don't have "elements".  They map Objects to Objects.  That is their
|   46241 [vjoel PATH.B] h = {:a=>1, :b=>2}
|   46257 [gsinclair so] their
|   46263 [ned bike-nom] class Association
+ 46299 [pbrannan atd] A pair is a real object; it's called an array (with length=2).
threads.html
top