188426-189406

188228-198790 subjects 188636-190357

^ new/initialize
188426 [tallison tac] Just a point of clarification.
+ 188429 [drbrain segm] Not exactly.  You call Object::new.  Object::new calls initialize
| 188432 [tallison tac] Ding!
+ 188430 [r.mark.volkm] "new" allocates space for the new object and creates it. It then calls
+ 188431 [halostatue g] class Obj    class << self      def new(*args, &block)        obj = self.allocate        obj.__send__(:initialize, *args, &block)        obj      end    end  end
+ 188433 [farrel.lifso] new() is actually just  a class method of the class object (Obj). You

^ FXRuby ComboBox problems:
188437 [janchrister.] First problem: The empty alternative shows just about two pixels in
188441 [meinrad.rech] easiest way is to put a space inside instead of an empty string.
188510 [janchrister.] I tried the advice, but failed to see any improvement.
188515 [meinrad.rech] hmm, sorry. but, i have tried it in FXRuby1.4.4 and i actually got an

^ Re: Markov Chains (#74)
188439 [cardologist ] class WordHash

^ class variables and inheritance (ActiveRecord problem)
188453 [stephen.bann] I'm new to Ruby and I'd like to be able to derive from a class and
+ 188470 [stephen.bann] I realized after working more that cattr_accessor was defined in the
+ 188475 [stephen.bann] Here's a copy of my test case without using the ActiveSuppoprt's
  188553 [vagabond cat] class C
  188555 [ara.t.howard] require 'traits'

^ Oracle on HP-UX: was Ruby on HP-UX
188454 [tnordloh gma] Assuming you are an Oracle user, here's what I had to do to get the Oracle

^ compiling gsl for one-click ruby (sorta solved)
188455 [ara.t.howard] this weekend i managed to compile the gsl (gnu scientific library), narray,
+ 188490 [ml.chibbs gm] Feel free to write this up on the one-click installer wiki if you
+ 188675 [guslist free] Please do. My Windows karma is also pretty low but I may need to

^ Identfying classes in a file dynamically
188467 [navyaamerine] I was trying to identify the classes in a give file at the run time. the following is the code i used.
+ 188482 [vjoel path.b] One way is to wrap the file in a module, so that the constants defined
| 188487 [dblack wobbl] Also I think that if the read-in file uses the ::Const construct,
| 188488 [vjoel path.b] $ cat t.rb
| 188489 [dblack wobbl] Yes, that's what I meant; if you have ::Foo in your file, then you
| 188491 [vjoel path.b] Oh, I see--I thought you meant it was a workaround, but it's actually a
+ 188535 [zdennis mkte] Way #1, store the new classes in a hash. This way you won't be overriding any classes you've previously loaded.

^ Class Definition inside a method definition?
188476 [wmioch hotma] I was under the impression that a class definition could not be inside a
188478 [wmioch hotma] Thanks David. I'm not sure you caught sight of the line of code I was
+ 188480 [vjoel path.b] Maybe it is allowed for consistency with the fact that the 'def
+ 188483 [david vallne] charset="utf-8"
  + 188484 [dblack wobbl] This message is in MIME format.  The first part should be readable text,
  + 188486 [wmioch hotma] Thanks for the explanation David, I'm sure it's close enough :P
    188496 [wmioch hotma] Hey guys,
    + 188498 [ara.t.howard] i don't see a class definition - only some methods being called on 'self',
    | 188500 [wmioch hotma] Thanks a, that makes sense.
    + 188501 [johnwilger g] I might suggest taking the time to actually sit down and really learn
      + 188503 [logancapaldo] charset=US-ASCII;
      | 188539 [johnwilger g] That's just it -- in my opinion, trying to write the parser without
      + 188504 [wmioch hotma] Sorry John, I didn't realise this was a mailing list as opposed to a
        + 188505 [hal9000 hype] Don't worry too much about that. The mailing list and the newsgroup are
        + 188529 [ara.t.howard] believe us - there have been much more annoying posters in the past.  you've
        | + 188546 [rferolino gm] I don't think that the original question was annoying. It came from someone
        | | 188626 [gwtmp01 mac.] +1
        | + 188619 [wmioch hotma] We have an in-house parser already, which we provide grammar files to so
        |   188620 [logancapaldo] charset=US-ASCII;
        |   188638 [wmioch hotma] Because the aim is to parse and produce a (design) model from the code.
        |   188640 [pit capitain] Bihal, forward engineering Ruby code should be no problem, but I doubt
        |   188643 [wmioch hotma] Thanks Pit.
        |   188682 [halostatue g] For the static part of the modeling, you may want to try to understandhow RDoc generates DOT files for generation with AT&T's GraphViz,since it can at least do basic class diagrams.
        + 188541 [johnwilger g] While it's great that your company is interested in providing support

^ Include....with an end?
188492 [wmioch hotma] Hey guys, ran into some weird code that seems to have an "end" for an
188495 [Gennady.Byst] Have you tried to ask Ruby to run it? I bet it will ask, in a very wague
188574 [drbrain segm] No, it says you have given too much code.

^ [ANN] vim 7 omni-completion function
188497 [segfault has] I've hacked away at complete.rb and some of the existing vim7
188520 [alexandru gl] That looks awesome!!! Great job! :) I've been waiting for something like this

^ App not waiting for popen to finish
188502 [mksm.sama gm] I'm using 'wget' to download a few files and then tar them up. I'm
+ 188506 [logancapaldo] The solution would be to do
+ 188528 [ara.t.howard] here you have a pipe that's been returned.  wget is writing to it.  you simply
  188538 [mksm.sama gm] Thanks for your suggestion. I'm going with the last one using a block
  188540 [ara.t.howard] fyi.  you still need to call Process.wait if you also want the status.  with

^ Coding Standards for Ruby
188507 [johnpetterso] This is a little urgent.
188508 [dharple gene] ...
188509 [shubhra.main] Thank you Daniel.
188565 [agorilla gma] Bill Guindon (aka aGorilla)

^ [ANN] ZenTest 3.2.0 Released
188511 [ryand-ruby z] ZenTest version 3.2.0 has been released!

^ [ANN] ParseTree 1.4.1 Released
188512 [ryand-ruby z] ParseTree version 1.4.1 has been released!

^ [ANN] YARV for ArchLinux
188516 [m.fellinger ] Had some minutes to spend today and thought it would be pretty neat to haveYARV (as announced on http://redhanded.hobix.com/cult/yarvMergedMatz.html) onArchLinux, so i went ahead and created a little PKGBUILD :)

^ Duplicity in Set
188517 [radek.skokan] I have a Set which should contains elements of my object Component. The
188519 [dharple gene] You must implement #eql? and #hash --
188521 [radek.skokan] Thanks Daniel, I omitted the eql?. Now it works.

^ define_singleton_method(a_symbol,&block)
188518 [billk cts.co] class BigDipper
188531 [ara.t.howard] class BigDipper
188583 [billk cts.co] Thanks, Ara.  But is there any way to write it such that the
+ 188588 [dblack wobbl] class BigDipper
+ 188603 [ara.t.howard] class BigDipper

^ Fwd: Markov chain solution
188522 [james graypr] charset=US-ASCII;

^ Smalltalk's favorite Boolean method
188524 [ernest.mickl] For a long time I have been programming Smalltalk.
+ 188526 [simon.kroege] def true.ifTrue
+ 188527 [james graypr] => nil
| + 188530 [Daniel.Berge] if 1 == 2
| | + 188532 [Daniel.Berge] What the heck?  How did this get so mangled?
| | + 188537 [ara.t.howard] or even
| + 188554 [chneukirchen] *hears 1000 functional programmers whine about return values getting lost*
|   + 188569 [james graypr] I didn't say I *liked* it.  I just said it got rid of the need to
|   + 188607 [jim weirichh] class Object
|     188662 [jimfreeze gm] [Massive amount of code snipped]
+ 188633 [roys mindspr] case (1 == 2)
  188685 [jim weirichh] Ah Roy ... You are spoiling the fun by being practical (insert big wink

^ vba --> ruby: tool, parse or assimilation?
188552 [kiaroskuro g] Do you guys know of any tool that can help me onverting a vba classic code
188566 [james_b neur] How do you plan on running this converted code?  My understanding of VBA
188590 [kiaroskuro g] I just need to export the business logic, then I will re-write the GUI on
188622 [david vallne] charset="utf-8"
188627 [kiaroskuro g] prototyping, though. rails is fantastic for the web app domain. other
188629 [corey.ssf.la] Well, you can sure automate Excel from Ruby...
188646 [kiaroskuro g] I agree, I am definetely working in that direction, although that creates

^ Best way to test for file existence?
188556 [weyus att.ne] All,
+ 188557 [weyus att.ne] File.exist?
| + 188559 [nathan.olber] I was so excited to finally see a question I could answer! That raised
| + 188562 [agorilla gma] File.directory?
+ 188580 [vjoel path.b] $ ri test | cat

^ Oddities of Iteration
188558 [nathan.olber] I'm working on a CGI script that iterates through a list of items of a
+ 188561 [collinsj sea] Just as a side note, you'll probably find the CGI standard library
| 188564 [nathan.olber] Thanks! I've learned that having a one-line string for a method will
| 188567 [collinsj sea] In general, the CGI library will spit out exactly what you give it.
+ 188570 [sylvain.joye] [~]% cat test.rb
+ 188576 [lukfugl gmai] class Report
  188577 [nathan.olber] You're both right, like I (cryptically) said before, I had the "puts" in

^ Re: Oddities of Iteration:
188560 [ara.t.howard] probably you've defined 'to_s' as

^ Ruby auto formatter
188568 [Jamal.Mazrui] Is there a Windows tool that does a reasonable job of globally
+ 188573 [reid.thompso] have not tried it but,,,,, http://www.arachnoid.com/ruby/rubyBeautifier.html
+ 188623 [david vallne] charset="utf-8"
  188740 [jesusrubsyou] Not that you would want to do this with large quantities, but FWIW, I

^ uninitialized constant Customer (NameError)
188572 [viswesh_01 h] I created a class called Customer and created a sub class called
+ 188582 [halostatue g] 1. Some actual code might help.2. Huh?
+ 188605 [pit capitain] Since you get the error in line 1 of the Transaction.rb file, I guess it
  188654 [viswesh_01 h] Thanks for the solid information that u posted, yes the require

^ Vpim::Vcard Line Breaks
188575 [benr x-cr.co] I am using the Ruby Vpim library to create Vcards.  I am having
188598 [sroberts uni] Lets move this conversation over to vpim-talk, so we don't take up the

^ regex flags
188579 [tallison tac] Generically, how do you impliment the various flags?
+ 188585 [halostatue g] Ruby doesn't support as many regex flags as Perl does.
+ 188586 [logancapaldo] i and x are both there, in the same way, as well as m
| 188593 [tallison tac] I frequently use a perl approach of
| + 188595 [ajohnson cpa] arg.scan(/pattern/im) do |it|
| | 188601 [tallison tac] Works, it's a lot of stuff to remember... again...
| + 188596 [logancapaldo] I'm pretty sure you want scan
+ 188591 [ajohnson cpa] You can apply modifiers (flags) the same as in Perl: /ixm

^ Windows Automation
188581 [dave davewki] I need to automate a few function in an Access form.  The form will
188589 [james_b neur] Look at AutoItX (free software to script mouse clicks and  keyboard
188597 [ksader gmail] To add to James' good suggestions, I'd suggest finding an OLE browser.

^ Style question: if !x vs. unless x
188584 [ruby_talk sh] One of the coolest things for me about learning ruby is that it's the
+ 188587 [jamie.macey ] Another version that works, but is a little confusing to read for
+ 188592 [collinsj sea] Personally, I've been going with the 'unless' statement much more often,
| 188599 [charlie cast] I never like to start a line off with unless.  It just looks confusing
| 188602 [zdennis mkte] Multi-conditional unless statements look confusing to me. But I am with Justin, depending on the context of the conditional may
| 188639 [ruby_talk sh] Interesting.  You mean like this?
| 188642 [logancapaldo] charset=US-ASCII;
| 188650 [zdennis mkte] I mean what Logan said plus the second half of what Dave said. I do not like the following, and I find it a) sometimes confusing
| 188686 [jonrubyforum] $ irb --simple-prompt
+ 188663 [shortcutter ] raise SomeError unless correct

^ irb
188594 [tallison tac] Is there any way to reset irb without closing and restarting it?
+ 188600 [logancapaldo] def reset_irb
| 188604 [tallison tac] cool.
| + 188606 [michael.gors] Awesome, Logan. I didn't even know I could use an rc file.
| + 188624 [david vallne] charset="utf-8"
+ 188648 [rossrt rosco] I don't know if this is any help, but do you know about IRB's
  188698 [briankbuckle] Cool.

^ [ANN] Instant Rails 1.3
188608 [ml.chibbs gm] Instant Rails 1.3 upgrades Ruby on Rails to its newly released version

^ Equivalent of Java static code block in Ruby?
188609 [weyus att.ne] All,
+ 188610 [dblack wobbl] class MyClass
+ 188611 [robert.dober] Well unless I missunderstood this is an easy one
+ 188612 [collinsj sea] irb(main):001:0> class A
  188613 [weyus att.ne] That's fine but I only want it executed ONCE the first time the class is
  + 188614 [bruce.woodwa] Wes,
  + 188616 [SimonKroeger] class A
    + 188617 [desmarm gmai] I think you need to find out why the class is being loaded multiple
    | + 188618 [weyus att.ne] Matthew,
    | | 188621 [daniels pron] If you're using fastcgi/webrick/mongrel (not plain cgi) and your
    | + 188625 [david vallne] charset="utf-8"
    + 188773 [azrael cream] No, that is what I would expect. Anything else is broken.
      188785 [simon.kroege] True, the statement above was related to the part you deleted
      188788 [azrael cream] My apologies; just being a bit trigger happy. I didn't actually know if
      188793 [tanner.burso] you to put all you attr_* calls in this new syntax, as well as calls to
      188795 [azrael cream] Maybe it's a Javaism that's deeply engrained in my consciousness, but I
      188815 [tanner.burso] Except that really all of the code in a class is executed at "load time",
      + 188816 [tanner.burso] as
      + 188818 [azrael cream] I think I agree with you. One shouldn't do stuff simply because that's
        + 188828 [tanner.burso] Other than code inside of methods what are you referring to?
        | 188835 [azrael cream] Non-static initializers of instance variables too. Teh usual.
        + 188831 [phurley gmai] Actually the code in those method bodies is executed -- that is what

^ Q about tk buttons
188615 [jeppe88 gmai] a variable when pushing a button but tk won't let me.
+ 188628 [nagai ai.kyu] It means "var = var + 1".
| 188647 [jeppe88 gmai] Thanks that kind of worked, but how come that the variable still returns 0,
| 188660 [nagai ai.kyu] ???
| 188697 [jeppe88 gmai] Oh sorry I meant to say that it returns 1. If I click the button 29 times,
| 188763 [nagai ai.kyu] Because, callbacks are called in the event loop (Tk.mainloop).
| 188796 [jeppe88 gmai] Thanks. I want to write a Ruby/Tk version of my first program ever (at that
| 188875 [nagai ai.kyu] Hmmm... There are some problems.
| 188901 [jeppe88 gmai] Thank you that really cleared things up :)
| 188950 [nagai ai.kyu] It is an additional binding for 'Return' key press on the entry widget.
| 188982 [jeppe88 gmai] Ah ok, thanks.
+ 188938 [pfharlock ya] I'm probably misunderstanding the question, but after reading this post

^ [ANN] autorequire-0.0.0
188630 [ara.t.howard] URLS

^ [ANN] vim 7 ruby omni-complete v0.2
188631 [segfault has] Thanks to some outside suggestions and contributions we now have another
+ 188672 [ jupp gmx.de] 500 Internal Server Error for me :-|
| 188695 [segfault has] Seems to be working currently. Could be that my old box doesn't agree w/
+ 188722 [r.mark.volkm] Where are we supposed to put the rbcomplete.vim file?
+ 189394 [tsuraan tsur] Very cool.  I just grabbed gentoo's vim 7.0b, and there were a couple
  189406 [d454d web.de] yup, forgot to mention the endlines in my other post. flip -u did the

^ [OT] Re: vba --> ruby: tool, parse or assimilation?
188632 [ara.t.howard] and sometimes that includes excel

^ using ansicolor
188634 [sy1234 gmail] include Term::ANSIColor
+ 188637 [cameron.mcbr] Sy,
| 188691 [sy1234 gmail] That was the solution.  I needed to require rubygems.  Apparently, I
| + 188692 [sy1234 gmail] Silly me, this is Ruby.  Although nothing is straightforward, google
| | 188694 [sy1234 gmail] I'm not sure that made english sense.  Let's try that again.
| + 188718 [flori nixe.p] You can set RUBYOPT=-rubygems in your environment, if you don't want to
|   188737 [sy1234 gmail] Aah, good point.  Maybe I should also recommend this for the guys who
|   188739 [ara.t.howard] be careful.  it's breaks some packages, like the gsl.
|   + 188743 [sy1234 gmail] Always a catch.  Ok, I'd rather insert it into my code manually every
|   + 188748 [jim weirichh] Does gsl just not work with gems at all?  Or is it that setting RUBYOPT
|     188753 [ara.t.howard] there is a superclass conflict with with the Rational class.  afaik this is
+ 188649 [flori nixe.p] require 'term/ansicolor'
| 188679 [ara.t.howard] that's good stuff florian!  any idea how to make this work? (it's a snippet out
+ 188659 [james graypr] Just FYI, HighLine can also do ANSI color, and much, much more...  :)
threads.html
top