...
Whereas when Steve Yegge writes:
Whereas when Steve Yegge writes: "which means that everyone (including
me!) who is porting Java code to Clojure (which, by golly, is a good
way to get a lot of people using Clojure) is stuck having to rework
the code semantically rather than just doing the simplest possible
straight port. The more they have to do this, the more you're going
to shake users off the tree." all I could think on reading this is
"horror, horror, oh God, horror!!!; he really doesn't get it". First,
he shouldn't be porting Java code to clojure,
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
I would add that having to rework the code semantically in a Java to Clojure port is normal.
Clojure offers new possibilites that Java will probably never integrate or it will take so long
that Clojure will have moved to version 4.
If you port from Java to Clojure keeping the same code structure/approach then why do it ?
What do you gain ? Except new bugs ? If there is no gain, leave it in Java and use it from Clojure.
I would even reuse old business logic blocks like this especially if there's no documentation about them.
You can still choose later what you would like to switch to Clojure over time if there's an
incentive to do so.
Redoing stuff that existed in Java for a decade in Clojure is a waste of time
and energy. Reuse the building blocks, don't rewrite them.
It would be a set back if each new generation had to reinvent fire.
Octopuses are not at the top of the food chain because each generation has to rediscover/reinvent
things. There is no knowledge transmission from older generations, parents die before their eggs hatch.
We, in the computer business, have been doing this for decades. Maybe it's time we stop this.
People have this obstinate mind about using a single tool for all purposes...
Luc
--
Luc P.
================
The rabid Muppet
The way for Clojure to grow is by embracing it's core values and showing
the world that careful choices do lead to the right outcome. Let's not
turn this into us against Steve. There's nothing productive there.
Focus your energy instead on writing great Clojure code and sharing it
with everyone else. Get people excited about Clojure who want something
more powerful, and show them what is truly possible.
Cheers,
Aaron Bedra
--
Clojure/core
http://clojure.com
On 07/01/2011 03:59 PM, James Keats wrote:
> Hi all. I've been looking at Clojure for the past month, having had a
> previous look at it a couple of years ago and then moved on to other
> things only to return to it now.
>
> Over the past decade I have looked at many languages and many ways of
> doing things. People may say this language or that language is
> "general purpose", but the fact remains that languages have their
> niches in which they excel and beyond which it'd be foolish to
> venture.
>
> Clojure should not attempt be a "mass success" language or worry about
> its Tiobe index ranking.
>
> Clojure, the way I see it, is most suitable for the advanced
> independent developer. It is a language in the image of its creator,
> Rich Hickey. It's not a language for the factory hen. It won't become
> the next Java. Java already fills that niche, and despite what some
> may say, I don't see it going away anytime soon.
>
> I don't feel Clojure needs to "grow" - in terms of size of language.
> In fact it would worry me enormously if Clojure's path is to "grow" in
> size. It is fundamentally unsuited for that. If anything I wish for it
> to shrink even further and further.
>
> A Rich Hickey's quote comes to mind:
> � (paraphrased) "Most Clojure programmers go through an arc. First
> they think �eww, Java� and try to hide all the Java. Then they think
> �ooh, Java� and realize that Clojure is a powerful way to write Java
Although I agree with the ideas here that have already been stated by Rich, I am concerned about this message. There is no reason to stand against somebody. Steve is welcome to his own opinions and is an incredibly smart guy. He should be respected as a peer. His opinions happen to be different from Clojure's core values, and that is ok. Steve will either choose to use Clojure or go another path, and that is alright.
The way for Clojure to grow is by embracing it's core values and showing the world that careful choices do lead to the right outcome. Let's not turn this into us against Steve. There's nothing productive there. Focus your energy instead on writing great Clojure code and sharing it with everyone else. Get people excited about Clojure who want something more powerful, and show them what is truly possible.
• (paraphrased) "Most Clojure programmers go through an arc. First
they think “eww, Java” and try to hide all the Java. Then they think
“ooh, Java” and realize that Clojure is a powerful way to write Java
code"
and "As I've said in my talks, most Clojure users go from "eww, Java
libs" to "ooh, Java libs", leveraging the fact there there is already
a lib for almost anything they need to do. And using the lib is
completely transparent, idiomatic and wrapper free." - Google verbatim
for sources.he shouldn't be porting Java code to clojure, Second, Clojure IS
Whereas when Steve Yegge writes: "which means that everyone (including
me!) who is porting Java code to Clojure (which, by golly, is a good
way to get a lot of people using Clojure) is stuck having to rework
the code semantically rather than just doing the simplest possible
straight port. The more they have to do this, the more you're going
to shake users off the tree." all I could think on reading this is
"horror, horror, oh God, horror!!!; he really doesn't get it". First,
fundamentally different from Java, and third, such said users who
don't want to touch Java should not touch Clojure.
Clojure shouldn't worry about growing; java already has innumerable
libs. Clojure, imho, should continue its - what I would dub -
"middleware begone!" path, in which it'd provide an end-to-end, down-
to-the-metal comprehensible system that an individual developer can
get his head round and know exactly what's happening with his code and
its environment here and everywhere.
I could write more, but I have to run. Regards.
J.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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
I therefore see it most suited, as I said, for the advanced
independent programmer, or at most a small team of advanced enough
programmers.
And once you encounter the
reality and frustration infamously characterized by likening the
managing of lispers to the herding of cats then you begin to admire
languages like python and java and see what they got right in imposing
restrictions.
A very recent quote by Abelson is relevant:
"One of the things I’m learning here (Google) is the experience of
working on these enormous programs. I just never experienced that
before. Previously a large program to me was a hundred pages or
something. Now that’s a tiny, little thing."
Sure, "good lisp programmers", I have no argument against that, the
key operative word here being *good*; where do you find those in large
enough numbers to fill industry positions? I would also like to be
specific about what "good" would entail: it has to entail some
knowledge of what would actually work in the large and be
maintainable, and a personal maturity that would prevent them from
becoming too excited and overly adventurous. Unfortunately the
industry is not made of "good lisp programmers".
Versus the countless libraries and apps of Java and python?
As you asked, Clojure/core will continue in the fashion that it always
has. We welcome all ideas and opinions, though we will always think
carefully about which ones are accepted into the Clojure language. You
can rest easy knowing that the effort you put into building up your
Clojure knowledge will not go to waste :)
Cheers,
Aaron Bedra
--
Clojure/core
http://clojure.com
On Jul 2, 6:41 pm, Stefan Kamphausen <ska...@googlemail.com> wrote:
I would draw a thick line between the community's response to someone
who'd ask an utterly dumb question - I don't me specifically, but any
newcomer - and someone who'd insist upon the creator of a carefully
considered and crafted solution and its community to change their
"culture" outright.
If I, and people like me who are willing to put
their nose to the grindstone, read the books
I agree. I'm finding Clojure to be a very productive, concise way to
solve problems in the Model of a large MVC web application originally
built with other JVM-based technologies. We're finding a massive
compression of code by switching core processing to Clojure - and as a
nice side effect, we're taking the lessons of Clojure back to our
other language(s) and finding massive simplifications there which were
not obvious before.
Just today we started on the process of analyzing Power MTA log files
to deal with email bounces - an almost trivial process in Clojure,
compared to other languages, with HOF and lazy sequences available to
us.
To me, Clojure is a very general purpose language.
That said, I don't expect it to gain mainstream traction like Java
(and I think that would be a bit of a disaster, to be honest) but I
think it will gain a strong, productive community that will be large
enough to be healthy and self-sufficient, and will compare favorably
with other "popular" non-Java languages on the JVM.
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/
Railo Technologies, Inc. -- http://www.getrailo.com/
"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)
+1. I started out doing FP in the early/mid-80's and moved to OO in
the 90's. Coming back to FP I've had to unlearn some bad habits and
dust off some old habits that had laid dormant during my OO years. Of
the people I've tried to expose to Clojure over the last six months,
I've definitely found that those with less OO experience tend to pick
it up much quicker.
There's one obvious use case for such a wrapper function, though: if
you'll want to pass the Java method to HOFs from time to time. You
can't directly pass a Java method to a HOF, but you can pass such a
wrapper function.
--
Protege: What is this seething mass of parentheses?!
Master: Your father's Lisp REPL. This is the language of a true
hacker. Not as clumsy or random as C++; a language for a more
civilized age.
In addition, completion on vars is usually much better than on methods. Plus using javadoc when you're used to docstrings feels a bit like using a card catalog when you're used to having Wikipedia in your pocket.
-Phil
Perhaps we move in different circles but I've seen as much "bad Java"
in the large as I ever used to see "bad FORTRAN" and "bad C / C++"
code over the years. I think large "enterprise" Java projects have
just as many "below average" developers working on them as any other
popular language projects. And by definition, half of all developers
are "below average" and the more popular a language is, the broader
that spread is likely to be.
I think the only way you can avoid the "joe developer" that you fear
is to have a language which requires a very high barrier to entry so
only "good" developers can even write "Hello World!" in it. I don't
think that actually benefits anyone (since such languages don't get
sufficient critical mass that people ever get the chance to use them
"at work" to solve "real problems").
> Beyond Java, that was, more or less, predicting the demise of
> java and was unimpressed by python, whilst favouring ruby, yet since,
> over those past years, they've only - java and python - gone from
> strength to strength and remain on the ascendency whilst the ruby hype
> machine has imploded and the feasibility of ruby has come apart at the
> seams thanks to an ill-disciplined community culture.
I find it interesting that you offer up a perceived demise of Ruby
when all I see is continued adoption of Ruby/Rails, far and away ahead
of Python. Again, possibly we move in different circles. On Java, I
was just at JAXconf where the overall theme was "Don't worry, Java's
not really dead!" - it was an almost desperate sense of trying to
rally the (enterprise) Java troops and head off the defections to
other languages, whilst all the time praising how much innovation was
occurring on the (JVM) platform, i.e., in those other languages.
Oracle talked about the big focus for Java EE 6 / 7 / 8 being
simplification - making Java easier to use and removing a lot of the
complexity and configuration that has grown up in that world (exactly
the problems that are causing Java developers to move to more
expressive languages and to adopt convention-based frameworks). The
big inspiration being held up to everyone at the conference was
Ruby/JRuby and the convention-based approach of Rails. I came away
with the sense that even its most stalwart supporters think Java is
very, very sick and needs to clean its act up if it is to avoid
becoming irrelevant as a language. The audience were told that Java
developers need to get used to the idea of learning new languages
frequently. I bumped into a handful of people there using Groovy and
one or two using Scala. I ran into a lot of people who really had no
idea what was going on in the world outside of Java and they seemed
very focused on data-centric "enterprise" business applications that
really didn't do anything particular complex but yet had grown into
gigantic codebases with a huge amount of complicated infrastructure...
So, overall, I don't share your belief that Java has a "foundational
design and community cultures [that is] conducive to large, long-term
software and healthy ecosystems".
I've read that book (a month or two ago) but I'll go back and re-read
that essay in light of this thread. I've marked those four links for
"View Later" (I love RockMelt!). I may come back to this topic after
I've consumed all that information...
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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
Exactly.
A related case may be when you're not making just a straight wrapper,
but adding something -- your own pre/post checks, or argument
transformations, or etc.
As for binding to a Var, that makes sense if the result is not as
trivial as #(.meth %) and is going to be used many times. Otherwise
#(.meth %) is not much longer than a reasonably clear Var name for it
and is crystal clear as to what it does, so I'd just use that.
Hi Ken,
> A related case may be when you're not making just a straight wrapper,
> but adding something -- your own pre/post checks, or argument
> transformations, or etc.
>
> As for binding to a Var, that makes sense if the result is not as
> trivial as #(.meth %) and is going to be used many times. Otherwise
> #(.meth %) is not much longer than a reasonably clear Var name for it
> and is crystal clear as to what it does, so I'd just use that.
Another consideration I take into account is if a functionality is
exposed to users.
For example, I have a clojure graph querying and transformation library
that is built upon our java graph library. The functionality is
hopefully implemented in idiomatic clojure, like iterating nodes and
edges using lazy seqs. However, there are two or three functions that
basically wrap only java methods. I decided to put them in although
it's idiomatic clojure to call java, because then the user gets a
complete, consistent clojure API and doesn't have to know anything about
the java side.
For example, you can write
--8<---------------cut here---------------start------------->8---
(reduce + (map #(value %1 :inhabitants)
(vseq (rg) 'localities.Locality)))
--8<---------------cut here---------------end--------------->8---
instead of the slightly alien
--8<---------------cut here---------------start------------->8---
(reduce + (map #(.getAttribute %1 "inhabitants")
(vseq (rg) 'localities.Locality)))
--8<---------------cut here---------------end--------------->8---
That's a bit shorter (and allows for giving the attribute name as
keyword, symbol, or string), and most importantly it is documented. If
that wrapper wasn't there, users that just want to use the clojure
library have to study the javadocs, too.
Bye,
Tassilo
This suggests a generalization as well: that there's a form of "Law of
Demeter" applied to layers (and libraries) where one should tend to
talk directly to the levels adjacent but not to a level two steps
down, for instance. The layer two steps down is an implementation
detail of the layer one step down and therefore shouldn't be exposed
to that layer's clients, including your current layer. This would be
more broadly applicable than just when the layer boundary is a
client/library boundary -- then again, maybe in a sense it's the
reverse, and all layer boundaries can be thought of as client/library
boundaries, i.e. every layer of an application but the top should
basically be a library (or set of libraries) that is (or are) used to
implement the next layer up.
I sympathize! I turn 49 this week (Thursday) and have been doing OO
since '92. Fortunately I did quite a bit of FP before that so I think
I can still be "saved" :)
> IMO one thing that could help OO-people a lot would be a
> detailed guide for implementing classical design-patterns using
> clojure (see: head first desing patterns which is a fantastic book) .
That's an interesting point. Since the Gang of Four book is subtitled
"Elements of Reusabled _Object-Oriented_ Software", I wonder whether
it's really the right starting point tho'? Several of those patterns
exist to address problems people run into with OO, much like the Core
J2EE Patterns book contains patterns that exist solely to workaround
problems / deficiencies with J2EE constructs (such as EJBs).
It might be an interesting community exercise to examine the 23 GoF
patterns and discuss whether they are applicable in an FP world and,
if a pattern _is_ still applicable, what it would look like?
For example, Command would probably just be a function or closure, as
would Strategy I suspect? Template Method might be a multi-method or
protocol / extend-type combo, as might Decorator? Facade would be a
new API implemented in a namespace that uses / requires the various
namespaces to which it is a facade? Proxy is relatively
straightforward in the absence of a static type system. Flyweight is
probably not applicable. Singleton could be delay / deref? Iterator is
not needed in Clojure due to the seq abstraction. Just throwing some
ideas out there - I haven't given any of that much thought...
I think you mean Bertrand Meyer's piece, extolling the virtues of OO
in general (and Eiffel in particular)? I thought it was a terribly
self-serving piece. Meyer has a strong bias and quite a bit of disdain
for anything that isn't Eiffel - which shines right thru that essay to
the point of making it fairly worthless, IMO. It has no objectivity :)
I read the interview transcript for Syme, Armstrong and Odersky and I
have to be honest that I found Armstrong almost incoherent and half
the time couldn't figure out what he was trying to argue at all - so
I'm not sure what point you're trying to make by referring to that
interview, sorry. Similarly Armstrong's musings on the Erlang list
about the entire world being a single flat "namespace" full of
functions that are globally unique seems rather incoherent too. He
talks about the problems with using modules to organize functions
(and, yes, modularity can be hard) but then proposes something that
would be no different (functions made unique by either having nearly
random names or a structured set of metadata that would really be
indistinguishable from modules in the first place - see
http://erlang.org/pipermail/erlang-questions/2011-May/058773.html).
The Scala forum discussion is more useful and relevant: TL;DR -
objects are occasionally the most natural model for solving a problem.
And in Clojure, mutable (shared) state is "occasionally" the most
natural model for solving a problem. That doesn't seem newsworthy to
me, just that a pure functional approach might not always lead to the
cleanest solution. That's kind of a "duh!" because otherwise why would
we need STM...
And then there's the Ruby rant. Yeah, I'd be pretty ticked off that I
got shot in the foot by combining two or three libraries that
otherwise ought to behave reasonably together. Global method injection
is pretty nasty. When I first read about multi-methods and protocols
in Clojure I was a bit worried that library code might cause a similar
problem by redefining functions out from under me, by virtue of more
specific "overloading" but it hasn't been a problem yet and when I
look at how those features are used in various libraries, I'm no
longer so worried.
I have other reasons for not liking Ruby so it's ability to shoot you
in the foot like that doesn't change my opinion of the language (nor
does it change its widespread popularity for a certain class of
programmers / companies).
Overall then, modularity is hard and sometimes a shared / mutable
state solution is cleaner... And I agree with both points. Am I
missing something in your concerns?
It is?
Looks like about 1.4M lines of Lisp and less than 0.4 M lines of C.
[bsmith@pepper:~/w/emacs]
$ for x in h c el ; do printf ".%-2s: %7d lines in %5d files\n" $x
$(find * -name "*.$x" | xargs cat | wc -l) $(find * -name "*.$x" | wc
-l) ; done
.h : 37093 lines in 165 files
.c : 337489 lines in 199 files
.el: 1412477 lines in 1551 files
Not that 1.4M isn't large, but it's not 3M.
// Ben
It might be an interesting community exercise to examine the 23 GoF
patterns and discuss whether they are applicable in an FP world and,
if a pattern _is_ still applicable, what it would look like?
> A few people could spend a few tens of hours making things easier for
> everyone else, thereby saving thousands of man-hours (isn't this
> supposed to be what programming is about in the first place?), and yet
> it doesn't happen.
Really? It doesn't happen?
http://groups.google.com/group/clojure/browse_thread/thread/b87468adeffcd899
http://groups.google.com/group/clojure/browse_thread/thread/bdf5e874f5367b7e
http://groups.google.com/group/clojure/browse_thread/thread/b86a60e252031e74
http://groups.google.com/group/clojure/browse_thread/thread/eb259e999d381d5d
http://groups.google.com/group/clojure/browse_thread/thread/20d314bc0a23b574
http://groups.google.com/group/clojure/browse_thread/thread/48b8fcb3e9b30474
Maybe the twenty minutes spent drafting this voluminous post could have
been better spent doing something a bit more tangible to make things better.
-Phil
Does the term "tl;dr" mean anything to you? I doubt very many people
got that far in the wall of text you posted earlier, especially in
just the few hours it's been since you posted it.
Luc P.
--
Luc P.
================
The rabid Muppet
I'll remember this date - I find myself really liking / agreeing with
one of Ken's posts :)
Sorry nchubrich but that really was far too long - I started reading
but couldn't find any meat in the first few paragraphs and just tuned
out... I may try again later but if you can _summarize_ more ppl will
read what you're trying to say.
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/
Railo Technologies, Inc. -- http://www.getrailo.com/
On Wed, Jul 6, 2011 at 10:42 PM, nchubrich <nchu...@gmail.com> wrote:
> * Clojure still ends up turning off new users more than it needs to.
I think we need to nail the intro / setup experience and I'm nailing
my colors to Leiningen. I think that needs to be adopted as the
default, standard way to get up and running on Clojure and all the
official tutorials need to be updated to reflect that. It's the
biggest, single roadblock IMO and all that nonsense about downloading
ZIP files and running some specific Java command is a huge barrier to
entry. So far everyone I've introduced to Clojure has struggled with
the Java infrastructure stuff but has "got" Leiningen instantly.
> * It also can do a better job of attracting and retaining core
> contributors. I cited an example of someone who posted a patch to
> make refs persistent. She ended up being ignored, and left for
> Erlang. But Clojure needs people like her.
Unfortunate but all open source projects have a bar to entry and lots
of potential contributors get left by the wayside. I think Clojure
actually has a pretty good ecosystem around contribution. Could it be
better? Maybe. Could it maintain the high level of quality and still
be more inclusive? Hard to say...
> * Putting up barriers to entry is \not a good thing.
I think most people agree with that but the disagreement is on whether
Clojure really is putting up such barriers. I think that's debatable.
> * Since Lisp is highly extensible, in the long run being
> 'prescriptive' is a losing battle.
Again, I think this is a debatable point. I don't believe there is any
direct correlation between the prescriptiveness of a language /
framework and its success.
> * Clojure is already enough of a new way of thinking, and it may be
> simply too much at once for many people.
Aye, maybe. I don't think there's a gentle path tho'. FP is something
you just have to "grok". In some ways, if you want a middle ground,
there's Scala - a hybrid OO/FP language. I have to be honest and say
that after attending Scala Days recently at Stanford, I was even more
convinced Clojure was the right choice for World Singles (we tried
Scala first). I don't think that FP being "hard" is an issue tho' - OO
was "hard" for people back in the day.
> * It's meant to be a pragmatic language.
And I think it succeeds admirably here. We have an incredible
diversity of applications. With Heroku supporting Clojure - and some
great step-by-step tutorials for web applications (with databases) - I
don't think anyone can accuse Clojure of not being pragmatic. I'm
using Clojure for DB work, text file analysis, and all sorts of very
pragmatic, real-world stuff. It's a great language for general purpose
stuff.
> * The attitude that Smart People are precisely the ones who will want
> to deal with Clojure's existing drawbacks ends up excluding many great
> future Clojurians.
I flat out don't agree with this on any level. Clojure is pragmatic
and a wide variety of developers from all sorts of backgrounds are
picking it up and building real world stuff with it. It's not just
about "Smart People" nor about any subset of "Smart People".
> * Final (added) point: while it might have made sense to be
> 'prescriptive' initially in order to establish the identity, core, and
> soul of the language, this has been done sufficiently. Newcomers are
> not going to be confused about what the main points of Clojure are
> now. There is therefore less risk in making it broadly useful to
> different paradigms.
And I think the new process for moving contrib libraries forward
addresses that. I'm late to the game but folks I trust tell me that
contributing to the new contrib libraries is much easier and much more
open that the process around the old contrib libraries.
clojure.core.unify and clojure.core.logic are testament to serious
innovation within the core Clojure context.
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/
Railo Technologies, Inc. -- http://www.getrailo.com/
* Since Lisp is highly extensible, in the long run being
'prescriptive' is a losing battle. It is better to eventually add
standard 'bad' features to the language than to tempt third parties to
do it in even worse and incompatible ways.
* Clojure is already enough of a new way of thinking, and it may be
simply too much at once for many people. If a gentle path gets more
people into the ecosystem, it's worth it----once they are in Clojure
they can be steered towards better, more functional ways of doing
things. In any case, experienced users are always free to ignore
extra features.
* It's meant to be a pragmatic language. This means that a prime goal
should be to get people writing useful (web, GUI, shell) code in it
right away. Having choices is good, but being forced to make all
these choices your first day of writing Clojure, when you don't have a
"sixth sense" about the community and What Really Works, is needlessly
discouraging.
* Final (added) point: while it might have made sense to be
'prescriptive' initially in order to establish the identity, core, and
soul of the language, this has been done sufficiently. Newcomers are
not going to be confused about what the main points of Clojure are
now. There is therefore less risk in making it broadly useful to
different paradigms.
It may be that I am really talking about the website (clojure.org, not
any of the auxiliary ones, which are a bit of a mess in themselves)
more than the language itself. If people receive the \right
instructions, setting up Emacs/Leiningen/Web servers etc. is actually
not so hard. The trouble is that all of this information is currently
scattered to the four winds (I include things like the Paredit cheat
sheet, Slime commands, which Emacs to use, etc.), and I don't think we
should rely on users to pull this information together themselves----
and at any rate, why should they?
* It also can do a better job of attracting and retaining core
contributors. I cited an example of someone who posted a patch to
make refs persistent. She ended up being ignored, and left for
Erlang. But Clojure needs people like her.
...
For instance, a little while ago I was corresponding with someone who
had released a patch to Clojure. (This was Alyssa Kwan, in case you
want to look up the thread.) Her patch made refs persistent to
disk----something that seemed very much in the spirit of Clojure.
Dealing with disk persistence in a production-ready way may be its own
discipline, but in a language that wishes to "reduce ceremony", there
is no reason that you should have to worry about which database to use
when you merely want to write a program that remembers data when you
re-start it. The interface needed to do this is \almost there.... It
seemed an eminently useful thing, but it got posted to this list and
sank without a trace. Nobody from Core ever contacted her. (She
admitted it was a "hack", but isn't that how all patches start out?)
> And as to improving
> documentation, how is one to go about doing it? This would be an
> excellent area to have some community effort on, especially from
> relative beginners, and that is an itch I would not mind scratching.
Stuart Halloway responded about how to contribute to the "Getting Started" documentation.
If you want another place for language documentation, take a look at ClojureDocs.org. Anyone can sign up and contribute examples and usage notes.
Steve Miner
I think one sticking point here is that there are (so far) seven
IDEs/editors listed and five build tools. For a n00b, that's too much
choice. There have been discussions about
http://clojure.org/getting_started in the past but it's still showing
the (fairly horrible) instructions that start with talk of a source
code repository, a ZIP file and bytecode generation(!).
There needs to be a decision by the core team on a single,
recommended, _simple_ getting started process and update that page to
show that (please: lein). Beyond that simple process, it can point to
the dev wiki with the list of IDEs and build tools.
The problem here is there needs to be more proscription around Getting
Started so n00bs aren't completely confused by either the primitive
instructions (clojure.org) or overwhelmed by choice (dev.clojure.org).
> (2) Link to the official docs, and help us do the same. clojure.org has a
> slower update process than the dev site (by design!) but if there is
> something wrong, or a place where it needs to link out, please let us know!
See above. Suggestions have been made about making
clojure.org/getting_started better :)
> (3) Encourage people who wrote a blog post 18 months ago that is now filled
> with misinformation (as things have moved on) to go back and add a link to
> the official docs.
Definitely a good point. I'll go back over my blog posts for Clojure
and update anything that's wrong (I think I already updated some of my
Getting Started stuff but I'll double-check).
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/
Railo Technologies, Inc. -- http://www.getrailo.com/
Am 07.07.2011 um 21:54 schrieb Sean Corfield:
> I think one sticking point here is that there are (so far) seven
> IDEs/editors listed and five build tools. For a n00b, that's too much
> choice.
I'm always bewildered by this argument. What has a newbie to choose here? Of course he uses what he's used to. Many Java devs probably want one of the IDEs they already know. Old-time Lispers use emacs.
I don't read this information as “Look, newbie, there is emacs, or eclipse, or vim, which you can use to edit Clojure code. And you can build clojure stuff with leiningen, or with gradle, or with maven.” I see this list as: “I'm used to maven and eclipse, let's see how I get this running with the tools I know already.” Isn't that the most natural thing someone would try to do?
Sincerely
Meikel
And yet the #1 "FAQ" we see on lists and reflected in blog posts is
about getting Clojure up and running... We see Java developers,
committed to their favorite IDE, still asking "Should I install /
learn Emacs?" We see old-time Lispers, happy with Emacs, struggle with
the Java infrastructure. A lot of n00bs want to be told the "One True
Way" to set up their development environment - they don't want to be
confronted with choices.
Like you, I don't entirely understand why this is an issue - but I
accept that it clearly _is_ an issue...
For me at least the issue isn't that there should be a single blessed setup, but rather that there should be at least one setup (and documentation for that setup) that's a little more newbie-friendly than any of them currently are.
The available options are definitely getting better (and by "the options" I mean not only the software packages but also the installation recipes etc., although a lot of this is scattered) but in my experience and for my purposes, which include teaching, they all still have some rough spots.
On the emacs/lein option I think the main problem is the messiness of the installation and configuration process. If code/instructions were available that reliably produced a full and reasonably configured emacs/slime/lein setup, on most common platforms, with a single download and double click (or something not much more complicated), then this would be a more attractive option.
-Lee
How about:
GETTING STARTED
If you're coming from a Lisp background, or at least are familiar with
emacs _here is how to set up with emacs and leiningen_.
If you're coming from a Java background, _download Eclipse and CCW_ or
_download NetBeans and Enclojure_.
If your programming experience lies elsewhere, or you're new to
programming altogether, _insert something here_.
The last one is maybe the trickiest. Best might be a good text editor
for programming that isn't Emacs, combined with leiningen. Someone had
been working on a lightweight Clojure IDE/editor here recently but I
don't know the current status of that. Notepad won't cut it and it
should follow normal GUI text editor conventions. All of the
programmers' editors I know of are either the one built into NetBeans,
the one built into Enclojure, emacs, vi, something that imitates
emacs, something that imitates vi, abandoned, or non-free, though.
> On the emacs/lein option I think the main problem is the messiness of the installation and configuration process. If code/instructions were available that reliably produced a full and reasonably configured emacs/slime/lein setup, on most common platforms, with a single download and double click (or something not much more complicated), then this would be a more attractive option.
I'm not so sure. For newbs to it, emacs has a steep learning curve
even if you avoid any installation hiccups. On the other hand, for
emacs old hands the current rocky road to configuring
emacs/slime/swank-clojure/lein/etc. to play nice with one another is
the sort of thing they've been coping with for years and in some cases
even decades; one might argue "they can take it". Of course, emacs
setup for Clojure that works painlessly out of the box wouldn't be a
bad thing, but I'm not sure it's a priority compared to getting a
truly newbie-friendly installation option up there and documented for
people that would be intimidated by Eclipse and Netbeans and would
have kittens if suddenly confronted with emacs. :)
I'd like to hear more about this IDE/editor if it's still a going concern.
I tried to find an editor for a setup like this but was unable to find one that really fit the bill, with a major sticking point being what I consider minimal Lisp editing features: bracket matching and language-aware auto-re-indenting (and syntax coloring wouldn't hurt).
> I'm not so sure. For newbs to it, emacs has a steep learning curve
> even if you avoid any installation hiccups.
Certainly true, and this is one of the other reasons that I taught with Eclipse/CCW rather than an emacs setup last year. But with a well-configured modern emacs some of this can be ameliorated; e.g. there are Mac versions in which you can use multiple windows for different buffers in an OS native way, and use OS native navigation techniques, and find commands in menus, etc. My dream installer would produce as friendly a setup as possible, with versions for most common platforms, and if this existed then I think that students could go from zero to knowing what they need to know for an edit/run cycle on this setup in one session. Yes they could spend years mastering it, but they could do real work without mastering it or knowing anything about how to tinker with it.
I agree that the emacs interface learning curve would be the roughest spot in this particular setup, but I think it would be manageable and worth it to get the positives.
> Of course, emacs
> setup for Clojure that works painlessly out of the box wouldn't be a
> bad thing, but I'm not sure it's a priority compared to getting a
> truly newbie-friendly installation option up there and documented for
> people that would be intimidated by Eclipse and Netbeans and would
> have kittens if suddenly confronted with emacs. :)
A lot of the bad complexity of Eclipse (and I guess Netbeans, though I have less experience there) has to do with things that will be handled elegantly by leiningen from the command line in an emacs/lein setup.
I guess I would rank the emacs/slime/lein installation/configuration problem as a high priority because I think that solving it would produce a good way for newbies to get started with just one step (with the downside of the emacs interface learning curve, to whatever extent that can't be addressed via configuration) while also providing an environment that works well for advanced users. At least in my own case I'm pretty sure that if the emacs/slime/lein installation/configuration problem was really solved well then I would switch to that as my teaching environment (and also as my research coding environment).
BTW I'm an old lisper who has lived a lot in emacs but I've mostly avoided having to tinker with it, so the hoops that I had to jump through to set things up for Clojure didn't come naturally to me. Part of this is probably because I spent a fair amount of time using Lisp machines and then a long stretch using MCL which had the wonderful FRED (FRED Resembles Emacs Deliberately) editor that combined all of the power of Emacs with single-drag installation and a thoroughly OS (Mac) native interface. FRED still lives on in some forms, including MCLIDE, which has Clojure support (but it's Mac only and has some other issues).
-Lee
There are people that would kill for a Windows port of emacs that let
you navigate, find capabilities, and find out about shortcut keys in
an OS native way. Especially if it came with OS native help you could
use the OS native help browser to browse. :)
Well, at the very least, there are people that might actually try
emacs (or try emacs again) if such a thing existed, but not
otherwise...
> My dream installer would produce as friendly a setup as possible, with versions for most common platforms, and if this existed then I think that students could go from zero to knowing what they need to know for an edit/run cycle on this setup in one session. Yes they could spend years mastering it, but they could do real work without mastering it or knowing anything about how to tinker with it.
Yes, a problem with emacs is that it doesn't follow either of the
usual patterns. Some apps have a learning curve that's gentle, then
plateaus -- simple things like Notepad. Others have one that starts
out gentle and then takes off like an exponential function graph --
it's easy to become productive at simple tasks with these, but you can
also do more wizardly things with time and practice. The easy part
also gives you a "beachhead" in its territory; no matter how complex
the advanced features are, at least such basic things as locating and
searching the documentation, changing the advanced feature's settings,
the general navigation mechanics, etc. are familiar, giving you a
starting point.
The emacs learning curve, by contrast, is like a sheer cliff of solid
ice without hand or foothold. :)
> A lot of the bad complexity of Eclipse (and I guess Netbeans, though I have less experience there) has to do with things that will be handled elegantly by leiningen from the command line in an emacs/lein setup.
Yes, possibly. Would that the Eclipse/CCW modern graphical editor,
namespace browser, REPL, and other features could be used with lein
instead of Eclipse's own build configurators.
> I guess I would rank the emacs/slime/lein installation/configuration problem as a high priority because I think that solving it would produce a good way for newbies to get started with just one step (with the downside of the emacs interface learning curve, to whatever extent that can't be addressed via configuration)
That's not a "downside", that's a pit full of sharks with lasers on
their heads, at least from your hypothetical newb's perspective,
unless it was really REALLY tamed. That Mac version MIGHT do it, but
only for Mac users and only if OS-native shortcut keys for common
tasks (save, save as, change to mru nonfocused window, cut, copy,
paste, undo, redo) are supported or an installer can easily configure
that. Nothing will annoy a new user of the app that isn't new to the
OS more than being tripped up if they try to use keyboard shortcuts
instead of the mouse to get a task like that accomplished. Oh, and I
do hope clicking, click-drag-selecting, and so on in the editor
windows would not violate Least Surprise either. With ports of
nonnative software you often can't even count on that. That and
command-X not being bound to "format filesystem" instead of "cut" are
the most crucial I'd think there.
Windows users, OTOH, will apparently be SOL for the foreseeable unless
you have an alternative Windows editor that'll do and is sufficiently
native in its UI behavior.
> BTW I'm an old lisper who has lived a lot in emacs but I've mostly avoided having to tinker with it, so the hoops that I had to jump through to set things up for Clojure didn't come naturally to me. Part of this is probably because I spent a fair amount of time using Lisp machines and then a long stretch using MCL which had the wonderful FRED (FRED Resembles Emacs Deliberately) editor
Ah, the familiar hacker GRAT (GRAT Recursive Acronym Trick). Gotta
watch out for that. :)
> that combined all of the power of Emacs with single-drag installation and a thoroughly OS (Mac) native interface. FRED still lives on in some forms, including MCLIDE, which has Clojure support (but it's Mac only and has some other issues).
Why are the poor Windows users left out?
For that matter, why are the poor Gnome/KDE users, many of them
Windows refugees that want a GUI and applications that act Windowslike
(minus all the crashing and viruses), left out?
How about:
GETTING STARTED
snip
If you're coming from a Lisp background, or at least are familiar with
emacs _here is how to set up with emacs and leiningen_.
> On the emacs/lein option I think the main problem is the messiness of the installation and configuration process. If code/instructions were available that reliably produced a full and reasonably configured emacs/slime/lein setup, on most common platforms, with a single download and double click (or something not much more complicated), then this would be a more attractive option.
On the other hand, for emacs old hands the current rocky road to configuringemacs/slime/swank-clojure/lein/etc. to play nice with one another is
the sort of thing they've been coping with for years and in some cases
even decades; one might argue "they can take it".
Yeah, but there are a lot of sharks in these waters, and FWIW an improvement on the emacs/slime/lein installation/configuration front would make that the clear winner for me, lasers and all. I'm currently leaning this way anyway for the fall semester, inspired in part by Sam Aaron's setup and video (http://vimeo.com/25190186). Also FWIW our classroom/lab is mac based, although students have a mix of platforms and they'll have to set things up on their own machines too.
-Lee
I disagree. This is a subject of religious debates that I don't want to get into in detail, but FWIW this educator thinks that Lisp is a perfectly defensible first language and that Clojure can serve the purpose quite well as long as installation and tooling doesn't make it unnecessarily difficult to write and run code.
> - If you come from python/ruby and have no java background, do not
> expect to start "hacking" clojure in the morning and be "productive"
> and accomplishing work in the afternoon of that same day; go learn
> java for a while first (a few months at least). Also, continue using
> whatever it is you use now till you're confident you know enough to
> jump ship.
> - we can't teach you java, please go learn java for a while if you
> have no java experience, there are tons and tons of tutorials and
> books on teaching you java.
Disagree and disagree. One can do a lot in Clojure with almost no knowledge of the Java language or the Java ecosystem. At least for the kinds of things that I do. Yes, I occasionally need to use an interop form for something for which there's no Clojure version, but for me that's rare and easy to pick up on a case by case basis without being a Java programmer.
> - if all you need is a "hello world" program, there are simpler
> languages for this purpose (python etc). Consider clojure if you have
> need for java apis or concurrency needs (concurrency is an advanced,
> low level topic and not something most programmers should concern
> themselves with).
Disagree. Nobody *just* wants to write "hello world," of course, but Clojure can be a great language for many people who have zero need for Java APIs or concurrency. I use/teach it because of all of the great features of Lisps more generally, and because Clojure is the best Lisp going (IMHO).
> - and so on... I think it's important to have such caveat emptors, it
> seems many of the complaints relate to expectations mismatched to
> reality
Maybe, but since I disagree with every one of your caveats I wouldn't advocate making them :-0.
-Lee
May I also add the following caveat emptors:
- If you're new to programming, clojure will overwhelm you. Start with
something like python.
- If you come from python/ruby and have no java background, do not
expect to start "hacking" clojure in the morning and be "productive"
and accomplishing work in the afternoon of that same day; go learn
java for a while first (a few months at least). Also, continue using
whatever it is you use now till you're confident you know enough to
jump ship.
- if all you need is a "hello world" program, there are simpler
languages for this purpose (python etc). Consider clojure if you have
need for java apis or concurrency needs (concurrency is an advanced,
low level topic and not something most programmers should concern
themselves with).
And this is the crux of the issue. It's the installation and tooling
that's killing Clojure, ATM. Okay, killing is a strong word..but
perhaps killing it for the newbies. Let's say I want to install some
OpenGL libs for Python...I go and install Python. On Windows this is a
simple .exe installer. This puts python into a location on my drive
that makes sense (c:\Python27), and in there I see
(c:\Python27\python.exe). If I run that program, HEY!, I get a REPL.
Now I want to install opengl...so I find pygame...download the .exe,
and run it. The installer finds my Python directory, and after install
I just have to re-load my REPL.
Now compare that to Clojure. I know Clojure does what it does for a
reason, but let's be honest. First I have to download the JDK (and I
have to know what that is), then I have to download something like
lein, and add it to my command path. From there I have to figure out
what on earth a project.clj file is, and what the contents mean. Then
I can do lein deps, and then lein repl. Yay! I have a repl. Now I want
to install OpenGL. That involves some interesting magic with clojars,
lein and other such tools.
As a quick compare...
Python:
python->pygame
Clojure:
JDK->lein->clojure->penumbra
So over all yes, I think Clojure is just fine as a "first language",
but it's horrible as a "first installed language".
Timothy
> On Jul 8, 2011, at 2:39 AM, Ken Wesson wrote:
>>
>>> (with the downside of the emacs interface learning curve, to whatever extent that can't be addressed via configuration)
>>
>> That's not a "downside", that's a pit full of sharks with lasers on
>> their heads, at least from your hypothetical newb's perspective,
>> unless it was really REALLY tamed.
>
> Yeah, but there are a lot of sharks in these waters, and FWIW an
> improvement on the emacs/slime/lein installation/configuration front
> would make that the clear winner for me, lasers and all.
Have you tried the Vagrant approach? It's a one-button
Emacs/Clojure/Leiningen hacking VM setup[1]:
https://github.com/Seajure/emacs-clojure-vagrant
-Phil
[1] - provided you have virtualbox.
I haven't, although I've been watching the list traffic on this. Now I see that I must. I will!
Thanks,
-Lee
>
> Have you tried the Vagrant approach? It's a one-button
> Emacs/Clojure/Leiningen hacking VM setup[1]:
>
> https://github.com/Seajure/emacs-clojure-vagrant
>
> -Phil
>
> [1] - provided you have virtualbox.
That is still not as easy as python. Running VM is a bigger overhead...
regards
Vivek
--
The hidden harmony is better than the obvious!!
> That is still not as easy as python. Running VM is a bigger overhead...
There are different kinds of overhead. If the installation and setup of the VM is simple and bullet proof then this is acceptable overhead for me.
On the other hand I just tried it and while the first two steps were fine (installing virtualbox and the extension pack) I then got:
lee-spectors-macbook-pro:Seajure-emacs-clojure-vagrant-9a47c23 leespector$ gem install vagrant
WARNING: Installing to ~/.gem since /Library/Ruby/Gems/1.8 and
/usr/bin aren't both writable.
WARNING: You don't have /Users/leespector/.gem/ruby/1.8/bin in your PATH,
gem executables will not run.
Building native extensions. This could take a while...
ERROR: Error installing vagrant:
thor requires RubyGems version >= 1.3.6
This is on a macbook pro running os x 10.8.7.
-Lee
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
> It looks like you haven't got enough privileges, try "sudo gem install vagrant"
Thanks. That solved some of the problems (and I would suggest that sudo be added to the vagrant readme instructions) but I still get:
ERROR: Error installing vagrant:
thor requires RubyGems version >= 1.3.6
So I guess I need to track that down...
-Lee
ERROR: Error installing vagrant:So I guess I need to track that down...
thor requires RubyGems version >= 1.3.6
Totally disagree. Lisps have been many people's first introduction to
programming over several decades and it works extremely well as an
introductory language. Very simple syntax, simply data structures,
consistent semantics. If you're new to programming, Lisps are just
about the simplest languages you can pick up.
Now, Clojure does require that a JVM is installed. So do any/all of
the JVM-based languages so I think that's really neither here nor
there. Installing a JVM is not a big deal.
All of the "ceremony" around the JVM is completely hidden by Leiningen
- no need to understand classpaths or Java runtime commands / options
and no need to deal with dependencies, other than adding them to
project.clj. So one simple download (the 'lein' script), one setup
command ('lein self-install' - ok, maybe you need to make lein
executable). Now you can hack Clojure with almost no ceremony: lein
repl and off you go. Want code in files? lein new scratch; cd scratch;
edit src/scratch/core.clj and off you go.
Read my blog post (written a year ago; updated several times to ensure
it works with newer versions of Clojure and Leiningen):
http://corfield.org/blog/post.cfm/getting-started-with-clojure
Now replace clojure.org/getting_started with something like that and I
think most of the complaints would go away. No one needs a fancy
editor / IDE setup to use Clojure - the key is just getting it
installed and then a REPL to experiment and a way to run Clojure
scripts easily from the command line.
That blog post has gotten a lot of people up and running - with
varying degrees of programming skills and varying degrees of Java/JVM
knowledge (from zero to expert in both areas).
It was 1.3.5.
>
> To upgrade rubygems, use
>
> [sudo] gem update --system
Thanks so much. I've now successfully upgraded rubygems and completed the "sudo gem install vagrant" step without error.
I will take the next steps shortly.
Is this an okay place to make suggestions about the vagrant readme? In addition to adding "sudo" I would suggest adding an explicit step with links/instructions for installing or upgrading rubygems.
-Lee