41437-42205
41206-42178 subjects 41677-48386
^ changing current directory
41437 [Jean-Francoi] is there a way to change the current directory into my ruby program so
+ 41438 [erik bagfors] /tmp
| 41514 [dennisn pe.n] Try Dir.chdir("new_directory_name")
| 41515 [tobiasreif p] Tobi
| 41568 [dennisn pe.n] Right you are! I got a little backed up on my email, and didn't
+ 41529 [nobu.nokada ] I'm not sure what you really want, `into my ruby program' means
^ Idiom
41439 [stephan.schm] I need assistance with a hash->hash->list structure.
41440 [decoux moulo] You can perhaps look at the module PerlValue
^ Thread safe array
41442 [chris.morris] it out here for review. Any holes in this approach?
41443 [decoux moulo] It depend what you call a hole. What do you expect with ?
41446 [chris.morris] Good question. Obviously, it's false with the given code. I think that's
+ 41449 [decoux moulo] Well, something like this
+ 41456 [dossy panopt] Out of paranoia (and because I don't know how Mutex#lock is
+ 41460 [chris.morris] Hmm ... I guess your way is safer -- but for it to matter, there'd have to
+ 41469 [nobu.nokada ] def method_missing(method, *args, &block)
^ Threading question
41444 [chris.morris] create a conflict between one thread deleting an element from the array
41445 [decoux moulo] Well, ruby use qsort(). a C function can't be interrupted, this mean that
+ 41448 [chris.morris] Ah, so my assumption about Ruby threading is wrong(?) -- it just works out
+ 41450 [decoux moulo] I've said a stupidity (it's normal :-))
41453 [chris.morris] Right, that makes sense.
41454 [decoux moulo] In a C extension, you must *explicitely* call the thread scheduler if you
41455 [chris.morris] I see. Think I got it now. Thanks a lot for your help.
^ "system" and Windows
41447 [Jean-Francoi] I have a problem with the "system" command under Windows.
+ 41451 [chris.morris] I'm using pragprog 1.6.6-0 dist. system has some problems 'out of the box'.
| 41461 [Jean-Francoi] thx for your work
| 41468 [chris.morris] Chris
| 41471 [Jean-Francoi] I have cut & paste the code in my program and it doesn't work :-<
+ 41492 [nobu.nokada ] system ('c:\Program Files\App\cmd.exe',"file")
+ 41504 [chris.morris] Here it is again copied from the very file I use. Maybe the web rendition
| 41583 [Jean-Francoi] thank you, "system" works very well now.
| 41615 [home clabs.o] Ah, I'd not noticed that before. Thanks for bringing that up. If I get a
| 41695 [chris.morris] Well, it appears this is all moot. 1.7.2 (more precisely, cvs version from
+ 41566 [Jean-Francoi] sorry, but neither of these two commands work :-<
| 41585 [nobu.nokada ] It works only in 1.7 unless backported, sorry.
+ 41700 [mjohnston it] Also, remember that if you're using the Cygwin based Ruby, you'll need
^ Array Uniq
41457 [stephan.schm] what method does array.uniq use to compare to objects ? Which method
41458 [decoux moulo] Array#uniq first make an Hash
41459 [stephan.schm] this didn't work, any idea what I do wrong ?
41462 [decoux moulo] Here an example
41463 [stephan.schm] Thanks a lot,
^ [ANN] Gnokii for Ruby
41467 [chrris mail.] It is with some degree of pride that I announce my first attempt in
41472 [hal9000 hype] It sounds great. I would try it if I had a Nokia.
41497 [chrris mail.] You might want to ask the Gnokii developers if they are planning any
^ mkmf question - conditional installs
41486 [djberge qwes] This is probably an easy one.
41537 [decoux moulo] The best, probably, is to have an extconf.rb for each of your extension.
41548 [djberg96 hot] x.c
^ Trouble attempting to run tk under windows
41496 [vmreyes us.i] I am trying to use tk for the first time by running the following simple
+ 41499 [hal9000 hype] [snip errors etc.]
| 41501 [vmreyes us.i] [snip errors etc.]
+ 41530 [nobu.nokada ] You need to install Tcl/Tk.
+ 41542 [vmreyes us.i] Thank you Bob.
| 41551 [bobx linuxma] If you have to have 1.6.7 then no. The Pragmatic Programmer one is
+ 41550 [bobx linuxma] You do NOT need to install Tcl/Tk on Windows to use Tk with Ruby. You
41552 [bobx linuxma] Ooops...actually you may need to for distro. You do not need it for the
41616 [vmreyes us.i] I finally got Tk to work.
^ Trouble attempting to run tk under windows
41502 [vmreyes us.i] The tk83.dll is not on my system. I searched the entire drive
41523 [bobx linuxma] I just looked at the zip file for that distro...that DLL is NOT in there.
41525 [Dave Pragmat] Which distribution are you using?
41549 [bobx linuxma] I am not using any. I think the distro in question is NOT the Pragmatic
^ Singleton Waring - Mixins & Inheretance
41509 [mdepot genuo] (eval):4: warning: instance variable @__instance__ not initialized
41533 [matz ruby-la] This one fixed in 1.7; until 1.7 get stable you need to mix-in for
^ Finding all applications
41510 [gehlker fast] In trying to add drag and drop scripting to RubyStudio and the first task is
41558 [ jimm io.com] I'm away from my MacOS X box, but have you tried this?
41561 [ser germane-] ruby -r find -e 'Find.find("/"){|f| puts f if f[/\.app$/]}'
41564 [nobu.nokada ] Or,
41575 [gehlker fast] On 6/1/02 11:33 AM, "nobu.nokada@softhome.net" <nobu.nokada@softhome.net>
+ 41576 [michael_s_ca] Catalog?
| 41578 [gehlker fast] That is probably Mac speak. I know Windows used to call it a FAT but I think
| + 41579 [dossy panopt] Did Mac (HFS I'm assuming) index the filesystem and allow searching
| | + 41586 [gehlker fast] Basically yes. There is API for treating the filesystem as a database.
| | | + 41587 [rick rickbra] In the Unix world in general (which OSX is now a part of), there's
| | | | 41626 [gehlker fast] Ah, I didn't mean to imply that I could find all the files created by any
| | | | + 41636 [ser germane-] <replying-to-wrong-poster>
| | | | + 41644 [rick rickbra] I believe in KDE you get konqueror, though even that's probably
| | | + 41610 [ser germane-] I want to caveat my earlier message about slocate. It does build this
| | | + 41617 [alwagner tca] Based on this thread, I just installed slocate. There is an option that
| | | | + 41619 [ned bike-nom] ...
| | | | + 41620 [alan digikat] On linux systems the command to index the filesystem is updatedb. You can
| | | | + 41634 [ser germane-] ser@ender Work/blog% cat /etc/updatedb.conf
| | | | 41641 [alwagner tca] Thanks, Sean.
| | | | 41651 [ser germane-] Ditto. Where'd that come from (the Quantum Mechanics quote)? I like to
| | | | + 41653 [hal9000 hype] I can't recall where that came from... the original (AFAIK) was
| | | | + 41682 [alwagner tca] I don't know. I stole it from someone else.
| | | + 41625 [gehlker fast] Thanks for all the suggestions, Sean. Mac OS does provide BSD locate but
| | | + 41632 [tsiivola cc.] Check http://anacron.sourceforge.net
| | | + 41633 [martine cs.w] Google for "MacJanitor". It's designed to work around this very
| | | + 41635 [ser germane-] <laugh>
| | | 41649 [gehlker fast] Actually, I'll do just that.
| | + 41595 [tobiasreif p] I'm new to *n*x, but
| | 41597 [nobu.nokada ] I-nodes don't have the names and no portable way to access
| | 41599 [tobiasreif p] You're right. But he could search it as root?
| | + 41600 [nobu.nokada ] Maybe.
| | | 41607 [tobiasreif p] AFAIK, Mac OS X is quite Unix-like, being based on
| | | 41608 [boognish23 y] I have to say that I suffer from EXTREME mac envy, :(
| | + 41613 [rick rickbra] On a Unix system anyone can look at the filesystem entries associated
| | 41621 [tobiasreif p] "When a new file is created, an i-node is allocated for it and a
| | 41643 [rick rickbra] Correct, but not while there are open descriptors. Implement it and
| | 41658 [tobiasreif p] Sure; I thought you meant the number of links.
| + 41580 [nobu.nokada ] Perhaps, you may want to access `Deskop Database' or something
| 41589 [gehlker fast] On 6/1/02 8:59 PM, "nobu.nokada@softhome.net" <nobu.nokada@softhome.net>
+ 41606 [ser germane-] Chris,
^ Sockets, AF_INET6 and getnameinfo problem
41513 [qrczak knm.o] require 'socket'
+ 41534 [matz ruby-la] I should work indeed. I suspect getnameinfo(3) on Linux does not work
+ 41543 [qrczak knm.o] It's glibc-2.2.5.
41572 [matz ruby-la] Thank you. I will check IPv6 in extconf.rb by default.
^ mod_ruby documentation/tutorial...
41516 [sean ruby-la] It's not complete yet, but there's a mod_ruby tutorial that's
41521 [bcox virtual] Sean, I'm an long-term user of mod_perl and tomcat/jetty and a recent convert
^ [REXML] Looking for XPath testers
41518 [ser germane-] I've done some preliminary tests on a new implementation of XPath, and the
41541 [tobiasreif p] For documents that I din't create I don't know which prefix stands for
^ Rite
41520 [sosoruby ema] Just curious: I saw some posts that rite (the next ruby interpreter)
41522 [dossy panopt] According to Matz, it's vaporware -- saying that it's "moving pretty
^ Re: possible bug: stack dump with <<-String, #{...} and large loops
41531 [chr_news gmx] It does not really retrieve it - it is just telling Ruby to interpret ``a''
41538 [decoux moulo] There is different way to see it :-)
41539 [decoux moulo] ^^^^^^^^^^^^ ^^^^^^^^^^^^^
^ Ruby-GNOME 0.28 is out!
41532 [mutoh highwa] I'm new Ruby-GNOME Maintainer.
+ 41536 [martine cs.w] Is this based on gtk.defs or is it all still done by hand?
| 41540 [mutoh highwa] It is still done by hand.
+ 41565 [alwagner tca] Hooray. I've been waiting on something like this to give gnome/gtk another
^ net/ftp is cpu bound on fast internet connections
41544 [jheard acxio] I was trying to run multiple ftp.putbinaryfile jobs and noticed that if
^ irb bug with 'do'
41545 [qrczak knm.o] irb sometimes doesn't see that a statement is complete when 'do'
^ \G in regexps not documented?
41546 [qrczak knm.o] Where is an *up to date* documentation of Ruby regexps?
+ 41571 [matz ruby-la] "Ruby in a nutshell" page 14.
| 41574 [dennisn pe.n] Ummm... I've seen web resources that will take a brief phrase in English
| 41577 [james rubyxm] Will translate entire pages.
+ 41590 [qrczak knm.o] Ugh, it's only on the paper :-(
41591 [james rubyxm] Still, this page
^ Reading binary files (or strings)
41547 [han.holl pob] I need decode a binary file, (small enough to fit in memory).
41553 [nobu.nokada ] string.unpack("@#{offset}format")
41555 [han pobox.co] Yes! That's exactly what I need. Thanks.
+ 41556 [Dave Pragmat] Umm.. it's the last entry in the table
| 41557 [han pobox.co] Oops. Yes, I completely missed it, even _after_ Nobu told me what to
+ 41563 [nobu.nokada ] Sorry, I've written nothing other than TestStringIO.rb in
41601 [han pobox.co] It certainly looks nicer than
41602 [nobu.nokada ] It was just a quick example. You can use readbytes.rb to
^ String#slice! changed behavior
41554 [qrczak knm.o] For "abcd".slice!(/x/) ruby-1.6.7 does nothing and ruby from cvs
+ 41573 [matz ruby-la] Yes. To make errors to be detected early.
+ 41588 [qrczak knm.o] So what about "abcd".slice!('x'), "abcd"['x'] = 'y', "abcd"[/x/] = 'y'
41622 [matz ruby-la] The first three should raise exceptions. I will fix.
^ Web Page Listing Ways People Use Ruby
41569 [dennisn pe.n] A couple of weeks ago I found a rather interesting web page in which
41570 [tobiasreif p] Tobi
^ Ruby 1.6.7 dieing of segfault
41581 [dossy panopt] I've got something that's fairly reproducible in 1.6.7. Is
41582 [nobu.nokada ] What did you do? How can I reproduce it?
41584 [dossy panopt] Heh. Run the Ruby program I'm writing ... inside of 3 minutes,
^ Method arity without instantiating an object
41592 [stillflame o] Well,
41593 [nobu.nokada ] Array.instance_method(:concat).arity #=> 1
^ Problem: Newbie with a question on file arrays and file insertion ...
41594 [keuler porta] I am a Ruby newbie, and would appreciate help with the following to jump-start a project.
41596 [ s xss.de] File("whatever").readlines.collect { |line|
41598 [nobu.nokada ] require 'tempfile'
41654 [keuler porta] Thanks very much Nabu and Stehan!
^ Ruby 1.7.2 dieing of segfault (was Re: Ruby 1.6.7 dieing of segfault)
41603 [dossy panopt] $ ruby-1.7.2 -v
41604 [nobu.nokada ] If you use extension libraries, possibly it may be due to those
+ 41638 [skywizard My] I think you should take a look at ruby-talk/41322
| 41648 [nobu.nokada ] [ruby-core:00112] may fix it, sorry.
+ 41673 [dossy panopt] Indeed, my hunch is that dbd_oracle is NOT thread-safe.
41701 [dossy panopt] Well, after setting 19 breakpoints all around the GC code and
+ 41718 [sean chitten] Someone mentioned on IRC that Array's aren't thread safe. Could this
+ 41729 [decoux moulo] Nobody can help you if nobody can see your source.
^ ODBC database access from Ruby
41609 [stahlmana kn] What is the "accepted" way to do ODBC db access from Ruby? Is there a
41614 [home clabs.o] Ruby/ODBC works well (Google it to find the url). If you're on Windows, you
^ =?koi8-r?B?8O/r9fDh5e0g6SDw8u/k4eXt?=
41612 [dada70 mail.] Здравствуйте!
^ SOAP4R 1.4.5 missing uri.rb
41623 [ahumphreys p] I appear to be missing a file - uri.rb from the RAA install of SOAP4R
41624 [kentda stud.] I think this is part of atleast 1.6.7 and higher...
41642 [nahi keynaut] SOAP4R
^ $a = 5; $b = 'a'; print $$b
41627 [pmak animegl] I'm a seasoned Perl programmer trying to learn Ruby.
+ 41628 [erik bagfors] a = 5
| 41629 [pmak animegl] class Series
| 41630 [pmak animegl] I think I got it.
| 41631 [nobu.nokada ] Series = Struct.new(nil, :sid, :handle, :name)
+ 41650 [edsin swes.s] This particular case can be rewritten either with instance_eval or
^ Does assert() exist?
41637 [pmak animegl] I saw a bunch of Ruby examples on the web that involve the assert()
41639 [ned bike-nom] The Test::Unit library defines a number of assert methods, but they're
+ 41659 [adamon maila] This is very nice, but I wonder if Ruby can simulate a stringizing
| + 41662 [kentda stud.] You could probably to some evil eval tricks, but I'm not sure how you
| | 41664 [tsiivola cc.] def foo; bar; end
| | 41665 [kentda stud.] Unless this has changed in 1.7.* or something, it still doesn't give me
| + 41672 [pbrannan atd] $initial_directory = Dir.getwd
+ 41667 [ruby-talk je] In the beginning there was Ruby::Unit. Then comes a lot other
41686 [alan digikat] It might be nice if Test::Unit could expose its list of assert calls as
42205 [nathaniel ta] Actually, it does...
^ regexp#options in 1.7.2
41640 [james rubyxm] Regexp objects in Ruby 1.7.2 have an 'options' method. Poking around, I se
41681 [matz ruby-la] It's revealing internal optimize flags (128 means "pattern begins with
41684 [james rubyxm] No, this is potentially useful information.
41719 [matz ruby-la] These optimize bits highly depend on the implementation of regex
41727 [james rubyxm] Still, options returns an integer; to get the low-order bits for the more
^ Catalog Server in Ruby
41645 [usenets fast] I'm wondering if anyone ever came across ruby implementation of somekind of
41646 [markt govirt] This is a multi-part message in MIME format.
^ Question: Recommended Postgresql interface?
41647 [jeremy chaos] What is the recommended way to interface Ruby to Postgresql? I have
41652 [ser germane-] Well, AFAIK (I installed DBI a looong time ago), Ruby/DBI uses
+ 41655 [jeremy chaos] Oops, looks like I didn't do enough research before posting. I'll
+ 41657 [uu9r rz.uni-] Ruby/DBI is a layer on top of ruby-postgresql. Because of this, it's performance
+ 41671 [james rubyxm] This is true. I recently rebuilt a system and after some frustration and
^ Segfaulting Ruby by abusing PStore
41656 [jeremy chaos] OK, it's a dirty trick to change class definitions behind PStore's
41676 [matz ruby-la] It cannot be fixed fundamentally in 1.6 but it is fixed in 1.7.
41685 [jeremy chaos] I suspected that might be the case, but didn't know enough about
^ dynamic attr_accessor??
41660 [mjais web.de] I like to create methods for my class dynamically based on
+ 41661 [decoux moulo] use type.send
+ 41663 [nobu.nokada ] class Cl
| 41666 [mjais web.de] thanks!
| 41670 [kasal matsrv] "class<<self; def ...; end" would perform the method def of the
| 41674 [nobu.nokada ] That's right, thank you.
| 41687 [eban os.rim.] "class<<self;self;end" is equivalent to "self.type".
| 41689 [nobu.nokada ] Once make an accessor, all instances come to have it. Does he
+ 41675 [matz ruby-la] a) attr_accessor is a method of a class
41679 [mjais web.de] thanks for your tip.
41730 [dsafari xtra] I personally prefer the non-eval way that Guy Decoux recommend of using
41752 [chr_news gmx] the
41828 [dsafari xtra] I don't understand, can you please explain?
41891 [chr_news gmx] Well assuming
41892 [chr_news gmx] Blush;-)
41896 [kasal matsrv] mamas.cat returns "cat" while mamas.dog raises a non-method error.
threads.html
top