Project

General

Profile

Activity

From 10/28/2020 to 11/03/2020

11/03/2020

10:09 PM Revision bf1047c7 (git): Update NEWS for Array methods change
jeremyevans (Jeremy Evans)
10:02 PM Bug #6087 (Closed): How should inherited methods deal with return values of their own subclass?
Applied in changeset commit:git|2a294d499bf03211d02695f613f784a05943ea35.
----------
Make Array methods return Array instances instead of subclass instances
This changes the following methods to return Array instances instead
of subcla...
jeremyevans (Jeremy Evans)
10:01 PM Revision 2a294d49 (git): Make Array methods return Array instances instead of subclass instances
This changes the following methods to return Array instances instead
of subclass instances:
* Array#drop
* Array#drop_while
* Array#flatten
* Array#slice!
* Array#slice/#[]
* Array#take
* Array#take_while
* Array#uniq
* Array#*
Fixes [...
jeremyevans (Jeremy Evans)
09:14 PM Feature #17298: Ractor's basket communication APIs
Eregon (Benoit Daloze) wrote in #note-15:
> `Ractor#receive_and_sender` (aka `recvfrom` but with a proper name) and `Ractor.yield_and_sender` would be enough for that, right?
Yes, it is enough. However, the name is too long and ambiguou...
ko1 (Koichi Sasada)
08:20 PM Feature #17298: Ractor's basket communication APIs
ko1 (Koichi Sasada) wrote in #note-14:
> Beside the performance, I want to use it for the features:
> ...
`Ractor#receive_and_sender` (aka `recvfrom` but with a proper name) and `Ractor.yield_and_sender` would be enough for that, right...
Eregon (Benoit Daloze)
04:35 PM Feature #17298: Ractor's basket communication APIs
Beside the performance, I want to use it for the features:
> Ractor::Basket#sender returns the sending ractor.
> ...
ko1 (Koichi Sasada)
08:25 PM Misc #17299: DevelopersMeeting20201120Japan
* [Bug #17197] Yielding arity for `Hash` methods (marcandre)
* `Hash#each` with arity 1: confirmed?
* `#select`, `#keep_if`, `#delete_if`, `#reject` and `to_h` should also be changed, right?
* `#map`: should only accept arity 1,...
marcandre (Marc-Andre Lafortune)
10:13 AM Misc #17299: DevelopersMeeting20201120Japan
* [Feature #13381] Expose rb_fstring and its family to C extensions (byroot)
* The feature itself was approved, however we're still waiting on an agreement on the naming of one function (https://github.com/ruby/ruby/pull/3586)
* Bo...
byroot (Jean Boussier)
03:55 PM Revision 7d6c72dc (git): * 2020-11-04 [ci skip]
git[bot]
03:51 PM Revision 70063757 (git): Rightward assignment is replaced by one-line pattern matching
ktsj (Kazuki Tsujimoto)
02:47 PM Bug #17305 (Closed): rb_rescue2() seems to loop forever if given a non-module for rescued exceptions on <= 2.6.6
Specifically,
```ruby
it "raises TypeError if one of the passed exceptions is not a Module" do
-> {
@s.rb_rescue2(-> *_ { raise RuntimeError, "foo" }, :no_exc, -> x { x }, :exc, Object.new, 42)
}.shou...
Eregon (Benoit Daloze)
02:32 PM Revision c3e2dd07 (git): test/ruby/test_gc_compact.rb: suppress "assigned but unused variable"
mame (Yusuke Endoh)
01:25 AM Revision fa748401 (git): Add links to the tickets [ci skip]
znz (Kazuhiro NISHIYAMA)
12:48 AM Revision 4f7d27a2 (git): Fix typo in the auto compact announcement [ci-skip]
I'm sorry, but I think there is a typo here.
This fix will help folks who are trying to translate this announcement to other languages. I hope this is not a joke and I didn't get it 🙏
lucianosousa (Luciano Sousa)

11/02/2020

11:57 PM Bug #17304 (Feedback): Ruby stuck calling sched_yield on fork
Can you reproduce this issue with the master branch, or at least Ruby 2.6 or 2.7? The code you posted from Ruby 2.5 is no longer present in Ruby 2.6 or later versions. Ruby 2.5 is in security maintenance mode, and this doesn't appear t... jeremyevans0 (Jeremy Evans)
12:51 PM Bug #17304 (Closed): Ruby stuck calling sched_yield on fork
We have been encountering intermittent bug when using fork - the interpreter process gets stuck in a loop that keeps calling sched_yield. This keeps happening seemingly randomly every few days, while working correctly most of the time. (... thinline (THINline s.r.o.)
10:43 PM Feature #17176 (Closed): GC.auto_compact / GC.auto_compact=(flag)
Applied in changeset commit:git|67b2c21c327c96d80b8a0fe02a96d417e85293e8.
----------
Add `GC.auto_compact= true/false` and `GC.auto_compact`
* `GC.auto_compact=`, `GC.auto_compact` can be used to control when
compaction runs. Settin...
tenderlovemaking (Aaron Patterson)
10:43 PM Revision 46f3b68f (git): * 2020-11-03 [ci skip]
git[bot]
10:42 PM Revision 67b2c21c (git): Add `GC.auto_compact= true/false` and `GC.auto_compact`
* `GC.auto_compact=`, `GC.auto_compact` can be used to control when
compaction runs. Setting `auto_compact=` to true will cause
compaction to occurr duing major collections. At the moment,
compaction adds significant overhead to ...
tenderlovemaking (Aaron Patterson)
08:45 PM Misc #17299: DevelopersMeeting20201120Japan
* [Feature #17143] Improve support for warning categories (jeremyevans0)
* I researched the Python warning categories, and provided some analysis.
* Can we decide on warning categories so they can be implemented in time for Ruby 3?...
jeremyevans0 (Jeremy Evans)
11:15 AM Misc #17299: DevelopersMeeting20201120Japan
* [Feature #17303] Make webrick to bundled gems or remove from stdlib
* Any objection?
hsbt (Hiroshi SHIBATA)
08:39 PM Feature #17303: Remove webrick from stdlib
It seems like the more fundamental thing we need is more maintainers for WEBrick.
Even if it's removed from stdlib, people will still install it for some existing use cases.
Eregon (Benoit Daloze)
08:37 PM Feature #17303: Remove webrick from stdlib
Doesn't RubyGems depend on WEBrick (notably for `gem server`)?
It seems also RDoc depends on it.
And I know `ruby -run -e httpd . -p8080` depends on it as well.
I think having a basic HTTP server in stdlib is important (bundled gem ...
Eregon (Benoit Daloze)
05:04 PM Feature #17303: Remove webrick from stdlib
I am in favor of this change. I prefer removing webrick from stdlib, as otherwise we are still likely to be shipping vulnerable code if there is a security issue in webrick. Moving webrick from default gems to bundled gems doesn't chan... jeremyevans0 (Jeremy Evans)
11:13 AM Feature #17303 (Closed): Remove webrick from stdlib
I propose to move webrick to bundled gems or remove it from stdlib of ruby.
We have several vulnerability issues in webrick gem.
https://www.ruby-lang.org/en/news/2020/09/29/http-request-smuggling-cve-2020-25613/
The ruby core t...
hsbt (Hiroshi SHIBATA)
08:23 PM Feature #17298: Ractor's basket communication APIs
ko1 (Koichi Sasada) wrote in #note-10:
> I rewrote copying logic without marshal protocol (https://github.com/ruby/ruby/pull/3728).
That is great!
I remember doing something quite similar in https://eregon.me/thesis/mozart2slides....
Eregon (Benoit Daloze)
08:17 PM Feature #17298: Ractor's basket communication APIs
marcandre (Marc-Andre Lafortune) wrote in #note-11:
> The use-case seems unusual:
> ...
That sounds like the perfect anti-pattern to me, so agreed this new APIs seem overkill for now and not worth it.
If it's a big object:
* If it ...
Eregon (Benoit Daloze)
07:45 PM Feature #17298: Ractor's basket communication APIs
The use-case seems unusual:
- Need to send very big object to a Ractor
- That object can not be deep-frozen for some reason, or moved so it deep-copied
- The receiving Ractor needs to send it to another Ractor
Even given this "extr...
marcandre (Marc-Andre Lafortune)
05:41 AM Feature #17298: Ractor's basket communication APIs
I rewrote copying logic without marshal protocol (https://github.com/ruby/ruby/pull/3728).
Additional benchmark:
```ruby
Warning[:experimental] = false
if ENV['MODE'] == 'share'
MODE = :copy
SHAREABLE = true
else
MODE...
ko1 (Koichi Sasada)
02:31 PM Feature #16604: Set default for Encoding.default_external to UTF-8 on Windows
@usa @nobu @naruse Could you please take a look at this request? I pushed an updated patch here: https://github.com/ruby/ruby/pull/2877
larskanis (Lars Kanis)
01:49 PM Revision 79b24226 (git): ripper: Invalid pragma value warning
nobu (Nobuyoshi Nakada)
09:24 AM Revision 539b8907 (git): Compare boolean values for parser pragma locale-insensitively
nobu (Nobuyoshi Nakada)
08:31 AM Revision bdcfa70b (git): strip trailing spaces [ci skip]
nobu (Nobuyoshi Nakada)
07:58 AM Bug #17302: The TracePoint API does not allow setting multiple line traces within the same method (ISEQ)
liran.last@gmail.com (Liran Haimovitch) wrote in #note-1:
> liran.last@gmail.com (Liran Haimovitch) wrote:
> ...
After some additional investigation, it seems that when adding multiple breakpoints to the same method (ISEQ) only the las...
liran.last@gmail.com (Liran Haimovitch)

11/01/2020

06:31 PM Revision 5fefb532 (git): Copy for Ractor.send() without marshal.
Now copying objects do not need marshal protocol. ko1 (Koichi Sasada)
05:25 PM Bug #17301 (Third Party's Issue): /sbin/yast2: line 468: 3147 Aborted
This bug occurs inside a 3rd party C extension. From the backtrace:
```
/lib64/libc.so.6(0x7fde5f1185a0) [0x7fde5f1185a0]
/usr/lib64/liby2.so.4(_ZN17Y2PluginComponent10loadPluginEPKc+0x688) [0x7fde5d8ea208]
/usr/lib64/liby2.so.4(_...
jeremyevans0 (Jeremy Evans)
08:37 AM Bug #17301 (Third Party's Issue): /sbin/yast2: line 468: 3147 Aborted
Starting the software administration fails with a core dump.
Ruby version
ruby 2.5.8p224 (2020-03-31 revision 67882) [x86_64-linux-gnu]
Kernel version
OpenSUSE
Linux 5.3.18-lp152.47-default #1 SMP Thu Oct 15 16:05:25 UTC 2020 (4...
Siegfried.Ehlert (Siegfried Ehlert)
04:37 PM Revision 1581da99 (git): * 2020-11-02 [ci skip]
git[bot]
04:37 PM Revision db7a3b63 (git): suppport Ractor.send(move: true) for more deta
This patch allows to move more data types. ko1 (Koichi Sasada)
11:54 AM Bug #17302: The TracePoint API does not allow setting multiple line traces within the same method (ISEQ)
liran.last@gmail.com (Liran Haimovitch) wrote:
> When setting a second line tracepoint within a method the first one will be turned off.
> ...
Attaching a short file to reproduce the bug, based on the existing `enable_spec.rb` in the R...
liran.last@gmail.com (Liran Haimovitch)
10:19 AM Bug #17302 (Closed): The TracePoint API does not allow setting multiple line traces within the same method (ISEQ)
While setting a tracepoint for a line for the second time within a method, the first one turns off.
I believe this is because the `encoded_iseq_trace_instrument` function resets the trace value of an instruction rather than just turni...
liran.last@gmail.com (Liran Haimovitch)
10:00 AM Revision 963359a7 (git): Use the suppress_warning helper instead of doing it manually
ktsj (Kazuki Tsujimoto)
09:19 AM Revision 7282f311 (git): Suppress "One-line pattern matching is experimental" warning
ktsj (Kazuki Tsujimoto)
08:37 AM Revision e0e2492c (git): Fix Rubyspec (ruby-2.7) failures
https://github.com/ruby/ruby/runs/1337845174 ktsj (Kazuki Tsujimoto)
07:19 AM Revision e03e1982 (git): Change NODE layout for pattern matching
I prefer pconst to be the first element of NODE.
Before:
| ARYPTN | FNDPTN | HSHPTN
---+--------+--------+-----------
u1 | imemo | imemo | pkwargs
u2 | pconst | pconst | pconst
u3 | apinfo | fpinfo | pkwresta...
ktsj (Kazuki Tsujimoto)
05:12 AM Revision 305c79af (git): ext/socket/rubysocket.h: avoid the conflict of T_DATA definition in AIX
Rei Odaira
04:55 AM Revision 0e33028d (git): use one-line pattern matching for warning tests
ko1 (Koichi Sasada)
04:36 AM Revision b1e7c3a3 (git): * 2020-11-01 [ci skip]
git[bot]
04:33 AM Revision b6015324 (git): Pattern matching is no longer experimental
ktsj (Kazuki Tsujimoto)

10/31/2020

07:08 PM Feature #17298: Ractor's basket communication APIs
BTW, for `recvfrom` feature, we need more 2 APIs.
This API can cover this feature (and it is more extendable), so I don't think "4" APIs are heavy.
ko1 (Koichi Sasada)
07:05 PM Feature #17298: Ractor's basket communication APIs
Eregon (Benoit Daloze) wrote in #note-4:
> For the first example, isn't `move: true` much simpler?
There are two problems:
* Now, many types are not support on `move: true`. I'll investigate more, but not sure we can support for all da...
ko1 (Koichi Sasada)
11:05 AM Feature #17298: Ractor's basket communication APIs
In the example above, using `, move: true` for Ractor.yield and Ractor#send, instead of the `_basket` calls seems to give the same or better performance.
(code at https://gist.github.com/eregon/092ea76534b46e227d9cbf5fd107de66)
It runs...
Eregon (Benoit Daloze)
11:00 AM Feature #17298: Ractor's basket communication APIs
From the benchmark above, USE_BASKET=false takes for me `5.636s`.
Adding `Ractor.make_shareable(ary)`, it takes `0.192s`.
So that's ~10x faster than with `w/ basket API` on this benchmark, and does not require new APIs and concepts.
...
Eregon (Benoit Daloze)
10:47 AM Feature #17298: Ractor's basket communication APIs
For the first example, isn't `move: true` much simpler?
```ruby
bridge = Ractor.new do
Ractor.yield Ractor.receive, move: true
end
consumer = Ractor.new bridge do |from|
obj = from.take
do_task(obj)
end
msg = [1, 2, 3]
bridge.sen...
Eregon (Benoit Daloze)
11:47 AM Bug #17300 (Closed): The Fiber scheduler does not work with ConditionVariable
When looking at replacing `kernel_sleep` by `blocking`, I found an independent bug.
ConditionVariable does not seem to work with the Fiber scheduler currently.
There is an existing test in https://github.com/ruby/ruby/blob/4f8d9b0db84c...
Eregon (Benoit Daloze)
02:56 AM Revision 4f8d9b0d (git): Revert "Use adjusted sp on `iseq_set_sequence()`" and "Delay `remove_unreachable_chunk()` after `iseq_set_sequence()`"
This reverts commit 3685ed7303fc08bf68cd3cc8d11e22a8ce63a067 and 5dc107b03f5cf32656a5308574b90458486c633c.
Because of some CI failures https://github.com/ruby/ruby/pull/3404#issuecomment-719868313.
wanabe (_ wanabe)
02:06 AM Revision ea8fc7fd (git): [DOC] standard_library.rdoc: tweaked to make style consistent
[ci skip] nobu (Nobuyoshi Nakada)
01:51 AM Revision dd2f99d9 (git): Removed unused variable
nobu (Nobuyoshi Nakada)
12:56 AM Feature #17294: Feature: Allow method chaining with Pathname#mkpath Pathname#rmtree
I would like this too. I've been using [Refinements](https://www.alchemists.io/projects/refinements/#_pathname) to improve Pathname behavior but this would be better. bkuhlmann (Brooke Kuhlmann)
12:55 AM Misc #17299 (Closed): DevelopersMeeting20201120Japan
# The next dev meeting
**Date: 2020/11/20 13:00-17:00**
Place/Sign-up/Agenda/Log: https://github.com/ruby/dev-meeting-log/blob/master/DevelopersMeeting20201120Japan.md
- Dev meeting *IS NOT* a decision-making place. All decisions ...
mame (Yusuke Endoh)
12:55 AM Misc #17200 (Closed): DevelopersMeeting20201026Japan
mame (Yusuke Endoh)
12:18 AM Revision 3685ed73 (git): Use adjusted sp on `iseq_set_sequence()`
wanabe (_ wanabe)
12:18 AM Revision 5dc107b0 (git): Delay `remove_unreachable_chunk()` after `iseq_set_sequence()`
wanabe (_ wanabe)

10/30/2020

11:47 PM Revision 670e288d (git): Add warning for str_new_static functions
Many functions in string.c assume that capa + termlen to be readable
memory. Add comment in header to communicate this to extension authors.
See also: comment in str_fill_term()
alanwu (Alan Wu)
11:34 PM Revision 520b86ca (git): Move variable closer to usage
alanwu (Alan Wu)
10:26 PM Bug #16809: Fiber crashes with --with-coroutine=copy
I tried pull request #3624 on OpenBSD/sparc64 and it still crashed.
I was able to come up with a fix that works on OpenBSD/sparc64, as long as a couple files are compiled without optimization: https://github.com/ruby/ruby/pull/3726
jeremyevans0 (Jeremy Evans)
07:22 PM Revision bd6cd851 (git): Tweak return of `Ractor#close`, add doc
Marc-Andre Lafortune
06:30 PM Feature #17298 (Open): Ractor's basket communication APIs
This ticket proposes `send_basket`/`receive_basket`, `yield_basket`/`take_basket` APIs to make effective and flexible bridge ractors.
## Background
When we want to send an object as a message, we usually need to copy it. Copying is...
ko1 (Koichi Sasada)
04:48 PM Revision 7c548278 (git): * 2020-10-31 [ci skip]
git[bot]
04:48 PM Revision fd089276 (git): Ractor's "will" doesn't need copying.
`r = Ractor.new{ expr }` generates the block return value from `expr`
and we can get this value by `r.take`. Ractor.yield and Ractor#take
passing values by copying on default. However, the block return value
(we named it "will" in the co...
ko1 (Koichi Sasada)
03:32 PM Bug #17293 (Rejected): URI.parse fails to parse correctly URN or other special characters in path/url
greg.howdeshell (Greg Howdeshell) wrote:
> URI.parse looks to fail parsing endpoints that have special characters. For example:
> ...
This is expected. The `#/applications/` is an anchor/fragment, not part of the path (path is `/`). ...
jeremyevans0 (Jeremy Evans)
02:58 PM Bug #17293 (Rejected): URI.parse fails to parse correctly URN or other special characters in path/url
URI.parse looks to fail parsing endpoints that have special characters. For example:
``` ruby
url = 'http://foobar.com/#/applications/'
path = 'my_application'
URI.join(url, path).to_s
```
The result renders `http://foobar.com/my...
greg.howdeshell (Greg Howdeshell)
03:09 PM Feature #17297 (Closed): Feature: Introduce Pathname.mktmpdir

When I want to create a tmpdir I often want to manipulate it as a pathname. By introducing Pathname.mktmpdir I can get this behavior.
Currently I must:
```ruby
Dir.mktmpdir do |dir|
dir = Pathname(dir)
# ... code
end
``...
schneems (Richard Schneeman)
03:08 PM Feature #17296 (Feedback): Feature: Pathname#chmod use FileUtils.chmod instead of File

The `FileUtils.chmod` provides the same numerical interface as `File.chmod` and it also includes a "symbolic mode" interface. With this patch you'll be able to run this code:
```ruby
Pathname.new("bin/compile").chmod("+x")
```
...
schneems (Richard Schneeman)
03:06 PM Feature #17295 (Rejected): Feature: Create a directory and file with Pathname#touch

Right now if a developer wants to create a file and is not sure if the path exists yet or not they must:
```ruby
Pathname.new("/a/b/c/d.txt").tap {|p| p.dirname.mkpath; FileUtils.touch(p)}
```
After this patch a developer can...
schneems (Richard Schneeman)
03:04 PM Feature #17294 (Closed): Feature: Allow method chaining with Pathname#mkpath Pathname#rmtree

Currently in my code when I want to create a pathname object and create a path at the same time I must use tap
```
path = Pathname.new("/tmp/new").tap(&:mkpath)
```
I think it would be cleaner to be able to chain on the results...
schneems (Richard Schneeman)
12:45 PM Revision 66bf743b (git): Promote debug.rb to default gems.
It have no upstream repo yet. This change is experimental for 3.0.0-preview2. hsbt (Hiroshi SHIBATA)
10:07 AM Feature #17277: Make Enumerator#with_index yield row and col indices for Matrix
sawa (Tsuyoshi Sawada) wrote in #note-7:
> I think the current behaviour is natural. You cannot play around with `with_index` since its receiver is `Enumerator`, not `Matrix`, and the information as a matrix is already gone.
> ...
I ge...
greggzst (Grzegorz Jakubiak)
08:11 AM Bug #17158 (Feedback): Ractor Segfault when using shell and puts
ko1 (Koichi Sasada)
08:11 AM Bug #17158: Ractor Segfault when using shell and puts
sorry to be late, but I can't reproduce this issue.
`while PUTS_RACTORS=1 WORK=shell make run; do date; done` doesn't show any errors on my environment (ruby 3.0.0dev (2020-10-29T15:09:12Z master 502d6d8459) [x86_64-linux]).
recent...
ko1 (Koichi Sasada)
07:52 AM Revision 89c8ca32 (git): add a test of define_method with shareable Proc.
a method defined by define_method with normal Proc can not cross
ractors because the normal Proc is not shareable. However,
shareable Proc can be crossed between ractors, so the method with
shareable Proc should be called correctly.
ko1 (Koichi Sasada)
07:52 AM Revision 08ddc335 (git): sync vm->waiting_fds correctly.
vm->waiting_fds is global resource so we need to lock it correctly.
(forgot to sync one place)
ko1 (Koichi Sasada)
06:18 AM Revision a1828a1f (git): Promote win32ole to default gems.
But win32ole gem is still experimental for 3.0.0-preview2.
I'm working to extract this library on https://github.com/ruby/win32ole.
hsbt (Hiroshi SHIBATA)
03:30 AM Revision 17c6b6b1 (git): Fix a typo [ci skip]
znz (Kazuhiro NISHIYAMA)
03:26 AM Revision 799253dc (git): strip trailing spaces [ci skip]
nobu (Nobuyoshi Nakada)
12:21 AM Feature #17291: Optimize __send__ call
I'm neutral (at least no against it). `__send__` in general has other usages than to reroute method visibilities. Optimising it could benefit good wills. shyouhei (Shyouhei Urabe)
12:17 AM Feature #17288: Optimize __send__ call with a literal method name
JFYI I learned the use of "immediate" refinement from rails.
https://github.com/rails/rails/pull/27363
shyouhei (Shyouhei Urabe)
12:17 AM Feature #17261: Software transactional memory (STM) for Threads and Ractors
chrisseaton (Chris Seaton) wrote in #note-14:
> I think there's benefits to building STM into the language (if we decided we want STM at all) rather than it being a library.
I think so, especially with Ractors, but now we (*I*) don't...
ko1 (Koichi Sasada)

10/29/2020

08:54 PM Feature #17261: Software transactional memory (STM) for Threads and Ractors
I think there's benefits to building STM into the language (if we decided we want STM at all) rather than it being a library.
When you look at more advanced features like conflict resolution and conflict mitigation you may want to do ...
chrisseaton (Chris Seaton)
07:40 PM Feature #17261: Software transactional memory (STM) for Threads and Ractors
Eregon (Benoit Daloze) wrote in #note-12:
> I was talking about the namespace
Ah, I see.
ko1 (Koichi Sasada)
07:22 PM Feature #17261: Software transactional memory (STM) for Threads and Ractors
ko1 (Koichi Sasada) wrote in #note-11:
> You wrote "under Thread and not under Ractor". What does it mean?
I was talking about the namespace, the proposal is Thread::TVar (and not Ractor::TVar), which I agree is a good namespace for ...
Eregon (Benoit Daloze)
06:19 PM Feature #17261: Software transactional memory (STM) for Threads and Ractors
Eregon (Benoit Daloze) wrote in #note-10:
> That does not work with Ractor though (at least currently).
You wrote "under Thread and not under Ractor". What does it mean?
ko1 (Koichi Sasada)
05:21 PM Feature #17261: Software transactional memory (STM) for Threads and Ractors
ko1 (Koichi Sasada) wrote in #note-8:
> For this purpose, concurrent-ruby provides TVar for threads.
That does not work with Ractor though (at least currently).
Eregon (Benoit Daloze)
04:03 PM Feature #17261 (Rejected): Software transactional memory (STM) for Threads and Ractors
ko1 (Koichi Sasada)
04:03 PM Feature #17261: Software transactional memory (STM) for Threads and Ractors
> I think it would be nice to make it its own gem (tvar maybe?) given it's under Thread and not under Ractor, and it could most likely work on other Ruby implementations (e.g., TruffleRuby).
For this purpose, concurrent-ruby provides ...
ko1 (Koichi Sasada)
08:12 PM Feature #17288: Optimize __send__ call with a literal method name
How about a private module instead?
```ruby
class Foo
module Helpers
def self.special # General users should not call or rely on `special`
:special
end
end
private_constant :Helpers
def foo
Helpers.special
en...
Eregon (Benoit Daloze)
04:06 AM Feature #17288: Optimize __send__ call with a literal method name
shyouhei (Shyouhei Urabe) wrote in #note-9:
> @marcandre Here you are:
> ...
0) I was wrong, I retract what I said.
1) My mind is blown. I have always thought of refinements as a way to safely monkey-patch other people's classes, in...
marcandre (Marc-Andre Lafortune)
12:11 AM Feature #17288: Optimize __send__ call with a literal method name
@marcandre Here you are:
```ruby
class Foo
using Module.new {
refine Foo.singleton_class do
def special
end
end
}
def foo
self.class.special
end
class Bar
def foo
Foo.specia...
shyouhei (Shyouhei Urabe)
07:53 PM Feature #17273: shareable_constant_value pragma
Eregon (Benoit Daloze) wrote in #note-16:
> Eregon (Benoit Daloze) wrote in #note-14:
> ...
I agree that it's relatively rare and not a good idea. However, Sequel does this (Sequel::DATABASES). It's been around since 2008 and many ex...
jeremyevans0 (Jeremy Evans)
07:47 PM Feature #17273: shareable_constant_value pragma
Eregon (Benoit Daloze) wrote in #note-16:
> I guess it's relatively rare that a gem would (intentionally) expose a non-frozen constant as part of its API, and that the gem relies on being able to mutate it.
To confirm it, we will int...
ko1 (Koichi Sasada)
07:33 PM Feature #17273: shareable_constant_value pragma
Eregon (Benoit Daloze) wrote in #note-14:
> Of course, no gems should directly mutate constants of another gem.
I missed that the gem doesn't need to mutate `A` to break `OtherLib`.
I guess it's relatively rare that a gem would (intenti...
Eregon (Benoit Daloze)
07:29 PM Feature #17273: shareable_constant_value pragma
ko1 (Koichi Sasada) wrote in #note-13:
> if lits contains Ruby expression, SyntaxError
Could you give an example?
SyntaxError doesn't seem OK to me. It should simply not freeze if not a literal.
Eregon (Benoit Daloze)
07:26 PM Feature #17273: shareable_constant_value pragma
ko1 (Koichi Sasada) wrote in #note-12:
> * It is possible to break other library easily:
That sounds very bad code breaking the encapsulation of that other library.
Of course, no gems should directly mutate constants of another gem....
Eregon (Benoit Daloze)
04:14 PM Feature #17273: shareable_constant_value pragma
By discussing with Matz and several MRI committers, we decided to introduce conservative option and radical option as experimental.
* the name of pragma is `shareable_constant_value` because it affects values referred from constants (...
ko1 (Koichi Sasada)
07:49 PM Feature #17284: Shareable Proc
`Ractor.make_shareable` does traverse reachable and not-already-shareable objects for other objects than Procs, it seems bad that it behaves differently for Proc.
I think the intention is clear with `Ractor.make_shareable(Proc.new{p a})...
Eregon (Benoit Daloze)
06:12 PM Feature #17284 (Closed): Shareable Proc
Applied in changeset commit:git|5d97bdc2dcb835c877010daa033cc2b1dfeb86d6.
----------
Ractor.make_shareable(a_proc)
Ractor.make_shareable() supports Proc object if
(1) a Proc only read outer local variables (no assignments)
(2) read out...
ko1 (Koichi Sasada)
03:47 PM Feature #17284: Shareable Proc
By discussion with Matz and several MRI committers, we decided that making shareable Proc should be more conservative.
* `Ractor.make_shareable(read_values)` should be danger to freeze objects unexpectedly.
* if all read variables are s...
ko1 (Koichi Sasada)
07:42 PM Misc #16778: Should we stop vendoring default gems code?
@hsbt there was no response to https://bugs.ruby-lang.org/issues/16778#note-22
How about reopening this issue?
@deivid Are you still interested to do that PoC for a single default gem?
I think it would be helpful to make progress on...
Eregon (Benoit Daloze)
10:51 AM Misc #16778: Should we stop vendoring default gems code?
>Now after the recent positive comments you changed the status to "rejected". Could you clarify?
It's my mistake.
But no one submit a patch for this issue while 6 months. I reject this.
hsbt (Hiroshi SHIBATA)
06:12 PM Revision 5d97bdc2 (git): Ractor.make_shareable(a_proc)
Ractor.make_shareable() supports Proc object if
(1) a Proc only read outer local variables (no assignments)
(2) read outer local variables are shareable.
Read local variables are stored in a snapshot, so after making
shareable Proc, any...
ko1 (Koichi Sasada)
04:28 PM Feature #16670 (Closed): Reverse order of `expression` in `pattern` for 1-line pattern matching while it's still experimental
jeremyevans0 (Jeremy Evans)
04:23 PM Feature #16670: Reverse order of `expression` in `pattern` for 1-line pattern matching while it's still experimental
There were notes in the recent dev meeting that affect this issue: https://github.com/ruby/dev-meeting-log/blob/master/DevelopersMeeting20201026Japan.md#feature-17260-promote-pattern-matching-to-official-feature-ktsj
`=>` is a new fea...
ttilberg (Tim Tilberg)
04:06 PM Feature #17159: extend `define_method` for Ractor
marcandre (Marc-Andre Lafortune) wrote in #note-8:
> How about:
> ...
Matz, how about this proposal?
ko1 (Koichi Sasada)
04:05 PM Feature #17256 (Closed): Freeze all Regexp objects
commit:7ad56fd87b35abf4933e0146761df91e9ec9890a ko1 (Koichi Sasada)
04:05 PM Feature #17269 (Closed): Frozen Process::Status
commit:1c6ebe14fbdb2bc23878133cbf7a99ea856e3d89 ko1 (Koichi Sasada)
03:09 PM Bug #17254 (Closed): ENV.replace may set nil instead of the proper value
Applied in changeset commit:git|c0aeb98aa903334f06758d39c772cb22440d8a4e.
----------
Make ENV.replace handle multiple environ entries with the same key
While it is expected that all environment keys are unique, that is
not enforced. It...
jeremyevans (Jeremy Evans)
03:09 PM Revision 502d6d84 (git): * 2020-10-30 [ci skip]
git[bot]
03:08 PM Revision c0aeb98a (git): Make ENV.replace handle multiple environ entries with the same key
While it is expected that all environment keys are unique, that is
not enforced. It is possible by manipulating environ directly you
can call a process with an environment with duplicate keys. If
ENV.replace was passed a hash with a key...
jeremyevans (Jeremy Evans)
02:42 PM Revision 07c03bc3 (git): check isolated Proc more strictly
Isolated Proc prohibit to access outer local variables, but it was
violated by binding and so on, so they should be error.
ko1 (Koichi Sasada)
09:48 AM Bug #16651: Extensions Do Not Compile on Mingw64 with mingw32-make
It would replace "C:/MSYS64/..." as "/C/MSYS64/...".
Where did a slash go?
nobu (Nobuyoshi Nakada)
06:34 AM Bug #16651: Extensions Do Not Compile on Mingw64 with mingw32-make
This is still and issue with Ruby 2.7.2.
The offending line of code is now at line 1908 in mkmf.rb.
cfis (Charlie Savage)
09:14 AM Revision bf951c76 (git): An ellipsis (...) can only be placed at the beginning
nobu (Nobuyoshi Nakada)
06:26 AM Feature #17292: Hash Shorthand / Punning
I would agree this is a duplicate, but in the last year we have had the introduction of the pattern matching syntax which makes this less of a syntactical oddity than it may have been in the past. baweaver (Brandon Weaver)
05:07 AM Feature #17292 (Closed): Hash Shorthand / Punning
### Set Literal vs Javascript Object Punning
There was a proposal for a Set literal here: https://bugs.ruby-lang.org/issues/16989
```ruby
set = { 1, 2, 3 }
```
...but it was brought up that this is similar to the Javascript Ob...
baweaver (Brandon Weaver)
05:50 AM Bug #17142: Ruby fails to build in AIX
Are you using GCC to build ruby? What was the error you hit? ReiOdaira (Rei Odaira)
05:22 AM Feature #17168 (Closed): Bundle RBS
Applied at commit:ba889100d850e973e519cebc48d5b4f1e8ab0034 hsbt (Hiroshi SHIBATA)
04:51 AM Feature #17290: Syntax sugar for boolean keyword argument
I would concur with Marc-Andre on this one, I believe punning would be a more valuable feature, especially for keyword arguments.
Examples:
```ruby
def method_name(foo: 1, bar: 2, baz: 3)
foo + bar + baz
end
foo = 1
bar = 2
baz = 3
...
baweaver (Brandon Weaver)
04:29 AM Feature #17290: Syntax sugar for boolean keyword argument
I'm personally hoping that `strip: ` could be syntax sugar for `strip: strip`... marcandre (Marc-Andre Lafortune)
02:54 AM Feature #17290 (Closed): Syntax sugar for boolean keyword argument
We frequently use keyword arguments just to pass `true` value out of the truthy/falsy options given. And in many such cases, the falsy option is set as the default, and only the truthy value is ever passed explicitly. I propose to have a... sawa (Tsuyoshi Sawada)
03:05 AM Feature #17291 (Assigned): Optimize __send__ call
I made a patch to optimize a `__send__` call. This optimization replaces a `__send__` method call with a call of the method whose name is the first argument of `__send__` method. The patch is available in [this pull-request](https://gith... mrkn (Kenta Murata)
02:34 AM Bug #17289: Time#strftime occurs Segmentation Fault on ruby-2.7.2p137
Let me tell you that I currently have no idea what is going on. If `rb_funcall` is broken the situation must be more catastrophic than what is reported here (happens once a day). shyouhei (Shyouhei Urabe)
01:35 AM Revision 9f3adaf5 (git): Use public allocators for creating new T_OBJECT objects
This way the header flags and object internals are set correctly tenderlovemaking (Aaron Patterson)

10/28/2020

11:11 PM Revision d8b0f1f7 (git): Objects are born embedded, so we don't need to check ivpr
It's not necessary to check ivpt because objects are allocated as
"embedded" by default
tenderlovemaking (Aaron Patterson)
10:48 PM Bug #17142: Ruby fails to build in AIX
I've added a pull request to fix this, though I don't have the ability to test on AIX: https://github.com/ruby/ruby/pull/3717 jeremyevans0 (Jeremy Evans)
10:43 PM Feature #17206: Introduce new Regexp option to avoid global MatchData allocations
Sorry. “a huge amount of String garbage” is my misunderstanding.
But I don’t know under what situation this option may cause a bug.
scivola20 (sciv ola)
10:42 PM Bug #17255 (Closed): Installation failed for ruby version 2.7.1: unknown encoding name: binary (ArgumentError)
jeremyevans0 (Jeremy Evans)
10:29 PM Revision 58fd54f9 (git): Fix error in update-deps due to tab/space difference
jeremyevans (Jeremy Evans)
10:27 PM Bug #13768 (Closed): SIGCHLD and Thread dead-lock problem
Applied in changeset commit:git|dfb3605bbee9c3cfbc1c354594c367472f29cb35.
----------
Add Thread.ignore_deadlock accessor
Setting this to true disables the deadlock detector. It should
only be used in cases where the deadlock could be ...
jeremyevans (Jeremy Evans)
10:27 PM Revision dfb3605b (git): Add Thread.ignore_deadlock accessor
Setting this to true disables the deadlock detector. It should
only be used in cases where the deadlock could be broken via some
external means, such as via a signal.
Now that $SAFE is no longer used, replace the safe_level_ VM flag
wi...
jeremyevans (Jeremy Evans)
08:59 PM Feature #17288: Optimize __send__ call with a literal method name
Just a few things:
We need to also remember **.instance_variable_get()** and **.instance_variable_set()**.
Ruby does not quite use a similar "restriction-style" OOP like, say, java. It will
depend a lot on the style and preferences of ...
shevegen (Robert A. Heiler)
08:48 PM Feature #17288: Optimize __send__ call with a literal method name
shyouhei (Shyouhei Urabe) wrote in #note-4:
> Private methods shall not be called at the first place. Period. That is breaking encapsulation.
I wish that was the case, but Ruby access is *not expressive enough* for this to be the cas...
marcandre (Marc-Andre Lafortune)
12:32 PM Feature #17288: Optimize __send__ call with a literal method name
Eregon (Benoit Daloze) wrote in #note-5:
> Here are the first 1000 .send() usages in gems:
> ...
So? I don’t think we should follow that. If people misunderstand what an OOPL is, we would better not confirm that.
> > Private method...
shyouhei (Shyouhei Urabe)
10:09 AM Feature #17288: Optimize __send__ call with a literal method name
Here are the first 1000 .send() usages in gems:
https://gist.github.com/eregon/21c8f14c478089c1a9295c21661583a9
420 of them use a literal Symbol for the first argument.
> Private methods shall not be called at the first place. Perio...
Eregon (Benoit Daloze)
09:58 AM Feature #17288: Optimize __send__ call with a literal method name
zverok (Victor Shepelev) wrote in #note-3:
> @shyouhei what about private methods?
Private methods shall not be called at the first place. Period. That is breaking encapsulation.
Again I’m not against the ability to do such things...
shyouhei (Shyouhei Urabe)
08:34 AM Feature #17288: Optimize __send__ call with a literal method name
@shyouhei what about private methods? zverok (Victor Shepelev)
08:25 AM Feature #17288: Optimize __send__ call with a literal method name
Hello, I'm against this optimisation. `obj.__send__(:method)` should just be written as `obj.method`.
Not against the ability to write `obj.__send__(:method)`, but `obj.method` must be the preferable way and thus must be the fastest ...
shyouhei (Shyouhei Urabe)
05:52 PM Feature #17261: Software transactional memory (STM) for Threads and Ractors
I think it would be nice to make it its own gem (`tvar` maybe?) given it's under `Thread` and not under `Ractor`, and it could most likely work on other Ruby implementations (e.g., TruffleRuby).
That should also make it possible to e.g....
Eregon (Benoit Daloze)
05:29 PM Feature #17261: Software transactional memory (STM) for Threads and Ractors
I wrote a long-form blog post to give people interested in this proposed feature some context.
https://chrisseaton.com/truffleruby/ruby-stm/
I've also suggested a benchmark that we can start to use for experimenting.
chrisseaton (Chris Seaton)
05:16 PM Revision a99f52d5 (git): Remove another unnecessary test
Same as 5be42c1ef4f7ed0a8004cad750a9ce61869bd768 tenderlovemaking (Aaron Patterson)
04:57 PM Revision 5be42c1e (git): Remove unnecessary conditional
As of 0b81a484f3453082d28a48968a063fd907daa5b5, `ROBJECT_IVPTR` will
always return a value, so we don't need to test whether or not we got
one. T_OBJECTs always come to life as embedded objects, so they will
return an ivptr, and when th...
tenderlovemaking (Aaron Patterson)
04:45 PM Revision 2c19c148 (git): If an object isn't embedded it will have an ivptr
We don't need to check the existence if an ivptr because non-embedded
objects will always have one
tenderlovemaking (Aaron Patterson)
03:42 PM Revision 9190451f (git): * 2020-10-29 [ci skip]
git[bot]
03:41 PM Revision 0bbbb5a6 (git): `dest` is always embedded so we can remove this check
tenderlovemaking (Aaron Patterson)
01:12 PM Revision 93e6364a (git): merge revision(s): 07786ed
* test/net/http/test_https.rb: Stop the error due to openssl 1.1.1h
On some environments that uses OpenSSL 1.1.1h, the two tests now fail.
http://rubyci.s3.amazonaws.com/android29-x86_64/ruby-master/log/20200924T062352Z...
U.Nakamura
12:19 PM Feature #17266: Bundle TypeProf
mame (Yusuke Endoh) wrote in #note-5:
> Okay, I'll add it.
Thanks.
> ...
I think it's not a big issue if TypeProf is meant only as a CLI/standalone tool, and not a gem to `require` at runtime.
Then people can generate .rbs files ...
Eregon (Benoit Daloze)
12:40 AM Feature #17266: Bundle TypeProf
> maybe still ship it but raise a nice error if used on RUBY_ENGINE != "ruby"?
Okay, I'll add it.
> ...
Sorry. In (far) future, I'd like to improve TypeProf to use AST instead of bytecodes if this project is considered successful. ...
mame (Yusuke Endoh)
11:47 AM Bug #17212 (Feedback): FreeBSDで3.0.0-preview1のビルドが失敗する
hsbt (Hiroshi SHIBATA)
05:16 AM Bug #17289: Time#strftime occurs Segmentation Fault on ruby-2.7.2p137
Looking at it. Though I cannot reproduce this either.
mame (Yusuke Endoh) wrote in #note-2:
> This falls back to `rb_funcall`. This `rb_funcall` is replaced with `rb_funcallv_with_cc`. This should call FIXNUM's plus, but it seems ...
shyouhei (Shyouhei Urabe)
01:22 AM Revision fb3c711d (git): compile.c: separate compile_builtin_function_call (#3711)
Kenta Murata
12:47 AM Revision 8f9c113f (git): Added benchmark of vm_send by variable [ci skip]
nobu (Nobuyoshi Nakada)
 

Also available in: Atom