<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-13890</id>
	<title>Nabble - ruby-talk</title>
	<updated>2009-11-09T15:06:23Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/ruby-talk-f13890.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/ruby-talk-f13890.html" />
	<subtitle type="html"></subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26275400</id>
	<title>Re: Good or best way to allocate a large array</title>
	<published>2009-11-09T15:06:23Z</published>
	<updated>2009-11-09T15:06:23Z</updated>
	<author>
		<name>Rick DeNatale</name>
	</author>
	<content type="html">On Mon, Nov 9, 2009 at 5:46 PM, Ralph Shnelvar &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26275400&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ralphs@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; Florian,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If there is no use count, how does Ruby know that there are no
&lt;br&gt;&amp;gt; references to the object that should be freed?
&lt;br&gt;&lt;br&gt;As Florian said, MRI ruby uses a mark-sweep GC algorithm, &amp;nbsp;when it
&lt;br&gt;needs to GC it traces out references from a set of root objects, and
&lt;br&gt;marks any objects which are reachable recursively.
&lt;br&gt;&lt;br&gt;Then it frees any objects which aren't marked.
&lt;br&gt;&lt;br&gt;Reference counting might seem simpler, but it is expensive because the
&lt;br&gt;count needs to be maintained everytime a reference changes, and it
&lt;br&gt;can't reclaim cyclic garbage which can't be reached from a root:
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;a -&amp;gt; b -&amp;gt; c
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;^ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*------------+
&lt;br&gt;&lt;br&gt;Mark/Sweep is a fairly primitive GC technique, it was probably the
&lt;br&gt;second technique applied in the long history of GC. &amp;nbsp;There are more
&lt;br&gt;recent techniques such as generation scavenging which makes use of the
&lt;br&gt;observance that most objects in a uniformly object-oriented language
&lt;br&gt;like Ruby either live a very short, or a reasonably long life time
&lt;br&gt;with the preponderance being short-lived. Generation scavenging
&lt;br&gt;collects the short-lived objects very efficiently, and typically uses
&lt;br&gt;mark-sweep less frequently to clean up the older ones.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Rick DeNatale
&lt;br&gt;&lt;br&gt;Blog: &lt;a href=&quot;http://talklikeaduck.denhaven2.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://talklikeaduck.denhaven2.com/&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/RickDeNatale&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/RickDeNatale&lt;/a&gt;&lt;br&gt;WWR: &lt;a href=&quot;http://www.workingwithrails.com/person/9021-rick-denatale&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.workingwithrails.com/person/9021-rick-denatale&lt;/a&gt;&lt;br&gt;LinkedIn: &lt;a href=&quot;http://www.linkedin.com/in/rickdenatale&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/in/rickdenatale&lt;/a&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Good-or-best-way-to-allocate-a-large-array-tp26270277p26275400.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26275287</id>
	<title>Re: Ruby doesn't implement x++ for Fixnum's because ???</title>
	<published>2009-11-09T14:57:08Z</published>
	<updated>2009-11-09T14:57:08Z</updated>
	<author>
		<name>Rick DeNatale</name>
	</author>
	<content type="html">On Mon, Nov 9, 2009 at 2:48 PM, Aldric Giacomoni &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26275287&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;aldric@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; Rick Denatale wrote:
&lt;br&gt;&amp;gt;&amp;gt; Just so you know I wasn't dissing La langue belle.  I try to maintain
&lt;br&gt;&amp;gt;&amp;gt; a basic fluency.  Not sure if my French or my C is more rusty! &amp;lt;G&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hah! No worries, I wasn't insulted.
&lt;br&gt;&amp;gt; So .. Friend++ ?
&lt;br&gt;&lt;br&gt;Bien sur
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Rick DeNatale
&lt;br&gt;&lt;br&gt;Blog: &lt;a href=&quot;http://talklikeaduck.denhaven2.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://talklikeaduck.denhaven2.com/&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/RickDeNatale&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/RickDeNatale&lt;/a&gt;&lt;br&gt;WWR: &lt;a href=&quot;http://www.workingwithrails.com/person/9021-rick-denatale&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.workingwithrails.com/person/9021-rick-denatale&lt;/a&gt;&lt;br&gt;LinkedIn: &lt;a href=&quot;http://www.linkedin.com/in/rickdenatale&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/in/rickdenatale&lt;/a&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Ruby-doesn%27t-implement-x%2B%2B-for-Fixnum%27s-because-----tp26123625p26275287.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26275155</id>
	<title>Re: Good or best way to allocate a large array</title>
	<published>2009-11-09T14:46:33Z</published>
	<updated>2009-11-09T14:46:33Z</updated>
	<author>
		<name>Ralph Shnelvar</name>
	</author>
	<content type="html">Florian,
&lt;br&gt;&lt;br&gt;If there is no use count, how does Ruby know that there are no
&lt;br&gt;references to the object that should be freed?
&lt;br&gt;&lt;br&gt;Ralph
&lt;br&gt;&lt;br&gt;Monday, November 9, 2009, 3:02:37 PM, you wrote:
&lt;br&gt;&lt;br&gt;FF&amp;gt; Ralph Shnelvar wrote:
&lt;br&gt;&amp;gt;&amp;gt; Marnen,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Unless &amp;quot;scope&amp;quot; means something different in Ruby than it does in other
&lt;br&gt;&amp;gt;&amp;gt; languages, it would appear that the garbage collector cannot possibly
&lt;br&gt;&amp;gt;&amp;gt; free memory when something goes out of scope but, instead, when the
&lt;br&gt;&amp;gt;&amp;gt; UseCount goes to zero.
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;FF&amp;gt; Except that uses aren't counted in Ruby. Ruby has a mark-and-sweep 
&lt;br&gt;FF&amp;gt; garbage collector. When Ruby runs out of memory a garbage collection run
&lt;br&gt;FF&amp;gt; is triggered. If there aren't any references to the objects in question
&lt;br&gt;FF&amp;gt; left, they aren't reachable from the root set and thus not marked in the
&lt;br&gt;FF&amp;gt; first phase of GC, in the second phase they will then (too be 
&lt;br&gt;FF&amp;gt; conservative: most likely) be freed.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Best regards,
&lt;br&gt;&amp;nbsp;Ralph &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26275155&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ralphs@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Good-or-best-way-to-allocate-a-large-array-tp26270277p26275155.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26275094</id>
	<title>Re: Good or best way to allocate a large array</title>
	<published>2009-11-09T14:42:51Z</published>
	<updated>2009-11-09T14:42:51Z</updated>
	<author>
		<name>Ralph Shnelvar</name>
	</author>
	<content type="html">Robert,
&lt;br&gt;&lt;br&gt;Doesn't that just move things into a BiNum ... which is not native 64?
&lt;br&gt;&lt;br&gt;Ralph
&lt;br&gt;&lt;br&gt;Monday, November 9, 2009, 2:35:26 PM, you wrote:
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; Does Ruby support native 64-bit quantities?
&lt;br&gt;&lt;br&gt;RK&amp;gt; Yes. &amp;nbsp;You can try it out
&lt;br&gt;&lt;br&gt;RK&amp;gt; ruby1.9 -e '100.times {|i| x = 1 &amp;lt;&amp;lt; i;p x, x.class}'
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Best regards,
&lt;br&gt;&amp;nbsp;Ralph &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26275094&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ralphs@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Good-or-best-way-to-allocate-a-large-array-tp26270277p26275094.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26274736</id>
	<title>Re: Readout and Edit Cookies</title>
	<published>2009-11-09T14:18:26Z</published>
	<updated>2009-11-09T14:18:26Z</updated>
	<author>
		<name>Ch Hab</name>
	</author>
	<content type="html">Christian Habermann wrote:
&lt;br&gt;&amp;gt; First I send a Form with Net::HTTP.post_form.
&lt;br&gt;&amp;gt; Now I want to readout a Cookie and later edit it! How can I make this?
&lt;br&gt;&lt;br&gt;I found the solution! Mechanize
&lt;br&gt;&lt;a href=&quot;http://mechanize.rubyforge.org/mechanize/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mechanize.rubyforge.org/mechanize/&lt;/a&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Posted via &lt;a href=&quot;http://www.ruby-forum.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.ruby-forum.com/&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Readout-and-Edit-Cookies-tp26272818p26274736.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26274528</id>
	<title>Re: Good or best way to allocate a large array</title>
	<published>2009-11-09T14:02:37Z</published>
	<updated>2009-11-09T14:02:37Z</updated>
	<author>
		<name>Florian Frank-5</name>
	</author>
	<content type="html">Ralph Shnelvar wrote:
&lt;br&gt;&amp;gt; Marnen,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Unless &amp;quot;scope&amp;quot; means something different in Ruby than it does in other
&lt;br&gt;&amp;gt; languages, it would appear that the garbage collector cannot possibly
&lt;br&gt;&amp;gt; free memory when something goes out of scope but, instead, when the
&lt;br&gt;&amp;gt; UseCount goes to zero.
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;Except that uses aren't counted in Ruby. Ruby has a mark-and-sweep 
&lt;br&gt;garbage collector. When Ruby runs out of memory a garbage collection run 
&lt;br&gt;is triggered. If there aren't any references to the objects in question 
&lt;br&gt;left, they aren't reachable from the root set and thus not marked in the 
&lt;br&gt;first phase of GC, in the second phase they will then (too be 
&lt;br&gt;conservative: most likely) be freed.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Florian Frank
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Good-or-best-way-to-allocate-a-large-array-tp26270277p26274528.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26274519</id>
	<title>Re: Understanding Threads...</title>
	<published>2009-11-09T14:01:38Z</published>
	<updated>2009-11-09T14:01:38Z</updated>
	<author>
		<name>Robert Klemme-2</name>
	</author>
	<content type="html">On 11/09/2009 10:24 PM, Judson Lester wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I completely agree with Jason's diagnosis. &amp;nbsp;I'd like to make two
&lt;br&gt;&amp;gt; observations, though.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; First, you can avoid the mutex entirely by using thread-local variables:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; threads &amp;lt;&amp;lt; Thread.new { Thread.current[:result] = method1(string) }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; results = threads.inject({}) do |results, thread|
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; thread.join
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; results.merge(thread[:result])
&lt;br&gt;&amp;gt; &amp;nbsp; end
&lt;/div&gt;&lt;br&gt;Even better: we have Thread.value. &amp;nbsp;If you join only from a single 
&lt;br&gt;thread there is no additional synchronization needed:
&lt;br&gt;&lt;br&gt;irb(main):001:0&amp;gt; t = (1..5).map {|i| Thread.new(i) {|x| &amp;quot;value #{x}&amp;quot;} }
&lt;br&gt;=&amp;gt; [#&amp;lt;Thread:0x9c4f618 dead&amp;gt;, #&amp;lt;Thread:0x9c4f58c dead&amp;gt;, 
&lt;br&gt;#&amp;lt;Thread:0x9c4f4b0 run&amp;gt;, #&amp;lt;Thread:0x9c4f424 run&amp;gt;, #&amp;lt;Thread:0x9c4f398 run&amp;gt;]
&lt;br&gt;irb(main):002:0&amp;gt; t.map {|th| th.value}
&lt;br&gt;=&amp;gt; [&amp;quot;value 1&amp;quot;, &amp;quot;value 2&amp;quot;, &amp;quot;value 3&amp;quot;, &amp;quot;value 4&amp;quot;, &amp;quot;value 5&amp;quot;]
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Second, and (possibly) more controversially, just because you can eval
&lt;br&gt;&amp;gt; doesn't mean you should. &amp;nbsp;To my eye, this looks nicer:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; threads = [
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Thread.new { Thread.current[:result] = method1(string) },
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Thread.new { Thread.current[:result] = method2(string) },
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Thread.new { Thread.current[:result] = method3(string) },
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Thread.new { Thread.current[:result] = method4(string) }
&lt;br&gt;&amp;gt; &amp;nbsp; ]
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; And exception handling, etc, will be ever so much clearer.
&lt;/div&gt;&lt;br&gt;You can as well do
&lt;br&gt;&lt;br&gt;def method(string)
&lt;br&gt;&amp;nbsp; &amp;nbsp;threads = %w{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;methodname1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;methodname2
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;methodname3
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;methodname4
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}.map do |method|
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Thread.new(method) do |m|
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;send(m, string) # each method call makes an HTTP request
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;end.map {|th| th.value}
&lt;br&gt;end
&lt;br&gt;&lt;br&gt;and be done.
&lt;br&gt;&lt;br&gt;Kind regards
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; robert
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;remember.guy do |as, often| as.you_can - without end
&lt;br&gt;&lt;a href=&quot;http://blog.rubybestpractices.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://blog.rubybestpractices.com/&lt;/a&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Understanding-Threads...-tp26273365p26274519.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26274371</id>
	<title>Re: wrong number of arguments in initialize</title>
	<published>2009-11-09T13:51:32Z</published>
	<updated>2009-11-09T13:51:32Z</updated>
	<author>
		<name>Anthony Metcalf-2</name>
	</author>
	<content type="html">Arti Singh wrote:
&lt;br&gt;&amp;gt; I tried to initalize my methods and I get an error
&lt;br&gt;&amp;gt; &amp;nbsp; def initialize(name,browser,username)
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;You define intialize to ask for 3 arguments, you don't give any of them
&lt;br&gt;defaults.....
&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; @s_name=name
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; @browser=browser
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; @username=username
&lt;br&gt;&amp;gt; &amp;nbsp; end #def initialize(dc)
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt; &amp;nbsp;attr_accessor :name,:browser,:username
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; C:/RubyInstall/ruby/lib/ruby/1.8/test/unit/testcase.rb:59:in
&lt;br&gt;&amp;gt; `initialize': wrong number of arguments (1 for 3) (ArgumentError)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;You don't show where you call the initialize method, but the error says
&lt;/div&gt;you only gave one argument, and that it was called on line 59...
&lt;br&gt;&amp;gt; I honestly dont get it now, this is silly
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;I get bit by this one all the time :)
&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (270 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26274371/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/wrong-number-of-arguments-in-initialize-tp26273876p26274371.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26274348</id>
	<title>Re: FXRuby table and color questions</title>
	<published>2009-11-09T13:51:02Z</published>
	<updated>2009-11-09T13:51:02Z</updated>
	<author>
		<name>Lyle Johnson-4</name>
	</author>
	<content type="html">On Mon, Nov 9, 2009 at 1:38 PM, Leslie Viljoen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26274348&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;leslieviljoen@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Does the Fox toolkit support partial transparency?
&lt;br&gt;&lt;br&gt;Not as far as I know.
&lt;br&gt;&lt;br&gt;When you assign an icon image to a widget (usually a label or button),
&lt;br&gt;FOX will honor any regions identified as fully transparent in the
&lt;br&gt;image. For PNGs, it uses the alpha channel to identify regions where
&lt;br&gt;alpha is zero; for other image types it can guess the transparent
&lt;br&gt;color or you can specify it explicitly.
&lt;br&gt;&lt;br&gt;&amp;gt; Also, is it possible to give different background colours to each cell
&lt;br&gt;&amp;gt; in a FXTable? The documentation seems to
&lt;br&gt;&amp;gt; skirt past this issue with a setCellColor function which only provides
&lt;br&gt;&amp;gt; for global shading of every second row/col.
&lt;br&gt;&amp;gt; Maybe I am missing something obvious?
&lt;br&gt;&lt;br&gt;You aren't missing anything. All you can achieve with the table, short
&lt;br&gt;of maybe subclassing it and overriding the drawing behavior, is set
&lt;br&gt;alternating cell colors.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/FXRuby-table-and-color-questions-tp26272413p26274348.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26274334</id>
	<title>Re: FileString - request for comments</title>
	<published>2009-11-09T13:50:00Z</published>
	<updated>2009-11-09T13:50:00Z</updated>
	<author>
		<name>apeiros</name>
	</author>
	<content type="html">-------- Original-Nachricht --------
&lt;br&gt;&amp;gt; Datum: Tue, 10 Nov 2009 06:25:08 +0900
&lt;br&gt;&amp;gt; Von: Robert Klemme &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26274334&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;shortcutter@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Betreff: Re: FileString - request for comments
&lt;br&gt;&lt;br&gt;&amp;gt; A good point! &amp;nbsp;You're probably right and I was too pessimistic. &amp;nbsp;I'd 
&lt;br&gt;&amp;gt; love to see
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; fs[/foo(\w+)/, 1] = &amp;quot;bar&amp;quot;
&lt;br&gt;&amp;gt; fs.gsub! /foo/, &amp;quot;bar&amp;quot;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; etc. because those would be the ones that would make FileString 
&lt;br&gt;&amp;gt; convenient for me. &amp;nbsp;:-)
&lt;br&gt;&lt;br&gt;Those already exist. Unfortunately optimizing regex matching is too involved as that I could have done that in 24h :)
&lt;br&gt;Means fs[/foo(\w+)/, 1] = &amp;quot;bar&amp;quot; is just more convenient than writing:
&lt;br&gt;data = File.read
&lt;br&gt;data[/foo(\w+)/, 1] = &amp;quot;bar&amp;quot;
&lt;br&gt;File.open(path, &amp;quot;w&amp;quot;) { |fh| fh.write(data) }
&lt;br&gt;But I think that's already quite worth it :)
&lt;br&gt;I mean - that's just lots of boilerplate.
&lt;br&gt;&lt;br&gt;&amp;gt; Thanks for listening and sharing!
&lt;br&gt;&lt;br&gt;Always :D
&lt;br&gt;The listening part has made me change the docs btw., I know hint on thinking about performance and probably just use a string and write back when all is done.
&lt;br&gt;&lt;br&gt;Regards
&lt;br&gt;Stefan
&lt;br&gt;-- 
&lt;br&gt;Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
&lt;br&gt;sicherer, schneller und einfacher! &lt;a href=&quot;http://portal.gmx.net/de/go/atbrowser&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://portal.gmx.net/de/go/atbrowser&lt;/a&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/FileString---request-for-comments-tp26260163p26274334.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26274314</id>
	<title>wxRuby - tabular data with extra widgets</title>
	<published>2009-11-09T13:49:03Z</published>
	<updated>2009-11-09T13:49:03Z</updated>
	<author>
		<name>Anthony Metcalf-2</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; I am needing to display a table of data.
&lt;br&gt;&amp;nbsp; &amp;nbsp; I need to be able to sort the columns by clicking the label at the
&lt;br&gt;top (ideally such that one click sorts ascending, the next descending
&lt;br&gt;etc etc)
&lt;br&gt;&amp;nbsp; &amp;nbsp; I need grid lines.
&lt;br&gt;&amp;nbsp; &amp;nbsp; I need to be able to include drop down lists in multiple columns,
&lt;br&gt;such that selecting the drop down will change columns in the same row.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; This data is backed by active record, and I have active support etc
&lt;br&gt;available.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; My first thought was to use Wx::Grid, but I don't have the first
&lt;br&gt;idea how to go about getting a drop down into a column.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; My second thought is to use a grid sizer of some sort, but that
&lt;br&gt;would mean creating my own buttons for the column headers, doing
&lt;br&gt;something to get a grid etc etc.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; What other options to I have? Or how do I go about 1)?
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; All pointers appreciated!
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Current source is at
&lt;br&gt;&lt;a href=&quot;http://codaset.com/nevynxxx/wxrcg/source/master/blob/lib/views/dm_screen_frame.rb&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://codaset.com/nevynxxx/wxrcg/source/master/blob/lib/views/dm_screen_frame.rb&lt;/a&gt;&lt;br&gt;&lt;br&gt;Regards
&lt;br&gt;&lt;br&gt;Anthony
&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (270 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26274314/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/wxRuby---tabular-data-with-extra-widgets-tp26274314p26274314.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26274122</id>
	<title>Re: Good or best way to allocate a large array</title>
	<published>2009-11-09T13:35:26Z</published>
	<updated>2009-11-09T13:35:26Z</updated>
	<author>
		<name>Robert Klemme-2</name>
	</author>
	<content type="html">On 11/09/2009 06:25 PM, Ralph Shnelvar wrote:
&lt;br&gt;&amp;gt; Newbie here:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I will want/need to create an array of approximately 300K rows and 20
&lt;br&gt;&amp;gt; columns. The array will be an array of either 32-bit quantities or 64-bit quantities.
&lt;br&gt;&lt;br&gt;So we are talking about 300,000 * 20 * 8 ~ 48MB which does not sound too 
&lt;br&gt;large.
&lt;br&gt;&lt;br&gt;robert@fussel:~$ time ruby1.9 -e 'x=1&amp;lt;&amp;lt;63;Array.new(300_000*20) {x}'
&lt;br&gt;&lt;br&gt;real	0m1.922s
&lt;br&gt;user	0m1.288s
&lt;br&gt;sys	0m0.032s
&lt;br&gt;robert@fussel:~$ time ruby1.9 -e 'x=1&amp;lt;&amp;lt;63;Array.new(300_000*20) {1&amp;lt;&amp;lt;63}'
&lt;br&gt;&lt;br&gt;real	0m7.143s
&lt;br&gt;user	0m6.668s
&lt;br&gt;sys	0m0.204s
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; Does Ruby support native 64-bit quantities?
&lt;br&gt;&lt;br&gt;Yes. &amp;nbsp;You can try it out
&lt;br&gt;&lt;br&gt;ruby1.9 -e '100.times {|i| x = 1 &amp;lt;&amp;lt; i;p x, x.class}'
&lt;br&gt;&lt;br&gt;&amp;gt; What's a good/best way to to create such an array. Is there a way to
&lt;br&gt;&amp;gt; tell Ruby, &amp;quot;OK, I'm done with this array.&amp;quot;
&lt;br&gt;&lt;br&gt;No need to: if there are no more live references to that Array it will 
&lt;br&gt;get collected eventually.
&lt;br&gt;&lt;br&gt;&amp;gt; Can one create such an array such that the garbage collector can
&lt;br&gt;&amp;gt; free the memory in one fast operation?
&lt;br&gt;&lt;br&gt;Probably not because of the number of objects in the Array (if they are 
&lt;br&gt;all Fixnums it will probably a bit faster.
&lt;br&gt;&lt;br&gt;The question is, what do you do with that huge Array? &amp;nbsp;Chances are that 
&lt;br&gt;you need to allocate more memory during processing. &amp;nbsp;What's your use 
&lt;br&gt;case? &amp;nbsp;A database might be an option or a flat file - it all depends.
&lt;br&gt;&lt;br&gt;Kind regards
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; robert
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;remember.guy do |as, often| as.you_can - without end
&lt;br&gt;&lt;a href=&quot;http://blog.rubybestpractices.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://blog.rubybestpractices.com/&lt;/a&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Good-or-best-way-to-allocate-a-large-array-tp26270277p26274122.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26274061</id>
	<title>Re: [ANN] called_from 0.1.0 released</title>
	<published>2009-11-09T13:31:31Z</published>
	<updated>2009-11-09T13:31:31Z</updated>
	<author>
		<name>Judson</name>
	</author>
	<content type="html">I've long wished that caller returned an array of BacktraceLine... likewise
&lt;br&gt;Exception#backtrace.
&lt;br&gt;&lt;br&gt;class BacktraceLine
&lt;br&gt;&amp;nbsp; attr_reader :line, :file, :method, :arguments
&lt;br&gt;end
&lt;br&gt;&lt;br&gt;Not sure if it's a daydream or an REP...
&lt;br&gt;&lt;br&gt;Judson
&lt;br&gt;&lt;br&gt;On Sun, Nov 8, 2009 at 4:51 PM, Jeremy Kemper &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26274061&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jeremy@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; This is probably the most common usage of Kernel#caller. You've made
&lt;br&gt;&amp;gt; it more useful and much faster -- great extension!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; jeremy
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Sun, Nov 8, 2009 at 3:25 PM, makoto kuwata &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26274061&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kwatch@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt; I releaded called_from 0.1.0.
&lt;br&gt;&amp;gt; &amp;gt; &lt;a href=&quot;http://github.com/kwatch/called_from&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/kwatch/called_from&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Kernel#caller() is very useful, but very slow.
&lt;br&gt;&amp;gt; &amp;gt; 'called_from' solves this problem.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; About
&lt;br&gt;&amp;gt; &amp;gt; -----
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; 'called_from' provides called_from() global function
&lt;br&gt;&amp;gt; &amp;gt; which gets filename and line number of caller.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; In short:
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;require 'called_from'
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;filename, linenum, function = called_from(1)
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; is equivarent to:
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;caller(1)[0] =~ /:(\d+)( in `(.*)')?/
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;filename, linenum, function = $`, $1, $2
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; But called_from() is much faster than caller()[0].
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Example
&lt;br&gt;&amp;gt; &amp;gt; -------
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;require 'called_from'
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;##
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;## report not only what sql is queried but also from where query()
&lt;br&gt;&amp;gt; &amp;gt; is called.
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;## (this is very convenient for development and debugging)
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;## in such examle, speed of called_from() is very important.
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;##
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;def query(sql)
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;filename, linenum, function = called_from()
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;log.debug(&amp;quot;#{Time.now}: #{sql} (called from #{filename}:#
&lt;br&gt;&amp;gt; &amp;gt; {linenum})&amp;quot;)
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;return connection.query(sql)
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;end
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;##
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;## if cache data is older than template file's timestamp,
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;## refresh cache data.
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;## it is very important that called_from() is much faster than
&lt;br&gt;&amp;gt; &amp;gt; caller()[0]
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;## because speed is necessary for caching.
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;##
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;def cache_helper(cache_key)
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;## check template file's timestamp
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;template_filename, linenum, function = called_from()
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;timestamp = File.mtime(template_filename)
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;## if cache data is newer than template's timestamp, return data
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;data = @cache.get(cache_key, :timestamp=&amp;gt;timestamp)
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;return data if data
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;## if cache data is older than template's timestamp, refresh it
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;data = yield()
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;@cache.set(cache_key, data)
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;return data
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;end
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Benchmark
&lt;br&gt;&amp;gt; &amp;gt; ---------
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Here is an example result of benchmark on Merb application.
&lt;br&gt;&amp;gt; &amp;gt; This shows that called_from() is more than 30 times faster than caller
&lt;br&gt;&amp;gt; &amp;gt; ()[0].
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;*** n=100000
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; user &amp;nbsp; &amp;nbsp; system &amp;nbsp; &amp;nbsp; &amp;nbsp;total
&lt;br&gt;&amp;gt; &amp;gt; real
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;caller()[0] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;7.920000 &amp;nbsp; 0.400000 &amp;nbsp; 8.320000
&lt;br&gt;&amp;gt; &amp;gt; ( &amp;nbsp;8.985343)
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;caller()[0] &amp;nbsp; (*1) &amp;nbsp; &amp;nbsp; &amp;nbsp; 8.590000 &amp;nbsp; 0.420000 &amp;nbsp; 9.010000
&lt;br&gt;&amp;gt; &amp;gt; ( &amp;nbsp;9.804065)
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;called_from() &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.240000 &amp;nbsp; 0.010000 &amp;nbsp; 0.250000
&lt;br&gt;&amp;gt; &amp;gt; ( &amp;nbsp;0.257151)
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;called_from() (*2) &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.250000 &amp;nbsp; 0.000000 &amp;nbsp; 0.250000
&lt;br&gt;&amp;gt; &amp;gt; ( &amp;nbsp;0.268603)
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;(*1) retrieve filename and line number using pattern match (=~ /:
&lt;br&gt;&amp;gt; &amp;gt; (\d+)/)
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;(*2) retrieve filename and line number
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Installation
&lt;br&gt;&amp;gt; &amp;gt; ------------
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;$ sudo gem install called_from
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Or
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;$ tar xzf called_from_X.X.X.tar.gz
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;$ cd called_from_X.X.X/
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;$ ruby setup.rb config
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;$ ruby setup.rb setup
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;$ sudo ruby setup.rb install
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Notice: called_from is implemented in both C-extention and pure Ruby.
&lt;br&gt;&amp;gt; &amp;gt; C-extention is available on UNIX-like OS and Ruby 1.8.x.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; --
&lt;br&gt;&amp;gt; &amp;gt; regards,
&lt;br&gt;&amp;gt; &amp;gt; makoto kuwata
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-ANN--called_from-0.1.0-released-tp26259173p26274061.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26273987</id>
	<title>Re: FileString - request for comments</title>
	<published>2009-11-09T13:25:08Z</published>
	<updated>2009-11-09T13:25:08Z</updated>
	<author>
		<name>Robert Klemme-2</name>
	</author>
	<content type="html">On 09.11.2009 17:29, &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26273987&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;apeiros@...&lt;/a&gt; wrote:
&lt;br&gt;&amp;gt; -------- Original-Nachricht --------
&lt;br&gt;&amp;gt;&amp;gt; Von: Robert Klemme &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26273987&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;shortcutter@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; As all highlevel things. If you don't know the things you're dealing with you can easily kill performance. Consider e.g. ary.any? { |obj| other.include?(obj) } - there, just accidentally created an O(n^2) algorithm. It can happen everywhere and it can look totally innocent.
&lt;br&gt;&amp;gt; That's not a problem that's specific to FileString but to everything that's abstract.
&lt;br&gt;&lt;br&gt;True.
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;And although at a certain level of abstraction a file and a
&lt;br&gt;&amp;gt;&amp;gt; String are pretty much the same (sequence of chars / bytes) it may
&lt;br&gt;&amp;gt;&amp;gt; actually be a good thing to keep the API separate in order to treat
&lt;br&gt;&amp;gt;&amp;gt; both appropriately. &amp;nbsp;Stefan, what's your experience?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; As you see, I disagree :)
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; However, what you say is of course correct. Using FileString means 
&lt;br&gt;you &amp;gt; have to keep in mind that you're dealing with a file.
&lt;br&gt;&amp;nbsp;&amp;gt; But: if you know you're dealing with a file, it can even help you
&lt;br&gt;&amp;nbsp;&amp;gt; making things faster. For example, if you indeed want to compare two
&lt;br&gt;&amp;nbsp;&amp;gt; files for equality, FileString#== will be faster and less memory
&lt;br&gt;&amp;nbsp;&amp;gt; intensive than you doing File.read(a) == File.read(b) if the two 
&lt;br&gt;files &amp;gt; are big.
&lt;br&gt;&lt;br&gt;A good point! &amp;nbsp;You're probably right and I was too pessimistic. &amp;nbsp;I'd 
&lt;br&gt;love to see
&lt;br&gt;&lt;br&gt;fs[/foo(\w+)/, 1] = &amp;quot;bar&amp;quot;
&lt;br&gt;fs.gsub! /foo/, &amp;quot;bar&amp;quot;
&lt;br&gt;&lt;br&gt;etc. because those would be the ones that would make FileString 
&lt;br&gt;convenient for me. &amp;nbsp;:-)
&lt;br&gt;&lt;br&gt;&amp;gt; Thanks for your thoughts robert, much appreciated
&lt;br&gt;&lt;br&gt;Thanks for listening and sharing!
&lt;br&gt;&lt;br&gt;Kind regards
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; robert
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;remember.guy do |as, often| as.you_can - without end
&lt;br&gt;&lt;a href=&quot;http://blog.rubybestpractices.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://blog.rubybestpractices.com/&lt;/a&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/FileString---request-for-comments-tp26260163p26273987.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26273973</id>
	<title>Re: Understanding Threads...</title>
	<published>2009-11-09T13:24:42Z</published>
	<updated>2009-11-09T13:24:42Z</updated>
	<author>
		<name>Judson</name>
	</author>
	<content type="html">I completely agree with Jason's diagnosis. &amp;nbsp;I'd like to make two
&lt;br&gt;observations, though.
&lt;br&gt;&lt;br&gt;First, you can avoid the mutex entirely by using thread-local variables:
&lt;br&gt;&lt;br&gt;&amp;nbsp; threads &amp;lt;&amp;lt; Thread.new { Thread.current[:result] = method1(string) }
&lt;br&gt;&lt;br&gt;&amp;nbsp; results = threads.inject({}) do |results, thread|
&lt;br&gt;&amp;nbsp; &amp;nbsp; thread.join
&lt;br&gt;&amp;nbsp; &amp;nbsp; results.merge(thread[:result])
&lt;br&gt;&amp;nbsp; end
&lt;br&gt;&lt;br&gt;Second, and (possibly) more controversially, just because you can eval
&lt;br&gt;doesn't mean you should. &amp;nbsp;To my eye, this looks nicer:
&lt;br&gt;&lt;br&gt;&amp;nbsp; threads = [
&lt;br&gt;&amp;nbsp; &amp;nbsp;Thread.new { Thread.current[:result] = method1(string) },
&lt;br&gt;&amp;nbsp; &amp;nbsp;Thread.new { Thread.current[:result] = method2(string) },
&lt;br&gt;&amp;nbsp; &amp;nbsp;Thread.new { Thread.current[:result] = method3(string) },
&lt;br&gt;&amp;nbsp; &amp;nbsp;Thread.new { Thread.current[:result] = method4(string) }
&lt;br&gt;&amp;nbsp; ]
&lt;br&gt;&lt;br&gt;And exception handling, etc, will be ever so much clearer.
&lt;br&gt;&lt;br&gt;Judson
&lt;br&gt;&lt;br&gt;On Mon, Nov 9, 2009 at 1:14 PM, Jason Roelofs &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26273973&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jameskilton@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Mon, Nov 9, 2009 at 3:45 PM, Matt White &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26273973&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mattw922@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I am writing an app that retrieves multiple web pages in one method
&lt;br&gt;&amp;gt; &amp;gt; call. Threading has improved performance drastically for me, but I
&lt;br&gt;&amp;gt; &amp;gt; need some help understanding how exactly the call to join is going to
&lt;br&gt;&amp;gt; &amp;gt; affect my program.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Here's some code:
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; def method(string)
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;result = {}
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;mutex = Mutex.new
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;threads = []
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;%w{methodname1 methodname2 methodname3 methodname4}.each do |method|
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;threads &amp;lt;&amp;lt; Thread.new(method) do |m|
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;r = eval(&amp;quot;#{m}(string)&amp;quot;) &amp;nbsp; &amp;nbsp; # each method call makes an HTTP
&lt;br&gt;&amp;gt; &amp;gt; request
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;mutex.synchronize { result.merge!(r) }
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;end
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;end
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;threads.each { |t| t.join }
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;result
&lt;br&gt;&amp;gt; &amp;gt; end
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Seems like the call to join on each thread is necessary to keep the
&lt;br&gt;&amp;gt; &amp;gt; script from getting ahead of itself, but if I exclude that line, it
&lt;br&gt;&amp;gt; &amp;gt; doesn't seem to hurt my results and the program runs a lot faster.
&lt;br&gt;&amp;gt; &amp;gt; Also, sometimes I get deadlocked somehow if I do use the call to join
&lt;br&gt;&amp;gt; &amp;gt; and I'm not certain as to why. Can someone help shed some light on the
&lt;br&gt;&amp;gt; &amp;gt; situation? Do I need to call join? Any idea why I'm deadlocking?
&lt;br&gt;&amp;gt; &amp;gt; Thanks!
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; Thread#join simply says &amp;quot;Wait here until this thread has finished
&lt;br&gt;&amp;gt; executing&amp;quot;.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; So what you're doing is waiting for all threads to finish before execution
&lt;br&gt;&amp;gt; continues, aka blocking main thread execution. Without the #join, the
&lt;br&gt;&amp;gt; values
&lt;br&gt;&amp;gt; in results will be nonderministic. Any perceived deadlocking is probably
&lt;br&gt;&amp;gt; whatever is in your eval call not timing out. You'll have to watch out
&lt;br&gt;&amp;gt; carefully for that.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Jason
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Understanding-Threads...-tp26273365p26273973.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26273876</id>
	<title>wrong number of arguments in initialize</title>
	<published>2009-11-09T13:18:24Z</published>
	<updated>2009-11-09T13:18:24Z</updated>
	<author>
		<name>Arti Singh-3</name>
	</author>
	<content type="html">&lt;br&gt;&lt;br&gt;I tried to initalize my methods and I get an error
&lt;br&gt;&amp;nbsp; def initialize(name,browser,username)
&lt;br&gt;&amp;nbsp; &amp;nbsp; @s_name=name
&lt;br&gt;&amp;nbsp; &amp;nbsp; @browser=browser
&lt;br&gt;&amp;nbsp; &amp;nbsp; @username=username
&lt;br&gt;&amp;nbsp; end #def initialize(dc)
&lt;br&gt;&amp;nbsp;attr_accessor :name,:browser,:username
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;C:/RubyInstall/ruby/lib/ruby/1.8/test/unit/testcase.rb:59:in
&lt;br&gt;`initialize': wrong number of arguments (1 for 3) (ArgumentError)
&lt;br&gt;&lt;br&gt;&lt;br&gt;I honestly dont get it now, this is silly
&lt;br&gt;-- 
&lt;br&gt;Posted via &lt;a href=&quot;http://www.ruby-forum.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.ruby-forum.com/&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/wrong-number-of-arguments-in-initialize-tp26273876p26273876.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26273828</id>
	<title>Re: Understanding Threads...</title>
	<published>2009-11-09T13:14:33Z</published>
	<updated>2009-11-09T13:14:33Z</updated>
	<author>
		<name>Jason Roelofs</name>
	</author>
	<content type="html">On Mon, Nov 9, 2009 at 3:45 PM, Matt White &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26273828&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mattw922@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I am writing an app that retrieves multiple web pages in one method
&lt;br&gt;&amp;gt; call. Threading has improved performance drastically for me, but I
&lt;br&gt;&amp;gt; need some help understanding how exactly the call to join is going to
&lt;br&gt;&amp;gt; affect my program.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Here's some code:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; def method(string)
&lt;br&gt;&amp;gt; &amp;nbsp;result = {}
&lt;br&gt;&amp;gt; &amp;nbsp;mutex = Mutex.new
&lt;br&gt;&amp;gt; &amp;nbsp;threads = []
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;%w{methodname1 methodname2 methodname3 methodname4}.each do |method|
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;threads &amp;lt;&amp;lt; Thread.new(method) do |m|
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;r = eval(&amp;quot;#{m}(string)&amp;quot;) &amp;nbsp; &amp;nbsp; # each method call makes an HTTP
&lt;br&gt;&amp;gt; request
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;mutex.synchronize { result.merge!(r) }
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;end
&lt;br&gt;&amp;gt; &amp;nbsp;end
&lt;br&gt;&amp;gt; &amp;nbsp;threads.each { |t| t.join }
&lt;br&gt;&amp;gt; &amp;nbsp;result
&lt;br&gt;&amp;gt; end
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Seems like the call to join on each thread is necessary to keep the
&lt;br&gt;&amp;gt; script from getting ahead of itself, but if I exclude that line, it
&lt;br&gt;&amp;gt; doesn't seem to hurt my results and the program runs a lot faster.
&lt;br&gt;&amp;gt; Also, sometimes I get deadlocked somehow if I do use the call to join
&lt;br&gt;&amp;gt; and I'm not certain as to why. Can someone help shed some light on the
&lt;br&gt;&amp;gt; situation? Do I need to call join? Any idea why I'm deadlocking?
&lt;br&gt;&amp;gt; Thanks!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;Thread#join simply says &amp;quot;Wait here until this thread has finished
&lt;br&gt;executing&amp;quot;.
&lt;br&gt;&lt;br&gt;So what you're doing is waiting for all threads to finish before execution
&lt;br&gt;continues, aka blocking main thread execution. Without the #join, the values
&lt;br&gt;in results will be nonderministic. Any perceived deadlocking is probably
&lt;br&gt;whatever is in your eval call not timing out. You'll have to watch out
&lt;br&gt;carefully for that.
&lt;br&gt;&lt;br&gt;Jason
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Understanding-Threads...-tp26273365p26273828.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26273365</id>
	<title>Understanding Threads...</title>
	<published>2009-11-09T12:45:06Z</published>
	<updated>2009-11-09T12:45:06Z</updated>
	<author>
		<name>Matt White-14</name>
	</author>
	<content type="html">I am writing an app that retrieves multiple web pages in one method
&lt;br&gt;call. Threading has improved performance drastically for me, but I
&lt;br&gt;need some help understanding how exactly the call to join is going to
&lt;br&gt;affect my program.
&lt;br&gt;&lt;br&gt;Here's some code:
&lt;br&gt;&lt;br&gt;def method(string)
&lt;br&gt;&amp;nbsp; result = {}
&lt;br&gt;&amp;nbsp; mutex = Mutex.new
&lt;br&gt;&amp;nbsp; threads = []
&lt;br&gt;&lt;br&gt;&amp;nbsp; %w{methodname1 methodname2 methodname3 methodname4}.each do |method|
&lt;br&gt;&amp;nbsp; &amp;nbsp; threads &amp;lt;&amp;lt; Thread.new(method) do |m|
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; r = eval(&amp;quot;#{m}(string)&amp;quot;) &amp;nbsp; &amp;nbsp; # each method call makes an HTTP
&lt;br&gt;request
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; mutex.synchronize { result.merge!(r) }
&lt;br&gt;&amp;nbsp; &amp;nbsp; end
&lt;br&gt;&amp;nbsp; end
&lt;br&gt;&amp;nbsp; threads.each { |t| t.join }
&lt;br&gt;&amp;nbsp; result
&lt;br&gt;end
&lt;br&gt;&lt;br&gt;Seems like the call to join on each thread is necessary to keep the
&lt;br&gt;script from getting ahead of itself, but if I exclude that line, it
&lt;br&gt;doesn't seem to hurt my results and the program runs a lot faster.
&lt;br&gt;Also, sometimes I get deadlocked somehow if I do use the call to join
&lt;br&gt;and I'm not certain as to why. Can someone help shed some light on the
&lt;br&gt;situation? Do I need to call join? Any idea why I'm deadlocking?
&lt;br&gt;Thanks!
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Understanding-Threads...-tp26273365p26273365.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26273265</id>
	<title>Re: Good or best way to allocate a large array</title>
	<published>2009-11-09T12:33:17Z</published>
	<updated>2009-11-09T12:33:17Z</updated>
	<author>
		<name>Ralph Shnelvar</name>
	</author>
	<content type="html">Marnen,
&lt;br&gt;&lt;br&gt;Unless &amp;quot;scope&amp;quot; means something different in Ruby than it does in other
&lt;br&gt;languages, it would appear that the garbage collector cannot possibly
&lt;br&gt;free memory when something goes out of scope but, instead, when the
&lt;br&gt;UseCount goes to zero.
&lt;br&gt;&lt;br&gt;Ralph
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Monday, November 9, 2009, 12:31:21 PM, you wrote:
&lt;br&gt;&lt;br&gt;MLK&amp;gt; Ralph Shnelvar wrote:
&lt;br&gt;&amp;gt;&amp;gt; Marnen,
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; I am a Ruby newbie but as far as I know, memory gets freed when the
&lt;br&gt;&amp;gt;&amp;gt; garbage collector gets around to doing it.
&lt;br&gt;&lt;br&gt;MLK&amp;gt; Right. &amp;nbsp;And as far as I know, it will do that when the object goes out
&lt;br&gt;MLK&amp;gt; of scope.
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; Ralph
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; MLK&amp;gt; The answer to both questions: as far as I know, it will be 
&lt;br&gt;&amp;gt;&amp;gt; deallocated
&lt;br&gt;&amp;gt;&amp;gt; MLK&amp;gt; when it goes out of scope.
&lt;br&gt;MLK&amp;gt; Best,
&lt;br&gt;MLK&amp;gt; --
&lt;br&gt;MLK&amp;gt; Marnen Laibow-Koser
&lt;br&gt;MLK&amp;gt; &lt;a href=&quot;http://www.marnen.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.marnen.org&lt;/a&gt;&lt;br&gt;MLK&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26273265&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;marnen@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Best regards,
&lt;br&gt;&amp;nbsp;Ralph &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26273265&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ralphs@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Good-or-best-way-to-allocate-a-large-array-tp26270277p26273265.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26272818</id>
	<title>Readout and Edit Cookies</title>
	<published>2009-11-09T12:05:39Z</published>
	<updated>2009-11-09T12:05:39Z</updated>
	<author>
		<name>Ch Hab</name>
	</author>
	<content type="html">First I send a Form with Net::HTTP.post_form.
&lt;br&gt;Now I want to readout a Cookie and later edit it! How can I make this?
&lt;br&gt;-- 
&lt;br&gt;Posted via &lt;a href=&quot;http://www.ruby-forum.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.ruby-forum.com/&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Readout-and-Edit-Cookies-tp26272818p26272818.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26272543</id>
	<title>Re: Ruby doesn't implement x++ for Fixnum's because ???</title>
	<published>2009-11-09T11:48:13Z</published>
	<updated>2009-11-09T11:48:13Z</updated>
	<author>
		<name>Aldric Giacomoni-2</name>
	</author>
	<content type="html">Rick Denatale wrote:
&lt;br&gt;&amp;gt; Just so you know I wasn't dissing La langue belle. &amp;nbsp;I try to maintain
&lt;br&gt;&amp;gt; a basic fluency. &amp;nbsp;Not sure if my French or my C is more rusty! &amp;lt;G&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;Hah! No worries, I wasn't insulted.
&lt;br&gt;So .. Friend++ ?
&lt;br&gt;Warning: incrementing a constant!
&lt;br&gt;-- 
&lt;br&gt;Posted via &lt;a href=&quot;http://www.ruby-forum.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.ruby-forum.com/&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Ruby-doesn%27t-implement-x%2B%2B-for-Fixnum%27s-because-----tp26123625p26272543.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26272433</id>
	<title>Re: Berkeley DB BDB Install on Windows</title>
	<published>2009-11-09T11:40:11Z</published>
	<updated>2009-11-09T11:40:11Z</updated>
	<author>
		<name>Luis Lavena</name>
	</author>
	<content type="html">On Nov 9, 11:45 am, david &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26272433&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davidho...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I've been scripting in Ruby (and Rails) for about two years now, but
&lt;br&gt;&amp;gt; have never gotten into the internals of the module/gem side. I've
&lt;br&gt;&amp;gt; created a Ruby script using SQLite3 which works well for small data
&lt;br&gt;&amp;gt; sets but has a performance issue when dealing with a large amount of
&lt;br&gt;&amp;gt; data. I'm hoping to try the Berkeley DB.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; To start, the environment is the following.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Windows XP
&lt;br&gt;&amp;gt; Berkeley DB 4.8.24
&lt;br&gt;&amp;gt; ruby  1.8.6-27 (&lt;a href=&quot;http://rubyinstaller.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://rubyinstaller.org&lt;/a&gt;)
&lt;br&gt;&amp;gt; devkit-3.4.5r3-20090411 (&lt;a href=&quot;http://rubyinstaller.org/addons.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://rubyinstaller.org/addons.html&lt;/a&gt;)
&lt;br&gt;&amp;gt; bdb-0.6.5
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;That will not work.
&lt;br&gt;&lt;br&gt;DevKit has been prepared to work with newer RubyInstaller releases,
&lt;br&gt;not the old One-Click ones. That is because One-Click has been
&lt;br&gt;compiled with VC6 and RubyInstaller with GCC, Ruby needs to use the
&lt;br&gt;same compiler.
&lt;br&gt;&lt;br&gt;Using the correct version of Ruby with the DevKit will allow you use --
&lt;br&gt;with-db-dir option pointing to the root of the compiled BDB libraries
&lt;br&gt;(which seems you didn't extract or installed).
&lt;br&gt;&lt;br&gt;So, first:
&lt;br&gt;&lt;br&gt;* Get the proper Ruby and DevKit
&lt;br&gt;* Get BDB binaries and development dependencies
&lt;br&gt;* Unpack them in a directory you remember
&lt;br&gt;* Unpack the bdb extension
&lt;br&gt;* Proceed with extconf and the proper compilation options.
&lt;br&gt;&lt;br&gt;HTH,
&lt;br&gt;--
&lt;br&gt;Luis Lavena
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Berkeley-DB-BDB-Install-on-Windows-tp26267693p26272433.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26272413</id>
	<title>FXRuby table and color questions</title>
	<published>2009-11-09T11:38:43Z</published>
	<updated>2009-11-09T11:38:43Z</updated>
	<author>
		<name>Leslie Viljoen-2</name>
	</author>
	<content type="html">Hi people!
&lt;br&gt;&lt;br&gt;Does the Fox toolkit support partial transparency? None of the
&lt;br&gt;documentation I read mentions it
&lt;br&gt;explicitly, but there's this page here:
&lt;br&gt;&lt;a href=&quot;http://www.fxruby.org/doc/ch03s05.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.fxruby.org/doc/ch03s05.html&lt;/a&gt;&amp;nbsp;showing (at the bottom) the
&lt;br&gt;really ugly
&lt;br&gt;results of binary-mask type transparency.
&lt;br&gt;&lt;br&gt;Also, is it possible to give different background colours to each cell
&lt;br&gt;in a FXTable? The documentation seems to
&lt;br&gt;skirt past this issue with a setCellColor function which only provides
&lt;br&gt;for global shading of every second row/col.
&lt;br&gt;Maybe I am missing something obvious?
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/FXRuby-table-and-color-questions-tp26272413p26272413.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26272361</id>
	<title>Re: Ruby doesn't implement x++ for Fixnum's because ???</title>
	<published>2009-11-09T11:35:39Z</published>
	<updated>2009-11-09T11:35:39Z</updated>
	<author>
		<name>Rick DeNatale</name>
	</author>
	<content type="html">Just so you know I wasn't dissing La langue belle. &amp;nbsp;I try to maintain
&lt;br&gt;a basic fluency. &amp;nbsp;Not sure if my French or my C is more rusty! &amp;lt;G&amp;gt;
&lt;br&gt;&lt;br&gt;On Mon, Nov 9, 2009 at 2:30 PM, Aldric Giacomoni &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26272361&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;aldric@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Rick Denatale wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; In French une langue denotes the same concept as tongue in English.
&lt;br&gt;&amp;gt;&amp;gt; The primary meaning is that muscle in the middle of a mouth. It can
&lt;br&gt;&amp;gt;&amp;gt; also mean a language
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Okay, I knew that...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; The French un Langage is first what is used by humans to express their
&lt;br&gt;&amp;gt;&amp;gt; thoughts and sentiments by means of &amp;quot;articulations of the voice&amp;quot;, by
&lt;br&gt;&amp;gt;&amp;gt; extension it also can mean written language, the 'language' of animals
&lt;br&gt;&amp;gt;&amp;gt; (bird song, dog's barking etc.) and finally a system of communication
&lt;br&gt;&amp;gt;&amp;gt; by any means &amp;quot;The symbolic language of flowers.&amp;quot; &amp;quot;Pantomime is a
&lt;br&gt;&amp;gt;&amp;gt; silent language.&amp;quot;  these last being translated examples from Le
&lt;br&gt;&amp;gt;&amp;gt; Dictionnaire.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; By Jove! Getting lessons in my mother idiom (*grin*) on a Ruby forum. I
&lt;br&gt;&amp;gt; knew I was following you on Twitter for a reason.
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; Posted via &lt;a href=&quot;http://www.ruby-forum.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.ruby-forum.com/&lt;/a&gt;.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Rick DeNatale
&lt;br&gt;&lt;br&gt;Blog: &lt;a href=&quot;http://talklikeaduck.denhaven2.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://talklikeaduck.denhaven2.com/&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/RickDeNatale&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/RickDeNatale&lt;/a&gt;&lt;br&gt;WWR: &lt;a href=&quot;http://www.workingwithrails.com/person/9021-rick-denatale&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.workingwithrails.com/person/9021-rick-denatale&lt;/a&gt;&lt;br&gt;LinkedIn: &lt;a href=&quot;http://www.linkedin.com/in/rickdenatale&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/in/rickdenatale&lt;/a&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Ruby-doesn%27t-implement-x%2B%2B-for-Fixnum%27s-because-----tp26123625p26272361.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26272294</id>
	<title>Re: Good or best way to allocate a large array</title>
	<published>2009-11-09T11:31:21Z</published>
	<updated>2009-11-09T11:31:21Z</updated>
	<author>
		<name>Marnen Laibow-Koser</name>
	</author>
	<content type="html">Ralph Shnelvar wrote:
&lt;br&gt;&amp;gt; Marnen,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I am a Ruby newbie but as far as I know, memory gets freed when the
&lt;br&gt;&amp;gt; garbage collector gets around to doing it.
&lt;br&gt;&lt;br&gt;Right. &amp;nbsp;And as far as I know, it will do that when the object goes out 
&lt;br&gt;of scope.
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Ralph
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; MLK&amp;gt; The answer to both questions: as far as I know, it will be 
&lt;br&gt;&amp;gt; deallocated
&lt;br&gt;&amp;gt; MLK&amp;gt; when it goes out of scope.
&lt;br&gt;Best,
&lt;br&gt;--
&lt;br&gt;Marnen Laibow-Koser
&lt;br&gt;&lt;a href=&quot;http://www.marnen.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.marnen.org&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26272294&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;marnen@...&lt;/a&gt;
&lt;br&gt;-- 
&lt;br&gt;Posted via &lt;a href=&quot;http://www.ruby-forum.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.ruby-forum.com/&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Good-or-best-way-to-allocate-a-large-array-tp26270277p26272294.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26272272</id>
	<title>Re: Ruby doesn't implement x++ for Fixnum's because ???</title>
	<published>2009-11-09T11:30:11Z</published>
	<updated>2009-11-09T11:30:11Z</updated>
	<author>
		<name>Aldric Giacomoni-2</name>
	</author>
	<content type="html">Rick Denatale wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; In French une langue denotes the same concept as tongue in English.
&lt;br&gt;&amp;gt; The primary meaning is that muscle in the middle of a mouth. It can
&lt;br&gt;&amp;gt; also mean a language
&lt;br&gt;&lt;br&gt;Okay, I knew that...
&lt;br&gt;&lt;br&gt;&amp;gt; The French un Langage is first what is used by humans to express their
&lt;br&gt;&amp;gt; thoughts and sentiments by means of &amp;quot;articulations of the voice&amp;quot;, by
&lt;br&gt;&amp;gt; extension it also can mean written language, the 'language' of animals
&lt;br&gt;&amp;gt; (bird song, dog's barking etc.) and finally a system of communication
&lt;br&gt;&amp;gt; by any means &amp;quot;The symbolic language of flowers.&amp;quot; &amp;quot;Pantomime is a
&lt;br&gt;&amp;gt; silent language.&amp;quot; &amp;nbsp;these last being translated examples from Le
&lt;br&gt;&amp;gt; Dictionnaire.
&lt;br&gt;&lt;br&gt;By Jove! Getting lessons in my mother idiom (*grin*) on a Ruby forum. I 
&lt;br&gt;knew I was following you on Twitter for a reason.
&lt;br&gt;-- 
&lt;br&gt;Posted via &lt;a href=&quot;http://www.ruby-forum.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.ruby-forum.com/&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Ruby-doesn%27t-implement-x%2B%2B-for-Fixnum%27s-because-----tp26123625p26272272.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26272229</id>
	<title>Re: FileString - request for comments</title>
	<published>2009-11-09T11:27:03Z</published>
	<updated>2009-11-09T11:27:03Z</updated>
	<author>
		<name>Marnen Laibow-Koser</name>
	</author>
	<content type="html">Eleanor McHugh wrote:
&lt;br&gt;[...]
&lt;br&gt;&amp;gt; Using a given representation just because it's unit testing friendly
&lt;br&gt;&amp;gt; isn't necessarily a good idea...
&lt;br&gt;&lt;br&gt;...or necessarily a bad idea. &amp;nbsp;There's something to be said for letting 
&lt;br&gt;architecture emerge from testability.
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Ellie
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Eleanor McHugh
&lt;br&gt;&amp;gt; Games With Brains
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://slides.games-with-brains.net&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://slides.games-with-brains.net&lt;/a&gt;&lt;br&gt;&amp;gt; ----
&lt;br&gt;&amp;gt; raise ArgumentError unless @reality.responds_to? :reason
&lt;br&gt;&lt;br&gt;Best,
&lt;br&gt;--
&lt;br&gt;Marnen Laibow-Koser
&lt;br&gt;&lt;a href=&quot;http://www.marnen.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.marnen.org&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26272229&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;marnen@...&lt;/a&gt;
&lt;br&gt;-- 
&lt;br&gt;Posted via &lt;a href=&quot;http://www.ruby-forum.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.ruby-forum.com/&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/FileString---request-for-comments-tp26260163p26272229.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26272214</id>
	<title>Re: Ruby doesn't implement x++ for Fixnum's because ???</title>
	<published>2009-11-09T11:25:44Z</published>
	<updated>2009-11-09T11:25:44Z</updated>
	<author>
		<name>Rick DeNatale</name>
	</author>
	<content type="html">On Mon, Nov 9, 2009 at 11:14 AM, Aldric Giacomoni &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26272214&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;aldric@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; I don't understand this block.
&lt;br&gt;&amp;gt; Aussi, si je puis me permettre - le Francais est une langue, et Ruby est
&lt;br&gt;&amp;gt; un langage (de programmation). Yet another one of those french
&lt;br&gt;&amp;gt; subtleties!
&lt;br&gt;&lt;br&gt;Actually I think the subtleties are similar between French and English here
&lt;br&gt;&lt;br&gt;In French une langue denotes the same concept as tongue in English.
&lt;br&gt;The primary meaning is that muscle in the middle of a mouth. It can
&lt;br&gt;also mean a language, in the same sense that tongue can in English
&lt;br&gt;phrases such as &amp;quot;His native tongue.&amp;quot; or &amp;quot;Speaking in tongues.&amp;quot;
&lt;br&gt;Although such usage is more frequent in French than in English. &amp;nbsp;This
&lt;br&gt;is a secondary meaning though, from &amp;quot;Le Dictionnaire de l'Académie
&lt;br&gt;Française&amp;quot;:
&lt;br&gt;&lt;br&gt;LANGUE désigne aussi l’Idiome d’une nation, d’une race
&lt;br&gt;&lt;br&gt;And the French word idiome (another slightly false cognate) means The
&lt;br&gt;language of a Nation, or province.
&lt;br&gt;&lt;br&gt;The French un Langage is first what is used by humans to express their
&lt;br&gt;thoughts and sentiments by means of &amp;quot;articulations of the voice&amp;quot;, by
&lt;br&gt;extension it also can mean written language, the 'language' of animals
&lt;br&gt;(bird song, dog's barking etc.) and finally a system of communication
&lt;br&gt;by any means &amp;quot;The symbolic language of flowers.&amp;quot; &amp;quot;Pantomime is a
&lt;br&gt;silent language.&amp;quot; &amp;nbsp;these last being translated examples from Le
&lt;br&gt;Dictionnaire.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Rick DeNatale
&lt;br&gt;&lt;br&gt;Blog: &lt;a href=&quot;http://talklikeaduck.denhaven2.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://talklikeaduck.denhaven2.com/&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/RickDeNatale&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/RickDeNatale&lt;/a&gt;&lt;br&gt;WWR: &lt;a href=&quot;http://www.workingwithrails.com/person/9021-rick-denatale&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.workingwithrails.com/person/9021-rick-denatale&lt;/a&gt;&lt;br&gt;LinkedIn: &lt;a href=&quot;http://www.linkedin.com/in/rickdenatale&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/in/rickdenatale&lt;/a&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Ruby-doesn%27t-implement-x%2B%2B-for-Fixnum%27s-because-----tp26123625p26272214.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26272174</id>
	<title>Re: Good or best way to allocate a large array</title>
	<published>2009-11-09T11:23:12Z</published>
	<updated>2009-11-09T11:23:12Z</updated>
	<author>
		<name>Ralph Shnelvar</name>
	</author>
	<content type="html">Marnen,
&lt;br&gt;&lt;br&gt;I am a Ruby newbie but as far as I know, memory gets freed when the
&lt;br&gt;garbage collector gets around to doing it.
&lt;br&gt;&lt;br&gt;Ralph
&lt;br&gt;&lt;br&gt;&lt;br&gt;MLK&amp;gt; The answer to both questions: as far as I know, it will be deallocated
&lt;br&gt;MLK&amp;gt; when it goes out of scope.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Good-or-best-way-to-allocate-a-large-array-tp26270277p26272174.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26272118</id>
	<title>Re: FileString - request for comments</title>
	<published>2009-11-09T11:19:07Z</published>
	<updated>2009-11-09T11:19:07Z</updated>
	<author>
		<name>Eleanor McHugh</name>
	</author>
	<content type="html">On 9 Nov 2009, at 16:49, Ralph Shnelvar wrote:
&lt;br&gt;&amp;gt; Robert,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; RK&amp;gt; I am still trying to wrap my head around the question whether &amp;nbsp;
&lt;br&gt;&amp;gt; hiding
&lt;br&gt;&amp;gt; RK&amp;gt; file IO behind a String API is a good idea.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; As the PickAxe book points out, by having file i/o represented by a
&lt;br&gt;&amp;gt; String ... that is, making it irrelevant whether one is talking to a
&lt;br&gt;&amp;gt; String or a File ... makes for some nice unit testing.
&lt;br&gt;&lt;br&gt;Using a given representation just because it's unit testing friendly &amp;nbsp;
&lt;br&gt;isn't necessarily a good idea...
&lt;br&gt;&lt;br&gt;&lt;br&gt;Ellie
&lt;br&gt;&lt;br&gt;Eleanor McHugh
&lt;br&gt;Games With Brains
&lt;br&gt;&lt;a href=&quot;http://slides.games-with-brains.net&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://slides.games-with-brains.net&lt;/a&gt;&lt;br&gt;----
&lt;br&gt;raise ArgumentError unless @reality.responds_to? :reason
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/FileString---request-for-comments-tp26260163p26272118.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26272068</id>
	<title>Re: Good or best way to allocate a large array</title>
	<published>2009-11-09T11:13:45Z</published>
	<updated>2009-11-09T11:13:45Z</updated>
	<author>
		<name>Marnen Laibow-Koser</name>
	</author>
	<content type="html">Ralph Shnelvar wrote:
&lt;br&gt;&amp;gt; Newbie here:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I will want/need to create an array of approximately 300K rows and 20
&lt;br&gt;&amp;gt; columns. The array will be an array of either 32-bit quantities or 
&lt;br&gt;&amp;gt; 64-bit quantities.
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;Dude, you want a database. &amp;nbsp;There's little reason in any language to 
&lt;br&gt;have an array that big.
&lt;br&gt;&lt;br&gt;&amp;gt; Does Ruby support native 64-bit quantities?
&lt;br&gt;&lt;br&gt;I'm not sure, but with transparent Bignum support, it doesn't matter 
&lt;br&gt;that much.
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; What's a good/best way to to create such an array. Is there a way to
&lt;br&gt;&amp;gt; tell Ruby, &amp;quot;OK, I'm done with this array.&amp;quot;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Can one create such an array such that the garbage collector can
&lt;br&gt;&amp;gt; free the memory in one fast operation?
&lt;br&gt;&lt;br&gt;The answer to both questions: as far as I know, it will be deallocated 
&lt;br&gt;when it goes out of scope.
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Ralph
&lt;br&gt;&lt;br&gt;Best,
&lt;br&gt;--
&lt;br&gt;Marnen Laibow-Koser
&lt;br&gt;&lt;a href=&quot;http://www.marnen.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.marnen.org&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26272068&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;marnen@...&lt;/a&gt;
&lt;br&gt;-- 
&lt;br&gt;Posted via &lt;a href=&quot;http://www.ruby-forum.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.ruby-forum.com/&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Good-or-best-way-to-allocate-a-large-array-tp26270277p26272068.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26272042</id>
	<title>errors when using sqlite3's query and prepare methods</title>
	<published>2009-11-09T11:09:36Z</published>
	<updated>2009-11-09T11:09:36Z</updated>
	<author>
		<name>Robert Citek-2</name>
	</author>
	<content type="html">Hello all,
&lt;br&gt;&lt;br&gt;I'm trying to prepare a sql statement to send to sqlite3 via ruby and
&lt;br&gt;am getting errors when using the query and prepare methods. &amp;nbsp;Here's my
&lt;br&gt;code:
&lt;br&gt;&lt;br&gt;#!/usr/bin/env ruby
&lt;br&gt;require 'sqlite3'
&lt;br&gt;db = SQLite3::Database.new( &amp;quot;test.db&amp;quot; )
&lt;br&gt;&lt;br&gt;# create the database
&lt;br&gt;sql = &amp;lt;&amp;lt;-eof
&lt;br&gt;&amp;nbsp; CREATE TABLE foobar (foo text, bar int);
&lt;br&gt;&amp;nbsp; INSERT INTO &amp;quot;foobar&amp;quot; VALUES('hello',1);
&lt;br&gt;&amp;nbsp; INSERT INTO &amp;quot;foobar&amp;quot; VALUES('world',2)
&lt;br&gt;&amp;nbsp; eof
&lt;br&gt;db.execute_batch(sql)
&lt;br&gt;&lt;br&gt;# querying the database via execute works
&lt;br&gt;db.execute( &amp;quot;select * from foobar&amp;quot; ) do |row|
&lt;br&gt;&amp;nbsp; puts row.join(&amp;quot;\t&amp;quot;) ;
&lt;br&gt;end
&lt;br&gt;&lt;br&gt;# querying the database via query method does not work
&lt;br&gt;db.query( &amp;quot;select * from foobar&amp;quot; ) do |row|
&lt;br&gt;&amp;nbsp; puts row.join(&amp;quot;\t&amp;quot;) ;
&lt;br&gt;end
&lt;br&gt;&lt;br&gt;# querying the database via a prepare does not work
&lt;br&gt;db.prepare( &amp;quot;select * from foobar&amp;quot; ) do |stmnt|
&lt;br&gt;&amp;nbsp; stmnt.execute do |row|
&lt;br&gt;&amp;nbsp; &amp;nbsp; puts row.join(&amp;quot;\t&amp;quot;) ;
&lt;br&gt;&amp;nbsp; end
&lt;br&gt;end
&lt;br&gt;&lt;br&gt;Below is the output from running the execute, query, and prepare methods in irb:
&lt;br&gt;&lt;br&gt;irb(main):036:0&amp;gt; # querying the database via execute works
&lt;br&gt;irb(main):037:0* db.execute( &amp;quot;select * from foobar&amp;quot; ) do |row|
&lt;br&gt;irb(main):038:1* &amp;nbsp; puts row.join(&amp;quot;\t&amp;quot;) ;
&lt;br&gt;irb(main):039:1* end
&lt;br&gt;hello	1
&lt;br&gt;world	2
&lt;br&gt;=&amp;gt; nil
&lt;br&gt;irb(main):040:0&amp;gt;
&lt;br&gt;irb(main):041:0* # querying the database via query method does not work
&lt;br&gt;irb(main):042:0* db.query( &amp;quot;select * from foobar&amp;quot; ) do |row|
&lt;br&gt;irb(main):043:1* &amp;nbsp; puts row.join(&amp;quot;\t&amp;quot;) ;
&lt;br&gt;irb(main):044:1* end
&lt;br&gt;NoMethodError: undefined method `join' for #&amp;lt;SQLite3::ResultSet:0xb7c6bae4&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; from (irb):43
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; from /usr/lib/ruby/1.8/sqlite3/database.rb:278:in `query'
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; from (irb):42
&lt;br&gt;irb(main):045:0&amp;gt;
&lt;br&gt;irb(main):046:0* # querying the database via a prepare does not work
&lt;br&gt;irb(main):047:0* db.prepare( &amp;quot;select * from foobar&amp;quot; ) do |stmnt|
&lt;br&gt;irb(main):048:1* &amp;nbsp; stmnt.execute do |row|
&lt;br&gt;irb(main):049:2* &amp;nbsp; &amp;nbsp; puts row.join(&amp;quot;\t&amp;quot;) ;
&lt;br&gt;irb(main):050:2* &amp;nbsp; end
&lt;br&gt;irb(main):051:1&amp;gt; end
&lt;br&gt;NoMethodError: undefined method `join' for #&amp;lt;SQLite3::ResultSet:0xb7c3c190&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; from (irb):49
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; from /usr/lib/ruby/1.8/sqlite3/statement.rb:166:in `execute'
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; from (irb):48
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; from /usr/lib/ruby/1.8/sqlite3/database.rb:187:in `prepare'
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; from (irb):47
&lt;br&gt;&lt;br&gt;$ ruby -v
&lt;br&gt;ruby 1.8.6 (2007-09-24 patchlevel 111) [i486-linux]
&lt;br&gt;&lt;br&gt;$ irb -v
&lt;br&gt;irb 0.9.5(05/04/13)
&lt;br&gt;&lt;br&gt;I've been looking at the docs[1] and the FAQ[2]. &amp;nbsp;Clearly I'm
&lt;br&gt;overlooking something, but what?
&lt;br&gt;&lt;br&gt;Thanks in advance to any pointers.
&lt;br&gt;&lt;br&gt;[1] &lt;a href=&quot;http://sqlite-ruby.rubyforge.org/sqlite3/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite-ruby.rubyforge.org/sqlite3/&lt;/a&gt;&lt;br&gt;[2] &lt;a href=&quot;http://sqlite-ruby.rubyforge.org/sqlite3/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite-ruby.rubyforge.org/sqlite3/faq.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;- Robert
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/errors-when-using-sqlite3%27s-query-and-prepare-methods-tp26272042p26272042.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26271710</id>
	<title>Re: Ruby doesn't implement x++ for Fixnum's because ???</title>
	<published>2009-11-09T10:52:48Z</published>
	<updated>2009-11-09T10:52:48Z</updated>
	<author>
		<name>James Edward Gray II</name>
	</author>
	<content type="html">On Nov 9, 2009, at 12:28 PM, Tony Arcieri wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Mon, Nov 9, 2009 at 11:15 AM, TonyMc &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271710&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;afmcc@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Tony Arcieri &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271710&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tony@...&lt;/a&gt;&amp;gt; writes:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I still find this most appropriate:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; OK, that gets you killfiled. &amp;nbsp;Getting ruby wrong is not so bad, you &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; just
&lt;br&gt;&amp;gt;&amp;gt; need to learn from the other posts in this thread. &amp;nbsp;Getting real life
&lt;br&gt;&amp;gt;&amp;gt; wrong is another, and much more serious.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Psst, it's a joke, and a self-deprecating one at that.
&lt;/div&gt;&lt;br&gt;I too found it really offensive.
&lt;br&gt;&lt;br&gt;James Edward Gray II
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Ruby-doesn%27t-implement-x%2B%2B-for-Fixnum%27s-because-----tp26123625p26271710.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26271490</id>
	<title>Re: Is it possible to do multiple regex in one operation?</title>
	<published>2009-11-09T10:39:45Z</published>
	<updated>2009-11-09T10:39:45Z</updated>
	<author>
		<name>Ahmad Azizan</name>
	</author>
	<content type="html">Yes, both ways did working for me, thanks for the inputs. At first I 
&lt;br&gt;can't imaging regex does have 'and' or 'or' condition in it. But now I 
&lt;br&gt;believe
&lt;br&gt;&lt;br&gt;Really appreciate that
&lt;br&gt;-- 
&lt;br&gt;Posted via &lt;a href=&quot;http://www.ruby-forum.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.ruby-forum.com/&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Is-it-possible-to-do-multiple-regex-in-one-operation--tp26089609p26271490.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26271423</id>
	<title>Re: Regexp: getting the first found</title>
	<published>2009-11-09T10:35:21Z</published>
	<updated>2009-11-09T10:35:21Z</updated>
	<author>
		<name>Ahmad Azizan</name>
	</author>
	<content type="html">Ralph Shnelvar wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Ahmad,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Newbie here so take what I have to say with a grain of salt.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Your pattern is &amp;quot;greedy&amp;quot;. &amp;nbsp;To turn it into a lazy pattern add a
&lt;br&gt;&amp;gt; question mark thusly ...
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; /&amp;lt;&amp;lt;(.*)\/Filter(.*?)&amp;gt;&amp;gt;/
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; (untested)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Ralph
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;Thanks for the reply.
&lt;br&gt;&lt;br&gt;Basically that's what I need. Thanks for pointing me towards new options 
&lt;br&gt;like &amp;quot;greedy&amp;quot;. Because of that, I've been able to find new Ruby regex 
&lt;br&gt;reference like 
&lt;br&gt;&lt;a href=&quot;http://www.tutorialspoint.com/ruby/ruby_regular_expressions.htm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.tutorialspoint.com/ruby/ruby_regular_expressions.htm&lt;/a&gt;&lt;br&gt;&lt;br&gt;Really appreciate that, thanks
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Posted via &lt;a href=&quot;http://www.ruby-forum.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.ruby-forum.com/&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Regexp%3A-getting-the-first-found-tp26263564p26271423.html" />
</entry>

</feed>
