General

Profile

jjyr (Jinyang Jiang)

  • Login: jjyr
  • Email: jjyruby@gmail.com
  • Registered on: 02/02/2013
  • Last sign in: 05/08/2019

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 2 2 4

Activity

10/03/2018

03:16 AM Ruby Feature #15192: Introduce a new "shortcut assigning" syntax to convenient setup instance variables
I am surprised this syntax has been repeatedly requested and rejected since 7 years ago.
Write assigning code maybe is not a big problem to developers, but cause Ruby has Struct to solve the assigning problem, so at least it is a prob...
jjyr (Jinyang Jiang)

10/02/2018

04:54 AM Ruby Feature #15192 (Assigned): Introduce a new "shortcut assigning" syntax to convenient setup instance variables
Motivation:
Introduce a new syntax for convenient setup instance variables for objects.
The problem:
Currently, setup instance variables in Ruby is too verbose.
Basically, we need to write the meaningless assigning code again ...
jjyr (Jinyang Jiang)

08/16/2018

09:02 PM Ruby Feature #14982: Improve namespace system in ruby to avoiding top-level names chaos
Propose new syntax for https://bugs.ruby-lang.org/issues/14982#note-5 (The core idea is not changing)
``` ruby
# add 'isolate' keyword to describe an isolated binding scope
isolate
# .....
# can't access unimported names from ...
jjyr (Jinyang Jiang)

08/13/2018

07:05 AM Ruby Feature #14982: Improve namespace system in ruby to avoiding top-level names chaos
I can imagine how hard to implement the "requiring into isolated binding" correct in VM.
If we want to maintain the compatible we need to maintain the reference of the name cross different require/import.
Think of a situation:
`...
jjyr (Jinyang Jiang)
06:40 AM Ruby Feature #14982: Improve namespace system in ruby to avoiding top-level names chaos
shyouhei (Shyouhei Urabe) wrote:
> I like this idea in general. I too want to have "requiring into isolated Binding".
> ...
Totally agreed!
jjyr (Jinyang Jiang)

08/12/2018

09:12 AM Ruby Feature #14982: Improve namespace system in ruby to avoiding top-level names chaos
I believe namespace can reduce the complexity of organizing codes in large projects.
Recently I write rust code in a large project. Our code base is dependent on other several complex projects. With rust `use` syntax(https://doc.rust...
jjyr (Jinyang Jiang)

08/11/2018

04:26 AM Ruby Feature #14982 (Assigned): Improve namespace system in ruby to avoiding top-level names chaos
Updated: https://bugs.ruby-lang.org/issues/14982#note-5
## Why
Ruby has evaluation all class/module names in top-level context(aka TOPLEVEL_BINDING).
As a user we basically hard to know how many names in the current context, ...
jjyr (Jinyang Jiang)

02/21/2018

02:55 PM Ruby Feature #13618: [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
Pass a new arg to create GreenThread maybe introduce more problems.
For example:
```
g_thr = Thread.create(green_thread: true)
g_thr.is_a?(Thread) # => false or ture?
```
If Thread.create return a non Thread object, it's weird....
jjyr (Jinyang Jiang)
02:41 PM Ruby Feature #3187: Allow dynamic Fiber stack size
How about
``` ruby
Thread.with_configure(stack_size: 1024).new(a: 1, b: 2){}
# or
Thread::Config.new(stack_size: 1024).start(a: 1, b: 2){}
# alias start new
```
ko1 (Koichi Sasada) wrote:
> Hi,
> ...
jjyr (Jinyang Jiang)

02/04/2018

06:14 AM Ruby Feature #13618: [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
Excited to see this awesome feature! I'm implemented fiber-auto-schedule at ruby userland([light](https://github.com/socketry/lightio)) few month ago(using monkey patch). Due to ruby complexity IO API (like: `getc`, `getbyte`, `put,c`, `... jjyr (Jinyang Jiang)

Also available in: Atom