8 ms·
Clojure 1.8
- votr 11y agoCongratulations! When is the 2015 State of Clojure coming out?
- olivergeorge 11y agoSeems like they've been so busy making us things to talk about them. I'm okay with that! I do look forward to seeing the survey.
- puredanger 11y agoSoon, just editing stuff before release.
- whalesalad 11y agoGood gravy we're still on 1.6 ... really need to put some time aside for the upgrade.
- mraison 11y agoActually you may not need that much time, the 1.6 -> 1.8 upgrade is pretty smooth!
- jbeja 11y agoCongratulation, Clojure get better and better with each release.
- deleted 11y ago[deleted]
- jballanc 11y agoBe sure to follow the link to the full changelog (https://github.com/clojure/clojure/blob/master/changes.md https://github.com/clojure/clojure/blob/master/changes.md). In particular, a huge feature that wasn't discussed in detail in this blog post is the new socket server and REPL. In short, you can now get a REPL into any Clojure app by passing a flag on startup. Previously you would have had to manually start a REPL server during app startup.
- puredanger 11y agoThat's one of the three features mentioned in the blog post and links to the fuller docs at http://clojure.org/reference/repl_and_main#_launching_a_socket_server http://clojure.org/reference/repl_and_main#_launching_a_sock...
- sdegutis 11y agoI'm really excited to see how this simplifies CIDER and the Clojure web app tool chain, if at all.
- dotemacs 11y agoThis was already discussed by Bozhidar Batsov at last year's ClojureX talk: https://skillsmatter.com/skillscasts/7225-cider-the-journey-so-far-and-the-road-ahead#video https://skillsmatter.com/skillscasts/7225-cider-the-journey-... I think that particular point is somewhere towards the end of the talk.
- Blackthorn 11y agoThat change in linkage seems like it would have a serious effect on anything that wanted to hook functions (like this library for doing it: https://github.com/technomancy/robert-hooke/ https://github.com/technomancy/robert-hooke/). Isn't the point of rebinding that you don't necessarily know what you're going to want to rebind ahead of time?
- brandonbloom 11y agoThere's a flag to disable the static linking if you need the dynamism.
- Blackthorn 11y agoDoes this work with jars you get via deps in your Lein project.clj file, like clojure core?
- puredanger 11y agoDirect linking is a compiler option so it affects any source you are compiling with the flag on. If the dependency jar has source files (.clj) and you transitively AOT compile your app with direct linking, then yes. If the jar has class files (.class) then you won't affect that dependency jars calls within itself or out to other libs. But you can compile your own app to directly link into a compiled dependency if it was compiled with Clojure 1.8 (and has the direct methods to call). Clojure core itself is AOT compiled (that has always been true) with direct linking on. So calls within clojure core itself are direct linked - how you compile your own code to call into them is up to the choices you make when you compile. Code compiled with direct linking actually retains both the direct and dynamic call paths so this is always a compile-time decision.
- puredanger 11y agoMost of the rebinding that people do is at development time from the REPL. When you AOT compile an app for production and deploy it somewhere, you are (usually) not doing that anymore (other than very specific cases that you would typically know ahead of time).
- georgewsinger 11y agoHas anybody tried the ahead of time compilation? Does it significantly reduce script startup time?
- aardvark179 11y agoYou mean Direct Linkage? To be clear the difference is not whether functions are compiled ahead of time but whether function calls go through the standard indirections or are turned into static method calls more amenable to JIT optimisation. I haven't tried it but would expect it makes more of a difference to peak performance than startup time. The VM will still need to do those initial method lookups, and the normal var and Fn parts will have become very hot very quickly. From personal experience class io, verification, method linkage, and reflection play a big role in startup of jvm languages (along with call site target setting if you're using invokeDynamic bytecodes), but removing indirection helps for long running processes.
- puredanger 11y agoDirect linking does (indirectly) affect startup time. Specifically, using direct linking means that many vars in the function class initializer are no longer needed. There is some new logic that avoids adding unused var initialization in the compiled class. The result is a reduction in class size and static initializer size, which reduces classloading time (a significant part of startup costs).
- pjmlp 11y ago> From personal experience class io, verification, method linkage, and reflection play a big role in startup of jvm languages (along with call site target setting if you're using invokeDynamic bytecodes), but removing indirection helps for long running processes. Yes, but Clojure itself is the one to blame for slow startup as it as been proven multiple times by community members.
- mej10 11y agoProbably not enough to matter. Even if it halved the startup time it would still be too slow for the tasks it is too slow for. Note: Clojure itself performs fine, I am just talking about the startup time. That being said, I use Clojure for scripting tasks frequently and it isn't so bad. It just isn't as awesome as it could be. POTENTIAL SOLUTION: I think for script startup time someone is going to have to bite the bullet and write some kind of nREPL client in a language with no startup time (Go, C, etc). Then you could just send code to be evaluated to already running environments. You could use boot.pods to isolate the Clojure runtimes. Seems straightforward-ish.
- segphault 11y agoAnybody know if this update addresses any of the issues with Java 8 interop? It'd be really great if you could just pass a conventional Clojure function to Java methods that expect to receive lambdas.
- puredanger 11y agoNo changes in that area.
- hcarvalhoalves 11y agoSolid. I would like to see better Clojure docs before 2.0 though. I can even volunteer for a redesign.
- puredanger 11y agoThat's on the list as well, will probably copy some of the design elements of the new clojure.org site.
- munro 11y agoAs someone who started using Clojure recently, the documentation has been the hardest part. Once I've understood something in the core lib, I'm blown away how well built it is, but it's been a confusing & misleading process getting in the meantime. The design never bothered me, the issue I have is that docs are all over the place. I would like to see documentation consolidated, with improved completeness, and better search. To get there, it needs to be easier for developers to contribute to clojure.org, instead of spinning off their own version of docs, which seems to be the case at the moment. Just for a glimpse of the documentation landscape, and what it's like getting started, here are the resources I've touched on: * Main reference pages (recently redesigned) are nice for getting a high level gist of something, but I found it doesn't go in depth enough to really understand atom/transient/transducers/etc. [1] I walk away with a sense of: "sure, this all sounds good in theory". * Main API docs are helpful for reference once you understand what's going on, also useful for finding new things to research elsewhere. [2] * I've discovered there are wikis on the libs that have really good examples, but they're not complete, and I will still have to Google for more examples by people writing blog posts. [3] * Clojuredocs has decent search, and sometimes people comment on a function with a good example. But most of the time comment unfinished code that's really misleading. [4] * Google is really the best resource for finding examples, explanations, and idiomatic usage. There are a lot of idiomatic things that are hard to uncover, like to zipping is done by `(map vector [1 2 3] '(a b c))`. * The #clojure IRC channel has pretty low response rate of actually getting help with something. As compared to #node.js/#python/#postgresql. The community is smaller, so it makes sense, but it's discouraging. * There are quite a few other websites, but I haven't found them useful, so I never check them. [5] [6] [1] http://clojure.org/reference/agents http://clojure.org/reference/agents [2] http://clojure.github.io/core.logic/ http://clojure.github.io/core.logic/ [3] https://github.com/clojure/core.logic/wiki/A-Core.logic-Primer https://github.com/clojure/core.logic/wiki/A-Core.logic-Prim... [4] http://clojuredocs.org/clojure.core/keep-indexed http://clojuredocs.org/clojure.core/keep-indexed [5] http://clojure-doc.org/ http://clojure-doc.org/ [6] http://conj.io/ http://conj.io/
- banku_brougham 11y agoI've been meaning to get my feet wet in Clojure, can anyone recommend a good: A. Web tutorial intro B. Book
- gantengx 11y agoCheck out Clojure for the Brave and True - http://www.braveclojure.com/ http://www.braveclojure.com/
- infinotize 11y agoI used Aphyr's series to get started (I'm still a novice) and found it very useful to get going from zero: https://aphyr.com/tags/Clojure-from-the-ground-up https://aphyr.com/tags/Clojure-from-the-ground-up
- pairing 11y agoA) https://iloveponies.github.io/120-hour-epic-sax-marathon/index.html https://iloveponies.github.io/120-hour-epic-sax-marathon/ind... (I used this exact tutorial myself for learning clojure). B) Living Clojure
- straws 11y agoFor B, https://pragprog.com/book/vmclojeco/clojure-applied https://pragprog.com/book/vmclojeco/clojure-applied is very nice if you are coming from a traditional Java or OO background, and if you are familiar with design patterns but are wondering how to structure your code in a language style that is unfamiliar.
- TylerE 11y agoI like the idea of clojure a lot, but I just despise having to touch the Java platform at all, everything is so over-engineered and bloated.
- paulddraper 11y agoCare to add any specifics? Looking at half of JS language features, I could say that's bloated too.
- TylerE 11y agoWell, for a very first point JVM startup time STILL sucks, even with an SSD.
- flippant 11y agoThe JVM startup time is actually negligible. What you're seeing is the time it takes to load the clojure jar.
- TylerE 11y agoDoes it matter? I don't experience this with nim or go or even python - but it does show up with every jvm language, including clojure.
- pjmlp 11y agoDon't blame the JVM for what it is a Clojure implementation problem. http://blog.ndk.io/jvm-slow-startup.html http://blog.ndk.io/jvm-slow-startup.html http://martinsprogrammingblog.blogspot.de/2012/02/why-is-clojure-so-slow.html http://martinsprogrammingblog.blogspot.de/2012/02/why-is-clo... If you program directly in Java it can be as fast as Nim or Go. Granted, if you want AOT to native code, your only option is a commercial JVM.
- merb 11y ago
- isnullorempty 11y agoI used Clojure for an small application last year and once I got up and running (after watching many Rich's excellent videos and reading up) I got a glimpse of how powerful bottom up functional programming could be, a refreshing change from OOP. I wish Jetbrains would create a full featured IDE for it.
- edem 11y agoIt looks like they just did: https://cursive-ide.com/ https://cursive-ide.com/
- AsyncAwait 11y agoIt's not their IDE, but I agree that it is excellent.
- deleted 11y ago[deleted]
- edem 11y ago> Socket server and socket server REPL - adds the ability to allow remote Clojure REPL connections Now that's something!
- rev 11y agoSlightly off-topic: Packt Publishing offers Akhil Wali's book "Clojure for Machine Learning" for free today (https://www.packtpub.com/packt/offers/free-learning https://www.packtpub.com/packt/offers/free-learning).
- mej10 11y agoThanks for that!