[#13161] hacking on the "heap" implementation in gc.c — Lloyd Hilaiel <lloyd@...>
Hi all,
Hi,
On Fri, Nov 02, 2007 at 04:09:53AM +0900, Lloyd Hilaiel wrote:
On Tue, Nov 06, 2007 at 03:15:52AM +0900, Lloyd Hilaiel wrote:
Paul Brannan wrote:
[#13182] Thinking of dropping YAML from 1.8 — Urabe Shyouhei <shyouhei@...>
Hello all.
On 11/3/07, Urabe Shyouhei <shyouhei@ruby-lang.org> wrote:
On Nov 3, 2007, at 3:47 PM, Alexey Verkhovsky wrote:
where to start ... to fix the YAML code bugs
Ujwal Reddy Malipeddi wrote:
[#13196] Subscribe to list w/o email — Trans <transfire@...>
I'm now using the ruby-core-google interface to this list, rather then
[#13198] Ruby's Standard Library could use a lead maintainer — "Gregory Brown" <gregory.t.brown@...>
Hi folks,
On Nov 4, 2007, at 11:22 AM, Gregory Brown wrote:
James Edward Gray II wrote:
On 11/4/07, M. Edward (Ed) Borasky <znmeb@cesmail.net> wrote:
[#13206] guessutf 1.0.0 released — Wolfgang Nádasi-Donner <ed.odanow@...>
Dear Ruby designers, developers, and testers!
[#13221] Re: Ruby's Standard Library could use a lead maintainer — Brent Roman <brent@...>
Brent Roman schrieb:
On 11/5/07, Wolfgang N疆asi-Donner <ed.odanow@wonado.de> wrote:
Gregory Brown schrieb:
[#13238] performance problem in 1.9 — Paul Brannan <pbrannan@...>
Checked latest 1.9 out of svn last week to run this test.
Paul Brannan wrote:
[#13248] Re: performance problem in 1.9 — Wolfgang Nádasi-Donner <ed.odanow@...>
Is it possible that it has a relationship with my remark about identifying
[#13254] send can't call protected methods, but invoke_method can — David Flanagan <david@...>
Hi,
[#13259] Frightening retry behavior should be deprecated and removed — Charles Oliver Nutter <charles.nutter@...>
Witness:
Hi,
Yukihiro Matsumoto wrote:
[#13283] Problem with installing latest version — Martin Duerst <duerst@...>
I just tried to compile and install the latest SVG revision, 13837.
[#13288] Unrecovered memory leak thoughts. — "Roger Pack" <rogerpack2005@...>
So it seems from my trivial analysis that there are instances when
On 11/8/07, Roger Pack <rogerpack2005@gmail.com> wrote:
On Thu, Nov 08, 2007 at 09:13:34PM +0900, Rick DeNatale wrote:
[#13289] Proposal of a new operator for Method and Proc — Jordi <mumismo@...>
Hello, this email is long but I hope you to read it. I think it is worth it.
Jordi wrote:
On Nov 8, 2007 7:03 PM, Gonzalo Garramu <ggarra@advancedsl.com.ar> wrote:
[#13292] Leak with regexp in method with no local vars. — "Jonas Pfenniger" <zimbatm@...>
The rubyforge -> ml link seems to be down so here is the link :
Also reproducible with
2007/11/9, Ryan Davis <ryand-ruby@zenspider.com>:
[#13305] The document of random algorithm? — sishen <yedingding@...>
Hi, guys. I want to know the detailed algorithm of random number.
[#13315] primary encoding and source encoding — David Flanagan <david@...>
I've got a couple of questions about the handling of primary encoding.
Hi,
Hi,
Hi,
Yukihiro Matsumoto wrote:
Hi,
In article <E1IqOZI-0001t7-LT@x31>,
Hi,
[#13347] http compression, zlib agnostic, for 1.9 — Hugh Sasse <hgs@...>
I have revised my http compression (gzip, deflate) patch such that
On Sat, Nov 10, 2007 at 05:28:01AM +0900, Hugh Sasse wrote:
[#13351] Keyword Arguments — Trans <transfire@...>
Peter Vanbroekhoven mentioned this to me and I have to agree. I'd
[#13362] RubyGems imported into 1.9 trunk — Eric Hodel <drbrain@...7.net>
There are a few tests breaking due to rbconfig.rb not matching what ./
On Nov 10, 2007 4:53 PM, Eric Hodel <drbrain@segment7.net> wrote:
On Nov 10, 2007, at 01:21 , Jordi wrote:
Eric,
On Nov 10, 2007, at 15:44 , David Flanagan wrote:
Eric Hodel wrote:
On Nov 11, 2007, at 22:34 , David Flanagan wrote:
[#13363] IO.read, IO#read (and similar methods) - Length Parameter Usage for Non One-Byte Encodings — Wolfgang Nádasi-Donner <ed.odanow@...>
Good morning dear Ruby folks!
[#13368] method names in 1.9 — "David A. Black" <dblack@...>
Hi --
Hi,
Hi --
Yukihiro Matsumoto wrote:
On 11/11/07, Charles Oliver Nutter <charles.nutter@sun.com> wrote:
Austin Ziegler wrote:
David Flanagan wrote:
Hi --
Quoting dblack@rubypal.com, on Mon, Nov 12, 2007 at 06:45:42AM +0900:
Hi -
On Tue, Nov 13, 2007 at 09:40:22PM +0900, David A. Black wrote:
Hi --
Summing it up:
Hi --
On Nov 12, 2007 8:42 PM, David A. Black <dblack@rubypal.com> wrote:
On 12/11/2007, David A. Black <dblack@rubypal.com> wrote:
On Sun, Nov 11, 2007 at 05:50:18PM +0900, Trans wrote:
On Nov 11, 2007 7:01 PM, Matthew Boeh <mboeh@desperance.net> wrote:
On Sun, Nov 11, 2007 at 07:06:44PM +0900, Jordi wrote:
On Nov 11, 2007 5:01 AM, Matthew Boeh <mboeh@desperance.net> wrote:
[#13377] Link errors for trunk on Mac OS X — "Lyle Johnson" <fxrubyguy@...>
Apologies in advance if this is a FAQ, but I'm trying to build the
[#13457] mingw rename — "Roger Pack" <rogerpack2005@...>
Currently for different windows' builds, the names for RUBY_PLATFORM
On Nov 12, 2007 10:13 PM, Roger Pack <rogerpack2005@gmail.com> wrote:
[#13470] trunk's parse.c fails to compile — "Laurent Sansonetti" <laurent.sansonetti@...>
Hi,
Laurent Sansonetti wrote:
Charles Oliver Nutter wrote:
[#13485] Proposal: Array#walker — Wolfgang Nádasi-Donner <ed.odanow@...>
Good morning all together!
A nicer version may be...
On Wed, 14 Nov 2007, Trans wrote:
Hugh Sasse wrote:
There is one big difference between the actual proposals and my original
[#13498] state of threads in 1.9 — Jordi <mumismo@...>
Are Threads mapped to threads on the underlying operating system in
On Nov 14, 2007, at 11:18 , Bill Kelly wrote:
On Nov 15, 2007 7:33 AM, Eric Hodel <drbrain@segment7.net> wrote:
Jordi wrote:
[#13513] Proc#hash returns different values for same body — Wolfgang Nádasi-Donner <ed.odanow@...>
Hi!
[#13528] test/unit and miniunit — Ryan Davis <ryand-ruby@...>
When is the 1.9 freeze?
On Nov 14, 2007, at 18:43 , Trans wrote:
[#13536] mswin32-vc6 segmentation fault due ruby_in_eval wrong definition — "Luis Lavena" <luislavena@...>
Summary:
Hi,
On Nov 15, 2007 12:44 PM, Nobuyoshi Nakada <nobu@ruby-lang.org> wrote:
[#13542] Iconv#iconv returning wrong object — "Dirk Traulsen" <dirk.traulsen@...>
c:\>ri Iconv#iconv
Hi,
Am 15 Nov 2007 um 21:58 hat Nobuyoshi Nakada geschrieben:
Hi,
Am 16 Nov 2007 um 17:07 hat Nobuyoshi Nakada geschrieben:
[#13564] Thoughts about Array#compact!, Array#flatten!, Array#reject!, String#strip!, String#capitalize!, String#gsub!, etc. — Wolfgang Nádasi-Donner <ed.odanow@...>
Good evening all together!
Matz has added Object.tap to Ruby 1.9 which is intended for use in
On Nov 15, 2007 8:14 PM, Wolfgang N疆asi-Donner <ed.odanow@wonado.de> wrote:
Nikolai Weibull schrieb:
Hi --
Hi --
On Nov 16, 2007 3:19 PM, David A. Black <dblack@rubypal.com> wrote:
Hi --
David A. Black wrote:
Hi --
On Nov 16, 2007 12:40 PM, David A. Black <dblack@rubypal.com> wrote:
Rick DeNatale wrote:
murphy schrieb:
Hi --
On 11/16/07, Trans <transfire@gmail.com> wrote:
On Nov 16, 2007, at 8:43 PM, Austin Ziegler wrote:
On Nov 16, 2007 12:40 PM, David A. Black <dblack@rubypal.com> wrote:
On Nov 16, 2007 3:40 AM, David A. Black <dblack@rubypal.com> wrote:
Nikolai Weibull schrieb:
[#13600] Re: [PATCH] CGI::Session::PStore partitioned directories — Tanaka Akira <akr@...>
In article <473D827F.10909@gmail.com>,
[#13614] Suggestion for native thread tests — "Eust痃uio Rangel" <eustaquiorangel@...>
Hi!
Eust痃uio Rangel wrote:
On Nov 17, 2007 2:02 PM, Charles Oliver Nutter <charles.nutter@sun.com> wrote:
On Nov 17, 2007 2:25 PM, Eust痃uio Rangel <eustaquiorangel@gmail.com> wrote:
[#13618] segfault in ostruct with 1.8.6, where to get help? — "andrew taylor" <aktxyz@...>
Hello folks, not sure if this is the right place...
run it in gdb, see if it gives you a better backtrace (?)
[#13685] Problems with \M-x in utf-8 encoded strings — Wolfgang Nádasi-Donner <ed.odanow@...>
Hi!
At 22:01 07/11/18, Wolfgang N〓dasi-Donner wrote:
Martin Duerst schrieb:
[#13688] base64.c vs. base64.rb — Trans <transfire@...>
Hi--
[#13704] Build failure trying to use rb_define_alias on rb_mKernel — "Berger, Daniel" <Daniel.Berger@...>
Hi,
[#13709] Change in system() behaviour — Dave Thomas <dave@...>
In 1.8, system("badcmd") returned false.
[#13741] retry semantics changed — Dave Thomas <dave@...>
In 1.8, I could write:
On Nov 23, 2007 12:06 PM, Dave Thomas <dave@pragprog.com> wrote:
Hi,
Hi,
Chiming in again on this...
In article <10A28D45-97EE-47EB-B98A-1B197F30C0E9@fallingsnow.net>,
In article <6168A472-3688-4D85-AAE1-49A2F376B908@fallingsnow.net>,
Dave Thomas wrote:
Charles Oliver Nutter wrote:
Hi,
Yukihiro Matsumoto wrote:
Hi,
Hi,
Dave Thomas wrote:
[#13781] C-Core-Questions — <saladin.mundi@...>
Hi guys, sorry that I'm posting into the core mailinglist, but in the talk mailinglist no one could'nt / didnt't want to give me some answers about some (basic ? ) ruby core questions.
[#13787] Syntax error when using comment between two lines in new method chain syntax — Wolfgang Nádasi-Donner <ed.odanow@...>
Hi!
[#13792] Anyone tried -r debug on OSX? — Dave Thomas <dave@...>
It hangs for me here. I have to kill -9 to stop it.
[#13805] Socket.gethostbyname and Reverse Lookups: A Strange and Terrible Saga — "Bill Kelly" <billk@...>
(with apologies to Hunter Thompson ;)
Re: Proposal of a new operator for Method and Proc
On 11/8/07, Jordi <mumismo@gmail.com> wrote:
> == The search for events ==
>
> First, the classes below are not tested and I'm just a beginner, some
> errors are took for granted. Won't affect my discourse. I wanted to
> implement a timer, looking in google the first thing you get is
> something like this:
>
> class Timer
>
> def start (timeout)
> th = Thread.new do
> loop do
> # work done by the timer
> sleep(timeout)
> end
> end
> end
> end
>
> Let's suppose I'm only using the timer to implement some kind of counter.
> Cool, BUT I would like that the work of the timer be only time
> related! and the counter be in its relevant class.
> Also I may want to reuse this class.
>
>
> So I thought about something like this
>
> class Timer
>
> def initialize (*arguments)
> connections=[]
> @arguments=arguments
> end
> def register_work ( pointer)
> connections += pointer
> end
> def deregister_work (pointer)
> connections -= pointer
> end
> def deregister_all
> connections =[]
> end
> def list
> connections.each { |l| puts "#{l}" }
> end
>
> def start (timeout)
> th = Thread.new do
> loop do
> # work done by the timer
> connections.each { |l| l.call(*@arguments) }
> sleep (timeout)
> end
> end
> end
>
> end
>
> I wrote pointer, I meant for instance Counter.count()
>
> This class is much more general and powerful.
> The work is done in the relevant classes and not inside the timer
> Also, we can register as many connected classes as we want.
>
>
> Seeing that this is Good (tm) I thought about how can I make any class use this.
> Of course I can make a class with the register, deregister and call
> thing and mixin it.
>
> But Wouldn't be could that these encapsulated connections are
> supported natively by ruby?
>
> About benefits of this scheme:
> http://doc.trolltech.com/4.3/signalsandslots.html
>
> About a comparison of implementations (going straight to the
> comparison table is better):
> http://scottcollins.net/articles/a-deeper-look-at-signals-and-slots.html
>
>
> ==The cool stuff ==
>
> I thought about how to get this feature implemented without polluting
> the most basic class of Ruby.
> I think that the most powerful and less polluting way is adding a new
> operator to Method and Proc.
>
>
> Example.
> I have a class Page, a class Timer and a class Counter. The Page
> instance is the parent of both instances of Timer and Counter.
>
> class Page
>
> def initialize
> counter = Counter.new
> t=Timer.new
>
> t.timeout -> counter.update
> counter.overrun -> show_error
>
> end
>
> end
>
> Some notes:
> We connect the timeout of the timer with the update of the counter.
> We connect the overrun of the counter with an error show by the page.
> The Timer whenever it timeouts, it just ... call to its .timeout() method.
>
> Note that the Timer class does not need to be modified to make
> something new (update the counter) . It is a real isolated software
> component.
> The same goes to the counter, it overruns and let the world know about
> it. That is its job. Don't need to know about the Page having and
> error.
>
> I proposed "->" in my ignorance. It may appear as a redirect rather
> than "something you add". Surely something else is better.
>
>
>
> With this scheme, we have a general and easy , cool, even rubyish way
> to connect to events and to connect code arbitrarily to any class
> method!
> For instance, we need to make some clean up each time we call to
> File.close() (whatever reason)
> Previous simple way
>
> def close (file)
> file.close
> @filesOpened -= 1
> end
>
> new way (in the construstor):
>
> file.close -> { @filesOpened -= 1 }
>
> { @filesOpened -= 1 } will become a Proc called when file.close
> finish. See that the implementation in C should be efficient (a list
> of pointers to functions)
>
> Now suppose that you load a new plugin that also need to do some
> cleanup when the file open by the main class is closed. When loaded it
> will add itself whatever it needs for itself.
>
>
> i feel my examples are not very good... sorry.
>
>
> == Summary ==
>
> This addition to the language isolates software components and creates
> a new very powerful construction at a very low cost.
>
>
>
>
> --
> Jordi Polo (ジョルデイ ポロ)
> 奈良先端科学技術大学院大学 情報科学研究科
> 自然言語処理学講座 D1
>
>
--
Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/
* austin@halostatue.ca * http://www.halostatue.ca/feed/
* austin@zieglers.ca
On 11/8/07, Jordi <mumismo@gmail.com> wrote:
> On Nov 8, 2007 7:03 PM, Gonzalo Garramuño <ggarra@advancedsl.com.ar> wrote:
> > Jordi wrote:
> > >
> > > class Page
> > >
> > > def initialize
> > > counter = Counter.new
> > > t=Timer.new
> > >
> > > t.timeout -> counter.update
> > > counter.overrun -> show_error
> > >
> > > end
> > >
> > > end
> > >
> >
> > You probably want to learn more about ruby blocks, procs and variable
> > scopes. Here's a way to do what you want in a ruby way.
> >
> > class Timer
> > def callback(proc = nil, &block)
> > @proc = proc || block
> > end
> >
> > # protected # but we make it public for this test
> > def timeout
> > @proc.call if @proc
> > end
> > end
> >
> > class Page
> > def show_error
> > end
> >
> > def initialize
> > @counter = 0
> > t = Timer.new
> >
> > t.callback { @counter += 1 }
> > t.timeout
> >
> > # or...
> > t.callback( method(:show_error) )
> > t.timeout
> > end
> > end
> >
> > You also probably want to discuss this sort of stuff in ruby-talk until
> > you are more familiar with ruby.
> >
>
>
> As I said I'm not familiar with the syntaxis (my classes may have
> errors) but I am do familiar with the semantics (I think I pretty
> understand "rubyism").
>
> Your class have a number of problems comparing with my solution. It is
> similar to the second solution I gave.
>
> - You must add that special method callback everytime. Of course you
> can make an special class for that and use mixins ...
> - You can only register one "signal" . My solution can have an
> arbitrary number.
> - You are adding a new method to every class
>
>
> I would like to extend my proposal to disconnection:
>
> t.timeout -> counter.update to connect
> I can't imagine a cool operator to mean disconnect (x is graphically
> perfect though)
>
>
> An alternative proposal, more Qt-like (see reference links in the
> first email) and more verbose:
>
> Method or Proc.connect (Method or Proc)
> Method or Proc.disconnect (Method or Proc)
>
> Or a connect and disconnect in Object but I would really won't like to
> pollute it (Object has "send" method though, it is much like half of
> what I need for the connection).
>
>
--
Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/
* austin@halostatue.ca * http://www.halostatue.ca/feed/
* austin@zieglers.ca
On 11/8/07, Jordi <mumismo@gmail.com> wrote:
> As I said I'm not familiar with the syntaxis (my classes may have
> errors) but I am do familiar with the semantics (I think I pretty
> understand "rubyism").
Given your comments, I'm not sure that this is as clear as you think. As
an example, you use "t.timeout" to represent the timeout of the timer,
but there's nothing defined for this. "t.timeout" means sending the
#timeout message to object "t"; it doesn't mean anything to do with some
timeout (or @timeout) variable.
Why does this matter? Well:
> Your class have a number of problems comparing with my solution. It is
> similar to the second solution I gave.
>
> - You must add that special method callback everytime. Of course you
> can make an special class for that and use mixins ...
You can make a mixin that has such registrations, but you then have to
indicate how signals will be raised.
> - You can only register one "signal" . My solution can have an
> arbitrary number.
Implementation detail. You don't have to have a single callback
function; you can use a callback function array.
> - You are adding a new method to every class
Less of a problem than you think.
Your proposal doesn't actually suggest how these things would *work* --
how do you implement the slots and signals in general? You need to look
at this a bit deeper and see that there are already analagous things --
like Gonzalo's example of callback functions -- that can be done without
adding ugly syntax to Ruby.
class Timer
def initialize(timeout)
@callbacks = []
@timeout = timeout
end
def register(cb)
@callbacks << cb
end
def unregister(cb)
@callbacks.delete(cb)
end
def clear_callbacks
@callbacks.clear
end
def start(*args)
th = Thread.new do
loop do
sleep(@timeout)
@callbacks.each { |cb| cb.call(*args) }
end
end
end
end
class Counter
attr_reader :value
def initialize(start = 0, max = nil)
@value = start.to_i
@callbacks = []
@max = max
end
def increment
@value += 1
@callbacks.each { |cb| cb.call } if @value > @max
end
def register(cb)
@callbacks << cb
end
def unregister(cb)
@callbacks.delete(cb)
end
def clear_callbacks
@callbacks.clear
end
end
class Page
def show_error; end
def initialize
@counter = Counter.new
@timer = Timer.new
@timer.register(lambda { @counter.update })
@counter.register(lambda { this.show_error })
end
end
Where you call a callback isn't able to be generalized.
-austin
--
Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/
* austin@halostatue.ca * http://www.halostatue.ca/feed/
* austin@zieglers.ca