hoodwink.d enhanced
RSS
2.0
XHTML
1.0

RedHanded

Become a Try Ruby Narrator Straightaway #

by why in inspect

Well, with the Try Ruby tutorial done, it’s time to work on adding a number of other more advanced tutorials. Or even just different takes on starting off.

You can find a list of tutorials in the TUTORIALS constant. To start a small test tutorial I started: run 'meta'. Alternatively, they’re listed in /Tutorials.

 >> Dir['/Tutorials/*']                                                          
 => [".", "..", "intro.rb", "meta.rb"]                                           
 >> require '/Tutorials/intro'                                                   
 => true

Finally, if you want to link directly to a tutorial: http://tryruby.hobix.com/?meta.

To add your own tutorial, check out from http://code.whytheluckystiff.net/svn/tryruby/trunk/htdocs/tutorials. Add your-tutorial.html, following the conventions in meta.html and intro.html.

  1. Each lesson page is contained in a div with a CSS class of stretcher.
  2. Summaries, chapter headers are a CSS class of chapmark.
  3. Load code into the interpreter with a div of CSS class of load, placed inside the lesson page. It will be executed when the page is displayed.
  4. Check answers with answer and stdout classed div elements. These elements contain a regular expression. If the answer matches the regexp, the lesson proceeds.

I still need a script to update the site from SVN. For now, I’ll push things over manually each night.

Safari patches are applied now. Sorry about that. No browser bigotry going on here, just compatibility infantility.

said on

_why… Sadly the try ruby site seems to be broken in Safari again. I don’t get any prompt at all. But it works fine in Firefox on OSX .

said on

In Camino, in the Your Own Turf section, the tutorial doesn’t change page after the File.open(”/Home/comics.txt”, “a”) do |f|. It just sits there, waiting for a block that will never come, shivering in the darkness between the |.

said on

... and does the same thing in Firefox 1.5.

said on

... and summary #5. Any incomplete statement results not in a page turn, but only of aching inertia borne of loneliness and regret.

said on

B0rked in Safari: seconded.

said on

likewise for shiira (very similar to safari but sometimes more picky).

said on

Why, you are my hero.

said on

Does it means that we could begin the translation of the tutorials too ?

said on

Indeed, I think that if why allows it, the establishment of a Poignant Guide translation body would be most prudent.

The best thing would be to slice it up into chunks that would take roughly… 2 hours to transpose, that way filling in a section would be easy and quick enough that any Ruby guru could drop one in.

said on

Danno: In fact translation of Poignant Guide is already started ;) For the time being German and French are ongoing

said on

Ho Ho! But I think you know what I mean.

I18N can come later for the TryRuby, perhaps.

said on

Requiring meta.rb doesn’t cause it to run. You have to figure out what it does, and then just “run ‘meta’”

said on

Hmm.. can anyone get the popup to work? Type help 5 and try that chapter out. I can’t get the IFRAME to switch its src.

said on

Popup.make do .. h1 “Comics” .. list do .. comics.each do |name, url| :( :( :( It hung right here.

said on

Why et al. – just so’s you know, Try Ruby is fantastic. Surely one of the most engaging programming tutorials I’ve ever seen. As with the Poignant Guide, you’ve made a little piece of art here, masquerading as tech.

Gorgeous.

Comments are closed for this entry.