r/scheme • u/pclouds • Jul 16 '20
The evolution of a Scheme programmer
https://erkin.party/blog/200715/evolution8
u/tremendous-machine Jul 16 '20
That is great. And actually quite interesting as a map to areas of the language I have not yet explored. Glad to see I'm supposedly "adept" for liking named-let... haha
6
u/bjoli Jul 16 '20
The "not polluting the namespace" auxiliary function is generally solid advise while at the top-level since it will result in faster code for many schemes, unless you have some kind of immutable modules.
3
u/anentropic Jul 17 '20
can anyone recommend a resource for good basic "beginner" low-hanging fruit type of performance tips for Scheme? (such as the one you've just mentioned)
3
u/bjoli Jul 18 '20
I have been writing a small document with inspiration from the never-ending beginner questions about scheme (and all extremely slow code written by python programmers). Nothing is done just yet, but I can ping you in a week or two when things really materialize.
If you want to read more about this case in particular, you should go read the blog post "fibs, lies, and benchmarks" at Andy wingos blog wingolog.org.
1
u/LinkifyBot Jul 18 '20
I found links in your comment that were not hyperlinked:
I did the honors for you.
delete | information | <3
1
u/anentropic Jul 18 '20
extremely slow code written by python programmers
this is almost certainly what I'm writing right now LOL
4
u/bobappleyard Jul 16 '20
Some of these were quite funny. I loved the one where they broke out SKI to solve it
2
u/protoUbermensch Jul 18 '20
(define factorial (lambda (n) (fold * 1 (interval 1 n))))3
u/bjoli Jul 18 '20
That is a mix of two that are already in the document, getting the worst of both worlds :) depending on fold from srfi-1 and your own auxiliary function instead of iota from srfi-1...
1
u/zaifir Jul 25 '20
IIRC, the version labeled "Overjoyed to see first-class continuations in Scheme..." appeared in one of the Lambda Papers. It included the comment: "Sussman's favorite style. Steele's least favorite style.".
17
u/CompSciSelfLearning Jul 16 '20
Color matched parentheses are what I came away with.
Also, the Peano numerals and combinatory logic one is already unreadable.