4 ms·
I've been wanting to learn Clojure and recently bought the book Clojure Programming (not to be confused with Programming Clojure) and I'm curious to know if oth
by dopamean 13y ago
I've been wanting to learn Clojure and recently bought the book Clojure Programming (not to be confused with Programming Clojure) and I'm curious to know if others believe it is a good idea for a Clojure novice such as myself (lisp and JVM novice too) to use kibit while learning. Any advice would be greatly appreciated. Thanks.
- mseebach 13y agoKibit looks neat, I haven't tried it. I think the generally applicable advice is to get comfortable with the core first, then add tools and libraries at the speed you're comfortable with, making sure that you understand what each component does.
- cgag 13y agoRunning `lein kibit` is super low effort once you've got lein set up, and even having used clojure for years it still reminds of features of clojure.core that I forgot pretty regularly. I think as a noob it would really help you in learning the core lib.
- wuschel 13y ago(Confession: I am a novice to clojure/scheme/JVM myself.) I admit that I have not tried kibit yet. However, LightTable/REPL is a great tool for this endeavour. If only clojure could have an error tracking report that would be comparable to the wonderful implementation that can be found with the python IDLE.. but I guess that is too much to ask?
- mrgoldenbrown 13y agoCan you elaborate on what you mean by "error tracking report" in IDLE? Either I'm missing something cool about IDLE or I am totally misunderstanding. Thanks!
- wuschel 13y agoSorry, what I meant was the TraceBack. It helped a great deal when learning programming and hunt those nasty bugs: Traceback (most recent call last): File "C:/Users/wuschel/Desktop/error-track.py", line 3, in <module> newstrin = teststrin + 3 TypeError: cannot concatenate 'str' and 'int' objects In clojure, you get those error reports in java lingo - I don't know how fast you can get use to that kind of error messages when you do not know Java. Now, this one is obvious, but it just should serve as an example: clojure.lang.Compiler$CompilerException: java.lang.RuntimeException: clojure.lang.Compiler$CompilerException: java.lang.RuntimeException: Unable to resolve symbol: b in this context, compiling:(null:4:1)
- mrgoldenbrown 13y agoOK, this makes sense. I'm slightly disappointed though, I was hoping to learn a secret new python feature :)
- deleted 13y ago[deleted]
- sandbags 13y agoI cannot see any problem with using kibit. Quite often my experience when learning a new language is "Am I doing this right? Or even close to right?" If kibit can turn your code into idiomatic Clojure then you have a tool for exploring your solutions and how close they look to Clojure as it might be written by a native. It can also prompt questions "Why do it this way rather than this way?" which could be a good learning opportunity. I see no harm, only benefit. Matt
- cjo 13y agoI think it would only be good if its used as a learning tool and not a code-writing tool, compare: write the best code you can -> run kibit -> spend an hour reading the docs and every blog post you can find about a feature you didn't know about -> repeat write the best code you can -> run kibit -> show off your awesome code, you're a rockstar!
- sandbags 13y agoI agree with you although I think that's an unlikely scenario. kibit, so far as I understand it, is a pattern matching solution that can replace one structure with another - more idiomatic - structure. It doesn't add anything and, hence, can't actually solve your problems for you.
- Anderkent 13y agoWell, the problem comes up when it gives you proposals that are not equivalent, because it doesn't understand macros and/or local scope :)
- dandrews 13y agoYou're new to Lisp and JVM? (Perhaps new even to Emacs?) The activation energy required to get going in Clojure can be a bit daunting. Cool tool that it may be, I think that kibit should wait until you can drive around with some confidence. Premature optimization and all that, y'know.
- dopamean 13y agoYup, new to Lisp and JVM. All of my experience, brief as it has been, is in Ruby. I've only taken a cursory glance at the book I purchased and frankly I think I'll be ok picking up Clojure. It just may require a lot of focus. Is Emacs the typical editor Clojuristas use? I use vim though I have recently switched to Sublime.
- leephillips 13y agoVim can work very well with Clojure (I use it). Look into ScreenSend, which lets you send code from the editor to a repl. You can use it with Python as well, and anything with interactive evaluation. You might also want to install paredit, which keeps your parentheses sorted out for you.
- jballanc 13y agoCorrection, you must install paredit (and spend half a day familiarizing yourself with how it works). It'll make your learning experience 10x easier. As for Emacs vs Vim, I also use Vim for Clojure development. There's definitely a bias toward Emacs in the community, but that doesn't mean that you have to go with Emacs. In fact, there are now useful plugins/packages to work with Clojure in Vim, Sublime, IntelliJ, Eclipse, as well as Emacs. There's even two editors written in Clojure itself: Clooj (https://github.com/arthuredelstein/clooj https://github.com/arthuredelstein/clooj) and the afore-linked LightTable.
- michaelsbradley 13y ago(> smartparens paredit) ;; true https://github.com/Fuco1/smartparens https://github.com/Fuco1/smartparens
- Edmond 13y agoYou could try our product (www.crudzilla.com) here's a short video demoing coding in clojure and other jvm languages: http://www.youtube.com/watch?v=AqeOS2hqtMg http://www.youtube.com/watch?v=AqeOS2hqtMg
- miloshadzic 13y agoIt's easy to get carried away with everything. My advice: start with an editor you know and use everything vanilla. You'll appreciate better tools more once you spend some time and get a feel for the pain points.