You can use TeX Macros in DrScheme 3.99.0.23 and newer!
Continue reading “TeX Macros in DrScheme 3.99.0.23 and newer”
Tag: Scheme
The Schematics Scheme Cookbook
The Schematics Scheme Cookbook
is a collaborative effort to produce documentation and recipes for using Scheme for common tasks.
This is a site with high quality posts, and in particular it has a large amount of code specific to PLT Scheme. It is yet another great site that is definitely worth your time.
Lovable code
Today I ended up reading a particular post over at Black Grit, Inc. about their CafePress storefront.
Since mzscheme supports unicode, I would’ve done it like this (in R5RS code):
(define ♥ (lambda xs (begin (display "I ♥ ") (let loop ((xs xs)) (display (car xs)) (if (not (null? (cdr xs))) (begin (display " ") (display "and ") (loop (cdr xs))))))))
so that you could write:
(♥ ’scheme)
Deceptively Simple
Scheme is Deceptively Simple
How to Learn Scheme (was How to Learn Programming)
- The Scheme Programming Language Third Edition by R. Kent Dybvig
How to Design Programs by Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, and Shriram KrishnamurthiStructure and Interpretation of Computer Programs by Harold Abelson and Gerald Jay Sussman with Julie Sussman
Addendum 6/26/8:
The difference between learning a programming language and learning how to program is now clear enough to me that I had to revise this post to clarify its intent and correct its content. As such, the title has been changed, and only one book has been recommended.
LilyPond
LilyPond is a music notation that uses Scheme.
Enhanced Emacs Support for Editing and Running Scheme Code
Neil Van Dyke is a hacker, researcher, Emacs wiz, blogger, and producer of numerous of Scheme libraries. One of his packages, Quack is of particular interest to Emacs using Schemers.
Addendum: 8/1/8
New feature: compile mode can navigate from PLT setup-plt errors.
Composing Functions with Scheme
In the PLT thread [‘complement'[?] of map] Stephen de Gabriel asked if there was a function that would take any number of functions, and an argument, and then apply the first function to the argument, and apply the second function to the result of the first, and so on.
In PLT Scheme, the function is called ‘compose’. Compose:
Returns a procedure that composes the given functions, applying the last f first and the first f last. The composed functions can consume and produce any number of values, as long as each function produces as many values as the preceding function consumes.
I asked if this was typical FP style, and Noel replied that it is so common that compose is an infix operation in Haskell and ML, as far as he could recall.
Here is an example (from the thread) of how it works using the “Pretty Big” language:
(define pam
(lambda (datum . proc-list)
((apply compose proc-list) datum)))
(pam
2
(lambda (n) (/ n 7))
(lambda (n) (- n 3))
(lambda (n) (+ n 10))
(lambda (n) (* n 7)))
> 3
R6RS can complete with Common Lisp?
R6RS is the new language specification for Scheme. The goal is to provide programming features that folks need for programming “in the large”.
Can it compete with Common Lisp? I don’t think so. I like to think of R6RS as an experiment.
I might be right; I might be wrong.
Bus Scheme
Bus Scheme is an implementation of Scheme in Ruby.
You can read a little more about it in various posts on the authors blog.