222270-224308

222038-223497 subjects 222468-223811

a regex
222270 [the.mindstor] I have a string in the following form: 2006%2F10%2Fasdfasdf (or more
+ 222272 [dblack@wo bl] str.split("%2F")
+ 222273 [thomas.adam2] ``
| 222275 [Gemma.Camero] string = 2006%2F10%2Fasdfasdf
+ 222291 [kabigon@gm i] irb(main):001:0> '2006%2F10%2Fasdfasdf'.split('%2F')
| 222294 [the.mindstor] Thanks for all suggestions, but the requirement is to be done thru
| + 222296 [Gemma.Camero] What exactly do you want from the regex?
| + 222297 [kabigon@gm i] irb(main):001:0> match = '2006%2F10%2Fasdfasdf'.match
| | 222306 [shortcutter@] This has a potential for disastrous backtracking with large strings.
| | + 222308 [the.mindstor] Yep... this is the closest I got too :-).
| | + 222309 [kabigon@gm i] I have a couple of questions about this; I'm always trying to further my
| |   222322 [shortcutter@] If you are really interested in the matter I can recommend "Mastering
| |   222550 [robert.dober] ...
| + 222299 [dblack@wo bl] Regexes alone don't do anything other than specify a pattern.  You
| | + 222304 [shortcutter@] Actually the code you presented did not even use a RX.  You used the
| | + 222305 [the.mindstor] Yes... use groupings, but what I wanted to get is not done through
| + 222313 [gavin@re in ] I'm unclear on what your real requirements are, but here are some
| + 222358 [nospam@no it] That seems to be splitting hairs (no pun intended), since "split" uses
+ 222298 [snowblink@gm] s = "2006%2F10%2Fasdfasdf"
+ 222317 [phurley@gm i] I am pretty sure I am missing something from your requirements...

reading variables in a file
222274 [ogrecio@gm i] I'm thinking of migrating from Fortran to Ruby. Do you think i should go
+ 222277 [farrel.lifso] File.open(file) do |f|
+ 222278 [rtilley@vt e] irb(main):001:0> x = 'Peter 4 1990'
+ 222279 [naPOLeon.Pol] var = Array.new
+ 222283 [hgs@dm .a .u] You might just want to do the text processing in ruby, and invoke
+ 222284 [kabigon@gm i] That entirely depends on what the application is, if you currently use a

Recommendation for a beginner's ruby book/tutorial
222282 [eric.mahurin] ...
+ 222286 [Gemma.Camero] I would say the best online book to go for is "The Little Book of Ruby"
+ 222287 [TimHunter@nc] Welcome to Ruby!
+ 222288 [louis.j.scor] I was poking around with the "Try Ruby!" tutorial the other day for
+ 222395 [james.britt@] James Britt
+ 222464 [tom.armitage] another vote for the Chris Pine, probably in online form but you might

Upgrading to v1.8.5 on Mac 10.4
222314 [behmannlist@] Just in case anyone else is still having trouble upgrading to v1.8.5
222327 [pere.noel@la] some times...

Bug segmentation fault
222321 [wai-kee.chun] I am trying to display the contents of large array (over 1000 rows)
+ 222324 [gavin.kistne] I have no idea if it will make a different, but do you realize that by
| 222333 [djberg96@gm ] True, but it shouldn't segfault in any case.  I'm curious what the
| 222346 [shortcutter@] require 'pp'
+ 222356 [tim.pease@gm] ruby --version
+ 222607 [matz@ru y- a] This kind of bug is often too difficult to track without error

classless methods
222328 [bitdoger2@ya] what class does a classless independent method belong too?
+ 222334 [djberg96@gm ] Kernel.
| 222355 [djberg96@gm ] Whoops.  Make that Object.
+ 222344 [transfire@gm] Not Kernel, it becomes a private method of Object class.
| 222347 [nicksieger@g] ...
| 222350 [gavin.kistne] irb is messing with your head here. Try the same as a standalone Ruby
| 222354 [nicksieger@g] ...
+ 222351 [ruby-ml@ki t] Ruby can tell you.
+ 222364 [matt@ti bi s] <http://www.rubycentral.com/faq/rubyfaq-7.html#ss7.4>
  222366 [jason.merril] And since Object is an ancestor of pretty much everything in ruby,
  + 222373 [gavin.kistne] You're being fooled by some tricks that irb plays to make itself work.
  + 222381 [matt@ti bi s] But that's just a vagary of how irb works. You couldn't do that in a
    222387 [hgs@dm .a .u] Why not?  say_hello is now a method of Object, an ancestor of [1,3,5].
    222389 [matt@ti bi s] matt-neuburgs-imac-g5:~ mattneub$ ruby
    + 222438 [srdjan.marin] def widget(tidbit)
    | 222441 [toalett@gm i] # test.rb
    | 222466 [srdjan.marin] very good point, I guess in my post I made a mistake of not thinking
    + 222944 [hgs@dm .a .u] Thank you.  Saw the other post about that being a private method after

adding soap element attributes
222343 [ajtongen@wa ] I have a question that I hope will be simple for someone to answer.
222598 [nakahiro@sa ] Unlucky.
222961 [ajtongen@wa ] Thanks Hiroshi, that got me started.  Soap4r is great, I just wish this
223470 [nakahiro@sa ] You need to define the service as a document service when you want to

To folks who talked to me about Ruport during RubyConf
222349 [gregory.t.br] We've got a great thread going on on Ruport mailing list where people

unable to send to the mailing list
222352 [pbrannan@at ] All the messages from pbrannan@atdesk.com to ruby-talk@ruby-lang.org in
+ 222357 [tim.pease@gm] It seems to be working now :)
| + 222359 [pbrannan@at ] It's working because I'm sending via www.ruby-forum.com rather than
| + 222384 [hgs@dm .a .u] No, it was posted from a forum -- you trimmed that bit.
+ 223005 [pbrannan@at ] testing...
  223006 [pbrannan@at ] So I'm able to work around the problem by modifying my .muttrc to relay

how to get only the duplicatet items from an array
222360 [nico@ni o- a] is there a oneline to get only the duplicatet item from an array?
+ 222367 [nospam@no it] / ...
| + 222370 [gavin.kistne] a = [1, 1, 2, 2, 3, 4]
| | 222377 [nico@ni o- a] thanks, yes sir,
| | 222390 [rtilley@vt e] irb(main):006:0> a = [1,1,2,2,3,3,4,4]
| | 222523 [william.fisk] => ["a", "b", 7, 77, "a", "ba", 3, 7]
| + 222378 [nico@ni o- a] thanks paul,
+ 222372 [wilsonb@gm i] irb(main):001:0> h = Hash.new(0)
+ 222383 [mike@ru yw z] => [1, 2]

can there be a "with" construction?
222362 [matt@ti bi s] Some languages have a "with" construction, where undefined methods are
+ 222368 [nospam@no it] Not AFAIK. IMHO the ultimate "with" construction is to create a class or
+ 222369 [lukfugl@gm i] system.startup.instance_eval do
| + 222374 [Gennady.Byst] Something like this?
| | + 222375 [gavin.kistne] def with( obj, &block )
| | + 222380 [lukfugl@gm i] 1) I don't think we really want to redispatch NoMethodErrors for
| + 222382 [matt@ti bi s] def with(ref, &block)
|   222385 [Gennady.Byst] Hmm... I must have misunderstood the OP. I somehow thought that in
+ 222386 [johnwilger@g] $with_receivers = []
| 222434 [johnwilger@g] OK, it was bothering me enough that I went ahead and fleshed out a
+ 222391 [invalid@gm .] class Object
| 222398 [invalid@gm .] Kalman
| 222400 [vjoel@pa h. ] See also the discussion of #then yesterday on ruby-talk. It's defined
| 222728 [invalid@gm .] It seems that this pattern has been quite popular for some time already.
| 222811 [poopdeville@] I suppose I'll cast my vote for either "with" or "suchthat" or even ":"
| 222938 [invalid@gm .] Yes, that's too why I like with.
| + 222940 [gavin@re in ] To be clear, 'eigenclass' was one (popular) suggestion among many for
| | 222985 [darkintent@g] Is the behavior the original poster asks about analogous to the the
| + 223015 [poopdeville@] Whoops, sorry.  I read your sentence as saying it was *impossible* to
+ 222410 [pbrannan@at ] See [ruby-talk:41867] and the following thread.
  222416 [bitdoger2@ya] shouldn't this .with method be better evaluated with the method_missing?

[ANN] Ice for Ruby Preview Release
222371 [marc@ze oc c] The Internet Communications Engine (Ice) is a modern, object-oriented
+ 222665 [emiel@va de ] This rocks. I've been kind of waiting for this a while now. :)
+ 222718 [ruby@ml ic m] This sounds really neat - alas, I have one question about it - according

Re: MountainWest RubyConf 2007: Call For Papers
222393 [djberg96@gm ] Where will it be held?
222448 [james.britt@] Where on the map will this be?

RubyForge down...
222404 [jfperusse@gm] I can't access the RubyForge website...
222409 [collinsj@se ] It works for me.
222411 [jfperusse@gm] Strange... I have no problems with other sites. RubyForge hangs Firefox
+ 222414 [collinsj@se ] It seems a little slow, but I can ping it and view it. Are you using
| 222417 [jfperusse@gm] I was trying http://rubyforge.org.
+ 222419 [ara.t.howard] your dns is hosed.
  222423 [djberg96@gm ] Undoubtedly caused by someone not paying attention to Quebec's locale
  222426 [james@gr yp ] <dies laughing>
  222428 [jfperusse@gm] "Hé h??!" ;)

What are closures, continuations?
222408 [joeat303@ya ] - Ruby has closures -- which seem to be returning procs from functions?
+ 222412 [collinsj@se ] Closures are tricky, but you can think of them as blocks of code, or a
| + 222420 [joeat303@ya ] One more question -- what are lambdas? ;)
| | + 222424 [gavin.kistne] Closures are functions that retain access to local variables declared in
| | | 222425 [gavin.kistne] Another name for anonymous functions - functions declared on the fly
| | + 222430 [matt@ti bi s] This is a term from LISP. It basically just means a function that you
| |   + 222472 [Joerg.Mittag] Actually, it is a term from Lambda Calculus, which existed long before
| |   | 222479 [toalett@gm i] The lambda calculus took it from the Greek Alphabet, who adapted it
| |   | + 222480 [sylvain.joye] A lambda is not necessary a closure. A lambda is an anonymous function (and
| |   | + 222484 [louis.j.scor] Right.  It's best just to think of lambda as a way to get anonymous
| |   + 222482 [pere.noel@la] is that "lambda" name derived from lambda calculus in modern logic, or
| |     222548 [kmgaughan@ei] The former. The lambda calculus was on the scene long before Lisp was a
| + 222481 [pere.noel@la] could we say they work as anonymous class in java ???
|   222486 [shortcutter@] There are some similarities but also restrictions.  For example you can only
|   222490 [pere.noel@la] u're right !
+ 222431 [matt@ti bi s] <http://www.rubycentral.com/faq/rubyfaq-11.html>
+ 222436 [toalett@gm i] Continuations represent "the rest of the computation". Try googling
| + 222443 [gavin.kistne] [snip crazy example]
| | 222455 [louis.j.scor] Err...closures and continations? =)
| | 222461 [joeat303@ya ] Obsfucated code contests? ;P
| + 222491 [pantulis@gm ] This  example reminded me of Modula-2's coroutines.   Are these
|   222493 [brad@br de i] Since continuations represent the state of the computation including
+ 222499 [gdprasad@gm ] Prasaad

Re: How can I populate header values in SOAP document?
222429 [Brian.Hartin] Thanks Jeremy!  This worked pretty well.  I still have to hardcode the

Another nail in CygWin's coffin (attached)
222432 [znmeb@ce ma ] ...
+ 222435 [ruby@ph li .] I haven't followed this thred so don't know if it's been mentioned, but if
| 222440 [rob@oc te h.] ...
| 222451 [gethemant@gm] "Austin is basically right -- *nobody* should use CygWin as a Windows
+ 222494 [tomp@ea th i] Actually, I think Cygwin is a pretty reasonable platform for porting
| 222515 [halostatue@g] So. Is your company's product open source? Because if it isn't, and
| + 222518 [tomp@ea th i] Thanks for your concern, but I didn't say we were using the Cygwin
| + 222519 [reid.thompso] Actually that would only be true if they were distributing it without a
| + 222552 [rob@oc te h.] ...
+ 222514 [robert.dober] ...
+ 222558 [charles.nutt] d. realize how maddeningly frustrating it is when the Windows tool is
  222751 [hramrach@ce ] I use msys [1] when I want something like unix environment on Windows.
  222753 [ara.t.howard] i've compiled both the gnu scientific library, narray, and rbtree packages for
  222827 [znmeb@ce ma ] Yeah, the R Windows folks use MSys and eschew CygWin. I should try

upgrade on OS X
222442 [tmac@ea ys r] ...
222478 [hutch@re ur ] The ruby as shipped by apple is not in the same place on disk as the
+ 222524 [znmeb@ce ma ] Has a bug been filed on this? Is it unique to Macs, or will any gcc 4
| 222620 [hutch@re ur ] Yes, it is 'well' known to apple and the GNU folks. My understanding
+ 222660 [tmac@ea ys r] ...

Killing a windows process
222444 [joevandyk@gm] I'm starting a bunch of processes using win32/process
+ 222445 [gavin.kistne] ...
+ 222447 [phurley@gm i] signal = 4  # or 9 if you really want to take it out :-)
  224308 [joevandyk@gm] I'm using win32/process's Create function to start a new Windows

SouthWest RubyConf?
222453 [james.britt@] Is anyone aware of, or interested in helping prepare, plans for a U.S.
+ 222759 [adam@th re l] I'm toying with the idea of organizing one in Dallas, TX.  Not sure
| + 222763 [dblack@wo bl] Since we had a RubyConf in Austin, I guess RubyConf is "really
| + 222786 [sam@po er ou] I'm in Houston, TX, so I would be interested ... pending knowledge of
+ 222766 [christopher.] I would be willing to run the idea up the flagpole around Durango,
+ 222848 [mike@cl ve c] Yeah - I'm interested in helping.
  222942 [pat.eyler@gm] I was just extrapolating from your comment about missing denver and
  + 222945 [znmeb@ce ma ] It's addicting? *Now* you tell me!
  + 222946 [dblack@wo bl] That's correct; RubyConf is still a going concern, but Ruby Central
  + 222947 [james@gr yp ] Great progress Pat.  The first step is admitting that you have a
  | + 222948 [pat.eyler@gm] You make it sound like I want to recover or something.  ;^)
  | + 222950 [jeff@sc wa c] Who says it's a problem? :)
  + 222969 [james.britt@] That's the goal, at least.  Have more Ruby events, smaller and more
  | 223033 [gilesb@gm il] This does seem like a good thing. I may be planning to go to
  | 223036 [pat.eyler@gm] The 20th through Easter are all bad times here as well.
  + 223156 [james.britt@] That's the goal, at least.  Have more Ruby events, smaller and more

Ruby on AIX.  Again.
222458 [matt@te hn r] Since AIX now supports RPM as a package format, I would like to build a

regex blindness
222459 [josselin@wa ] I was blind yesterday .. could not find what's wrong in this regex (and
+ 222463 [nospam@no it] State the problem, not the solution. Describe the exact requirements to be
+ 222465 [shortcutter@] irb(main):001:0> /(?:x)/
| 222574 [josselin@wa ] thanks for your advice, removing the k flag was the k-point..
+ 222646 [chneukirchen] Yes, try /@/.

Efficient parsing of large Excel documents in Ruby
222460 [weyus@at .n ] All,
+ 222462 [doktormadsen] You should definitely use win32ole. This way, you can cut down memory
| 222510 [matt@ti bi s] Interesting. Just as a note, everything that happens on that page can
+ 222512 [ssmoot@gm il] I agree with Christian, but with a twist.
| 222517 [weyus@at .n ] I was definitely thinking about using win32ole/Excel to convert this
| 222522 [znmeb@ce ma ] Have you tried unixODBC? It seems to work fairly well, although there
| + 222531 [weyus@at .n ] Ed,
| + 222577 [weyus@at .n ] Hpricot?  I thought that only parsed HTML?  Can you say a little more
|   222579 [weyus@at .n ] Ah, are you saying that I can "publish" the Excel file into HTML through
+ 222526 [znmeb@ce ma ] Yes, there is a native way of doing this in VBA from a macro, which you
+ 222556 [charles.nutt] Another rough option would be using JRuby or one of the Java bridges to
  222576 [weyus@at .n ] Charles,
  222585 [charles.nutt] We appreciate the vote of confidence, and you're probably right about
  + 222770 [weyus@at .n ] I'm looking at RJB and it appears that it only loads the JVM into memory
  | 223230 [weyus@at .n ] Recently, I was confronted with a task in one of the apps. I'm building
  | 223231 [znmeb@ce ma ] That seems to me to be an awfully roundabout way of doing things. I
  + 222807 [ssmoot@gm il] Using WIN32OLE is actually simpler than c# since you have access to the

regexp to match CJK characters
222467 [0xcafebabe@1] How can I write a regexp to match CJK characters?
222505 [nospam@no it] print "Yes!" if varname =~ /^CJK$/
222509 [david@va ln ] post.
222516 [0xcafebabe@1] Yes, so how can write the regexp? thanks a lot
222538 [ jupp@gm .d ] Which encoding?
222562 [0xcafebabe@1] UTF-8
222626 [dido.sevilla] You may need to use the Oniguruma patch. I believe this is necessary
222687 [matz@ru y- a] Regular expression comes with 1.8 does support UTF-8.
222689 [foamdino@gm ] does this mean though that you must do a match on an escaped character
222691 [matz@ru y- a] You don't have to escape, if you specify -Ku or $KCODE='u'.
threads.html
top