Saturday, October 4, 2008

Re: [BLUG] scheme programming

On Wed, Sep 17, 2008 at 9:55 AM, Brian Wheeler <bdwheele@indiana.edu> wrote:
> On Wed, 2008-09-17 at 09:35 -0400, Ben Shewmaker wrote:
>> I'm taking the intro to computer science course at IU and we are
>> learning to program with Scheme. I have no experience in programming
>> (well, if you don't count playing around with Basic in high school)
>
> Learned BASIC when I was young, and then played with C and Assembly. At
> IU did the scheme thing as well.
>
>
>> and was wondering what languages anyone on this list starting
>> learning on. I know it isn't the specific language you learn but the
>> fundamentals that matter, but I'm also wondering if Scheme is used
>> often in specific applications or where is it used in the wild?
>>
>
> I don't think scheme is actually used must in the wild on its own, but
> it is used in some gnu projects as an extension language via Guile.

Orbitz uses LISP, last time I checked.

>
> It is a neat language on a lot of levels.
Couldn't agree more!

>
>> Oh, and another thing I've been thinking about on this class. There
>> is a strict no sharing your code policy with anyone. Our first
>> assignment is really basic so I can see where sharing something like
>>
>> ;least compares 2 numbers and prints the smallest
>> (define least
>> (lambda (x y)
>> (min x y)))
>>
>
> I'm surprised they didn't ban the min function for that problem.
We do, actually -- language features not covered already cannot be
used. Reminds me of Guy Steele's paper where he limited himself to
only using terms he has already defined previously. One of the most
readable papers ever, especially in the programming language world!


>
>
>> would make it easy to cheat. But as we will get more complicated I
>> think that sharing code is a good way to learn how others solve the
>> same problem.
>
> Ah, but you're supposed to be learning how to solve the problem! Its
> not necessarily about the answer, so much as the process of obtaining
> the answer that's important.
>
Yup. We allow students to share algorithms too, just not actual
implementation. The collaboration policy used to be much more strict.


>
>> Maybe because I'm really into the open source community that I feel
>> that a University would surely want to encourage a more open approach
>> to coding? And we also use an implementation called Chez Scheme,
>> which is proprietary.
>
> Look at who does Chez Scheme (hint: author of the user guide) and look
> around computer science department. For good measure, look at the
> "Revised Report on the Algorithmic Language Scheme" That should solve
> the "why is IU using a proprietary scheme implementation" question!
>
Plus it's fast. Kent Dybvig's student, Aziz, is actually working on an
open-source implementation of the new Scheme standard, R6RS, and this
implementation, Ikarus, is available in both Debian/Ubuntu and Fedora.

You can use any other Scheme implementation for most of the class --
the only part that is Chez-specific is when we cover trees, later on
in the semester, because we use Chez's SWL widget library to do
visualization. But if you really want, talk to your AI (me!) and I can
cook you up an alternate tree-handling library. When the time comes.

>
>> Aren't there some good open source implementations? What do you all
>> think?
>>
>
> SISC is a java implementation of scheme. MIT has one.
>
>
> Doing a "yum info \*scheme\*" on my Fedora 9 box shows a few schemey
> things:
>
> Name : plt-scheme
> Arch : x86_64
> Version : 372
> Release : 1.fc9

Fedora's plt-scheme is a bit out-of-date (speaking as a Fedora
contributor). I'd recommend downloading the latest 4.x release
straight from plt-scheme.org, it works fine on Fedora. In my copious
(not!) spare time I'm going to try and get 4.x packaged properly;
right now the Unix-style compilation breaks a lot of things.

And to those who say Scheme is not useful, you can actually interface
with the JVM (using sisc, kawa, or Clojure if you want a
LISP/Scheme-ish language that's not exactly either). There's one for
.NET too.

Functional programming is a good programming paradigm to know, and
Scheme is one of the most flexible (and concise) language to learn
functional programming on. Teaching ML or Haskell (or Java!) as an
introductory language would involve talking a lot about types, etc.
and could be quite distracting.

One thing I'd like the C211 course to do is to talk about
non-functional paradigms a bit more -- that's probably for the second
half of the course, though, as recursion takes some time to sink in.

Best,

--
miʃel salim • http://hircus.jaiku.com/
IUCS • msalim@cs.indiana.edu
Fedora • salimma@fedoraproject.org
MacPorts • hircus@macports.org

_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

No comments: