General

Profile

danh337 (Dan H)

  • Login: danh337
  • Registered on: 03/30/2021
  • Last sign in: 12/26/2024

Issues

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

Activity

10/18/2024

08:06 PM Ruby Feature #16986: Anonymous Struct literal
Eregon (Benoit Daloze) wrote in #note-69:
> That's pretty slow and inefficient as it creates a new Struct subclass for every Hash it's applied to.
> ...
Um ok so I'm voting against a new syntax. It's not necessary. A simple method like...
danh337 (Dan H)

10/15/2024

06:54 PM Ruby Feature #16986: Anonymous Struct literal
Adding this here because a new method, something like `as_struct`, feels more Rubyish to me than a new syntax.
I've been using this because it lets me define with standard Hash syntactic sugar, then access the object members with meth...
danh337 (Dan H)
06:02 PM Ruby Feature #18242: Parser makes multiple assignment sad in confusing way
These `and` & `or` operators are good things. They are much more readable for one-liners in some cases.
@matz @nobu I know you are super busy, but is there any way to move this forward?
danh337 (Dan H)

08/10/2024

07:14 PM Ruby Bug #20672: UNIXSocket.pair transmitting data between pids looks flaky
byroot (Jean Boussier) wrote in #note-2:
> Alright I've figured it out.
[...]
> ...
WOW. @byroot you are champion. I knew I needed to "cast" the received data from a plain IO to a UNIXSocket, but I didn't read the `recv_io` docs, whic...
danh337 (Dan H)
02:43 AM Ruby Bug #20672 (Rejected): UNIXSocket.pair transmitting data between pids looks flaky
I have code that uses UNIXSocket.pair and fork to send data between parent and child.
It seems to work fine for a small number of messages passed, but then fails with Errno::EBADF on the child pid writing to its socket received from t...
danh337 (Dan H)

02/17/2023

06:38 PM Ruby Feature #18597: Strings need a named method like `dup` that doesn't duplicate if receiver is mutable
rubyFeedback (robert heiler) wrote in #note-18:
> > And it feels like I cannot convince anyone here with any amount of rationale
> ...
This is a great response, cheers and thanks for your time. Honestly I never thought this was a huge ...
danh337 (Dan H)

02/26/2022

11:56 PM Ruby Feature #18597: Strings need a named method like `dup` that doesn't duplicate if receiver is mutable
Updated timing check code to be more fair. danh337 (Dan H)
11:20 PM Ruby Feature #18597: Strings need a named method like `dup` that doesn't duplicate if receiver is mutable
This is my last attempt to show why this named method is needed. The `driver.rb` file shows the patterns that apply to all sorts of code. danh337 (Dan H)

02/22/2022

08:31 PM Ruby Feature #18597: Strings need a named method like `dup` that doesn't duplicate if receiver is mutable
At one time there were other folks who cared about this, in #16295, but it feels like I'm the only one now. And it feels like I cannot convince anyone here with any amount of rationale. And it feels like more code examples won't be enoug... danh337 (Dan H)
07:10 PM Ruby Feature #18597: Strings need a named method like `dup` that doesn't duplicate if receiver is mutable
Fixed in our extensions lib.
```
class Object
# A chainable name mainly for `String#+@`.
#
def thaw
frozen? ? dup : self
end
end
```
danh337 (Dan H)

Also available in: Atom