[#3266] 1.8.2 preview bug? — Chad Fowler <chad@...>
I haven't had time to really investigate this, but I've boiled it down
6 messages
2004/08/10
[#3269] YAML problem, possibly? — Hugh Sasse Staff Elec Eng <hgs@...>
I obtained a largish lump of shallow XML, succcessfully read it with
6 messages
2004/08/10
[#3292] dir.c --- Dir.chdir error handling — Johan Holmberg <holmberg@...>
55 messages
2004/08/21
[#3350] Re: [PATCH] dir.c --- Dir.chdir error handling
— Yukihiro Matsumoto <matz@...>
2004/09/06
Hi, Johan,
[#3351] Re: [PATCH] dir.c --- Dir.chdir error handling
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/09/06
Hello.
[#3352] Re: [PATCH] dir.c --- Dir.chdir error handling
— Yukihiro Matsumoto <matz@...>
2004/09/06
Hi,
[#3353] Re: [PATCH] dir.c --- Dir.chdir error handling
— nobu.nokada@...
2004/09/06
Hi,
[#3354] Re: [PATCH] dir.c --- Dir.chdir error handling
— Yukihiro Matsumoto <matz@...>
2004/09/06
Hi,
[#3356] Re: [PATCH] dir.c --- Dir.chdir error handling
— nobu.nokada@...
2004/09/07
Hi,
[#3369] Re: [PATCH] dir.c --- Dir.chdir error handling
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/09/09
Sorry for late posting. Typhoon striked me.....
[#3372] Re: [PATCH] dir.c --- Dir.chdir error handling
— nobu.nokada@...
2004/09/10
Hi,
[#3374] Re: [PATCH] dir.c --- Dir.chdir error handling
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/09/10
[#3376] Re: [PATCH] dir.c --- Dir.chdir error handling
— nobu.nokada@...
2004/09/10
Hi,
[#3378] Re: [PATCH] dir.c --- Dir.chdir error handling
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/09/11
nobu.nokada@softhome.net wrote:
[#3383] Re: [PATCH] dir.c --- Dir.chdir error handling
— nobu.nokada@...
2004/09/12
Hi,
[#3384] Re: [PATCH] dir.c --- Dir.chdir error handling
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/09/13
[#3385] Re: [PATCH] dir.c --- Dir.chdir error handling
— Yukihiro Matsumoto <matz@...>
2004/09/13
Hi,
[#3386] Re: [PATCH] dir.c --- Dir.chdir error handling
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/09/13
[#3387] Re: [PATCH] dir.c --- Dir.chdir error handling
— ts <decoux@...>
2004/09/13
>>>>> "H" == H Yamamoto <ocean@m2.ccsnet.ne.jp> writes:
[#3392] Re: [PATCH] dir.c --- Dir.chdir error handling
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/09/14
[#3393] Re: [PATCH] dir.c --- Dir.chdir error handling
— Yukihiro Matsumoto <matz@...>
2004/09/14
Hi,
[#3394] Re: [PATCH] dir.c --- Dir.chdir error handling
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/09/14
[#3395] Re: [PATCH] dir.c --- Dir.chdir error handling
— ts <decoux@...>
2004/09/14
>>>>> "H" == H Yamamoto <ocean@m2.ccsnet.ne.jp> writes:
[#3399] Re: [PATCH] dir.c --- Dir.chdir error handling
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/09/15
[#3403] Re: [PATCH] dir.c --- Dir.chdir error handling
— ts <decoux@...>
2004/09/15
>>>>> "H" == H Yamamoto <ocean@m2.ccsnet.ne.jp> writes:
[#3404] Re: [PATCH] dir.c --- Dir.chdir error handling
— Yukihiro Matsumoto <matz@...>
2004/09/15
Hi,
[#3405] Re: [PATCH] dir.c --- Dir.chdir error handling
— ts <decoux@...>
2004/09/15
>>>>> "Y" == Yukihiro Matsumoto <matz@ruby-lang.org> writes:
[#3409] Re: [PATCH] dir.c --- Dir.chdir error handling
— Yukihiro Matsumoto <matz@...>
2004/09/16
Hi,
[#3416] Re: [PATCH] dir.c --- Dir.chdir error handling
— ts <decoux@...>
2004/09/16
>>>>> "Y" == Yukihiro Matsumoto <matz@ruby-lang.org> writes:
[#3435] Re: [PATCH] dir.c --- Dir.chdir error handling
— Yukihiro Matsumoto <matz@...>
2004/09/17
Hi,
[#3436] Re: [PATCH] dir.c --- Dir.chdir error handling
— ts <decoux@...>
2004/09/17
>>>>> "Y" == Yukihiro Matsumoto <matz@ruby-lang.org> writes:
[#3438] Re: [PATCH] dir.c --- Dir.chdir error handling
— Yukihiro Matsumoto <matz@...>
2004/09/17
Hi,
[#3441] European Rubykonf 2004
— Mathieu Bouchard <matju@...>
2004/09/17
[#3402] Re: [PATCH] dir.c --- Dir.chdir error handling
— Yukihiro Matsumoto <matz@...>
2004/09/15
Hi,
[#3410] Re: [PATCH] dir.c --- Dir.chdir error handling
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/09/16
[#3293] 1.8.1 gsub/CGI behavior I can't explain — "David A. Black" <dblack@...>
Hi --
8 messages
2004/08/22
[#3301] Is Ruby 1.8.2 100% Backward compatible — Lothar Scholz <mailinglists@...>
Hello,
6 messages
2004/08/25
[#3345] Re: Is Ruby 1.8.2 100% Backward compatible
— Johan Holmberg <holmberg@...>
2004/09/03
[#3303] URGENT: what's the bug reporting system now? — Dave Thomas <dave@...>
Hello!
14 messages
2004/08/25
[#3304] Re: URGENT: what's the bug reporting system now?
— matz@... (Yukihiro Matsumoto)
2004/08/25
Hi,
[#3306] Re: URGENT: what's the bug reporting system now?
— Daniel Berger <djberg96@...>
2004/08/26
[#3315] Pretty Printing more widely — Hugh Sasse Staff Elec Eng <hgs@...>
May I propose the following patch (done against the 1.9.0 nightly
8 messages
2004/08/26
[#3331] "destructiveness" of delete — "David A. Black" <dblack@...>
Hi --
6 messages
2004/08/31
Re: Pretty Printing more widely
From:
Hugh Sasse Staff Elec Eng <hgs@...>
Date:
2004-08-26 17:27:15 UTC
List:
ruby-core #3323
On Fri, 27 Aug 2004, Gavin Sinclair wrote:
> On Friday, August 27, 2004, 1:04:21 AM, Hugh wrote:
>
> I'm not arguing for reducing everything as far as possible. The point
> is:
[...]
> If there were some value for "something", then 'p' and 'pp' would have
> a certain consistency which I think they deserve.
Oh, I see what you mean now. Thanks.
>
> For the record, I would't mind #p and #pp to be defined in IO-like
> objects, but I'm not clamouring for it.
>
>>> analogy between #p and #pp, why can't #pp be a shortcut for "puts
>>> X.something"?
>
>> It is -- it is x.prettyprint. The problem is that it goes to $>,
>> which you may not want to meddle with.
>
> The following gives me a NoMethodError.
>
> require 'pp'
> [1,2,3].prettyprint
Blast! I should post with the editor open. To quote the first Perl
book: "The Camels are coming!" -- the class name is PrettyPrint in
pp.rb and prettyprint.rb, and the method defined for other classes
is pretty_print, with no camels (which is so long as to cause me to
type petty_print just then!) hence my mistake.
> And you're right, I have no interest in meddling with $> :)
>
>>> In 'extensions', I define Object#pp_s. It's not a great name, but
>
>> define it as what? When IO inherits it the meaning will surely
>> neet to be different from when Array inherits it?
>
> class Object
> def pp_s
> pps = StringIO.new
> PP.pp(self, pps)
> pps.string
> end
> end
that's a nice implementation.
>
> There's no need for specialisation, is there?
>
> [1,2,3].pp_s # -> "[1, 2, 3]\n"
But then to get it out to a file I'd need to
open("wossname.txt". "w"){|fp|
fp.print [1,2,3].pp_s
}
which seems to me to be obscuring what I am trying to say with the
code, as would .
fp.print [1,2,3].pretty_print
I'd rather use the concept of prettyprinting which has been around
since at least 1982 (when I first bumped into it).
I'd be thinking:
File, prettyprint this
rather tnan
File, print this, prettily.
Indeed, the prettily is an adverb and should (I think) be tightly
coupled to the verb (method) rather than the object. Actually, it is
really rather than thinking
File, print (this, having prettified it).
which feels more opaque to me.
We say that ruby can be used as pseudocode, so I'd love to be able
to use a simpler form, out of the box.
>
> Cheers, Gavin
>
Hugh
>
>
>