Dave,

1,200 code samples staggers my imagination.
Yes, that is a very valid reason for doing one's
own typesetting.

I do hope they're paying you a bit extra...  ;)

Good luck with it (to both of you). I look forward 
to the finished product, though probably not 
as much as you do.

Hal

----- Original Message ----- 
From: Dave Thomas <Dave / thomases.com>
To: ruby-talk ML <ruby-talk / netlab.co.jp>
Sent: Saturday, May 27, 2000 8:32 PM
Subject: [ruby-talk:03014] Re: mismatched quotation


> "Hal E. Fulton" <hfulton / austin.rr.com> writes:
> 
> > That's fine, but it does bother me a little that typesetting
> > (traditionally the publisher's job) is being done by authors now
> > just because they have better tools than they used to.
> 
> Well, one of the reasons for typesetting your own technical books is
> the accuracy of code samples.
> 
> The Ruby book we're writing currently has over 1,200 code samples in
> the text. Traditionally, we'd have supplied the publisher with each on 
> a separate sheet of paper, with a reference number tying it back to
> the place it belongs in the source. The code would then be manually
> entered, and we'd have to scan each, again manually, for any errors.
> 
> However, typeset the book ourselves, and we have other options. In our 
> case, the code sits inline in the source of the book. Every time we
> format the book, the code gets executed. In many cases, the output is
> then inserted back in to the book. During the production of the book,
> these code samples have found bugs in Ruby, and fixes to Ruby have
> found bugs in the code samples.
> 
> The expected result for us is a more accurate book.
> 
> > Now, to talk about something more on-topic... :)
> > 
> > I have recently discovered that things that I thought were "reserved
> > words" can actually serve as method names and the like.
> > 
> > This shocked me. It doesn't really bother me, but it surprised me.
> > 
> > For example, I used a method named "class" and it worked fine.
> 
> Ruby actually has a method 'class' in object:
> 
>    p 1.class   # => Fixnum
> 
> In terms of how it works: In this case, the use of 'class' as a method
> name is unambiguous, so it says "go for it". In fact, the parser
> actually makes a special case of just this, casting the reserved word
> into an ID for the occasion.
> 
> Regards
> 
> 
> Dave
>