This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # beginners (143)
- # boot (18)
- # chestnut (5)
- # clara (1)
- # cljs-experience (1)
- # cljsrn (13)
- # clojure (290)
- # clojure-austin (4)
- # clojure-italy (13)
- # clojure-nl (21)
- # clojure-russia (14)
- # clojure-spec (49)
- # clojure-uk (59)
- # clojurebridge (7)
- # clojurescript (54)
- # core-logic (2)
- # cursive (22)
- # datomic (149)
- # fulcro (31)
- # graphql (14)
- # hoplon (59)
- # keechma (24)
- # lambdaisland (1)
- # lumo (86)
- # off-topic (3)
- # om (19)
- # om-next (1)
- # onyx (4)
- # portkey (20)
- # re-frame (41)
- # reagent (63)
- # ring (1)
- # ring-swagger (1)
- # spacemacs (9)
- # sql (10)
- # yada (13)
my only thought is my route composition is off but i don't know how to do it differently i guess
figured it out. if you want to serve some json, don't forget to wrap your payload in the
Hello! I'm just starting out with Clojure, following along with the http://braveclojure.com tutorial. I've mostly used vim as my editor before (10+ years), and never written any lisp at all, nor have I tried Emacs for more than a few minutes. Manually setting up all the vim plugins and config seems a bit daunting and distracting from my actual goal of learning some Clojure. Any advice as to how to get up and running smoothly?
Some would advise using a beginner-oriented editor while you’re learning. This seems like a decent list: https://cb.codes/what-editor-ide-to-use-for-clojure/
@emilaasa I’m using Vim with https://github.com/bhurlow/vim-parinfer and it’s all I need
It seems like there’s a #vim-fireplace room here and they might be helpful in guiding you
@emilaasa Also a vim user here~ 🙂 Here's the plugins I'm using now:
guns/vim-clojure-static kien/rainbow_parentheses.vim tpope/vim-classpath tpope/vim-fireplace
paredit for me. i don't type closing parens and i get structural editing. it's a necessity
I've attempted to first perfectly configure my vim for the language I've wanted to learn a few times in my life. Usually ended up learning more about how to totally demolish a .vimrc than any actual programming.
Yep I think I will do that, atleast I know there is some pretty big quality of life things I should sort out eventually, namely repl connection, something with balancing parens (?) and editing s-expressions
I don't type closing because they are inserted for me when i enter a pair. I kill inside of a sexp so i maintain the invariant of balanced parens
i can't imagine writing a lisp without some type of structural editing capability. also, emacs has a show matching paren that is invaluable to me
I use ProtoREPL (Atom) and Parinfer -- hated Parinfer at first but forced myself to get used to it and now I absolutely love it! Also have the lisp-paredit package installed for structural stuff and indentation.
Anyone worked thru a book or tutorial that they can recommend? I'll probably run thru the basics, and then try rewriting a small web service (Java Servlet API) in Clojure as a practice project at work, if that narrows down the preferences at all
i like using Atom as well, but i'm coming from JS/front end land, so it's what i know. i've been working through Living Clojure by Carin Meier and really like it. it's workbook-like rather than a reference.
@emilaasa What have you looked at so far? Clojure from the Ground Up? Clojure for the Brave and True?
Brave and True is where i started and it was good for getting on the ground running.
I'd expect the Clojure Cookbook and Clojure Applied to be good follow-on books, if you like stuff focused on real-world problems and solutions.
Clojure Programming was recommended to me as the follow up, so i've got that as well.
I’ll add a totally unbiased plug for Programming Clojure, 3rd edition, which is available in beta (but with all of the text available as of about an hour ago)
to second Alex's recommendation, I've bought that for myself and a coworker at my former company. really excellent book.
Well an author that shows up in the #beginners slack channel is alright in my book, ordering now 🙂
it brushes up against a good bit of java, some of the more bedrock classes, which is extremely helpful for people like me who do not know the java ecosystem
My first Clojure book was The Joy of Clojure but I wouldn't recommend that unless you already have some FP and some Lisp background. My second book was Clojure Programming (Emerick et al).
I've only done Haskell and done my best to keep the companys JS code as functional as possible 🙂
Overall, re: Clojure books, there's a lot of good ones out there and only a few duds so you mostly can't go wrong with whatever anyone recommends.
in the reverse, the stuff i've learned in clojure has made picking up the changes in ES6 smoother.
I have a couple of sample chapters from the original Programming Clojure book and it looked fine but at the time it was using an outdated version of Clojure so I picked (several) others. Now it's been updated and a third edition is coming out, that's going to be one of the most up-to-date books.
I bought Clojure in Action early on and it was written for Clojure 1.2 but not released until 1.3 was out so a lot of it was broken by that, unfortunately (I pleaded with Manning to have the author update it before release but they pushed it to market anyway).
Thanks everyone by the way for being super helpful! These first hours in #beginners can really make a difference for how you feel about a language/community and you all are making it feel great! 😃
btw, I am currently seeking a few reviewers for Programming Clojure! having some beginner(-ish) people would be great
ping me in dm if you’re interested (free copy of the ebook included). heck, I’ll even send you a physical copy at my expense if the publisher doesn’t (can’t remember right now)
I just looked at Clojure in Action 2nd Ed (which I also have) and that was written against 1.6 so it doesn't cover some important recent features.
Before protocols? I'm trying to remember what was added in 1.1... Hard to believe how much the language has moved on since then -- but also incredible how stable and backward-compatible it has remained.
For folks new to Clojure like @emilaasa I'll say: don't be afraid to try the very latest alpha features when learning Clojure (`clojure.spec` is incredible in 1.9 Alpha 17!) -- ever since my company adopted Clojure, we've been going to production on Alpha versions with huge success (our first Clojure launch used 1.3 Alpha 7 or Alpha 8 -- and we've been on 1.9 Alpha 17 in production for a while now!).
One of my favorite newish languages is Elm which is notoriously slow to implement anything, very deliberate and thought through.
clojure.reflect consciously marked as alpha because it might change, or because it was never fully fleshed out in the first place and never got worked on again?
the alpha tag was consciously not removed from clojure.reflect in 1.6 (when we removed it in most other places) because it is still subject to change
I’m not sure anyone ever actually uses it :) one of the reflectors is actually broken in JDK 8 and no one has ever mentioned it
It would be nice to have some form of (parallel) fold in core -- I had hoped we'd see that with transducers (but haven't thought that through to see whether it's even a sane hope). The reducers library feels like a bit of a dead end now: it appeared, never seemed to get much traction, and mostly feels overtaken by transducers. /cc @alexmiller
I would say that reducers is effectively deprecated (but does still have unique utility). there are no plans to (ever) remove the namespace.
and I expect that eventually the ideas of fold will evolve into something - it’s an important use case and will only grow more so
Since this is #beginner, I'd say reducers are easier to grok then transducers, so lazy-sequence -> reducers -> transducers is a good small increment steps to learning
I agree on "use". Not sure I agree on "implement". I'm still a little hazy on when/how the zero-arity version is invoked.
I’m about to go to a job interview and haven’t used clojure for a while. I’m planning on using it for the code challenges… never done this before so I’m kinda freaking out haha.
If you bring up the command palette (cmd-shift-p on a mac, can't remember on windows) you can just type
documentation and see all the keymappings
cool I think I should be alright now. I was planning on using Racket but I think I’ll be more confident with Clojure
If in doubt, start from the command palette and it'll show the keyboard shortcuts.
And BTW there's a #protorepl channel, if you're not already a member @grounded_sage
Cheers. Yea I started using Atom because I wanted to use Parinfer. Was using Spacemacs before hand. Proto repl is definitely cool. Still unsure whether switching to Atom was best decision. Time will tell I guess
I used Emacs way back (in the 17.x/18.x days) then found my way back to it after getting into Clojure and used it heavily again for a couple of years. I switched completely to ProtoREPL after Conj last year and I do not regret that change.
It depends entirely on how much of CIDER's rich functionality you are used to in your daily workflow.
Your choice is more likely to depend on whether you prefer Emacs or Atom as your core editor.
One feature of CIDER that I missed at first with ProtoREPL was the ability to have multiple REPLs open but I've adjusted my workflow to where that's no longer an issue.
I get people who are behind emacs, but if there was one and only one thing that I believe hurts Clojure adoption with beginners, its emacs. I wonder how much emacs has hurt lisps over the years even in terms of widespread adoption. If the language won't be familiar, at the very least having the editor be familiar would be nice. Proto-repl I think is leading the way in that direction.
fwiw, Cursive supports paredit and parinfer, is a lot more stable/mature than atom, almost as feature-complete as emacs for clojure dev, and is quite newbie friendly
@bfabry I think the deciding factor there is whether you want an IDE (IntelliJ/Cursive) or an editor (Atom/ProtoREPL).
I could never grow to like IntelliJ back when I was using IDEs -- I tried a lot of different versions and just don't like the UI. I used Eclipse in preference (although I never really liked Eclipse either). For a while, with Clojure, I used Eclipse/CCW.
are you sure? if you opened a ruby project and you had one of the "normal" ruby plugins you were
I used vim exclusively as a ruby developer for like... 6 years? and I don't really feel much difference between it and emacs for clojure or cursive for clojure
sure - but I don’t have anything in vim that even knows what a “project” is - it could be that many vim or emacs users are using the right extensions to have an IDE, but I don’t think it’s universal.
cwd in vim was pretty much my equivalent to project. not everyone uses it that way, though it's certainly very common