192736-193796

192585-199776 subjects 192901-193640

^ Columnization of text, using text-reform
192736 [sy1234 gmail] Ok, I got text-hyphen and text-reform installed[1], and I looked at
192742 [sy1234 gmail] Hmm.. maybe I need to do some more exploring.. I can't run this script
192746 [sy1234 gmail] Ok, I got it.  The remote and local gems were failing to install, and
192936 [sy1234 gmail] Ok, I figured it out.  I'm not sure why it works or what's going on,

^ dialing modem using ruby
192749 [turtlethief ] Is there a ruby library to dial modems?

^ Variable Assignment Callback(s)?
192754 [jake.mcarthu] I need a callback for variable assignment; instance variable
193038 [shortcutter ] Well, you can test it easily youself can't you?

^ Ruby Typing (was "begining programmer questions")
192755 [jake.mcarthu] Agreed. In fact, at its core, I would say that Ruby is "untyped,"
192756 [dblack wobbl] I would apply the word "class" to Object (rather than type), and leave

^ Struct.new vs class
192757 [gilesb gmail] OK, so I have this class and it could probably be a Struct.
+ 192762 [logancapaldo] class Sample < Struct.new(:note_length, :sequence, :note, :channel,
| 192789 [r.mark.volkm] What is this supposed to do?  It doesn't seem to allow me to create a
| + 192792 [ mfp acm.org] class Sample < Struct.new(:note_length, :sequence, :note, :channel)
| | 192793 [r.mark.volkm] Ah!  Your initialize method takes a "*a" parameter, but the original
| | 192849 [gilesb gmail] is "*a" basically a keyword args flag that tells initialize() to take
| | 192851 [halostatue g] the (un)array operator. It's an unary non-overridable operator on
| | 192875 [gilesb gmail] I might have been thinking of a Python term...
| | 192878 [halostatue g] You might have been. I believe that Python supports both *args and
| + 192870 [logancapaldo] oops sorry. Whenever I answer questions like this, half the time I
+ 192783 [shortcutter ] # untested

^ Test if file exists
192759 [pieter clue.] if (ARGV.size != 2)
+ 192760 [nicolas.desp] File.exists?(filename1)
| 192763 [pieter clue.] Thanks alot!
+ 192761 [farrel.lifso] File.exists?(file_name)

^ Simple crawling/HTML extraction
192764 [peter rubyra] 1) I have a bunch of links. Visit every link one by one
+ 192846 [aaron_patter] Or just 'gem install mechanize'
+ 192860 [collinsj sea] I think Rubyful soup [1] will be of interest to you if you don't want to

^ Time class and time zones
192765 [ted_spam mac] Is it possible to create a Time object with a time zone other than the
+ 192768 [Bil.Kleb nas] Slightly tangential to your question, but they might lead to
+ 192801 [jes luretank] Check out http://tzinfo.rubyforge.org/
  192958 [sroberts uni] Hey, thats great! I've wanted to make vPim timezone-aware for a while,

^ Testing private methods
192769 [peter semant] I have a class with a lot of private utility methods that makes the code
+ 192771 [robert.feldt] class ClassUnderTest
| 192777 [peter semant] Thank you that looks to be just what I need.
| 192781 [robert.feldt] Since this is a bit "unsafe" (considering that some dev might use your
+ 192772 [djberg96 gma] I believe the standard workaround is to use obj#send(:your_method).

^ [ANN] EventMachine releases version 0.5.2
192773 [garbagecat10] With this release, we have cleaned up some performance issues and some

^ Oddity with Win32API, RegQueryValueEx
192775 [djberg96 gma] Ruby 1.8.4
192778 [phasis68 hot] should be
192799 [Daniel.Berge] Ah, ok.  I thought it would just set the size regardless.

^ Net::LDAP filters
192790 [andre digira] Excuse me if this is a dumb question but I searched the docs and
+ 192794 [garbagecat10] I assume by "LDAP filter string" you mean an RFC-2254 compliant string,
| 192795 [andre digira] I'm writing a script to allow me to work with ldap without having to
| 192797 [garbagecat10] I'll tell you what: if we add these methods and send you a
| 192798 [andre digira] Sure, I'd be glad to test it!
| 192800 [garbagecat10] Ok, will email you when done.
| 192868 [garbagecat10] Andre, I have a new gem for you to test. It has version 0.0.1.1, which we
+ 193104 [garbagecat10] Andre, thanks for testing and confirming the fix. It will be in the
  193112 [andre digira] Yeah, I understand that. What I suggested was that the decision to
  193116 [garbagecat10] Ah, I see the point. Interesting. I guess you're right, you probably
  193120 [andre digira] No problems here, but I only did testing with #search and #replace.
  193303 [andre digira] I've noticed that the attribute names are downcased when they're
  193307 [garbagecat10] LDAP attribute names are usually not case-sensitive. I had a couple of
  193316 [andre digira] Well, my only argument is that if I search for something, I'd expect
  + 193321 [garbagecat10] I addressed that in a different way, which may or may not be ideal. The
  + 193324 [garbagecat10] I thought about it some more and I realized you're right. The original
    193350 [andre digira] Thanks! (again! :)

^ Weird class-loading issue (or maybe a problem with define_method?)
192806 [pergesu gmai] I'm working on an app and having a strange class loading problem.
192807 [halostatue g] # foo.rb
192812 [pergesu gmai] I can't, because some of the methods in the Foo class call Bar methods.
+ 192821 [ara.t.howard] a setup like this will give you that
| 192883 [pergesu gmai] Thanks for the response Ara.
+ 192886 [halostatue g] class Foo
  192970 [pergesu gmai] I went through Ch1 of Refactoring, using rspec to write the tests.
  192983 [pit capitain] Too many requires: for example, in customer.rb you require "rental", but

^ Vim 7 insert-mode mappings
192809 [daniel.schie] I've just started using Vim (yes, it's heresy...), and I'm absolutely
192813 [reid.thompso] while in insert mode, type
192823 [daniel.schie] It doesn't work -- it only indents the next line (which it has done all
+ 192839 [reid.thompso] works for me
| 192873 [daniel.schie] i  <S-CR>        <CR><CR>end<Esc>-cc
| 192959 [wink saville] but it won't add the "end" also the in my system its adds tabstops I was
| 192974 [daniel.schie] Ahh, so I'm not the only one. Well, that's good to know.
+ 193319 [marshall.jim] If you are running console-mode Vim (within an Xterm, say, or at the
  + 193374 [rosejn gmail] This is the case for me.  It works in gvim, but not in regular vim...
  + 193378 [daniel.schie] Yes, that seems to be the problem.

^ Search an array
192811 [patrick pksp] Given the following scenario...
192815 [rforum gmail] Slightly modified but basically the same as your scenario, searching $a
+ 192820 [Daniel.Berge] Why look in $@? You already know what $0 is.
| 192871 [shortcutter ] He needs to find the entry with the name to get the line number.
+ 192825 [patrick pksp] What is "pp"? BTW, I'm very new to Ruby!
  + 192827 [Daniel.Berge] It's short for "pretty print".  It's meant to provide prettier
  + 192874 [rforum gmail] It's the pretty printing library.  I have it required in my ~/.irbrc so

^ Compiling Ruby w/ Profile Guided Optimization
192818 [sleepingsqui] Since gcc-4.1 now has the option to perform profile guided
192822 [Daniel.Berge] Odd, I thought Ruby died a horrible death if compiled with -O3.  Has
192856 [drbrain segm] On OS X Ruby can fail when compiled with -fschedule-insns2 which is

^ comp.lang.ruby FAQ
192834 [hal9000 hype] RUBY NEWSGROUP FAQ -- Welcome to comp.lang.ruby!  (Revised 2005-4-14)
192835 [dharple gene] I thought the gateway was down indefinitely. Too bad, because google
192836 [Daniel.Berge] I agree.  While it may increase the noise-to-signal ratio, searching two

^ iterator/array question
192837 [turtlethief ] Is there a way to iterate through an array, getting the index and the
192840 [dharple gene] $ri each_with_index
192842 [shortcutter ] Too bad you disclosed the solution already - I wanted to trade it in

^ text::hyphen, de patterns
192853 [rubyfor1.10.] I'd like to use text::hyphen, and I'd like to know how to use german
192859 [halostatue g] require 'text/hyphen'
192867 [rubyfor1.10.] thanks, works like a charm,

^ examples using reliable-msg gem?
192869 [cremes.devli] I'm wondering if anyone out there has written any code using the
193184 [cremes.devli] I figured out the problem. In the queue-manager.rb file the author
+ 193186 [ara.t.howard] thank you for posting it!
+ 193343 [sroberts uni] Sounds like the code is assuming localhost is 127.0.0.1. This isn't

^ 2 dimensional arrays
192881 [joiey.seeley] The 2 dimensional array or table structure is extremely common, but I
+ 192885 [collinsj sea] irb(main):001:0> a = [ [1, 2, 3] ]
+ 192906 [cyclists nc.] a = Array.new() {Array.new}
  193005 [joiey.seeley] A 2 dimensional array as an array of arrays is a lowest common
  + 193021 [matthew.moss] Aside from a 1-dimensional array using flattened indices, an array of
  | + 193022 [matthew.moss] Ummm....  I think I meant you CAN'T satisfy everyone at the same time...
  | + 193060 [joiey.seeley] That is really besides the point.  There are many different types of
  |   193075 [matthew.moss] My point (too obvious to be stated, I thought) was that everything is
  + 193024 [ara.t.howard] that is widely understood to mean 'least suprise to matz'.  fyi.
    193067 [joiey.seeley] I was using that a little tongue in cheek.

^ Ticked Off
192882 [halostatue g] Okay, I'll admit it. I'm really pissed off. I don't pay attention to
+ 192911 [logancapaldo] What really boggles my mind about this is, yes a book is easier and
| 192917 [curi curi.us] I am sympathetic to your annoyance. I don't think it is OK to suggest/
| + 192919 [jtregunna bl] charset=US-ASCII;
| | + 192928 [curi curi.us] The harm there is that he would die sooner than he would if he were
| | | + 192938 [klancaster19] I cannot afford a Mercedes. I therefore have no plans to buy one. Should
| | | | + 192950 [vjoel path.b] Depends. Can you steal a Mercedes with wget?
| | | | + 193042 [phil hagelb.] I know you mean well, but it really bothers me when I see copyright
| | | |   193055 [gwtmp01 mac.] Are you arguing that the word 'theft' is reserved to describe the
| | | |   + 193057 [peter semant] Copyright infringement: If I steal the design of the shirt on you back
| | | |   | + 193068 [halostatue g] There is a legal difference, yes. I'm not sure that there's a
| | | |   | | 193074 [phil hagelb.] Chalk it up to the hackerly tendency to be irritated by endless
| | | |   | | 193103 [rampant gmai] It's the fact that people care about these important details which
| | | |   | + 193073 [klancaster19] Ah, but in this case, they were not stealing the *design*, they were
| | | |   |   193077 [phil hagelb.] Really? Can you touch a PDF? What does an MP3 smell like?
| | | |   |   + 193111 [klancaster19] If I print a PDF out and put it on a news stand for sale, and you come by
| | | |   |   | 193131 [phil hagelb.] Yes. You have committed a crime against the news stand owner, not the
| | | |   |   + 193166 [hal9000 hype] Teen spirit?
| | | |   |     193169 [gilesb gmail] bwaahahahaha
| | | |   + 193084 [mgreenly gma] There is an ethical difference.
| | | |   | + 193088 [agorilla gma] Ok, so anybody who has ever sold anything that's digital is unethical.
| | | |   | + 193096 [paul.kraus g] work, or software cheaply or for free simply because you can not afford to
| | | |   | | + 193102 [ara.t.howard] i'm afraid this doesn't fly in the open-source world.  if you are given to
| | | |   | | | 193113 [paul.kraus g] I didn't say that. Reading my initial comment it came out harser then it
| | | |   | | + 193110 [mgreenly gma] Wow, you make lots of bad assumptions.
| | | |   | |   + 193115 [a2800276 gma] Ticked Off
| | | |   | |   | 193175 [johnwilger g] +1
| | | |   | |   | 193196 [logancapaldo] Bite your tongue!
| | | |   | |   + 193117 [paul.kraus g] No assumptions just a bad habbit of liberal use of "you/your" in the
| | | |   | + 193121 [billk cts.co] How do you make money?  If you're a programmer, you're a resource.
| | | |   |   193126 [mgreenly gma] This is poorly written and just stupid.
| | | |   |   + 193128 [lukfugl gmai] Then why is is "unethical" for the author of the book to charge what
| | | |   |   | 193130 [mgreenly gma] My argument wasn't that it was unethical for an author to use the
| | | |   |   + 193140 [billk cts.co] Awww.  And I was having so much fun.
| | | |   |     193144 [mgreenly gma] Conspiring to misrepresent the avilability of a resource so that you can
| | | |   |     + 193145 [lukfugl gmai] So in your opinion, authors who create content and then desire to sell
| | | |   |     | 193149 [leavengood g] Earlier in this thread, Michael Greenly clearly stated his problem was
| | | |   |     | 193153 [lukfugl gmai] I was not attempting to twist his words. I apologize if I did. Since I
| | | |   |     | 193154 [leavengood g] Sorry I came off so snappy, but it seemed people were unfairly jumping
| | | |   |     + 193158 [pollak gmail] land), and Intellectual Property laws create limits and boundaries.
| | | |   + 193314 [jeff opendbm] If whatever you're stealing is actually causing people to lose
| | | |     193315 [steve.debaun] If whatever you're [copying] is actually causing people to [not acquire]
| | | + 192939 [jtregunna bl] charset=US-ASCII;
| | | | + 193010 [rasputnik gm] The argument was that wasn't going to get that money *anyway*.
| | | | | + 193018 [jp jeffpritc] In the hands of a master, situational ethics are neither.
| | | | | + 193129 [jtregunna bl] charset=US-ASCII;
| | | | |   193203 [rasputnik gm] Fair point.
| | | | + 193164 [curi curi.us] I've written a model world in Ruby to illustrate some of the issues
| | | |   193195 [daniel flyin] From an ethical standpoint, I don't see why it matters if someone is
| | | + 192946 [pat.eyler gm] everyone of us who wants to see books continue to be made
| | | + 193204 [erlercw gmai] When a person makes a physical item, they can gain a salary and everyone is
| | |   193211 [erlercw gmai] There are two parts to this: you're not getting any money from me anyway an=
| | + 192995 [gilesb gmail] OK, maybe this analogy is obvious to other people, but can you explain
| |   193053 [agorilla gma] I agree that it works that way, I just don't agree with the
| |   + 193134 [curi curi.us] Web comics make for a number of good examples.
| |   + 193138 [gilesb gmail] Yes, actually, he is. The mainstream book is Agile Web Dev with Rails.
| + 192944 [jmg3000 gmai] Same? No. But some variable amount of scorn depending upon
| + 192948 [billk cts.co] I think this has the makings of a False Dilemma, or Loaded
| + 192951 [halostatue g] This person wasn't advocating permantly stealing David's book. He was
| + 193592 [groups grand] Whether he has "harmed" anybody or not is quite irrelevant, and a false
|   193646 [curi curi.us] I am going to reply in this thread off-list. If you want to be
+ 192915 [robothor gma] Philip Greenspun has an innovative solution to this problem: http://
+ 192973 [rosejn gmail] Agreed, we should support the PragProg guys so they can continue to do
| + 192981 [kevin.jackso] I kind of agree with this - 'check out the pdf and then buy the book
| | + 192989 [halostatue g] Actually, they're both theft and they both unlawfully deprive the author
| | | + 192990 [a2800276 gma] Pirating a pdf is not theft. Stealing something implies that the owner is no
| | | | + 192991 [cremes.devli] Wow, I can't believe there are actually people arguing that they
| | | | | 193046 [phil hagelb.] Read the post again. He never said that; he was just arguing that
| | | | + 192992 [halostatue g] When you unlawfully deprive someone of something that is rightfully
| | | | + 192998 [pbattley gma] Personally, I've always thought that there is a significantqualitative difference between making an unlicensed copy and trollingaround the Malacca Straits with guns and knives, looting passing shipsand murdering their crews and passengers, so I try to avoid the word'piracy' to describe copying a book or CD.
| | | | | 193152 [pollak gmail] Not to add fuel to the fire... but...
| | | | | + 193160 [jtregunna bl] charset=US-ASCII;
| | | | | + 193796 [groups grand] No, there is no "fair use" clause that allows for copyright violation
| | | | + 193032 [rossrt rosco] I believe that "a person is guilty of theft if: he dishonestly
| | | + 193183 [kevin.jackso] They are not both theft - both actions deprive the author and publisher
| | + 193034 [gwtmp01 mac.] I don't get this attitude at all.  Either pay the asking price or
| |   + 193040 [halostatue g] I get the attitude from people in developing nations where you have
| |   | 193048 [benjohn fysh] Austin Ziegler
| |   + 193045 [rosejn gmail] Well, if you were living in a home made of dirt walls where the average
| |   | 193052 [peter semant] To complicate things even further at a national level many countries
| |   + 193078 [matthew.moss] Well put.
| |     193093 [leavengood g] I agree with the general sentiment in Austin's first message: David
| |     193109 [jmg3000 gmai] My guess is that they're trying to avoid a precedent being set.
| + 192988 [halostatue g] David Black's book ("Ruby for Rails") is not published by the PragProgs.
|   193009 [rosejn gmail] owner is no
|   193020 [pat.eyler gm] Sure, buy the pdf.  If the reviews and sample chapters aren't enough
+ 193076 [steve waits.] Piracy happens..
+ 193137 [pgquiles elp] 1. I fully agree with Austin
+ 193162 [geek geeky.o] I think it should be more due to succsess sure it is expanisve now but,
+ 193311 [adulau gmail] On the other side, we should also promote the creation of free

^ Mixing-in the inherited method
192893 [christoffer.] Dear Rubyists,
192908 [vjoel path.b] A is not a subclass of Class, it's an instance of Class.
193569 [christoffer.] Indeed.
193601 [decoux moulo] Try this
193637 [christoffer.] Aha! That makes sense.
threads.html
top