GNU Emacs on Cygwin

While it is possible to run Emacs on Windows, I suspect that Emacs “expects” to be running on UNIX. As such, I’ve decided to perform an experiment and try to do most of my work in Cygwin, including running Emacs. The following is how I did it:
Steps

  1. Create a Windows environment variable named ‘CYGWIN’ with the value ‘tty’
  2. Install Cygwin
  3. Install Cygwin/X
  4. Download-and-install Emacs using the setup.exe (as explained in the documentation linked above), choose the packages ’emacs’ and ’emacs-X11′, and be sure to check the “Bin?” checkbox. If you don’t check “Bin?” it will look like the installer is doing something, but in reality it does nothing (guess how I know that?).
  5. Add this to your .bashrc (see steps below if you want to use Emacs): export DISPLAY=:0.0
  6. Run: source .bashrc
  7. Run: XWin -multiwindow &
  8. Run: xeyes &
  9. Xeyes should pop up. Now try emacs
  10. Run: emacs &
  11. The Emacs welcome screen should appear.

Updating your .bashrc

  1. Open a terminal
  2. Type: emacs -nw .bashrc
  3. Emacs gives you a welcome message. Hit C-l to continue editing.
  4. Go to the bottom of the page
  5. Insert an empty line at the end and type in the text listed above
  6. Hit C-x C-s to save the file
  7. Hit C-x C-c to exit Emacs

References

Addendum: 16/10/08
I removed the unnecessarily complex step re-starting the shell when source’ing would have done just fine.
I wasn’t happy with my explanation for doing this, so I revised it.

Computer Science Teachers Association

The Computer Science Teachers Association is a membership organization that supports and promotes the teaching of computer science and other computing disciplines. CSTA provides opportunities for K-12 teachers and students to better understand the computing disciplines and to more successfully prepare themselves to teach and learn.

HtDP Languages and Math

A comment by Matthais on the nature of the first three HtDP languages:

HtDP’s first three teaching languages are basically mathematics, ignoring the parentheses. We use
— arithmetic, for many different forms of data
— algebra, for (potentially conditional) function definitions
— pre-calculus, for induction and recursion (these things converge, like series)

The Dylan programming language

When reading about Scheme or Smalltalk, the Dylan programming language is often mentioned.
Here is one person who likes it that has provided some notes on how to translate Scheme to Dylan. Here is his take on it:

Dylan is a completely object-oriented language, with multiple inheritance, generic functions, a powerful module system, a very expressive exception-handling system, hygienic macros, pleasant semantics, and a clean way to turn the knob between expensive dynamic behavior and efficient static constraints.

It sounds very interesting.

Make no small plans

Make no little plans. They have no magic to stir men’s blood and probably themselves will not be realized. Make big plans; aim high in hope and work, remembering that a noble, logical diagram once recorded will never die, but long after we are gone will be a living thing, asserting itself with ever-growing insistency. Remember that our sons and grandsons are going to do things that would stagger us. Let your watchword be order and your beacon beauty. Think big.

— Daniel Burnham, Chicago architect. (1864-1912)

Skimp Scheme

Skimp Scheme is a toy interpreter, about which the author makes a lighthearted quip:

Early days yet, but during a couple of enthusiastic hacking sessions while on Summer holiday in Italy, Skimp started talking back. It’s a surreal moment when a new interactive language interpreter come to life… like something with legs just strolled out of your primordial C program and asking for a pan galactic gargle blaster.

Closest statically typed FP "cousin" to Scheme?

Most of the folks with whom I’ve talked about Functional Programming seem to be very skilled in both dynamically and statically typed languages. I’ve learned only Scheme well. Wondering what should come next, I posted to comp.lang.scheme asking about what is a good statically typed Functional Programming language to learn after Scheme. Anton’s reply piqued my interest. Here are the relevant bits:

If you want to learn a more traditional typed functional language, and keep additional learning to a minimum, then SML might make sense both because it’s relatively close to Scheme in its semantics, and because it’s “small” for a typed functional language. It’ll teach you the essentials of typed functional programming.

“It’ll teach you the essentials of typed functional programming”, perfect!

On the other hand, if you’re looking to stretch your brain, Haskell is worth learning. Some might argue that you haven’t really done functional programming unless you’ve done pure functional programming. The combination of purity, lazy evaluation, and a highly advanced type system (particularly in the main Haskell implementation, GHC), makes for a programming style significantly different from that of the (relatively) impure, strict languages like SML, OCaml, and Scheme.

“On the other hand, if you’re looking to stretch your brain”, mmmmm… brain-stretching :).
Addendum: 10/12/08
I got a lot of great feedback on this post from a very diverse bunch of people. It looks like the best place for me to start is with SML and the move on to either OCaml, Haskell, or F#. ML for the Working Programmer was consistently recommended as the best book on SML.
While I haven’t got an urgent schedule for this course of study, I am happy to have a reasonable path to follow when I do pursue it!
Addendum: 12/07/08
Via this post:

* ML – ML is one of the favourite languages used by computer scientists. I suggest learning algebraic data types (sum types and product types) then to move on quickly to Haskell.
* Haskell – I find Haskell makes the most sense only after knowing Scheme and ML. Go crazy with pattern matching, but avoid using monads unless absolutely neccessary because they are cheating! You will be sorely tempted to resort to using them all over the place.

Additional advice to start with ML and then move to Haskell.