Getting started with Clojure
aheusingfeld.github.io
aheusingfeld.github.io
I did some sniffing around to see what the practical effects (if any) are for applications written in Clojure, and on their own mailing list the topic is a bit of a mess:
https://groups.google.com/forum/#!topic/clojure/bpnKr88rvt8 https://groups.google.com/forum/#!topic/clojure/mGf_SuHsSGc
Everyone seems to agree that forking or modifying Clojure itself would trigger all sorts of license requirements (e.g. GPL-incompatibility, you might need to use the EPL, etc).
However, nobody on their mailing list seems to agree on what the licensing means for normal applications that happen to be written in Clojure and use its library at runtime. Is that a "derivative work", or not? Does the fact that you write applications in Clojure have any bearing on the licenses that you may choose?
I know that it's somewhat possible to mix the EPL with almost anything... because I've worked with some Aptana IDE's that are based on Eclipse, yet use GPL v3 with several paragraphs of caveats and exceptions. (http://www.aptana.com/legal , http://www.aptana.com/legal/aplgplex) Not sure about GPL v2.
I just don't want to have to think about this stuff AT ALL as an application developer who isn't making changes to the programming language or core runtime library. The murkiness on their own mailing list has definitely been a deterrent from my exploring Clojure more seriously.
I think we would have heard by now if there were any viral problems with normal applications built on top of it, Clojure has been a very big thing in the Lisp world for years.
http://stackoverflow.com/questions/168254/can-you-write-gpl-...
It would be nice if someone from the Clojure team would add a FAQ page or something about the license to clojure.org as it pertains to users of the language... Since this seems to come up a lot.
1) Install Leiningen (download script, place in usr/local/bin), then "lein new project".
2) Download Clooj (standalone .jar), run with "java -jar clooj" https://github.com/arthuredelstein/clooj
3) Open project directory in Clooj.
It will automatically set up the REPL, and you can run expressions just like in EMACS/Light Table, it has code completion, source browsing, etc... Super easy to set up and run, much easier than any of the alternatives.
This Clojure environment is by far the easiest programming environment I have ever set up. Far easier than even Python or Ruby on Linux, definitely easier than anything EMACS-related. Leiningen is super easy to use from the terminal, and Clooj is super easy to set up and use.
Yeah, the REPL isn't perfect (sometimes it needs to be restarted if you mess with it too much), but it's a heck of a lot easier to set up than EMACS with nRepl, or even Light Table (which itself is a great editor).
Another good one is Catnip, which is an add-on to Lein which launches an editor/REPL in your browser...
It never ceases to amaze me the kinds of things that people have already done with Clojure - games on Google Play store for Android, awesome IDEs, Pedestal is looking like a great web framework, Datomic, Clojurescript and now Clojure that compiles to C. Not to mention all the private enterprisey things being done, I know of at least a few banks/hedge funds which use Clojure internally, a robotics company, and likely many others...
I'd recommend Emacs + nRepl or Eclipse + CounterClockWise instead.
I realize IntelliJ is better typically but in this case it's not.
> Have you reported them?
Most issues are in your tracker since ages.
> We'd love to know how we can improve it.
merge the lein plug-in into laClojure, or keep it synced all the time.
And implement those requests there in your tracker.
For example, I dislike the yellow warning lines that abound when it can't infer a type that has previously been assigned on all call paths.
This is a desolate wasteland and it's very obvious nobody cares enough to make it work well.
https://github.com/JetBrains/la-clojure/issues
There are issues from TWO years ago with no comments, no explanation, and no fix.
Why would I use your product if I can't trust you to fix anything? With Emacs and nRepl or Slime/Swank I can fix things myself if I need to. Although in practice I don't need to.
If you want people to use IntelliJ, you have to step up to the plate and contribute to stuff outside of the core IDE.
If things like LaClojure are garbage, it makes you look bad and people will start using other tools.
Java programmers that learn Clojure are, (in my experience), leaving their Java IDEs of choice because the support is poor for their new favorite language.
They're coming home to Emacs or experimenting with LightTable.
That makes it your problem. Nobody cares about excuses.
Let me be clear, I don't care if you fail, I'm an Emacs user and believe in programmers maintaining their tools for themselves out of deep mistrust for commercial entities owning how programmers do their work. But if you want to be competitive you have to stop being myopic.
Have you been paying attention? Companies like http://zeroturnaround.com/ make their product free for Scala users because those people are the vanguard for their respective communities and will often be the ones making product decisions.
There is a comparable thing going on with YourKit's wonderful support of the Clojure community.
How exactly are you staying on top of the latest developments in JVM languages if you're concerned exclusively with "IntelliJ-the-IDE-itself"?
My point about it being on our GitHub account and OSS is that the source is available, much like it is for plug-ins for Emacs or Sublime or any other environment. It's not about blaming anyone or pushing the effort on to someone else.
We have quite a few developers dedicated to writing plug-ins in-house, specially considering pretty much all the functionality in IDEA is based around plug-ins and in fact we have around 3 people that are working alone on Scala plugin.
> ... and in fact we have around 3 people that are
> working alone on Scala plugin.
As a paying customer who bought IntelliJ solely for its Scala plugin, I'm currently seriously questioning whether it is still worth paying for the next version.It is not only that I can't see much progress with IntelliJ's Scala plugin and that the free Scala IDE is getting increasingly better as well as having some amazing add-on functionality.
I'm really wondering how much money of their Scala customers JetBrains is really spending on improving the Scala plugin and how much of it is silently funnelled into FUD and vaporware factories like Kotlin.
That's a huge conflict of interest and the reason why a significant part of my next paycheck probably won't end up in JetBrains bank account.
There are clojure plugins for many popular editors these days. If you already have an editor/IDE you like, I'd recommend starting there and moving to something else in the future once you get used to it.
The main reason for this is that so many of the tutorials will assume emacs for your repl management beyond the basic "(car '(foo bar baz))" and any emacs will have a well-defined "manage the indentation and parens"-mode.
Getting help from other people will often involve Emacs-specific instructions as well. "C-c C-e at the end of the sexpr and eval the result..." which may or may not be the binding in Eclipse or whatever IDE the person is using.
It's also not blurry at all on my setup, so if you do try to find the actual author and suggest a change, you might want to include details of your setup so he would have a chance to test any changes.
Lesson for everyone. Beware! Cool, funky, gorgeous fonts on your machine may be downright unreadable for others.
Stupid question - as a temporary measure, have you tried increasing the font size? Something like Ctrl-+ should do that.
Not that I'm a big fan of the font (too close to Arial, especially the 'R' for my antiquated tastes), but I would say it's a well-rendered font of a typeface I do not like. :-)
After proper Scheme training (CS61A) Clojure looks awkward and messy but very useful, as it supposed to be due to its "productivity beats clarity/conciseness" philosophy of scripting languages, such as Ruby.
OP clearly hasn't hacked on any Common Lisp written by a CLOS-maniac.
Schemers break out in hives if they couldn't implement their own language on a raspberry pi in a single drunken bender.
The examples of well-chosen set of basics is Scheme R4RS, or pg's Arc. The examples of so-called natural selection are CL (an attempt to put together the best ideas and syntactic sugar from various implementations) and, surprise! Haskell, which is a product of a merge of efforts of ML/Lazy languages world.
On the other hand, there are languages created by one individual, according their own preferences, such as Perl, Ruby and Clojure.
Ruby, for example, it is a mix of features from Perl and Smalltalk, its author liked, but, of course, the resulting language is neither a dialect of Perl or Smalltalk. It is a language of its own.
Similarly, Clojure is a mix of features from various languages, notable Common Lisp, Smalltalk, ML, plus various Python-like comprehensions for vectors or hashmaps.
There are many other clever tricks, like simplified pattern matching, at the cost of sacrificing uniformity and announcing vectors as parameter lists for binding constructs, apparently from ML, and multi-method function declarations, also from ML.
The result is a language of its own, and cannot be called a Lisp, the same way Ruby cannot be called Smalltalk. The design decisions, while mostly clever, broke the uniformity and clarity of classic Lisps.
So, in my opinion, Clojure is closer to Ruby in its ideology, than to Lisp.
> After proper Scheme training (CS61A) Clojure looks awkward and messy but very useful, as it supposed to be due to its "productivity beats clarity/conciseness" philosophy of scripting languages, such as Ruby.
As someone with "proper Scheme training" (CS61A), I've found that Clojure is actually much more clear than Scheme in most cases. The code is less beautiful from a purely visual perspective because there is more syntax, but a lot of complexity gets removed when you add literals for sets, vectors, and maps.
E.g. (defn name [arg1 arg2] body). Lists are not the alpha and omega like they are in LISPs.
But I agree it has "every single characteristic that defines a lisp", even if it looks funny to experienced Lispers like myself.
Aesthetically I much prefer standard LISP syntax + indentation , but 100% support the use of literals for the non-list data structures. Many disagree on the syntax, and if no longer having a sea of pure parens brings more adaptation I'm willing to live with it. I got the impression the syntax changes were due to that reason vs. inspiration from ML, but I'm not at all sure about that. Still, Rich Hickey is an experienced Lisper with exquisite taste below the level of syntax, so I'm pretty sure he was aware of the implications of his syntax changes.
Don't take me wrong, making the other collections syntactically first class and unifying them under the Seq abstraction is a really good thing, in fact when I appreciated that it was the first thing that got me really excited about Clojure, especially Clojure as "the next Lisp". But personally, if just for myself, I would have kept the vectors out of the syntax and depended on indentation in smart editors.
There are several types of first class syntax in Lisp: http://amitp.blogspot.com/2007/04/lisp-vs-python-syntax.html
EDIT: "Criticise" is clearly the wrong word, since your description isn't perjorative. "Distinguish" would be better.
However, while I could make such a choice in CL, or modify Clojure, the standard including indentation for such a fundamental part of a language is controlling, and if I want to be part of the community I have to follow it.
I don't see how a definition of "Lisp" that excludes Common Lisp is useful. How do you find this definition useful? You bring it up with remarkable regularity when Clojure is mentioned, presumably you find some value in it?
Occasionally, a pragmatist like Hickey comes along and says "hey look how useful this can be". Another generation of programmers takes a look at Lisp. Where will it go this time?Can Lisp be saved from the Lispers?
The old CS61A course, of which I am huge fan, taught you the very important idea that all you need is lambda as Brian Harvey put it himself.)
The meaning is quite profound. First of all, the notion that everything could be written using just procedure calls (we will not talk about Lambda Calculus here) few special forms and list notation, which goes back to John McCarthy is the great one, and Scheme, therefore, is a result of polishing this idea.
Second very important idea related to the first - all the fundamental ideas and techniques in programming one should learn and internalize, could be easily and elegantly expressed in Scheme. This is why it was a language of choice for teaching CS. Even if it lacks some features, such as advanced module system or OO capabilities, but they teach you how easily it could be implemented, and that it is of second importance.
So, if I am promoting something here it is these realizations from Brian Harvey, and for me Clojure is something very opposite, a mess and hype and unjustified rhetoric, claiming that it is superior to something much more great and profound.
And it is not an empty pose. Even playing with its repl will teach you that it is full of special cases you must learn and know, that if something is printed as a list it might be not, that behavior of a function depends on what data-structure is given as its argument and so on. I'm also not sure that collections is such a great idea.
It's perfectly fine to not like a language, but it's inappropriate to be so over the top with it as to post in, quite literally, every story about that language.