koicat | 1 Jul 01:40 2010
Picon

drb problem? ringy-dingy won't answer...

The following code works fine as long as I don't try to run it through
the distributed server.  It doesn't get there...
It runs fine out of delayed_job, runs fine if called directly.
But if 'distrib' is true (the default) it runs right up to the call to
the server and right past it without getting to the server or raising
any errors.

Am using Ruby 1.8.6.26 , Ringy-Dingy 1.2.1, dj 1.8.4.

*********The server:
require 'rinda/ring'
class ScriptServer
  include DRbUndumped
  attr_accessor :result
  def run(fullScript)
    myTS  = Time.now.strftime("%Y%m%d%H%M%S")
    msg = "===> Starting #{scriptname} in run #{scriptrun} on
#{scriptenv} at #{myTS}"
    puts msg
     <at> result = "***#{scriptname} Launched [#{scriptlaunch}]"
    rslt = fullScript.run
     <at> result << rslt
    msg = "#{scriptname} Completed [#{Time.now.strftime("%Y%m%d%H%M
%S")}]"
     <at> result << "***#{msg}"
  rescue
     <at> result << "#{scriptname} Aborted [#{Time.now.strftime("%Y%m%d%H%M
%S")}] \n #{$!} \n #{caller.to_yaml}"
  ensure
    return  <at> result
(Continue reading)

James Edward Gray II | 1 Jul 02:45 2010

Re: Reading String Data as a File

On Jun 30, 2010, at 10:41 AM, Brian Candler wrote:

> James Edward Gray II wrote:
>> I'm open to suggestions and I do take patches.
> 
> Specifically, I'd like to see how to parse CSV from stdin. You provide 
> an example in the opposite direction:
> 
> #   FCSV($stderr)    { |csv_err| csv_err << %w{my data here} }  # to 
> $stderr

On Jun 30, 2010, at 11:35 AM, Robert Klemme wrote:

> On 30.06.2010 17:05, James Edward Gray II wrote:
>> 
>> Do you think it would help if I added Wrapping an IO under the
>> Shortcut Interface on this page?
>> 
>> http://fastercsv.rubyforge.org/classes/FasterCSV.html
> 
> +1

Better?

http://fastercsv.rubyforge.org/classes/FasterCSV.html

James Edward Gray II

Colin Bartlett | 1 Jul 03:46 2010

Re: Increase significant digits in Float

On Wed, Jun 30, 2010 at 3:56 PM, Javier Goizueta <jgoizueta <at> gmail.com>wrote:

> You may also want to take a look at http://flt.rubyforge.org/
>
> It's an implementation of arbitrary precision floating point numbers
> (decimal and binary). If you don't need it to be fast it has some
> advantages over BigDecimal.
> --
> Posted via http://www.ruby-forum.com/.
>
Also: I recall a short thread from December 2008:
Proposing an arbitrary precision class building on BigDecimal and being
derived from Numeric
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/322100
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/322174 and
subsequent
  or as a user friendly all in one place:
http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/66f505b9460464cc/e9a0142b118d66a8?q=
  with links to:
https://rubyforge.org/projects/appmath/
http://appmath.rubyforge.org/
http://www.ulrichmutze.de/index.html

(I should observe that I haven't tried this code: I simply made a mental
note at the time of the thread that it might be useful.)
Jeremy McAnally | 1 Jul 05:21 2010
Picon

[ANN] Ruby Hoedown 2010 Registration Open and CFP Closing Soon!

Hello all,
Just wanted to drop a reminder here that the CFP for the Ruby Hoedown
2010 is closing in just a few days, so make sure to get those
proposals in at http://bit.ly/9jn1ec.  If you didn't see the initial
announcement, we're having the conference in Nashville, TN, again, but
this time at the Downtown Hilton on September 3-4.  The cost is a
measly $0; that's right: it's free again this year!

So, mosy on over to http://rubyhoedown.com and submit a talk and/or
register up.  We're looking for technical talks on just about any
topic related to Ruby (even loosely so!), so if you've got something
you're itching to talk about, let us know.  We'd love to hear from
you!  CFP closes July 2nd, so get over to http://bit.ly/9jn1ec!

If you're just going to register, then go right ahead at
http://rubyhoedown.eventbrite.com.  We have a few ticket types (you
can just get a free ticket, buy a shirt, include a donation, etc.) and
a sweet group code for the Hilton ($99 a night!  That's like half
off!).  If you're unaware, Nashville was hit by major flooding this
year (the main reason we're not at the OpryLand this year
unfortunately), so in an effort to help them rebuild the city and take
care of its people, half of your donations through donation tickets
and $1 from every t-shirt purchased will be donated to a worthy local
charity (we're still debating which one, but the Red Cross is looking
like a front-runner).  So, not only are you helping out the most
awesome regional Ruby conference ever, you're helping out a huge group
of people in need.

If you'd like to sponsor us, then check out the prospectus here:
http://rubyhoedown.com/images/sponsor_prospectus.pdf  We offer a few
(Continue reading)

R.. Kumar 1.9.1 OSX | 1 Jul 07:48 2010
Picon

Re: pathname.rb:270: warning: `*' interpreted as argument prefix

Brian Candler wrote:
> R.. Kumar 1.9.1 OSX wrote:
>> /opt/local/lib/ruby1.9/1.9.1/pathname.rb:270: warning: `*' interpreted
>> as argument prefix
> 
> Can you post line 270 of that file, with a few lines of context?
> 
> Can you replicate the problem standalone? e.g.
> 
 #!/usr/bin/ruby19 -w
 require 'pathname'

The above is enough to give the error.

1. I do not want to fix the problem in my own copy of ruby 1.9 and have 
it keep returning when i upgrade versions, or have others get it.

2. While googling, I found that the problem was fixed in 1.8.x but 
perhaps not in 1.9. Is that the case ?

The code in pathname.rb is

 259   # Return a pathname which is substituted by String#sub.
 260   def sub(pattern, *rest, &block)
 261     if block
 262       path =  <at> path.sub(pattern, *rest) {|*args|
 263         begin
 264           old = Thread.current[:pathname_sub_matchdata]
 265           Thread.current[:pathname_sub_matchdata] = $~
 266           eval("$~ = Thread.current[:pathname_sub_matchdata]", 
(Continue reading)

R.. Kumar 1.9.1 OSX | 1 Jul 07:55 2010
Picon

Re: pathname.rb:270: warning: `*' interpreted as argument prefix

Josh Cheek wrote:

> Anyway, if it bothers you, you can go put parens around it so it becomes
> yield(*args) and is not ambiguous. But you don't need to worry about it,
> look where it got those args from:

Okay, i've put a parens around the *args. I no longer get the warning. 
However, why i did not do this earlier, is that when i was googling and 
i saw the commit (change) for this issue, there seemed to be several 
lines of change involved.

I hope i am not altering the behavior by putting the parens.
--

-- 
Posted via http://www.ruby-forum.com/.

Josh Cheek | 1 Jul 08:46 2010
Picon

Re: pathname.rb:270: warning: `*' interpreted as argument prefix

On Thu, Jul 1, 2010 at 12:55 AM, R.. Kumar 1.9.1 OSX <sentinel1879 <at> gmail.com
> wrote:

> Josh Cheek wrote:
>
> > Anyway, if it bothers you, you can go put parens around it so it becomes
> > yield(*args) and is not ambiguous. But you don't need to worry about it,
> > look where it got those args from:
>
> Okay, i've put a parens around the *args. I no longer get the warning.
> However, why i did not do this earlier, is that when i was googling and
> i saw the commit (change) for this issue, there seemed to be several
> lines of change involved.
>
> I hope i am not altering the behavior by putting the parens.
> --
> Posted via http://www.ruby-forum.com/.
>
>
You aren't, you probably see them because your warning levels are different
than other people's

$ ruby -we "def x; yield *[12] end; puts x{|n|n}"
-e:1: warning: `*' interpreted as argument prefix
12

$ ruby -e "def x; yield *[12] end; puts x{|n|n}"
12

-----
(Continue reading)

Jesús Gabriel y Galán | 1 Jul 08:51 2010
Picon

Re: pathname.rb:270: warning: `*' interpreted as argument prefix

On Thu, Jul 1, 2010 at 8:46 AM, Josh Cheek <josh.cheek <at> gmail.com> wrote:
> On Thu, Jul 1, 2010 at 12:55 AM, R.. Kumar 1.9.1 OSX <sentinel1879 <at> gmail.com
>> wrote:
>
>> Josh Cheek wrote:
>>
>> > Anyway, if it bothers you, you can go put parens around it so it becomes
>> > yield(*args) and is not ambiguous. But you don't need to worry about it,
>> > look where it got those args from:
>>
>> Okay, i've put a parens around the *args. I no longer get the warning.
>> However, why i did not do this earlier, is that when i was googling and
>> i saw the commit (change) for this issue, there seemed to be several
>> lines of change involved.
>>
>> I hope i am not altering the behavior by putting the parens.
>> --
>> Posted via http://www.ruby-forum.com/.
>>
>>
> You aren't, you probably see them because your warning levels are different
> than other people's
>
>
> $ ruby -we "def x; yield *[12] end; puts x{|n|n}"
> -e:1: warning: `*' interpreted as argument prefix
> 12
>
> $ ruby -e "def x; yield *[12] end; puts x{|n|n}"
> 12
(Continue reading)

Jesús Gabriel y Galán | 1 Jul 08:51 2010
Picon

Re: pathname.rb:270: warning: `*' interpreted as argument prefix

2010/7/1 Jesús Gabriel y Galán <jgabrielygalan <at> gmail.com>:
> On Thu, Jul 1, 2010 at 8:46 AM, Josh Cheek <josh.cheek <at> gmail.com> wrote:
>> On Thu, Jul 1, 2010 at 12:55 AM, R.. Kumar 1.9.1 OSX <sentinel1879 <at> gmail.com
>>> wrote:
>>
>>> Josh Cheek wrote:
>>>
>>> > Anyway, if it bothers you, you can go put parens around it so it becomes
>>> > yield(*args) and is not ambiguous. But you don't need to worry about it,
>>> > look where it got those args from:
>>>
>>> Okay, i've put a parens around the *args. I no longer get the warning.
>>> However, why i did not do this earlier, is that when i was googling and
>>> i saw the commit (change) for this issue, there seemed to be several
>>> lines of change involved.
>>>
>>> I hope i am not altering the behavior by putting the parens.
>>> --
>>> Posted via http://www.ruby-forum.com/.
>>>
>>>
>> You aren't, you probably see them because your warning levels are different
>> than other people's
>>
>>
>> $ ruby -we "def x; yield *[12] end; puts x{|n|n}"
>> -e:1: warning: `*' interpreted as argument prefix
>> 12
>>
>> $ ruby -e "def x; yield *[12] end; puts x{|n|n}"
(Continue reading)

Josh Cheek | 1 Jul 10:05 2010
Picon

Re: pathname.rb:270: warning: `*' interpreted as argument prefix

2010/7/1 Jesús Gabriel y Galán <jgabrielygalan <at> gmail.com>

> 2010/7/1 Jesús Gabriel y Galán <jgabrielygalan <at> gmail.com>:
> > On Thu, Jul 1, 2010 at 8:46 AM, Josh Cheek <josh.cheek <at> gmail.com> wrote:
> >> On Thu, Jul 1, 2010 at 12:55 AM, R.. Kumar 1.9.1 OSX <
> sentinel1879 <at> gmail.com
> >>> wrote:
> >>
> >>> Josh Cheek wrote:
> >>>
> >>> > Anyway, if it bothers you, you can go put parens around it so it
> becomes
> >>> > yield(*args) and is not ambiguous. But you don't need to worry about
> it,
> >>> > look where it got those args from:
> >>>
> >>> Okay, i've put a parens around the *args. I no longer get the warning.
> >>> However, why i did not do this earlier, is that when i was googling and
> >>> i saw the commit (change) for this issue, there seemed to be several
> >>> lines of change involved.
> >>>
> >>> I hope i am not altering the behavior by putting the parens.
> >>> --
> >>> Posted via http://www.ruby-forum.com/.
> >>>
> >>>
> >> You aren't, you probably see them because your warning levels are
> different
> >> than other people's
> >>
(Continue reading)


Gmane