[#19684] Re: Odd TypeError in inject (1.9.1 preview 1) — Brian Candler <B.Candler@...>
[Apologies for broken threading, it shouldn't happen again]
On Tue, Nov 04, 2008 at 03:41:27PM +0900, Yukihiro Matsumoto wrote:
[#19710] build error with "nightly snapshot" — "Roger Pack" <rogerpack2005@...>
With mingw and the current 1.9 "nightly snapshot" I currently get
Hi,
> I think we've fixed this issue. Try again tomorrow.
Hi,
> It is curious. How are topdir extout defined in the Makefile?
[#19721] [Bug #719] yaml not precise on some strings — a b <redmine@...>
Bug #719: yaml not precise on some strings
[#19728] [Bug #721] select in windows accepts too many fd's — Roger Pack <redmine@...>
Bug #721: select in windows accepts too many fd's
[#19731] use of require thread safety — "Roger Pack" <rogerpack2005@...>
I'm sure this has been discussed before, but...should there be
Hi,
Nobuyoshi Nakada wrote:
Hi,
In article <E1LSOzO-0000HT-Q9@x61.netlab.jp>,
> While a thread is requiring a given file, another thread which
> Currently with 1.8.7 (for me) the secondmost thread continues
Roger Pack wrote:
Charles Oliver Nutter wrote:
Gary Wright wrote:
On Mon, Dec 22, 2008 at 03:05:07AM +0900, Charles Oliver Nutter wrote:
Paul Brannan wrote:
On Tue, Dec 23, 2008 at 02:14:52AM +0900, Charles Oliver Nutter wrote:
2008/12/23 Paul Brannan <pbrannan@atdesk.com>:
On Tue, Dec 23, 2008 at 11:32:00PM +0900, Robert Klemme wrote:
Paul Brannan wrote:
On Tue, Nov 11, 2008 at 10:51:45AM +0900, Nobuyoshi Nakada wrote:
Paul Brannan wrote:
On Wed, Nov 12, 2008 at 04:06:00AM +0900, Charles Oliver Nutter wrote:
Paul Brannan wrote:
Hi,
Yukihiro Matsumoto wrote:
Hi,
Yukihiro Matsumoto wrote:
[#19759] Proposal: Method#get_args — "Yehuda Katz" <wycats@...>
I'd like to propose a way to introspect into the arguments of a method
I am late to this discussion, but I am a bit concerned about the
On Thu, Dec 4, 2008 at 08:01, Paul McMahon <paul.mcmahon@ubit.com> wrote:
On Thu, Dec 04, 2008 at 10:02:29PM +0900, Daniel Luz wrote:
On Sun, Nov 9, 2008 at 5:46 PM, Yehuda Katz <wycats@gmail.com> wrote:
On Mon, Nov 10, 2008 at 5:32 AM, Austin Ziegler <halostatue@gmail.com>wrote:
On Mon, Nov 10, 2008 at 4:26 AM, Meinrad Recheis
On Mon, Nov 10, 2008 at 09:50:32PM +0900, Austin Ziegler wrote:
Hi,
Hi,
On Wed, Nov 12, 2008 at 03:58:48AM +0900, Nobuyoshi Nakada wrote:
> I'd like to propose a way to introspect into the arguments of a method
The only question I have is why would one want to know the names of
On Nov 10, 7:18=A0pm, "Roger Pack" <rogerpack2...@gmail.com> wrote:
> One could use it for documenting external interfaces. Eg. A command
On Mon, Nov 10, 2008 at 8:11 PM, Roger Pack <rogerpack2005@gmail.com> wrote:
> Is RubyVM::InstructionSequence considered portable?
On Mon, Nov 10, 2008 at 11:05 PM, Roger Pack <rogerpack2005@gmail.com> wrote:
Allow me to throw in my ~.116892074 DKK;
Mikael H淡ilund wrote:
On Wed, Nov 12, 2008 at 04:48:03AM +0900, Dave Thomas wrote:
On Wed, Nov 12, 2008 at 06:01:40PM +0900, Brian Candler wrote:
On Wed, Nov 12, 2008 at 06:01:40PM +0900, Brian Candler wrote:
Paul Brannan wrote:
On Thu, Nov 13, 2008 at 02:06:15AM +0900, Charles Oliver Nutter wrote:
Paul Brannan wrote:
> -----Original Message-----
On Thu, Nov 13, 2008 at 04:33:07AM +0900, Jim Deville wrote:
Jim Weirich wrote:
On Nov 12, 2008, at 4:12 PM, Charles Oliver Nutter wrote:
On Thu, Nov 13, 2008 at 07:02:25AM +0900, Jim Weirich wrote:
Hi,
Nobuyoshi Nakada wrote:
On Fri, Nov 14, 2008 at 03:30:44PM +0900, Charles Oliver Nutter wrote:
We need the defaults to handle out-of-order defaults:
On Fri, Nov 14, 2008 at 06:32:58PM +0900, Yehuda Katz wrote:
You were on the mark when you said it was a poor man's named args.
On Wed, Nov 12, 2008 at 12:06 PM, Charles Oliver Nutter
I am strongly in favor of this proposal. Getting something simple that
Hi,
Hi,
Hi,
What values does simple_default handle? Assuming it covers the simple cases
[#19760] ThreadGroup: << and Enumerable for POLS — paddor <paddor@...>
Hey
[#19763] [Bug #738] Repeated calls to popen cause thread problems — Michal Suchanek <redmine@...>
Bug #738: Repeated calls to popen cause thread problems
[#19784] Status of copy-on-write friendly garbage collector — Hongli Lai <hongli@...99.net>
Hi.
Hi.
Narihiro,
Hi,
Yukihiro Matsumoto wrote:
Hi,
I've contacted to the author, Dr. Ugawa, and he kindly sent me an
[#19819] Re: Definition of "Support levels", 1.9.1 supported platforms and recruitment for platform maintainers — Dae San Hwang <lists@...>
> The tasks which a maintainer should do are:
Hi,
[#19845] [Bug #743] Socket.gethostbyname returns odd values — Roger Pack <redmine@...>
Bug #743: Socket.gethostbyname returns odd values
Issue #743 has been updated by Alan Johnson.
Hi,
[#19846] [Bug #744] memory leak in callcc? — Roger Pack <redmine@...>
Bug #744: memory leak in callcc?
Issue #744 has been updated by Roger Pack.
Hi,
On Wednesday 21 of January 2009 10:21:19 Brent Roman wrote:
>> I've tried that myself but it didn't work very well
On Saturday 14 of February 2009 08:17:22 Roger Pack wrote:
> The moon has shifted phases since January :) Seriously though, I've also found
Hi,
> I pushed an update to the patches onto github last night that seems to
I am continuing to see random segfaults on x86_64, especially with god
2009/1/22 Brent Roman <brent@mbari.org>:
I have applied the MBARI patches to 1.8.6 p287. About half the hunks had to
On Thu, Jan 22, 2009 at 4:09 PM, Brent Roman <brent@mbari.org> wrote:
On Thursday 22 of January 2009 12:55:08 Brent Roman wrote:
I was attempting to backport your MBARI patches to 1.8.6 p287, which is what
Issue #744 has been updated by Roger Pack.
At 12:54 08/11/17, Brent Roman wrote:
A common technique is to allocate a reasonably sized array (256-bytes)
> I implemented a scheme for recording the maximum depth of the C stack in
First thanks for doing all that hard work. I'm sure it's not pleasant
Seems to overall be a tidge slower for "micro" stuff--5 or 10%.
> You ran this benchmark suite, correct?
Hmm interesting.
Brent,
Brent Roman wrote:
Brent Roman wrote:
On OSX -fomit-frame-pointer is turned off if you use -O2, or other
On Mon, 22 Dec 2008 20:59:05 +1100, Brent Roman <brent@mbari.org> wrote:
Hi,
The problem can be demonstrated with a very simple program (attached), and
> What I did come up with was not ugly at all. Factor the unwieldy switch
On Tue, Dec 02, 2008 at 04:47:46AM +0900, Brent Roman wrote:
At 06:56 08/12/02, Brian Candler wrote:
On Tue, Dec 02, 2008 at 10:21:05AM +0900, Martin Duerst wrote:
Hi,
> After a couple weeks of long nights and false starts, I feel I may have come
[#19921] flay is so awesome! — Ryan Davis <ryand-ruby@...>
I just found a typo in code in tk via flay! RAD!! This exists in trunk
2008/11/13 Ryan Davis <ryand-ruby@zenspider.com>:
[#19938] Fibers in 1.8 — "Aman Gupta" <rubytalk@...1.net>
Are there any plans to backport Fiber to ruby 1.8?
Hi,
> Fiber in 1.9 equals to Thread of 1.8.
On Wed, Nov 19, 2008 at 17:41, Aman Gupta <rubytalk@tmm1.net> wrote:
Brian Mitchell wrote:
On Wed, Nov 19, 2008 at 20:34, Urabe Shyouhei <shyouhei@ruby-lang.org> wrote:
[#19962] any ideas on why quoted parameters fail in mingw? — "Roger Pack" <rogerpack2005@...>
QW55Ym9keSBoYXZlIGFueSB0aG91Z2h0cyB3aHkKCmM6XGRldj5ydWJ5IC1lICIgXCIzXCIgIgot
T24gU3VuLCBOb3YgMTYsIDIwMDggYXQgMjo1OCBBTSwgUm9nZXIgUGFjayA8cm9nZXJwYWNrMjAw
SW50ZXJlc3RpbmcuCgpTby4uLm9mIG15IDMgd2luZG93cyBtYWNoaW5lcywgMiBpdCBmYWlscyBb
On Mon, Nov 17, 2008 at 11:10 AM, Roger Pack <rogerpack2005@gmail.com> wrote:
On Mon, Nov 17, 2008 at 7:35 AM, Luis Lavena <luislavena@gmail.com> wrote:
[#19965] ruby "[BUG] " and backtrace of native function call - addr2line - useless info — "=?ISO-8859-2?Q?Rados=B3aw_Bu=B3at?=" <radek.bulat@...>
SSBhdHRlbXB0IHRvIHVzZSBydWJ5MS45IGZyb20gdHJ1bmsgdG8gaGF2ZSBmdW4gd2l0aCBpdCBv
Rados梶w Buウat wrote:
[#19971] NULL pointer emerging from empty regexp match!? — Jens Wille <jens.wille@...>
hi!
[#19996] [BUG?] rdoc/ri on solaris 8 (i386 vs sparc) — Ben Walton <bwalton@...>
Hi All,
[#20008] [Bug #766] 'Not enough space' error on windows — Ittay Dror <redmine@...>
Bug #766: 'Not enough space' error on windows
[#20039] printing more output on unrescued exceptions — "Roger Pack" <rogerpack2005@...>
I have been contemplating creating a patch which would make the output
[#20046] ruby19 13% slower running rexml benchmark than ruby 1.8.6 p114 — Stephen Bannasch <stephen.bannasch@...>
I just added ruby 1.9 (svn rev 20317) to a simple xml processing
[#20047] 1.9 method argument binding question — "David A. Black" <dblack@...>
Hi --
[#20048] Unexpected Performance of Symbol Construction — Kurt Stephens <kurt@...>
http://kurtstephens.com/node/72
[#20071] Is missing documentation considered a bug? — Florian Gilcher <flo@...>
Hi,
[#20079] Again: Questions about Fiber behaviour — =?ISO-8859-15?Q?Wolfgang_N=E1dasi-Donner?= <ed.odanow@...>
Hi!
[#20091] [Bug #796] dynamic constant assignment — Francois Proulx <redmine@...>
Bug #796: dynamic constant assignment
Hi,
> -----Original Message-----
[#20092] [Bug #797] bug or feature: local method ? — Francois Proulx <redmine@...>
Bug #797: bug or feature: local method ?
Hi,
Hi,
Yukihiro Matsumoto wrote:
On Thu, Nov 27, 2008 at 03:32:18AM +0900, Francoys wrote:
[#20125] Playing with String#bytes — Emiel van de Laar <emiel@...>
Hello ruby-core,
[#20129] Ruby class variable access from C — Christopher Thompson <cthompson@...>
I'm probably missing something trivial, but given the following Ruby code:
[#20161] \Z? in regular expression in 1.9.1 — Michael Klishin <michael.s.klishin@...>
I noticed that the following reg exp causes syntax error in 1.9.1 (I
T24gU2F0LCBOb3YgMjksIDIwMDggYXQgMTI6MTQgQU0sIE1pY2hhZWwgS2xpc2hpbgo8bWljaGFl
Hi,
Hi --
[ruby-core:20143] Re: [Bug #797] bug or feature: local method ?
On Fri, Nov 28, 2008 at 03:41:40AM +0900, Francoys wrote:
> -------------------------------------------------------------------------
> technic 1 (bad)
>
> a_list = # a big link list
> b_list = # another big link list
> c_list = # result of operation on a_list and b_link
>
> def foo1(x,y,z)
> .....
> end
>
> def foo2(x,y,z)
> ......
> end
>
> def foo3(x,y,z)
> .....
> end
>
> # le content of a_lst, b_lst, c_lst are will be modify by foo1, foo2, foo3
> foo(x,y,z)
> a_lst, b_lst, c_lst = foo1(x,y,z)
> a_lst, b_lst, c_lst = foo2(a_lst, b_lst, c_lst)
> a_lst, b_lst, c_lst = foo3(a_lst, b_lst, c_lst)
> return a_lst, b_lst, c_lst
> end
>
> p( foo(a_list, b_list, c_list))
> # in this case scenario: 6 lists ares needed !
Perhaps you've misunderstood how assignments work in Ruby. If you do
a = [:an, :array, :of, :stuff]
b = a
then the second line does *not* create any new object. So what you say is
true only if function foo1 creates and returns three new lists.
Now, if foo1, foo2 and foo3 each modify the lists (as you say), then they
don't even need to return them. You could just do:
def foo(x,y,z)
foo1(x,y,z)
foo2(x,y,z)
foo3(x,y,z)
end
foo(a_list, b_list, c_list)
p a_list, b_list, c_list
> -------------------------------------------------------------------------
> technic 2 (faster and better because it's create less list, but i do not
> like globals variables)
>
> $a_list = # a big link list
> $b_list = # another big link list
> $c_list = # result of operation on a_list and b_link
>
> def foo1()
> op1($a_list,$b_list,$c_list)
> end
>
> def foo2()
> op2($a_list,$b_list,$c_list)
> end
>
> def foo3()
> op2($a_list,$b_list,$c_list)
> end
>
> foo()
> foo1()
> foo2()
> foo3()
> end
>
> foo()
> p $a_list, $b_list, $c_list
>
> # in this case scenario: 3 lists ares needed !
That ends up being pretty much the same as my modified example above, except
that I didn't use any globals.
As you're probably aware, after execution of
op1($a_list, $b_list, $c_list)
those three global variables *must* still be pointing to the same objects -
the references are passed by value. However op1 can mutate those objects.
> -------------------------------------------------------------------------
> technic 3 (faster, and smarter because lists cease to exist with the end
> of execution of p )
>
> foo()
> a_list = # a big link list
> b_list = # another big link list
> c_list = # result of operation on a_list and b_link
>
> def foo1()
> op1(a_list,b_list,c_list)
> end
>
> def foo2()
> op2(a_list,b_list,c_list)
> end
>
> def foo3()
> op2(a_list,b_list,c_list)
> end
>
> foo1()
> foo2()
> return foo3()
> end
>
> p foo()
No, not faster or necessarily smarter. Objects are not destroyed when they
drop out of scope; they are destroyed after they no longer have any live
references, when the next garbage collection is done.
If you really want to organise your code like this, you can using lambdas:
def foo
a_list = ...
b_list = ...
c_list = ...
foo1 = lambda {
op1(a_list, b_list, c_list)
}
...
foo1[]
end
This just avoids having to pass a_list, b_list, c_list to foo, because they
are visible in the enclosing scope.
But in many cases a more Rubyesque way would be to create a container class
to hold those three lists and to group together the operations on them.
class A
class B
attr_accessor :a, :b, :c
def initialize(a,b,c)
@a, @b, @c = a,b,c
end
def foo1
op1(@a, @b, @c)
# or perhaps: @a, @b, @c = op1(@a, @b, @c)
end
...
end
def foo
a_list = ...
b_list = ...
c_list = ...
b = B.new(a_list, b_list, c_list)
b = b.foo1
...
return b.a, b.b, b.c
end
end
Notice that a 'throwaway' instance of class B is created inside method
A#foo, and is garbage-collected after it returns. That doesn't matter -
objects are cheap to create in Ruby, and it's a small object as it just has
three instance variables (which only hold a reference to the list objects,
which already exist).
With this approach you need to decide where it makes most sense for op1 to
live. If it makes sense to live in class B then it gets even simpler, as it
can access the instance variables @a, @b, @c directly without having to have
them passed as arguments.
I reiterate - objects are created and destroyed often in Ruby. You may not
realise it, but even
10.times { puts "hello" }
creates 10 distinct String objects, and garbage collects them.
Regards,
Brian.