[#83322] Saving and restoring with YAML — Ben Giddings <bg-rubytalk@...>
Hi all,
Ben Giddings wrote:
Ok, silly question.
[#83328] tcltklib and not init'ing tk — aakhter@... (Aamer Akhter)
Hello,
[#83329] Ruby 1.8.0 rpm? — Hal Fulton <hal9000@...>
I want to install on a box where I don't have root access.
[#83337] Include CONFIG::Config['rubydocdir'] in rbconfig.rb — Gavin Sinclair <gsinclair@...>
Hi folks,
Hi,
[#83391] mixing in class methods — "Mark J. Reed" <markjreed@...>
Okay, probably a dumb question, but: is there any way to define
On Thu, 2 Oct 2003 06:02:32 +0900
On Thursday, October 2, 2003, 7:08:00 AM, Ryan wrote:
On Thu, Oct 02, 2003 at 07:37:25AM +0900, Gavin Sinclair wrote:
Mark J. Reed [mailto:markjreed@mail.com] wrote:
> On Thu, Oct 02, 2003 at 07:37:25AM +0900, Gavin Sinclair wrote:
On Thu, 2 Oct 2003, Gavin Sinclair wrote:
>> It sometimes makes me wonder why Ruby differentiates between instance
Hi --
The assymetry between class/instance variables and class/instance
>>>>> "M" == Mark J Reed <markjreed@mail.com> writes:
[#83408] Getting a list of the files in a directory — revision17@... (Revision17)
Hi, I'm just starting out with ruby and I'm writing a script to rename
[#83411] Absolute class name? — "Mark J. Reed" <markjreed@...>
If I do
Hi,
MJR = me
>>>>> "M" == Mark J Reed <markjreed@mail.com> writes:
On Thu, Oct 02, 2003 at 11:11:59PM +0900, ts wrote:
On Thu, Oct 02, 2003 at 02:20:07PM +0000, Mark J. Reed wrote:
[#83413] I AWAIT YOUR URGENT RESPONSE — PETERS UJANI <peterujani@...>
Dear Sir,
[#83416] C or C++? — "Joe Cheng" <code@...>
I'd like to start writing Ruby extensions. Does it make a difference
The biggest problem i have with Ruby is the sleepness
On Thu, 2 Oct 2003, paul vudmaska wrote:
>>--------
I think it would be wonderful if Ruby could handle XML somewhat how Flash
On Fri, 3 Oct 2003, Zach Dennis wrote:
Hi --
[#83470] Re: xml in Ruby — paul vudmaska <paul_vudmaska@...>
>>>
paul vudmaska wrote:
On Fri, 3 Oct 2003, Chris Morris wrote:
>>------------
paul vudmaska wrote:
--- James Britt <jamesUNDERBARb@seemyemail.com> wrote:
[#83481] newbie question: function overloading — Dimitrios Galanakis <galanaki@...>
I need to define a method that performs differently when operated on objects
On Fri, 3 Oct 2003, Dimitrios Galanakis wrote:
[#83520] Account Verification — "eBay SafeHarbor" <noreply@...>
[#83533] FreeRide — Carl Youngblood <carl@...>
Is it just my faulty perception or does the momentum behind FreeRIDE
I presented FreeRIDE as OSCON in July, but have not done much on it
[#83551] xml + ruby — paul vudmaska <paul_vudmaska@...>
>>---------
On Fri, 3 Oct 2003 16:11:46 +0900, paul vudmaska wrote:
Zach Dennis wrote:
James,
On Friday 03 October 2003 02:20 pm, paul vudmaska wrote:
[#83554] hash of hashes — Paul Argentoff <argentoff@...>
Hi all.
On Friday 03 October 2003 14:04, Paul Argentoff wrote:
Paul Argentoff wrote:
[#83608] webrick, threads, and i/o — "Ara.T.Howard" <ahoward@...>
[#83627] Ruby/Extensions 0.2.0 — Gavin Sinclair <gsinclair@...>
Hi -talk,
[#83671] Stop Immigration — "Vanguard News Network " <vanguardnn@...>
Stop Immigration
[#83675] fox-tool - interactive gui builder for fxruby — henon <user@...>
hi fellows,
il Sun, 05 Oct 2003 16:17:16 GMT, henon <user@example.net> ha
gabriele renzi wrote:
Hi.
[#83727] map/collect iterating over multiple arrays/arguments — zoranlazarevic@... (Zoran Lazarevic)
Can I iterate over multiple arrays/collections?
[#83730] Re: Enumerable#inject is surprising me... — "Weirich, James" <James.Weirich@...>
> Does it surprise you?
Hi,
Hi,
Hi --
On Thu, 9 Oct 2003 dblack@superlink.net wrote:
>>>>> "d" == dblack <dblack@superlink.net> writes:
[#83741] Thread + fork warning — Ariff Abdullah <skywizard@...>
# ruby -e 'a = Thread.new { fork {} }; a.join'
[#83756] GC and the stack — "Thomas Sondergaard" <thomas@...>
Hello,
[#83758] usage of Regexp::EXTENDED — "Simon Strandgaard" <none@...>
How does it work ?
On Wed, 08 Oct 2003 21:58:42 +0900, Jim Weirich wrote:
[#83771] Re: GC and the stack — "Weirich, James" <James.Weirich@...>
> Okay. What if, in an extension, I have an integer on the
[#83783] shorthand notation for multiline in regexps? — Carl Youngblood <carl@...>
Is there a way to declare a multiline or ignorecase regexp without using
[#83795] Standard Queue Implementation and Thread Safety — Pete Kazmier <pete-temp-ruby-usenet-10082003@...>
First the disclaimer: I'm a newbie to ruby :-)
[#83801] Extension Language for a Text Editor — Nikolai Weibull <ruby-talk@...>
OK. So I'm going to write a text editor for my masters' thesis. The
You may want to look at the VIM's use of Ruby for writing extensions.
On Thu, 9 Oct 2003 05:06:32 +0900
* Ryan Pavlik <rpav@mephle.com> [Oct, 08 2003 22:30]:
On Thu, 9 Oct 2003 06:09:29 +0900
* Ryan Pavlik <rpav@mephle.com> [Oct, 09 2003 09:10]:
On Fri, 10 Oct 2003 02:36:25 +0900
* Ryan Pavlik <rpav@mephle.com> [Oct, 10 2003 16:49]:
On Oct 11, Nikolai Weibull wrote:
* Brett H. Williams <brett_williams@agilent.com> [Oct, 10 2003 20:50]:
On Wed, 08 Oct 2003 22:39:13 +0000, gabriele renzi wrote:
[#83802] Ruby Patriotism: Python+XML v. Ruby+YAML — why the lucky stiff <ruby-talk@...>
We've got a good old-fashioned derby going on in blogoland. Perhaps
Has anyone benchmarked Python+YAML? You should account for all the variables.
[#83822] TUI library — "Imobach =?iso-8859-15?q?Gonz=E1lez=20Sosa?=" <imobachgs@...>
-----BEGIN PGP SIGNED MESSAGE-----
[#83843] case where regex range should raise — "Simon Strandgaard" <none@...>
irb(main):001:0> re = /bx{,2}c/
[#83850] Antwort: Re: SEPARATOR doesn't work — Robert.Koepferl@...
[#83985] Perl 6 style regular expressions — mark <msparshatt@...>
I was wondering if anyone has done any work on implementing Perl 6 style
[#83987] Project suggestion: Ruby code indenter — Gavin Sinclair <gsinclair@...>
From the thread "Extension Language for a Text Editor":
* Gavin Sinclair <gsinclair@soyabean.com.au> [Oct, 10 2003 18:20]:
[#84041] mysql_num_rows equivalent for DBI? — Ben Giddings <bg-rubytalk@...>
Is there a database-independent way of finding out how many rows were
paul vudmaska wrote:
On Sun, Oct 12, 2003 at 05:17:19AM +0900, Ben Giddings wrote:
[#84049] splitting a line by columns — "Mike Campbell" <michael_s_campbell@...>
I have a line of text output in columnar form; what's the best way to split it
[#84056] Newbie Class variable question — Elias Athanasopoulos <elathan@...>
Hello!
[#84060] RDoc and i18n — KUBO Takehiro <kubo@...>
Hi,
KUBO Takehiro <kubo@jiubao.org> writes:
On Sun, 19 Oct 2003 23:27:41 +0900, Dave Thomas wrote:
[#84070] XPath and HTML — David Corbin <dcorbin@...>
Is there a library out there that let's me parse HTML and use XPath
On Mon, 13 Oct 2003, David Corbin wrote:
On Sunday 12 October 2003 17:36, Chad Fowler wrote:
On Mon, 13 Oct 2003, David Corbin wrote:
[#84092] Resurrecting German mailing list? — "Josef 'Jupp' SCHUGT" <jupp@...>
Hi!
[#84145] Parentheses — Nikolai Weibull <ruby-talk@...>
Hi,
[#84159] Rubygarden oddness — "Berger, Daniel" <djberge@...>
All,
[#84165] Re: Parentheses — Michael Campbell <michael_s_campbell@...>
Yukihiro Matsumoto wrote:
[#84169] General Ruby Programming questions — Simon Kitching <simon@...>
Simon Kitching wrote:
Hi Florian..
Simon Kitching (simon@ecnetwork.co.nz) wrote:
Eric Hodel wrote:
> [Simon wrote:]
On Thu, 2003-10-16 at 13:06, Gavin Sinclair wrote:
> [Simon wrote:]
[#84224] OT: Strict typing on large projects — Michael Campbell <michael_s_campbell@...>
I don't necessarily mean to stir a pot here, but was reading an
On Sat, Oct 18, 2003 at 05:41:03AM +0900, Michael Campbell quipped:
[#84235] POLS ANT file pattern in Ruby — "Robert Dawson" <robert@...>
Hi,
[#84236] rubylucene - new & improved — Erik Hatcher <erik@...>
I had the pleasure of working with Rich Kilmer for a bit last weekend
[#84248] Outdated page(s) on ruby-lang.org? — Hal Fulton <hal9000@...>
A guy I (barely) know just tried to download Ruby
Hi!
Josef 'Jupp' SCHUGT wrote:
[#84251] ANN: rjava — Hans Jörg Hessmann <hessmann@...>
RJava enables you to use Java classes from ruby using ruby-like syntax. For
[#84253] Email Harvesting — Nikolai Weibull <ruby-talk@...>
I've been receiving a lot of Swen emails to my ruby-talk address lately.
Hi,
[#84283] Any shift/reduce experts out there? — Jim Freeze <jim@...>
Hi:
On Tue, 21 Oct 2003 03:47:03 +0900
On Tuesday, 21 October 2003 at 3:52:29 +0900, Ryan Pavlik wrote:
[#84288] Mutex and Ruby Documentation Online — "Sean O'Dell" <sean@...>
I'm running into that mutex problem, where I need the same process to be able
[#84299] Re: Outdated page(s) on ruby-lang.org? — "Pe, Botp" <botp@...>
sir matz@ruby-lang.org [mailto:matz@ruby-lang.org] humbly replied:
[#84305] Time: safe way to go to next day? — Emmanuel Touzery <emmanuel.touzery@...>
Hello,
[#84311] Formal Language Semantics — "Christopher C.Aycock" <christopher.aycock@...>
Does anyone know where I can get the formal language semantics for Ruby
[#84331] Re: Email Harvesting — Greg Vaughn <gvaughn@...>
Ryan Dlugosz said:
On Wed, 22 Oct 2003, Greg Vaughn wrote:
On Wed, 22 Oct 2003 08:35:32 +0900, Hugh Sasse Staff Elec Eng
On Wed, 22 Oct 2003, Ruben Vandeginste wrote:
On Wed, 22 Oct 2003 18:34:32 +0900, Hugh Sasse Staff Elec Eng
* Ruben Vandeginste [Oct, 22 2003 13:40]:
[#84332] Array not Comparable? — "Warren Brown" <wkb@...>
In the past I have sorted arrays of arrays and so I knew that Array
Warren Brown wrote:
>>>>> "E" == Emmanuel Touzery <emmanuel.touzery@wanadoo.fr> writes:
On Wednesday, October 22, 2003, 11:49:17 PM, ts wrote:
[#84341] Ruby-oriented Linux distro? — Hal Fulton <hal9000@...>
There's been some talk of something like this in the past.
On Wednesday, October 22, 2003, 6:01:16 PM, Hal wrote:
On Wednesday 22 Oct 2003 11:02 am, Gavin Sinclair wrote:
On Wed, Oct 22, 2003 at 08:03:19PM +0900, Andrew Walrond wrote:
On Wednesday 22 Oct 2003 2:48 pm, Michael Garriss wrote:
On Wed, Oct 22, 2003 at 10:55:15PM +0900, Andrew Walrond wrote:
Michael Garriss wrote:
[#84350] ML <-> NG gateway is not working — Gavin Sinclair <gsinclair@...>
Folks,
[#84400] RubyGarden Wiki error — "Dmitry V. Sabanin" <sdmitry@...>
I got this today while trying to edit my wiki-page at
[#84420] Struggling with variable arguments to block — "Gavin Sinclair" <gsinclair@...>
Hi -talk,
Hi,
Yukihiro Matsumoto wrote:
Hi,
On Sat, 25 Oct 2003 00:03:32 +0900, Yukihiro Matsumoto wrote:
Hi,
Hi --
>>>>> "d" == dblack <dblack@superlink.net> writes:
[#84462] Suggestion for an XML and ZLIB library? — Daniel Carrera <dcarrera@...>
Greetings all,
[#84467] Rubyx logo idea — Andrew Walrond <andrew@...>
I've been thinking about a logo for Rubyx, my ruby based linux distro.
[#84480] How to include zip in a program. — Daniel Carrera <dcarrera@...>
Hello all,
[#84485] Win32OLE issue in 1.8.0 — Steve Tuckner <STUCKNER@...>
[#84501] File class doesn't work! — Daniel Carrera <dcarrera@...>
Something is severely broken with my installation:
[#84514] Formatting (ANSI) highlighted strings — Gavin Sinclair <gsinclair@...>
Hi folks,
[#84529] Win32OLE again — Steve Tuckner <STUCKNER@...>
>>>>> "S" == Steve Tuckner <STUCKNER@MULTITECH.COM> writes:
[#84530] Crash in ruby 1.8.0 — "Brett H. Williams" <brett_williams@...>
This doesn't look right...
[#84531] OOoExtract v0.1 — Daniel Carrera <dcarrera@...>
Greetings,
[#84534] Fatal recycling of SystemStackErrors — Florian Gross <flgr@...>
Moin!
[#84543] Ruby and XUL? — Daniel Carrera <dcarrera@...>
Hi all,
[#84554] getoption long question — Daniel Bretoi <lists@...>
opts = GetoptLong.new(_
[#84555] system() isn't safe on win32 — Florian Gross <flgr@...>
Moin!
[#84574] Problem with seeking in existing files. — <agemoagemo@...>
I'm trying to write a program that will be writing
Hi,
[#84577] ruby 1.8.1 preview1 — matz@... (Yukihiro Matsumoto)
It's out.
On Thu, 2003-10-30 at 04:41, Yukihiro Matsumoto wrote:
[#84585] Re: [ANN] win32-file 0.1.0 — "Berger, Daniel" <djberge@...>
> -----Original Message-----
[#84603] 1.8.1 failure — Daniel Berger <djberge@...>
Solaris 9
[#84604] ruby-dev summary 21637-21729 — Takaaki Tateishi <ttate@...>
Hello,
On Fri, Oct 31, 2003 at 07:01:28AM +0900, Takaaki Tateishi wrote:
Hi,
On Thu, Nov 06, 2003 at 11:17:59PM +0900, Yukihiro Matsumoto wrote:
Hi,
On Fri, Nov 07, 2003 at 12:36:23AM +0900, Yukihiro Matsumoto wrote:
[#84611] 64-bit Ruby on Solaris? — Daniel Berger <djberge@...>
Hi all,
[#84626] Since today is October 31... — Hal Fulton <hal9000@...>
srand 0
Re: Python syntax in Lisp and Scheme
Grzegorz Chrupala wrote:
...
>> >>> def foo(n):
>> ... box = [n]
>> ... def foo(i): box[0]+=i; return box[0]
>> ... return foo
>> ...
>
> It's still a hack that shows an area where Python has unnecessary
> limitations, isn't it?
Debatable, and debated. See the "Rebinding names in enclosing
scopes" section of http://www.python.org/peps/pep-0227.html .
Essentially, Guido prefers classes (and instances thereof) to
closures as a way to bundle state and behavior; thus he most
emphatically does not want to add _any_ complication at all,
when the only benefit would be to have "more than one obvious
way to do it".
Guido's generally adamant stance for simplicity has been the
key determinant in the evolution of Python. Guido is also on
record as promising that the major focus in the next release
of Python where he can introduce backwards incompatibilities
(i.e. the next major-number-incrementing release, 3.0, perhaps,
say, 3 years from now) will be the _elimination_ of many of
the "more than one way to do it"s that have accumulated along
the years mostly for reasons of keeping backwards compatibility
(e.g., lambda, map, reduce, and filter, which Guido mildly
regrets ever having accepted into the language).
> As Paul Graham says (<URL:http://www.paulgraham.com/icad.html>):
>
>> Python users might legitimately ask why they can't just write
>>
>> def foo(n):
>> return lambda i: return n += i
The rule Python currently use to determine whether a variable
is local is maximally simple: if the name gets bound (assigned
to) in local scope, it's a local variable. Making this rule
*any* more complicated (e.g. to allow assignments to names in
enclosing scopes) would just allow "more than one way to do
it" (making closures a viable alternative to classes in more
cases) and therefore it just won't happen. Python is about
offering one, and preferably only one, obvious way to do it,
for any value of "it". And another key principle of the Zen
of Python is "simple is better than complex".
Anybody who doesn't value simplicity and uniformity is quite
unlikely to be comfortable with Python -- and this should
amply answer the question about the motivations for reason
number 1 why the above foo is unacceptable in Python (the
lambda's body can't rebind name n in an enclosing scope).
Python draws a firm distinction between expressions and
statements. Again, the deep motivation behind this key
distinction can be found in several points in the Zen of
Python, such as "flat is better than nested" (doing away
with the expression/statement separation allows and indeed
encourages deep nesting) and "sparse is better than dense"
(that 'doing away' would encourage expression/statements
with a very high density of operations being performed).
This firm distinction should easily explain other reasons
why the above foo is unacceptable in Python: n+=i is a
statement (not an expression) and therefore it cannot be
held by a 'return' keyword; 'return' is a statement and
therefore cannot be in the body of a 'lambda' keyword.
>> or even
>>
>> def foo(n):
>> lambda i: n += i
And this touches on yet another point of the Zen of Python:
explicit is better than implicit. Having a function
implicitly return the last expression it computes would
violate this point (and is in fact somewhat error-prone,
in my experience, in the several languages that adopt
this rule).
Somebody who is unhappy with this drive for explicitness,
simplicity, uniformity, and so on, cannot be happy with
Python. If he wants a very similar language from most
points of view, BUT with very different philosophies, he
might well be quite happy with Ruby. Ruby does away with
any expression/statement distinction; it makes the 'return'
optional, as a method returns the last thing it computes;
it revels in "more than one way to do it", clever and cool
hacks, not perhaps to the extent of Perl, but close enough.
In Ruby, the spaces of methods and data are separate (i.e.,
most everything is "an object" -- but, differently from
Python, methods are not objects in Ruby), and I do not
think, therefore, that you can write a method that builds
and returns another method, and bind the latter to a name --
but you can return an object with a .call method, a la:
def outer(a) proc do |b| a+=b end end
x = outer(23)
puts x.call(100) # emits 123
puts x.call(100) # emits 223
[i.e., I can't think of any way you could just use x(100)
at the end of such a snippet in Ruby -- perhaps somebody
more expert of Ruby than I am can confirm or correct...?]
but apart from this it seems closer to what the above
quotes appear to be probing for. In particular, it lets
you be MUCH, MUCH denser, if that is your purpose in life,
easily squeezing that outer function into a (short) line.
Python is NOT about making code very dense, indeed, as
above mentioned, it sees _sparseness_ as a plus; a typical
Pythonista would cringe at the density of that 'outer'
and by contrast REVEL at the "sparsity" and "explicitness"
(due to the many names involved:-) of, e.g.:
def make_accumulator(initial_value):
accumulator = Bunch(value=initial_value)
def accumulate(addend):
accumulator.value += addend
return accumulator.value
return accumulate
accumulate = make_accumulator(23)
print accumulate(100) # emits 123
print accumulate(100) # emits 223
(using the popular Bunch class commonly defined as:
class Bunch(object):
def __init__(self, **kwds):
self.__dict__.update(kwds)
). There is, of course, a cultural gulf between this
verbose 6-liner [using an auxiliary class strictly for
reasons of better readability...!] and the terse Ruby
1-liner above, and no doubt most practitioners of both
languages would in practice choose intermediate levels,
such as un-densifying the Ruby function into:
def outer(a)
proc do |b|
a+b
end
end
or shortening/densifying the Python one into:
def make_accumulator(a):
value = [a]
def accumulate(b):
value[0] += b
return value[0]
return accumulate
but I think the "purer" (more extreme) versions are
interesting "tipizations" for the languages, anyway.
Alex