382860-384680 subjects 383236-384003
^ Re: faster_require 0.9.2
383026 [rogerpack200] any preference? whatever you want it to be... :)
383029 [code apotheo] Given that Ruby appears to be switching to the BSD License with version
383229 [rogerpack200] Switched it to BSD.
383232 [code apotheo] Thanks! Now, if I write an article about it for TechRepublic, I'll know
^ Where does "define_method" defined?
383039 [brxue.cn gma] From Ruby library reference manual, It tells that "define_method" is an
383040 [nobuoka r-de] Yes, a +define_method+ method is an instance method of the +Module+ class,
383045 [brxue.cn gma] Thank you very much for you help.
^ Learning Ruby advice needed
383041 [passionate_p] While learning a new language, I find it very boring to read again the
+ 383050 [regis.aubare] So try to learn really different language like Prolog, Haskell, Pure,
| 383092 [passionate_p] I don't understand how you all feel so comfortable with "irb". It is
| + 383097 [spoon killer] Yes, store your code in files. It's The Way (tm).
| + 383099 [code apotheo] Use interactive_editor With irb For An Inside-Out Ruby IDE
| | 383116 [stu rubyprog] Glad to see I inspired you. A blog post and everything. I have hacked
| | 383137 [code apotheo] I've just been using the heck out of it, for the most part, rather than
| | 383209 [jrmair gmail] I added an `edit-method` command to pry, which works in principle
| | 383213 [adam apresco] Cool!
| + 383105 [bbxx789_05ss] I never use irb or python's irb. I consider them a complete waste of
| + 383112 [code apotheo] Uhh . . . technically, it's not "python's irb". It's Python's REPL, just
| + 383114 [cmdjackryan ] Suddenly, enlightenment.
| + 383124 [spoon killer] I find this sentiment rather amusing!
| + 383128 [hassan.schro] ? Funny, the irb I'm using does :-)
| | + 383130 [stu rubyprog] It works well with pry as well.
| | + 383131 [spoon killer] Ah good shout, I'll have to see what's wrong here. Thanks!
| + 383138 [code apotheo] Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]
| 383166 [spoon killer] Thanks! I'm a bit glaikit sometimes: never thought of making it do
+ 383072 [spoon killer] 1. A tiny text-based game using the socket library (networked hunt the
| 383110 [josh.cheek g] lol, did you read the "Land of Lisp", too?
| 383127 [spoon killer] No! It looks fantastic though, cheers for putting me on to it.
+ 383141 [jakekaiden y] Chris Pine's "Learn To Program" has some neat ideas for practice
383183 [alexandermcm] Try http://www.oldkingjames.org Learn to program there are a few Ruby lesso=
^ hai see me
383042 [mveni.nirmal] firstname.lastname@example.org
^ see me
383043 [mveni.nirmal] email@example.com
383044 [mveni.nirmal] firstname.lastname@example.org
^ where does the pure method defined when starting irb
383046 [brxue.cn gma] I have some puzzles, when I start irb,
+ 383051 [jakekaiden y] irb(main):001:0> def hello; end
+ 383077 [cmdicely gma] Right, because its not defined as an instance method in the Object
| + 383081 [adgar carbon] I have some puzzles, when I start irb,
| + 383123 [bbxx789_05ss] puts RUBY_VERSION
| + 383158 [brxue.cn gma] Thanks all for your kindly explanation. It really helps.
| | 383171 [bbxx789_05ss] class Object
| | 383360 [brxue.cn gma] Thank you all.
| | 383362 [adgar carbon] An instance variable doesn't get created until it is first assigned. So =
| | 383363 [brxue.cn gma] Thank you very much, Michael!
| + 383161 [bbxx789_05ss] And...
+ 383111 [bbxx789_05ss] puts RUBY_VERSION
+ 383121 [bbxx789_05ss] puts RUBY_VERSION #=>1.8.6
^ RubyGems 1.8 treats warnings as errors for C extensions, fails to install RedCloth?
383047 [sutniuq gmx.] ========================================
+ 383052 [now bitwi.se] RedCloth adds -Werror, see
| 383135 [sutniuq gmx.] You're right, that's odd. Then it's a bug in RedCloth, as it's obviously
+ 383147 [ryand-ruby z] know
383151 [now bitwi.se] including the national deficit?
+ 383162 [ryand-ruby z] now
| 383187 [now bitwi.se] g including the national deficit?
+ 383207 [luislavena g] The problem is not RubyGems actually, but that RedCloth turns -Werror
383210 [now bitwi.se] As I tried to explain to Ryan in a subsequent email, what I meant was
383215 [luislavena g] Can you open a feature request for that?
^ Digest::Base problem
383048 [mail maasha.] maasha@mel:~$ irb
+ 383053 [cmdjackryan ] Do you have OpenSSL devel packages installed? Are they found by ./configure=
| 383054 [mail maasha.] It doesn't look like configure do anything ssl - should it?
| 383055 [cmdjackryan ] Yes. OpenSSL provides the crypto-backend that Ruby uses.
| 383057 [mail maasha.] but still no Digest::Base.
| 383058 [cmdjackryan ] ./configure --help should, well, help.
| 383060 [mail maasha.] /usr/lib/libssl.a
| 383064 [cmdjackryan ] with "openssl" (so, adding the path was incorrect information on my
| 383065 [mail maasha.] Same with and without a path, and same for --with-ssl.
| 383066 [cmdjackryan ] Phillip Gawlowski
| 383069 [mail maasha.] irb(main):001:0> require 'httpclient'
+ 383061 [brabuhr gmai] Indeed :-)
| 383063 [mail maasha.] maasha@maxwell:~/Install/src/ruby-1.9.2-p180$ dpkg -l | grep libssl
| 383070 [brabuhr gmai] Debian package: apt-get install libopenssl-ruby1.9
| 383073 [brabuhr gmai] (Though I thought this step was no longer necessary?)
| 383074 [mail maasha.] I tested with the precompiled libopenssl-ruby1.9.1 and the precompiled
| + 383076 [cmdjackryan ] It grabs source code for Ruby implementations, and compiles it.
| | 383079 [lmetcalfe co] I've used this link for installing RVM on Ubuntu, it's very well-written
| | 383082 [mail maasha.] I think, that I want to get my ruby working the "old fashioned" way
| + 383090 [brabuhr gmai] x86_64, all of ruby and ssl and ssl-dev are x86_64?
+ 383188 [b.candler po] Just one thing to check: you don't happen to have a file called
383199 [mail maasha.] aaaaaaargh!
383200 [mail maasha.] OK, this comes down to my code being badly organized. I will get right
^ Optimize write of large file
383059 [yoann6 gmail] I have data to process and to write into files progressively. The data
+ 383062 [mbj seonic.n] Ruby and the glibc the kernel etc are doing buffering already.
+ 383071 [jeremy bopp.] As mentioned, the file writes are already being buffered by lower
+ 383080 [yoann6 gmail] You're right, doing the buffer myself does not make it faster. For
| + 383085 [shortcutter ] No, more does not help more. With modern operating systems you never
| + 383088 [mbj seonic.n] IMHO the primary speed bottleneck is the disk drive itself and the "possible"
+ 383184 [yoann6 gmail] Thanks for your answers, I'll let the OS optimize this on its own then
^ Git configuration file: .gitconfig
383075 [kmandpjlynch] Good morning,
+ 383078 [hassan.schro] It's optional; but if you want one, create it.
| 383083 [kmandpjlynch] Thank you Hassan...
| + 383087 [shortcutter ] Cheers
| | 383106 [kmandpjlynch] ...sorry, this was a topic in the AWDWR book - I should of posted my
| + 383089 [cmdjackryan ] RTFM. Or at least a git tutorial one site over on github.
| 383118 [kmandpjlynch] ...ok, will do - sorry...
| 383122 [cmdjackryan ] No need to apologize all the time. :)
+ 383095 [ibc aliax.ne] me
383104 [kmandpjlynch] ...sorry, I thought Git was the preferred version control manager of Rails
383109 [code apotheo] s=20
383117 [kmandpjlynch] ...thanks for the helpful words...
^ Shell pipeline in Ruby?
383093 [hramrach cen] how do you write an equivalent of
+ 383101 [jos catnook.] Have you checked out Open3.pipeline?
| 383126 [hramrach cen] I have checked all the stuff I could find once but did not find a solution.
| 383132 [stu rubyprog] There is also popen4 which I believe also gives you the pid with std -
| 383134 [hramrach cen] It provides stderr but not the pipeline which cannot be constructed in
+ 383107 [bbxx789_05ss] puts `cmdA | cmdB | cmdC`
+ 383181 [rogerpack200] Enjoy.
| + 383190 [hramrach cen] Unfortunately, this does not work.
| | 383204 [rogerpack200] Try it now, fixed the bug.
| + 383206 [rogerpack200] Unfortunately it appears the wiki formatting is mangled in firefox, but
| 383225 [hramrach cen] iple_Processes&stable=3D0#Chaining_processes
+ 383192 [shortcutter ] $ ri Open3.pipeline_r Open3.pipeline_start
| 383203 [hramrach cen] Again, like in Open3.pipeline the :err argument used in the example is
| 383208 [shortcutter ] Each cmd is a string or an array. If it is an array, the elements are passed
| 383219 [hramrach cen] sed
+ 383216 [hramrach cen] OK, thanks for all the replies.
| 383251 [b.candler po] Since you are doing this on a real operating system, there's no need to
| 383309 [hramrach cen] I don't use Ruby for that.
+ 383252 [b.candler po] Here is a ruby 1.9.2 version with close_on_exec=. I leave it as an
+ 383328 [hramrach cen] Thanks for all the replies.
^ Mechanize retrieve headers
383096 [rob_gar_esp ] I'm using mechanize for web inspection, when I get a URL I get a refresh
383165 [bbxx789_05ss] The Mechanize docs follow the ruby tradition: they suck. So I would
383172 [code apotheo] Do you actually use Ruby, or just complain about it and insult people who
^ Jruby -v failing with possible Java version issue
383098 [ruby.student] I installed jruby 1.6.1, as fully described below.
+ 383100 [matt technor] I dug into this a few months ago. It looks like the IBM implementation of
+ 383102 [matt harpsta] I'm not sure if the IBM Java supports all the flags which Sun/Oracle java
383108 [ruby.student] root@myserver # which java
383115 [matt harpsta] 1.4.2 won't work. You need java 1.6. FWiW, Java 1.4 was sunsetted a
383125 [ruby.student] But I have 1.6, I installed it.
+ 383129 [cmdjackryan ] Yes, you can. Just make sure to install OpenJRE/OpenJDK to its own
+ 383136 [matt harpsta] That may be the case, however, when you ran java -version, it says 1.4.2
383221 [ruby.student] OK gents, I installed Java 1.6 and pointed to it via the JAVA_HOME
383264 [headius head] Just saw this thread today...
383282 [ruby.student] Charlie,
^ Email Parsing
383140 [piratej74 li] How would I only pull links from the email's body and not the full
+ 383143 [b.candler po] "Links" to me implies that this is an HTML email. In that case, just
+ 383152 [piratej74 li] That worked out well thank you very much.
+ 383159 [ryand-ruby z] BTW... we're discussing stabbing you in the 'indenting "end"' thread. :)
+ 383167 [cmdjackryan ] def stab
+ 383174 [code apotheo] I, for one, would really rather not be stabbed in the indenting end.
^ indenting "end"
383144 [code apotheo] def foo(bar)
+ 383145 [ryand-ruby z] Find them.
| + 383146 [serialhex gm] +1 on that remark! :P
| | 383148 [code apotheo] Oh, good -- I'm not the only one.
| | 383155 [shortcutter ] LOL
| | 383157 [code apotheo] Maybe I'm just lucky.
| + 383149 [sduncan weta] I find this indenting gets best results, and more groupies.
| 383154 [code apotheo] That's perverse.
+ 383150 [johnf bitsbu] I've never seen this even once except when it was a mistake, but maybe
| 383153 [code apotheo] No -- mostly just in code by relatively new Rubyists, such as questions
+ 383160 [drbrain segm] $ ./ruby19 -v -
| 383175 [code apotheo] Excellent!
+ 383163 [cmdicely gma] Is this is "real" code (e.g., source of gems, etc.) or in snippets? If
383168 [spoon killer] Agreed. Cut n paste is a bitch that will rape your syntax. It has no
383179 [paradisaeida] Hang the indents!
^ [ANN] isolate 3.0.1 Released
383164 [ryand-ruby z] isolate version 3.0.1 has been released!
^ Re: rubygems-update 1.8.2 Released
383169 [rogerpack200] As an interesting note,
383193 [ryand-ruby z] Unfortunately, that's a rails gem-hack issue... (I suspect).
383298 [rogerpack200] I've noticed that the "gem which" command seems to have changed.
383299 [ryand-ruby z] 3006 % gem unpack ruby-prof
383396 [rogerpack200] Ok that makes sense, though causes a bit of confusion.
^ [ANN] io_splice 4.0.0 - zero-copy pipe I/O for Linux and Ruby
383180 [normalperson] The splice family of Linux system calls can transfer data between file
^ ruby.exe crashing on windows xp
383182 [glory.lo778 ] I am using ruby 1.9.2p180 and with rails 3.0 but I am getting ruby.exe
+ 383198 [cmdjackryan ] What is the GNU Database Manager thingy that's running on your machine?
+ 383228 [rogerpack200] crash log?
+ 383233 [glory.lo778 ] Thanks for the prompt response.
| + 383234 [cmdjackryan ] In my short exploration of using Rails 3 with MongoDB on Windows, I
| + 383245 [luislavena g] I don't see nothing strange in your gem list, bson_ext has a fallback
| 383292 [glory.lo778 ] Yes, the crash still occurs. I did install Devkit with my rails so I
+ 383297 [rogerpack200] Run it through gdb and see what the backtrace is?
383324 [luislavena g] I didn't ask the popup information, perhaps wasn't clear but I'm
383346 [glory.lo778 ] OK guys here it is. I am still very new to all this and I wish things
+ 383348 [cmdjackryan ] For future reference: The second URL is *your private commit URL*. No
+ 383354 [cmdjackryan ] There are no routes matching /video in this test app, nor are there
383366 [glory.lo778 ] Thanks Phillip.
383424 [cmdjackryan ] Indeed. An update made the source work. :)
+ 383429 [glory.lo778 ] It is too bad the problem is isolated to my machine :( It crashes
+ 383440 [luislavena g] On May 17, 10:43=A0pm, Phillip Gawlowski <cmdjackr...@googlemail.com>
^ help on threads synchronization
383186 [zdyu2000 gma] How to make two threads do something in turn, i.e., A => B => A => B
+ 383191 [shortcutter ] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
+ 383197 [jakekaiden y] how about using a GLib::Timeout instead of threads? threads can gum
+ 383202 [zdyu2000 gma] Thanks Robert and Jake. I must use threads. Actually my original problem
| 383211 [shortcutter ] Why?
+ 383296 [zdyu2000 gma] Robert,
| 383300 [shortcutter ] Did you ever hear of blocking queues?
+ 383302 [zdyu2000 gma] Thank you Robert!
^ Re Re: Shell pipeline in Ruby?
383194 [lionel.orry ] # convert pdf to ps and send it to a printer.
^ helping others is a nice habit
383195 [shobadevi75 ] email@example.com
^ helping others is a nice habit
383196 [shobadevi75 ] firstname.lastname@example.org
^ Calcul XOR : array , times.
383201 [ruby.aix gma] a =3D [1, 0, 1, 1, 0, 0, 1]
+ 383214 [list.push gm] Sorry, I did not look for a problem with your code. I did it another way.
+ 383226 [bbxx789_05ss] You want Array#cycle.
383227 [bbxx789_05ss] a = [1, 0, 1, 1, 0, 0, 1]
^ Ruby socket does not get reply
383217 [rob_gar_esp ] begin
+ 383223 [bbxx789_05ss] If the server is expecting 'line oriented input', then the server will
+ 383230 [rogerpack200] This call (read) blocks until the other end of the connection closes it.
383231 [bbxx789_05ss] =3D=3D=3D
383247 [rob_gar_esp ] socket.write("HELO " + session + "\r\n")
383253 [bbxx789_05ss] Just be aware that ruby is going to convert a "\n" to "\r\n" on windows,
+ 383254 [bbxx789_05ss] One way to avoid the newline conversion is to use the actualy ascii code
+ 383293 [gwtmp01 mac.] windows,=20
^ Any working translation framework available for Ruby
383235 [hramrach cen] I am not a believer in translations but given that I can write
383237 [cmdjackryan ] Well, you'll *have* to create different messages for
383250 [hramrach cen] Yes, it looks good.