General

Profile

atlas (Atlas Prime)

  • Login: atlas
  • Email: a7145@live.com
  • Registered on: 11/21/2013
  • Last sign in: 09/20/2014

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 2 3 5

Activity

09/21/2014

01:01 PM Ruby Feature #10270: Hash#insert
The name "insert" seems good to me because it implies a *new* entry and unable to change an *old* entry. But key-value pair must be thought of as an *entry* too for it to make sense (I guess I get that notion from Java http://docs.oracle... atlas (Atlas Prime)
02:04 AM Ruby Feature #10273 (Open): Immutable Ruby
I watched Matz recent keynote about the future of Ruby. I wonder if Ruby can become an immutable language? That could be expedited by a port of Clojure's immutable types. Then add concurrency and distributed computing (perhaps modeled af... atlas (Atlas Prime)

09/20/2014

01:25 PM Ruby Feature #10270 (Feedback): Hash#insert
Hash doesn't appear to have a "safe" way to insert an entry that won't clobber another key if it is already there. So how about:
~~~
class Hash
# Like Hash#store but only stores if the key isn't already
# in the hash. Returns...
atlas (Atlas Prime)

02/05/2014

03:56 PM Ruby Feature #9487 (Rejected): Add #dup?, #dup! and #clone? and #clone!
Some objects can't use #dup or #clone b/c they are singleton, like Integer. So an error is raised if one tries.
> 5.dup
TypeError: can't dup Fixnum
It would helpful if there was an easy way to check if this is so on an a...
atlas (Atlas Prime)
01:54 PM Ruby Feature #9423: Improve warning semantics
Daniel, that does seem like an even better idea. But it's also a much bigger change. I wonder what effect would that have on performance? Also, I wonder if there could still some type of "severity" level. For instance I could imagine wan... atlas (Atlas Prime)

01/18/2014

03:21 PM Ruby Feature #9423: Improve warning semantics
That's a great idea! Abstracting the interface away as a method leaves the underpinnings free for adjustment. With that, it seems most intuitive that `-W[level]` would simply translate directly into $WARN=level. And `-W0` flag would stil... atlas (Atlas Prime)

01/17/2014

01:19 AM Ruby Feature #9423: Improve warning semantics
I realized if `-W0` is to remain the same meaning as it does now than one modification to the above idea is required: The warning levels must start with `1` instead of `0`. Zero would be equivalent to `nil`. So given that, and `example.r... atlas (Atlas Prime)

01/16/2014

04:14 PM Ruby Feature #9423 (Closed): Improve warning semantics
Two suggestions for future version of Ruby that wold make warning levels more intuitive easier to work with.
First, rename $VERBOSE to $WARN for these reasons:
* `ruby` flags that set $VERBOSE are `-w` and `-W` (warnings levels).
...
atlas (Atlas Prime)

11/23/2013

03:58 AM Ruby Misc #9136: Deprecated Enumerator.new(object, method) bad for BasicObject
@nobu I found that out but it seems kind of hackish way to have to do it. (Also a little counter-intuitive since Kernel is not in BasicObject). I ended up with:
def to_enum(meth=:each)
Enumerator.new{ |y| __send__(meth) { |...
atlas (Atlas Prime)

11/21/2013

10:24 PM Ruby Misc #9136: Deprecated Enumerator.new(object, method) bad for BasicObject
P.S. This interface for bug reports is buggy (and I see no way to fix what I submitted). Not to offend, but why do it when there is GitHub issues? atlas (Atlas Prime)

Also available in: Atom