Wednesday, September 17, 2008

RE: [BLUG] scheme programming

My classmates had similar concerns with scheme, but I really liked it.  I had previous programmed in BASIC, PACAL, c, c++, assembly, and whatever language is used on calculators. 

 

When learning how to use an hp-48G calculator, I read that “Using reverse-polish-notation causes more focus to be put on the data and less on the function.”  Polish-notation (scheme notation) therefore causes more focus to be put on the function and less on the data.  Keeping that in mind helped me understand when scheme would be useful.  IE. when the algorithm is more important than the data.  In an entry level course, this is definitely true.

 

I like the structure of scheme.  I liked the fact that everything is “do-something  to-this  to-that  to-something-else …”.  Each line is a separate activity.  You can live in the now with scheme.  Everything happens in real time.  If you are defining a lambda, and a function is not yet defined, go ahead and call it anyway.  As long as you define the required function before you execute, everything will be fine. 

 

I like the lack of overhead.  I like the fact that you can pass anything (including functions) to a command.    (cons car cdr)  : )  I like the fact that ALL loops are different forms of recursion.  (You must first understand recursion to properly understand this definition of recursion.)

 

That being said, I only used scheme in three other classes.  I used it in “Analysis of Algorithms” to verify that my project idea would work.  I converted the algorithm then to c, to gain speed.  Now I program in c, c++, (c#,) python, and perl.  I don’t have much time for scheme. 

 

Food for thought:

 

http://xkcd.com/297/

 

http://xkcd.com/224/

 

http://xkcd.com/323/

 

--

Jeffery Williams

Software Test Engineer

IU Cyclotron Facility

jefjewil@indiana.edu

Work (812) 856-1165

Home (812) 219-5061

 

From: blug-bounces@cs.indiana.edu [mailto:blug-bounces@cs.indiana.edu] On Behalf Of Ben Shewmaker
Sent: Wednesday, September 17, 2008 9:35 AM
To: blug@cs.indiana.edu
Subject: [BLUG] scheme programming

 

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) 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?

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)))

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.  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.  Aren't there some good open source implementations?  What do you all think?

Ben

Re: [BLUG] scheme programming

On Wed, Sep 17, 2008 at 09:35:09AM -0400, Ben Shewmaker wrote:
> [...] and was wondering what
> languages anyone on this list starting learning on.

My first real programming language was Borland's Turbo Basic (no line
numbers). It took me a little while to really get in to it. By the end
of it, (3 years later, when I decided to move to C), I had reverse
engineered the Umoria save file format to a reasonable extent, and could
browse the entire map and tweak objects, as well as my stats. For me, it
was all about cheating.

I'm expecting a child at the end of this year (or early next year). I've
already decided on the first computer language I'll teach her: Python.
I can't wait until she's eight, as that was the age I was when I started
programming.

Of course, before then, I get to do fun things like teach her to count
in binary on her fingers. -- I want to do that before she starts public
school.

> [...] 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?

As others have mentioned, in general the Guile embedded scripting
language is likely where you'll see it most widely used in the FOSS
community.

I've seen at least two Scheme-based Window Managers, IIRC. Though, if
one of those was Sawfish, that uses Rep, which is a another dialect of
Lisp. The other, however, was 'SCWM', the Scheme Constraints Window
Manager.

There's also a Scheme Shell (scsh).

> Oh, and another thing I've been thinking about on this class. There is a
> strict no sharing your code policy with anyone. [...]

I agree with other folks in that it is the process and thinking (and not
the code) that is important at this point. They do allow you to talk to
other people, and that should be enough to get past the hurdles you may
face.

If people are incapable of talking about their problems, then they can
fall in to the recipe trap. They'll not really know programming at all,
instead they'll just know the language enough to reuse other people's
code snippets.

While using recipes can speed some development up, it shouldn't be
the primary answer to all questions. If it is, you're doomed, as you
either don't fully understand the language, or you're missing important
programming concepts.

> [...] 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?

You have to remember that open source thinking is not the only approach
that universities take. Frequently they make money on the inventions
of students, staff, and faculty. In an environment where they perceive
they are offering you a better percentage of the profits than a lot of
universities, it can be hard for some people to really understand why
they should even let you do open source.

This is one of the reasons that Stallman wrote the essay
"Releasing Free Software if you work at a University"
http://www.gnu.org/philosophy/university.html

While some universities are getting in to free software, just because
a part of the university is in to it doesn't mean the acceptance of it
has seaped through to all levels yet. Some things take time.

> And we also use
> an implementation called Chez Scheme, which is proprietary. Aren't there some
> good open source implementations? What do you all think?

Some introductory classes specifically set out to teach people using a
language the students likely have no experience with. This allows the
students to focus on the concepts, and get out of any bad habits they
may have gotten in to.

You could have gotten stuck with learning using ADA95. I knew a fellow
at University of Evansville that had his introductory courses in it.
Scheme gets a lot more FOSS projects than ADA.

Cheers,

--
Steven Black <blacks@indiana.edu> / KeyID: 8596FA8E
Fingerprint: 108C 089C EFA4 832C BF07 78C2 DE71 5433 8596 FA8E

Re: [BLUG] scheme programming

Well, it all depends. When I was an undergraduate of math major, we had
to take the course 'Introduction to Mathematics". It started with logic
and then number theory. More than 30 years later, I still consider
that's one the most valuable courses I have ever taken. No, I don't use
number theory for my work or daily life. But I still benefit from the
training of logic thinking, elegance of theorem proving, etc. up to
these days. IMHO, scheme is like that. It's a very elegant language in
many respects and is a very simple language for training. It's a static
scoping dialect of Lisp and can be OO. (Elisp in emacs is not scheme,
BTW.)
_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] scheme programming

scheme is beloved by academics, especially at IU. I'm not aware of
any application that I use that is written in it. (that's not to say
that there aren't any, but I do feel that it has weak support among
programmers who are actually trying to accomplish things and not a
more philosophical appreciation of programming.) If it has a
stronghold, I suspect it's in research, especially Artificial
Intelligence research.

Making this more sad: I agree with the general precept of "it isn't
the specific language..", but I find the LISP family to be pretty far
removed from just about everything else. particularly nowadays when
so many things are so object oriented (and although I believe in OO I
find in non-intuitive in many ways) it's a bit disappointing to me
that they are using scheme for an intro course. Of course, the most
likely alternative is java, and I don't like that either, so... Idk.
At least java looks a lot like most other languages.

Having said all of that, you'll still get into a programming mindset
learning scheme, so I don't want to sound too negative. I don't
think it's the best choice, but I don't think it's ruining you
either. :)

David


On Wed, Sep 17, 2008 at 09:35:09AM -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) 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?
>
>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)))
>
>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.
>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.
>Aren't there some good open source implementations? What do you all think?
>
>Ben

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

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

Re: [BLUG] scheme programming

On Wed, 2008-09-17 at 09:45 -0400, Steve Beckley wrote:
> I took that class last year. I didn't think it was very good. As far
> as I know Scheme is largely worthless. The only things I know of that
> it's used in is GIMP and a few programs that model evolution. You
> will never use it in another computer science class at IU, either.
> That said, it is a good language to learn on in that it is simple and
> is an excellent way to learn the fundamentals.
>

When I went through CS, it was used later: C311 in particular. A quick
check of the website shows that it still used there...so don't forget it
yet!

> On Wed, Sep 17, 2008 at 9:35 AM, Ben Shewmaker <ben@shewbox.org>
> 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) 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?
>
> 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)))
>
> 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. 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. Aren't there some good open source
> implementations? What do you all think?
>
> Ben
>
>
> _______________________________________________
> BLUG mailing list
> BLUG@linuxfan.com
> http://mailman.cs.indiana.edu/mailman/listinfo/blug
>
>
>
> _______________________________________________
> BLUG mailing list
> BLUG@linuxfan.com
> http://mailman.cs.indiana.edu/mailman/listinfo/blug

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

Re: [BLUG] scheme programming

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.

It is a neat language on a lot of levels.

> 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.


> 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.


> 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!


> 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
Size : 21 M
Repo : fedora
Summary : Graphical environment for developing programs using Scheme
URL : http://www.drscheme.org
License : LGPLv2+
Description: DrScheme is an interactive, integrated, graphical programming
: environment for the MzScheme programming language, and the MrEd
: windowing toolbox. DrScheme provides source highlighting for
: syntax and run-time errors, support for multiple language levels,
: an algebraic stepper, objects, modules, a GUI library, TCP/IP, and
: much more. It includes an extensive, hyper-linked help system
: called Help Desk, available from the Help menu. You can enhance
: DrScheme with many add-ons, including MrFlow, a static debugger.
: MzScheme is R5RS-compliant, including the full numerical tower. It
: also provides threads (on all platforms), exceptions, modules,
: class-based objects, regular-expression matching, TCP/IP, and more.
: MrEd provides a windowing toolbox for creating windows and menus; a
: drawing toolbox for drawing to windows, bitmaps, and printer
: devices; and an editor toolbox for creating multimedia editors.

Name : sigscheme
Arch : x86_64
Version : 0.7.6
Release : 2.fc9
Size : 289 k
Repo : fedora
Summary : R5RS Scheme interpreter for embedded use
URL : http://code.google.com/p/sigscheme/wiki/SigScheme
License : BSD
Description: sigscheme is a R5RS Scheme interpreter that features small
: footprint, low memory consumption, multibytes characters handling
: and more.

Brian

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

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

Re: [BLUG] scheme programming

I forgot to add that there is a GNU implementation of Scheme.

On Wed, Sep 17, 2008 at 9:45 AM, Steve Beckley <harthacnut@gmail.com> wrote:
I took that class last year.  I didn't think it was very good.  As far as I know Scheme is largely worthless.  The only things I know of that it's used in is GIMP and a few programs that model evolution.  You will never use it in another computer science class at IU, either.  That said, it is a good language to learn on in that it is simple and is an excellent way to learn the fundamentals.

On Wed, Sep 17, 2008 at 9:35 AM, Ben Shewmaker <ben@shewbox.org> 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) 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?

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)))

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.  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.  Aren't there some good open source implementations?  What do you all think?

Ben

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



Re: [BLUG] scheme programming

I took that class last year.  I didn't think it was very good.  As far as I know Scheme is largely worthless.  The only things I know of that it's used in is GIMP and a few programs that model evolution.  You will never use it in another computer science class at IU, either.  That said, it is a good language to learn on in that it is simple and is an excellent way to learn the fundamentals.

On Wed, Sep 17, 2008 at 9:35 AM, Ben Shewmaker <ben@shewbox.org> 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) 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?

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)))

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.  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.  Aren't there some good open source implementations?  What do you all think?

Ben

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


[BLUG] scheme programming

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) 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?

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)))

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.  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.  Aren't there some good open source implementations?  What do you all think?

Ben