The release notes here for PLT Scheme 4.1.5 mention support for literate programming. Not being familiar with the term; I read more about it on Wikipedia here.
I have wanted in-code documentation generation tools to serve this purpose; but I have never succeeded with them. It had always felt like I was battling the intent of the tool. Even Eiffel’s notion of different views on code-as-documentation never quite fit for me. This approach is fascinating; it allows for you to tell a story about the code as you write the code. Having posted to the PLT list asking about it here; two folks replied with details on this style and Scheme.
PLT Scheme recently added literate programming support; documented here. One example of its application is in Chat Noir here; and the source code for it may be viewed here (Thanks Robby).
A tool for literate programming in Scheme called is schemeweb located here (Thanks Phil).
Author: grant
Designing by Accident
Here is a seemingly nice presentation by Guy Steele. I haven’t watched it yet but the original poster vouched for it.
(via comp.lang.scheme)
The contentment of content
A few weeks on a PBS television show hosted by Alan Alda the scientists being interviewed were talking about the “Contentment of Content”. They said the the research shows that most humans learn the bulk of their knowledge (in particular their approach for all sorts of problem solving) younger in life and never learn any new approaches later on because it would just show them how much they don’t know. In other words; it would require the act of learning and that takes work. They go on to explain that in fact, this approach not only happens at the macro level in life but also in the macro level for particular areas of expertise. For sake of discussion, I would focus on programming.
The idea is that once you learn how; you are very, very unlikely to learn “new ways of doing it”, and why would you? It makes you feel bad since it makes you look like you don’t know what you are doing. It is also very, very unpopular to admit that you don’t know everything (I wonder if it has always been this way?). This is unfortunate because most of us really never learned how to program well and in fact seems to be the complete antithesis of the behavior and approaches that are likely to have made you successful as a programmer in the first place.
Philosophy always comes down to the details
Here is a good post about language design philosophy and implementation details of inner classes in Java. The focus is more on the latter; and the article is still interesting.
Managing your PDF library
If you have already got a lot of PDFs then you probably have a personal approach to managing all of the content. For example, I keep everything sorted by topic in a directory structure. Here are two ways that seem to provide a better approach (both are interesting): Papers and Digital Editions.
(via Pascal)
Succeeding as a Scientist
This presentation is brilliant and inspiring. Maybe the ideas aren’t new; but the way that Hamming put it all together really “spoke” to me.
It might seem like a long read; but isn’t personal success worth your time?
For now I am not going to highlight the key points; that is an exercise much better left to the reader.
(via Reddit)
Concepts, Techniques, and Models of Computer Programming
Here I asked “What is a good multi-paradigm book on programming?”.
Michael answered:
“Concepts, Techniques, and Models of Computer Programming” by Peter Van Roy and Seif Haridi
http://www.info.ucl.ac.be/~pvr/book.html
R6RS records and exports
In this post I asked:
Records conveniently generate a constructure and getters and setters for you.
Is there a way to conveniently export all these generated functions?
I am thinking of generating a helper function so I can copy and paste the exports; this is not ideal of course.
Aziz posted the following solution which works fine on PLT with Andrerui’s fix. I added code to make it in a standard library location:
redefine-record.sls
#!r6rs ;;;; Via comp.lang.scheme "R6RS records and exports" ;;;; By Aziz ;;; redefine-record.sls (library (redefine-record redefine-record) (export redefine-record-type) (import (rnrs)) (define-syntax redefine-record-type (syntax-rules () [(_ record-name) (begin (define-syntax m (lambda (x) (define (fmt s1 stx . s*) (datum->syntax stx (string->symbol (apply string-append s1 (symbol->string (syntax->datum stx)) s*)))) (define (enumerate i j) (if (= i j) '() (cons i (enumerate (+ i 1) j)))) (syntax-case x () [(_ ctxt) (let* ([rtd (record-type-descriptor record-name)] [f* (record-type-field-names rtd)] [rcd (record-constructor-descriptor record-name)]) (with-syntax ([make-T (fmt "make-" #'ctxt)] [T? (fmt "" #'ctxt "?")] [(n* (... ...)) (enumerate 0 (vector-length f*))] [#(T-ref* (... ...)) (vector-map (lambda (x) (fmt "" #'ctxt "-" (symbol->string x))) f*)]) #'(begin (define make-T (record-constructor (record-constructor-descriptor record-name))) (define T? (record-predicate (record-type-descriptor record-name))) (define T-ref* (record-accessor (record-type-descriptor record-name) n*)) (... ...))))]))) (m record-name))])))
t1.sls
#!r6rs ;;;; Via comp.lang.scheme "R6RS records and exports" ;;;; By Aziz ;;; t1.sls (library (redefine-record t1) (export M) (import (rnrs)) (define-record-type M (fields x y z)))
t2.ss
#!r6rs ;;;; Via comp.lang.scheme "R6RS records and exports" ;;;; By Aziz and Andreuri ;;; t2.ss (import (rnrs) (for (redefine-record t1) expand run) (redefine-record redefine-record)) (redefine-record-type M) (define x (make-M 12 13 14)) (display (list x (M? x) (M-x x))) (newline)
Run this to see it work:
plt-r6rs t2.sls => {#(struct:M 12 13 14) #t 12}
win-control
OLE, Internet Explorer and raw windows automation library for Gambit-C on Windows platforms
Inspired by Watir on Ruby, this library brings the same capabilities and more to the high-performing Gambit Scheme implementation. Now you can write automated test scripts or automate Windows application tasks in beautiful Scheme code and compile it all into a standalone exe file.
(via comp.lang.scheme)
A Command Line tool for the Windows Clipboard
This command line tool for working with the Windows clipboard looks very useful for Windows power-users.