General

Profile

merborne (kyo endo)

  • Login: merborne
  • Registered on: 02/14/2012
  • Last sign in: 08/16/2014

Issues

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

Activity

11/13/2012

11:24 AM Ruby Feature #7340: 'each_with' or 'into' alias for 'each_with_object'
matz (Yukihiro Matsumoto) wrote:
> I dislike #into because it may or may not put something into the argument.
> ...
I would appreciate if you could look at #6687. but #each_with is OK for me :-)
merborne (kyo endo)

07/27/2012

11:38 PM Ruby Feature #6801: String#~ for a here document
Eregon (Benoit Daloze) wrote:
> merborne (kyo endo) wrote:
> ...
ok. thank you.
merborne (kyo endo)
10:38 PM Ruby Feature #6801: String#~ for a here document
Eregon (Benoit Daloze) wrote:
> I think the sequence `~<<-EOS` becomes very cryptic, and this should be supported in the parser (or at least be integrated into the language). I actually prefer `<<-EOS.undent` as the intention is clearer...
merborne (kyo endo)
01:16 PM Ruby Feature #6801 (Rejected): String#~ for a here document
=begin
Let me propose a new method (({String#~})) for a here document.
次のような実装の(({String#~}))を提案します。
class String
def ~
margin = scan(/^ +/).map(&:size).min
gsub(/^ {#{margin}}/, '')
end
en...
merborne (kyo endo)
09:00 AM Ruby Feature #6758: Object#sequence
alexeymuranov (Alexey Muranov) wrote:
> merborne (kyo endo) wrote:
> ...
#sequence returns an enumerator object. It means it can be evaluated later.
class Enumerator
def lazy(&blk)
Enumerator.new do |y|
...
merborne (kyo endo)

07/26/2012

01:37 PM Ruby Feature #6687: Enumerable#with
nobu (Nobuyoshi Nakada) wrote:
> I don't think "with" is nice as a method name.
> ...
It iterate(or enumerate) with the argument. The receiver, by itself tells it, I think.
I think #each tells nothing. it suggests the returning value ...
merborne (kyo endo)
06:52 AM Ruby Feature #6758: Object#sequence
alexeymuranov (Alexey Muranov) wrote:
> However, the original proposal looks to me rather restrictive and not very efficient. Between
> ...
how about this?
b = 1
0.sequence { |a| a, b = b, a + b; a}.take(10)
merborne (kyo endo)

07/25/2012

10:46 PM Ruby Feature #6669: A method like Hash#map but returns hash
how about #hmap. merborne (kyo endo)
02:40 PM Ruby Feature #6687: Enumerable#with
=begin
It is obvious that many rubyists have troubled with Enumerable#inject when they use it with a hash.
Feature #5662: inject-accumulate, or Haskell's mapAccum* - ruby-trunk - Ruby Issue Tracking System http://bugs.ruby-lang.o...
merborne (kyo endo)
09:12 AM Ruby Feature #6758: Object#sequence
alexeymuranov (Alexey Muranov) wrote:
> fibonacci = 0.recurrence(1) { |a, b| a + b }
I disagree this. because I can't image fibonacci sequence from this code. and two block variables, which are both used as init data comes from diff...
merborne (kyo endo)

Also available in: Atom