The Artima Developer Community
Sponsored Link

Weblogs Forum
The Fourth Cycle of the "Adventures of a Pythonista in Schemeland"

2 replies on 1 page. Most recent reply: Mar 20, 2009 11:10 PM by Michele Simionato

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
Michele Simionato

Posts: 222
Nickname: micheles
Registered: Jun, 2008

The Fourth Cycle of the "Adventures of a Pythonista in Schemeland" (View in Weblogs)
Posted: Mar 20, 2009 11:10 PM
Reply to this message Reply
A preview of the next cycle of Adventures is given. I ask from reader's feedback and I announce the availability of the Adventures in both PDF and HTML formats. Rejoice!

Request for feedback

Episode 18 closed part III of my Adventures. I have not exhausted everything there is to say about functional programming. Actually, there is much more that could be written on the subject. However, the third cycle was conceived just as a detour from the main topic of this series, i.e. macros.

In part II I have just scratched the surface of what macros are and can do. The next cycle of Adventures, i.e part IV, will be entirely devoted to the most sophisticated aspects of macros. I will show typical patterns of macro programming, examples of advanced macros, as well as the issue of (breaking) hygiene.

[UPDATE: after some thinking, I have changed my mind. Part IV will describe the R6RS module system and I will come back to macros in part V. The reason is I want to write portable macros and in order to do so a discussion of the module system is essential.]

Part IV will not begin immediately, since I have to finish various Python-related papers first, so there will be a little pause. The pause should give you enough time to digest part III.

I see that part III was little commented (except for the remarks of Elizabeth Wiethoff, hi Elizabeth! ;) I hope I have not lost all of my readers! I know that this is not an easy series and requires some effort. I would like some feedback, though. Are you still reading the series? Is it going well and would you rather prefer a change of direction or style?

Notice that by design the series is not too much practically-minded, since it focuses on the features that make Scheme Scheme, and that are missing in other languages. I could write a Practical Scheme series, explaining things like how you interact with the file system, with a database, how to use a GUI toolkit and such, but then you would not learn much about Scheme: this kind of tasks are more or less the same in any language.

I am also curious about what the background of my readers is. The series is not really intended for Schemers (they should know already everything!) but for curious programmers with experience in other languages, say dynamic languages such as Perl, Python, Ruby or functional languages such as ML, Haskell, and somewhat Scala. I am not sure how readable the series is for people with experience only in Java or C++. Some feedback would be welcome!

The Adventures now even in PDF!

A reader asked me if there was a PDF version of the Adventures, intended from printing. Now, there is! ;) I have generate a single PDF file for the first eighteen Adventures; the content is exactly the same of the Artima posts, with a nice table of contents in front. You can download it from here:

I have yet to fix the pictures, to spell check the whole text, and to review it from start to end. You will likely find small errors: in such a case, you are welcome to send me a note.

The PDF is generated by using Python technology, i.e. Sphinx, since all the Adventures are written as Scheme files with a big docstring in reStructuredText format. There are Scheme tools for literate programming and or documentation extraction (a Google search will find a few of them), but I have chosen Sphinx for three reasons:

  1. I already knew reStructuredText and everything I have written in the last 6+ years is in that format;
  2. Artima recognizes reStructuredText, so it was a path of minimal resistance;
  3. Sphinx is both very powerful and standard, in the sense that the official Python documentation is generated via Sphinx and basically all famous Python projects are switching to Sphinx, so it has thousands of users.

Notice that for nearly two decades (till last year) the Python documentation has been generated from Perl, so I see nothing wrong in generating Scheme documentation from Python ;)

If you prefer HTML over PDF, or if you want to leverage on the powerful search capabilities of Sphinx, you can browse the HTML documentation here:

A retrospective

When I started writing my Adventures I would have never imaged that the project would have grown to the current size. Originally, I just wanted to write a couple of introductory articles about Scheme: they became the first three Adventures and were written years ago (in Italian). Then, on Christmas 2007, I had a revelation about syntax-case macros and I decided that it was worthwhile documenting them.

Since the Italian Stacktrace site had just started, I came out with the idea of the Adventures: the first one was published in February, the 5th 2008. I expected to write a few articles on the subject and to be done with it, but after eleven episodes, I realized that there was still much more to say. So the series migrated to the English language on Artima, in September, the 18th 2008.

At this moment I have written 18 episodes and I feel that I am more or less halfway through my task. I think that the series will keep going for at least other six months and that it will become of book size at the end. The PDF is already over one hundred pages. I do not think the series will even become a best seller, since it is probably appealing only to a restricted public, but I never wanted to become famous, and in any case this series has a gigantic public with compared to the public I was used to, when writing Physics papers ;)

That's all. Keep following, and remember that the best of this series is yet to be seen!

Luis Sergio Oliveira

Posts: 22
Nickname: euluis
Registered: Jan, 2004

Re: The Fourth Cycle of the "Adventures of a Pythonista in Schemeland" Posted: Mar 23, 2009 3:15 PM
Reply to this message Reply

I did missed some of the latest episodes, but, with your new ToC, I'm starting to read them. My experience is Object Pascal, C++, Python, Java and now Common Lisp while still doing some Java and Python by the side. I only learned about functional programming when I started with Common Lisp about 2 years ago.

The parens were a non-issue for me and I think that the biggest problem with learning and understanding Lisp code is that sometimes lists are other basic data types are used way too much when an effort to use higher level abstractions would be preferable; and the fact that you can put much more stuff in 20 lines of Lisp than in 20 lines of Java, Python or C++, now guess what you can place in 150 lines!...

Alas, the problems are almost always the same in any language - understanding, maintaining and debugging crappy code is hard, mainly if you weren't the one to do the damage ~:)

Daniel Jimenez

Posts: 40
Nickname: djimenez
Registered: Dec, 2004

Re: The Fourth Cycle of the "Adventures of a Pythonista in Schemeland" Posted: Mar 26, 2009 7:51 AM
Reply to this message Reply
Just wanted to say that I'm following every installment. I rarely comment, but I think you have 3 from me in your series!

As for what I'm looking for, more code examples, which you've done a good job with so far, and maybe some more direct comparisons to equivalent python (or other languages), though I recognize that when you're covering macros there aren't many equivalent code snippets :-).

Flat View: This topic has 2 replies on 1 page
Topic: Mixins considered harmful/3 Previous Topic   Next Topic Topic: ActionScript Collections and Functional Programming

Sponsored Links


Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use