Re: Factor

Factor: the language, the theory, and the practice.

Presentations in Factor

Friday, October 22, 2010

#slides

Just a few days ago, Daniel Ehrenberg gave a presentation at the Dynamic Language Symposium 2010 in Reno, Nevada. It was quite good, and gave a nice overview of the different language features that Factor supports.

Like many of the talks about Factor, it was made (and presented!) using Factor. Specifically, the slides vocabulary, which is a simple DSL for presentations. To show how it works, let’s just jump directly to an example:

IN: scratchpad USING: help.markup slides ;

IN: scratchpad {
                   { $slide "Factor!"
                       { $url "https://factorcode.org" }
                       "Development started in 2003"
                       "Open source (BSD license)"
                       "Influenced by Forth, Lisp, and Smalltalk"
                       "Blurs the line between language and library"
                       "Interactive development"
                   }
               } slides-window

When run, this pops up a window that can be used for presentations. It will look something like this:

You can control the slideshow window using the keyboard:

  • Press DOWN to move to the next slide.
  • Press UP to move to the previous slide.
  • Press F to toggle full-screen mode.

In addition, the slides vocabulary supports some other features, such as embedding code and clickable links to vocabularies or words. Here is an example which does both of these:

IN: scratchpad {
                   { $slide "Code!"
                       "Try clicking on these:"
                       { $code "2 2 +" }
                       { $vocab-link "sequences" }
                       { $link nth }
                   }
               } slides-window

If you want to customize the look-and-feel of the presentation, you need to modify the stylesheet used to render the presentation.

To see it in action, you can watch Slava Pestov give a Google Tech Talk on Factor. The slides he used are available in the Factor project under google-tech-talk.

Slides for most of the other talks that have been given are also available (they are a nice way to get a quick overview of the “big features” in Factor):

It’s so cool, even Zed Shaw gave a presentation using the slides vocabulary.