Project

General

Profile

Activity

From 04/26/2018 to 05/02/2018

05/02/2018

11:52 PM Bug #14713: <internal:prelude>:132:in `__write_nonblock': Protocol wrong type for socket (Errno::EPROTOTYPE)
Thanks for solving this problem. Your patch was much more thorough.
Any change to back port this?
ioquatix (Samuel Williams)
11:36 PM Feature #13618: [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
> I don't care for those rigid definitions. They're all just
> ...
Personally, I find the definitions very useful, and there are good rigid definitions for those terms.
> yahns is designed to deal with apps with both slow and fast
>...
ioquatix (Samuel Williams)
11:03 AM Feature #13618: [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
samuel@oriontransfer.org wrote:
> I found an interesting summary of EPOLLET, which I think explains it better than I did: https://stackoverflow.com/a/46634185/29381 Basically, it minimise OS IPC.

Minimize syscalls, you mean. I comp...
normalperson (Eric Wong)
08:38 AM Feature #13618: [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
I found an interesting summary of EPOLLET, which I think explains it better than I did: https://stackoverflow.com/a/46634185/29381 Basically, it minimise OS IPC.
> According to Go user reports, being able to move goroutines
> ...
By ...
ioquatix (Samuel Williams)
08:04 AM Feature #13618: [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
samuel@oriontransfer.org wrote:
> So, it seems like your design has unavoidable contention (and
> therefore latency) because you need to send events between
> threads, which is what I expected. However, you argue this
> overhead sho...
normalperson (Eric Wong)
05:20 AM Feature #13618: [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
Thanks for the detailed information.
So, it seems like your design has unavoidable contention (and therefore latency) because you need to send events between threads, which is what I expected. However, you argue this overhead should b...
ioquatix (Samuel Williams)
11:22 PM Bug #14732: CGI.unescape returns different instance between Ruby 2.3 and 2.4
> > https://bugs.ruby-lang.org/issues/14732

r63328 This also affects 2.3 for unescapeHTML.
normalperson (Eric Wong)
11:19 PM Bug #14732 (Closed): CGI.unescape returns different instance between Ruby 2.3 and 2.4
Applied in changeset trunk|r63328.
----------
ext/cgi/escape: preserve String subclass in result
* ext/cgi/escape/escape.c (optimized_escape_html): use rb_str_new_with_class
(optimized_unescape_html): ditto
(optimized_escape): ditt...
normalperson (Eric Wong)
11:04 PM Bug #14732: CGI.unescape returns different instance between Ruby 2.3 and 2.4
me@jnito.com wrote:
> Bug #14732: CGI.unescape returns different instance between Ruby 2.3 and 2.4
> https://bugs.ruby-lang.org/issues/14732

Fixing...
normalperson (Eric Wong)
09:42 PM Bug #14732 (Closed): CGI.unescape returns different instance between Ruby 2.3 and 2.4
In Ruby 2.3, CGI.unescape always returns String object:
~~~ ruby
$ ruby -v -rcgi/util -e 'class S < String; end; puts CGI.unescape(S.new("a")).class'
ruby 2.3.6p384 (2017-12-14 revision 61254) [x86_64-darwin17]
String
~~~
But...
jnchito (Junichi Ito)
11:18 PM Revision 6afea140 (git): ext/cgi/escape: preserve String subclass in result
* ext/cgi/escape/escape.c (optimized_escape_html): use rb_str_new_with_class
(optimized_unescape_html): ditto
(optimized_escape): ditto
(optimized_unescape): ditto
* test/cgi/test_cgi_util.rb (test_escape_string_subclass): new test...
Eric Wong
09:24 PM Bug #10212: MRI is not for lambda calculus
mvasin (Mikhail Vasin) wrote:
> Ruby is manifested as a multi-paradigm language, but recursion and lambdas are way too slow to actually use it in a functional style...
BTW, running this with Ruby's trunk --jit gives 3.2s at me vs 10s...
Eregon (Benoit Daloze)
08:16 AM Bug #10212: MRI is not for lambda calculus
This code
```
def fib(x)
return x if x == 0 || x == 1
fib(x-1) + fib(x-2)
end
t = Time.now; fib(40); puts Time.now - t
```
Runs 13,36 seconds on my machine. So lambda is 3 times slower. Does it have to be that slower?
...
mvasin (Mikhail Vasin)
02:12 AM Bug #10212: MRI is not for lambda calculus
On 2018/05/02 2:02, michaelvasin@gmail.com wrote:
> One can think that JavaSscript is 35,5 times faster then Ruby...

Ruby has method and it is faster than using lambda. However, it is only
x2 faster so that we have many area to im...
ko1 (Koichi Sasada)
09:16 PM Feature #14724: chains of inequalities
gotoken (Kentaro Goto) wrote:
> 1. if a non-boolean is returned, treats the rest of chain in the compatible manner.
> ...
I think (1) is too magic and not consistent.
What if < could return legitimately a boolean or something else? Th...
Eregon (Benoit Daloze)
02:10 PM Feature #14724: chains of inequalities
> And implementing it even for other operators would silently break
> ...
I do not know how matz will decide; I personally am neutral here. I
really have no problem either way.
I think it may be discussed at the next meeting; Martin...
shevegen (Robert A. Heiler)
01:53 PM Feature #14724: chains of inequalities
I heard non-comparison use of `#<` in shell.rb http://ruby-doc.org/stdlib-2.5.0/libdoc/shell/rdoc/Shell.html#class-Shell-label-Pipe+-2Fetc-2Fprintcap+into+a+file
that uses `<` and `>` for redirection. For example a file copy from src.tx...
gotoken (Kentaro Goto)
01:49 PM Feature #14724: chains of inequalities
graywolf (Gray Wolf) wrote:
> Just pointing out that this would be a breaking change since
> ...
Thanks for pointing out. In this request, I intended only four inequality operators `<`, `>`, `<=` and `>=`. Sorry for confusing. I don't ...
gotoken (Kentaro Goto)
01:48 PM Feature #14724: chains of inequalities
duerst (Martin Dürst) wrote:
> Mentioned at #14698 (DevelopersMeeting20180517Japan). Fixed subject.
Thanks for cheking it out and giving correct subject. Yes, the inequation is a declarative one.
gotoken (Kentaro Goto)
07:28 AM Feature #14724: chains of inequalities
if `x <= y <=z` is expanded to `(x <= y) && (y <= z)`
then if (x <= y) would return something else than boolean, we are **doomed**
PS:
also `(x..z) === y` is a current solution
Hanmac (Hans Mackowiak)
07:17 AM Feature #14724: chains of inequalities
phluid61 (Matthew Kerwin) wrote:
> No, not breaking existing code; but removing a syntax error introduces the chance of certain types of mistakes being missed. Mangle a merge, or bump backspace, and what would have been a syntax error ...
graywolf (Gray Wolf)
07:13 AM Feature #14724: chains of inequalities
I don't think this can be reasonably implemented. Implementing it as it is now ("chains of inequalities") would be way too confusing. I mean, why should `a < b < c` evaluate as `(a < b) && (b < c)` while `a < b || c` evaluate as `(a < b)... graywolf (Gray Wolf)
02:05 AM Feature #14724: chains of inequalities
shan (Shannon Skipper) wrote:
>
> ...
Yes, a fair chunk of my professional life is taken up with reading, analysing, debugging, and refactoring others' code. The more weird ways people have of doing things, the harder it can be to un...
phluid61 (Matthew Kerwin)
09:03 PM Feature #14718: Use jemalloc by default?
mperham@gmail.com wrote:
> An alternative is to tune glibc by reducing the number of arenas. Call this on startup:
>
> #include "malloc.h"
> mallopt(M_ARENA_MAX, 2)

Probably acceptable. We need to verify it doesn't cras...
normalperson (Eric Wong)
05:31 PM Feature #14718: Use jemalloc by default?
Blog post this morning on the massive improvements from jemalloc for one heavy Ruby user:
https://brandonhilkert.com/blog/reducing-sidekiq-memory-usage-with-jemalloc/
An alternative is to tune glibc by reducing the number of arenas...
mperham (Mike Perham)
04:27 PM Revision d54e2286 (git): test_jit.rb: test local variables
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e k0kubun (Takashi Kokubun)
04:04 PM Revision db8e9558 (git): test_jit.rb: test opt_aref_with again
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e k0kubun (Takashi Kokubun)
03:41 PM Revision f15ce493 (git): test_jit.rb: make it possible to automatically find
untested insns. Resolved some warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
k0kubun (Takashi Kokubun)
03:16 PM Bug #14729: Float("long_invalid_string") fails to throw an exception
shevegen (Robert A. Heiler) wrote:
> I think that particular reasoning is incorrect in regards to underscores, as
> ...
Underscores are treated differently with to_f and Float - they are not just stripped out of the string.
to_f nev...
samiam (Sam Napolitano)
03:13 PM Bug #14731 (Closed): Float() ignores exponent in long string
Applied in changeset trunk|r63322.
----------
object.c: fix exponent with underscore
* object.c (rb_cstr_to_dbl_raise): do not ignore exponent part
when the input string longer than internal buffer contains
underscore(s). [ruby-co...
nobu (Nobuyoshi Nakada)
01:32 PM Bug #14731 (Closed): Float() ignores exponent in long string
Related to #14729:
```ruby
Float("1."+"00000"*Float::DIG+"0e10") #=> 10000000000.0
Float("1."+"00000"*Float::DIG+"_0e10") #=> 1.0
```
nobu (Nobuyoshi Nakada)
03:12 PM Revision 41dc02c6 (git): * 2018-05-03
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
03:12 PM Revision d48efc4c (git): test_jit.rb: verify tested insns
and fix some untested insns
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
k0kubun (Takashi Kokubun)
01:55 PM Bug #14730: [MJIT] lambda stack consistency error
confirmed, thanks ahorek (Pavel Rosický)
01:01 PM Bug #14730 (Closed): [MJIT] lambda stack consistency error
Thanks for a very good bug report. I fixed this bug in r63320. Please confirm that.
I have some ideas to systematically prevent similar bugs. I'll fix so later.
k0kubun (Takashi Kokubun)
01:37 PM Revision 85370712 (git): object.c: fix exponent with underscore
* object.c (rb_cstr_to_dbl_raise): do not ignore exponent part
when the input string longer than internal buffer contains
underscore(s). [ruby-core:86836] [Bug #14731]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63322 b2dd03c...
nobu (Nobuyoshi Nakada)
01:11 PM Revision 2af97e03 (git): test_jit.rb: add missing dependency
The test works with make test-all, but I sometimes want to do a thing like:
`.ruby-svn/ruby -Itest/lib test/ruby/test_jit.rb -n test_clean_so`
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
k0kubun (Takashi Kokubun)
12:57 PM Bug #14561: Consistent 2.5.0 seg fault in GC, related to accessing an enumerator in a thread
By the way, it only happened once. Re-running the same spec several more times didn't generate any further odd output. ioquatix (Samuel Williams)
12:56 PM Bug #14561: Consistent 2.5.0 seg fault in GC, related to accessing an enumerator in a thread
I don't know if this is related or not, but I just now saw a very odd error.
```
Traceback (most recent call last):
7: from /Users/samuel/.rvm/gems/ruby-2.5.0/gems/async-1.8.0/lib/async/task.rb:74:in `block in initialize'
6: from...
ioquatix (Samuel Williams)
12:55 PM Revision 14a3499c (git): compile.c: mark catch_except_p of iseq
which has throw insn, not only ancestor iseqs of it.
I think we should remove catch_except_p flag and try to simplify the
catch table itself, to prevent similar bugs in the future.
test_jit.rb: add test to prevent the bug
git-svn-id: s...
k0kubun (Takashi Kokubun)
10:06 AM Bug #14714: Ruby 2.5.1 Segmentation Fault in GC
I also tried to isolate my vips-related code in a new Ruby program, and ran it 100 times with `GC.stress = true`, without being able to reproduce. renchap (Renaud Chaput)
09:10 AM Bug #14728: OptionParser takes other options as argument values
nobu (Nobuyoshi Nakada) wrote:
> If `--custom` with no argument is allowed, it is not "MANDATORY".
> ...
`--custom` with no argument is not allowed, hence an error would be ideal in the above scenario.
xz0r (xz0r xz0r)
08:22 AM Feature #14723: [WIP] sleepy GC
sam.saffron@gmail.com wrote:
> require 'benchmark/ips'

> So this moves us from 200-210 ops/s to 240 ops/s. This is a
> major perf boost, still to see if it holds on the full
> Discourse bench, but I expect major improvements cause...
normalperson (Eric Wong)
06:33 AM Feature #14723: [WIP] sleepy GC
On 2018/05/02 14:00, Eric Wong wrote:
> I also added some benchmarks, but I'm not sure if dependency on
> /dev/urandom is good because performance across machines and
> kernel configuration can be very different.

Sam's report?
Sa...
ko1 (Koichi Sasada)
05:19 AM Feature #14723: [WIP] sleepy GC
I can confirm this has a MAJOR benefit for particular workloads with the pg gem. In particular if you are using async_exec (which most of us should)
```
require 'pg'
require 'benchmark/ips'
$conn = PG.connect(dbname: 'postgres')
...
sam.saffron (Sam Saffron)
05:04 AM Feature #14723: [WIP] sleepy GC
Koichi Sasada <ko1@atdot.net> wrote:
> On 2018/05/02 13:08, Eric Wong wrote:
> >Sure. Should I commit after adding "else" to mutex_lock?
>
> I want to ask to introduce "disable" macro (like USE_RGENGC) to measure
> impact on this...
normalperson (Eric Wong)
04:22 AM Feature #14723: [WIP] sleepy GC
On 2018/05/02 13:08, Eric Wong wrote:
> Sure. Should I commit after adding "else" to mutex_lock?

I want to ask to introduce "disable" macro (like USE_RGENGC) to measure
impact on this technique (and disable to separate issues). P...
ko1 (Koichi Sasada)
04:12 AM Feature #14723: [WIP] sleepy GC
Koichi Sasada <ko1@atdot.net> wrote:
> OK. I assumed that this "step" API is used with "rb_gc_inprogress()". But it
> is not correct.

Right, inprogress is only a hint. I will add a comment to that effect.
As with ppoll + read, th...
normalperson (Eric Wong)
03:52 AM Feature #14723: [WIP] sleepy GC
On 2018/05/02 11:49, Eric Wong wrote:
> I fetch and run "git diff" locally which gives me many options
>
> REMOTE=80x24
> git remote add $REMOTE git://80x24.org/ruby.git
> git fetch $REMOTE
> git diff $OLD $NEW
>
> $OLD and $N...
ko1 (Koichi Sasada)
02:52 AM Feature #14723: [WIP] sleepy GC
Koichi Sasada <ko1@atdot.net> wrote:
> On 2018/05/01 17:46, Eric Wong wrote:
> >Individual patches available at:
> >https://80x24.org/spew/20180501080844.22751-2-e@80x24.org/raw
> >https://80x24.org/spew/20180501080844.22751-3-e@80x...
normalperson (Eric Wong)
02:22 AM Feature #14723: [WIP] sleepy GC
On 2018/05/01 17:46, Eric Wong wrote:
> Individual patches available at:
> https://80x24.org/spew/20180501080844.22751-2-e@80x24.org/raw
> https://80x24.org/spew/20180501080844.22751-3-e@80x24.org/raw
> https://80x24.org/spew/201805...
ko1 (Koichi Sasada)
02:07 AM Revision 0d492003 (git): common.mk: Update dependencies on tool/ruby_vm scripts
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e mame (Yusuke Endoh)
12:57 AM Revision 18c40b16 (git): tool/ruby_vm/views/_insn_name_info.erb: Auto-detect the longest insn name
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e mame (Yusuke Endoh)
12:57 AM Revision 8bfc46a1 (git): iseq.c (rb_iseq_disasm_insn): Change the width of insn names
Currently "trace_opt_send_without_block" (28 letters) is the longest
insn.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
mame (Yusuke Endoh)

05/01/2018

11:47 PM Feature #14724: chains of inequalities
phluid61 (Matthew Kerwin) wrote:
> shan (Shannon Skipper) wrote:
> ...
How does this patch make things harder for experienced programmers? Reading the new syntax that others have written? I don't see that as much of a hurdle (TIMTOWTDI...
shan (Shannon Skipper)
10:03 PM Feature #14724: chains of inequalities
shan (Shannon Skipper) wrote:
> I've often seen new Rubyists try this syntax intuitively. I think this is a really nice change. +1
-1
I've seen beginners write all sorts of things. This makes it harder for experienced programmers....
phluid61 (Matthew Kerwin)
08:15 PM Feature #14724: chains of inequalities
If it works for classes you might have just allowed for some fun stuff like this:
```ruby
class Proc
def >=(o)
-> *as { o[self[*as]] }
end
end
a2 = -> a { a+2 }
m2 = -> a { a*2 }
[1, 2, 3].map(&
a2 >=
m2 >=
...
baweaver (Brandon Weaver)
08:05 PM Feature #14724: chains of inequalities
I've often seen new Rubyists try this syntax intuitively. I think this is a really nice change. +1 shan (Shannon Skipper)
07:47 PM Feature #14724: chains of inequalities
Just pointing out that this would be a breaking change since
```
a < b == c
```
is already valid syntax meaning something else. But it's probably not frequent code to write.
graywolf (Gray Wolf)
10:31 AM Feature #14724: chains of inequalities
Mentioned at #14698 (DevelopersMeeting20180517Japan). Fixed subject. duerst (Martin Dürst)
01:32 AM Feature #14724: chains of inequalities
It would be nice to have this in Ruby. I have assigned it to Matz, because it's a syntax change that he should check and (hopefully) approve.
Just for documentation and NEWS, it's "(in)equalities", not "inequations".
duerst (Martin Dürst)
11:00 PM Feature #14697: Introducing Range#% as an alias to Range#step
I understand.
I guess it's a way to make `Enumerator::ArithmeticSequence` even more "core", even if it's rarely used.
Has there been discussion of:
* defining `Enumerator::ArithmeticSequence#===`?
* supporting `Array#[]` with `Enumer...
marcandre (Marc-Andre Lafortune)
08:55 PM Misc #14720 (Closed): [PATCH] cont.c: cleanup needless cast
Applied in changeset trunk|r63315.
----------
cont.c: cleanup needless cast
It seems like leftover development step from r59557
("refactoring Fiber status").
I will make fiber_status use BITFIELD macro in a future
commit.
* cont.c (s...
normalperson (Eric Wong)
02:48 AM Misc #14720: [PATCH] cont.c: cleanup needless cast
Thank you. No problem.
ko1 (Koichi Sasada)
08:55 PM Revision d64c9c78 (git): * 2018-05-02
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
08:55 PM Revision 74fdf523 (git): cont.c: cleanup needless cast
It seems like leftover development step from r59557
("refactoring Fiber status").
I will make fiber_status use BITFIELD macro in a future
commit.
* cont.c (struct rb_fiber_struct): drop const from fiber_status
(fiber_status_set): rem...
Eric Wong
07:42 PM Bug #14730 (Closed): [MJIT] lambda stack consistency error
```ruby
fib = lambda do |x|
return x if x == 0 || x == 1
fib.call(x-1) + fib.call(x-2)
end
fib.call(35)
```
```
ruby --jit fib.rb
...
Stack consistency error (sp: 119, bp: 118) (fatal)
== disasm: #<ISeq:block in <main>@...
ahorek (Pavel Rosický)
05:02 PM Bug #10212: MRI is not for lambda calculus
I guess this is related, so I'll post it here.
Today I tried this code sample in MRI 2.5
```
fib = lambda {|x| return x if x == 0 || x == 1; fib.call(x-1) + fib.call(x-2)}; t = Time.now; fib.call(40); puts Time.now - t
```
and an ...
mvasin (Mikhail Vasin)
03:27 PM Bug #14729: Float("long_invalid_string") fails to throw an exception
> This behavior is inconsistent; underscores are verified throughout the entire
> ...
I think that particular reasoning is incorrect in regards to underscores, as
underscores are valid in both variants aka simply ignored, as far as I c...
shevegen (Robert A. Heiler)
03:25 PM Bug #14729: Float("long_invalid_string") fails to throw an exception
> Should Float() accept any size string or limit it?
I think the method Float() should behave in the same way
as .to_f on a String in this regards. So if .to_f is
fine to be used on any sized string, the Float() method
should be f...
shevegen (Robert A. Heiler)
02:37 PM Bug #14729 (Closed): Float("long_invalid_string") fails to throw an exception
When Float() is used to convert a string into a float, invalid characters in the string throw an error.
But when a really long string is passed to Float(), invalid characters exceeding the size of the internal C buffer are ignored and...
samiam (Sam Napolitano)
12:54 PM Bug #14728 (Rejected): OptionParser takes other options as argument values
If `--custom` with no argument is allowed, it is not "MANDATORY".
Try:
```ruby
opts.on("-q","--custom [CUSTOM]", "custom") do |x|
options[:custom] = x
end
```
nobu (Nobuyoshi Nakada)
12:10 PM Bug #14728 (Rejected): OptionParser takes other options as argument values
`test.rb`
~~~ ruby
require 'optparse'
options = {}
OptionParser.new do |opts|
opts.banner = "Usage: test.rb [options]"
opts.on("--verbose", "Run verbosely") do |v|
options[:verbose] = v
end
opts.on("--custom MA...
xz0r (xz0r xz0r)
10:35 AM Bug #14725: fatal: No live threads left. Deadlock? since Revision 63215
Thanks for the update. I have confirmed this error does not reproduce with revision 63314.
~~~
$ ruby -v
ruby 2.6.0dev (2018-05-01 trunk 63314) [x86_64-linux]
$ bundle exec ruby -w -Itest test/application/asset_debugging_test.rb ...
yahonda (Yasuo Honda)
12:05 AM Bug #14725: fatal: No live threads left. Deadlock? since Revision 63215
yasuo.honda@gmail.com wrote:
> fatal: No live threads left. Deadlock?
> 5 threads, 5 sleeps current:0x000055f8f8565d50 main thread:0x000055f8f8565d50
> * #<Thread:0x000055f8f8087f40@/usr/local/lib/ruby/gems/2.6.0/gems/minitest-5.11.3...
normalperson (Eric Wong)
10:29 AM Misc #14698: DevelopersMeeting20180517Japan
* [Feature #14724] chains of inequalities
* Proposal by gotoken (Kentaro Goto) to allow `0 <= a < 10` as a shortcut of `0<=a && a<10`, and so on; patch by Nobu avaliable
duerst (Martin Dürst)
08:52 AM Feature #14723: [WIP] sleepy GC
Koichi Sasada <ko1@atdot.net> wrote:
> On 2018/05/01 12:47, Eric Wong wrote:
> >Oh sorry, I realize I was using the wrong gc.c functions :x
> >Something like:
>
> Thank you. No problem.
>
> More performance check will be great ...
normalperson (Eric Wong)
03:52 AM Feature #14723: [WIP] sleepy GC
On 2018/05/01 12:47, Eric Wong wrote:
> Oh sorry, I realize I was using the wrong gc.c functions :x
> Something like:

Thank you. No problem.

More performance check will be great (to write a NEWS entry :))

--
// SASADA Koich...
ko1 (Koichi Sasada)
03:52 AM Feature #14723: [WIP] sleepy GC
Koichi Sasada <ko1@atdot.net> wrote:
> On 2018/05/01 12:18, Eric Wong wrote:
> >>`gc_rest()` do all of rest steps. Is it intentional?
> >
> >I thought about that myself. I haven't measured impact much and
> >decided to have less ...
normalperson (Eric Wong)
03:33 AM Feature #14723: [WIP] sleepy GC
On 2018/05/01 12:18, Eric Wong wrote:
>> `gc_rest()` do all of rest steps. Is it intentional?
>
> I thought about that myself. I haven't measured impact much and
> decided to have less code.

On worst case, it takes few seconds...
ko1 (Koichi Sasada)
03:22 AM Feature #14723: [WIP] sleepy GC
ko1@atdot.net wrote:
> My understanding, your proposal in pseudo code is (pls correct me if it is wrong):
>

Correct.

> `gc_rest()` do all of rest steps. Is it intentional?

I thought about that myself. I haven't measured im...
normalperson (Eric Wong)
02:31 AM Feature #14723: [WIP] sleepy GC
My concerns are:
(1) Full GC (like GC.start) or step incremental marking/sweeping (to guarantee (or to reduce) the worst stopping time because of GC for every IO operation).
(2) How to know GC is required (if we invoke GC.start on an...
ko1 (Koichi Sasada)
01:22 AM Feature #14723: [WIP] sleepy GC
sam.saffron@gmail.com wrote:
> Implementation wise it seems like you only have it on rb_wait_for_single_fd, is there any way you can make this work with the pg gem? It just builds on libpq per: https://www.postgresql.org/docs/8.3/stati...
normalperson (Eric Wong)
08:35 AM Revision 45255c42 (git): use list_head_init instead of open-coding it
While we cannot use LIST_HEAD since r63312, we can at
least use list_head_init to make our code more readable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Eric Wong
06:55 AM Revision 41f4ac6a (git): ast.c: use enum in switch for warnings
* ext/-test-/ast/ast.c (node_children): use enum instead of int
for not-handled enumeration value in switch warnings.
* ext/-test-/ast/ast.c (node_children): fix the rb_bug message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6...
nobu (Nobuyoshi Nakada)
04:41 AM Revision 496ddbc2 (git): LIST_HEAD as a local variable is a C99ism.
Address of a variable whose storage duration is `auto` is _not_ a
compile time constant, according to ISO 9899 section 6.4.
LIST_HEAD takes such thing. You can't use it to declare local
variables.
Interestingly, address of a static var...
shyouhei (Shyouhei Urabe)
04:27 AM Bug #14726: wrong message when superclass is not a Class
なるほど、それは気づきませんでした。すると、こうでしょうか。
```c
rb_raise(rb_eTypeError, "superclass must be a Class (given a(n) %"PRIsVALUE")",
```
https://en.wiktionary.org/wiki/a(n)
yugui (Yuki Sonoda)
04:05 AM Bug #14726: wrong message when superclass is not a Class
……で、不定冠詞を付ける場合、例えば`Integer`のインスタンスが来たら`an`にしないといけないのでは、という問題が……。 usa (Usaku NAKAMURA)
03:58 AM Bug #14726: wrong message when superclass is not a Class
なるほど、確かに冠詞があればインスタンスが来たとわかるのでいいかも。
私の案だとモジュールが来た時わかりにくいというのも納得です。
usa (Usaku NAKAMURA)
02:34 AM Bug #14726: wrong message when superclass is not a Class
ああ、補足ですが、`super` の属するクラスではなく `super` の文字列表現を表示するというパッチの案に対しては、誤ってmoduleを渡した場合が心配です。
そのmoduleをクラスだと思い込んでいると却って分かりづらいのではないでしょうか。
yugui (Yuki Sonoda)
02:31 AM Bug #14726: wrong message when superclass is not a Class
どちらかというと元の仕様のほうに賛成で、これはバグではないという認識です。Classオブジェクトを期待していたのにC1オブジェクトが来たというのはどちらも `super` の属するクラスの話をしていて、そのパッチよりもバランスが取れています。
このエラーメッセージが分かりにくいのは冠詞が抜けているからではないでしょうか。
```diff
- rb_raise(rb_eTypeError, "superclass must be a Class (%"PR...
yugui (Yuki Sonoda)
01:49 AM Bug #14726 (Closed): wrong message when superclass is not a Class
クラス定義の際に親クラスとして`Class`でないものを与えると`TypeError`になりますが、その際にエラーメッセージに与えられたもののクラス名が表示されるため、メッセージだけ見ると何が間違ってるのかわけがわからなくなっています。
```ruby
class C1; end
class C2 < C1.new; end #=> TypeError (superclass must be a Class (C1 given))
```
ここはクラス...
usa (Usaku NAKAMURA)
03:12 AM Revision 766ee6e5 (git): rexml: Suppress warnings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e Sutou Kouhei
02:59 AM Bug #14727: TestQueue#test_queue_with_trap always timeout on Windows10
いちおう、手元(というかなんというか)での再現状況は、
- □ Windows 7
- □ Windows Server 2012 R2 (Windows 8.1相当)
- ☑ Windows 10
という感じです。
usa (Usaku NAKAMURA)
02:43 AM Bug #14727: TestQueue#test_queue_with_trap always timeout on Windows10
私も Windows 10 にして再現していました。
私が理解している範囲で、現象をちょっと書いておきます。
(1) GVL に Win32 の Mutex を使っている
(2) Win32 Mutex は、以前はスケジューリングをきちんと(インタプリタ開発者視点)してくれていた。つまり、ある Mutex について、それを待っているスレッド B がある場合、その Mutex を保持していたスレッド A が Mutex を離すと、B の実行が再開されるようになっ...
ko1 (Koichi Sasada)
02:27 AM Bug #14727 (Assigned): TestQueue#test_queue_with_trap always timeout on Windows10
表題の通りです。ささださんも把握しているそうなので、備忘録として。
```
[19/35] TestQueue#test_queue_with_trap = 10.13 s
1) Error:
TestQueue#test_queue_with_trap:
Timeout::Error: execution of assert_in_out_err expired timeout (10 sec)
pid 11608 exit 0
|
...
usa (Usaku NAKAMURA)
01:46 AM Feature #14718: Use jemalloc by default?
mperham (Mike Perham) wrote:
> For `strdup`, can we use jemalloc prefix mode so Ruby uses `je_malloc` and `je_free` for most memory but libc functions can still use `malloc` and `free`?
I think this can be an option. Also, because n...
shyouhei (Shyouhei Urabe)

04/30/2018

11:53 PM Revision f5db4a0c (git): test/thread/test_cv.rb: test CV usability inside forked child
* test/thread/test_cv.rb (def test_condvar_fork): new test
[Bug #14725]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Eric Wong
11:47 PM Bug #14725 (Closed): fatal: No live threads left. Deadlock? since Revision 63215
Applied in changeset trunk|r63309.
----------
thread_sync.c (condvar_ptr): reset fork_gen after forking
Otherwise the condition variable waiter list will always
be empty, which is wrong :x
[Bug #14725] [Bug #14634]
normalperson (Eric Wong)
11:33 PM Bug #14725: fatal: No live threads left. Deadlock? since Revision 63215
Investigating... normalperson (Eric Wong)
10:31 PM Bug #14725 (Closed): fatal: No live threads left. Deadlock? since Revision 63215
## Steps to reproduce
~~~ text
$ sudo gem install bundler
$ git clone https://github.com/rails/rails.git
$ cd rails/railties
$ bundle install
$ bundle exec ruby -w -Itest test/application/asset_debugging_test.rb -n test_assets_are_...
yahonda (Yasuo Honda)
11:47 PM Revision d2f52a5f (git): thread_sync.c (condvar_ptr): reset fork_gen after forking
Otherwise the condition variable waiter list will always
be empty, which is wrong :x
[Bug #14725] [Bug #14634]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Eric Wong
11:12 PM Revision 5e5b2fe6 (git): * 2018-05-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
11:12 PM Revision ce70bff3 (git): thread.c (vm_living_thread_num): constify vm arg
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e Eric Wong
06:51 PM Feature #6284: Add composition for procs
I just realized that infix operators evaluate before `to_proc`, allowing something like this:
```ruby
[1,2,3].map(&:succ.to_proc >> :to_str.to_proc)
```
Codified it into a gem for kicks: https://github.com/baweaver/mf
baweaver (Brandon Weaver)
06:17 PM Feature #14724: chains of inequalities
That works fine for me! Thanks for your patch. That works for not only numerics but also for hashes or classes.
And test patterns look enough. I hope to merge.
gotoken (Kentaro Goto)
08:45 AM Feature #14724: chains of inequalities
https://github.com/nobu/ruby/tree/feature/cmpseq nobu (Nobuyoshi Nakada)
06:36 AM Feature #14724 (Assigned): chains of inequalities
In mathematics, chain of inequations is a shorthand notation for the conjunction of several inequations involving common expressions.
For example, `a < b <= c` for `a < b && b <= c`
Chain notation makes code clearer, in particular...
gotoken (Kentaro Goto)
04:53 PM Bug #14702: On Ruby 2.5.1, tracepoint isn't working on the file that is loaded by load_iseq
How is the issue?
In addition to above, I confirm the issue in following example that does not use 3rd party gem.
```ruby
#!/usr/bin/env ruby
# Write ruby file
File.write('./loaded_file.rb', 'puts :hello')
# load file and wri...
makoto_tajitsu@hotmail.co.jp (Makoto Tajitsu)
03:57 PM Feature #14718: Use jemalloc by default?
So is it impossible for Ruby to use jemalloc by default? jemalloc reduces Ruby memory usage 50-75% on large Rails apps and many large sites are using it in production so it must be stable for many environments. 40GB to 9GB:
![jemall...
mperham (Mike Perham)
03:22 PM Bug #14714: Ruby 2.5.1 Segmentation Fault in GC
I think I am seeing a similar bug.
My test suite (Rails system tests, using Minitest and Capybara) is crashing on MacOS when using Ruby 2.5.1.
It is not happening with MRI 2.4.4, or on Linux (containers on Circle CI) using 2.5.1.
...
renchap (Renaud Chaput)
10:52 AM Feature #13618: [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
samuel@oriontransfer.org wrote:
> If you use any kind of thread-safe shared mutable state (e.g.
> a queue), you will invoke some kind of IPC (syscall) overhead.

There's unavoidable locking costs we're always paying inside
the kern...
normalperson (Eric Wong)
10:32 AM Feature #13618: [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
samuel@oriontransfer.org wrote:
>
> > Using a background thread is your mistake.

> Don't assume I made this design. It was made by other people.
> I merely tested it because I was interested in the performance
> overhead. And ye...
normalperson (Eric Wong)
01:37 AM Feature #13618: [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
> IPC? Interprocess communication? What? There's no processes, here.
Sorry, my terminology wasn't so clear. However, what I meant in this case is IPC between user process and kernel. i.e. any syscall.
e.g. locking on a mutex - as l...
ioquatix (Samuel Williams)
01:24 AM Feature #13618: [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
> Using a background thread is your mistake.
Don't assume I made this design. It was made by other people. I merely tested it because I was interested in the performance overhead. And yes, there is significant overhead. And let's be g...
ioquatix (Samuel Williams)
10:01 AM Revision cb67e0bd (git): Use `&.` instead of modifier if
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e znz (Kazuhiro NISHIYAMA)
09:05 AM Bug #14719: FalseClass wrapped in a SimpleDelegator evaluates to true in an IF statement
Thanks Marc-Andre. Appreciate the quick response. theirishpenguin (Declan McGrath)
06:54 AM Revision 4602d8e2 (git): NEWS: Add recent REXML changes
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e Sutou Kouhei
04:42 AM Feature #14723: [WIP] sleepy GC
sam.saffron@gmail.com wrote:
> I really really like this, its a free performance boost with
> almost no downsides.

Almost... I need to revisit [PATCH 4/2] (native_sleep) due to
th->status changes and finalizers running causing c...
normalperson (Eric Wong)
02:17 AM Bug #14713 (Closed): <internal:prelude>:132:in `__write_nonblock': Protocol wrong type for socket (Errno::EPROTOTYPE)
Applied in changeset trunk|r63304.
----------
io.c: workaround for EPROTOTYPE
* io.c (internal_write_func, internal_writev_func): retry at
unexpected EPROTOTYPE on macOS, to get rid of a kernel bug.
[ruby-core:86690] [Bug #14713]
...
nobu (Nobuyoshi Nakada)
02:17 AM Revision 7727b22e (git): io.c: workaround for EPROTOTYPE
* io.c (internal_write_func, internal_writev_func): retry at
unexpected EPROTOTYPE on macOS, to get rid of a kernel bug.
[ruby-core:86690] [Bug #14713]
* ext/socket/init.c (rsock_{sendto,send,write}_blocking): ditto.
git-svn-id: sv...
nobu (Nobuyoshi Nakada)
12:28 AM Revision 9cd48348 (git): * 2018-04-30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
12:28 AM Revision 6073edd6 (git): io.c: reuse internal_write_func
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e nobu (Nobuyoshi Nakada)

04/29/2018

11:50 PM Feature #14723: [WIP] sleepy GC
I really really like this, its a free performance boost with almost no downsides.
I guess the simplest way of measuring it would be to run something like Discourse bench with and without the patch. In theory we should get better timi...
sam.saffron (Sam Saffron)
11:03 AM Feature #14723: [WIP] sleepy GC
Eric Wong <normalperson@yhbt.net> wrote:
> I'm not sure if native_sleep() is worth doing GC on in most
> cases (Mutex#lock, Queue#pop, ...) because that's waiting
> on local resources from other threads within our process.

Nevermi...
normalperson (Eric Wong)
09:22 AM Feature #14723: [WIP] sleepy GC
Also, added "thread.c (do_select): perform GC if idle"

https://80x24.org/spew/20180429090250.GA15634@dcvr/raw

And updated "sleepy-gc" git branch @ git://80x24.org/ruby.git
to 10bcc1908601e6f35ebef5ff66476b5cea6da96c.

I'm not s...
normalperson (Eric Wong)
07:42 AM Feature #14723: [WIP] sleepy GC
Eric Wong <normalperson@yhbt.net> wrote:
> This is a quick check and even optimized inside the Linux kernel[1].

Sorry, forgot link:
[1] https://bogomips.org/mirrors/linux.git/tree/fs/select.c?h=v4.16#n851
/* Optimise the no-wait c...
normalperson (Eric Wong)
06:04 AM Feature #14723: [WIP] sleepy GC
"Atdot.net" <ko1@atdot.net> wrote:
> Could you give us more detail algorithm?

Pretty simple and I thought the patch was easy-to-read.

Background is we can use ppoll with zero-timeout
({.tv_sec = 0, .tv_nsec = 0 }) to check and r...
normalperson (Eric Wong)
04:52 AM Feature #14723: [WIP] sleepy GC
Could you give us more detail algorithm?

2018/04/29 12:57、normalperson@yhbt.netのメール:

> Issue #14723 has been reported by normalperson (Eric Wong).
>
> ----------------------------------------
> Feature #14723: [WIP] sleepy GC
...
ko1 (Koichi Sasada)
03:57 AM Feature #14723 (Open): [WIP] sleepy GC
The idea is to use "idle time" when process is otherwise sleeping
and using no CPU time to perform GC. It makes sense because real
world traffic sees idle time due to network latency and waiting
for user input.
Right now, it's Lin...
normalperson (Eric Wong)
01:45 PM Revision 6199c9ac (git): * spec/ruby/command_line/dash_upper_i_spec.rb: skip symlink on Windows like
other specs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
U.Nakamura
01:25 PM Bug #14713: <internal:prelude>:132:in `__write_nonblock': Protocol wrong type for socket (Errno::EPROTOTYPE)
I made a patch for write_nonblock. But this probably equally applies to send, sendmsg, etc. Perhaps we can discuss the right course of action to cover all these cases. ioquatix (Samuel Williams)
01:17 PM Bug #14713: <internal:prelude>:132:in `__write_nonblock': Protocol wrong type for socket (Errno::EPROTOTYPE)
I've made a PR which fixes the issue.
https://github.com/ruby/ruby/pull/1868
I believe it would make sense to back-port it.
Additionally the following change could be reverted: https://bugs.ruby-lang.org/issues/12914
ioquatix (Samuel Williams)
12:40 PM Bug #14713: <internal:prelude>:132:in `__write_nonblock': Protocol wrong type for socket (Errno::EPROTOTYPE)
It seems that in this specific case, EPROTOTYPE is the same as EPIPE. It's a bug in the kernel code. I wonder if we should compensate for it by detecting EPROTOTYPE by write, and raising EPIPE. ioquatix (Samuel Williams)
12:35 PM Bug #14713: <internal:prelude>:132:in `__write_nonblock': Protocol wrong type for socket (Errno::EPROTOTYPE)
I tried digging into this issue.
I found some other people with similar problems: https://github.com/nodejs/node/issues/2382
The most interesting article digging into the issue: http://erickt.github.io/blog/2014/11/19/adventures-i...
ioquatix (Samuel Williams)
02:20 AM Bug #14713: <internal:prelude>:132:in `__write_nonblock': Protocol wrong type for socket (Errno::EPROTOTYPE)
> It happens often on macOS.
I don't have this experience. I can't systematically reproduce the issue. It only happens perhaps once a month even thought I'm running networking code almost daily on macOS, and these are code paths that ...
ioquatix (Samuel Williams)
11:15 AM Revision de2bfd3d (git): Remove the teeny part from the shared library name on macOS
This will prevent macOS users from having to rebuild all extension
libraries every time they upgrade ruby to a new teeny release.
Before:
- libruby.2.6.0.dylib
- libruby.2.6.dylib -> libruby.2.6.0.dylib
- libruby.dylib -> libruby.2.6.0....
Akinori MUSHA
08:21 AM Feature #14718: Use jemalloc by default?
mperham (Mike Perham) wrote:
> Since MRI offers --with-jemalloc, I assume it is safe
That's not the reason for it being safe.
> ...
You can have trouble without any C extensions. See also https://bugs.ruby-lang.org/issues/13524 ...
shyouhei (Shyouhei Urabe)
07:12 AM Revision 058949ac (git): range.c: optimize range_each for Bignum
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e nobu (Nobuyoshi Nakada)
05:50 AM Feature #14701: If the object is not frozen, I want to be able to redefine the compound assignment operator.
Maybe I don't get the point though, if `Numo::NArray#inplace` and `inplace.+` always return identical object, `#inplace=` can be defined and one can write
```
a = Numo::Int32[5, 6]
a.inplace += 1
```
means shorthand for `a.inpl...
gotoken (Kentaro Goto)
03:20 AM Revision 394418c9 (git): _mjit_compile_send.erb: fix pointer conversion warning
/var/folders/b0/9hgj_tyx10zgkcbyx3_j2dlr0000gn/T//_ruby_mjit_p72619u0.c:37:58: warning: incompatible integer to pointer
conversion passing 'long' to parameter of type 'const struct rb_call_info *' [-Wint-conversion]
vm_call...
k0kubun (Takashi Kokubun)

04/28/2018

11:31 PM Revision 797d2ab5 (git): range.c: endless symbol range
* range.c (range_each): shortcirtuit endless symbol range too, as
well as `#step`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
11:04 PM Revision 54701725 (git): Generalize the check to MRI in the -I spec
* The current check seems to fail with AppVeyor.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Eregon (Benoit Daloze)
08:37 PM Revision aaac5df3 (git): Ignore the extension of miniruby on Windows in the -I spec
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e Eregon (Benoit Daloze)
08:33 PM Feature #14718: Use jemalloc by default?
Hi Nobu, GitHub, GitLab and Discourse are all running jemalloc in production. Since MRI offers --with-jemalloc, I assume it is safe and does not free any memory returned by strdup. Are you mainly concerned with native C extensions that... mperham (Mike Perham)
07:52 PM Feature #14718: Use jemalloc by default?
Unfortunately, I have to object it.
As functions in libc, e.g., `strdup`, cannot be replaced by jemalloc and continue to use the system `malloc`, so freeing the pointer returned from such functions by `je_free` causes a crash (segfault...
nobu (Nobuyoshi Nakada)
04:36 AM Feature #14718: Use jemalloc by default?
On Ubuntu Linux, with Rails Ruby Bench, jemalloc gives an overall speedup (not just memory, end-to-end speedup) of around 11%. Details: "http://engineering.appfolio.com/appfolio-engineering/2018/2/1/benchmarking-rubys-heap-malloc-tcmallo... noahgibbs (Noah Gibbs)
07:50 PM Revision ebb69738 (git): * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
07:50 PM Revision 4fbb9aa3 (git): Update to ruby/spec@6f38a82
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e Eregon (Benoit Daloze)
07:49 PM Revision b864bd05 (git): * 2018-04-29
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
07:49 PM Revision 702eb2c8 (git): Update to ruby/mspec@b5b13de
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e Eregon (Benoit Daloze)
06:11 PM Feature #14722: python's buffer protocol clone
The article is an oversimplification, I do agree. But some common mechanism to pass chunks of memory to C libs (gsl, blas, opencv, maybe cuda, and many others) would help I think. This way you could run all of the functions of these libr... jsaak (jsaak jsaak)
08:41 AM Feature #14722: python's buffer protocol clone
I do not think that the above article describes as to why python has
become so popular. It is DEFINITELY not because of a SINGLE feature.
But anyway, I do not want to digress from your suggestion, and I am
pretty sure that matz is l...
shevegen (Robert A. Heiler)
06:38 AM Feature #14722 (Closed): python's buffer protocol clone
Is there a way to implement, or even copy Python's buffer protocol in ruby?
There is an article that describes the benefits quite well:
https://jeffknupp.com/blog/2017/09/15/python-is-the-fastest-growing-programming-language-due-to-a...
jsaak (jsaak jsaak)
03:55 PM Feature #12912: An endless range `(1..)`
nobu (Nobuyoshi Nakada) wrote:
> Why is `(1..).size` `nil`, but not `Float::INFINITY`?
It's a bug, see #14699
marcandre (Marc-Andre Lafortune)
01:25 PM Feature #12912: An endless range `(1..)`
Why is `(1..).size` `nil`, but not `Float::INFINITY`? nobu (Nobuyoshi Nakada)
11:16 AM Revision 703a5dd3 (git): string.c: adjust to rb_str_upto_each
* range.c (range_each_func): adjust the signature of the callback
function to rb_str_upto_each, and exit the loop if the callback
returned non-zero.
* string.c (rb_str_upto_endless_each): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.o...
nobu (Nobuyoshi Nakada)
09:22 AM Revision d025f64a (git): test_open3.rb: let test_popen2 work with --jit
test/lib/jit_support.rb: add .remove_mjit_logs to normalize stderr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
k0kubun (Takashi Kokubun)
09:11 AM Revision 60902062 (git): test_rubyoptions.rb: let all tests work with --jit
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e k0kubun (Takashi Kokubun)
09:02 AM Revision acacd7a1 (git): test_bug_reporter.rb: make it work with --jit
test_rubyoptions.rb: replace gsub with sub because it's suboptimal for
this
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
k0kubun (Takashi Kokubun)
08:52 AM Revision 0b01776d (git): test_rubyoptions.rb: let test_verbose work w/ --jit
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e k0kubun (Takashi Kokubun)
08:41 AM Revision 9aab4b6b (git): test_parallel.rb: extend timeout for --jit-wait
testing. 10s was long enough for my machine, but not for travis.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
k0kubun (Takashi Kokubun)
08:39 AM Feature #14701: If the object is not frozen, I want to be able to redefine the compound assignment operator.
nobu (Nobuyoshi Nakada) wrote:
> What about
> ...
When saving in a variable, I do not want to manage the inplace state.
```
> require 'numo/narray'
> ...
=> Numo::Int32#shape=[2]
[5, 6]
> a.inplace?
=> false
> ...
=> Numo...
naitoh (Jun NAITOH)
08:24 AM Revision ada41984 (git): test_ftp.rb: extend read_timeout for --jit-wait
testing. I'm running `make test-all RUN_OPTS='--jit-wait'` and the
read_timeout was too slow for it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
k0kubun (Takashi Kokubun)
07:31 AM Revision d07861fb (git): range.c: each on endless range
* range.c (range_each): endless range begins with string-like
object should iterate from the converted result string, as well
as `#each` on a string-end range or `#step` method on an endless
range, i.e., `begin.succ` should not be ...
nobu (Nobuyoshi Nakada)
06:23 AM Revision b6e28514 (git): thread_sync.c: remove "volatile" qualifiers
I may store ->ec in rb_mutex_t instead of ->th to support green
thread. For now, "volatile" is useless for thread-safety
anyways and we're not dealing with *jmp or signals with mutex.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6...
Eric Wong
06:00 AM Revision 0d77b73d (git): thread_sync.c: remove unused list_heads
I forgot to clean these up in r63215
* thread_sync.c (szqueue_list, queue_list, condvar_list): remove
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Eric Wong
05:45 AM Bug #14721 (Closed): Backport request patch for rubygems 2.6
rubygems 2.6.14.1 has a problem with Windows platform.
Please see details: https://github.com/rubygems/rubygems/pull/2211
@usa Can you apply attachment patch with next release and bump version to 2.6.14.2?
hsbt (Hiroshi SHIBATA)
05:12 AM Misc #14720: [PATCH] cont.c: cleanup needless cast
ko1@atdot.net wrote:
> > 0001-cont.c-cleanup-needless-cast (0 Bytes)

Reattached. Also posted to spew@80x24.org:
https://80x24.org/spew/20180428050438.16831-1-e@80x24.org/raw
normalperson (Eric Wong)
04:47 AM Misc #14720: [PATCH] cont.c: cleanup needless cast
> 0001-cont.c-cleanup-needless-cast (0 Bytes)
it seems redmine system error.
ko1 (Koichi Sasada)
03:49 AM Misc #14720 (Closed): [PATCH] cont.c: cleanup needless cast
It seems like leftover development step from r59557
("refactoring Fiber status").
I will make fiber_status use BITFIELD macro in a future
commit.
* cont.c (struct rb_fiber_struct): drop const from fiber_status
(fiber_status_se...
normalperson (Eric Wong)
01:47 AM Revision f1140895 (git): Merge Pysch 3.0.3.pre1.
I added the following additional commits from 3.0.3.pre1:
* https://github.com/ruby/psych/pull/356
* https://github.com/ruby/psych/pull/357
* https://github.com/ruby/psych/pull/359
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby...
hsbt (Hiroshi SHIBATA)
01:45 AM Revision 13dc8e4e (git): mjit_config.h: expand min header name
* Makefile.in, win32/Makefile.sub (mjit_config.h): expand min
header name, including the version number and the suffix.
* mjit.c (init_header_filename): the version number and the suffix
are now included in the header name.
git-svn...
nobu (Nobuyoshi Nakada)
01:36 AM Revision 1d67b9de (git): rexml: disable XPath 1.0 compatible "#{ELEMENT_NAME}" processing by default
It breaks backward compatibility than I thought. So it's disabled by
default. It means that REXML's XPath processor isn't compatible with
XPath 1.0. But it will be acceptable for users.
We can enable it by specifying "strict: true" to
R...
Sutou Kouhei

04/27/2018

11:58 PM Feature #14701: If the object is not frozen, I want to be able to redefine the compound assignment operator.
matz (Yukihiro Matsumoto) wrote:
> Use `append` instead of `+=` for arrays. Changing the behavior of `+=` would have too much compatibility problems from side-effect.
> ...
Thank you for your reply.
I am sorry if it caused me to misun...
naitoh (Jun NAITOH)
10:19 PM Feature #14701: If the object is not frozen, I want to be able to redefine the compound assignment operator.
Alternative idea: If Ruby has a feature like:
~~~ ruby
x = x.left_variable? # => true
y = x.left_variable? # => false
~~~
then inplace operation is possible without redefinition of `+=`.
masa16 (Masahiro Tanaka)
09:58 PM Feature #14718: Use jemalloc by default?
I have a Sidekiq benchmark[1] which processes 100,000 jobs through Redis, exercising networking, threading and JSON heavily. 2.5.0 on OSX takes 20.5 sec, 2.5.1 with jemalloc on OSX takes 18.3 sec, a 10% speed boost.
[1]: https://gith...
mperham (Mike Perham)
07:59 PM Feature #14718: Use jemalloc by default?
Regarding performance, it's subjective as always. What are your server's specifications? Usually RAM is not cheap, which means people don't usually have plenty of RAM in their servers, which means that lots of RAM usage could mean that a... rosenfeld (Rodrigo Rosenfeld Rosas)
07:28 PM Feature #14718: Use jemalloc by default?
The compile option to use jemalloc is already provided by Ruby from my understanding, this issue is about making it the default in Linux, where it seems to matter most. rosenfeld (Rodrigo Rosenfeld Rosas)
06:50 PM Feature #14718: Use jemalloc by default?
I know way too little about the topic at hand, so I can not really
comment on it, the usability, gains and so forth.
I had a look at the discussion at #9113, just due to my curiosity alone.
It seems as if matz has not yet commente...
shevegen (Robert A. Heiler)
06:22 PM Feature #14718: Use jemalloc by default?
On 2018/04/28 3:12, Eric Wong wrote:
> Long-term (unlikely this year) I hope to work with glibc team to
> improve malloc on their end. I have ideas which require LGPL
> code (wfcqueue) to implement, so not doable with jemalloc.

s...
ko1 (Koichi Sasada)
06:13 PM Feature #14718: Use jemalloc by default?
mperham@gmail.com wrote:
> https://bugs.ruby-lang.org/issues/14718

Agreed. I think it's acceptable to enable jemalloc by default short-term.

Long-term (unlikely this year) I hope to work with glibc team to
improve malloc on the...
normalperson (Eric Wong)
04:38 PM Feature #14718: Use jemalloc by default?
It's also quite possible that jemalloc will give us a small performance increase. Another data point:
https://medium.com/@adrienjarthon/ruby-jemalloc-results-for-updown-io-d3fb2d32f67f
mperham (Mike Perham)
04:30 PM Feature #14718: Use jemalloc by default?
If Ruby decides to ship with jemalloc, let's make sure to be like Redis and only use it by default on Linux (as mentioned in the Redis 2.4 release announcement). jeremyevans0 (Jeremy Evans)
04:14 PM Feature #14718 (Rejected): Use jemalloc by default?
I know Sam opened #9113 4 years ago to suggest this but I'm revisiting the topic to see if there's any movement here for Ruby 2.6 or 2.7. I supply a major piece of Ruby infrastructure (Sidekiq) and I keep hearing over and over how Ruby ... mperham (Mike Perham)
09:24 PM Bug #14719 (Rejected): FalseClass wrapped in a SimpleDelegator evaluates to true in an IF statement
I'm afraid you can not achieve what you want to achieve in Ruby. The only two objects that are falsy in Ruby are `nil` and `false`. No other object can "look" like `false`. This is by design and can not be changed. marcandre (Marc-Andre Lafortune)
04:33 PM Bug #14719 (Rejected): FalseClass wrapped in a SimpleDelegator evaluates to true in an IF statement
Hi, thanks for Ruby :-)
I have run into a problem. When I wrap the boolean false in a SimpleDelegator it breaks the semantics of the boolean when evaluated in expressions such as IF statements - returning true when I would have expect...
theirishpenguin (Declan McGrath)
08:25 PM Revision 75f4f699 (git): * 2018-04-28
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
08:25 PM Revision 743c6edd (git): NEWS: fix typos
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e stomar (Marcus Stollsteimer)
06:19 PM Feature #12607: Ruby needs an atomic integer
Oh, sorry, I just noticed this issue isn't about changing Ruby's syntax, it was just my comment on the other related issue that mentioned that :P So this is basically the same request as Mike's. rosenfeld (Rodrigo Rosenfeld Rosas)
06:08 PM Feature #12607: Ruby needs an atomic integer
I'm not sure if type was set to Bug on purpose, so I'm changing it to Feature instead, but feel free to change it back to Bug if you really think it's a bug. rosenfeld (Rodrigo Rosenfeld Rosas)
06:07 PM Feature #12607: Ruby needs an atomic integer
Just to make it clearer, since I was mentioned by Shyouhey in the issue's description, performance has never been the reason why I asked for support for atomic operations such as incrementing an integer. It might seem like it is the case... rosenfeld (Rodrigo Rosenfeld Rosas)
07:14 AM Feature #12607: Ruby needs an atomic integer
I think that you might not have understood his concern. Getting multi-threaded code right is hard, no matter the primitives available. "People who know well about thread programming can use this feature using concurrent-ruby and I don'... Student (Nathan Zook)
02:11 AM Feature #12607: Ruby needs an atomic integer
We have already shown the benefits of atomic integers very well. What Ko1 says is the downside of it ("it is too hard for mere mortals"). Now is the time for us to tell him it's not that bad. Showing another benefits of concurrency do... shyouhei (Shyouhei Urabe)
02:40 PM Bug #14350: Strange behavior for Array.min in ruby 2.5.0
This change afects PrawnPDF gems (I'm a maintainer).
From the maths point of view it is indeed insignificant, but there are other areas where exact value matters. For example, in Prawn these values are serialized. Integer `1` is seria...
cheba (Alexander Mankuta)
01:14 PM Revision 0dd9f7cc (git): iseq.c: consistent rb_bug messages
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e nobu (Nobuyoshi Nakada)
01:14 PM Revision e858f865 (git): mjit.c: remove undef
* mjit.c (clean_so_file): removed unnecessary undef of `Sleep`
which is redfined as rb_w32_sleep. eventually, retry loop with
sleep has been removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63274 b2dd03c8-39d4-4d8f-98ff-8...
nobu (Nobuyoshi Nakada)
09:44 AM Bug #14716: SecureRandom throwing an error in Ruby 2.5.1
We checked that by executing 'cat /dev/urandom' and we did see an output.
So dont think thats an issue.
We suspect that this issue occurs when there are many concurrent requests.
snehavas (sneha vasanth)
09:23 AM Bug #14716: SecureRandom throwing an error in Ruby 2.5.1
I can reproduce the situation using this Dockerfile https://github.com/shyouhei/docker-library/blob/master/%2314716/Dockerfile
The key point is to delete /dev/urandom from the image.
2.3.6 used to try openssl first, so if it had en...
shyouhei (Shyouhei Urabe)
08:54 AM Bug #14716: SecureRandom throwing an error in Ruby 2.5.1
naruse (Yui NARUSE) wrote:
> r57307 changed to use __NR_getrandom (kernel header) from SYS_getrandom (glibc header).
> ...
genrandom(2) is introduced at v3.17.
On v3.13 kernel, it should fallback to /dev/urandom.
Maybe your environme...
naruse (Yui NARUSE)
08:45 AM Bug #14716 (Open): SecureRandom throwing an error in Ruby 2.5.1
r57307 changed to use __NR_getrandom (kernel header) from SYS_getrandom (glibc header).
But __NR_getrandom is from v3.17.
It needs to check both __NR_getrandom and SYS_getrandom for compatibility.
naruse (Yui NARUSE)
07:36 AM Bug #14716: SecureRandom throwing an error in Ruby 2.5.1
The Kernel version is 3.13.0-145-generic snehavas (sneha vasanth)
07:34 AM Bug #14716: SecureRandom throwing an error in Ruby 2.5.1
We are using Ubuntu 14.04.5 LTS snehavas (sneha vasanth)
06:29 AM Bug #14716 (Feedback): SecureRandom throwing an error in Ruby 2.5.1
It depends on your OS.
What OS and the kernel version?
nobu (Nobuyoshi Nakada)
06:19 AM Bug #14716 (Closed): SecureRandom throwing an error in Ruby 2.5.1
Hi,
We recently upgraded from ruby 2.3.6 to 2.5.1.
We use SecureRandom.uuid to generate a random number for our session.
Post the upgrade we have been getting the following error intermittently
```
app error: failed to get urand...
snehavas (sneha vasanth)
08:25 AM Feature #14709: Proper pattern matching
I've gone and done something exceptionally bad to Ruby, but this should be an interesting proof of concept nonetheless:
* Benchmarks - https://github.com/baweaver/qo/blob/evil/Rakefile
* Results - https://gist.github.com/baweaver/086...
baweaver (Brandon Weaver)
02:01 AM Feature #14709: Proper pattern matching
Whenever I feel I need pattern matching, I'm trying to handle method args. With some of the ideas presented here, like Qo, I feel I'd really only be using it inside the outer edges of a method to match on the args that that method receiv... jgaskins (Jamie Gaskins)
08:14 AM Feature #14717: [PATCH] thread: allow disabling preempt
https://80x24.org/spew/20180427081252.12560-1-e@80x24.org/raw
normalperson (Eric Wong)
08:09 AM Feature #14717 (Closed): [PATCH] thread: allow disabling preempt
In some cases, it may be beneficial to disable preemptibility to
have more predictable behavior than increasing Thread#priority.
Threads with preempt disabled will run until they either:
a) encounter a thread blocking region
...
normalperson (Eric Wong)
07:44 AM Feature #12912: An endless range `(1..)`
I tried to structure my post to make it clear that there a two different types of uses for ranges. Of course `..5` where the left bound is -­­∞, wouldn't make sense for iterating. But being able to skip the right bound, but not the left,... sowieso (So Wieso)
07:19 AM Feature #12912: An endless range `(1..)`
sowieso (So Wieso) wrote:
> >It is better to have ary[..1] as a consistency. But it will cause a shift/reduce conflict. Anyway, ary[0..1] looks not so bad to me since it have no cursed negative index. So I don't push it.
> ...
A shif...
duerst (Martin Dürst)
06:24 AM Feature #12912: An endless range `(1..)`
I like this change.
**As for general ranges**:
I was somewhat comfortable with `.step`, but this is much nicer. Having a short global variable for Float::INFINITY would be fine too, imho. Something like `0..Inf` or `0..INF`.
**...
sowieso (So Wieso)
07:39 AM Revision fa7fa928 (git): mjit.c: clean so file on Windows
* mjit.c (dlclose): use FreeLibrary to manage the reference count
on the loaded module properly.
* mjit.c (clean_so_file): clean shared object file after unloaded,
in-use files cannot be removed on Windows.
git-svn-id: svn+ssh://ci...
nobu (Nobuyoshi Nakada)
05:20 AM Revision ea631cc1 (git): mjit.c: fix cc arguments
* mjit.c (CC_LIBS): MJIT_LIBS is used only on Windows.
* mjit.c (compile_c_to_so): moved source and shared object files
to simplify indexes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
05:20 AM Revision 6dafb4c9 (git): ruby.c: moved libdir
* ruby.c (ruby_init_loadpath_safe): moved libdir name inside
LOAD_RELATIVE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
04:36 AM Revision 4eb2c1e1 (git): ruby.c: fix compilation error
* ruby.c (ruby_init_loadpath_safe): fix compilation error when
ENABLE_MULTIARCH but not universal binary.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
02:02 AM Revision 67800ea9 (git): mjit.c: prefix and archdir in init
* ruby.c (ruby_init_loadpath_safe): store prefix and archlibdir
paths.
* mjit.c (compile_c_to_so, init_header_filename): use just one
library path on Windows.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63269 b2dd03c8-39d4-4d...
nobu (Nobuyoshi Nakada)
01:58 AM Revision 9ce0a846 (git): rbinstall.rb: fix timing to read stub
* tool/rbinstall.rb ($script_installer.stub): read stub file on
demand. as `$cmdtype` is set to "exe" in parse_args, it is not
set yet when `$script_installer` is defined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63268 b2d...
nobu (Nobuyoshi Nakada)
12:30 AM Bug #14607: Fix use of the rb_profile_frames start parameter
I need to remember why such special (additional) calculation is done, so I left this ticket.
I need to remember...
ko1 (Koichi Sasada)
12:15 AM Bug #14607 (Open): Fix use of the rb_profile_frames start parameter
ko1 said I shouldn't have committed the patch, so I reverted. Sorry! tenderlovemaking (Aaron Patterson)
12:13 AM Revision c03f86b3 (git): Revert "Fix use of `rb_profile_frames` start parameter"
This reverts commit r63265.
ko1 said I should not have committed this! I'm sorry!
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
tenderlovemaking (Aaron Patterson)

04/26/2018

10:49 PM Bug #14607 (Closed): Fix use of the rb_profile_frames start parameter
Applied in changeset trunk|r63265.
----------
Fix use of `rb_profile_frames` start parameter
rb_profile_frames was always behaving as if the value given for the
start parameter was 0.
The reason for this was that it would check if (st...
tenderlovemaking (Aaron Patterson)
10:49 PM Revision 707cbe6f (git): * 2018-04-27
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
10:49 PM Revision d676ad10 (git): Fix use of `rb_profile_frames` start parameter
rb_profile_frames was always behaving as if the value given for the
start parameter was 0.
The reason for this was that it would check if (start > 0) { then
continue without updating the control frame pointer or anything other
than decr...
tenderlovemaking (Aaron Patterson)
09:04 PM Feature #12607: Ruby needs an atomic integer
I don't like pulling in the entire concurrent-ruby gem only for a few lines of code. I've implemented my own slow but thread-safe Counter here:
https://github.com/mperham/sidekiq/blob/b58c505df3501d8c1de5207552d68dd2d9abea31/lib/side...
mperham (Mike Perham)
12:37 PM Feature #14715 (Open): Pathname#== should compare by #realpath instead of #to_s
Hi Core Team,
I'd like to report a confusing behaviour I noticed with Pathname#== comparison method.
See the following example:
Supposed I've created a file "file.txt" on /home/user/ directory.
~~~ ruby
require 'pathname'
...
hspazio (Fabio Pitino)
12:36 PM Revision 81f02142 (git): win32/Makefile.sub: LIBDIR_BASENAME
* mjit.c (init_header_filename): support LIBDIR_BASENAME.
* win32/Makefile.sub (config.h): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
12:36 PM Revision 8036af48 (git): ruby.c (ruby_init_loadpath_safe): constify
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e nobu (Nobuyoshi Nakada)
11:51 AM Bug #14714: Ruby 2.5.1 Segmentation Fault in GC
As it occurs in GC, it may reproduce with a few test by setting `GC.stress` to `true`. nobu (Nobuyoshi Nakada)
11:02 AM Bug #14714: Ruby 2.5.1 Segmentation Fault in GC
I have reverted to ruby 2.4.4 and done rspec/spec/features and the problem does not occur, to this increases the probability that it is a ruby 2.5.1 problem. obromios (Chris Drane)
10:28 AM Bug #14714 (Closed): Ruby 2.5.1 Segmentation Fault in GC
I am using Ruby 2.5.1, and running ruby on rails 5.1.4 with rspec-rails 3.7.2 and capybara 3.0.2.
When I run my feature tests, i.e. rspec spec/features, I get a segmentation fault. When I found the test in which the fault is occurri...
obromios (Chris Drane)
11:05 AM Bug #11779: Module#using does not make sense as a method
From RSpec:
~~~ ruby
let(:test_class) do
Class.new(described_class) do
private
using SomeRefiningModule # => RuntimeError: Module#using is not permitted in methods
def foo
end
end
end
~~~
AlexWayfer (Alexander Popov)
09:32 AM Bug #14713: <internal:prelude>:132:in `__write_nonblock': Protocol wrong type for socket (Errno::EPROTOTYPE)
ioquatix (Samuel Williams) wrote:
> Very occasionally on macOS, using Ruby 2.5.0, I get the above error.
It happens often on macOS.
> ...
Probably, but not sure.
nobu (Nobuyoshi Nakada)
05:00 AM Bug #14713 (Closed): <internal:prelude>:132:in `__write_nonblock': Protocol wrong type for socket (Errno::EPROTOTYPE)
Very occasionally on macOS, using Ruby 2.5.0, I get the above error.
```
Traceback (most recent call last):
23: from /Users/samuel/.rvm/gems/ruby-2.5.0/gems/async-1.6.0/lib/async/task.rb:74:in `block in initialize'
22: from /User...
ioquatix (Samuel Williams)
09:30 AM Feature #14701: If the object is not frozen, I want to be able to redefine the compound assignment operator.
I think it is enough to change the meaning of
~~~ ruby
x += a
~~~
to
~~~ ruby
if x.respond_to?(:'+=')
x.send(:'+=',a)
else
x = x + a
end
~~~
Matz rejected this in http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/...
masa16 (Masahiro Tanaka)
09:28 AM Feature #14701: If the object is not frozen, I want to be able to redefine the compound assignment operator.
nobu (Nobuyoshi Nakada) wrote:
> It seems a different story from `+=`.
I am sorry for getting off the point, but I wanted to say that `add!` method does not solve the problem.
> ...
This cannot be a solution because both inplace a...
masa16 (Masahiro Tanaka)
08:56 AM Feature #14701: If the object is not frozen, I want to be able to redefine the compound assignment operator.
masa16 (Masahiro Tanaka) wrote:
> Former NArray had `add!` method, but it results in a confused result.
It seems a different story from `+=`.
> ...
It feels that `a[0,true]` should return `inplace` object.
Otherwise `+=` would no...
nobu (Nobuyoshi Nakada)
07:21 AM Feature #14701: If the object is not frozen, I want to be able to redefine the compound assignment operator.
As first thing to say, we do not expect changing behavior of `+=` for ruby built-in types such as string or array.
We want to have an extension point to redefine `+=` for our library such as NArray.
How it should behave is the design...
sonots (Naotoshi Seo)
06:03 AM Feature #14701: If the object is not frozen, I want to be able to redefine the compound assignment operator.
I agree with matz and eregon.
Honestly, I first thought that it was a good idea to split `+` and `+=`. But by investigating Python, I now think that it easily leads to strange behavior. One example is what eregon and sonots said:
...
mame (Yusuke Endoh)
04:24 AM Feature #14701: If the object is not frozen, I want to be able to redefine the compound assignment operator.
> Most notably, it means other variables pointing to the same NArray would get modified in place by +=, which seems highly unexpected.
It seems expected and natural for me. It behaves similarly with other destructive methods of ruby:
...
sonots (Naotoshi Seo)
03:58 AM Feature #14701: If the object is not frozen, I want to be able to redefine the compound assignment operator.
What about
```ruby
na = Numo::Int32[5, 6]
a = na.inplace
a += 1
```
nobu (Nobuyoshi Nakada)
01:17 AM Feature #14701: If the object is not frozen, I want to be able to redefine the compound assignment operator.
Former NArray had `add!` method, but it results in a confused result.
~~~ ruby
require 'narray'
a = NArray.int(2,2).indgen!
a[1,true] += 10
p a
# => NArray.int(2,2):
# [ [ 0, 11 ],
# [ 2, 13 ] ]
a = NArray.int(2,...
masa16 (Masahiro Tanaka)
06:04 AM Feature #13618: [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
samuel@oriontransfer.org wrote:
> If you are unsure of a good definition for the reactor
> pattern, I think this is a good one:
> https://en.wikipedia.org/wiki/Reactor_pattern except the
> assumption that you need to invert flow con...
normalperson (Eric Wong)
04:57 AM Feature #13618: [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
If you are unsure of a good definition for the reactor pattern, I think this is a good one: https://en.wikipedia.org/wiki/Reactor_pattern except the assumption that you need to invert flow control which is not necessary using fibers.
...
ioquatix (Samuel Williams)
12:12 AM Bug #14712 (Closed): test_step does not work for implementations with full 64-bit fixnum
Applied in changeset trunk|r63261.
----------
test_numeric.rb: loose precision assertion
* test/ruby/test_numeric.rb (TestNumeric#test_step): remove a
loose precision assertion, as Float cannot keep complete
precision. [ruby-core:...
nobu (Nobuyoshi Nakada)
12:12 AM Revision 4ac77028 (git): * 2018-04-26
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
12:12 AM Revision b7d260f1 (git): test_numeric.rb: loose precision assertion
* test/ruby/test_numeric.rb (TestNumeric#test_step): remove a
loose precision assertion, as Float cannot keep complete
precision. [ruby-core:86684] [Bug #14712]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63261 b2dd03c8-39d4-...
nobu (Nobuyoshi Nakada)
 

Also available in: Atom