From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Christopher Allan Webber Newsgroups: gmane.lisp.guile.devel Subject: Ideas for a Guile tutorial to go with the new site Date: Sun, 18 Oct 2015 10:41:38 -0500 Message-ID: <87k2qkjh74.fsf@dustycloud.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1445184315 12377 80.91.229.3 (18 Oct 2015 16:05:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 18 Oct 2015 16:05:15 +0000 (UTC) To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Oct 18 18:05:07 2015 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZnqSH-0005v9-LL for guile-devel@m.gmane.org; Sun, 18 Oct 2015 18:05:05 +0200 Original-Received: from localhost ([::1]:34505 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnqSG-00024U-VM for guile-devel@m.gmane.org; Sun, 18 Oct 2015 12:05:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58231) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnqSE-000242-11 for guile-devel@gnu.org; Sun, 18 Oct 2015 12:05:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZnqSD-0002xM-0Q for guile-devel@gnu.org; Sun, 18 Oct 2015 12:05:01 -0400 Original-Received: from dustycloud.org ([2600:3c02::f03c:91ff:feae:cb51]:52199) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnqSC-0002xD-Sd for guile-devel@gnu.org; Sun, 18 Oct 2015 12:05:00 -0400 Original-Received: from earlgrey (localhost [127.0.0.1]) by dustycloud.org (Postfix) with ESMTPS id EF5DB26651 for ; Sun, 18 Oct 2015 12:04:58 -0400 (EDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2600:3c02::f03c:91ff:feae:cb51 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:17933 Archived-At: 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. 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. - 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?