274009-292770

273787-276979 subjects 274154-299933

^ [ANN] Ruby/Informix 0.6.1
274009 [gerardo.sant] This is a maintenance release to fix a bug triggered while working

^ Can you terminate an each_line statement.
274015 [williams.jay] Is there a way to terminate an each_line iteration before it iterates
274016 [bbxx789_05ss] File.open("data.txt", "w") do |file|
274018 [bbxx789_05ss] IO.foreach("data.txt") do |line|
274020 [williams.jay] How is
+ 274021 [bbxx789_05ss] File.open("data.txt", "w") do |file|
+ 274023 [williams.jay] This is working

^ Mac OS X Tiger comes with Tk?
274031 [summercoolne] I thought it is said that Mac OS X Tiger comes with Tk?
274032 [ben bleythin] Looks like you didn't install X from the dev tools.  I'd try that, it
+ 274033 [summercoolne] is that X11 (X window)?   how would that be installed (from dev tools)?
| + 274055 [x-ruby-forum] You can find it on your Tiger DVD or download it from Apple. But I don't
| | + 274073 [summercoolne] actually, i found those files in
| | + 274110 [dangerwillro] Many libs in X11 can be used by software without using the X server
| |   274146 [summercoolne] So either I have to find my original Mac OS X DVD, or I can download it
| |   274147 [summercoolne] By the way I also installed ActiveTcl on the Mac, can't I just start
| |   274215 [rick.denatal] This thread got me looking into my (rather new) macbooks ruby installation.
| |   274233 [rick.denatal] $port deactivate ruby
| |   274387 [summercoolne] that's weird... my Mac doesn't have "port"
| |   274394 [rmagick gmai] The port command is part of MacPorts, a.k.a. DarwinPorts.
| + 274091 [ben bleythin] Yes, it's X11.  It's in the Dev Tools image that you download from
+ 276084 [bbxx789_05ss] How do you 'instal X from the dev tools'?
  276086 [bbxx789_05ss] ...or would it be easiest to reinstall Xcode in its entirety and then
  276135 [ben bleythin] Honestly, I'm not sure.  It's been a long time since I installed the dev
  276349 [bbxx789_05ss] On Install Disc1, I went into the directory Xcode Tools>Packages, and
  276375 [m_goldberg a] I think what you are looking for isn't in Xcode Tools. It's in
  276379 [bbxx789_05ss] My god.  You've done it.
  + 276381 [bbxx789_05ss] I am using os x 10.4.7 and ruby 1.8.2.
  + 276428 [ben bleythin] Yeah, sorry about that.  X11 *used* to be part of the dev tools, but I
    290832 [bbxx789_05ss] Recently, I updated to ruby 1.8.6 and now when I try to run this
    292770 [s0nspark gma] How did you upgrade? MacPorts? If so it sounds like you did not choose

^ Re: write_nonblock is blocking?
274035 [lerno dragon] Thanks. Know it "should work" made me try to analyze the situation. =20
274037 [drbrain segm] $ ruby -v
274069 [lerno dragon] Could this be due to me running
274079 [akr fsij.org] I think it is a Mac OS X problem.
274123 [lerno dragon] Yeah, that seems to be it.

^ Problems with catching an exception...
274044 [forum josh.c] I'm having some basic newbie problem with catching an exception.
274046 [sylvain.joye] "rescue" clauses should be either part of a def ... end construct like this
274057 [forum josh.c] Thank you. :-)

^ [SQLite3] CREATE TABLE ... doesn't work sometimes
274047 [unbewusst.se] #! /usr/bin/env ruby
274049 [celtic sairy] Ideally, to do transactions, you should use the db.transaction method;
274056 [unbewusst.se] OK, fine thanks !

^ Re: how to use Ruby / Tk to display a text message status bo
274050 [summercoolne] This is one example with Tk.mainloop running as a thread, and a
274051 [summercoolne] require 'tk'

^ how to glob with international or unicode file names?
274053 [summercoolne] with the Dir[" path "]
274097 [bbxx789_05ss] I think that means your display device doesn't understand the
274099 [bbxx789_05ss] รกรกรก.txt

^ "reversing" a Time
274058 [mortee.lists] is it possible to reverse order when using a Time as sort key for sort_by?
+ 274059 [summercoolne] if the time is just the UNIX time can't you negate it too?  can use
| 274232 [mortee.lists] Yeah, this is what I was looking for.
+ 274061 [sascha.abel ] Couldn't you just do
| 274230 [mortee.lists] No, because I just wanted to reverse the order of one component, not the
+ 274196 [daniels pron] For your special case of using time as a sort key, just convert the time
+ 274484 [kbloom gmail] The integer solutions others have given are more elegant, but just for

^ MIT vs. Ruby/GPL License
274062 [transfire gm] Rails uses the MIT license. The Ruby license is essentially the GPL
+ 274075 [rhkramer gma] Interesting question, and one I'm tempted to answer even though others are
| + 274076 [alexey.verkh] QTE
| + 274080 [transfire gm] Me too ;)
| | + 274087 [rhkramer gma] Thanks!
| | + 274093 [bigboss64 ip] I don't think the difference between MIT and GPL License has much purpose in
| |   274098 [transfire gm] Let's go license free! Kind of like skinny dipping ;)
| |   + 274101 [znmeb cesmai] All this proves is that the distinction between the English language and
| |   | + 274107 [dangerwillro] Ok, this is relevant in that it is a big software issue, but let's
| |   | + 274158 [dan-ml dan42] Stallman is a coder? Didn't know about that. What did he code?
| |   |   + 274161 [grzm seespot] Emacs, gcc, gdb... GIYF.
| |   |   + 274177 [dangerwillro] emacs
| |   |     274187 [znmeb cesmai] And some other stuff -- he's been around a long time. I think he may
| |   + 274111 [perrin apoth] My understanding is that a gem distributed under the terms of the GPL
| |   | 274143 [charleshixsn] Kind of fuzzy isn't the half of it!
| |   | 274145 [perrin apoth] Yes, but . . . it's entirely possible that someone might want to ship a
| |   | 274180 [charleshixsn] As I said, "Kind of fuzzy" isn't the half of it.
| |   | 274189 [perrin apoth] If I was shipping an app for non-technical end users so low down the DIY
| |   + 274114 [hramrach cen] It is. You cannot decide that unless you go to court, and even then it
| + 274160 [jlsysinc hot] ver
|   274165 [onepoint sta] The GPL gives the *user* *complete* freedom.  It restricts *other*
|   274183 [jlsysinc hot] Using that limited definition of user, one who "simply uses the software",=
|   + 274188 [onepoint sta] Including the freedom to install and run the software *without* paying
|   | + 274190 [perrin apoth] Considering we were talking about "freedom", I didn't think we were
|   | | 274241 [onepoint sta] Chad, *I* was responding to someone's direct reply to one of my
|   | | 274246 [transfire gm] Uh oh. We were doing so well! A potentially flaming subject kept to a
|   | | + 274254 [perrin apoth] I'm not quite as well-versed in the MIT license as I am in some others.
|   | | | + 274272 [hramrach cen] The major difference from the "forever opensource" point of view is
|   | | | | 274294 [perrin apoth] Software gets a *lot* more proprietary than "only available as a binary".
|   | | | | 274308 [hramrach cen] Please, read what you are responding to. The critical part is you
|   | | | | 274311 [perrin apoth] I'm always confused by what that's supposed to hurt, all things
|   | | | | 274584 [hramrach cen] Not necessarily. He can still benefit from the improvements and fixes
|   | | | + 274277 [transfire gm] That's good to understand.
|   | | |   274298 [perrin apoth] Actually, from the FSF point of view (what one might call "copyleft"),
|   | | + 274312 [ news jay.fm] Years ago, I proposed a sort of "license markup language" to the OSI, on
|   | |   + 274327 [perrin apoth] OSI gets funding by certifying licenses.  I'm not surprised.
|   | |   + 274346 [transfire gm] Hmm.... well, do you want to do that? I was thinking the same thing
|   | |     + 274349 [ news jay.fm] Nah... too much work, I'm not a lawyer, and I just stopped caring :)
|   | |     + 274354 [znmeb cesmai] Let me see ... the clown is Richard Stallman, the cowboy is Eric
|   | + 274193 [znmeb cesmai] Most proprietary end-user licenses explicitly forbid running the
|   + 274216 [rhkramer gma] Hmm, most proprietary licenses (I can't immediately think of any exceptions)
|     274255 [perrin apoth] I'd classify the first two (because they specify access to source code as
+ 274078 [TimHunter nc] T.,
| 274113 [perrin apoth] I understand the intent behind your commentary, and don't really see any
+ 274105 [znmeb cesmai] The Ruby license says that you can use the the GPL, or you can use the
  274109 [alexey.verkh] Except for some of the source files you cannot... because those are

^ SQLite3::SQLException: SQL logic error or missing database
274064 [unbewusst.se] I've read a lot of people reporting probs with SQLite3 and this error
274176 [no spam.plea] SQLLite doesn't handle multi-threading. I don't see any in your example,
274192 [unbewusst.se] I've tried also surrounding the DB.execute by a DB.transaction without
274221 [no spam.plea] The transaction won't help, you get the error from starting
+ 274228 [unbewusst.se] OK, i'm trying that.
+ 274367 [unbewusst.se] OK i did some print out and I think "the code is violating SQLite's
  274471 [no spam.plea] I'm not an sqlite3 guru by any means, but I'd be amazed if that was it.

^ A threaded 'find' library?
274065 [djberg96 gma] The recent talk of threaded access to a file made me wonder if I could
274100 [hramrach cen] That's because  ruby does not really support concurrent threads. Any

^ Parameter in a block is not local?
274066 [summercoolne] I thought a iterator with a block is like an nameless function call...
+ 274081 [bbxx789_05ss] Reread pickaxe2, p.51, second paragraph.
+ 274083 [bbxx789_05ss] Also, I think I recall reading a post by Matz somewhere where he
+ 274085 [dblack rubyp] a is local, not global. The semantics of block parameters is
| 274089 [dblack rubyp] I should amend that by noting that it's a "one-way valve": if the
+ 274088 [ara.t.howard] one way to think about it (not entirely correct) is this
+ 274092 [pergesu gmai] This seems to me along the same lines as
| 274149 [summercoolne] a = 1
| + 274163 [pergesu gmai] Well, that's kind of the point of blocks, isn't it?  They close over
| + 274164 [dblack rubyp] There's no relation or connection between the two. The def keyword
| | 274171 [summercoolne] So in a way, think of a code block like a "if" statement?  (no new local
| | + 274173 [mortee.lists] No, they aren't the same even in Ruby 1.8.x either. With the do...end or
| | | 274175 [mortee.lists] I should have pointed out specifically the difference to the for ... in
| | + 274211 [dblack rubyp] I think the best thing is to learn about blocks as blocks, and don't
| + 274169 [mortee.lists] Yes, the def syntax specifically doesn't take the caller binding, AFAIK.
+ 274094 [ed.odanow wo] !Remark only!
+ 274106 [rick.denatal] a = 1
| 274156 [summercoolne] I don't know what software install Ruby 1.9 on my computer
| 274157 [ed.odanow wo] This is a very old version of Ruby 1.9. Please don't forget that Ruby
+ 274275 [bbxx789_05ss] Here's another example(a modification of the example found  in pickaxe2,
  274287 [rick.denatal] No it's not. no matter what 'spheric scope' means.

^ Fwd: Please Forward A Ruby Quiz Submission
274071 [james graypr] charset=US-ASCII;

^ Fwd: Please Forward: Ruby Quiz Submission
274072 [james graypr] ...

^ ruby gems require...
274102 [ripitup21121] everything working,just updated as well, but i recently installed norton
274127 [drbrain segm] The exception isn't printed...

^ question about some octal formatted output?
274103 [bbxx789_05ss] eacute = ""
+ 274128 [drbrain segm] Its at least as old as C.  You'll probably have to ask some really =20
+ 274152 [mortee.lists] Actually, what's your problem with all that?

^ Capturing the output of an external program line by line
274115 [adityam umic] I want to run an external program in ruby. The external program takes
+ 274117 [mbj seonic.n] in,out = IO.popen($command)
| 274153 [mortee.lists] Are you absolutely sure IO.popen returns an array of two IOs?
+ 274119 [TimHunter nc] IO.popen("#{cmd} 2>&1") do |f|
  274124 [adityam umic] Thank you Tim and Markus. Both your methods work perfectly. Since I just

^ nil.to_i returning zero
274120 [gerardo.sant] zero in Ruby is true, not false, in a boolean context.
+ 274125 [AEtzold gmx.] Dear Gerardo,
| 274136 [dangerwillro] nil is nothing?
+ 274185 [jeremymcanal] I expect to get a converted object or some *Error (TypeError maybe?)
+ 274191 [perrin apoth] There's been a few attempts to answer the question already.  I'm curious,
| 274195 [m.fellinger ] nil.to_i
| + 274197 [konrad tyler] charset="utf-8"
| | + 274206 [jg connectio] I remember using it somewhere. I think I used it for catching user input
| | + 274207 [transfire gm] If it goes away you get a NoMethodError.
| | + 274257 [perrin apoth] How about any circumstance in which one performs some kind of counting
| |   + 274268 [transfire gm] That what tests are for. (Of course one could say that about anything,
| |   + 274289 [gerardo.sant] You got it wrong. I'm not asking for #to_i returning nil.
| |     + 274293 [phrogz mac.c] On Oct 15, 1:02 pm, "Gerardo Santana G=F3mez Garrido"
| |     | 274302 [gerardo.sant] Let me just precise that I'm ok with nil.to_s.
| |     | + 274303 [perrin apoth] Why the difference?  Doesn't "" (the output of nil.to_s) evaluate to
| |     | + 274313 [phrogz mac.c] On Oct 15, 2:39 pm, "Gerardo Santana G=F3mez Garrido"
| |     + 274299 [perrin apoth] What purpose do you propose for nil if it isn't differentiated in
| |     | 274304 [gerardo.sant] I'm sorry, I didn't understand your questions.
| |     | 274322 [perrin apoth] nil.to_i => 0
| |     + 274309 [mortee.lists] Hmmm. Why would you convert a variable/parameter to int if you want to
| |       + 274317 [phrogz mac.c] "Oh, c'mon... I'm telling you that I think the language should be
| |       + 274321 [rick.denatal] hod.
| |         + 274350 [Joerg.Mittag] This is just an example of how easy it is to do the Null Object
| |         | 274359 [dangerwillro] J=F6rg put it well.
| |         + 274353 [h.wickham gm] uld
| |         | 274398 [rick.denatal] Note that I did give implementations of NilClass#* and NilClass#/
| |         + 274401 [rick.denatal] I don't  know that this is necessarily true.
| |           274403 [robert.dober] Good Rick never good fight with you, always agreed, now we can go for it ;)
| |           274407 [rick.denatal] But the idea of allowing
| |           274440 [rick.denatal] For these I'd draw the border at mutating operators.
| |           274516 [robert.dober] Reasonable choice I have to admit ;)
| |           + 274522 [dirk.traulse] class NilClass
| |           | 274599 [dirk.traulse] You're right. That's really better.
| |           | 274635 [satoshi.naka] nil is an interesting beast. In one of my projects, I added "each" to
| |           | 274638 [dblack rubyp] I would definitely not make a change like that. First of all, nil
| |           + 274536 [rick.denatal] Been there, done that <G>
| + 274231 [mortee.lists] Well, if you'd like it so much, why not just redefine it in your own
+ 274198 [transfire gm] On Oct 14, 3:40 pm, "Gerardo Santana G=F3mez Garrido"

^ Nested blocks?
274121 [rhkramer gma] The following works fine but I had some thoughts about trying to convert it to
+ 274126 [TimHunter nc] I haven't tested this but I think it'll do the trick. Hmmm...this is
| 274138 [rhkramer gma] Thank you!  It does work (well, I just had to interchange the two files, as
+ 274132 [stefano.croc] File.open("test.aml", "w") do |f|
| 274137 [rhkramer gma] Stefano,
+ 274174 [bbxx789_05ss] Here are some other possibilities that might work for you depending on
  274212 [rhkramer gma] Thanks, but the nested block is what I was looking for.  What I'm writing is a
  274267 [bbxx789_05ss] Have you seen each_slice() before?
  274395 [rhkramer gma] Thanks!  I've read (or skimmed, or attempted to read) enough Ruby books that

^ Ruby gem, library, class to implement typical functionality of a utility like cp?
274122 [rhkramer gma] I'm in the process of writing a small utility in Ruby to convert files in one
274151 [ara.t.howard] require 'fileutils'
274213 [rhkramer gma] Ara,
274235 [mortee.lists] You're looking for optparse. I guess it's not a gem but part of the
274237 [rhkramer gma] Yes, wonderful, thanks!

^ Testing - Network Layer Fault Injection in Ruby
274129 [jftucker gma] I've yet to find something that fills this hole in my test cases.
274135 [drbrain segm] I do some of this with custom stubs in memcache-client, see below.
274144 [jftucker gma] Eric,
274166 [drbrain segm] I don't I've not needed that level of fault tolerance.

^ irb, to learn more...
274139 [dangerwillro] irb
+ 274142 [ben bleythin] This is cool because it lets you set up a new context if you want to try
+ 274172 [nertzy gmail] On Oct 14, 4:08 pm, John Joyce <dangerwillrobinsondan...@gmail.com>
  + 274178 [dangerwillro] There must be a way to jump in and out, leaving it running or not.
  | 274179 [mortee.lists] There's no black magic here. In the online available version of the
  + 274181 [dangerwillro] well, nobody claimed black magic, just that it is interesting and fun
    274182 [mortee.lists] ...
threads.html
top