Professional Web Applications Themes

YAPV (Yet Another Pickaxe Version) - Ruby

As promised in another thread, I am working on a new web version of the Pickaxe book ("Programming Ruby - The Pragmatic Programmer's Guide"). Why? * This is a framed version, which (with JavaScript enabled) keeps the book chapters syncrhonized with the Wiki pages noting changes due to 1.8). * This version is valid HTML4 markup, with consistent semantic markup. (I kept the styles similar to the existing HTML versions, albeit slightly cleaner...however, a single different CSS file could be used to change the look near-completely.) [1] * Unlike all other versions based on the 0.4 release of the HTML/XML, ...

  1. #1

    Default YAPV (Yet Another Pickaxe Version)

    As promised in another thread, I am working on a new web version of the
    Pickaxe book ("Programming Ruby - The Pragmatic Programmer's Guide").

    Why?

    * This is a framed version, which (with JavaScript enabled) keeps the
    book chapters syncrhonized with the Wiki pages noting changes due to 1.8).

    * This version is valid HTML4 markup, with consistent semantic markup.
    (I kept the styles similar to the existing HTML versions, albeit
    slightly cleaner...however, a single different CSS file could be used to
    change the look near-completely.) [1]

    * Unlike all other versions based on the 0.4 release of the HTML/XML,
    this version has included in it some very important 25 missing pages
    from the section "The Ruby Language"! [2]


    So, please check out the work so far [3] at:
    http://phrogz.net/ProgrammingRuby/
    and give me feedback. (It seems to work and look correct in Safari 1.2,
    Mozilla 1.4, and IE6Win. Does it fail for you? Does something about the
    display frustrate you?)


    (-, /\ \/ / /\/



    [1] When I started out, I was just going to frame the existing HTML.
    Then I saw how broken it was. So I thought "Hey, I have the XML, it must
    be clean...I'll just throw a few regexp at it and voila! clean HTML."
    Almost a week later, I'm a little over halfway done with all the pages. :|

    [2] Dave kindly supplied me with some new XML, but only after I found an
    HTML version of 0.3a on the web and started cleaning it. Sorry
    Dave...I'll look through the XML soon and clean up the changes as needed.

    [3] Only the following sections are done: "Introduction", "Facets of
    Ruby", "Ruby in Its Setting", and "Ruby Crystallized"
    I'm working on the Library Reference section now.
    Gavin Guest

  2. #2

    Default Re: YAPV (Yet Another Pickaxe Version)

    Two things I forgot to add:

    (1) I said I'm 'done' with most of the sections; that's not quite true.
    As a proud new owner of a physical copy of the book, I will be going
    through and finding all the spots where it says "see yyy on page 219"
    and adding hyperlinks to the appropriate section/table.


    (2) If you work on the Wiki to make changes, it would be great (since
    the chapters are so long) if you could add in headers with an ID for the
    section you're referring to. I've modified some of the Wiki pages
    already, but for example:

    If you have a comment about the aliasing section under "The Ruby
    Language", put in the Wiki page
    http://www.rubygarden.org/ruby?ProgrammingRubyTwo/TheRubyLanguage
    code like:

    <h3 id="aliasing">Aliasing</h3>
    ....my comment here...


    Not only will this help make clear what you're talking about, but the JS
    that synchronizes the sections passes the hash for the section to the
    Wiki when you click on that section in the TOC:
    http://www.rubygarden.org/ruby?ProgrammingRubyTwo/TheRubyLanguage#aliasing
    which will cause clicks on subsections in the TOC to synchronize the
    bottom frame to the appropriate section, if one exists.

    (Look at the url in the TOC to see what the id should be.)


    --
    (-, /\ \/ / /\/
    Gavin Guest

  3. #3

    Default Re: YAPV (Yet Another Pickaxe Version)

    Gavin Kistner <com> writes:
     

    Why HTML 4 rather than XHTML 1.1?

    -Mark
    Mark Guest

  4. #4

    Default Re: YAPV (Yet Another Pickaxe Version)

    Mark J. Reed wrote: 

    For various reasons. The two main ones are that
    (a) XHTML doesn't get you anything over HTML, except perhaps the ability
    to apply XSLT to it. It's no more semantic.

    (b) Web Browsers are HTML UAs, not XHTML UAs. Some happen to know how to
    pretend that XHTML is HTML when served properly, but that's not the same
    thing at all. (For more on this topic, see an excerpt from the MacIE
    mailing list from the illustrious Tantek Çelic at:
    http://phrogz.net/tmp/TantekOnXHTML.txt )


    I sense that my comments are likely to spark a heated debate, which
    would be inappropriate for this newsgroup. Please send rants on why
    XHTML will save the Universe to me personally, rather than to the newsgroup.

    --
    (-, /\ \/ / /\/
    Gavin Guest

  5. #5

    Default Re: YAPV (Yet Another Pickaxe Version)

    --zhXaljGHf11kAtnf
    Content-Type: text/plain; cht=us-ascii
    Content-Disposition: inline
    Content-Transfer-Encoding: quoted-printable
     
    =20 
    =20 

    It looks really nice, and is a good idea. Hopefully this will get people
    to update the ProgrammingRubyTwo wiki more often, too. It'll be much
    easier to see where changes need to be made.=20

    Thanks for setting this up.

    --
    Zachary P. Landau <net>
    GPG: gpg --recv-key 0x24E5AD99 | http://kapheine.hypa.net/kapheine.asc

    --zhXaljGHf11kAtnf
    Content-Type: application/pgp-signature
    Content-Disposition: inline

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.4 (GNU/Linux)

    iD8DBQFAIukiCwWyMCTlrZkRAoVwAJ9Fl/DZ9333rDpshhl23r4j1Mg78gCfSeLk
    KG25J+eCZv3L91O39y40Yks=
    =ydJL
    -----END PGP SIGNATURE-----

    --zhXaljGHf11kAtnf--


    Zachary Guest

  6. #6

    Default Re: YAPV (Yet Another Pickaxe Version)

    Gavin Kistner wrote:
     

    Looks really nice, unfortuneatly I can only get it to render in IE,
    Mozilla Firebird seems to dislike it. I have javascript enabled, is
    this is a bug?

    Charles Comstock
    Charles Guest

  7. #7

    Default Re: YAPV (Yet Another Pickaxe Version)

    sooo slllooowwww.

    On Fri, 2004-02-06 at 07:45, Gavin Kistner wrote: 
    --

    .''`. Paul William
    : :' : Debian admin and user
    `. `'`
    `- Debian - when you have better things to do than fixing a system
    <h1><b><a href="http://www.debian.org">debian.org</a></b></h1>



    Paul Guest

  8. #8

    Default Re: YAPV (Yet Another Pickaxe Version)

    Gavin Kistner wrote: 

    Works well with Moz 1.6, but the left frame seems to load very slowly.

    One things buggers me, though: There are no figures in the text as
    opposed to the real, printed thing. Just "figure x.yy not available".
    This was already the case in the online copy of the pickaxe book for
    Ruby 1.6.7. This is annoying because some important details are
    contained within the figures, such as the Exception class hierarchy
    (figure 8.1), or some pieces of code in the "extending Ruby" chapter.

    It would be really nice if the figures could be added to your work.
    Thanks in advance.

    --
    (defun f(p x)(If(Eq x nil)nil(If(p(Car x))(Cons(Car x)(f p(Cdr x)))(f p
    (Cdr x)))))(defun q(x)(Q nil x))(defun Q(a x)(If(Eq x nil)a(Q(Cons(Car
    x)(Q a(f(Lt(Car x))(Cdr x))))(f(Gt(Car x))(Cdr x)))))
    Timon Guest

  9. #9

    Default Re: YAPV (Yet Another Pickaxe Version)

    Charles Comstock wrote: 

    It may have been at the time. It now should be rendering perfectly in
    Mozilla and Safari, and 'well-enough' in IE.
    Gavin Guest

  10. #10

    Default Re: YAPV (Yet Another Pickaxe Version)

    Paul William wrote: 

    Glad you like it :)

    Seriously, are you referring to the site's transmission speed (which
    should be relatively speedy) or the loading of the 60k TOC frame?

    If the latter:

    (a) It has now been set to cache by the server, and

    (b) If you're using IEWin and have it set to check for newer versions of
    files "Every Time" it will hit the server for *each* image in the nav.
    Every time. Nearly 1,000 image instances. Regardless of the fact that
    the server is sending HTTP caching headers.

    Tip: change the setting back to "Automatically" :)



    Gavin Guest

  11. #11

    Default Re: YAPV (Yet Another Pickaxe Version)

    Timon Christl wrote: 

    See my previous post in response to Paul William.

     

    If I had any legal way to do these, I would. But I don't have access to
    anything more than the XML everyone else uses, which doesn't include any
    figures. :/
    Gavin Guest

  12. #12

    Default Re: YAPV (Yet Another Pickaxe Version)

    Gavin Kistner wrote:
     
    >
    >
    > It may have been at the time. It now should be rendering perfectly in
    > Mozilla and Safari, and 'well-enough' in IE.[/ref]

    I'm running mozilla firebird .7, and it still has trouble. I shoudln't
    have said it wouldn't render actually, but when you click on the link it
    says "ERROR! Cannot find object for Sync" in a javascript error. It
    links fine in IE, but firebird doesn't seem to like it. I plan on
    updating to .8 soon, so that might fix it, but .7 shouldn't have any
    particular problem with javascript.

    Charles Comstock
    Charles Guest

  13. #13

    Default Re: YAPV (Yet Another Pickaxe Version)

    On Tue, 10 Feb 2004 22:43:36 +0000, Gavin Kistner wrote:
     

    It also renders well in Opera.

    It's a good improvement of the book, I changed my bookmark to point to
    your site.
    Harpo Guest

  14. #14

    Default Re: YAPV (Yet Another Pickaxe Version)

    On Wed, 11 Feb 2004 09:10:06 +0100, Harpo wrote:
     
    >
    > It also renders well in Opera.[/ref]

    Well ... I spoke too quick, It does not render so well.
    There is something which looks like a little problem in Opera.

    It happens in the examples given when you doent the methods of a class,
    let's take an example for short :

    In module kernel

    //
    Array

    Array( arg ) -> anArray

    Returns arg.to_a.

    Array(1..5)
    -> [1, 2, 3, 4, 5]
    //

    The line "Array( arg ) -> anArray" appears very fine.

    "-> [1, 2, 3, 4, 5]" in on the line below "Array(1..5)", behaviour which
    is probably not expected.

    It is not always important, especially when there is only one line in the
    example, when there are 2 lines or more, they may be overprinted (I don't
    know if it is the good english term but 2 characters are displayed at the
    same place, mixed, thus difficultly understandable) !

    I have a minimalistic knowledge of html, it may be (probably it is) a
    problem in Opera. I can't even make a good cute&paste to show you this
    disaster :-)

    If you ever wish to get rid of this problem and you don't have an Opera
    working by your side, you can send me emails for further informations or
    tests.

    My true email address is ji_gme.pe_ma<at>free.fr
    .... not exactly, you'll have to remove underscores and the dot and change
    "<at>" to ""
    thus aa_bb.cc_dd<at>whatever gives aabbccddwhatever (which I hope not to
    be a real email adddress !)
    You might say I'm paranoid but I usually use rot13 too !


    Harpo Guest

  15. #15

    Default [repost after cancel, ignore previous message]Re: YAPV (Yet Another Pickaxe Version)

    On Wed, 11 Feb 2004 09:10:06 +0100, Harpo wrote:
     
    >
    > It also renders well in Opera.[/ref]

    Well ... I spoke too quick, It does not render so well.
    There is something which looks like a little problem in Opera.

    It happens in the examples given when you doent the methods of a class,
    let's take an example for short :

    In module kernel

    //
    Array

    Array( arg ) -> anArray

    Returns arg.to_a.

    Array(1..5)
    -> [1, 2, 3, 4, 5]
    //

    The line "Array( arg ) -> anArray" appears very fine.

    "-> [1, 2, 3, 4, 5]" in on the line below "Array(1..5)", behaviour which
    is probably not expected.

    It is not always important, especially when there is only one line in the
    example, when there are 2 lines or more, they may be overprinted (I don't
    know if it is the good english term but 2 characters are displayed at the
    same place, mixed, thus difficultly understandable) !

    I have a minimalistic knowledge of html, it may be (probably it is) a
    problem in Opera. I can't even make a good cute&paste to show you this
    disaster :-)

    If you ever wish to get rid of this problem and you don't have an Opera
    working by your side, you can send me emails for further informations or
    tests.

    My true email address is ji_gme.pe_ma<at>wanadoo.fr
    .... not exactly, you'll have to remove underscores and the dot and change
    "<at>" to ""
    thus aa_bb.cc_dd<at>whatever gives aabbccddwhatever (which I hope not to
    be a real email adddress !)
    You might say I'm paranoid but I usually use rot13 too !


    Harpo Guest

  16. #16

    Default Re: YAPV (Yet Another Pickaxe Version)

    On Wed, 11 Feb 2004 14:24:13 +0100, Harpo <fr> wrote:
     

    IE shows the same behaviour when the frame doesn't have enough horizontal
    space to display the whole line. Firebird instead choses to push the right
    side over the left one, which is slightly better at mose times.

    This whole problem is more appearant in Opera, because Opera appears to
    wrap to the next line much earlier than IE, ie. tries to keep a larger
    margin to the right side of the box.

    --
    exoticorn/farbrausch
    Dennis Guest

  17. #17

    Default Re: YAPV (Yet Another Pickaxe Version)

    On Wed, Feb 11, 2004 at 07:49:58AM +0900, Gavin Kistner wrote: 

    I'm using Mozilla and the loading of the TOC frame does take about 10
    seconds on my P3/850. Once it's loaded, navigation is quick, so I don't
    think this is a problem.

    One minor nit: the background isn't set in the main frame, so on my
    browser it comes out grey. This would be fine if the TOC frame were
    also using the default background color, but as it is I get one frame
    white and one frame grey.

    Paul



    Paul Guest

  18. #18

    Default Re: YAPV (Yet Another Pickaxe Version)

    Paul Brannan wrote: 

    Thanks. Fixed.
    Gavin Guest

Similar Threads

  1. Replies: 0
    Last Post: October 12th, 01:41 AM
  2. Replies: 2
    Last Post: October 2nd, 12:17 PM
  3. Replies: 0
    Last Post: October 1st, 02:30 PM
  4. Replies: 0
    Last Post: September 22nd, 05:27 PM
  5. Ruby newbie Q: Do I have a damaged copy of PickAxe
    By Matthias Wieding-Drewes in forum Ruby
    Replies: 5
    Last Post: August 25th, 06:09 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139