1419-1650 subjects 1836-2120

^ A min/max bug?
1651 [chr_news gmx] the block version of Enumerable#max (or min) always
+ 1652 [matz ruby-la] That's weird.  Mine gives
| 1654 [ser germane-] Or, put another way, grouping.  Ruby is parsing this as
| 1655 [matz ruby-la] I don't think so.  Since "nil" ("p" return value) does not have "min"
| 1656 [ser germane-] Right.  That's why you (and I) are getting exceptions; I don't know why he was
| 1657 [chr_news gmx] I am getting nil because I was compiling with the /Og + /Ot
+ 1653 [chr_news gmx] Okay sorry this seems to be an artifact of an overly

^ Re: 1.8.1 preview2 (was: Re: 1.8.1 failure)
1658 [sunshine sun] Is there any possibility of having the NextStep / OpenStep / Rhapsody
+ 1659 [matz ruby-la] It's quite possible.  I'm going to take time to confirm your patch
+ 1660 [ryand zenspi] I meant to reply eventually to your original post... I never got my

^ ruby gc_sweep(): unknown data type
1661 [rich infoeth] I have a problem that is a bit hard to express.
1662 [nobu.nokada ] Can't you try with more recent version Ruby?  It may be an
1663 [rich infoeth] I will try a more recent version...just built 1.8.1 and will deploy and

^ Class variable and singleton problem
1664 [mark.wassell] class A
1665 [matz ruby-la] Class variables belongs to surrounding class (or module), so that @@x
1666 [george.marro] Any chance you could explain the rationale for this in a bit more detail? I
+ 1667 [matz ruby-la] Class variables look up follows the inheritance hierarchy starting
+ 1668 [decoux moulo] If I've well understood
  1669 [decoux moulo] gsub!(/@@meth/, '@@x') # sorry,
  1670 [george.marro] Matz --
  + 1671 [matz ruby-la] Consider @@var as global variable with limited scope in the
  + 1672 [chr_news gmx] You can find an example on why this probably a good idea  in
    1673 [george.marro] Thanks Christoph, the tests (test_variable.rb) help a lot. I guess the main

^ open-uri patch, added progress_proc hook
1674 [transami run] i have made a small modification to open-uri to allow it to execute a proc in the data fetching loops. this has proved very useful to me in providing a progress reported download. (i used Ruby/ProgressBar). Note that in the future it might be nice to get open-uri to work more like a real IO.
1675 [akr m17n.org] I don't like the API.
1676 [transami run] i had it this way at first! :) but then i realized that it is dependent on special symbol :progress_proc -or- it must determine based on value class Proc but then what do you do with more than one Proc is in hash? plus the keys are meaningless then too. so i think it is better as an independent argument. it is an optional argument. so there is no backward compatability problems.
1677 [akr m17n.org] * process content fragments instead of byte count.
1679 [transami run] open( url, { pos: proc { |b| ...} } )  # would pass #pos
1680 [akr m17n.org] No.  I already implemented.  (not committed yet.)
1681 [transami run] could you show example? hmm...wouldn't the expected length be in the proc already if it were needed? that's what i did with my progressbar.
1682 [akr m17n.org] % ruby -rlib/open-uri -e 'open("http://www.ruby-lang.org/en/",:progress_proc => lambda {|pos, total| p [pos, total]})'
1683 [transami run] nice! that works for me. i was not thinking that the the total was provided (duh!)
1684 [akr m17n.org] I don't like that.
1685 [transami run] hmm...there may be noting to do about it. just have to live with it.
+ 1686 [ehughes blue] This doesn't seem like a good API. There are just too many
| 1688 [akr m17n.org] Do you mean that we need some layer between open-uri and net/http?
| 1689 [transami run] given everything you've pointed out some shortcoimings ay be unavoidable if it is to be very simple.
| 1690 [ehughes blue] In effect. I mean that if a method's interface is getting too complicated,
| + 1691 [ehughes blue] No, I definitely wouldn't trade an overly-complex method signature for an
| | 1692 [transami run] class OpenURI::ProgessProc
| | + 1694 [ehughes blue] Closer, but not quite (*). I wasn't think of having a context object to
| | + 1697 [chr_news gmx] Maybe this is kind of silly but a class name ``OpenURI::ProgessProc''
| + 1695 [akr m17n.org] open("http://...", OpenURI::OptProgressProc => lambda {|s| ... })
|   1696 [batsman.geo ] What about
|   1698 [akr m17n.org] What's an advantage over mine?
|   1700 [batsman.geo ] IMHO
|   1704 [akr m17n.org] Since open-uri is a delegator to open any kind of URIs and other
|   1705 [ehughes blue] [the trouble with YAGNI is that -- if you're writing a library -- YAreGNI,
|   + 1708 [transami run] This looks very good. Do you think commit will come soon?
|   | 1710 [akr m17n.org] I don't decided the interface yet.
|   | 1711 [transami run] okay.
|   | + 1712 [akr m17n.org] I forgot to mention high level interface tends to have high overheads.
|   | | 1716 [transami run] i had idea: maybe have sepereate method to ask just for header info, and this method could also get total size and time it took fetch header.  you said ftp needed a seperate fetch to get total anyway right? add one for http too. that way people can test connections which is good, and get useful information. and perhaps sometimes all they want is header. so you could kill two birds with one stone. actually three bird! :) does that make sense?
|   | | + 1717 [transami run] _why! you are a a genius! i read your page, plain brilliance. i think once
|   | | | 1718 [ehughes blue] isn't this just odd for oddness' sake?
|   | | | 1722 [akr m17n.org] I think more essential problem with URI's singleton method is redirection.
|   | | | 1724 [transami run] opts = OpenUriOptions.new
|   | | | 1726 [akr m17n.org] opts = OpenUriOptions.new
|   | | | 1731 [transami run] It's actually kind of mind boggling just how nearly identical these two code
|   | | | 1732 [akr m17n.org] As Elliott pointed out, it has a problem with typo detection.
|   | | | 1733 [transami run] I don't see how this is a big deal. When I first read this on Elliots post I
|   | | | 1750 [akr m17n.org] I see.  You don't care typos.  But I care typos.
|   | | | + 1752 [transami run] I would not say I don't care. I just mean that for me it is not a "shop
|   | | | + 1759 [ser germane-] I hope I'm soon enough to dissuade you from this course of action.  I used
|   | | |   1762 [nathaniel ta] What would you use in REXML if you had it to do over again? Will you
|   | | |   1766 [ser germane-] I don't know, and yes.
|   | | |   + 1773 [akr m17n.org] How it confuse you and REXML user?
|   | | |   | 1783 [ser germane-] The "secret" keys aren't clearly defined in the API.  IE, you don't have a
|   | | |   | 1789 [akr m17n.org] Isn't it documented?
|   | | |   | 1811 [ser germane-] Yes, and as we all know, the documentation is *always* kept up to date.
|   | | |   | 1871 [akr m17n.org] Good.
|   | | |   | 1877 [ser germane-] What were your search terms?  Try searching for "whitespace" or "raw".  Those
|   | | |   | 1905 [akr m17n.org] I searched "=>".
|   | | |   + 1776 [transami run] If such arguments will become named parameters in the future, then it is
|   | | |   + 1788 [transami run] While not suited to data parameters, when passing blocks I still find the idea
|   | | + 1723 [akr m17n.org] I rethought about measuring speed of connection.
|   | |   1725 [transami run] Wouldn't that download the whole file?
|   | |   1727 [akr m17n.org] Use :progress_proc you suggested.
|   | + 1737 [matju sympat] I'm puzzled by how this new behaviour would make anything actually easier
|   |   + 1738 [transami run] Actually I agree. I don't know why Matz thinks this is the "most regrettable
|   |   | 1745 [matju sympat] The idea of assigning to a variable a value that won't be used is
|   |   | 1747 [transami run] I'm just not going to top that. She's one for the books!]
|   |   | 1798 [matju sympat] I don't have an assignment-centric view of that. I tend to organize all my
|   |   + 1739 [matju sympat] Actually, looking at http://www.rubygarden.org/ruby?Rite, I can only see a
|   |     1740 [transami run] Lets clear this up, b/c i've read that too, and became very confused for a
|   |     1741 [matju sympat] The current policy on the value of i is that i doesn't exist in the
|   |     + 1742 [transami run] In the current system, yes, but I was demonstrating the new proposed system,
|   |     | 1746 [matju sympat] what's the difference between a lambda/proc and a block?
|   |     | 1749 [transami run] That was the very first thing that I did not understood about Ruby, and still
|   |     | 1792 [matju sympat] * receiver (optional, defaults to self)
|   |     | + 1793 [matju sympat] Further comment: on page 14 of Pickaxe, the footnote claims that Ruby's
|   |     | + 1794 [transami run] Thanks Mathieu. That clears things up very nicely.
|   |     + 1748 [matz ruby-la] I'm not going to abandon "real" closure.
|   + 1709 [akr m17n.org] I feel no problem with lambda.
+ 1687 [akr m17n.org] It's user's choice.  I don't want to deny progress bar for empty file.

^ Small change to lib/thread.rb to aid rdoc
1678 [gsinclair so] May I commit this change?
1693 [gsinclair so] No objections?  Done.

^ FileUtils bug and fix
1699 [chad chadfow] As posted in ruby-talk:85349, I believe there is a bug in FileUtils.cp's
1701 [g intersect-] Would this be better done in copy_file()?  (There's also a small typo in
1702 [chad chadfow] # Alternatively same src/dest could be checked for in fu_each_dest_src, so
1703 [aamine lover] Thank you for your report.

^ gc_sweep in Ruby 1.8
1706 [rich infoeth] I posted about this before but Matz wanted me to post more detail.
1713 [decoux moulo] Well, the problem is here
1715 [rich infoeth] Thanks Guy!

^ [patch] Small additions to Curses extension
1707 [vaine cs.hel] - def_prog_mode() as Curses.def_prog_mode

^ [patch] CGI multipart fails since StringIO#path returns nil
1714 [d.borodaenko] Since StringIO#path now returns nil, #local_path definition in cgi.rb no

^ Duck-typed singletons (was Re: open-uri patch, added progress_proc hook)
1719 [ruby-core wh] Let me first outline a specific advantage to the duck-typed singleton

^ Syck crash (was Re: gc_sweep in Ruby 1.8)
1720 [ruby-core wh] Agh!  Sorry, I just noticed this message!
1785 [ruby-core wh] This segfaulting of Syck has been discovered and eliminated.

^ Re: "stereotyping"
1721 [transami run] Sorry I forgot to post results of DuckHunter examples. (DuckHunter itself is

^ Cascading class definitions effect objects
1728 [transami run] I'm doing some hard nosed analysis of AOP for Ruby (:pre, :wrap, etc.) as this
+ 1729 [george.marro] I haven't seen any Ruby program that uses this, but...
| 1730 [transami run] Nice, I can see how it would be useful in this regard. A very valid and
| 1734 [matju sympat] do you mean freezing a singleton class?
+ 1735 [ser germane-] Yes.  I've used it a few times, although in most cases Ruby's singletons are a
+ 1736 [matju sympat] If you want a suitable analogy for your real world: when you realize that

^ block locals & Ruby2  [was Re: open-uri patch, added progress_proc hook]
1743 [batsman.geo ] def foo(n)
1744 [transami run] actually using
1764 [batsman.geo ] This is the behavior matju wanted (n independent counters). It works in

^ Controlled block variables (was: open-uri patch, added progress_proc hook)
1751 [transami run] In considering some of the things we've been discussing related to the
+ 1755 [jgb3 email.b] a = [ 1, 2, 3 ]
| 1756 [transami run] a=[1,2,3]
| + 1760 [ser germane-] But... this doesn't work in Ruby anyway.  'a' isn't in scope inside the
| | + 1761 [transami run] What's the point of having eval, then? Look at your example. By your argument
| | | + 1765 [ser germane-] eval "a = [1,2,3] ; def z ; p a ; end ; z"
| | | | 1767 [transami run] "You take the blue pill, the story ends...you wake up in
| | | | 1769 [ser germane-] Yup.  I'm a stick in the mud... I like my code to follow the same rules
| | | | 1770 [transami run] Well okay. But I use eval a lot and I can honestly say that having a way to do
| | | | 1774 [matju sympat] I am a bit perplexed by that comment too. I thought he was one of the
| | | | 1784 [ser germane-] Hah!  So true.  What's your super-power, Mathieu?
| | | + 1771 [sdmitry lrn.] I think that eval just gives access to ruby interpreter itself in run-time.
| | | | 1772 [transami run] Hey! That's a workable solution. Not quite as clean, but it works for me.
| | | + 1779 [dblack wobbl] No, by Sean's argument there is no point having eval do some kind of
| | |   + 1780 [dblack wobbl] Whoops, make that
| | |   + 1781 [transami run] You're a real whirlwind of positive attitude.
| | |   + 1790 [matju sympat] A classic of evaluating strings is evaluating SQL code, and almost
| | |     1791 [chad chadfow] #
| | |     + 1796 [transami run] You're just talking a different language, but you're still evaluating. In
| | |     | 1797 [pit capitain] Haven't you seen my proposal in [ruby-talk:86349] using define_method?
| | |     + 1801 [austin halos] I've been thinking about this, and I *would* like to see a way to do
| | |       1806 [transami run] (Obvious but) You have my vote Austin, if it's worth anything.
| | + 1775 [transami run] "Wait a minute."  Why isn't  a  available in the scope of this method
| |   + 1777 [stillflame F] in fact,
| |   + 1782 [ser germane-] I know what you mean.  I tend to want to scope things up when using irb; that
| |     1787 [transami run] Honestly, I have always felt funny about
| + 1786 [rpav mephle.] I had a sudden inspiration with respect to this problem.  As others
+ 1768 [transami run] On second thought, I think the use of #{ ... } may be a poor choice. Perhaps

^ gc_sweep under 1.8 ... not syck.so
1753 [rich infoeth] We still encountered a gc_sweep in our use of Ruby 1.8 on Linux (v8).
1754 [decoux moulo] Do you use threads ?
1757 [rich infoeth] Yes, there are several (Ruby) threads working during this gc_sweep.
1758 [decoux moulo] Best to update to 1.8.1 or retrieve the patch for 1.8.0. There is a well
1763 [rich infoeth] of course this effects 300 machines ;-)
1778 [decoux moulo] The patch is in RC2, this is this problem
1802 [rich infoeth] [asmt@sv022 coredump]$ ruby -v
1803 [decoux moulo] It will be faster if you can write a small program, to make possible to
+ 1804 [rich infoeth] Trust me, I would if I could.  This is intermittent.  We have a 12,000
+ 1805 [rich infoeth] There is a discussion (found by chad fowler) on ruby-dev (22000)
  + 1809 [decoux moulo] but why in [ruby-core:1802] there is
  + 1810 [decoux moulo] OK, this is [ruby-dev:22005] apparently your configure use pthread. try it

^ FileUtils.cp should use to_str?
1795 [gsinclair so] require 'pathname'
1835 [aamine lover] That sounds nice.

^ Syck install on Debian Standard (Ruby 1.6.7)
1799 [transami run] actually the person doing the install, the admin of the site is. So I can't
1800 [transami run] Oh, it looks like it's missing mkmf.rb is not included in 1.6.7? can I install
1807 [batsman.geo ] apt-get install ruby-dev
1808 [transami run] Doh!
1814 [transami run] Knew this would happen. The Ruby part of Syck installed. But the PHP bindings

^ string.c bug and (broken) patch
1812 [chad chadfow] This message is in MIME format.  The first part should be readable text,
+ 1813 [decoux moulo] Yes, just use the debugger and when it crash make
+ 1817 [nobu.nokada ] String.allocate[0,2] = ""
  1818 [chad chadfow] # Hi,

^ Syck with Ruby 1.6.7 Lost Character
1815 [transami run] There seems to be a bug using the latest Syck with Ruby 1.6.7. When I to_yaml
1816 [transami run] Well that was an easy fix. Seemed so strange that I thought it had to be a

^ Re: configure.in: do not override CCDLDFLAGS, LDFLAGS, XLDFLAGS
1819 [sunshine sun] Unfortunately, this change breaks the Apple/NeXT builds when the
1820 [eban os.rim.] Ok.  I chose option #1, too.  Commited.  Thanks.
1821 [sunshine sun] Thank you.
1822 [eban os.rim.] Doh! Thanks.

^ * configure.in: keep ARCH_FLAG separate. export ARCH_FLAG.
1823 [sunshine sun] I am afraid that I do not understand why you made this change.
1824 [eban os.rim.] I forgot add ARCH_FLAG to DLDFLAGS in lib/mkmf.rb.
1825 [sunshine sun] That works correctly.  Thank you.  :-)

^ NeXT configure.in patch
1826 [sunshine sun] When Matze committed my patch to revive the NeXT ports recently, he
1828 [eban os.rim.] Applied.  Thanks.

^ configure mkdir -p patch
1827 [sunshine sun] When I submitted the patch to revive the NeXT ports of Ruby a couple
1875 [matz ruby-la] autoconf is not for users, but developers, so that I thought it's OK
1876 [sunshine sun] Okay.  Thank you for the explanation.  :-)

^ BUG: clean/distclean bug
1829 [sunshine sun] make clean

^ Constants, class variables and the cbase field
1830 [george.marro] Can anyone explain to me the workings of the cbase field in eval.c's struct
1831 [decoux moulo] cbase don't exist in the CVS version.
1838 [george.marro] Guy - thanks for the response - I certainly wasn't aware that it had been
1839 [decoux moulo] Well, imagine that someone write
1842 [george.marro] Hmm, well .. I didn't know you could do that :)  But anyway .. the subtext
1844 [matz ruby-la] What kind of behavior do you want (to change)?  Remember you're saying
1846 [george.marro] Matz - I didn't mean to denigrate your decision, but like you say, it's not

^ Fwd: Access to CVS lost again
1832 [ser germane-] Sending this again and CC'ing the core list, because I didn't get any response

^ CVS troubles
1833 [ser germane-] By the way, I can recommend both Subversion (subversion.tigris.org) and Darcs

^ New syck bug
1834 [chad chadfow] There is a new syck bug that appears to be caused by the recent fix for
+ 1837 [chad chadfow] # There is a new syck bug that appears to be caused by the recent fix for
+ 1840 [ruby-core wh] Yeah, I'm not sure this is the YAML you want to be generating.  I
  + 1841 [chad chadfow] # >
  + 1852 [dblack wobbl] Here's a YAML-to-YAML version, same result (just for baseline
    1854 [rich infoeth] ok...so this line number thing is freaking me out.  Are you saying that
    1855 [rich infoeth] s/Revaletions/Revelations