208817-210963

208650-386003 subjects 208967-233890

2 questions from a beginner
208817 [Diego.Viraso] I am currently trying to find the solution to these two problems, but
208818 [jan.svitok@g] 1. out = `ps` (Kernel#backtick)
208884 [Diego.Viraso] Thanks a lot. Both worked just as I needed them. :)

auto installing a gem
208829 [bpettichord@] I thought it would be clever to require a gem -- and then if it wasn't
208909 [gemma.camero] Gem

utahvalley.rb meeting Tue Aug 22 at 7PM
208830 [pat.eyler@gm] utahvalley.rb monthly meeting

[Facets] Multiple arguments for Hash#delete
208833 [daniel.schie] class Hash
208965 [nobu@ru y- a] What will be returned from `hsh.delete :a'?
208980 [daniel.schie] The value of :a
208992 [nobu@ru y- a] The class of returned value varies according to the number of
209010 [daniel.schie] Yes. I don't see that as a big problem though, especially if there's a
209285 [drbrain@se m] Then it probably shouldn't go into Ruby.  Especially if you are
+ 209339 [daniel.schie] Well, I only seriously suggested to add it to Facets.
+ 209345 [nobu@ru y- a] Possiblly, we have to wait until "true multi-value" is

Command line arguments in windows
208843 [joiey.seeley] ...
+ 208845 [david@va ln ] Not really. PATHEXT just means that try to append those extensions to a
| 208949 [halostatue@g] rbFile="C:\Ruby\bin\ruby.exe" "%1" %*
| 208955 [joiey.seeley] ...
+ 208880 [martin@sn wp] p ARGV
  208901 [nobu@ru y- a] IIRC, assoc command built in cmd.exe does it.  Try assoc /?.
  208902 [nobu@ru y- a] Sorry, it was ftype.

Is there anything like FCKeditor for Ruby?
208847 [pixelnate@gm] I am building a website for a client and they want to be able to edit
+ 208849 [toalett@gm i] That's an HTML editor, and so it's language agnostic. You'll just have
| 208852 [pixelnate@gm] Thanks.
+ 208864 [khaines@en g] FCKeditor doesn't care what language your serverside code is in.  I use it
+ 208879 [michael.moen] Here's one that you can use without jumping through a bunch of hoops
  208985 [pixelnate@gm] Excellent. This is exactly the kind of thing I am looking for. Well, I

open-uri timeout
208850 [jeff@sc wa c] I love open-uri, but does anyone know how to configure the time-out
208858 [ara.t.howard] the simple way is
208867 [jeff@sc wa c] Thanks, that's great.  It seems to be working.

Google Calendar + ruby = timesheets
208865 [aleks0@gm il] I use Google Calendar to manage my hours and excel to push out
209028 [aaron_patter] Hey Aleks,
209224 [chris.lowis@] You could also use w32ole to automate the import into excel too ! Here's

[AD] : Hooray  RUBYROUC rolls
208866 [gsc@om ga og] ...
209267 [halostatue@g] I notice that you have not yet removed unnecessary attacks on members

Net::LDAP 0.0.4 filter warnings
208872 [barjunk@at g] I'm writing some new code and using #!/usr/bin/ruby -w as the bang line
+ 208874 [garbagecat10] Well that's odd! Never saw that in any of my testing. What version of
+ 208876 [garbagecat10] I can't get those warnings to appear, and I tried all kinds of ways.
+ 208889 [garbagecat10] Umm... any feedback, Barjunk? If this is not a real problem, I want to
  208896 [djberg96@gm ] They show up if you run with -w.  Personally, I think the parens help
  208913 [garbagecat10] Got it. Thanks, Dan. I outsmarted myself- I thought about -w (which
  209017 [barjunk@at g] Sorry for the late response...I only get digests and have been busy on
  209053 [barjunk@at g] I don't have an svn client at the moment and not going to be able to
  209058 [garbagecat10] I think the ML bounced it. I emailed it to your private email.

fxri on OS X
208877 [lists@ka am ] Anyone have any luck getting fxri to work on OS X?  I've installed

Re: Multiple arguments for Hash#delete
208881 [transfire@gm] Good deal. I'll add it. Looks to be a safe override too.
208917 [daniel.schie] For once... :)
208986 [transfire@gm] Ah,  Nobu has a good point. It's beeter to have same kind of output. He
209011 [daniel.schie] Read my mind... yes, I think there should be added a #delete_at method
209021 [transfire@gm] Here' is another place in which the interchangeability between Array
209029 [daniel.schie] What do you mean? It would work fine for the purpose I've described. If
209054 [transfire@gm] Yea, I'm just saying YAGNI b/c in the end you won't use delete() with
209067 [daniel.schie] I only added #[]= because, with Facets, you can do this (as you of
209084 [transfire@gm] Yea, I know what you mean. Believe me I went through the same viewpoint
209113 [daniel.schie] Of course you will. In this case, #delete_at fits perfectly well with

Re: Zerenity 1.0
208883 [collinsj@se ] Is there any way to have <enter> be the same as pressing 'OK' (without
208900 [farrel.lifso] Thanks for the suggestion, never thought it, I'll put it in the next release.
209000 [collinsj@se ] Awesome! Thanks!

Ruby Compressor (little long)
208886 [phurley@gm i] I have need to distribute applications to customers. The customers
+ 208890 [bauer.mail@g] I havent personally used this to distribute an application, but it
| 208892 [phurley@gm i] I have used this and rubyscript2exe they are wonderful, but serve a
+ 208904 [rubytalk@ea ] ...
  208937 [phurley@gm i] Thanks, I had tried that -- plus a DATA.binmode (without which it did

Multiple templates - one app
208888 [agazoom@gm i] Rails newbie here so forgive the question if the answer is ridiculously
208891 [ruby@mu rm n] Aha, theme support. Have a look at
208894 [agazoom@gm i] You said what I mean in one word ...  themes!  Thanks man!  I'll take a
208899 [agazoom@gm i] I'm still not sure whether this allows me set up a different theme per
+ 208957 [logancapaldo] This is a question better answered on the rails mailing list.
+ 209015 [jan.svitok@g] Just an idea, possibly plain wrong: maybe be it's possible to do by

Browser whilst using Rails
208905 [paul.johnsto] I'm just starting to learn Rails, deploying it under SuSe Linux and
+ 208906 [alex@bl ck e] All of them.
| 208912 [leslieviljoe] Firefox has an extension called IETab which let's you open IE windows
| 208915 [martindemell] And a superb extension called Firebug that has saved me countless
+ 208916 [Mail@Jo as H] There are Several Extensions for Firefox that let you exaim GET/POST and HTTP Header Information send by the server.

Test For JPEG Image Over HTTP
208907 [caphonic@gm ] I would like to test for the existence of a .jpg image on a remote
208910 [alex@bl ck e] require 'net/http'

Newbie - Test For JPEG Image Over HTTP
208908 [caphonic@gm ] I would like to test for the existence of a .jpg image on a remote
208911 [alex@bl ck e] require 'net/http'
208929 [caphonic@gm ] Thanks for your help. I can see what you are doing there unfortunately I
208939 [alex@bl ck e] Is that for a path that does exist, doesn't exist, or both?
208953 [logancapaldo] Try r.response.content_type == 'image/jpeg' perhaps?

something like Class.forName(''...").newInstance in Java?
208918 [femtowin@gm ] I'm looking for something like Class.forName(''...").newInstance in Java?,
208923 [farrel.lifso] Object.const_get("...").new
208927 [femtowin@gm ] got it,Thanks.
208947 [transfire@gm] Facets' constant() method is sometimes easier.

Streamlined Framework
208920 [DFelix19@gm ] Im trying to install streamlined by "gem install streamlined" in
208921 [sambient@gm ] It's not available through gems yet.
208925 [DFelix19@gm ] For following the link do I have to install streamlined? If so, thts
208928 [sambient@gm ] For now, Streamlined is available in compiled .gem format only. You

Ruby Weekly News 7th - 13th August 2006
208930 [timsuth@ih g] Use the link above for a nicer version of this newsletter that's formatted

draft HTML version of README.EXT
208931 [pere.noel@la] <http://thoraval.yvon.free.fr/RUBY.EXT/en/index.html>
+ 208952 [logancapaldo] Looks good. I definitely know where I will be going if I have to
+ 209131 [eero.saynatk] Looks good with everything but IE 6 where it breaks horribly.
  210963 [pere.noel@la] ok, thanks, i've seen that when vacations )))

Array Comparison
208933 [aidy.rutter@] I have compared an array and '0' is being returned which indicates to
+ 208935 [shortcutter@] You can use Array#zip (block form) to determine any differences.
| 208941 [pit@ca it in] But note that this doesn't work if the second array contains more
+ 208946 [simon.kroege] t = [2, 3, 4, 5]
| 208963 [joiey.seeley] ...
+ 208969 [aidy.rutter@] Thanks for the feedback, but I need to be bothered about order, so I
  + 208995 [chris.hulan@] try
  | 209004 [aidy.rutter@] I need shooting. However I get a match with this
  | + 209047 [collinsj@se ] ...
  | + 209063 [chris.hulan@] Look at chomp and chop
  |   209107 [Thomas.Mark@] ...
  |   + 209169 [w_a_x_man@ya] Superfluous.  Use .rstrip.
  |   + 209184 [aidy.rutter@] Thanks for the link. I think these extensions look quite useful and
  + 208996 [aidy.rutter@] I have an HTML table

customizing Rails requests
208938 [goofball@va ] Where's the documentation for the Rails ApplicationController class?
208940 [jan.svitok@g] class ApplicationController < ActionController::Base
+ 208944 [chiology@gm ] You're more likely to find more Rails experts on the Ruby On Rails
| 208988 [goofball@va ] Thanks, I'll try that.
+ 208991 [goofball@va ] Thank you.  I also found a small reference

[SUMMARY] Pen and Paper (#90)
208943 [james@gr yp ] I enjoyed this problem.  It's fun to play with and gives you a little room to
208972 [m_goldberg@a] So what I was calling the one-step look-ahead is properly called the
+ 209059 [james@gr yp ] That's a good point.  David Tran's solution does both.
| 209128 [m_goldberg@a] Just one last minor point. A Google search on Warnsdorff revealed
| 209139 [james@gr yp ] I imagine it's because it was stated before computer's existed to
| 209181 [robert.dober] ...
| 209182 [robert.dober] ...
| 209213 [james@gr yp ] Thanks for looking into this.  I've updated the summary.
+ 209289 [m_goldberg@a] I have implemented such a program, one which applies the Warnsdorff

Simple Proxy
208948 [wccrawford@g] This is my first post here, and if I have chosen the wrong spot, my
+ 208950 [phurley@gm i] I would make a suggestion to check out the Event Machine library.
| 208958 [wccrawford@g] Took a minute to find it, but I found it here.
| 208974 [garbagecat10] What's funny about this is that I was just thinking the other other
| 208993 [wccrawford@g] I hadn't planned to burden this group with all the details, but here we
| 208999 [garbagecat10] ...
| 209008 [wccrawford@g] Seemed pretty simple to me, hehe.  The first version will simply do the
| 209013 [garbagecat10] Best of luck, send me private email if you need help.
+ 208956 [jan.svitok@g] For a simple(?) pure-ruby HTTP proxy, you may have a look at MouseHole

using a module at the toplevel doesn't work
208951 [transfire@gm] Why? Becuase the module uses #define_method, and #define_method isn't
+ 208954 [logancapaldo] irb(main):006:0> case self
| 208994 [transfire@gm] That's what I want to avoid -- "delegating the whole module" :-(
| 209001 [transfire@gm] Craggy. It's even worse than that! If I delegate via the singelton of
| 209018 [pit@ca it in] Tom, defining a method at the top level is the same as defining a
| 209038 [transfire@gm] Well, I have module called Taskable. It's an emulation of Rake's basic
| 209061 [pit@ca it in] Tom, I think I still don't get what your problem is. If you want to use
| + 209077 [transfire@gm] Pit,
| + 209130 [logancapaldo] You are over simplifying Trans.'s problem. He wants dynamic generated
|   209198 [transfire@gm] Yea Pit, why are you doing that? ;-)
+ 209016 [matz@ru y- a] I don't think I understand you.  Can you elaborate?
| 209035 [transfire@gm] Sure thing. It seems natural to me that "main" would a module of the
| 209040 [matz@ru y- a] Why?  If it is really required it's fairly easy to add toplevel
| 209052 [transfire@gm] def define_method( meth, &block )
+ 209443 [transfire@gm] T.
  209578 [matz@ru y- a] I don't feel that making Kernel as toplevel self is not a good idea,
  209581 [transfire@gm] To keep the namespace separate I take it? In general one can hardly
  209803 [transfire@gm] Well, is there anyway to turn toplevel effects on Object off? I have a
  209807 [matz@ru y- a] Can you show me working (well, I mean non-working) example.  I am not
  209810 [transfire@gm] Sure. I have a bunch of build scripts that can be resused in other
  209813 [matz@ru y- a] But they are private by default, so that 1.9 send will call
  209853 [transfire@gm] Ah, okay so fixing my toplevel #define_method to privatize the method
  + 209883 [transfire@gm] eval %{ Script.#{type}(*args, &data) }
  + 210023 [matz@ru y- a] For his case, replace do_test as
    210056 [transfire@gm] Almost. But that's sort of reverse the situation. Will we have to add
    210108 [transfire@gm] Sure. All of this is a specialized case. It's a specialized case to use
    + 210109 [transfire@gm] s/their/there/
    + 210232 [transfire@gm] irb(main):001:0> def x ; "x" ; end
      210290 [matz@ru y- a] Yes, it is a irb's known bug.

Storing animated .gif images
208960 [patrick@pk p] The following code throws the error indicated in the code. Apparently
210116 [patrick@pk p] <*big* snip>
210132 [wccrawford@g] That's not exactly correct.  It's still only 1 file, and you couldn't
210154 [patrick@pk p] Agreed. My assumption was just a stab in the dark because I could come

Ruby, memory and speed
208962 [guslist@fr e] I have a script that aggregates data from multiple file, store it all
+ 208976 [m_goldberg@a] I think you got it.
+ 208981 [shortcutter@] read = (reads[read_name.freeze] ||= [])
| + 209032 [guslist@fr e] Will do, when I get to my office.
| + 209147 [john.carter@] Stole that for
|   209370 [guslist@fr e] Thanks for the pointer.
+ 208997 [garbagecat10] ...
| + 209019 [billk@ct .c ] Can anyone speculate as to what other subsystems or facets of Ruby's
| | + 209034 [garbagecat10] Total, rank speculation here, but I don't suspect GC because I
| | + 209212 [znmeb@ce ma ] I've posted a script for building a "gprof-enabled" Ruby on GNU/Linux
| + 209036 [matz@ru y- a] * gc.c (gc_sweep): expand heap earlier.
| | 209041 [ksruby@gm il] Any plans to back port it to ruby_1_8 branch?
| | 209050 [matz@ru y- a] Not for 1.8.5.  Maybe later.
| | 209122 [akr@fs j. rg] Do you withdraw [ruby-dev:29004]?
| | 209123 [matz@ru y- a] Ah, I am terribly sorry to forget.  It's checked in to 1.8.
| | 209126 [guillaume.ma] Great. I'll compile ruby from CVS and give it a try.
| | 209371 [guslist@fr e] In my particular case, it didn't seem to make much of a difference.
| + 209039 [guslist@fr e] Is there any tuning of GCC so it kicks in less frequently when the
|   209076 [david@va ln ] If I remember a past thread correctly, the Ruby GC is set to keep memory
|   209127 [guillaume.ma] Yeah, that's my problem. I did some profiling on some smaller subset,
+ 209060 [ mfp@ac .o g] Have you tried to increment GC_MALLOC_LIMIT in gc.c?
  + 209124 [guillaume.ma] No. Any hint on what value I can raised it to? Any upper limit that I
  | 209501 [ mfp@ac .o g] You have so much RAM you could probably afford to set it to a few hundred
  + 209125 [guillaume.ma] No. Any hint on what value I can raised it to? Any upper limit that I

LDAP searches don't stop
208964 [bart.braem@g] I'm trying to figure out how to search an LDAP server. I can connect and I
+ 208970 [garbagecat10] What happens if you use ldapsearch against this server? What happens
| 208982 [bart.braem@g] ldapsearch works fine and fast.
+ 208990 [bart.braem@g] ruby myprogram.rb
+ 208998 [bart.braem@g] Right the error is in the details. I used DC in the query instead of dc. The
  209199 [bart.braem@g] Yesterday I tried Net::LDAP and it worked even with a capital DC in the

How to - Change operator behaviour
208966 [hsavr@ya oo ] - true if at least one parameter is nil and the other parameter is
+ 208971 [mvette13@gm ] ...
| 209027 [hsavr@ya oo ] Sorry, I see, that my initial question was not asked clearly.
| + 209031 [coder68@ya o] ruby keyword: alias
| + 209051 [toalett@gm i] Unrelated hat tip: many classes define the #=== method, for "case
| | 209166 [robert.dober] ...
| + 209071 [daniel.schie] class Time
| + 209156 [logancapaldo] return super
+ 209073 [robert.dober] ...
threads.html
top