General

Profile

Student (Nathan Zook)

Issues

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

Activity

02/20/2025

12:37 AM Ruby Feature #21148: Class proposal: IndefiniteNumeric < Numeric
I was not talking about diamond inheritance. I was talking about
```
Numeric
Float
IndefiniteNumeric
IndefiniteInteger
IndefiniteFloat
Integer
...
```
vs
```
Numeric
Float
IndefiniteFloat
Indef...
Student (Nathan Zook)

02/19/2025

01:21 AM Ruby Feature #21148 (Open): Class proposal: IndefiniteNumeric < Numeric
Suppose someone deals five cards face down from a regulation poker deck, and we wish to reason about the number of aces. We know that that number is one of zero, one, two, three, or four. Therefore, if someone asks "is this number larg... Student (Nathan Zook)

02/17/2025

06:17 PM Ruby Feature #21135: Feature request: Enumerable.compare_count
I had indeed forgotten about Enumerable::Lazy. There is a more general solution, which I am working up. Please close Student (Nathan Zook)

02/13/2025

08:24 PM Ruby Feature #21135 (Closed): Feature request: Enumerable.compare_count
Enumerables at times can be quite expensive to complete expand. If all is desired is to compare the count, we can terminate the enumeration once the result is known.
The functionality that I envision, if implemented in ruby, might lo...
Student (Nathan Zook)

02/23/2021

12:23 AM Ruby Bug #17619: if false foo=42; end creates a foo local variable set to nil
josh.cheek (Josh Cheek) wrote in #note-9:
> It's intentional. Eg what if you set the same variable in both branches? Then it would be clearer that you are expecting the variable to be visible outside the scope of the conditional.
> ...
I...
Student (Nathan Zook)

02/22/2021

11:48 PM Ruby Feature #16989: Sets: need ♥️
marcandre (Marc-Andre Lafortune) wrote in #note-31:
> I'm sorry, I am completely confused by this discussion, I can't make sense of it.
> ...
THIS.
Sets are in no way related to Hashes. The fact that they are/can be *implemented* a...
Student (Nathan Zook)
11:37 PM Ruby Feature #16990: Sets: operators compatibility with Array
mame (Yusuke Endoh) wrote in #note-9:
> I expect that `ary + set` return a Set, not an Array, unless it raises an exception.
> ...
I found implicit conversions of values in K&R to be an abomination BEFORE I became aware of the many, ma...
Student (Nathan Zook)

05/24/2018

07:33 PM Ruby Feature #14097: Add union and difference to Array
I cannot say that I am a fan of this proposal. To be fair, I'm not a fan of #|.
Arrays are not sets. Trying to treat them as if they are is an error, and will create subtle problems.
What should be the result of the following ope...
Student (Nathan Zook)

05/19/2018

01:06 AM Ruby Feature #14724: chains of inequalities
As a mathematician, this suggestion really has my attention.
First, I almost never write a <= b && b < c. What I do write is some form of (a...c) === b. There are two reasons for this. In the first case, b is being repeated, and we...
Student (Nathan Zook)

04/27/2018

07:14 AM Ruby Feature #12607: Ruby needs an atomic integer
I think that you might not have understood his concern. Getting multi-threaded code right is hard, no matter the primitives available. "People who know well about thread programming can use this feature using concurrent-ruby and I don'... Student (Nathan Zook)

Also available in: Atom