General

Profile

kstephens (Kurt Stephens)

  • Login: kstephens
  • Registered on: 12/23/2008
  • Last sign in: 09/20/2013

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 0 8 8

Activity

08/25/2013

04:55 AM Ruby Feature #8579: Frozen string syntax
How about something more generic? A prefix operator that memoizes and freezes any expression result in a thread-safe manner on first eval:
%f'a frozen string' #
%f"a frozen #{interpolated} string" #
%f{a: '...
kstephens (Kurt Stephens)

03/16/2013

08:55 AM Ruby Feature #7791: Let symbols be garbage collected
marcandre (Marc-Andre Lafortune) wrote:
> So it's probably only MRI that does stuff like `rb_funcall(obj, '>', 1, INT2FIX(0))`
That can be changed to:
#define CHAR2SYM(X) _rb_char_symbol_table[X]
rb_funcall(obj, CHAR2SYM('>...
kstephens (Kurt Stephens)
02:06 AM Ruby Feature #7791: Let symbols be garbage collected
marcandre (Marc-Andre Lafortune) wrote:
> kstephens (Kurt Stephens) wrote:
> ...
Yup. That's an assumption I can't fix. Unless we have a class of VALUES < 127 that are immediate single-ASCII character Symbols, and we cant do that be...
kstephens (Kurt Stephens)
01:32 AM Ruby Feature #7791: Let symbols be garbage collected
Student (Nathan Zook) wrote:
> Questions:
> ...
With the unit and functional tests that already exist. What cases do you have in mind?
> 2) In order to actually recover the memory, the symbol table has to be walked each time a sym...
kstephens (Kurt Stephens)

03/15/2013

02:34 AM Ruby Feature #7791: Let symbols be garbage collected
Mark and sweep the symbol table like any other GC heap.
However there are some issues in the C API.
IDs in the C API are distinct from other values and Ruby extensions expected them to be pinned (never GCd).
Therefore, the C API must s...
kstephens (Kurt Stephens)

08/09/2012

09:31 AM Ruby Feature #6841: Shorthand for Assigning Return Value of Method to Self
If we want lexical multiplicity to equal evaluation multiplicity...
Should:
obj.foo.bar[baz.daz] .= to_i
behave as?:
begin
temp1 = obj.foo.bar
temp2 = baz.daz
temp1[temp2] = temp1[temp2].to_i
end
... ...
kstephens (Kurt Stephens)

08/08/2012

07:19 AM Ruby Feature #6841: Shorthand for Assigning Return Value of Method to Self
I like the idea, iff:
obj.foo.bar.baz .= to_i
behaves as:
begin
temp = obj.foo.bar
temp.baz = temp.baz.to_i
end
kstephens (Kurt Stephens)

07/12/2012

09:54 AM Ruby Feature #6688: Object#replace
How would it behave for immediate VALUEs (Fixnum, Symbol, etc.)?
Or value classes that are immutable or often occur as literals (Float, Rational, Time, etc.)?
This would probably be very difficult to implement in JRuby (and other Rub...
kstephens (Kurt Stephens)

03/10/2012

12:02 AM Ruby Feature #4514: #deep_clone and #deep_dup for Objects
Marc-Andre Lafortune wrote:
> Shyouhei Urabe wrote:
> ...
See https://github.com/kstephens/red_steak/blob/master/lib/red_steak/copier.rb
The problem is how to control how "deep" a copier should go, which objects need to have identit...
kstephens (Kurt Stephens)

02/18/2012

03:09 AM Ruby Feature #5964: Make Symbols an Alternate Syntax for Strings

On 16/02/2012, at 12:28 PM, Charles Oliver Nutter wrote:
> ... someone might rely on the same symbol having
> ...
The only "safe" object_id is a monotonic one that is not tied to a memory address; by definition, a collector will reus...
kstephens (Kurt Stephens)

Also available in: Atom