Here is a good post on the history of Guile Scheme. It certainly would have been be interesting to find Scheme extending popular GNU apps.
Addendum: 03/03/09
Fixed a grammatical error.
Here is a good post on the history of Guile Scheme. It certainly would have been be interesting to find Scheme extending popular GNU apps.
Addendum: 03/03/09
Fixed a grammatical error.
Scheme and Lisp force you *think* from the get-go. Most engineers and programmers hate to do that and it makes them uncomfortable. Starting a program in Java or C is easy. There’s a pile of boilerplate you can type without thinking about it, and it `feels’ like you’re programming. Then you have to haul out the bag of tools like the compiler and the linker and makefiles or ant. There’s a lot of busy work needed just to get going, and you feel like you’ve accomplished something.
In Scheme or Lisp, you start it up and there you are at the REPL. You have to decide what your program is going to do. You can’t waste time writing boilerplate (it’s unnecessary), designing data structures (just cons one and specialize it later), figuring out how to build complex inheritance hierarchies (do that once you know what you are doing), you have to dive into the problem right away. If you are willing to make mistakes and learn from them, then the REPL is a great place to play. If you prefer to plan ahead so you don’t make mistakes, a REPL is a very uncomfortable place to be.
— jrm
Having experienced the “discomfort” myself, I recognize now that this development approach acts as a mirror to your strengths and weaknesses. It reveals, very very quickly, whether or not you really have got a grasp both on the problem and how you plan to solve it. There is no where to hide! It is great.
(via R6RS)
Sometimes understanding the history behind a technology and a community can make it easier to understand. A few months ago I wanted to better understand the history of the various reports on Scheme so I made some notes in the form of a timeline.
It includes everything up to R6RS along with the IEEE standard, and publishing of SICP and HtDP. Obviously a lot more things could be added here but I wasn’t trying to take notes for an exhaustive history. All of the sources for the notes can be found in the dot-file below.
jrm wrote a good post here about the difference between orthography and typography in programming. The context is a discussion about case-sensitivity in Scheme.
I’m not doing programming for it’s own sake, but because I’m trying to get my real work done and that involves writing code. I have neither the inclination nor the luxury of time to really delve down and spend three or six months learning a complex language in the hope that I’ll be more productive
— Janne
In the past I have said the same thing myself. This seems to be the status quo for the industry. I don’t feel that way anymore, though. It was the result of a feeling and not a rational thought process. Once you think about it, it doesn’t really make much sense.
If we don’t learn anything more than what we already know, then how will we ever get any more productive?
(via this comment)
What does Scheme do well? What does Scheme (not just RnRS Scheme, but Scheme more broadly) have that no one else has? It isn’t lexical scope – everyone but elisp has that, these days. It isn’t real first-class functions – lots of languages have that too. It isn’t proper tail calls – ML does that right. It’s not advanced compilers for functional languages – those are a dime a dozen. It’s not even first-class control, which a few other languages have. And the REPL – even Python has that.
It’s macros. Since 1986, Scheme has had a macro system that other languages can’t compete with, and haven’t succeeded in matching in the last 23 years. And over those 23 years, Scheme hasn’t stood still – Schemers have developed a vastly more expressive system in which huge numbers of new and powerful language extensions are possible.
So I say, press our advantage. Improve the macro system. Show the programming language world what the real power of “a very small number of rules for forming expressions” is.
That’s not to say that we should neglect the other things that make Scheme a high-quality programming language. They are important, and Scheme needs a community that cares about all her aspects. But this is not the tail wagging the dog – it’s knowing where our strengths lie.
– Sam T.H.
(via R6RS)
I wanted to know what currying means in practice for programmers who are not themselves theoretical computer scientists so I asked about it here. There were a lot of informative replies; and the most direct answers to the question seem to be:
Anthony Cowley:
There are many cases where Curried functions can be convenient, but I’ll just pick one class of examples. In FP, one is often passing around bundles of state in the form of parameters to a function.
Your best bet would be to look at existing Scheme code. I found this example in the MIT Scheme loader: [click link for code]
Currying permits repeated use of intermediate functions as an alternative to overtly managing arguments to a core function.
David Van Horn [on how to use the state monad in Scheme]:
You might have a look at these:
http://groups.google.com/group/comp.lang.functional/msg/2fde5545c6657c81
http://okmij.org/ftp/Scheme/monad-in-Scheme.html
Recommendation: do the math-y sections in HTDP. This will give you a flavor of the kind of mathematics you get in SICP, even though there are non-overlapping examples in each. I would especially focus on the examples from calculus (numeric differentiation, integration, taylor series etc) but the graph traversal (network flow) things are good for you too. Once you are at east with those, you can tackle SICP and get through fast
–Matthias
(via PLT)
The formal semantics of R6RS are described using PLT Redex. I don’t understand this field of study or where to start so I asked about it on the PLT discussion list and Robby replied here:
Start by reading the introduction to the formal semantics. Then download it and look at the README file (there are some examples in there to get you going).
If you’re interested in learning more about the style of semantics, as background on the R6 semantics, you can start with the redex web site and ask questions here. There is a book that should be coming out in a few months that might also be helpful.
— Robby
Jos also explained here:
Redex is a tool that allows:
1: the description of the grammar of a language
2: the description of how an expression of that language is to be reduced to the value of that expression (reduction relation)
3: after having done steps 1 and 2, redex (in casu procedures traces and apply-reduction-relation) can show you how an expression is reduced to its value.
Although Redex is far more general than just a tool to play with Lambda Calculus (LC) and Combinatory Logic (CL), my path was the following:
0: Imperative programming.
1: The Little LISPer, which is a great primer before glancing into 4. (about recursion, not really a book about programming, imho)
2: Greg Michaelson, An Introduction to Functional Programming through Lambda Calculus (not a masterpiece, but easy to read)
3: Playing with Scheme (particularly preparing lots of interpreters.
4: 1984. The Lambda Calculus, Its Syntax and Semantics, Vol. 103 in Studies in Logic and the Foundations of Mathematics. North-Holland. ISBN 0-444-87508-5. Not easy but very comprehensive.
5: SICP (transformation to continuatian passing style and storage passing style)
6: Redex, which allows me to check my understanding of LC and CL.
You can regard LC and CL as the ultimate mathematical abstractions of programming languages. In fact LC consists of the ultimate lambda and applications only, nothing else. CL goes even further. It has applications only, no lambda, just a few primitive functions (possibly only one) Yet CL and LC can be proven to incorporate all “definable functions”. These are not programming languages for practical use, They are formal mathematical systems of outraging beauty. If you want to make working programs, you’d better not follow my path, I think.
LC is an important piece of mathematics for the formal study of the properties of real life programming languages. It is used extensively in scientific studies on real life programming languages. Scheme can rather easily be described with mathematical precision in terms of LC. IIRC Algol60 has been described in terms of LC too. As an example, the semantical description of Scheme-R6RS is based on knowledge based on LC.
— Jos