[#87773] timer thread [was Re: [ruby-alerts:7905] failure alert on trunk-asserts@silicon-docker (NG (r63844))] — Eric Wong <normalperson@...>
> test_all <main>: warning: pthread_create failed for timer: Resource temporarily unavailable, scheduling broken
[#87836] [Ruby trunk Bug#14898] test/lib/test/unit/parallel.rb: TestSocket#test_timestamp stuck sometimes — ko1@...
Issue #14898 has been reported by ko1 (Koichi Sasada).
[email protected] wrote:
On 2018/07/06 18:47, Eric Wong wrote:
[#87847] undefined symbol: mjit_init_p — Leam Hall <leamhall@...>
I pulled Ruby trunk on 3 Jul and am now getting errors similar to the
As I told you, `make install` is needed to make Ruby work. Running
One more reason for https://bugs.ruby-lang.org/issues/13620 maybe? ;)
Benoit Daloze <[email protected]> wrote:
[#87986] [Ruby trunk Feature#14915] Deprecate String#crypt, move implementation to string/crypt — mame@...
Issue #14915 has been updated by mame (Yusuke Endoh).
[email protected] wrote:
normalperson (Eric Wong) wrote:
[#88088] [Ruby trunk Misc#14937] [PATCH] thread_pthread: lazy-spawn timer-thread only on contention — normalperson@...
Issue #14937 has been reported by normalperson (Eric Wong).
[#88104] [Ruby trunk Bug#14898] test/lib/test/unit/parallel.rb: TestSocket#test_timestamp stuck sometimes — ko1@...
Issue #14898 has been updated by ko1 (Koichi Sasada).
[#88173] [Ruby trunk Bug#14950] r64109 thread.c: move ppoll wrapper before thread_pthread.c - Windows compile failure - thread.c — Greg.mpls@...
Issue #14950 has been reported by MSP-Greg (Greg L).
[#88189] [Ruby trunk Bug#14950] r64109 thread.c: move ppoll wrapper before thread_pthread.c - Windows compile failure - thread.c — nobu@...
Issue #14950 has been updated by nobu (Nobuyoshi Nakada).
[#88199] [Ruby trunk Misc#14937] [PATCH] thread_pthread: lazy-spawn timer-thread only on contention — takashikkbn@...
Issue #14937 has been updated by k0kubun (Takashi Kokubun).
[email protected] wrote:
> yet, sky3 had a failure at
> http://ci.rvm.jp/results/trunk@P895/1173951
> > http://ci.rvm.jp/results/trunk@P895/1173951
[ruby-core:87941] [Ruby trunk Feature#12306] Implement String #blank? #present? and improve #strip and family to handle unicode
Issue #12306 has been updated by shevegen (Robert A. Heiler).
Sam suggested the topic to be discussed at the next upcoming ruby
developer meeting here recently:
https://bugs.ruby-lang.org/issues/14861
I'll add a few comments to the issue here as a consequence.
I am mostly neutral to the whole issue at hand, though up to slightly in
disfavour of adding #blank? and respectively #present?.
It's not that I do not understand the use case; I simply don't think
the method names make a lot of sense. What is a "blank" string really?
If it is an empty string, then it should be called an empty string. But
rails also considers an empty array to be "blank", so I am confused -
see lateron in this comment.
I understand that we want to query the whitespace status via #blank? but
then why not call it #whitespace? or something similar? And why does
ActiveSupport use #blank? across several different classes with a
different meaning/behaviour - such as on arrays?
So, my problem is primarily with the name, only secondarily the
functionality in itself.
Note also that while active* is big, active* is not ruby as a whole.
For core functionality, the reasoning should be "because lots of ruby
people may need this or that" rather than "because it is used in
active*, we should make it part of ruby", in my opinion. These two
can often be synonymous but the reasoning should still come from
a general user's perspective.
As for #present?, I have even less of an idea what this is supposed
to do. I had a look at the docu for ActiveSupport:
http://guides.rubyonrails.org/active_support_core_extensions.html#blank-questionmark-and-present-questionmark
"The method present? is equivalent to !blank?."
I think that is also weird from a design point of view.
It's a bit like .select versus .reject, except just for a (forward
or backwards) query. Would you have guessed that "#present?" is the
opposite to "#blank?"? I would not have.
"The following values are considered to be blank in a Rails application"
" empty arrays and hashes, and"
" any other object that responds to empty? and is empty."
Is also a weird design choice. In the latter blank? is suddenly
equivalent to .empty? for general objects - but we already have
that method name for e. g. Strings. So I don't think this is a
good design decision that Rails did, but that is my opinion and
I am sure many rails people think it's a great design decision.
It's good that ruby is that flexible though.
As for #strip handling unicode, if it is possible I think it would
be nice. People could then assume that calling .strip on a unicode
string would remove e. g. newlines and whitespace on the ends/sides.
I don't know how difficult it would be to have this; guess Martin
Dürst knows more here. Do all languages support this behaviour
by the way? Perhaps some languages have no whitespace, like
some symbols-based languages perhaps.
----------------------------------------
Feature #12306: Implement String #blank? #present? and improve #strip and family to handle unicode
https://bugs.ruby-lang.org/issues/12306#change-72948
* Author: sam.saffron (Sam Saffron)
* Status: Open
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
* Target version:
----------------------------------------
Time and again there have been rejected feature requests to Ruby core to implement `blank` and `present` protocols across all objects as ActiveSupport does. I am fine with this call and think it is fair.
However, for the narrow case of String having `#blank?` and `#present?` makes sense.
- Provides a natural extension over `#strip`, `#lstrip` and `#rstrip`. `(" ".strip.length == 0) == " ".blank?`
- Plays nicely with ActiveSupport, providing an efficient implementation in Ruby core: see: https://github.com/SamSaffron/fast_blank, implementing blank efficiently requires a c extension.
However, if this work is to be done, `#strip` and should probably start dealing with unicode blanks, eg:
```
irb(main):008:0> [0x3000].pack("U")
=> " "
irb(main):009:0> [0x3000].pack("U").strip.length
=> 1
```
So there are 2 questions / feature requests here
1. Can we add blank? and present? to String?
2. Can we amend strip and family to account for unicode per: https://github.com/SamSaffron/fast_blank/blob/master/ext/fast_blank/fast_blank.c#L43-L74
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>