[#15707] Schedule for the 1.8.7 release — "Akinori MUSHA" <knu@...>

Hi, developers,

21 messages 2008/03/01

[#15740] Copy-on-write friendly garbage collector — Hongli Lai <hongli@...99.net>

Hi.

31 messages 2008/03/03
[#15742] Re: Copy-on-write friendly garbage collector — Yukihiro Matsumoto <matz@...> 2008/03/03

Hi,

[#15829] Re: Copy-on-write friendly garbage collector — Daniel DeLorme <dan-ml@...42.com> 2008/03/08

Yukihiro Matsumoto wrote:

[#15756] embedding Ruby 1.9.0 inside pthread — "Suraj Kurapati" <sunaku@...>

Hello,

18 messages 2008/03/03
[#15759] Re: embedding Ruby 1.9.0 inside pthread — Nobuyoshi Nakada <nobu@...> 2008/03/04

Hi,

[#15760] Re: embedding Ruby 1.9.0 inside pthread — Yukihiro Matsumoto <matz@...> 2008/03/04

Hi,

[#15762] Re: embedding Ruby 1.9.0 inside pthread — "Suraj N. Kurapati" <sunaku@...> 2008/03/04

Yukihiro Matsumoto wrote:

[#15783] Adding startup and shutdown to Test::Unit — Daniel Berger <Daniel.Berger@...>

Hi all,

15 messages 2008/03/04

[#15835] TimeoutError in core, timeouts for ConditionVariable#wait — MenTaLguY <mental@...>

I've been reworking JRuby's stdlib to improve performance and fix

10 messages 2008/03/09

[#15990] Recent changes in Range#step behavior — "Vladimir Sizikov" <vsizikov@...>

Hi,

35 messages 2008/03/23
[#15991] Re: Recent changes in Range#step behavior — Dave Thomas <dave@...> 2008/03/23

[#15993] Re: Recent changes in Range#step behavior — "Vladimir Sizikov" <vsizikov@...> 2008/03/23

Hi Dave,

[#15997] Re: Recent changes in Range#step behavior — Dave Thomas <dave@...> 2008/03/23

[#16024] Re: Recent changes in Range#step behavior — "Vladimir Sizikov" <vsizikov@...> 2008/03/26

Hi Dave,

[#16025] Re: Recent changes in Range#step behavior — Yukihiro Matsumoto <matz@...> 2008/03/26

Hi,

[#16026] Re: Recent changes in Range#step behavior — Dave Thomas <dave@...> 2008/03/26

[#16027] Re: Recent changes in Range#step behavior — Yukihiro Matsumoto <matz@...> 2008/03/26

Hi,

[#16029] Re: Recent changes in Range#step behavior — Dave Thomas <dave@...> 2008/03/26

[#16030] Re: Recent changes in Range#step behavior — Yukihiro Matsumoto <matz@...> 2008/03/26

Hi,

[#16031] Re: Recent changes in Range#step behavior — Dave Thomas <dave@...> 2008/03/26

[#16032] Re: Recent changes in Range#step behavior — "Vladimir Sizikov" <vsizikov@...> 2008/03/26

On Wed, Mar 26, 2008 at 7:01 PM, Dave Thomas <dave@pragprog.com> wrote:

[#16033] Re: Recent changes in Range#step behavior — Dave Thomas <dave@...> 2008/03/26

[#16041] Re: Recent changes in Range#step behavior — David Flanagan <david@...> 2008/03/26

Dave Thomas wrote:

Re: RARRAY_PTR

From: "Laurent Sansonetti" <laurent.sansonetti@...>
Date: 2008-03-15 01:18:11 UTC
List: ruby-core #15911
Hi,

On Fri, Mar 14, 2008 at 6:03 PM, Nobuyoshi Nakada <nobu@ruby-lang.org> wrote:
> Hi,
>
>  At Sat, 15 Mar 2008 09:40:15 +0900,
>  Laurent Sansonetti wrote in [ruby-core:15909]:
>
> > I think this macro is dangerous because it exposes too much internals.
>
>  You mean it has no boundary check?
>

Yes, but also this macro assumes that RArray is implemented with a
regular C buffer.

>  > Also, it is difficult to re-implement RArray using a different storage
>  > structure and efficiently support this macro at the same time. In
>  > MacRuby I am working on a new implementation of the Array class and
>  > will not be able to support this macro for inline modifications.
>
>  What kind of structure?
>

This one: http://developer.apple.com/documentation/CoreFoundation/Reference/CFArrayRef/Reference/reference.html

It's actually a complex type, that mutates from one storage structure
to another at runtime.

(The purpose of this change is to provide the ability of exchange
arrays from Ruby and Objective-C worlds without requiring any
conversion, for best performance.)

>  > I therefore suggest to introduce the following macros:
>  >
>  >   RARRAY_GET_AT(ary, idx) ...
>  >   RARRAY_SET_AT(ary, idx, value) ...
>
>  I thought another macro, RARRAY_AT(ary, idx) which ensures ary
>  has extent enough for idx and returns the corresponding
>  pointer.  This would solve your first issue, but I'm not sure
>  about the second.
>

That would work for read access, but not for write access I guess.

>  In extensions, we often have needed some VALUEs' area, instead
>  just getting from/setting to an entry.
>

From a quick grep of RARRAY in the ext directory, at a glance
RARRAY_PTR doesn't seem to be used to set entries, but only to get
them.

So maybe RARRAY_AT is enough?

Laurent

In This Thread