[#84867] [Ruby trunk Bug#14357] thread_safe tests suite segfaults — v.ondruch@...
Issue #14357 has been reported by vo.x (Vit Ondruch).
11 messages
2018/01/15
[#85364] Re: [Ruby trunk Bug#14357] thread_safe tests suite segfaults
— Eric Wong <normalperson@...>
2018/02/03
v.ondruch@tiscali.cz wrote:
[#85368] Re: [Ruby trunk Bug#14357] thread_safe tests suite segfaults
— Eric Wong <normalperson@...>
2018/02/03
Eric Wong wrote:
[#85442] Re: [Ruby trunk Bug#14357] thread_safe tests suite segfaults
— Eric Wong <normalperson@...>
2018/02/06
Eric Wong <normalperson@yhbt.net> wrote:
[#85451] Re: [Ruby trunk Bug#14357] thread_safe tests suite segfaults
— Vladimir Makarov <vmakarov@...>
2018/02/06
On 02/06/2018 05:00 AM, Eric Wong wrote:
[#84874] [Ruby trunk Bug#14360] Regression CSV#open method for writing from Ruby 2.4.3 to 2.5.0 — shevegen@...
Issue #14360 has been updated by shevegen (Robert A. Heiler).
3 messages
2018/01/15
[#84980] [Ruby trunk Feature#13618][Assigned] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — hsbt@...
Issue #13618 has been updated by hsbt (Hiroshi SHIBATA).
10 messages
2018/01/23
[#85012] Re: [Ruby trunk Feature#13618][Assigned] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
— Eric Wong <normalperson@...>
2018/01/23
hsbt@ruby-lang.org wrote:
[#85081] Re: [Ruby trunk Feature#13618][Assigned] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
— Eric Wong <normalperson@...>
2018/01/24
Eric Wong <normalperson@yhbt.net> wrote:
[#85082] Re: [Ruby trunk Feature#13618][Assigned] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
— Eric Wong <normalperson@...>
2018/01/24
> Thinking about this even more; I don't think it's possible to
[#85088] [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — danieldasilvaferreira@...
Issue #13618 has been updated by dsferreira (Daniel Ferreira).
3 messages
2018/01/25
[#85107] [Ruby trunk Misc#14222] Mutex.lock is not safe inside signal handler: what is? — eregontp@...
Issue #14222 has been updated by Eregon (Benoit Daloze).
3 messages
2018/01/25
[#85136] Re: [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — Eric Wong <normalperson@...>
samuel@oriontransfer.org wrote:
3 messages
2018/01/26
[ruby-core:85075] [Ruby trunk Feature#14392] Pipe operator
From:
shevegen@...
Date:
2018-01-24 20:54:44 UTC
List:
ruby-core #85075
Issue #14392 has been updated by shevegen (Robert A. Heiler).
> It will be reject anyways but I will still continue to seek
> for a better option.
Who knows - but I think it may be too difficult to change it at
this point.
When it comes to personal preferences, what may work for you may
not work for others.
At the end of the day it's matz who decides about features (and
syntax).
In streem, matz uses a different concept/syntax, to some extent:
https://github.com/matz/streem
seq(100) | map{x->
if (x % 15 == 0) "FizzBuzz"
else if (x % 3 == 0) "Fizz"
else if (x % 5 == 0) "Buzz"
else x
} | stdout
No |> though.
Note that I have nothing at all against the suggestion here
per se, but I believe that there is a cost associated for
change in many situations, and there should be some kind
of benefit for the change.
I agree with "private def bar" style being ugly by the way -
I always denote when methods are private after the trailing
"end" of the method. But I also very rarely use private in
ruby - I mostly do so if the class or API may need some
additional "information" to people using the class, like
what they should not use (as far as I know, they can call
it anyway via .send() so the private/public distinction in
ruby does not make a lot of sense to me; and I <3 .send().
Different languages define and use OOP differently).
> I believe ruby core allows us to come in and discuss matters.
Indeed and at the end of the day, you only have to convince
matz. But I think that the trade-off here is not really worth
it; what may be worth exploring may be to have ruby hackers
re-define syntax part of ruby ... but I am also not sure if
it is ultimately worth to be had (I think most of ruby is
very elegant; with more proliferation, we may have more ugly
code too, and I already think there is quite a bit of ugly
ruby out there in the wild, but that is my personal opinion).
> [...] "I don't like how the consistent set of features in
> language looks [it can't even be said to be "verbose",
> man!], so please introduce a new inconsistent feature
> for me to like it [...]
To the above, designing an absolutely perfect symmetric language
that also follows a "there is more than one way to do things",
is difficult. There are even some "functional" features in ruby;
currying/lambda/proc and so on.
Sometimes later changes may change older parts of ruby. I think if
you look at people writing ruby, say, 10 years ago or more, that
ruby will be quite different from ruby today (provided that the
author had similar experience, say after 3 years of using ruby
extensively every day).
Not every change is necessarily due to consistency alone. Take
the lonely person operator - that one came primarily because
someone had a use case (lots of nil queries in a rails codebase),
matz agreed and so came the lonely person operator staring at
the dot.
Anyway, to conclude - I think elixir is cool but ruby is not
elixir and simple 1:1 mappings in syntax changes may impact
lots of people, without necessarily providing substantial
benefits IMO. One can dispute whether there is enough benefit,
but to me, I don't really see the real benefit that we would
get in ruby at this point in time.
By the way, you can always try to have it discussed at the next
developer meeting.
----------------------------------------
Feature #14392: Pipe operator
https://bugs.ruby-lang.org/issues/14392#change-69789
* Author: dsferreira (Daniel Ferreira)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
----------------------------------------
I would like to see implemented in ruby a pipe operator as we have in elixir.
An example of application I have in mind is this:
```ruby
class Foo
def bar(var)
puts “Hello #{var}!”
end |> private
def baz(arg)
bar(arg)
end
end
foo = Foo.new
foo.baz("Fred") # => "Hello Fred!"
```
It can also help simplify method chains:
```ruby
class Secret
def initialise(user, password)
@user = user
@password = password
end
def second_pass(encrypted_string)
encrypted_string.chain_4.chain_5.chain_6
end |> private
##
# Super encryption
def super_encryption
@password.chain_1.chain_2.chain_3
|> second_pass
end |> public
end
```
And also simplify codes like this:
```ruby
class Foo
def bar(*args)
baz = args.select { |arg| arg =~ /regex/ }.first
good?(baz)
end
public :bar
def good(arg)
arg.to_s.size > 10
end
private :good
end
```
to become:
```ruby
class Foo
##
# Bar public method.
def bar(*args)
args.select { |arg| arg =~ /regex/ }.first
|> good?
end |> public
def good(arg)
arg.to_s.size > 10
end |> private
end
```
Lots of local variables would be saved and I would expect some performance improvements with that.
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>