Clojure 2011 Year in Review
stuartsierra.com
stuartsierra.com
Having said that, could you do a remix of the Noir-blog example that uses Korma as the data layer :)
It is a nice lispy wrapper over Swing for writing GUI apps (in a fairly declarative style).
Also the material is very dry. If you have never programmed in a Lisp language before it all looks greek and latin. This tends to be a problem with most Lisp books. They very soon go into the great aspects of Lisp.
As a beginner, I need to be shown how to do the regular stuff in Lisp. Like other languages tutorials.
One of the reason I like Python is really for the awesome documentation on their website.
Now the thing about clojure, is due to sheer interest and passion alone. I am being forced to take additional pain to continuously search and learn. Others may not do the same. If the barrier to entry is too high, you will scare away new comers. Especially Lisp new comers.
All Advanced Hackery is OK, but teach me the basic stuff first. I need to learn the if/else, for/do/while , functions, IO, regular expressions, Battery usage, socket etc kind of stuff.
After I'm through with this, you can rant as much about macros as you want, and I'm all ears.
But directly going to all this advanced hackery without me even knowing how to do my day-to-day tasks is what has kept Lisp in the lower side of usage.
It will be sad if clojure goes down this route.
You might give 4Clojure a try[1]. It's a series of programming problems that in the process of challenging you attempt to teach you the syntax and usage. It starts off very basic so even if you know no programming at all it may still be useful.
Do you seriously expect me or any other serious programmer in a business environment sorting a million integers in a million different ways?
How do I open files, how do I search what I want through regexps? How do write back? How can I build socket based programs? How can I interact with databases? How can write to log files? How can I work with business logic? How do I interact with webservices? API's? How to I work with operating system commands? etc stuff.
I make a living programming for those sort of stuff and wish to leverage any language in that direction.
Perl, Python tutorials teach me to do real work in a real production environment now. Not mathematics for my college assignments.
I hope you are able to understand. If that stuff is absent, I have to now take the pain of figuring that out myself.
Well my apologies for not immediately understanding your specific situation... I can assure you I meant it as a kind suggestion.
Perhaps you could look at Clojure In Action[1]? It's supposed to be a pragmatic introduction for people with some existing programming experience. From the Amazon page, "is a hands-on tutorial for the working programmer who has written code in a language like Java or Ruby, but has no prior experience with Lisp."
[1] http://www.amazon.com/Clojure-Action-Amit-Rathore/dp/1935182...
Clojure is not python and not java, the fundamental concept is diffrent. If you allready understand these concepts just go to github and look at the librarys for logging, databases and other stuff. How to use a library you can learn looking at the documentation of the library, learning how to programm idiomatic clojure needs some training.
It's sorta possible to get around with pure Clojure, but not very practical.
Leiningen is the de-facto package manager so use that for everything. Clojars and Maven are the two repositories.
"Do you seriously expect me or any other serious programmer in a business environment sorting a million integers in a million different ways?" well...Yes!!...today almost any app need than you work with thousand data...unless your goal be write javascript widgets or client side apps..you will need know how work with big data, how transform this and analize it...
I work with ruby, javascript (and coffeescript) and now I'm using clojure and haskell..and now I'm impressed how I can write many things than in imperative or procedural langs could take many lines in functional langs it takes me 2 or 3 lines..and they are very clear and self explicit
You can criticize it for being too much to learn, if you like, and keep writing Perl and Python. That might be a fair criticism, insofar as it would be nice to have a better-paved road to mastery coming from the land of imperative languages. But you can't criticize it for being abstract or unnecessary for programming in Clojure. It is not.
http://java.ociweb.com/mark/clojure/article.html
..to been a nice soft introduction. Now I'm intending to go through The Joy Of book, but with more familiarity than last time I tackled it (and fell flat on my face!).
Yes, it's dry, but it's also very straightforward. Using the repl in another window while looking it over was key though. It really does become much more clear what's going on when you manually type everything out, and then poke bits of it with a stick until it clicks.
I am facing the same problem. I tend to run into that problem, because the moment I see some non regular programming aspect being discussed at length it becomes a little boring. Also I can't co relate that with my practical experiences.
I enjoyed functional programming thanks to Mark Jason Dominus's "Higher Order Perl". Which taught me all functional programming stuff in the most pragmatic way out.
Now that is what I look for, material that teaches me all this great stuff in the framework of my real work. Then it becomes really enjoyable and graspable.
This is the first lisp that has started to click for me.
> Unfortunately the learning material online is very
scanty.
> All Advanced Hackery is OK, but teach me the basic stuff
first.... If the barrier to entry is too high, you will
scare away new comers.
I attempted to address that very need in one of my blog posts http://blackstag.com/blog.posting?id=5 and there are many other community contributions listed here: http://blackstag.com/blog.posting?id=23. Personally I think there has been an overwhelming amount of community contribution - to a point I would find it difficult to agree with your comments.I think it's a good way to get acquainted with the general use and syntax.
Right now I'm implementing resolutions for problems from Project Euler (http://projecteuler.net/) as a more hand-on practice.
>> All Advanced Hackery is OK, but teach me the basic stuff first. I need to learn the if/else, for/do/while , functions, IO, regular expressions, Battery usage, socket etc kind of stuff.
Keep in mind that Clojure/Lisp comes from a functional paradigm and so you won't find a lot of constructs that you might think are the starting points in imperative languages.
So if you come from an imperative language, like me, learning Clojure is not just learning Clojure, but a bigger dive in a different programming paradigm too.
I had some background in sundry Lisps, but my stumbling block was my lack of knowledge about the JVM and things Java. You really do need some experience in the ecosystem, else Clojure discussions about boxing, interfaces, AOT, stack traces, what-have-you will be mystery meat.
http://stackoverflow.com/questions/4741626/what-parts-of-the...
http://stackoverflow.com/questions/4230746/does-being-a-comp...
http://marxsoftware.blogspot.com/search/label/Java%20%28Gene...
(Bytecode for dummies, the Hotspot switches post are terrific)
http://stackoverflow.com/questions/5721496/learning-java-so-...
http://www.theserverside.com/discussions/thread.tss?thread_i...
The problem is that a very basic, idiomatic solution to an everyday problem in a lisp will utilize things like recursion, macros or higher order functions that you really need to understand first. Lisp is not just another programming language, it is another genre of programming language and you need to spend a bit of time understanding the fundamentals before digging into code. Otherwise it'd be like trying to learn Java without knowing what a class is.
So, most Clojure tutorials intended for non-lisp programmers start with language basics. I agree that there's a slight shortage of "cookbook-style" Clojure tutorials/examples out there, but most people find that once they "get" Clojure, via the basic tutorials, it's fairly straightforward to read and write. The lack of exampless for particular tasks doesn't seem to be an obstacle for most people.
The thing is, these are different in Clojure than in various other languages (although more in common with other Lisps). Constructs like "if" are expressions which return values, which will confuse you the first time it comes up if you don't realize that everything is an expression.
Then there's "for/do/while", where "for" in Clojure is not a loop at all because it produces a lazy sequence. And the equivalent to "do/while" (loop/recur, which enforces tail recursion) is something of a last resort where other sequence functions have failed.
I agree with you 100% that the learning material is a little dry. I don't know what kind of material would work best...