hoodwink.d enhanced


Try Ruby: Resets and Chapter Hops #

by why in inspect

A couple new commands in Try Ruby!

  • help #: Hop between chapters by using the summary number. Try it: help 1, help 2, wtf? 3, etc.
  • reset: Throws a RubyLex::TerminateLineInput if you get nested too deeply and all you see is the double dot prompt.

A Safari fix is on its way. Sit tight.

Ctrl-D will now also do a reset. If that’s more comfortable for you. I’m trying to keep light on the keybindings which interfere with the browser—still, do any others make sense?

said on 30 Nov 2005 at 15:22

C-x k :)

said on 30 Nov 2005 at 15:37

Ctrl-C is pretty universal (in Unixland anyway) for “kill” or “reset”. That interferes with “copy” though…

How about Emacs-style Ctrl-A/Ctrl-E for cursor movement?

said on 30 Nov 2005 at 16:16

Hey why, have you thought at all about allowing people to write tutorials for other things, above and beyond the 10 chapters that you mention?

said on 30 Nov 2005 at 16:18

No. That is an awesome idea.

said on 30 Nov 2005 at 16:22

Hey, Ctrl-D is for adding a shortcut in my ‘fox :)

Whatever, I bookmarked it already.

said on 30 Nov 2005 at 16:22

Well, whenever you’re ready!

Uhh… not that I have any specific ideas at the moment.


Oh, I do have one: Turning the Poignant Guide into an interactive tutorial book.

It’ll be a lot of work, for sure, but I don’t think it would take TOO long, unless the triggers you’re using are really hard to setup. I’m willing to help the cause!

said on 30 Nov 2005 at 16:51

Yeah, then when you publish it it can be all Hitch-hiker’s (or even Young Lady’s Illustrated Primer) style, with a little screen and a voice that tells the story as the user gleefully follows along, the background music going and everything flowing like a codewheel.

said on 30 Nov 2005 at 19:03

Reminds me of the good old days of the UNIX V7 ‘learn’ command, about time someone re-created that style of learning tool. Keep up the great work Why, I actually learned some new tricks with string addressing thanks to you.

said on 30 Nov 2005 at 23:34

BTW , the webkit nightlies do not crash (Safari 2.0.2 does) on this, but since I don’t get back a response to “2+3” after 30 seconds of waiting, I don’t know if it actually works (i.e. if the delay is due to server load or due to it simply not working in the Safari nightly).

said on 30 Nov 2005 at 23:36

As a Ruby newbie, this tool is AWESOME .

Even though I’ve been trying to Ruby to my friends, most of them were just too lazy to install it. When I showed them this, they were instantly hooked, as I show them The Power of The Block.

LearnRuby is probably the best tool out there to get people to give Ruby a try.

said on 30 Nov 2005 at 23:38

Sorry for the typos above. I really must learn to preview comments before I post them.

said on 01 Dec 2005 at 12:07

I’m happy to report that Safari is working quite well from here now. That took me too long.

said on 01 Dec 2005 at 13:54

This is probably one of the most interesting developments from the Ruby community that I’ve seen yet.

Now… I love the idea of letting other people write tutorials… but what if you take it another step further. What if you could create the tutorial hooks from an external ruby file (that’s been sufficiently $SAFEd perhaps) or a yaml file or whatever so that you could say, do this:


said on 01 Dec 2005 at 22:01

It would be cool to have say an Idiomatic Ruby tutorial, and maybe a tutorial of all of the features of Enumerable. A “How Objects Work” in Ruby, and maybe a “Who is this ‘Eigenclass’ Guy Anyway!?”

said on 02 Dec 2005 at 00:41

Yes, I agree. Everyone should get to know me.

said on 02 Dec 2005 at 00:41

Yes, I agree. Everyone should get to know me.

said on 02 Dec 2005 at 02:01

I’m very excited about tryruby. Exploratoriums teach us that laying hands on things makes for covert but effective education. I agree with the above that allowing others to contribute content would be killer.

Of course, adding tutorials and the like to tryruby.hobix is shiny and all, but I’d really like to steal your invention for my own gains, like personal projects/marketing schemes. I mean, sure it’s one thing to tell everyone about awesome it is to be able to call any ruby method with a backwards name, but for the meme to really sink in it would be nice to put a prompt in front of them and let them see the joy of calling [7,3000].tros and hash.=[](‘key’,’lock’).

By latching on to your brilliance, I can sell wheelbarrows full of books on my new coding practice and standard, Pragmatic Palindrome Programming: A Paradigm For Coping With The New Trend of Reversing Method Names.

said on 03 Dec 2005 at 06:57

Crazy amounts awesome-cool happen with it.

said on 05 Dec 2005 at 13:45

This is great stuff! My 11 year old daughter even enjoyed working through it. Can’t wait to see the next chapter.

Comments are closed for this entry.