On Mon, 28 Jun 2010 19:54:31 -0700 (PDT)
Jason Smith <ja...@lilypepper.com> wrote:

> I just have to mention that what some people on this thread are asking
> for may just not be feasible.  The Java legacy behind Clojure can't
> realistically be hidden.  Nor should it be.
> 
> Clojure is very tied to the JVM, with all its power and all its
> complexities. Eclipse and IDEA and NetBeans are facts of life in this
> arena.  JARs and Maven and classpaths are also facts of life.

Yup, and Unix-like systems are very much tied to C and text
files. Makefiles and vi (or emacs) and C code and shell scripts are
facts of life.

Nevertheless, it's possible to use Unix-like systems without knowing
anything about those things. And it's likewise possible to use clojure
without knowing anything about Eclipse or IDEA or Netbeans or
Maven. You can make good use of a Unix-like system knowing just a
little bit about executables and PATH. Likewise, you can get good use
out of Clojure knowing a little bit about classpaths and jar files.

> I don't believe you help someone by working very hard to hide all
> that.  Java is what it is.

I don't think anyone advocated working very hard to hide it all. What
was advocated was providing a minimal setup so that someone can get to
a clojure repl and maybe run a few scripts without having to learn
about the rest of the Java infrastructure.

> If you are going to go to all the trouble to work with Clojure, you
> might as well be exposed to the reality of a semi-production Clojure
> project.  Put the waterwings on the kid, but then throw him in the
> deep end.  If he can't swim, he isn't ready for macros anyway.

I thought the goal was to *encourage* people to use clojure. Trying to
force the Java infrastructure down their throat at the same time is a
good way to send them somewhere else - unless they're already familiar
with it. Macros are fun - you have one really deep idea, but once you
get it you're ready to play. The Java infrastructure is *work*. You
listed half a dozen different things, most of which require learning
mostly boring minutia to use, none of which are nearly as much fun as
a clojure repl.

Yes, you may not be able to build a production quality java system
without all that infrastructure. If you want to teach people how to do
that, your methods make a lot of sense. But that isn't the goal of a
"getting started with clojure" project/doc/whatever.  The goal there
is to make it easy for them to learn enough clojure to make tackling
the rest of the Java infrastructure worthwhile. As was pointed out
earlier, you don't teach pilots to fly in a 747. You give them
something that's much less powerful - and hence much simpler - to
start on.

To wit:

>From Lee Spector <lspec...@hampshire.edu>:
> Jason: Your teaching methods might be great, but they're not the only
> way to go. When I teach Lisp or Scheme I generally start with a REPL,
> then move on to code in a single file, and then eventually a couple of
> files just to break things up. My students can be playing with ways to
> write interesting algorithms that do interesting things (e.g. big
> chunks of a standard AI curriculum) long before they would have any
> real reason to deal with the kind of setup procedures or environmental
> complexity that current Clojure environments

You can do all that with the clojure environment I work in. I just
created ~/.clojure, dump the jar files I want to work with in it, and
then have a script that does 'java -cp ~/.clojure/\* clojure.main
"$@"' to run a repl - or run a clojure script. That's sufficient to
create executable scripts (#!/usr/bin/env clj), etc. (Ok, I used my
Unix infrastructure knowledge to improve it - adding rlwrap and slime
and swank-clojure, but those are frills, not necessities). I even
managed to access the Java X10 plc libraries and the Sun io libraries
they depend on so I can play games with the lights in my house and my
garage door opener from clojure - and all I needed to know was
"download the jars and put them in ~/.clojure." Yeah, it probably
makes Java professionals want to throw up. But it lets me explore
clojure, which is all I want at this point.

For a class, you'd probably want to put the jar files for the class in
a shared place, and tweak the script to look there as well as their
private library.

     <mike
-- 
Mike Meyer <m...@mired.org>             http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to