[#80974] [Ruby trunk Feature#13517] [PATCH] reduce rb_mutex_t size from 160 to 80 bytes on 64-bit — ko1@...
Issue #13517 has been updated by ko1 (Koichi Sasada).
4 messages
2017/05/02
[#81024] Re: [Ruby trunk Feature#13517] [PATCH] reduce rb_mutex_t size from 160 to 80 bytes on 64-bit
— SASADA Koichi <ko1@...>
2017/05/07
sorry for late response.
[#80996] [Ruby trunk Feature#13544] Allow loading an ISeqs sequence directly from a C extension without requiring buffer is in an RVALUE — sam.saffron@...
Issue #13544 has been reported by sam.saffron (Sam Saffron).
3 messages
2017/05/04
[#81016] [Ruby trunk Bug#13526] Segmentation fault at 0x0055c2e58e8920 ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux] — s.wanabe@...
Issue #13526 has been updated by wanabe (_ wanabe).
3 messages
2017/05/07
[#81048] Re: [ruby-cvs:65788] normal:r58614 (trunk): rb_execution_context_t: move stack, stack_size and cfp from rb_thread_t — SASADA Koichi <ko1@...>
It causes compile error on raspi 3.
3 messages
2017/05/09
[#81201] Re: [ruby-cvs:65935] normal:r58761 (trunk): test/test_extilibs.rb: do not check the existence of fiddle — "U.NAKAMURA" <usa@...>
Hi, Eric
4 messages
2017/05/16
[#81202] Re: [ruby-cvs:65935] normal:r58761 (trunk): test/test_extilibs.rb: do not check the existence of fiddle
— Eric Wong <normalperson@...>
2017/05/16
"U.NAKAMURA" <usa@garbagecollect.jp> wrote:
[#81427] Fwd: [ruby-changes:46809] normal:r58924 (trunk): test for IO.copy_stream CPU usage (r58534) — SASADA Koichi <ko1@...>
Hi,
6 messages
2017/05/28
[#81428] Re: Fwd: [ruby-changes:46809] normal:r58924 (trunk): test for IO.copy_stream CPU usage (r58534)
— Eric Wong <normalperson@...>
2017/05/28
SASADA Koichi <ko1@atdot.net> wrote:
[ruby-core:81153] [Ruby trunk Feature#10548] remove callcc (Callcc is now going obsoleted. Please use Fiber.)
From:
eregontp@...
Date:
2017-05-14 10:25:13 UTC
List:
ruby-core #81153
Issue #10548 has been updated by Eregon (Benoit Daloze).
jphelps (Jeremy Phelps) wrote:
> Eregon, I have no idea what you're talking about. All the examples of Fiber usage over on ruby-doc.org shows identical behavior to Python's yield statement. The only difference is that in Python, "resume" is spelled "next", and you can iterate over the sequence of return values (just a monkey patch away with Fibers). Oh, and the way Python handles a dead generator is different (you start getting void instead of an exception).
Then look for other examples than just the ones in the documentation.
The fact that Fibers have a stack means Fiber.yield can be called anywhere during the Fiber execution, including in deeply nested method calls, while Python and JavaScript generators are lexically bound and restricted to only call "yield" in the generator function and not deeper. Try to reproduce this in Python:
~~~ ruby
def powers_of(x, max)
n = x
while n < max
Fiber.yield(n)
n *= x
end
end
def powers_of_range(range, max)
range.each { |x| powers_of(x, max) }
end
f = Fiber.new do
powers_of_range(2..4, 100)
raise StopIteration
end
loop {
p f.resume
}
~~~
It's possible, but you either have to manually inline the two methods, or use multiple generators instead of just one Fiber here.
For a more interesting usage of Fiber see https://www.igvita.com/2010/03/22/untangling-evented-code-with-ruby-fibers/ for example.
----------------------------------------
Feature #10548: remove callcc (Callcc is now going obsoleted. Please use Fiber.)
https://bugs.ruby-lang.org/issues/10548#change-64805
* Author: tarui (Masaya Tarui)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
----------------------------------------
We are paying a lot of costs for callcc's consistency.
and currently, we can use Fiber in many situation.
In https://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20140517Japan,
matz agreed to remove callcc.
If there is no refutation, remove callcc in the future version.
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>