News for hackers. Stuff that matters.
Re:Clojure: The JFDI language by wuschel on Thursday November 28, 2013 @09:17AM (#6814564)
(Disclaimer: I am a python that found a new home in the scheme world)

Clojure is a Lisp. Lisp based languages are great.

However:

One of the problems with clojure - or rather with its home or ecosystem - is the fact that it requires a very high activation energy to get going. Grasp the concept of functionial programming, cc/call, macros, totally different syntax than your previous imperative language of choice, and last but not the giant blob that is called Java platform with all the traps regarding project management, IDEs, building, compiling, deploying etc. I know that there are great tools such an Leiningen or LightTable, but they only make the whole process of transition more manageable.

Now, I know that Java is a huge benefit for all that want to make use of its gazillion tools. But if You are not into Java, then Clojure might give you some hickups.

In comparison to Clojure, Python also allows for some functional programming, gives the eager disciple an easy going start. Most of libraries are written in Python (or exist in a fast, a C-esque implementation) and are very easy to grasp. I can not say that for the Java enviroment Clojure has been born into.

I frown at java lingo error tracebacks in the REPL, and to bring a external Java library into play is even more problematic. Any thoughts on this how to remedy this problem without getting involved into Java?

I wish there would be some kind of Index of how to use certain Java libraries from Clojure, or an index of Clojure wrapping packages. It might make life a bit easier.

Finally, I claim that for now, I am quite happy with my choice to migrate from Clojure to Chicken Scheme/picolisp. You can get quite a bunch of Clojure data types from the good package repository. It compiles without setting your hair on fire. And it is really simple, as the language basics are small.

I will keep an eye on Clojure. but I must say that Julia is as appealing to me when it comes to the choice of future language.

Re:Clojure: The JFDI language by jamesjporter on Thursday November 28, 2013 @10:23AM (#6814865)
Julia is a really cool language; I came to it from a python background and in a lot if ways it feels like "python done right"
Re:Clojure: The JFDI language by minikomi on Thursday November 28, 2013 @10:29AM (#6814893)
Please drop by the racket world sometime. The documentation is fantastic :)

Can you recommend a good picolisp resource?

Re:Clojure: The JFDI language by john2x on Friday November 29, 2013 @12:39AM (#6818030)
Agree on the Java ecosystem. I deployed a toy app using Tomcat a couple of months ago, and now I have no idea how to update it. I lost the "tutorial" I found and can't remember what it was (stupid mistake), but still, the fact that I had to resort to a pretty unknown tutorial to deploy something shows how desperate I was.

I'm looking for another language with similar philosophy to Clojure's, but with a better ecosystem.

Re:Clojure: The JFDI language by chc on Friday November 29, 2013 @01:09AM (#6818108)
FYI, you could have just used http-kit. If you don't want an enterprisey ecosystem, don't use the enterprisey stuff. That's how I use it.
Re:Clojure: The JFDI language by john2x on Friday November 29, 2013 @01:36AM (#6818180)
Hmm not really clear what it's for. Is it a replacement for Jetty/Tomcat?
Re:Clojure: The JFDI language by chc on Friday November 29, 2013 @02:02AM (#6818228)
http-kit lets you run your own app server like Node.js does instead of sticking it in a servlet container. You just call run-server and you've got a working web app. So yeah, basically a Jetty replacement, but it's less tied into the Java ecosystem and more into Clojure.
Re:Clojure: The JFDI language by john2x on Friday November 29, 2013 @02:43AM (#6818303)
Oh ok. Not familiar with Node.js but if it means getting out of Java then definitely worth a deeper look. Thanks. Have any links to quickstart type tutorials? Something that allows someone to deploy a (toy) webapp?
Re:Clojure: The JFDI language by danneu on Friday November 29, 2013 @12:01PM (#6820105)
Clojure has a simple scratch->toyapp->deploy workflow. It's just that to find it as a newcomer, you either:

A. Luck out and find it immediately.

B. Get directed to it by someone more experienced.

C. Chase a suboptimal solution because you don't know better. You simply don't know there's an easier workflow. You don't know you can eval code within an editor. You don't know there are tools like paredit or how they'd help you.

For toy webapps, it's good to know these incantations:

    lein new compojure myapp (creates webapp skeleton)
    lein ring server (starts embedded server for dev)
Here's the live demo of a dumb app I threw together to take an IRC joke too far: http://www.danneu.com/spinners/

And here's the Clojure code: https://github.com/danneu/spinners-as-a-service/blob/master/...

To deploy it, I rsync the repo to a remote server, run `lein uberjar` remotely, and launch the uberjar.

That repo shows how to use Compojure for routing, Hiccup for html, Clojurescript, and a few incantations (like `:genclass`) to get it working.