30144-31505

29887-31396 subjects 30336-31039

Compiling Berkeley db for Ruby under Cygwin
30144 [alwagner@ua ] Even as a Linux user, I probably stay as confused about compiling
+ 30164 [tilps@ho ma ] ummm could it possibly be that the dll is in ruby\bin - and your lib path on
| 30168 [alwagner@tc ] Thanks for the reply, Gareth.  I got it to compile by copying
+ 30165 [gp@fa il eh ] 1. Use the correct linker flag `-L/path/to/librubys.a/' and look
| 30169 [alwagner@tc ] There was a file: cygdrive/d/ruby/bin/cygwin-ruby16.dll, which I copied to
+ 30170 [alwagner@tc ] Thanks to all.  I copied /ruby/bin/cygwin-ruby16.dll to the current
+ 30245 [gp@fa il eh ] 1. Use the correct linker flag `-L/path/to/librubys.a/' and look
  30247 [gp@fa il eh ] /usr/local/lib/libcygwin-ruby16.a in my build.
  30271 [cwilson@ec .] FYI, ".dll.a" is a recognized extention meaning "import lib".  If found
  30280 [gp@fa il eh ] Yep, that is the 'standard' but ruby is ruby;)

Progress: Ruby binding for Scintilla & FXScintilla
30147 [ljohnson@re ] Over the past month or so several people have expressed an interest in FOX
30150 [rich@in oe h] Lyle,
30173 [curt@hi bs c] Lyle, This is, indeed, perfect timing. Thank you for taking up the interest.

Ruby and Eclipse
30149 [bobx@li ux a] Is anyone working on getting a Ruby module for the eclipse project
30151 [rich@in oe h] Curt Hibbs and a couple of others were talking about this before.  We have
+ 30158 [bobhicks@ad ] Even better!  :-)
+ 30172 [curt@hi bs c] Having Ruby support in Eclipse would be a good thing if you wanted to

FXRuby, FOX and glade/libglade lookalike
30163 [ps@ra ia .m ] I have been looking at FXRuby a bit and think it looks nice and
30221 [ljohnson@re ] The best effort I'd seen along the lines of a GUI builder for FOX was Martin

Win32API question regarding CreateWindow
30189 [mdavis@se ai] Has anyone successfully created a window using Win32API?  The following

chomp for arrays?
30191 [dempsejn@ge ] I was wondering if there was a built-in for chomping an Array. I was
+ 30193 [decoux@mo lo] Well, actually chomp is defined as a method of String or a global
+ 30194 [sean@ch tt n] ar = ["foo\n", "bar\n"]
| + 30198 [dempsejn@ge ] Yeah, I realize its made for strings...but like the snippet Sean
| | + 30199 [decoux@mo lo] Well, probably after you'll want the methods #sub, #capitalize, etc from
| | | 30200 [dempsejn@ge ] I'm not sure what I'd "want after" but would there be a reason not to?
| | | + 30201 [decoux@mo lo] What I want to say is : if you add the method #chomp for Array there are no
| | | + 30235 [mkelly2002NO] Well Jack, creating modules to wrap existing functions,
| | + 30215 [alwagner@ua ] Philosophically, this sounds really wierd to me.  You seem to
| + 30216 [list@ch om t] class Array
|   30238 [adamspitz@bi] How about something like this?
|   30248 [list@ch om t] Well, at least your snippet has earned a one way ticket to *my*
+ 30206 [matz@ru y- a] Array#pop?

should I use ruby instead of perl
30195 [qvyht@re ov ] simple question...
+ 30196 [sean@ch tt n] Everyone should have their own opinion and I'd advise formulating your
| 30197 [dempsejn@ge ] yes
+ 30202 [peter@se an ] Too vague.
  + 30204 [qvyht@re ov ] I saw this answer coming./ But being familiar with web, I always
  | + 30214 [taw@us rs so] The problem with such questions is that people will give you answers
  | | 30521 [matju@sy pa ] I think you're better off defining a measure... well I don't know, but I
  | | 30533 [taw@us rs so] Problem space is at least dense, as you need dense set to
  | | 30935 [matju@sy pa ] Well, if a problem, to be solvable, has to be of finite length in a finite
  | | 30938 [taw@us rs so] Solution set is countable, problem set doesn't have to.
  | | 30945 [matju@sy pa ] Well, there are several ways to encode n numbers into a single number: for
  | + 30227 [ptkwt@sh ll ] As someone who formerly liked Perl a lot but decided that OO in Perl was
  | | + 30263 [ysantoso@je ] After using Ruby for several months now, I notice that using Ruby
  | | + 30482 [qvyht@re ov ] Sorry by thinking by newsgroups but
  | + 30307 [toddg@ma l. ] Clean your room!!
  |   30481 [qvyht@re ov ] ...
  + 30305 [toddg@li ux ] I would ask "who are you developing it *for*?".
    30480 [qvyht@re ov ] my home is on mountains /bin/laden ;)
    30518 [toddg@li ux ] I think the word you are looking for is 'target'.

Ruby 1.6.6 bug and fix
30203 [rokosm@kl ka] irb(main):001:0> require 'md5'
30219 [matz@ru y- a] Thank you for reporting bug.  I will merge the patch.
30335 [rokosm@kl ka] Do you think that this bug is that important to make you release
30387 [matz@ru y- a] It's important.  I will release 1.6.7 within a week.
30471 [rokosm@kl ka] Matz,

Bug?
30205 [martin.kahle] irb(main):001:0> p 1e0
30211 [nobu.nokada@] I think so, and guess 0x_0 and 0b_0 should be error oppositely.
30213 [decoux@mo lo] I think that you'll have problem with this ('f' and 'F') or the patch is
30222 [nobu.nokada@] Oops, what's '0f0'!?
30223 [decoux@mo lo] Well, actually it's invalid but I don't see a reason to include it in the
30693 [nobu.nokada@] You mean why I mistook?  I'm not sure but might be confused

Shortcut to accessing class constants?
30209 [herman_graal] This may be an indication of bad design but in a current project I have a class (C) with a number of constants (B1, B2, ...) that I wan't to access from another class (A).
+ 30212 [chr_news@gm ] appreciated!
+ 30304 [vjoel@PA H. ] This isn't quite what you're asking for, because it's static. Adding

Docstrings
30225 [list@ch om t] I still can't see how and where they can do better than a tool like
30226 [decoux@mo lo] be carefull with class variables
30228 [list@ch om t] I rectify: not only optimizations are left to who has any use for

cdecl vs stdcall
30229 [maverick@cs ] I am trying to build a Visual Basic app that uses Ruby as the scripting
30231 [matz@ru y- a] Could you tell me what stdcall is, and what I should do to switch?
+ 30237 [maverick@cs ] A __stdcall function's arguments are pushed onto the stack from right to
| 30251 [alan@di ik t] Generally, for cross-platform code, I've seen a macro used where the cdecl/stdcall occurs.  The macro may evaluate to nothing on platforms which don't need to specify between cdecl's and stdcalls.
| 30388 [matz@ru y- a] Hmm, could you give us more information?  Where can I see the macro?
| 30664 [alan@di ik t] Usually the macro is built into a larger c-preprocessor system of
+ 30240 [mkelly2002NO] function is responsible for popping any parameters off

Production Mini-plants in mobile containers. Co-investment Program
30232 [newsletters@] The Financial News, January 2002

Ruby Web Host
30233 [jason@jv eg ] For all those who've been searching for a Web hosting company supporting

Tk / GTK?
30236 [ronjeffries@] It has been recommended that Chet and I use the Tk textpane for our
+ 30239 [armin@ap ro ] I think it's a matter of taste.
+ 30273 [aaron@mu ge ] The current Gtk textbox widget is, I believe, fairly spartan.  Tk's text
+ 31505 [comp.lang.ru] - - I suspect you've got the answer already, but Tk and GTK are

Patch for Ruby 1.7
30242 [ljohnson@re ] Looking at the CVS version of Ruby, the declaration for rb_rescue2() in
30472 [matz@ru y- a] I don't remember why I did this.  I guess I must had reason...
30507 [ljohnson@re ] __((VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE),VALUE,...));
+ 30532 [nobu.nokada@] Actually I added the nested prototype arguments, because some
+ 30562 [matz@ru y- a] I guess I'm goint to fix this.  But give me a time to remember what I

Tab Arrows in RDE
30243 [ralph.mason@] ...
+ 30249 [mchahn@fa el] ...
| 30250 [ralph.mason@] ...
| 30255 [mchahn@fa el] ...
| 30258 [dempsejn@ge ] see my previous post...i think you can turn off everything...i'm in RDE
+ 30270 [QZS01353@ni ] There are no options TabMark(right arrow) and DBSpaceMark(rectangle) to

rubywin
30246 [dempsejn@ge ] A quick question to those familiar with RubyWin: i can require
+ 30253 [mkelly2002NO] Also you might want to check out
| 30254 [dempsejn@ge ] Thanks for the load tip..I knew there must be something like that...as
| 30293 [mkelly2002NO] Perhaps I haven't used it enough to run into the gotcha's yet?
+ 30256 [Jean-Francoi] I launch my program in a dos window when I'm under windows because of

Bug in Enumerable#include? (Range#include?, actually) ???
30252 [chadfowler@c] I just observed the following behavioral differences between ruby 1.6.6
30266 [nobu.nokada@] It was just typo.

RDE - turn off options
30257 [dempsejn@ge ] To the person looking for this: go to Tool -> Property. At the right

self being altered even when .dup'ed
30261 [dempsejn@ge ] Hey All,
30262 [taw@us rs so] dup makes shallow copy - only array is copied, not it's contents.

Ruby category in devsearcher.com
30264 [shirai@p1 p.] I found a site for searching developer's web sites - www.devsearcher.com.

Structs and Marshalling
30265 [alwagner@tc ] I keep getting myself tripped up when I Marshal Struct objects.  I typically
30281 [decoux@mo lo] Well, it's best if you give a small example because I can't reproduce the
30334 [alwagner@tc ] totaling 5.2k and 5 text files totaling 28.3k:  33.5k total.  I don't know
30473 [matz@ru y- a] This means your marshal data file is corrupted.  Does this information
30498 [alwagner@ua ] Yes.  Thank you, Matz.  I found the message in Marshal.c.  Also,

Need help understanding system() call
30267 [wheelerwjx9@] ...
30318 [ptkwt@sh ll ] I experienced this same problem today: I was helping someone setup Ruby
30331 [wheelerwjx9@] Phil,
30358 [ptkwt@sh ll ] Can you post more details about your findings?
30733 [wheelerwjx9@] Sorry it took me this long to get back with this, the
+ 30735 [ptkwt@sh ll ] if RUBY_PLATFORM =~ /win/i
| 30801 [wheelerwjx9@] Yes,  you are right, and were the first time you posted this fix.  But, as I
+ 30736 [Dave@Pr gm t] I believe it's a-comin', but Andy's kinda snowed under, and has just

Indentation (was: should I use ruby instead of perl)
30268 [mchahn@fa el] If the tail end (line going left) is all 'end' and '}' lines, then it could
+ 30269 [dblack@ca dl] <disclaimer> I actually like having end and } tokens, and do not
| 30272 [mchahn@fa el] All six ends could be left off with no ambiguity.  The EOE is grouped into a
| 30285 [dblack@ca dl] No, not prettier.  (Well, yes, but that's not directly relevant :-)
+ 30277 [ronjeffries@] Lisp systems sometimes have a kind of hyper right paren that does the
+ 30288 [list@ch om t] <facts>
+ 30323 [akuchlin@me ] # 8-space indent

The Ruby Way
30274 [schneiker@ju] Just got my long awaited copy of "The Ruby Way" from Amazon.
+ 30275 [curt@hi bs c] I too, got mine today, and would like to strongly second the above comment.
| 30276 [curt@hi bs c] That was supposed to say "how do I implement a hash with duplicate keys?"
| 30629 [mrchameleon@] Conrad initiated this thread to inform you that your posting
| 30659 [schneiker@ju] keys?"
| + 30816 [mchahn@fa el] But outlook, eudora, cc:mail, and every mailer I've ever used puts the
| | + 30822 [ser@ge ma e-] Perfectly legal, because there isn't really any illegal posting rules.  It
| | + 30849 [erik@ba fo s] Wrong.  At least eudora does it right or can be configured to do it
| | | + 30854 [Stephan.Kaem] As well as Netscape (which is what I'm using, I admit).
| | | + 30906 [curt@hi bs c] If outlook can do this I'd like to know how!
| | + 31050 [schneiker@ju] That's really strange, I use MS Outlook Newreader and I always had to *type*
| + 30821 [mrchameleon@] Snip.
|   31053 [schneiker@ju] Hmm. I don't see mention of the more subtle one, i.e. that caused what
+ 30279 [ruby-talk-us] Not to be picky, aren't there four English Ruby books? "Programming Ruby",
| 30284 [info@mj is d] markus
+ 30563 [hal9000@hy e] I just saw this thread, as my machine has been on the blink
  + 30575 [ptkwt@sh ll ] Hal,
  | 30583 [hal9000@hy e] Thank you for that kind endorsement.
  | 30602 [ptkwt@sh ll ] "The Coral Book" works for me, but it isn't any shorter than "The Ruby
  | 30606 [schneiker@ju] hour
  + 30604 [schneiker@ju] You're welcome. And thanks for the book!
  + 30618 [ronjeffries@] Hal, congratulations on The Ruby Way. I normally hate big books,

Summary: Call for a small program - willing to give a bonus
30278 [Tom.Karas@ht] first of all i would like to thank for all the answers. I hope i
30289 [list@ch om t] Delphi is wonderful at giving you motivation to go on programming,
30290 [tobiasreif@p] Is this what you're looking for?
30298 [list@ch om t] Whooops, a ``more'' before ``support'' didn't get out of my keyboard.
30300 [tobiasreif@p] last time I tried, support

metadata about Ruby programs/libs (freeRIDE/gems)
30282 [tobiasreif@p] just glimpsed how others solved the metadata challenge related to

Ruby and RDF
30283 [tobiasreif@p] this guy

Ruby article on Freshmeat
30286 [stesch@no sp] ...
30295 [YuriLeikind@] ================
+ 30296 [harryo@zi wo] That only happens if the method doesn't change the object. So, ...
| 30299 [finalfrontie] So what would the code be if you aren't sure whether the object has been
| + 30306 [ruby-talk-us] There is no need for such code, unless you need to test to make sure that
| | 30311 [harryo@zi wo] I was in the middle of writing almost exactly what you said, because
| | 30312 [mchahn@fa el] if str.upcase! then File.open('x.txt','w'){|f| f.write str} end
| | 30313 [harryo@zi wo] I can certainly see that's a use for it ... but what's the likelihood
| | + 30316 [billk@ct .c ] Well admittedly upcase seems an unlikely [real-world]
| | + 30332 [1010726779.8] I think the official answer is to not use the ! version of the methods
| + 30308 [yurleik@tu .] "Michael Joner" <finalfrontier@yahoo.com> ???????/???????? ? ????????
+ 30314 [ptkwt@sh ll ] Previet,

capturing both stdout and stderr of a subprocess
30291 [ysantoso@je ] I am trying to programatically interact with another program, much
30292 [phlip_cpp@ya] /ruby-1.6.5/lib/open3.rb:#       in, out, err = Open3.popen3('nroff -man')

[ANN] Ruby/zlib 0.5.0-pre1
30294 [unnie@bl e. ] This is pre-release; tests and documents are not sufficient yet.

multiple substitutions at once
30297 [dabigdemp@ho] ...

gsub with arrays
30301 [dabigdemp@ho] ...
30325 [list@ch om t] We are aiming too high.  Even my previous post about web services and
30330 [Dave@Pr gm t] Would rubycookbook.org be what you wanted?
30345 [list@ch om t] Well, not really, though it is a nice resource.  It is solutions to a

Re: Sams Teach Yourself Ruby in 21 Days (was: The Ruby Way)
30302 [schneiker@ju] I think that's certainly a worthy thing to be picky about.
+ 30303 [ms@ia ta e. ] I've contacted Pearson (the SAMS publisher) about  a mixup in
+ 30309 [x@ic im nk .] [...]>     This item will be published on February 12, 2002.

move index back ward in list.each do {}
30315 [kinfe0@ne sc] How do I move an index in the 'each' back ward or repeat itself at
+ 30326 [ysantoso@je ] I can't really understand your example (including the one in your
| 30355 [kinfe0@ne sc] This may be too much for me at this point of learning Ruby. Anyway,
+ 30364 [mkelly2002NO] To alter indexes inside a loop I think generally
  30627 [kinfe0@ne sc] Thanks all, I found 'array.each_index' and it works.

Exceptional NameError without halt
30317 [ale@cr ms n.] I'm feeling something strange is going on here. Dunno what has
30329 [Dave@Pr gm t] It's the same problem. It's fixed in 1.7, but it looks like the patch

loop control problem.
30319 [kinfe0@ne sc] I think my earlier post didn't go through, so here is a repost.
30324 [jfreeze@fr e] Try 'next'.
30350 [kinfe0@ne sc] Thanks Jim and Yohanes, I'll try both suggestions.

Sorting a Hash by value of integer stored in the Hash
30320 [finalfrontie] I have a program which creates a Hash array.  The ultimate result is a
+ 30321 [taw@us rs so] hash_new = hash.invert
+ 30322 [ysantoso@je ] irb(main):011:0> myh = {"z"=>5,"x"=>3,"y"=>7}
  30333 [finalfrontie] Yes and the nice thing is I that I think I even understand HOW it works.

one liner / overriden class repository
30327 [dabigdemp@ho] ...
+ 30328 [taw@us rs so] I'd like to say that it would be much more useful if copyrights and licences were carefully traced,
| + 30342 [kpj@kk .n t.] Isn't it worth following VIM's example on http://vim.sf.net with its
| | 30351 [Dave@Pr gm t] If the vimonline source was available I'd look at adding it to
| | 30353 [chadfowler@c] Is this it?
| | + 30356 [Dave@Pr gm t] Doh! I'll check it out (both ways :)
| | + 30362 [vruz@ww .d g] Chad, now you are working on RAA.succ, you could also think
| |   30365 [Dave@Pr gm t] Could you explain this a bit more: how would this work in practice?
| + 30344 [list@ch om t] Oh well, who cares about aim, let's just make sure that something gets
+ 30368 [alwagner@tc ] While this thread is alive...Why not also add to the snippets solution other
  30392 [dabigdemp@ho] I agree, I think that'd be great...when I started using emacs, seeing others
threads.html
top