[#78949] [Ruby trunk Feature#13095] [PATCH] io.c (rb_f_syscall): remove deprecation notice — kosaki.motohiro@...
Issue #13095 has been updated by Motohiro KOSAKI.
3 messages
2017/01/03
[#78997] [Ruby trunk Bug#13110] Byte-based operations for String — shugo@...
Issue #13110 has been updated by Shugo Maeda.
3 messages
2017/01/06
[#79228] Re: [ruby-cvs:64576] naruse:r57410 (trunk): Prevent GC by volatile [Bug #13150] — Eric Wong <normalperson@...>
naruse@ruby-lang.org wrote:
5 messages
2017/01/23
[#79511] Re: [ruby-cvs:64576] naruse:r57410 (trunk): Prevent GC by volatile [Bug #13150]
— Eric Wong <normalperson@...>
2017/02/13
Eric Wong <normalperson@yhbt.net> wrote:
[#79518] Re: [ruby-cvs:64576] naruse:r57410 (trunk): Prevent GC by volatile [Bug #13150]
— Nobuyoshi Nakada <nobu@...>
2017/02/13
On 2017/02/13 10:04, Eric Wong wrote:
[#79298] [Ruby trunk Bug#13085][Assigned] io.c io_fwrite creates garbage — nobu@...
Issue #13085 has been updated by Nobuyoshi Nakada.
3 messages
2017/01/29
[#79337] Re: [ruby-changes:45397] normal:r57469 (trunk): io.c: recycle garbage on write — SASADA Koichi <ko1@...>
Eric:
4 messages
2017/01/31
[#79352] Re: [ruby-changes:45397] normal:r57469 (trunk): io.c: recycle garbage on write
— Eric Wong <normalperson@...>
2017/01/31
SASADA Koichi <ko1@atdot.net> wrote:
[ruby-core:79219] [Ruby trunk Feature#6284] Add composition for procs
From:
t.hirsch@...
Date:
2017-01-22 18:50:45 UTC
List:
ruby-core #79219
Issue #6284 has been updated by Thorsten Hirsch.
fyi: Composing procs is way faster now. It beats all other algorithms in Paul's benchmark on ruby 2.3.3:
~~~
Warming up --------------------------------------
composing procs 135.483k i/100ms
chaining procs 55.595k i/100ms
single proc 84.448k i/100ms
nested proc 48.095k i/100ms
Calculating -------------------------------------
composing procs 2.363M (賊 6.2%) i/s - 11.787M in 5.011859s
chaining procs 701.936k (賊 3.4%) i/s - 3.558M in 5.074972s
single proc 1.207M (賊 3.6%) i/s - 6.080M in 5.044891s
nested proc 579.005k (賊 2.9%) i/s - 2.934M in 5.071310s
Comparison:
composing procs: 2362658.0 i/s
single proc: 1206768.2 i/s - 1.96x slower
chaining procs: 701936.2 i/s - 3.37x slower
nested proc: 579005.4 i/s - 4.08x slower
~~~
Tested on linux and macOS (same result).
----------------------------------------
Feature #6284: Add composition for procs
https://bugs.ruby-lang.org/issues/6284#change-62636
* Author: Pablo Herrero
* Status: Feedback
* Priority: Normal
* Assignee: Yukihiro Matsumoto
* Target version:
----------------------------------------
=begin
It would be nice to be able to compose procs like functions in functional programming languages:
to_camel = :capitalize.to_proc
add_header = ->val {"Title: " + val}
format_as_title = add_header << to_camel << :strip
instead of:
format_as_title = lambda {|val| "Title: " + val.strip.capitalize }
It's pretty easy to implement in pure ruby:
class Proc
def << block
proc { |*args| self.call( block.to_proc.call(*args) ) }
end
end
=end
---Files--------------------------------
0001-proc.c-Implement-Proc-for-Proc-composition.patch (3.65 KB)
0002-proc.c-Implement-Method-for-Method-composition.patch (2.67 KB)
0003-proc.c-Support-any-callable-when-composing-Procs.patch (3.97 KB)
--
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>