[#25272] [Feature #2032] Change the license to "GPLv2+ or Ruby's original". — Yui NARUSE <redmine@...>

Feature #2032: Change the license to "GPLv2+ or Ruby's original".

51 messages 2009/09/02
[#25368] [Feature #2032] Change the license to "GPLv2+ or Ruby's original". — Kazuhiko Shiozaki <redmine@...> 2009/09/04

Issue #2032 has been updated by Kazuhiko Shiozaki.

[#25461] Re: [Feature #2032] Change the license to "GPLv2+ or Ruby's original". — Gregory Brown <gregory.t.brown@...> 2009/09/07

On Fri, Sep 4, 2009 at 1:10 PM, Kazuhiko Shiozaki<redmine@ruby-lang.org> wrote:

[#25463] Re: [Feature #2032] Change the license to "GPLv2+ or Ruby's original". — Yukihiro Matsumoto <matz@...> 2009/09/08

Hi,

[#30610] [Feature #2032] Change the license to "GPLv2+ or Ruby's original". — Shyouhei Urabe <redmine@...> 2010/06/06

Issue #2032 has been updated by Shyouhei Urabe.

[#30611] Re: [Feature #2032] Change the license to "GPLv2+ or Ruby's original". — Yusuke ENDOH <mame@...> 2010/06/06

Hi,

[#30614] Re: [Feature #2032] Change the license to "GPLv2+ or Ruby's original". — Urabe Shyouhei <shyouhei@...> 2010/06/06

> To avoid enbugging a new bug, we must choose the another solutions.

[#30616] Re: [Feature #2032] Change the license to "GPLv2+ or Ruby's original". — Yusuke ENDOH <mame@...> 2010/06/06

2010/6/6 Urabe Shyouhei <shyouhei@ruby-lang.org>:

[#30652] Re: [Feature #2032] Change the license to "GPLv2+ or Ruby's original". — Urabe Shyouhei <shyouhei@...> 2010/06/08

(2010/06/06 20:27), Yusuke ENDOH wrote:

[#25285] [Feature #2033] Move Core Development to Git — Run Paint Run Run <redmine@...>

Feature #2033: Move Core Development to Git

75 messages 2009/09/02
[#25290] [Feature #2033] Move Core Development to Git — Yui NARUSE <redmine@...> 2009/09/02

Issue #2033 has been updated by Yui NARUSE.

[#25297] Re: [Feature #2033] Move Core Development to Git — Jon <jon.forums@...> 2009/09/02

> Some commiter of Ruby live on Windows.

[#25342] Re: [Feature #2033] Move Core Development to Git — Urabe Shyouhei <shyouhei@...> 2009/09/03

Jon wrote:

[#25343] Re: [Feature #2033] Move Core Development to Git — Michal Suchanek <hramrach@...> 2009/09/03

2009/9/4 Urabe Shyouhei <shyouhei@ruby-lang.org>:

[#25345] Re: [Feature #2033] Move Core Development to Git — Urabe Shyouhei <shyouhei@...> 2009/09/03

Michal Suchanek wrote:

[#25299] Re: [Feature #2033] Move Core Development to Git — Eric Hodel <drbrain@...7.net> 2009/09/02

On Sep 2, 2009, at 11:19, Run Paint Run Run wrote:

[#25306] [Feature #2034] Consider the ICU Library for Improving and Expanding Unicode Support — Run Paint Run Run <redmine@...>

Feature #2034: Consider the ICU Library for Improving and Expanding Unicode Support

16 messages 2009/09/03

[#25394] Unmaintained code (Was: Move Core Development to Git) — Eric Hodel <drbrain@...7.net>

On Sep 4, 2009, at 02:16, Urabe Shyouhei wrote:

10 messages 2009/09/05

[#25420] [Bug #2054] Onigurma Isn't Documented — Run Paint Run Run <redmine@...>

Bug #2054: Onigurma Isn't Documented

17 messages 2009/09/05

[#25442] turning off indentation warnings — Aaron Patterson <aaron@...>

Is there a way in 1.9 to turn off only indentation warnings? I like

19 messages 2009/09/06
[#25510] Re: turning off indentation warnings — Nobuyoshi Nakada <nobu@...> 2009/09/10

Hi,

[#25511] [Bug #2079] win32ole's OLEGEN does not create all classes needed when a TLB has more than one class defined — Bruno Antunes <redmine@...>

Bug #2079: win32ole's OLEGEN does not create all classes needed when a TLB has more than one class defined

18 messages 2009/09/10

[#25644] [Bug #2121] mathn/rational destroys Fixnum#/, Fixnum#quo and Bignum#/, Bignum#quo — Charles Nutter <redmine@...>

Bug #2121: mathn/rational destroys Fixnum#/, Fixnum#quo and Bignum#/, Bignum#quo

12 messages 2009/09/19

[#25709] [Bug #2131] f(not x) => syntax error — "James M. Lawrence" <redmine@...>

Bug #2131: f(not x) => syntax error

16 messages 2009/09/22

[#25769] A challenge: Enumerator#next in JRuby — Charles Oliver Nutter <headius@...>

I have a challenge for anyone who wants to discuss, propose

25 messages 2009/09/25
[#25782] Re: A challenge: Enumerator#next in JRuby — Tanaka Akira <akr@...> 2009/09/26

In article <f04d2210909251312q46bd51c0teacc4b0a8c417f0c@mail.gmail.com>,

[#25820] [Feature #2152] Split functionality of Float#inspect and Float#to_s — Roger Pack <redmine@...>

Feature #2152: Split functionality of Float#inspect and Float#to_s

32 messages 2009/09/28

[#25853] [Bug #2160] JSON can't parse input where top-level object is a string — caleb clausen <redmine@...>

Bug #2160: JSON can't parse input where top-level object is a string

11 messages 2009/09/29

[ruby-core:25770] Re: A challenge: Enumerator#next in JRuby

From: Charles Oliver Nutter <headius@...>
Date: 2009-09-25 20:29:08 UTC
List: ruby-core #25770
It's also worth mentioning that this is going to be a problem for
*all* implementations that can't or don't want to juggle the call
stack. IronRuby will be in the "can't" column. MacRuby and Rubinius
are probably in the "don't want to" column. Other implementations on
runtimes without stack access or continuations will not be able to
support Enumerator#next easily (or at all?).

- Charlie

On Fri, Sep 25, 2009 at 3:18 PM, Charles Oliver Nutter
<headius@headius.com> wrote:
> I have a challenge for anyone who wants to discuss, propose
> suggestions, or help us fix this problem.
>
> Ruby 1.8.7 added the ability to "next" your way through an Enumerator.
> At a glance, this seems fine; it's just external enumeration. The
> problem, however, is that enumeration can be arbitrarily complex.
>
> Take this code for example:
>
> class Foo
> =C2=A0def each
> =C2=A0 =C2=A05.times {|i| yield i}
> =C2=A0end
> end
>
> enum =3D Foo.new.to_enum
> puts enum.next # =3D> 0
> puts enum.next # =3D> 1
>
> What's actually happening here?
>
> to_enum creates a new Enumerator to wrap our Foo type. All it requires
> is that an "each" be implemented. The Enumerator then uses each to
> perform iterations for collect, select, etc. In those cases, you're
> really just deferring the call to #collect until a later time, and
> enumeration proceeds as normal with #collect running until #each has
> completed. But the "next" case is different.
>
> With "next", we have a more complicated situation: enumeration
> *pauses* after each element. Here's how things work when using
> Enumerator#next
>
> 1. On the first call to #next, a fiber or generator is spun up to
> start the call to each, similar to this:
> f =3D Fiber.new { collection.each {|i| Fiber.yield i} }
> 2. For each element next returns, the fiber/generator is invoked to
> produce the next result
> def next
> =C2=A0f.resume
> end
> 3. When the enumeration completes (or at any time) you can rewind and
> start from the beginning.
>
> In Ruby 1.8.7 and Ruby 1.9, this is implemented using continuations
> (delimited continuations, i.e. Fibers or coroutines), making it
> dreadfully slow to "next" your way through a collection. On JRuby,
> because there's an in-progress #each we have to pause for every
> element, Enumerator#next has to spin up a *new native thread*. Each
> #next call then pings the thread to produce a new result.
>
> Functionally, this works just fine, other than the cost of us spinning
> up a thread. But there's a larger problem: an Enumerator-created
> thread has a full lifecycle apart from the caller's thread. As a
> result the enumerator thread can root objects (preventing them from
> being GCed), including the Enumerator itself.
>
> So the small problem with Enumerator#next is that it's slow on MRI
> because of continuations and slow on JRuby because of native threads.
> But on JRuby, we have the additional large problem of managing the
> associated thread and making sure it doesn't live forever if you don't
> complete an enumeration.
>
> Bottom line is that Enumerator#next is a real problem for JRuby. I
> hope it's not going to be impossible to support, but at this point the
> path forward is unclear.
>
> Here's the options as I see them:
>
> 1. Soldier on, attempting to find a way to use native thread for
> Enumerator#next without rooting objects, etc
> 2. Support Enumerator#next only on core types where we know how to do
> enumeration without #each
> 3. Provide a way to cancel an enumeration, so implementations like
> JRuby will know when to forcibly end the fiber/thread
> 4. Require that along with "each", arbitrary collection types must
> implement "to_enum" to avoid requiring fibers/continuations in all
> Ruby impls
> 5. Not support Enumerator#next in JRuby at all
>
> Obviously we want to avoid #5, and ideally #3 as well. We don't want
> to stand in the way of 1.8.7 (and 1.9.2) adoption, but without a
> satisfactory solution to this problem JRuby may have a crippled
> Enumerator#next implementation, making it less reliable across
> implementations.
>
> - Charlie
>
>

In This Thread