[#13842] Better introspection for Frames, Thread, and enhancing binding. — "Rocky Bernstein" <rocky.bernstein@...>
The below is a little long. So here's a summary.
Rocky Bernstein wrote:
Ryan Davis wrote:
Ryan Davis wrote:
[#13851] Array#flatten works quadratic time on length of resulting array. It could be linear — "Voroztsov Artem" <artem.voroztsov@...>
I encountered problem with Array#flatten slowness (it can be much
Voroztsov Artem wrote:
2007/12/3, Charles Oliver Nutter <charles.nutter@sun.com>:
2007/12/3, Voroztsov Artem <artem.voroztsov@gmail.com>:
Hi,
Hi,
2007/12/4, Nobuyoshi Nakada <nobu@ruby-lang.org>:
Hi,
Hi,
[#13854] A little concern about m17n — Daniel DeLorme <dan-ml@...42.com>
I know it's kinda late to make any changes to the 1.9 roadmap, so I'm
[#13885] Idea: always yield current thread to Thread.new — "Berger, Daniel" <Daniel.Berger@...>
Hi,
[#13887] Can we foresee any big changes for Ruby in year 2008? — "Song Ma" <songmash@...>
Hi,
[#13889] Continuations on dead threads crash 1.8.6 and 1.6.8 — Brent Roman <brent@...>
[#13893] How to have fine grain control over GL in C extensions — hemant <gethemant@...>
Hi,
On Dec 6, 2007 6:35 PM, hemant <gethemant@gmail.com> wrote:
[#13897] issue with Date class freeze — "Christopher Gill" <gilltots@...>
Hello all,
[#13903] Clarification of retry change — Charles Oliver Nutter <charles.nutter@...>
Matz confirmed that retry-outside-rescue will no longer work, but I
Hi,
SASADA Koichi wrote:
On Dec 7, 2007 12:48 AM, Charles Oliver Nutter <charles.nutter@sun.com> wrote:
Brian Mitchell wrote:
[#13908] What's the status of compiler/compiling on windows? — Gonzalo Garramu <ggarra@...>
Hi,
Nobuyoshi Nakada wrote:
T24gRGVjIDcsIDIwMDcgODoyMSBBTSwgR29uemFsbyBHYXJyYW11w7FvIDxnZ2FycmFAYWR2YW5j
Hi Luis
On Dec 12, 2007 4:05 PM, Joe Swatosh <joe.swatosh@gmail.com> wrote:
> This was discussed in other thread in ruby-talk, but just to summarize:
Hi,
On Dec 12, 2007 5:00 PM, Nobuyoshi Nakada <nobu@ruby-lang.org> wrote:
On Dec 12, 2007 1:55 PM, Austin Ziegler <halostatue@gmail.com> wrote:
[#13916] Changes in C API of Ruby 1.9 — hemant <gethemant@...>
Hi,
> -----Original Message-----
[#13961] Error while bulding Ruby 1.9 from snapshot 2007/12/09 — Wolfgang Nádasi-Donner <ed.odanow@...>
[#13969] redefineable not operator — David Flanagan <david@...>
Matz,
David Flanagan wrote:
Hi,
Yukihiro Matsumoto wrote:
Hi,
Yukihiro Matsumoto wrote:
murphy wrote:
Hi,
[#13989] Compliment to rb_thread_blocking_region() ? — "Tony Arcieri" <tony@...>
The rb_thread_blocking_region() appears to allow releasing the GIL and
On Tue, 11 Dec 2007 06:41:56 +0900, "Tony Arcieri" <tony@clickcaster.com> wrote:
On Dec 10, 2007 3:49 PM, MenTaLguY <mental@rydia.net> wrote:
[#13997] Output of "ruby --help" looks not correct for Ruby 1.9 — Wolfgang Nádasi-Donner <ed.odanow@...>
Good morning!
[#13998] Array#pack and String#unpack documentation — "Gary Wright" <radar2002@...>
In working with Array#pack and String#unpack today, I found
Hi,
On Dec 11, 2007, at 9:10 AM, Yukihiro Matsumoto wrote:
[#14042] Fix e2mmap.rb for 1.9 — Eric Hodel <drbrain@...7.net>
E2MM.Raise complains about $! being read-only now, and E2MM is used by
On Dec 12, 2007, at 16:19 PM, Dave Thomas wrote:
Dave Thomas wrote:
Hello Dave,
[#14083] multibyte characters in curses — "Michal Suchanek" <hramrach@...>
Hello,
[#14086] attr_accessor for question methods (?) — Trans <transfire@...>
Like to make a small suggestion for 1.9. It would be great if we could
[#14102] Small (hopefully) problem with RDoc (Ruby 1.9) — Wolfgang Nádasi-Donner <ed.odanow@...>
Good morning!
I made some tests, unfortunately the debugger crashed, so I
[#14111] What does volatile assignment of *pos in rb_thread_s_new() do? — Brent Roman <brent@...>
[#14118] Enumerable#uniq, anybody? — Martin Duerst <duerst@...>
I have just tried to use zip followed by uniq in a 1.9 context.
[#14123] Some Ruby 1.9 loose ends to tie up — David Flanagan <david@...>
Matz,
Hi,
Yukihiro Matsumoto wrote:
Hi,
SASADA Koichi wrote:
[#14126] Curious warning with IO.popen on Windows — "Berger, Daniel" <Daniel.Berger@...>
Hi all,
[#14130] Another last-minute Ruby 1.9 question — David Flanagan <david@...>
Here's another last-minute question, probably for Matz or Nobu...
[#14139] String#% bug on Windows? — "Berger, Daniel" <Daniel.Berger@...>
Hi all,
[#14140] rest argument able to duplicate/replace local argument bug? — Thomas Enebo <Thomas.Enebo@...>
This is a bug right?
[#14147] named captures assigning to local variables — David Flanagan <david@...>
I've just been browsing ruby-dev. For an english speaker, it is kind of
In article <47686B87.7050609@davidflanagan.com>,
Thank you for the clarification, akr. I'm embarassed to say that it didn't
If I may, have a proposal. My apologies if this has already been
David Flanagan wrote:
In article <476A087E.3070000@davidflanagan.com>,
How about making the return value an array of the captured strings, or nil
In article <S2445477AbXLTQsI/20071220164808Z+24367@swip003.ftl.affinity.com>,
Tanaka Akira wrote:
Attached is a variation on my patch that makes it return $~ instead of
Hi --
David A. Black wrote:
[#14149] Experimental PATCH to improve thread performance — Brent Roman <brent@...>
The attached patch against Ruby 1.8.6-p110 improves the performance of
Brent Roman wrote:
Brent Roman wrote:
On Sat, Dec 22, 2007 at 11:07:25PM +0900, Charles Oliver Nutter wrote:
Sylvain Joyeux wrote:
> The rule of thumb is basically this: don't allow changing the path of a
Sylvain Joyeux wrote:
On Thu, Dec 27, 2007 at 01:57:22AM +0900, Charles Oliver Nutter wrote:
Sylvain Joyeux wrote:
Brent Roman wrote:
Brent Roman wrote:
Brent Roman wrote:
Brent Roman wrote:
[#14175] xmlrpc/client ssl client auth — Jeremy Thurgood <jerith@...>
Good day,
[#14186] Rake 0.8.0 added to Ruby — Jim Weirich <jim.weirich@...>
Just a heads up here. I've added Rake (version 0.8.0 ... the latest)
Jim Weirich wrote:
Jim Weirich wrote:
On Dec 21, 2007 10:24 AM, Gonzalo Garramu=F1o <ggarra@advancedsl.com.ar> wr=
Jim Weirich wrote:
On Dec 21, 2007 12:28 PM, Dave Thomas <dave@pragprog.com> wrote:
On Dec 21, 2007 9:06 PM, Rick DeNatale <rick.denatale@gmail.com> wrote:
[#14203] Re: Problem with case statements — hemant kumar <gethemant@...>
[#14224] Status of two issues — Trans <transfire@...>
Will the #autoload require issue be addressed?
Hi,
[#14237] io.c patch for two encodings in file mode — David Flanagan <david@...>
The attached patch adds support for filemodes like "r:utf-8:iso-8859-15"
[#14251] Semantics of caller (was Re: Some Ruby 1.9 loose ends to tie up) — "Rocky Bernstein" <rocky.bernstein@...>
On Dec 21, 2007 8:56 PM, Charles Oliver Nutter <charles.nutter@sun.com>
Rocky Bernstein wrote:
[#14280] Block-local variables - obsolete? — murphy <murphy@...>
hello!
Only block parameters are now always local to the block; variables
Charles Oliver Nutter wrote:
[#14286] Why is Array not Comparable — Martin Duerst <duerst@...>
I just bumped into this:
At 10:40 07/12/23, Rick DeNatale wrote:
[#14303] IRHG - GC Memory Fragmentation? — Charles Thornton <ceo@...>
While working on Chapter 05 and referencing various works
Ryan Davis wrote:
Ryan Davis wrote:
[#14335] Many external symbols _without_ prefix in libruby object file — Tadashi Saito <shiba@...2.accsnet.ne.jp>
Hi all,
[#14364] RDoc: [FATAL] failed to allocate memory — Martin Duerst <duerst@...>
With revision 14590, I suddenly get an error when I do "make install"
On Dec 24, 2007 9:51 AM, Martin Duerst <duerst@it.aoyama.ac.jp> wrote:
[#14367] replace csv.rb with fastercsv.rb — "NAKAMURA, Hiroshi" <nakahiro@...>
-----BEGIN PGP SIGNED MESSAGE-----
On Dec 24, 2007, at 3:34 AM, NAKAMURA, Hiroshi wrote:
On Dec 24, 2007, at 1:16 PM, James Gray wrote:
James Gray wrote:
[#14378] module_eval change between ruby1.8 & ruby 1.9. Is it intentional ? — Frederick Cheung <frederick.cheung@...>
Hi,
[#14389] pre-release note for the christmas release. — Yukihiro Matsumoto <matz@...>
Hi,
[#14398] Timeout.timeout expires early - breaks RubyGems — Eric Hodel <drbrain@...7.net>
Sometimes Timeout.timeout expires early. I see this with `gem
On Dec 24, 2007, at 16:36 PM, Eric Hodel wrote:
On Dec 24, 2007, at 17:14 PM, Eric Hodel wrote:
[#14418] Base64 not there makes Rails 2.0.2 fail to load in 1.9.0 — Richard Kilmer <rich@...>
Just re-built latest svn of 1.9.0 and base64.rb is removed. Its
On Dec 25, 2007, at 07:03 AM, Richard Kilmer wrote:
Eric Hodel wrote:
On Dec 25, 2007, at 13:35 PM, Dave Thomas wrote:
On Dec 26, 2007, at 06:16 AM, Dave Thomas wrote:
Richard Kilmer wrote:
Charles Oliver Nutter wrote:
On Dec 26, 2007 1:01 AM, M. Edward (Ed) Borasky <znmeb@cesmail.net> wrote:
hemant wrote:
M. Edward (Ed) Borasky wrote:
Gonzalo Garramu wrote:
M. Edward (Ed) Borasky wrote:
[#14440] Odd situation with mingw, readline and readline tests. — "Luis Lavena" <luislavena@...>
Hello again,
[#14497] Status of Event Driven Network Programming Libraries in 1.9 — hemant <gethemant@...>
Hi,
[#14501] Should Ruby1.9 default program suffix be changed? — "Rick DeNatale" <rick.denatale@...>
Having seen several posts on various ruby related forum from folks who
Rick DeNatale wrote:
Dave Thomas schrieb:
On Dec 27, 2007 8:37 PM, Dave Thomas <dave@pragprog.com> wrote:
[#14517] Invalid use of mktime() in Ruby 1.8/1.9 results in incorrect Time objects — Dirkjan Bussink <d.bussink@...>
Hello,
In article <7CE19CBC-71C5-48FE-A2E7-4FCE489A7090@gmail.com>,
In article <A389041B-BC9F-409F-80B4-09971F62B7DE@gmail.com>,
In article <945DBEDA-10F1-40D0-AF7E-CF82EFF627AC@gmail.com>,
[#14524] Zlib::Inflate changes to net/http.rb — Filipe Lautert <filipe@...>
[#14549] multibyte strings & bucket-of-bytes efficiency under 1.9.0 — khaines@...
Like everyone else, I've been testing my stuff under 1.9.0. In general,
Brent Roman wrote:
In article <14544702.post@talk.nabble.com>,
Hello Akira,
In article <6.0.0.20.2.20071231173234.0a28c170@localhost>,
At 01:54 08/01/02, Austin Ziegler wrote:
On Jan 3, 2008 1:04 AM, Martin Duerst <duerst@it.aoyama.ac.jp> wrote:
After reading this thread, and looking at the the title, let me make
On Thu, 3 Jan 2008, Rick DeNatale wrote:
[#14550] Ruby 1.9 and Unicode — Sam Ruby <rubys@...>
I've tried porting a few small codebases, and a few experiments, and
Sam Ruby wrote:
David Flanagan wrote:
> As well an explanation of the differences between the following two
[#14555] module_eval oddness on 1.9 — Frederick Cheung <frederick.cheung@...>
[#14564] locale in ruby — "Michal Suchanek" <hramrach@...>
Hello
At 07:55 07/12/30, Michal Suchanek wrote:
In article <6.0.0.20.2.20071231200106.0b1bfb00@localhost>,
At 14:17 08/01/01, Tanaka Akira wrote:
[#14568] Layout of includes in ruby 1.9 — Gonzalo Garramu <ggarra@...>
On Dec 29, 2007 2:39 AM, Gonzalo Garramu=F1o <ggarra@advancedsl.com.ar> wro=
Hello,
U.Nakamura wrote:
>>>>> "G" == Gonzalo Garramu=F1o?= <ISO-8859-1> writes:
ts wrote:
>>>>> "G" == Gonzalo Garramu=F1o?= <ISO-8859-1> writes:
ts wrote:
[#14569] Wide strings to ruby strings — Gonzalo Garramu <ggarra@...>
On Dec 29, 2007 2:58 AM, Gonzalo Garramu=F1o <ggarra@advancedsl.com.ar> wro=
Austin Ziegler wrote:
[#14602] RCR allow indexing last n items — "Michal Suchanek" <hramrach@...>
Hello
Hi --
On 30/12/2007, David A. Black <dblack@rubypal.com> wrote:
Hi --
On 31/12/2007, David A. Black <dblack@rubypal.com> wrote:
Hi --
On 31/12/2007, David A. Black <dblack@rubypal.com> wrote:
Hi --
[#14621] Module.new(&block) in Ruby 1.9 — murphy <murphy@...>
Hello!
This looks like a related bug with passing block arguments to
Cheah Chu Yeow wrote:
Hi,
>>>>> "S" == SASADA Koichi <ko1@atdot.net> writes:
Hi,
Hi,
Jeremy Kemper wrote:
On Tue, Apr 01, 2008 at 05:43:34PM +0900, ts wrote:
Sylvain Joyeux wrote:
About bug [#19304]
Sylvain Joyeux wrote:
> > Finally, I'm not sure my last mail actually reached the list. Guy: I
[#14639] Rexml and Ruby 1.9 — Sam Ruby <rubys@...>
Ticket: http://www.germane-software.com/projects/rexml/ticket/131
Re: Experimental PATCH to improve thread performance
Brent Roman wrote:
>> If an exception were raised immediately after the blocking operation
>> completed, wouldn't it prevent the ensure from running to completion?
>
> As I mentioned in a previous post, if one must make a blocking_operation
> uninterruptible, one could code it as follows:
...
> Note that this whole construct IS ATOMIC because a thread's default
> interruptible status is false. Synchronous exceptions do not change
> a thread's interruptible status and asynchronous exceptions (i.e.
> interrupts,
> typically raised by other threads) will be deferred until the target
> thread's interruptible status is set to true, either explicitly or by
> blocking.
> Recall that, just before processing any external exception the thread's
> interrupt status is aways reset to false. This is what keeps the construct
> safe,
> even when there is a whole stack full of ensure clauses to unwind.
Ok, the key point here I must have missed is that threads would be
uninterruptible by default. So let me recap, and let me know if I've got
it now:
In your model (which you did not invent, but we'll call it yours for
sake of argument :)
1. threads are uninterruptible by default (or do you have to set them
uninterruptible early on?)
2. blocking makes a thread uninterruptible
3. wrapping a section of blocking code in an uninterruptible block keeps
it safe from interruptions
This should be safe. But it does represent a change to the current
model, yes? A change I would whole heartedly agree with, since it would
mean concurrent-thread impls don't have to constantly poll and
synchronize "just in case" another thread wants them to raise.
> I did not invent this idea. In fact, this is the way that many
> microprocessors deal with hardware interrupts at the machine code level.
> I learned it as a teenager when I started programming
> real-time industrial control systems in Intel 8086 assembly language.
> (in the late 1970's!)
> I'm just proposing that Ruby respond to asynchronous exceptions
> the much same way that microprocessors process hardware interrupts.
Yes, I think we're on the same page now. I agree.
> In any case, enclosing a few critical blocking cleanups in
> Thread.uninterruptible{}
> will not be terribly difficult. Although, finding all of them may be a
> bit of a challenge.
Modifying Ruby to make threads uninterruptible by default should help
flush out a lot of these cases, since they won't raise anymore.
> Charles Oliver Nutter-2 wrote:
>>
>> I would disagree that Thread#raise is intended as a way to pass any sort
>> of information. I think it's a way to kick a thread back to
>> responsiveness without killing it. But it's still unsafe as it exists
>> today.
...
> I feel this is a very appropriate use of Exceptions.
> However, using them as a replacement for Queues and the like in
> normal data transfers between threads is, as you point out,
> very inefficient and likely to be non-deterministic (i.e. unsafe).
Ok, we still agree. It's certainly usable as a mechanism to pass
information, and your use of them to propagate exceptional conditions is
totally fine in my book. I'm just not sure I'd advocate them as a
general-purpose cross-thread data transfer mechanism when there are
obviously better options (and I think we agree here also).
> Charles Oliver Nutter-2 wrote:
>>
>> It's also provably unsafe to be able to
>> arbitrarily interrupt a blocking operation. Does it leave a file locked?
>> a channel open? In Java, interrupting a thread that's blocking on
>> low-level IO forces the IO channel into a dead state, since it's
>> impossible to guarantee that it hasn't been irreversibly corrupted.
>>
>> The way to solve this--and really the only way to make it safe--is to
>> use non-blocking operations instead. This is how all major
>> multi-threaded workhorse applications are designed...they avoid blocking
>> as much as possible and simulate blocking operations by feeding
>> operations to a non-blocking worker and waiting for responses.
>
> This is really worrisome. What you are saying amounts to an admission
> that there is no way to make native threads work as flexibly as
> green threads. Recall that green threads must change all
> the blocking I/O operations into non-blocking ones. Thus, in Ruby 1.8
> and 1.6 all I/O is non-blocking at the OS level -- where all that
> tricky file state ultimately resides. In Ruby 1.9, I/O is blocking
> at the OS level. So, are you saying that, in 1.9 (and possibly JRuby),
> applications would be required to avoid blocking I/O to ensure thread
> safety?
I think you read too much into what I said. Interrupting a truly
blocking operation in a green thread is just as unsafe as it is in a
native thread. The fact that MRI implements what would be blocking
operations as non-blocking operations under the covers actually supports
this case; it's just masking the non-blocking gymastics for you. It's
blocking as far as your code goes, but it's non-blocking as far as
what's happening under the covers. So it can be interrupted without
damaging anything. If you implemented the same model in Java with
non-blocking streams, or with blocking streams that used non-blocking
system calls under the covers, you should be able to get roughly the
same result.
Also, I mixed some vocabulary here. I meant that it's going to always be
unsafe to interrupt a blocking operation arbitrarily in such a way that
it can't recover from the interruption. In Java, all blocking operations
that could be interrupted also raise exceptions that the caller must
handle. This allows the target thread to recover from such an
interruption, and also limits the range of possible exceptions the
target thread must handle to a known quantity. In Ruby, with raise,
there is no such known quantity, and you have to do a lot more work to
ensure the thread you're causing to raise won't enter a really bad state
because you've tossed a totally foreign exception at it.
I will also read that paper you provided (I have not yet). I'm certainly
no threading expert.
> In any case, if blocking I/O is such a problem for thread safety,
> why not just convert all blocking I/O requests in JRuby to non-blocking
> ones in Java?
Yes, why not? :)
Actually, I want to do this. But non-blocking IO is harder than blocking
IO and not always (or rarely?) necessary for typical apps, especially in
the presence of true concurrent threads. We just haven't gotten around
to it.
Most of JRuby's IO is now using NIO, which makes it possible (i.e.
easier, but still challenging) to use non-blocking operations across the
board. However we haven't migrated everything to NIO, and what we have
migrated still uses normal blocking operations in many places when they
map directly to NIO blocking API calls. Work continues.
Perhaps your application(s) can provide some demonstrable cases that
would raise the priority of such work, because at the moment it's
outweighed by other tasks :)
- Charlie