Maarten Mortier | 3 Dec 10:05

Re: Question about op. overloading

Jesús Gabriel y Galán wrote:

> Hope this helps,
> 
> Jesus.

So simple, I should have known. :-)

Thank you!

--
Maarten
--

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

Maarten Mortier | 3 Dec 09:49

Question about op. overloading

I have:

class Sudoku
  def[](r,c)
    @rows[r][c]
  end

  def set(r,c,a)
    @rows[r][c]=a
  end
end

Now, how can I define a []= operator instead of the awkward set(r,c,a) ?
I want to be able to do
sudoku[2,3]=candidate

or even
sudoku[2][3] = candidate
and
sudoku[3] = row

Are these things possible? How, I could not find the information.

(I'm just learning, for educational reasons I don't want to extend the
Matrix class)
--

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

Jim Mahony | 3 Dec 09:35
Favicon

Re: rubyscript2exe problem

The Higgs bozo wrote:
> 
> http://www.ruby-forum.com/topic/170355
> 
> http://letmegooglethatforyou.com/?q=rubyscript2exe+modify+frozen+string

I have already tried the solution in the first link (see above where I 
mention that I have tried a complete reinstall of Ruby) as well as all 
others that I could find on google but thanks very much for your helpful 
response.

I'm only asking for help because I've been unable to find a solution 
that worked after several hours of trying.
--

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

marc | 3 Dec 08:36
Favicon

Re: [ANN] FFI 0.2.0

Wayne Meissner said...
> Greetings Rubyists.
> 
> The JRuby team is proud to announce the release of 0.2.0 of FFI for
> Ruby.  This release is compatible with the FFI implementation released
> in JRuby 1.1.6
> 
> Get it via 'gem install ffi' or download the source and/or gem files
> from the project page at http://kenai.com/projects/ruby-ffi

Just a suggestion, but I think it would be worth adding a note about 
what FFI is.

--

-- 
Cheers,
Marc

Aaron Patterson | 3 Dec 07:49
Gravatar

[ANN] nokogiri 1.0.7 Released

nokogiri version 1.0.7 has been released!

* <http://nokogiri.rubyforge.org/>
* <http://github.com/tenderlove/nokogiri/wikis>
* <http://github.com/tenderlove/nokogiri/tree/master>
* <http://rubyforge.org/mailman/listinfo/nokogiri-talk>
* <http://nokogiri.lighthouseapp.com/projects/19607-nokogiri/overview>

Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser.

Changes:

### 1.0.7

* Bugfixes

  * Fixed memory leak when using Dike
  * SAX parser now parses IO streams
  * Comment nodes have their own class
  * Nokogiri() should delegate to Nokogiri.parse()
  * Prepending rather than appending to ENV['PATH'] on windows
  * Fixed a bug in complex CSS negation selectors

## FEATURES:

* XPath support for document searching
* CSS3 selector support for document searching
* XML/HTML builder
* Drop in replacement for Hpricot (though not bug for bug)

(Continue reading)

Hidetoshi NAGAI | 3 Dec 07:30

Re: best gui toolkit

From: Joel VanderWerf <vjoel <at> path.berkeley.edu>
Subject: Re: best gui toolkit
Date: Wed, 3 Dec 2008 06:11:03 +0900
Message-ID: <4935A598.3080209 <at> path.berkeley.edu>
> > I've always thought Tk has been vastly underrated. It's worth it for the 
> > text and canvas widgets alone.
> 
> Agree. Every time I investigate the alternatives, tk is the quickest 
> path to 2d animations.

Does anyone want Tcl3D (http://www.tcl3d.org/) support on Ruby/Tk ?
--

-- 
Hidetoshi NAGAI (nagai <at> ai.kyutech.ac.jp)

Pierre Pat | 3 Dec 05:35

Re: best gui toolkit

I personaly like wxRuby.
Quite easy, and lots of sample code provided with it, so really easy to 
pick up.

Shoes is just fun to code, works really nicely, but I wouldn't recommand 
it for normal GUI application yet, since it doesnt have menu bar for 
instance.
But it's definitely worth trying :-)
--

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

Favicon

Re: [ANN] FFI 0.2.0

Awesome, and thanks for the continued work in parallel on keeping 
JRuby's FFI feature-for-feature compatible :)

Anyone released any notable FFI-based replacements for C extensions yet? 
Sean? ffi-ncurses up for a release soon?

Wayne Meissner wrote:
> Greetings Rubyists.
> 
> The JRuby team is proud to announce the release of 0.2.0 of FFI for
> Ruby.  This release is compatible with the FFI implementation released
> in JRuby 1.1.6
> 
> Get it via 'gem install ffi' or download the source and/or gem files
> from the project page at http://kenai.com/projects/ruby-ffi
> 
> Special thanks to:
> 
> Yehuda Katz
> Luc  Heinrich
> Andrea Fazzi
> Mike Dalessio
> Hongli Lai
> 
> 
> 
> Highlights of changes since 0.1.1:
> 
> - About 25% faster function invocation.  This is probably not that
> important, since as soon as you start putting significant ruby code
(Continue reading)

John Ky | 3 Dec 04:33

Stack level too deep

Hi,

Is there any way for me to increase the stack size?  My stack is huge:

playback.rb:38:in `play_back': stack level too deep (SystemStackError)

Cheers,

-John
John Ky | 3 Dec 04:28

Re: Memory usage with blocks

Runs heaps faster too.  Woosh!

On Wed, Dec 3, 2008 at 2:32 PM, John Ky <newhoggy <at> gmail.com> wrote:

> Hi Sebastian,
>
> Why doesn't ruby detect that tmp isn't used in the block and not keep a
> reference to it?
>
> I found the offending code:
>
>          def play_back(&block)
>             $trace.method_block "PlaybackChain::play_back(&)" do
>                sub_block = Proc.new do
>                   @tail.play_back do |root|
>                      block.call(root)
>                   end
>                end
>                @block.call(sub_block)
>             end
>          end
>
>          def play_back(&block)
>             @heads.each do |head|
>                selector.select_each do |selection|
>                   block.call(selection)
>                end
>             end
>          end
>
(Continue reading)

Sean O'Halpin | 3 Dec 03:01
Gravatar

Re: [ANN] FFI 0.2.0

On Wed, Dec 3, 2008 at 1:09 AM, Wayne Meissner <wmeissner <at> gmail.com> wrote:
> Greetings Rubyists.
>
> The JRuby team is proud to announce the release of 0.2.0 of FFI for
> Ruby.  This release is compatible with the FFI implementation released
> in JRuby 1.1.6
>
[snip list of great new features]

FFI is just getting better and better. Thanks for this Wayne and
everyone else who has contributed to it.

Regards,
Sean


Gmane