Literate Maruku

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Literate Maruku - Presentation Transcript

    1. Literate Maruku www.rug-b.com/wiki/show/schmidt 2007-10-04
    2. Literate Programming Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do. --- Donald E. Knuth (1984)
    3. Implemented in • WEB, CWEB, noweb • (Pascal, C, any) Code embedded in LaTeX • RubyWeb • Extended RDoc syntax • Literate Ruby (Ruby Quiz #102)
    4. but my problem was ...
    5. Primary use case • Write documentation for a library • Usage examples • Tutorials • How-Tos
    6. Primary use case • Write documentation for a library • Usage examples Be sure that • Tutorials they work ! • How-Tos Make them tests !!!
    7. Some lines in test_helper.rb • For more information see Executable code in usage examples (rubyurl.com/0fO) # The String class provides a * method # which allows easy duplication. example do output_of(\"bla\" * 2) == \"blabla\" output_of(\"bla\" * 3) == \"blablabla\" end
    8. Want that on a website?
    9. RDoc ???
    10. RDoc ??? Annotates methods and classes, not blocks
    11. Literate Maruku
    12. Libraries and Names • Maruku is as Markdown library for Ruby • Markdown was originally done for Perl • BlueCloth is the most popular implementation • Maruku is better !!!
    13. Markdown Markdown Heading ================ A paragraph is separated by \\n\\n. * a bullet list > a quote a code block
    14. Maruku brings Meta data Markdown Heading ================ A paragraph is separated by \\n\\n. {: class=introduction} This will be replaced with a table of contents... {: toc}
    15. Literate Maruku brings fun ### String#* The String class provides a `*` method which allows easy duplication. example do output_of(\"bla\" * 2) == \"blabla\" output_of(\"bla\" * 3) == \"blablabla\" end {: execute} string.mkd
    16. Literate Maruku brings fun ### String#* $ literate_maruku string.mkd The String class provides a `*` method # executes the file which allows easy duplication. # like “ruby string.rb“ does example do $ literate_maruku --output-dir=. string.mkd output_of(\"bla\" * 2) == \"blabla\" # executes the file output_of(\"bla\" * 3) == \"blablabla\" # and end generates string.html {: execute} string.mkd
    17. But ... No stack traces !
    18. Where can I get it? $ gem install literate_maruku rug-b.rubyforge.org/literate_maruku
    19. Example usage in ContextR
    20. ???

    + Gregor SchmidtGregor Schmidt, 3 years ago

    custom

    1955 views, 0 favs, 2 embeds more stats

    Introductory talk on Literate Maruku, the first gem more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 1955
      • 1912 on SlideShare
      • 43 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 11
    Most viewed embeds
    • 22 views on http://www.nach-vorne.de
    • 21 views on http://blog.s21g.com

    more

    All embeds
    • 22 views on http://www.nach-vorne.de
    • 21 views on http://blog.s21g.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories