5 ms·
I don't know what's wrong with me but I gave Clojure 3 tries in the past and every time I try to actually build something (aside from 4clojure and solving hacke
by decebalus1 10y ago
I don't know what's wrong with me but I gave Clojure 3 tries in the past and every time I try to actually build something (aside from 4clojure and solving hackerrank problems with it) I get lost in the tooling and just give up then fallback to familiar frameworks\languages.
It just doesn't click with me and the whole leinengen\ring\compojure just seems weird and backhanded.
- bmillare 10y agoI've found boot http://boot-clj.com/ http://boot-clj.com/ to be a better than leiningen for tooling. There's no magic, just simple scripting.
- atarian 10y agoIt's not just you. I also find it very difficult to make anything useful with Clojure outside of practice problems.
- mac01021 10y agoWhat have you tried to make?
- madmax96 10y agoMind if I ask what isn't clicking? I've had the exact opposite experience, and have found it very easy to incorporate different libraries. Do you have experience with other lisps? There's certainly a learning curve with clojure and its frameworks.
- throwaway7645 10y agoEverything assumes you're a Java expert.
- justinhj 10y agoI think that's fine. I wouldn't recommend serious use of a language that targets the jvm without a decent knowledge of Java
- cutler 10y agoI came from Perl with zero Java when I learned Clojure and found it very easy. That was 3 years ago and apart from the occasional Integer/parseInt I've hardly ever needed to dip into Java. As Clojure is a dynamic language it's a much cleaner departure from Java than Scala or Groovy where OOP still plays a big part. Clojure can be a truly liberating experience if you've spent most of your programming life working within the OOP straightjacket.
- throwaway7645 10y agoLegacy Perl or Modern Perl with Moose, DBIx::Class, Catalyst...etc? Just curious.
- cutler 10y agoMostly modern Perl but I was happy without the OOP so Moose and friends were no big deal for me. Catalyst I always considered a lumbering beast with no chance of competing with Ruby on Rails. I'm saying Clojure was easy for me because I'd favoured the procedural Perl way for many years so wasn't so infected with the OOP mindset.
- pjmlp 10y agoJust like to use UNIX one needs to be comfortable with C, OS X comfortable with Objective-C, .NET confortable with C#, Web confortable with JavaScript and so forth. When one needs to look under the hood to solve performance or FFI issues, it is a requirement to know the "systems" language of the host platform, regardless how much we might love/hate it.
- WillPostForFood 10y agoI think there is too much cognitive load in the first stages of learning Clojure for people who haven't had experience with functional programming, Lisps, Java, and Emacs on top of that if you are following Clojure for the Brave and True. So to barely get started you are tackling a new programming paradigm (functional), a new syntax (Lisp), getting error messages in Java, using tools that are complicated to setup and use. I think a lot more people would take on learning the language if the day 1 experience was more friendly. Simple tooling, simple install, simple error messages. Something more like Racket offers. Then the initial learning could be more focused on functional programming, and the syntax, which is more rewarding.
- pgt 10y agoI still teach in and prototype in Light Table, even though it is losing its "instarepl". Live evaluation visually matched up to an expression removes a lot of the cognitive load. Clojure stack traces are a big mental overhead.
- zdkl 10y agoThis. I wish the book would refer to lighttable instead of emacs so as to be considerably more portable and easier to get into. I recommended that combo to a non technical friend and he's happily scooting along after a short primer on (lein) repl vs (windows) command prompt vs lighttable inline evaluation
- tosh 10y agoAtom and the ProtoREPL package also make a great Clojure environment. https://gist.github.com/jasongilman/d1f70507bed021b48625 https://gist.github.com/jasongilman/d1f70507bed021b48625
- WillPostForFood 10y agoI've tried just about Clojure IDE/editor, and this is probably my favorite. But still I think it is tough for a beginner. 9 packages to install, editing config files, the ProtoREPL tutorial doesn't include Mac keystrokes. The problem for a beginner is you follow all these steps and you don't if you are doing it right - there is no feedback. Once it is up and running, it is really nice. To be beginner friendly, it would be good to have a packaged installer that pre configures and installs everything, or a single Clojure/ProtoREPL package that could be installed in Atom that includes all the dependent packages, and config changes.
- deleted 10y ago[deleted]
- deleted 10y ago[deleted]
- JamesLeonis 10y agoClojure's community tend to shy away from larger frameworks in favor of small libraries. While this makes it flexible, it certainly is daunting to get into. We also know there is a struggle on the documentation front, and many of us are working to bring both the official documentation and the individual lib docs more friendly. But if you want to see how to build a larger webapp, the Luminus project [1] is an excellent source of documentation for how to build web applications with Clojure. I would also recommend the r/clojure subreddit where many of the library authors hang out and help new users of Clojure. We often have a "New Users: Ask Us Anything" thread. [1] http://www.luminusweb.net/docs http://www.luminusweb.net/docs
- pimeys 10y agoI have exactly different feeling about the language. When my boss wanted me to try Clojure to build a quite boring and normal REST api, it took about a day to get up to speed and I've never been more productive with any other language. Sure I miss static types, but when I see a working product with such a small amount of code it really feels nice.
- jraines 10y agoI would suggest starting with compojure-api (via its leiningen template) on the backend and Reagent on the front-end. Super simple if you're familiar with building API driven SPAs and in particular React apps. compojure-api will get you going, and you can sort of back in to a fuller understanding of compojure and ring, which I agree is a bit confusing -- hard to know which of the zillion ring plugins to use, and where.
- blunte 10y agoI wanted to use Clojure for a long time, and finally I found a project that was "simple" enough to use it on (but which exercised some of the benefits of functional programming. Mine was a backup purge scheduling tool that read a user's (admin user) CSV file for dictating backup retention rules and then did analysis on the Bacula system, ultimately generating a shell script that would delete the appropriate backups. In some worlds that would be considered insignificant, but it was a real world problem with great risks (deleting the wrong backups can be really bad). When it was done, I did a code review with different Ruby and Python colleagues. That's where the benefits really began to show - I could illustrate the simple rules, the facts and behaviors, and we were able to build upon those solid rules. People who didn't know Clojure and who had no exposure to Lisp could confidently agree that the behavior of the program was to spec. That, for me, is the beauty of Clojure (or perhaps Lisp).
- kls 10y agoFor me lisp in general was like that. But I just kept on until it clicked (mainly because I was getting sick of hearing all the hype and wanted to fully understand what all the fuss was about). A lot of people talk about when lisp clicks its an ahh-haa moment much like when your first programming language clicks and that is the best way to describe it. When it finally clicks it clicks but you have to put aside so much C rooted concepts and just keep beating Lisp concepts into your head until it clicks. I once heard C described as learning programming in the constraint of time (e.g A happens first then B) where lisp executes in distance or space (e.g A happens over here and B happens over there). It's probably the best way to describe it but it does not click to somebody that is still thinking in time. It just seems weird and painful. Because you can't do things the way your brain thinks they should do them in the constrain of time. It finally clicked for me when I build a simple file parser and I think that is a great project to use to understand a lisp.
- terragon 10y agoWould you recommend I start playing around with Lisp before I do clojure?
- grzm 10y agoThere's really no need. Most of the Clojure material out there doesn't assume or require Lisp knowledge. Unless you're interested in specifically learning Lisp, of course.
- kls 10y agoeither or, Clojure has more of a focus on functional programming and immutability than some other lisp implementations but honestly they don't really get in the way and most lisp lean that way anyways. Personally I would say stick to Clojure or CL as there is a wealth of information and libs available for those two. Others will differ but once you know one it's a matter of style and conventions to adopt a different implementation (until you get under the hood)
- straws 10y agoI've found http://www.ccs.neu.edu/home/matthias/HtDP2e/ http://www.ccs.neu.edu/home/matthias/HtDP2e/ to be the best resource to drill the "code as data" mindset necessary for Lisp programming. And I would recommend going through as many exercises in http://sarabander.github.io/sicp/ http://sarabander.github.io/sicp/ as possible using the Racket IDE: https://docs.racket-lang.org/sicp-manual/index.html https://docs.racket-lang.org/sicp-manual/index.html
- TickleSteve 10y agoSame here, I found the concepts in Clojure attractive and elegant but the implementation to be lacking. The toolchain is extremely heavyweight and any promised performance, scalability and development improvements just don't materialise. Like you, I've only tried toy projects, but Clojures weight and lack of real (as opposed to promised) improvement never occurred for me. Also, there seems to be constant discussions on the Clojure forums about the lack of performance.... and they all get resolved by admitting that you need to fallback to non-idiomatic Clojure (i.e. just doing it the Java way).
- TheSmoke 10y agoif you can tell us more about your pain points, i think we can help you give clojure another try but for this time going forward and not falling back to previous tools.