[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ideas for a Guile tutorial to go with the new site

From: Christopher Allan Webber
Subject: Re: Ideas for a Guile tutorial to go with the new site
Date: Tue, 15 Dec 2015 14:28:19 -0600

Christopher Allan Webber writes:

> Hello!
> So I've been thinking a bit about what a friendly "intro" tutorial would
> look like that could fit with the direction the site is heading.  I came
> up with some ideas I wanted to capture before I totally lost them.

Well I started implementing this.

Here's the code:

It's using the excellent Skribilo.  (I had *no idea* just how excellent until
I started this... amazing stuff!)


> I think we can keep with the kids playing with robot toys idea and
> stretch that a bit.  Here's a brief outline:
>  - Intro
>  - Getting up and running
>    (picture of one of those robots with a wind-up-toy-key on its back?)
>    + How to start guile from the command line, add readline support
>    + Editor setup, simple
>      Details how to write some scheme with any editor, maybe makes a
>      free software editor recommendation of something simple that's not
>      too hard to get going with Scheme.  Would GEdit work?
>      Shows how to write a file and then import it at the REPL,
>      then reload it as you add things.
>      Teaches the basic idea of writing code in a file + playing at the REPL.
>    + Editor setup, advanced: Emacs + Geiser
>      Explains that this is the advanced, but recommended version.
>      It takes some time to get started with if you are not already an
>      emacs user, but you may want to come back to it later.  Explains
>      how to set things up.

I've gotten this far.  The rest of the stuff below still needs to be

I'm still interested in mixing this with sirgazil/Lusis's drawings if he

I haven't gotten into the fun part of the tutorial yet, but I'm kind of
optimistic.  The remaining parts are below.  What do people think, is
this worth spending the time on?  And might we want to put it on the
Guile website officially at some point...?

>  - First steps
>    Much like The Little Schemer uses food as variable names, I think
>    it's a good idea to stick with abstract fun concepts.  Here, I think
>    it would be great to continue along with the "Guile is a playground,
>    come play!" idea by using toys as variable names, and defining
>    procedures that evoke nostalgia for older programmers and sound
>    playful for younger ones.
>    Some ideas:
>      + could use building lists as putting toys in and out of a toy
>        chest
>        (define toy-chest '(robot teddy-bear doll-with-comb toy-soldier))
>      + could have a simple-bake-oven set of procedures that takes
>        arguments like flavor and dessert-type:
>          #> (define (simple-bake-oven flavor dessert-type)
>               (format #f "Yum!  You made a tasty ~a flavored ~a!"
>                       flavor dessert-type))
>          #> (simple-bake-oven "banana" "cake")
>          $20 = "Yum!  You made a tasty banana flavored cake!"
>        and then we can increase the advanced features a bit:
>          #> (define* (fancy-bake-oven flavor dessert-type
>                                      #:optional topping)
>               (if topping
>                   (format #f "Yum!  You made a tasty ~a flavored ~a covered 
> in ~a!"
>                           flavor dessert-type topping)
>                   (format #f "Yum!  You made a tasty ~a flavored ~a!"
>                           flavor dessert-type)))
>          #> (fancy-bake-oven "mint" "ice cream" "chocolate fudge")
>          $21 = "Yum!  You made a tasty mint flavored ice cream covered in 
> chocolate fudge!"
>        Yes... the fancy bake oven version is so fancy it can even bake
>        ice cream! ;)
>      + Introduce modules as extensions for our robots.
> I'm sure there are other things!  But I think a tutorial in this style
> might be fun, and would fit the site well.  And the desire for a good
> tutorial has been expressed many times.
> What do others think?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]