Posts with keyword: scheme


Closures, Objects, Actors, and Picos

I've been intrigued by closures since I taught introductory computer science from SICP at UC Davis in 1988. This post dives into a little programming language theory to trace a line from closures to objects to actors to picos, showing what each step adds. A pico is a closure that has been made to answer for itself in the world, with persistent state, a durable identity, and relationships it can carry when it moves.
Continue reading {Closures, Objects, Actors, and Picos}


Matthias Felleisen at BYU CS Colloquium: Adding Types to Untyped Languages

Mattahias Felleisen from Northeastern University will be delivering the CS Colloquium at BYU on Thursday Nov 4 at 11am. Here's the abstract of the talk: Over the last 15 years, we have experienced a programming language renaissance. Numerous scripting languages have become widely used in industrial and open-source projects. They have supplemented the existing mainstream languages---C++ and Java---and, in contexts such as systems administration and web programming, they have started to play a dominant role. While each scripting language comes with its own philosophy, their designers share an antipathy to types. As a result, these languages come without a
Continue reading {Matthias Felleisen at BYU CS Colloquium: Adding Types to Untyped Languages }


Tail Optimized Mutual Recursion in Clojure

Clojure, a LISP-dialect dynamic language that targets the JVM has been generating some interest in the programming language community lately. By targeting the JVM, Clojure gets speedy performance in a cross platform way. One of the problems with targeting the JVM with a dynamic language that relies heavily on recursion is that the JVM doesn't support tail recursion (also called tail call optimization). The idea is pretty simple: for some common patterns of recursion the function call can be removed and the recursive function be optimized to a loop. The result is not only programs that run faster, but
Continue reading {Tail Optimized Mutual Recursion in Clojure}


Unit Testing in Scheme

I put together a mini-lecture on unit testing in Scheme for my CS330 class. It's not a complete introduction, just a tutorial on getting started. If you have suggestions on using SchemeUnit, I'd love to hear them. Students in CS330 submit their assignments to an autograder. They sometimes try to use the autograder as a test harness with bad results. I think there are some distinct advantages to students using unit testing in preparing their assignments: Unit tests separate tests from the code. It's cleaner and easier to manage. They can write tests before they code. This forces them
Continue reading {Unit Testing in Scheme}


Arc Is Released

Paul Graham has released Arc, his new language. Arc is still a work in progress. We've done little more than take a snapshot of the code and put it online. I spent a fews days cleaning up inconsistencies, but it's still in the semi-finished state most software is, full of hacks and note-to-self comments about fixing them. From Arc's OutReferenced Wed Jan 30 2008 16:21:31 GMT-0700 (MST) Paul mentions Arc in a number of his essays: The Hundred-Year Language http://www.paulgraham.com/noop.html http://www.paulgraham.com/progbot.html Some Work on Arc Arc Paul wrote HackerNews in Arc as a "big project" to shake out the
Continue reading {Arc Is Released}


Scheme and Ruby

Duane Johnson pointed me to a very interesting discussion on Y Combinator about the differences between Scheme and Ruby. This is an excellent discussion--not a flame war--that I found enlightening. The summary, if you don't want to read the discussion thread: Ruby closures are more complex Macros, macros, macros... Can't say enough about macros. Every language besides Lisp and it's close relatives trade macros for complex syntax. Maybe that's a good trade-off, maybe not. Nevertheless, it is a trade-off. You can't have the full power of macros without simple (abstract) syntax that's exposed to the programmer. Now, that I've
Continue reading {Scheme and Ruby}


And Now...Scheme in Haskell

AS a followup to my post last week about building a Lisp interpreter in Haskell, here's a similar, albeit more in-depth, tutorial that shows how to implement a good-sized subset of R5RS Scheme in Haskell.
Continue reading {And Now...Scheme in Haskell}


On The Virtues of Functional Abstraction

Joel Spolsky, who I interviewed for IT Conversations last year is talking about virtues of first-class functions and their positive impact on functional abstraction. Ok. I hope you're convinced, by now, that programming languages with first-class functions let you find more opportunities for abstraction, which means your code is smaller, tighter, more reusable, and more scalable. Lots of Google applications use MapReduce and they all benefit whenever someone optimizes it or fixes bugs. From Joel on SoftwareReferenced Mon Aug 07 2006 14:36:35 GMT-0600 (MDT) When I make students learn Scheme in CS330, it's often the first language they've used
Continue reading {On The Virtues of Functional Abstraction}


Effective Scheming

I received an email from a former student who's caught the Scheme bug. He says: I took 330 from you last year and I really enjoy coding in Scheme. I do any class project I can in Scheme -- even my Python code is riddled with lambda statements. I have two questions I was hoping you could help me with What are the prospects for kids who like coding in Scheme/Lisp, and how does one locate/maximize those prospects? What are some key things I could do to become a really great Scheme/Lisp coder? That is, what are some concepts
Continue reading {Effective Scheming}


JavaSchools, Scheme, and Sin

Joel Spolsky has a great essay on the perils of JavaSchools, those CS programs that adopt Java (or .Net, to be fair) because it is easy for students to learn. In it, he sings the praises of learning Scheme and being exposed to functional programming. Without understanding functional programming, you can't invent MapReduce, the algorithm that makes Google so massively scalable. The terms Map and Reduce come from Lisp and functional programming. MapReduce is, in retrospect, obvious to anyone who remembers from their 6.001-equivalent programming class that purely functional programs have no side effects and are thus trivially parallelizable.
Continue reading {JavaSchools, Scheme, and Sin}


Using Screencasts to Augment Instruction

Ever since I saw what Jon Udell was doing with screencasts, I've wanted to use them to augment some of my courses. If you're not familiar with the term, a screencast is a short video that, usually, shows th screen of a computer and has a narrative explaining what's going on. I think screencasts have a lot to offer instruction. In my CS330 class, we use Scheme. Learning Scheme is something the students have to do to complete the course, but it's not really what the course is about. Screencasts provide an excellent medium for introducing students to things
Continue reading {Using Screencasts to Augment Instruction}


Monads in Ruby: Yum!

Just ran across an introduction to using monads in Ruby. If you're more of a Schemer, you might enjoy this introduction more.
Continue reading {Monads in Ruby: Yum!}