110377-111897 subjects 110733-112604
^ Code Critique Request
110588 [james graypr] I've mentioned it before, but if you don't know Perl programmers
110636 [angus quovad] [James Edward Gray II <email@example.com>, 2004-08-26 22.37 CEST]
+ 110638 [james graypr] Thanks for the interest.
| 110648 [angus quovad] [James Edward Gray II <firstname.lastname@example.org>, 2004-08-27 15.31 CEST]
+ 110640 [angus quovad] [Carlos <email@example.com>, 2004-08-27 14.56 CEST]
110643 [james graypr] You bring up a good point, but is this true...
110653 [angus quovad] [James Edward Gray II <firstname.lastname@example.org>, 2004-08-27 16.07 CEST]
110655 [james graypr] Yuck. Excellent point. Thanks for the lesson.
^ IOWA form question
110593 [probertm nos] I am trying to create an edit form based on text records. The record
110594 [khaines enig] You're close.
^ performance comparison
110595 [boris boris-] I am implementing one and the same algorithm in different programming languages,
+ 110599 [vjoel PATH.B] def field(x, y)
| 110633 [boris boris-] the method is called during the initialization only. the algorithm itself
+ 110625 [nkh tele2_no] I have 74ms on my P3-450MHz, that must be a mistake in my implementation
| 110635 [boris boris-] 44 recursions is impossible, since it needs at least 49 recursions to finish (a
+ 110663 [flgr ccan.de] Moin!
| + 110722 [boris boris-] The unshift operation is executed 49 times on a 7x7 Board. You find those
| + 110728 [boris boris-] The unshift operation is executed 49 times on a 7x7 Board. You find those
+ 110685 [g_ogata optu] I don't know what your C code looks like, but when you consider what
| 110690 [james graypr] I can't speak for Python, but I have a lot of experience with coding
| + 110700 [drossruby ya] Right, of course interpreted languages will be slower.
| | 110710 [alex verk.in] Insofar as easy debugging and not making typos is concerned, Java +
| | 110736 [mailinglists] Typos are by definition easier to find in static typed programs.
| | + 110741 [drossruby ya] Oh really? That would explain the 20 million dollar
| | | 110750 [cmills frees] Did you get that deep C secret from "Expert C Programming"? :)
| | | + 110757 [mailinglists] And everyone who repeats the rules while sleeping would write the latter as 2==s
| | | | 110761 [drossruby ya] That is a very programming habit, and one that I
| | | | 110766 [cmills frees] Agreed that is a good habit and I can't say I follow it myself... if
| | | | + 110781 [drossruby ya] Yes, that is the 20 million story. I smile at that one
| | | | | 110783 [mikael phubu] Huh? Why?
| | | | | 110784 [drossruby ya] Its common security knowledge gets() is unsafe. It has
| | | | | + 110786 [jgb3 email.b] To clarify, then: David, you are talking about the C 'gets()' function,
| | | | | | 110793 [drossruby ya] hrm.. well I don't know for sure.. I was told on
| | | | | | 110794 [jgb3 email.b] Well, there are lots of ways for something to be insecure. The data from
| | | | | | 110796 [drossruby ya] well, not managing memory can be a good or bad idea.
| | | | | + 110790 [mikael phubu] I don't see how the safety of the corresponding C functions is relevant;
| | | | + 110836 [martindemell] Nevermind the programmer, but I'm amazed that when they hit that sort of
| | | | 110837 [ljz asfast.c] Maybe that's how they found the error.
| | | + 110760 [drossruby ya] Yes, that was the book :)
| | + 110754 [alex verk.in] "Statically typed" is certainly the main enabling factor here, but...
| | | 110759 [mailinglists] I doubt that very much typos that make it into compiled code are wrong
| | + 110798 [gsinclair so] ISTM that the state of the art in Java IDEs is much much much much
| | 110806 [mailinglists] Yes. Absolutely.
| | 110811 [ryco gmx.net] As a side note, Reflection or Introspection does have something to do
| + 110735 [mailinglists] On pure algorithm based problems you can expect a script language to
+ 110687 [james graypr] [snip description and code]
| 110727 [boris boris-] My code is quit long, but the part, that is executed is not very long. The only
+ 110739 [klausm0762 y] yes, 2 orders of magnitude in performance between C and Ruby (Python, TCL...) is
^ [BUG] Re: ruby + linux /proc/acpi deadlock?
110600 [wmorgan-ruby] The issue persists with Ruby 1.8.2 preview 2 on my i686 machine with
110602 [nobu.nokada ] Maybe, strace log?
110651 [wmorgan-ruby] PROC_FILE = "/proc/acpi/battery/BAT1/state"
110775 [nobu.nokada ] Though I'm not a developer of the kernel, it sounds like a bug.
^ [OT] CVS question
110612 [jgb3 email.b] Sorry to post this question here, but it IS marginally Ruby-related...
+ 110613 [halostatue g] I would tag the existing version -- and perhaps even branch it. All
| 110614 [jgb3 email.b] Thanks for the advice, Austin. I'm familiar with tagging, but I guess I
| + 110616 [gsinclair so] Say you have a product called 'foo' and release version 1.0. For the next
| + 110632 [bob.news gmx] "Jamis Buck" <email@example.com> schrieb im Newsbeitrag
| 110646 [jgb3 email.b] Thanks Gavin and Robert. Your comments, together with Austin's use-case
| 110659 [gsinclair so] I thought you said the user wouldn't see much change. Why the manual
| 110662 [jgb3 email.b] "Rewrite" was probably too strong a word. I mostly just need to fix
| 110730 [gsinclair so] Excellent. I was enjoying reading the manual just yesterday. It
| 110765 [jgb3 email.b] I sure hope so. I think "understanding" is the biggest barrier-to-entry
+ 110666 [sean celsoft] Don't try and do too much through CVS; it's a massive pain to reorganize a
110672 [jgb3 email.b] Well, mucking with the CVS repository directly isn't really an option,
+ 110673 [sean celsoft] If you use a linux desktop, you might try Cervisia. I don't use it for
| 110675 [jgb3 email.b] Thanks for the tip -- I may just do that. :)
+ 110674 [tom infoethe] I'd be happy to help if you change your mind... it only takes a minute
110676 [jgb3 email.b] Thanks, Tom. I really appreciate the offer. I think, though, that I'll
110677 [tom infoethe] Cool, no problemo...
^ Short question
110615 [Meino.Cramer] Is there a way to "ask" an object or class what methods are available
+ 110618 [assaph avaya] obj.methods for a list of accessible methods
+ 110620 [ptkwt aracne] instance_methods
110624 [Meino.Cramer] Thank you very much for your fast replies - that is exactly what I
^ How to parse network traffic from tcpdump in ruby?
110617 [mkcon gmx.de] i have a bunch of network traffic to analyse. The traffic has been
+ 110619 [gsinclair so] If you give a sample of the input and a description of the desired output,
| 110623 [mkcon gmx.de] Run a
| 111024 [wmorgan-ruby] tcpdump -r traffic -vv -A
| 111067 [mkcon gmx.de] Thanks for your response. What is the -A option for?
| 111199 [wmorgan-ruby] -A just dumps the packet contents in ASCII form to stdout. This makes it
+ 110930 [cjh-nospam n] Use Ethereal instead. It has more packet unpacking code than you'll
| 110932 [drossruby ya] meh. Ethereal != answer.
| 111044 [cjh-nospam n] Since when has that been a reason? 'cat' is in most Unices too,
| 111047 [drossruby ya] /me chuckles
| 111057 [cjh-nospam n] Plonk.
| 111059 [drossruby ya] /me blinks
+ 111065 [drewry gmail] require 'pcap'
+ 111068 [mkcon gmx.de] thank you for your hint!
| 111715 [mkcon gmx.de] It's me again.
| 112054 [wmorgan-ruby] Back in the olden days you could use the client TCP port to
+ 111094 [drossruby ya] Thanks for the examples. Well, if it isn't updated and
^ How to get https pages in ruby?
110621 [mkcon gmx.de] Is there an easy way to download HTML pages using https using ruby?
+ 110629 [armin xss.de] ...
+ 110630 [armin xss.de] ...
^ package glade files
110622 [roelandmoors] I'm creating a project with ruby/gtk.
+ 110637 [chadfowler g] Great!
| + 110639 [jim weirichh] Hmmm ... no deb packager yet. I've never built a deb package. If you can
| | 110652 [roelandmoors] I'm not an expert, but I think making a deb is much more work than
| + 110649 [roelandmoors] This is not a finished project, you're warned :-)
+ 110658 [batsman.geo ] They should probably go into $prefix/share/yourapp/; I've seen similar
| 110667 [roelandmoors] I my own source I put the glade files in a seperate dir.
| 110678 [batsman.geo ] It's not about sharing between programs, but rather about filesystem
+ 110665 [mutoh highwa] Usually, I put it on /usr/share/app_dir/glade/ (Fedora).
110679 [batsman.geo ] rpa-base works like setup.rb in this regard --- since it installs into
^ Strange behaviour regarding lexical scopes?
110627 [rubytalk box] today (when explaining bits of Ruby to my friend)
110634 [bob.news gmx] "Michal" <firstname.lastname@example.org> schrieb im Newsbeitrag
^ Wikipedia markup to HTML converter in Ruby?
110628 [usenet andre] has anyone written a converter for Wikipedia markup to HTML in Ruby?
^ BUG? or inside argument list
110631 [kristof vlee] I get a syntax error when I try to use "or" inside a argument
110669 [rcoder gmail] Kristof,
110827 [kristof vlee] Yes, I found out that '||' works, but I prefer "or" because it looks
110866 [discord mac.] I have to say, it seems odd to me, to... perhaps it's an unintentional
^ Splitting an Array
110641 [james graypr] I have and Array and I need to iterate over it, finding a subset of the
+ 110642 [decoux moulo] You can also use Enum#partition
| 110645 [james graypr] Exactly what I was looking for. Thank you.
| 110656 [bob.news gmx] "James Edward Gray II" <email@example.com> schrieb im Newsbeitrag
+ 110644 [halostatue g] It's still a bit clunky -- I can't think of a single operation to do
^ Ruby implemented in C and not C++?
110654 [cpine hellot] I was just wondering idly if anyone knows why matz chose C rather than C++ to implement Ruby in? Aside from trashing C++, I was wondering what technical issues (if any) were at the heart of this decision.
110657 [halostatue g] Well, remember that Ruby was first written just over ten years ago
110660 [jamesUNDERBA] Isn't that pretty much what matz once said, someplace? In some
^ Can't get dbi to work?
110661 [robo mars.co] I'm using WindowsXP, I've downloaded ruby-dbi-all-0.0.23.tar.gz, and
+ 110692 [shanko_date ] and
+ 110693 [mneumann nte] You have to put the file from directory dbd_mysql into a directory named
110778 [robo mars.co] I got it installed correctly now, but still getting the "load_driver" error.
+ 110797 [phil.roberts] Robo <firstname.lastname@example.org> emerged reluctantly from the curtain and
+ 110819 [mneumann nte] Then it can't load the required ruby-mysql (or mysql-ruby) library.
^ [PATCH] Subtle bug in bignum.c
110664 [markus reali] All --
110821 [decoux moulo] It's really subtle :-)
110822 [decoux moulo] really, really subtle :-)
110823 [decoux moulo] In reality this is RBIGNUM(y)->digits which is is in ebx (the result is
^ Question about ? operator for ASCII
110668 [barry anglei] I am a nuby and I couldn't find how to get the ASCII value of a
+ 110670 [halostatue g] s.each_byte do |a|
| 110691 [barry anglei] Thanks Austin, Mikael and Edgardo! That's what I was looking for. And
+ 110671 [mikael phubu] mikael
+ 110680 [ehames gmail] I know this one!!!!! I can't believe it ;) You need to call the #chr
| 110686 [mikael phubu] Hate to rain on your parade, but #chr is actually a method on Fixnum,
+ 110689 [g_ogata optu] `?' is _not_ an operator (in the sense that `!', `~', etc. are).
^ Request For Comments: exception safe ConditionVariable#wait
110681 [billk cts.co] I'd recently run into some trouble trying to use timeout
110694 [pbrannan atd] IMO, this isn't so much an exception-safety issue as it is a
110718 [billk cts.co] With timeout, I'm thinking it's sort of a combination of
110789 [pbrannan atd] def wait(mutex)
110799 [billk cts.co] Wow, nice catch! Thanks - !
110957 [pbrannan atd] Actually the exception has the potential to occur when calling the
^ Compilation fails for Altix (IA64)
110682 [Bil.Kleb NAS] gcc -g -O2 -I. -I. -c eval.c
+ 110684 [Bil.Kleb NAS] My apologies: I forgot the environment.
+ 110777 [nobu.nokada ] I think that it is fixed in CVS already. This is the backport.
110808 [Bil.Kleb NAS] Thanks for the patch. However, I am still getting a segmentation fault in
^ Gentoo Ruby
110683 [cc1 cec.wust] Anyone know if it's possible for the gentoo ebuild for ruby to include
+ 110696 [drossruby ya] On ./configure.. add --enable-install-doc
| 110712 [cc1 cec.wust] That doesn't make it part of the package. I know how to compile ruby on
| 110719 [jaco neottia] Have you tried to contact the maintainer of this ebuild ? Maybe he
+ 110698 [ehames gmail] Does this work for you?
110713 [cc1 cec.wust] Thanks, but my use variable already has doc and ruby in it, so I'm
110742 [Peter.Vanbro] Apparently ri has a separate ebuild: emerge -av ri
110762 [cc1 cec.wust] But is that actually the up to date ri or is that the old school ri that
110773 [Peter.Vanbro] Right. It's the old one. The ruby ebuild does install a ri (and calls it
+ 110802 [gsinclair so] Why the @&%# do these damn packages not install Ruby properly? Is it
| 110838 [cc1 cec.wust] Sorry I wasn't so much trying to get support here as validating that I
+ 110817 [henryso pani] It looks like bug #62003 was submitted to bugs.gentoo.org yesterday
+ 110942 [sl33p3r free] Dunno if it helps, but I had the same problem when I installed ruby-cvs,
+ 110943 [sl33p3r free] Dunno if it helps, but I had the same problem when I installed ruby-cvs,
^ Rake FileList Includes Request
110688 [transami run] I would like to make a request for a Rake feature. When using FileList
110704 [jim weirichh] FileList itself generally doesn't care if the file names in its list exist
110724 [transami run] Thanks, I misjudged the source of that problem.
^ Method name to method object
110695 [sean celsoft] I want to obtain method objects given their string names. I can't figure out
+ 110697 [batsman.geo ] => nil
| 110701 [sean celsoft] Works very well, thank you. I didn't realize that module/class nestings were
+ 110801 [bob.news gmx] "Sean O'Dell" <email@example.com> schrieb im Newsbeitrag
^ Rake Bug
110699 [jim freeze.o] I think you can call this a bug.
+ 110703 [cmills frees] GNU make doesn't do this.
+ 110705 [jim weirichh] If you want something to be dependent upon the rakefile, then declare the
110708 [jim freeze.o] Good idea. So, does the following look like a good way to do this?
110737 [jim weirichh] Hmmm ... I don't _think_ the touch is needed. The fact that a dependency
110756 [jim weirichh] [... example elided ...]
^ after upgrade: can't dup Fixnum
110702 [ferenc engar] I have upgraded to ruby 1.8.2 (2004-08-24) [i386-linux], the former
^ [BUG] Frequent Segfault with stable snapshot 2004-08-23
110706 [andrew walro] Since upgrading from a stable snapshot dated 2004-05-26 to a recent one dated
+ 110709 [vjoel PATH.B] This code works for me in both
| 110720 [andrew walro] Yes, it also works for me most of the time. This function is called many hundreds
+ 110714 [markus reali] * take it out of the class String and do it inline, with self being
| 110723 [andrew walro] I think that is unlikely, simply because the segfault only occurs 1 in every
| 110732 [markus reali] Check your logic. It could be (for example) a variable that is
+ 110731 [andrew walro] On further testing I am also seeing the segfaults with the previously (known good)
110826 [andrew walro] After significant testing, I can only reproduce the sefgault when ruby is compiled
^ Literate testing?
110707 [mmirra liber] I was documenting a class and found myself often copying unit tests
+ 110711 [vjoel PATH.B] def get_fl(&bl)
+ 110715 [vjoel PATH.B] Are you planning to extract the example from the source code and
| 110748 [mmirra liber] I'd rather say `hoping', but yes, that would be the purpose.
+ 110716 [batsman.geo ] I believe you can make it look a bit better by using Kernel#caller
110744 [mmirra liber] I confess I have absolutely no idea how. :-)
111025 [batsman.geo ] I think you were bitten by the IMHO bug explained in
^ ASCII, RSA AND BIGNUM
110717 [barry anglei] Continuing on the track of the previous question about ASCII, I'm using
110729 [markus reali] It's a limitation of our universe; there isn't enough matter to store
^ Install to bin dir?
110725 [transami run] I know there's probably a ready made solution for this. And I know its been
+ 110726 [chadfowler g] (specifically look at bindir and executables in the gem spec).
| 110743 [transami run] No doubt! And I have a setup for that. While it's tempting to take a Gem only
| 110749 [chadfowler g] Doing both is definitely a good plan for now. But, of course, make
+ 110734 [batsman.geo ] require 'rbconfig'
| + 110746 [transami run] Now you tell me! ;)
| + 110780 [transami run] Hmm...
| 110804 [batsman.geo ] Oops, clearly CONFIG["bindir"] -- in fact that was my rather laconic
| 110814 [transami run] Funny, two years ago the big names on the block were raainstall and rpkg.
| + 110818 [gsinclair so] Ruby-land has gained a very powerful standard library, thus boosting
| + 110825 [transami run] That may have come across a bit negative. That wasn't my intent. (Hey, I love
| 110833 [batsman.geo ] rpa-base has no capital letters ;)
| 110834 [horacio.lope] how about rpainstall or rpaget ?
| 110835 [batsman.geo ] I was thinking of just doing s/rpa-base/rpapkg/.
+ 110745 [Ara.T.Howard] #!/usr/bin/env ruby
110774 [transami run] Pretty nice example!