216698-232225

216576-217484 subjects 216975-218285

^ Northern VA Ruby user's group meeting tonight...
216698 [tom infoethe] ...Stu Halloway, author of the newly released "Rails for Java

^ Ruby with Qt or GTK ?
216699 [gugui_sarubi] What the best way ? Qt or GTK ?
+ 216708 [Gemma.Camero] From what I have read it depends what platform or flavour of Linux your app is targetted at.
+ 216729 [greg.kujawa ] I'm sure you will get a variety of different takes. There are a few
  + 216740 [vincent.four] This is false. Qt is licensed under GPL.
  | 216742 [jameskilton ] No, Gregarican is right, Qt is not free for commercial applications but free
  | 216748 [vincent.four] Well, let's put it this way: Qt is dual licensed, one is commercial,
  | 216756 [nospam nosit] I read this earlier and wondered about it. Can a company really release
  | + 216764 [vito.detulli] no, infact Qt *don't* make such restriction.
  | + 216788 [tomp earthli] Someone using your software under the GPL does not have the right to
  | | + 216790 [amos.l.king ] I think Tom is entirely correct.  I took an Intellectual Property Law
  | | | 216812 [greg.kujawa ] Another tool I use has a similar dual licensing scenario. Cincom
  | | + 216810 [jmg3000 gmai] That sounds incorrect. You, the user, can use GPL'd software for
  | |   + 216867 [tomp earthli] Well, distributing it or selling products derived from the code *is*
  | |   + 216924 [znmeb cesmai] [ snip ]
  | + 216800 [ruby-ml kitt] This is going OT but it has to do with copyright law and licencing.
  + 216872 [kbloom gmail] You've gotta ask yourself, though: how would you protect a commerical
    + 216874 [nospam nosit] Qt works with Ruby, but it isn't written in Ruby.
    + 216922 [znmeb cesmai] The same way you protect *any* investment -- by soliciting the advice of
    + 216982 [greg.kujawa ] I realize that Ruby 1.8.x code can be at best only obfuscated, not

^ Re: Code Golf Challenge : Oblongular Number Spirals
216709 [mgreenly gma] I'm sure I'll give it a whirl on Sunday when I have a bit of spare
217028 [james graypr] I'm curious how either of you did it!  I struggled and struggled only

^ problem with ".scan"
216730 [pbailey bna.] RUBY's complaining about the following 3 lines of code. I've got it in a
+ 216732 [ara.t.howard] the modification is probably here.  can't you show us everything up through
| 216736 [pbailey bna.] Sorry. It's a bit much. That's why I was holding back. Here's the whole
| 216745 [ara.t.howard] the modification is question
| 216772 [pbailey bna.] Thanks. I ended the scan block before doing any file writing. That
| 216775 [ara.t.howard] probably because totalpages is always 1 - it's never even - in your new script
| 216781 [pbailey bna.] Well, I know that they're not always odd or even. They've been a mix of
| 216783 [ara.t.howard] yup.  just remember to avoid this
| 216801 [pbailey bna.] Thanks a lot, -a! I've cleaned up my code. But, if you notice way above,
| 216811 [shortcutter ] If you're referring to your original code, then no. You use File.read(name)
| 216821 [pbailey bna.] Thanks, Robert. I'll look into that line-by-line technique. The reason I
| 216965 [shortcutter ] Yeah, in that case File.read is clearly superior (if the file fits into
+ 216739 [nospam nosit] Whoa. The error message suggests that the source string is being modified

^ [ANN] Missoula Users Group
216741 [jgarvin.list] The (as yet not very organized) Missoula Ruby & Ruby on Rails Users

^ Rails OSX Tiger RMagick Bus Error Abort trap
216749 [victorrosill] OSX Tiger version 10.4.7; Rubygems 0.9; Rails 1.1.6; RMagic 1.13.0
216875 [TimHunter nc] Uninstall RMagick and install it again from source - not from the gem -

^ [OT] Re: Computer Language Popularity Trend
216753 [ara.t.howard] check out the ocaml list - it's completely empty.  the language is extrememly
216818 [jmg3000 gmai] signal/noise or noise/signal?

^ Passionate Development - interesting post by an ex-Microsoft developer moving to Ruby on Rails
216757 [vasudevram g] Hey group,

^ how to determine if pipe is given
216759 [eegreg gmail] To retrieve piped input to my program I can use something like
+ 216760 [vincent.four] You can check if $stdin is a terminal with
+ 216762 [ara.t.howard] you can do something like
  216819 [eegreg gmail] thanks, a
  + 216825 [ara.t.howard] why?  is this hard?
  | + 216832 [nospam nosit] / ...
  | | 216851 [ara.t.howard] thanks - that's good to know.  larry++.
  | + 216833 [gwtmp01 mac.] While I understand the historical reason for such constructs, I much
  | | 216853 [ara.t.howard] agreed.
  | + 217095 [rick.denatal] Yes I agree with this, but...
  |   217172 [eegreg gmail] Thanks for all the info guys.  Here is what I came up with.
  |   217181 [eegreg gmail] small typo there, this is better...
  |   217207 [eegreg gmail] should be
  + 216828 [gwtmp01 mac.] Normally I would just nod my head in agreement with Ara, but not this
  | 216848 [ara.t.howard] this is as easy to do as
  | 216907 [gwtmp01 mac.] Hmm. Doesn't cron arrange for stdin and stdout to be /dev/null, in
  | + 216920 [ara.t.howard] hmmm.  you are right.  i had to look back at what had given me trouble before
  | + 216932 [eegreg gmail] I wanted the ability to optionally pipe a file, but the program would
  | | 216950 [robert.dober] I am afraid so, I do not know any program that  reads from STDIN that will
  | | 217022 [gwtmp01 mac.] Actually I think the 'normal' thing in Unix is to simply do blocking
  | | 217039 [ara.t.howard] not if they work on unix!  ;-)
  | | + 217043 [ara.t.howard] oh yeah - nearly forgot my favourite: curl.  it's takes about six billion bits
  | | + 217048 [gwtmp01 mac.] Huh?  That is like saying that grep at the end of a pipeline is expected
  | |   217059 [ara.t.howard] you are right.  i'm just saying it's but not uncommon to sentinal stdin via
  | + 216934 [eegreg gmail] I wanted the ability to optionally pipe a file, but the program would
  | | 216940 [gwtmp01 mac.] I'm not sure I understand what you mean by 'pipe a file'.  Pipes and/or
  | | 216946 [eegreg gmail] I guess the problem comes down to: can I determine if there is data
  | | 216949 [ara.t.howard] windows or *nix?
  | + 216944 [eegreg gmail] I wanted the ability to optionally pipe a file, but the program would
  |   216948 [nospam nosit] But you can have both, it's done all the time. As has been explained, if the
  |   216953 [eegreg gmail] so the answer is that I must rely on the user to indicate what they are
  |   216960 [ara.t.howard] it's so much more terrible than you realize.  you can tell if there is data
  |   216990 [robert.dober] which is a very wise decision :)), nevertheless if Greg dies for it, with
  + 216829 [nospam nosit] Why? One performs a test to determine if there is a pipe. That seems
    216839 [eegreg gmail] sorry, misread some perl stuff.
    + 216849 [nospam nosit] Are you asking whether this is true, or whether it would be a good idea? If
    + 216854 [ara.t.howard] STDIN.tty?
      216880 [eegreg gmail] Didn't you just say that this is a bad idea because of program & and

^ Threading and Deadlock
216761 [jmckible gma] I'm making the back end for a feed reader.  I plan to have a daemon
+ 216767 [vincent.four] I unfortunately can't really where your deadlock comes from. But the
| 216778 [jmckible gma] I don't think this is quite what I need.  The worker threads should
| 216816 [vincent.four] This is exactly what this scheme is doing. I was just mentionning the
+ 216774 [garbagecat10] Have you thought through why this script needs to be threaded in the first
| 216776 [jmckible gma] Processing a feed entails an http request to retrieve it, parsing, and
+ 216777 [garbagecat10] I'm seeing multiple problems in this code. #fill and #crawl don't appear to
| 216780 [jmckible gma] ah, the loop, of course! The fill and crawl should be wrapped in loop do
| + 216784 [garbagecat10] As coded, your design waits for multiple minutes, then (presumably) fires
| + 216806 [ara.t.howard] even if true - consider that you are effectively re-writing Queue to
+ 216782 [ara.t.howard] require 'thread'

^ attachRecording method in WatirMaker script
216769 [matthew.hail] I modified the watirmaker script

^ Ruby/Git?
216785 [andre digira] I've been working with subversion for some time now and thought I'd have
+ 216794 [Bil.Kleb NAS] Later,
| 216808 [andre digira] Yeah, I saw that... well at least he didn't have to wait the 2 centuries
| 216992 [chneukirchen] That's still nothing compared to darcs and GHC.  :-)
+ 216820 [chneukirchen] I gave it a try some months ago, but lost interest.

^ Bonjour and Socket::getaddrinfo
216791 [obrien.andre] I was having a problem with DRb coming from Socket::getaddrinfo not
+ 216792 [nospam nosit] If there is no IP associated with a particular network node, then no, you
| 216804 [obrien.andre] Thanks for the quick reply, Paul.
| 216824 [nospam nosit] I don't recommend this. In many cases, assigning 127.0.0.1 to the system
| 216835 [gwtmp01 mac.] 127.0.0.1       localhost
| 216838 [nospam nosit] / ...
| + 216842 [obrien.andre] something in my head was telling me that that wasn't really a good idea
| + 216852 [gwtmp01 mac.] DHCP assignment from my firewall/router.
+ 216798 [gwtmp01 mac.] Strange.  This worked just fine for me (Mac OS X 10.4.7, Ruby 1.8.5).
  216809 [obrien.andre] What was the value of your "host" variable in that line?  "radar" or
  216817 [gwtmp01 mac.] It was 'radar.local'.  When I run hostname I get 'radar.local' also.
  216826 [obrien.andre] Yep.
  + 216831 [nospam nosit] Yes, as long as you realize this change won't survive a reboot. Typically,
  + 216836 [gwtmp01 mac.] If you feel so inclined, I'd take a look at any startup scripts you may

^ Automatic globbing of ARGV
216797 [doktormadsen] I found a funny feature of Ruby tonight: if possible, commandline
+ 216802 [nospam nosit] The globbing isn't happening in Ruby, it's happening in the shell that
+ 216873 [kbloom gmail] If a file matching the glob exists, then your shell globs it.
  217121 [doktormadsen] Just to clear things out, I am using win32.
  217140 [drnicwilliam] So is it that Ruby on Win32 is covering for limitations of DOS/Cmd?

^ StdLib Documentation Download
216807 [nospam nosit] I have a very slow connection, and I like to download documentation whenever

^ can't get the @ on fxri
216814 [longinos10 h] I'm trying several ways to write the @ at, but just can't;
+ 216822 [ara.t.howard] are you talking about shift+2 ?
+ 216823 [nospam nosit] Could you please explain a bit more fully? Are you having trouble typing the
| 216869 [longinos10 h] sorry for the dlay,
| 216871 [nospam nosit] Maybe there's no entry in ri for '@'. Umm, no, that's not the reason -- I
| 216883 [longinos10 h] irb(main):024:0> class Greeter
| 216903 [longinos10 h] I figure it out, sorry it was very easy, a friend that came over told
| 216939 [nospam nosit] Don't feel bad, it happens to all of us. In 1977 I got my first personal
| 217026 [rick.denatal] I guess that that was before the autostart ROM.
| 217038 [nospam nosit] / ...
+ 216843 [aledonne.lis] If you let us know your operating system and keyboard layout, we may

^ Problem returning a boolean to a dll
216830 [chabotrobert] Here is part of the code, manipulating an application (LaserFiche) API

^ Strange error in jcode.rb when converting range to array
216845 [hammed gmail] ("a".."z").to_a
217054 [manfred gmai] When I try this with jcode loaded it immediately breaks. It looks like
217108 [matz ruby-la] No, it's about 1.9 and the OP was using 1.8.4.  I will examine it
217112 [hammed gmail] The perplexing part for me was why jcode.rb was even being used by my
217119 [matz ruby-la] I've heard Rails uses jcode to handle UTF-8.

^ CanvasPlot, createPlotAxis and createLinePlot.
216847 [lynchnco pat] Good afternoon,
+ 216862 [nospam nosit] / ...
| 216889 [lynchnco pat] I tried 'tk'...but it doesn't work...bummer...
+ 216901 [m_goldberg a] AFIK, TK::CanvasPlot is Perl only and is not available in the Ruby/Tk
  216983 [lynchnco pat] Thanks Morton. Too bad, it does exactly what I need to do...what I'm
  + 217024 [m_goldberg a] I'm afraid I can't help you. I don't do that kind of programming with
  + 217066 [nagai ai.kyu] Those seem Perl's simple subroutines.
    217070 [lynchnco pat] I've done that...can you tell me how to add tick marks and coordinate
    217116 [nagai ai.kyu] Do you want to use this from Ruby?
    217162 [lynchnco pat] Thank you, I shall try both techniques...
    220098 [lynchnco pat] I finally got the Perl version of Tk::CanvasPlot up an running -- see

^ Idiomatic file snarf
216856 [tbray textua] I want to open a file, suck the contexts into a variable and close it
+ 216857 [james graypr] text = File.read(fname)
| 216879 [john.carter ] Actually, the idiom I most use is
| 216925 [john.carter ] Just remembered, I have an old RCR lying around on this.
+ 216859 [thomas.adam2] some_variable = File.new(fname).readlines
+ 216866 [ruby-ml kitt] text =3D File.read file_name
  216902 [twifkak comc] To expand on that: the form that takes a block automatically calls

^ Injecting truth
216860 [kennethkunz ] I had a scenario arise today where I needed an iterator with similar
+ 216861 [rubytalk eac] Hmm, why Enumerable#all? without short circuit? If you get to a point where
| 216878 [dblack wobbl] The idea is that it's a case where you want the block to be executed,
+ 216863 [GENIE prodig] How about (1..5).map { |x| x < 3 }.all?
| + 216877 [dblack wobbl] Whoops, I didn't see that before I (re)posted it :-)
| + 216930 [kennethkunz ] This approach is nice and concise... but I still prefer "truth
+ 216864 [GENIE prodig] Also, with #2, obviously your way works, but the &&= isn't neccesary, a
| 216967 [shortcutter ] In that case order should be reversed to avoid short circuiting altogether
| 217000 [GENIE prodig] Very good point, neglected to think about that, glossing over the fact
+ 216876 [dblack wobbl] Cool.  I want to play too :-)

^ Embedding the Ruby interpreter in C# app
216894 [nkpart gmail] in C#. I've got well through the basics of using p/invoke to load the

^ Multi-Module Alternative to the Factory Pattern?
216895 [transfire gm] I've been using a factory pattern for a set of packaging classes
217001 [pit capitain] Tom, couldn't you pass the packager itself to the external modules and
217016 [transfire gm] Yes. That would work too. And that might be the best way to do it.
217023 [ara.t.howard] module DEB
217057 [transfire gm] Only becuase there are a lot of arguments to pass.
217062 [ara.t.howard] hash?  array?

^ Is object[x](y,z) always invalid?
216896 [alexg kuicr.] I'm working on converting a Python module (RPy) to Ruby and am trying
+ 216899 [hal9000 hype] I believe your summary of the situation is correct.
+ 216933 [kbloom gmail] foo[x].call(y,z) may be further from the original python syntax, but it's
| 216952 [ruby-ml kitt] =20
| 216957 [hal9000 hype] I don't know what you mean. That is not valid in Ruby (unless
| 216959 [ruby-ml kitt] It is valid if x is a method that foo responds to.
| 216961 [hal9000 hype] I think he was merely striving to keep the code
| 216972 [alexg kuicr.] Indeed. I am 99% certain that the
+ 217522 [invalid gmx.] Would it be a problem to write foo(x,y,z) or foo[x,y,z]?
  217600 [alexg kuicr.] That is another option I had considered. However, in the library in
  217637 [interfecus g] You could still use the r.sum(1,2) for 99% of your method calls. The
  217662 [noah.easterl] Yeah, it would be pretty easy to redefine method_missing to forward

^ Protecting your investment in a commercial ruby app. (was Re: Ruby with Qt or GTK ?)
216898 [kbloom gmail] I know that. Obviously, there's no difficulty protecting your investment
216942 [nospam nosit] / ...

^ Alias for a class?
216913 [foamdino gma] Last night I was playing with some third-party lib and found myself
+ 216915 [twifkak comc] SomeClass = SomeOtherClass
+ 216968 [shortcutter ] You can store that class in any variable or constant you like.  So all of
| + 216971 [foamdino gma] That's an amazingly intuitive comment - wish I'd made that /me == jealous...
| + 217008 [ara.t.howard] my favourite is
|   217014 [transfire gm] w00t! Forget all those silly "constants"!
|   217049 [robert.dober] Much too readable
+ 216976 [jan.svitok g] include StupidlyLongLibName::LongModuleName

^ Prime sieve optimization.
216923 [erlercw gmai] The prime sieve of Atkin (http://en.wikipedia.org/wiki/Sieve_of_Atkin)
216931 [erlercw gmai] If I do all the sieving in one stretch, a naive implementation of the

^ Installing libxml on osx as Gem
216927 [nicholas.hen] I'm trying to install libxml on osx as a gem (Ruby 1.8.2). Any ideas on
216989 [rossrt rosco] Hmm, find_header should be defined by mkmf, so I don't understand what's
219217 [nicholas.hen] Upgrading to 1.8.4 resolved this.

^ Re: Code Golf Challenge : Oblongular Number Spirals
216935 [aaron.pfeife] Lost a few hours as well :)  I was able to get it down to 273 bytes.

^ ruby wiki options?
216958 [lister pikkl] wondering if people have recommendations for a simple to use ruby
+ 216984 [aidy.rutter ] the omnipotent Phlip can help you with that.
| 217009 [phlipcpp yah] Thanks. And try Instiki, or a Rails-oriented Wiki.
+ 216991 [aidy.rutter ] Phlip has a wiki
+ 218937 [ramalho gmai] Among those listed, Wiki2Go [1] seemed to me the most promising as it
  + 219100 [enogrob hotm] => See ''Hiki'' which is a powerful and fast wiki clone written in
  | 219174 [enogrob hotm] "How to host a personal wiki on your home computer" - Lifehacker
  + 219213 [rsanheim gma] The original maintainer of Instiki, Alexey, all but disappeared.
    232225 [lee.enricoso] Can you provide a link where I can download and evaluate the wiki engine
threads.html
top