[#1711] Re: open-uri patch, added progress_proc hook — "T. Onoma" <transami@...>

Tanaka Akira:

22 messages 2003/11/19
[#1737] Re: open-uri patch, added progress_proc hook — Mathieu Bouchard <matju@...> 2003/11/23

[#1739] Re: open-uri patch, added progress_proc hook — Mathieu Bouchard <matju@...> 2003/11/23

[#1740] Re: open-uri patch, added progress_proc hook — "T. Onoma" <transami@...> 2003/11/23

On Sunday 23 November 2003 08:26 pm, Mathieu Bouchard wrote:

[#1741] Re: open-uri patch, added progress_proc hook — Mathieu Bouchard <matju@...> 2003/11/23

[#1718] Re: open-uri patch, added progress_proc hook — Elliott Hughes <ehughes@...>

22 messages 2003/11/21
[#1722] Re: open-uri patch, added progress_proc hook — Tanaka Akira <akr@...17n.org> 2003/11/22

In article <AD4480A509455343AEFACCC231BA850F17C434@ukexchange>,

[#1724] Re: open-uri patch, added progress_proc hook — "T. Onoma" <transami@...> 2003/11/22

On Saturday 22 November 2003 04:34 pm, Tanaka Akira wrote:

[#1726] Re: open-uri patch, added progress_proc hook — Tanaka Akira <akr@...17n.org> 2003/11/23

In article <200311221024.05642.transami@runbox.com>,

[#1731] Re: open-uri patch, added progress_proc hook — "T. Onoma" <transami@...> 2003/11/23

On Sunday 23 November 2003 02:24 am, Tanaka Akira wrote:

[#1732] Re: open-uri patch, added progress_proc hook — Tanaka Akira <akr@...17n.org> 2003/11/23

In article <200311230325.21687.transami@runbox.com>,

[#1733] Re: open-uri patch, added progress_proc hook — "T. Onoma" <transami@...> 2003/11/23

On Sunday 23 November 2003 03:10 pm, Tanaka Akira wrote:

[#1750] Re: open-uri patch, added progress_proc hook — Tanaka Akira <akr@...17n.org> 2003/11/24

In article <200311230648.41003.transami@runbox.com>,

[#1759] Re: open-uri patch, added progress_proc hook — Sean E Russell <ser@...> 2003/11/24

On Monday 24 November 2003 03:19, Tanaka Akira wrote:

[#1762] Re: open-uri patch, added progress_proc hook — "Nathaniel Talbott" <nathaniel@...> 2003/11/24

Sean E Russell [mailto:ser@germane-software.com] wrote:

[#1753] gc_sweep under 1.8 ... not syck.so — Richard Kilmer <rich@...>

We still encountered a gc_sweep in our use of Ruby 1.8 on Linux (v8).

16 messages 2003/11/24
[#1754] Re: gc_sweep under 1.8 ... not syck.so — ts <decoux@...> 2003/11/24

>>>>> "R" == Richard Kilmer <rich@infoether.com> writes:

[#1757] Re: gc_sweep under 1.8 ... not syck.so — Richard Kilmer <rich@...> 2003/11/24

Yes, there are several (Ruby) threads working during this gc_sweep.

[#1758] Re: gc_sweep under 1.8 ... not syck.so — ts <decoux@...> 2003/11/24

>>>>> "R" == Richard Kilmer <rich@infoether.com> writes:

[#1763] Re: gc_sweep under 1.8 ... not syck.so — Richard Kilmer <rich@...> 2003/11/24

of course this effects 300 machines ;-)

[#1755] Re: Controlled block variables — Jamis Buck <jgb3@...>

On Mon, 2003-11-24 at 02:04, T. Onoma wrote:

26 messages 2003/11/24
[#1756] Re: Controlled block variables — "T. Onoma" <transami@...> 2003/11/24

On Monday 24 November 2003 05:22 pm, Jamis Buck wrote:

[#1760] Re: Controlled block variables — Sean E Russell <ser@...> 2003/11/24

On Monday 24 November 2003 11:51, T. Onoma wrote:

[#1761] Re: Controlled block variables — "T. Onoma" <transami@...> 2003/11/24

On Monday 24 November 2003 06:40 pm, Sean E Russell wrote:

Re: "stereotyping"

From: "T. Onoma" <transami@...>
Date: 2003-11-22 11:11:03 UTC
List: ruby-core #1721
Sorry I forgot to post results of DuckHunter examples. (DuckHunter itself is 
also included below).

DuckHunter is a concise probe providing the functionality of #duck_signature, 
and has a unique feature that suggests how Ruby might proceed to cleaning up 
some of its code: If a type error returns the method that was not implemented 
in the error message then DuckHunter will fix and continue to probe. Using 
this on a number of libraries I have discoverd that ruby has a problem in 
that it allows TypeError to be raised for any reason whatsoever. There needs 
to be a tighter system for raising TypeErrors, including returning the 
offened method. I believe that one of the first things that needs to happen 
to improve Ruby's type mechanics is to ensure that a signature probe can run 
without fail on any method.

Results:

DUCK QUACKS

big4:
        succ()
        to_i()
        >()
        >(Fixnum)

DUCK QUACKS
#<DuckHunter:0x402a8738>
#<DuckHunter:0x402a8738>
#<DuckHunter:0x402a8738>
#<DuckHunter:0x402a8738>

ameth:
        succ()
        jump(Fixnum)
        to_i()
        to_i()
        >()
        >(Fixnum)
        do_what_ever(String,Regexp)
        do_what_ever(String,Regexp,Fixnum)

-t0


On Saturday 22 November 2003 02:22 am, T. Onoma wrote:
> and i thought it was so radical when i wrote it yesterday
>
> # notice if TypeErrors woud return offending respond_to? method
> # in error message then it would continue to probe
>
> class DuckHunter
>
>   def initialize
>     @a_r_g_s = {}
>   end
>
>   def a_r_g_s
>     @a_r_g_s
>   end
>
>   def d_u_c_k_c_a_l_l
>     begin
>       yield
>     rescue TypeError => e
>       self.send(e.message)
>       retry
>     end
>   end
>
>   def method_missing(aSym, *args)
>     # This will happen the first time
>     aSymStr = aSym.to_s
>     @a_r_g_s["#{aSymStr}"] = [ args.collect { |a| "#{a.class}" } ]
>     begin
>       d = %Q{
>         def self.#{aSymStr}(*args)
>           # This will happen the subsequent time
>           @a_r_g_s["#{aSymStr}"] } + %q{.concat [ args.collect { |a|
> "#{a.class}" } ]
>           self
>         end
>       }
>       instance_eval d
>     rescue SyntaxError
>       puts "TypeError induced SyntaxError! TypeError must return respond_to
> method!"
>       raise
>     end
>     self
>   end
>
> end
>
> # example
>
> class TypeTest
>   def ameth(x)
>     big4 x
>     #---
>     puts x.to_i
>     puts x.jump(4)
>     puts x.do_what_ever("Duck can take it!", /\w+/)
>     puts x.do_what_ever("Duck can take it!", /\w+/, 42)
>   end
> end
>
> t = TypeTest.new
>
> puts "\nDUCK QUACKS"
>
> dh = DuckHunter.new
> dh.d_u_c_k_c_a_l_l do
>   t.ameth(dh)
> end
>
> # show args
> puts "\nameth:"
> dh.a_r_g_s.each { |name, argpat| argpat.each { |args| puts "\t#{name}
> (#{args.join(',')})" } }
>
> # -----------
>
> On Saturday 22 November 2003 12:52 am, Greg McIntyre wrote:
> > "David Naseby" <david.naseby@eonesolutions.com.au> wrote:
> > > Below is a quick hack to do that. Needs work. Needs redirection of IO.
> > > But its kinda cute.. Has issues with side effects, of course, and
> > > printing crapola all over the place.
> >
> > Is this or something like it on the RAA? Perhaps a slightly more general
> > mechanism to proxy messages to the "real" object and call a
> > hook/callback?
>
> late could be added


In This Thread

Prev Next