RE: [ANN] Clojure 1.7.0-alpha3 now available
I am curious, with path CLJ-1430 why stop at 3 arguments? Why not unroll to 20? I ask for a practical reason. In my own library, I have unrolled several functions which get called a lot. Moving from all variadic to non-variadic up to 5 args has produced a given a 2x increase in my code under extreme circumstances. I was thinking of macro'ing it out to an arity of 20, but haven't yet, just because it seems a step too far. Phil From: clojure@googlegroups.com [clojure@googlegroups.com] on behalf of Alex Miller [a...@puredanger.com] Sent: 27 October 2014 03:42 To: clojure@googlegroups.com; clojure-...@googlegroups.com Subject: [ANN] Clojure 1.7.0-alpha3 now available Clojure 1.7.0-alpha3 is now available. Try it via - Download: http://central.maven.org/maven2/org/clojure/clojure/1.7.0-alpha3/ - Download securely: https://repo1.maven.org/maven2/org/clojure/clojure/1.7.0-alpha3/ - Leiningen: [org.clojure/clojure 1.7.0-alpha3] For users of Clojure 1.7.0-alpha2, there have been a few important changes in features under development: Transducers: - iteration function renamed to eduction - Fixed several issues related to reduced values *unchecked-math* boxed math warnings: - warnings are now only emitted when (set! *unchecked-math* :warn-on-boxed). for old behavior (no warnings), use (set! *unchecked-math* true). For other changes new in alpha3, see the issues marked (alpha3) in the changes below. Clojure 1.7.0-alpha3 has the changes below from 1.6.0: ## 1 New and Improved Features ### 1.1 Transducers Transducers is a new way to decouple algorithmic transformations from their application in different contexts. Transducers are functions that transform reducing functions to build up a recipe for transformation. Also see: http://clojure.org/transducers Many existing sequence functions now have a new arity (one fewer argument than before). This arity will return a transducer that represents the same logic but is independent of lazy sequence processing. Functions included are: * conj (conjs to []) * map * mapcat * filter * remove * take * take-while * drop * drop-while * cycle * take-nth * replace * partition-by * partition-all * keep * keep-indexed Additionally some new transducer functions have been added: * cat - concatenates the contents of each input * de-dupe - removes consecutive duplicated values * random-sample - returns items from coll with random probability And this function can be used to make completing transforms: * completing There are also several new or modified functions that can be used to apply transducers in different ways: * sequence - takes a transformation and a coll and produces a lazy seq * transduce - reduce with a transformation (eager) * eduction - returns a reducible/seqable/iterable seq of applications of the transducer to items in coll. Applications are re-performed with every reduce/seq/iterator. * run! - run the transformation for side effects on the collection There have been a number of internal changes to support transducers: * volatiles - there are a new set of functions (volatile!, vswap!, vreset!, volatile?) to create and use volatile boxes to hold state in stateful transducers. Volatiles are faster than atoms but give up atomicity guarantees so should only be used with thread isolation. * array iterators - added support for iterators over arrays Some related issues addressed during development: * [CLJ-1511](http://dev.clojure.org/jira/browse/CLJ-1511) * [CLJ-1497](http://dev.clojure.org/jira/browse/CLJ-1497) * [CLJ-1549](http://dev.clojure.org/jira/browse/CLJ-1549) (alpha3) * [CLJ-1537](http://dev.clojure.org/jira/browse/CLJ-1537) (alpha3) ### 1.2 Keyword and Symbol Construction In response to issues raised in [CLJ-1439](http://dev.clojure.org/jira/browse/CLJ-1439), several changes have been made in symbol and keyword construction: 1) The main bottleneck in construction of symbols (which also occurs inside keywords) was interning of the name and namespace strings. This interning has been removed, resulting in a performance increase. 2) Keywords are cached and keyword construction includes a cache check. A change was made to only clear the cache reference queue when there is a cache miss. ### 1.3 Warn on Boxed Math One source of performance issues is the (unintended) use of arithmetic operations on boxed numbers. To make detecting the presence of boxed math easier, a warning will now be emitted about boxed math if \*unchecked-math* is set to :warn-on-boxed (any truthy value will enable unchecked-math, only this specific value enables the warning). Example use: user (defn plus-2 [x] (+ x 2)) ;; no warning, but boxed #'user/plus-2 user (set! *unchecked-math* :warn-on-boxed) true user (defn plus-2 [x] (+ x 2)) ;; now we see a warning Boxed math warning, NO_SOURCE_PATH:10:18 - call: public static
after updating clojure a repl error message
Hello, I updated my clojure from 1.5.1 to 1.6.0 and after I start lein repl I see this output : ERROR: Unhandled REPL handler exception processing message {:id cd35f8f4-8560-401e-8c70-466e00016c78, :op ack, :port 48024} java.net.SocketException: Socket closed at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:121) at java.net.SocketOutputStream.write(SocketOutputStream.java:159) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140) at clojure.tools.nrepl.transport$bencode$fn__3186.invoke(transport.clj:103) at clojure.tools.nrepl.transport.FnTransport.send(transport.clj:28) at clojure.tools.nrepl.ack$handle_ack$fn__3312.invoke(ack.clj:42) at clojure.tools.nrepl.server$handle_STAR_.invoke(server.clj:18) at clojure.tools.nrepl.server$handle$fn__3634.invoke(server.clj:27) at clojure.core$binding_conveyor_fn$fn__4107.invoke(core.clj:1836) at clojure.lang.AFn.call(AFn.java:18) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) REPL-y 0.2.1 Clojure 1.6.0 Docs: (doc function-name-here)
Re: Expanding The Use Of Transducers To Atoms?
IMHO, for what you describe, i.e. I'd like to view an atom's changes in state as a lazy sequence. there is no need to change the IAtom or add-watch function. Watchers are called for their side-effects, so if you want to consume their output as a lazy sequence, you have to do that transformation step in the watcher function that you attach to the atom/ref/agent. Having said that, as changes to an atom happen asynchronously, I don't think that exposing it as lazy-seq is very efficient way of consuming the values. However, with the advent of core.async, there is now a very elegant way of consuming them via a channel and that channel can have a transducer stack attached (clojure 1.7+), so something along the lines of (def atom-to-watch (atom 0)) (defn make-watcher [out-ch-with-transducer] (fn [x] (async/put! out-ch-with-transducer x (def ch (async/chan 100 your-transducer-stack)) (add-watch atom-to-watch (make-watcher ch)) ;; somewhere else in your code you can consume the values (go (loop [v (async/! ch)] ... )) Obviously you need to make sure that the values get consumed on the channel or use a dropping or sliding buffer. hope this helps, Las 2014-10-27 5:39 GMT+00:00 Mike Thompson m.l.thompson...@gmail.com: I've been reading about transducers with interest. The official docs at http://clojure.org/transducers say *Because transducers are decoupled from input or output sources, they can be used in many different processes - collections, streams, channels, observables, etc.* At this stage, there is direct support for collections and core.async. But, given the comment above about observables, this got me to wondering about another scenario ... I'd like to view an atom's changes in state as a lazy sequence. The first state of the atom is like the first item in the seq, the next time the atom changes state, its new state is the second item in the seq is generated, etc. An infinite seq of new states. (I want to do this in the context of clojurescript and a GUI library called reagent. Think FRP). Now imagine that I could attach a transducer to this seq of state changes, so that I end up with a modified seq of state changes. Now, I can figure out how to do this by gluing together an atom watcher with a core.sync channel. All doable with a small bit of work, I guess. But I wondered. Given the claim above about transducers and how they can be used in the case of observables, should this atom-as-seq-with-transducer be easier? Should the IAtom interface or the add-watcher function be changed to make this process easier? Just a thought. -- Mike -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- László Török Checkout justonemorepoint.com - Know your true value -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: CCW bug [SEVERE]
Fluid Dynamics a2093...@trbvm.com writes: On Saturday, October 25, 2014 10:42:24 PM UTC-4, tbc++ wrote: What if my file had been corrupted, or truncated and only the first 42 bytes of the new version written thus far, or something like that at the moment when the hang started? So there's this new cool thing out there called a version control system. One of the more popular programs in this category is known as git...check it out sometime, it'll help you relax when programming, knowing that previous versions of your file are only a few keystrokes away. Besides, it's stupid to expect everyone to use a version control system, particularly just to ward against bugs that have no business existing in the first place. Actually, no, it's not. Using a VC system is something that more or less every programmer should do. Combined with backups which, no doubt you do, it makes the possibility of loosing work through someone elses fault quite remote. A VC with a number back-up save function on your IDE is the way to go. Really, you expect me to create an account and publish every little bit of code I play around with on github? Publication of code for VCS isn't really necessary. RCS which was released in 1982 didn't require it (actually, didn't support it). With the advent of DVCS, it's not needed now. Sometimes I write some function or big static map or vector or something out a line at a time, saving every couple of minutes or if I pause for any reason. I'm certainly not about to commit code in such a state to a VCS, let alone publish it where others can see it. That's what rebasing is for, although I agree it doesn't avoid the usefulness of a numbered backup. Phil -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Leiningen setup for modifying a library the project is depending on
You also should have a look at lein-git-deps - https://github.com/tobyhede/lein-git-deps It's not quite as seamless to drop in as lein checkouts, especially if you are working alone. But if you're on a team, it has the benefit of being explicitly baked into your project.clj so you know all team members are running the same code (you can specify your forked repo of course, and also a specific branch or sha as well). I've had good success with it. Cheers, Sean On Sunday, October 26, 2014 2:00:48 PM UTC-4, Stephen Wakely wrote: Yes that sounds like exactly what I need. Embarrassed I missed it! Thanks Original message From: Andy Fingerhut Date:26/10/2014 4:52 PM (GMT+00:00) To: clo...@googlegroups.com javascript: Subject: Re: Leiningen setup for modifying a library the project is depending on Stephen: Take a look at the checkouts Leiningen feature described here to see if it does what you want: https://github.com/technomancy/leiningen/blob/master/doc/TUTORIAL.md#checkout-dependencies Andy On Sun, Oct 26, 2014 at 8:39 AM, Stephen Wakely fungus@gmail.com javascript: wrote: I need to make some modifications to a library that my project is depending on. Currently Leiningen downloads the lib from clojure and uses that lib. Can I set things up so it uses the files I have cloned from github instead? I have searched the docs but can't find any ideas how to do this. Thanks Stephen -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clo...@googlegroups.com javascript: Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+u...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clo...@googlegroups.com javascript: Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+u...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: multimethod, record, type, and protocol pitfalls?
Hi Daniel, When running through tutorials and blog posts it did not occur to me that the functions of a defprotocol are namespaced to where they are defined. Meaning, calling these functions I have to use their original namespace. It is obvious when one reads the official documentation, but one does not always do this first, so that wsa one pitfall I ran into. Best Regards, Sven Am Sonntag, 26. Oktober 2014 16:48:29 UTC+1 schrieb Daniel Higginbotham: What's difficult when it comes to understanding multimethods, records, types, and protocols? I'm writing a chapter on multimethods, records, types, and protocols for the book Clojure for the Brave and True, and I'd love to hear about what kinds of pitfalls I should be sure to cover :) Thanks! Daniel -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: multimethod, record, type, and protocol pitfalls?
As recently mentioned on another thread, this also means that you cannot have two different protocols with the same method names in the same namespace. This may be surprising, especially from an OO background, where it is very natural to have two types with the same operations. On Monday, 27 October 2014, Sven Richter sver...@googlemail.com wrote: Hi Daniel, When running through tutorials and blog posts it did not occur to me that the functions of a defprotocol are namespaced to where they are defined. Meaning, calling these functions I have to use their original namespace. It is obvious when one reads the official documentation, but one does not always do this first, so that wsa one pitfall I ran into. Best Regards, Sven Am Sonntag, 26. Oktober 2014 16:48:29 UTC+1 schrieb Daniel Higginbotham: What's difficult when it comes to understanding multimethods, records, types, and protocols? I'm writing a chapter on multimethods, records, types, and protocols for the book Clojure for the Brave and True, and I'd love to hear about what kinds of pitfalls I should be sure to cover :) Thanks! Daniel -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com javascript:_e(%7B%7D,'cvml','clojure@googlegroups.com'); Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com javascript:_e(%7B%7D,'cvml','clojure%2bunsubscr...@googlegroups.com'); For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com javascript:_e(%7B%7D,'cvml','clojure%2bunsubscr...@googlegroups.com');. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: midje test : Can I only run 1 test
On Oct 22, 2014, at 9:59 AM, Tobias Kortkamp tobias.kortk...@gmail.com wrote: Yes, you can tag your facts, and then only run the facts with a specific tag. See https://github.com/marick/Midje/wiki/Lein-midje under the :filter section. See also: https://github.com/marick/Midje/wiki/Using-metadata-to-filter-facts -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Starting a project the right way - tips?
Just in case you hadn’t already come across it in your Google-ing, I thought you should know about http://clojure-doc.org . This site is more than just API documentation, it also contains a number of useful guides covering various topics in Clojure. It’s not exactly a collection of prescriptions, but it might help you figure out what direction to head in more than just reading the API docs would. Cheers, Josh On October 27, 2014 at 13:08:42, Colin Yates (colin.ya...@gmail.com) wrote: About to embark on a new project and interested in wish I knew this/wish I had used this type sentiments. An extension of this splendid article: http://blog.mattgauger.com/blog/2014/09/15/clojure-code-quality-tools/. Any others? For context, this is going to be a non-trivial SPA using clojurescript supported by a Clojure backend (https://groups.google.com/d/topic/clojurescript/9cDFfAGsDE4/discussion) In addition to the tips I found in the article I am also planning on using core.typed, primarily to address the anyone remember what this data structure looked like? 12 month maintenance risk. I did look at schematic but I like the extra enforcement core.typed gives. On a side note, answering this question from google alone is non-trivial. We, as a community have reached that point where there are so many (good, but overlapping and sometimes contradictory) good next steps it is easy to be paralysed by choice. A few more authorized (whatever that means) prescriptions wouldn't go amiss. Not sure what the answer is, merely raising the flag. So, what tips/techniques/XYZ do you wish you had started with? Thanks! -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. signature.asc Description: Message signed with OpenPGP using AMPGpg
Re: Starting a project the right way - tips?
Consider how your database will be setup and handled. My project uses Datomic (also a SPA), but it was a little painful learning how to get the tests to run cleanly with the database being setup and torn down between runs. Also, consider using Secretary on the frontend early. I’m using Om and thought I could get away without it by using component state to control what is displayed, and boy was I wrong. — Ashton On Mon, Oct 27, 2014 at 6:54 AM, Joshua Ballanco jball...@gmail.com wrote: Just in case you hadn’t already come across it in your Google-ing, I thought you should know about http://clojure-doc.org . This site is more than just API documentation, it also contains a number of useful guides covering various topics in Clojure. It’s not exactly a collection of prescriptions, but it might help you figure out what direction to head in more than just reading the API docs would. Cheers, Josh On October 27, 2014 at 13:08:42, Colin Yates (colin.ya...@gmail.com) wrote: About to embark on a new project and interested in wish I knew this/wish I had used this type sentiments. An extension of this splendid article: http://blog.mattgauger.com/blog/2014/09/15/clojure-code-quality-tools/. Any others? For context, this is going to be a non-trivial SPA using clojurescript supported by a Clojure backend (https://groups.google.com/d/topic/clojurescript/9cDFfAGsDE4/discussion) In addition to the tips I found in the article I am also planning on using core.typed, primarily to address the anyone remember what this data structure looked like? 12 month maintenance risk. I did look at schematic but I like the extra enforcement core.typed gives. On a side note, answering this question from google alone is non-trivial. We, as a community have reached that point where there are so many (good, but overlapping and sometimes contradictory) good next steps it is easy to be paralysed by choice. A few more authorized (whatever that means) prescriptions wouldn't go amiss. Not sure what the answer is, merely raising the flag. So, what tips/techniques/XYZ do you wish you had started with? Thanks! -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ANN] Monroe 0.2.0 - nrepl client for Emacs
Hi, I'm happy to announce the release of Monroe 0.2.0, a new nREPL client for Emacs. This release comes with a bunch of fixes and some new features, like support for interrupting remote evaluations, reading from stdin, getting exception details and more. Release changes and download link are on https://github.com/sanel/monroe/releases/tag/0.2.0. You can also get Monroe from *MELPA* or *Marmalade*. Thanks everyone who helped by reporting bugs and suggesting new features. Cheers! Sanel -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Starting a project the right way - tips?
I've gotten on well with using Component https://github.com/stuartsierra/component for managing the high-level I/O dependencies of my application. There's also Ring-Defaults https://github.com/ring-clojure/ring-defaults, which provides sensible and customisable default middleware settings. - James On 27 October 2014 11:07, Colin Yates colin.ya...@gmail.com wrote: About to embark on a new project and interested in wish I knew this/wish I had used this type sentiments. An extension of this splendid article: http://blog.mattgauger.com/blog/2014/09/15/clojure-code-quality-tools/. Any others? For context, this is going to be a non-trivial SPA using clojurescript supported by a Clojure backend ( https://groups.google.com/d/topic/clojurescript/9cDFfAGsDE4/discussion) In addition to the tips I found in the article I am also planning on using core.typed, primarily to address the anyone remember what this data structure looked like? 12 month maintenance risk. I did look at schematic but I like the extra enforcement core.typed gives. On a side note, answering this question from google alone is non-trivial. We, as a community have reached that point where there are so many (good, but overlapping and sometimes contradictory) good next steps it is easy to be paralysed by choice. A few more authorized (whatever that means) prescriptions wouldn't go amiss. Not sure what the answer is, merely raising the flag. So, what tips/techniques/XYZ do you wish you had started with? Thanks! -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Starting a project the right way - tips?
Thanks all. Just managed to wire in clojurescript.test into my lein build - woot :). On Monday, October 27, 2014 1:38:02 PM UTC, James Reeves wrote: I've gotten on well with using Component https://github.com/stuartsierra/component for managing the high-level I/O dependencies of my application. There's also Ring-Defaults https://github.com/ring-clojure/ring-defaults, which provides sensible and customisable default middleware settings. - James On 27 October 2014 11:07, Colin Yates colin...@gmail.com javascript: wrote: About to embark on a new project and interested in wish I knew this/wish I had used this type sentiments. An extension of this splendid article: http://blog.mattgauger.com/blog/2014/09/15/clojure-code-quality-tools/. Any others? For context, this is going to be a non-trivial SPA using clojurescript supported by a Clojure backend ( https://groups.google.com/d/topic/clojurescript/9cDFfAGsDE4/discussion) In addition to the tips I found in the article I am also planning on using core.typed, primarily to address the anyone remember what this data structure looked like? 12 month maintenance risk. I did look at schematic but I like the extra enforcement core.typed gives. On a side note, answering this question from google alone is non-trivial. We, as a community have reached that point where there are so many (good, but overlapping and sometimes contradictory) good next steps it is easy to be paralysed by choice. A few more authorized (whatever that means) prescriptions wouldn't go amiss. Not sure what the answer is, merely raising the flag. So, what tips/techniques/XYZ do you wish you had started with? Thanks! -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clo...@googlegroups.com javascript: Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+u...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Cannot understand why I get this output.
Hello, I have this facts. (def octavia {:name Octavia E. Butler :birth-year 1947 :death-year 2006}) (def wild-seed {:title Wild Seed, :authors [octavia]}) So I thought when I do this : (defn old-book-new-book [book] (get book :authors)) (old-book-new-book {:title Wild Seed, :authors [octavia]}) I see this output : [{:death-year 2006, :name Octavia E. Butler, :birth-year 1947}] where I expected it to be octavia or octavia E. Butler Can someone explain why I see the wrong output ? Roelof But I see this output : -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Starting a project the right way - tips?
I ham-fistedly kill and reset the DB before every test using clojure.test fixtures. Passing the conn never occurred to me, and I kind of wish I did it that way. Currently I have any reading database functions accept the db (which makes testing using “with” very fast and easy), and any writing functions return the tx-data rather than executing it directly. This also makes testing easier, as I can assert on the exact tx-data expected, or again use with in my tests to check the side-effects. As a result the only tests I have that actually touch db state are anything that check my actual routing code. — Ashton On Mon, Oct 27, 2014 at 7:52 AM, Sven Richter sver...@googlemail.com wrote: Hi Ashton, After some discussion in the datomic and clojure irc channel I decided to go the route to pass in the datomic connection or datomic value to every function. This way it is really easy to do integration tests of these functions by setting up an in memory datomic database for every single one of my tests. Mixing in some fixtures and I was done. I am curious, how did you solve this finally? Best Regards, Sven Am Montag, 27. Oktober 2014 14:25:12 UTC+1 schrieb Ashton Kemerling: Consider how your database will be setup and handled. My project uses Datomic (also a SPA), but it was a little painful learning how to get the tests to run cleanly with the database being setup and torn down between runs. Also, consider using Secretary on the frontend early. I’m using Om and thought I could get away without it by using component state to control what is displayed, and boy was I wrong. — Ashton On Mon, Oct 27, 2014 at 6:54 AM, Joshua Ballanco jbal...@gmail.com javascript: wrote: Just in case you hadn’t already come across it in your Google-ing, I thought you should know about http://clojure-doc.org . This site is more than just API documentation, it also contains a number of useful guides covering various topics in Clojure. It’s not exactly a collection of prescriptions, but it might help you figure out what direction to head in more than just reading the API docs would. Cheers, Josh On October 27, 2014 at 13:08:42, Colin Yates (colin...@gmail.com javascript:) wrote: About to embark on a new project and interested in wish I knew this/wish I had used this type sentiments. An extension of this splendid article: http://blog.mattgauger.com/blog/2014/09/15/clojure-code-quality-tools/. Any others? For context, this is going to be a non-trivial SPA using clojurescript supported by a Clojure backend ( https://groups.google.com/d/topic/clojurescript/9cDFfAGsDE4/discussion) In addition to the tips I found in the article I am also planning on using core.typed, primarily to address the anyone remember what this data structure looked like? 12 month maintenance risk. I did look at schematic but I like the extra enforcement core.typed gives. On a side note, answering this question from google alone is non-trivial. We, as a community have reached that point where there are so many (good, but overlapping and sometimes contradictory) good next steps it is easy to be paralysed by choice. A few more authorized (whatever that means) prescriptions wouldn't go amiss. Not sure what the answer is, merely raising the flag. So, what tips/techniques/XYZ do you wish you had started with? Thanks! -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clo...@googlegroups.com javascript: Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+u...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. signature.asc -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to
[ANN] cats 0.2.0 - category theory abstractions for Clojure(Script)
Hello everybody, I wanted to announce the 0.2.0 release of cats, a library with category theory abstractions for Clojure(Script) heavily inspired by Haskell. This release packs a lot of punch: - Major API redesign. - Split of monad definitions from the data types. - New monads: Reader, Writer, Identity, Lazy and Exception. - Full support for monad transformers and transformer versions of almost all implemented monads. The docs haven't catched up yet but we are working on completing them, since we're happy with the API the dev docs should also describe this version. We will be writing docs during the next days. Repository: https://github.com/niwibe/cats Docs: http://niwibe.github.io/cats/ API docs: http://niwibe.github.io/cats/codox/index.html Yours, Alejandro -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Cannot understand why I get this output.
I am unsure of your question then - what you pasted is correct. On the linked page it shows a slightly different output: (old-book-new-book {:title Wild Seed, :authors [octavia]}) ;= {:title Wild Seed, :authors #{octavia}} The #{} syntax is a literal set, that is all. It isn't rendering the contents of octavia, merely indicating that it is a set with a single item in, that item being the var octavia. Maybe if you rephrase the question that might help? On Monday, 27 October 2014 14:10:37 UTC, Roelof Wobben wrote: Nope, the exercise I stated this : (old-book-new-book {:title Wild Seed, :authors [octavia]}) See exercise 22 on this page : http://iloveponies.github.io/120-hour-epic-sax-marathon/structured-data.html#exercise-22 Roelof Op maandag 27 oktober 2014 14:52:23 UTC+1 schreef Colin Yates: (get book :authors) is saying return the value of the :authors key in the book map. You provided {:title... :authors [octavia]} as the book map, the value of authors being a vector with a single element. That single element being {:name Octavia E. Butler :birth-year 1947 :death-year 2006} In other words, it is all working correctly. Did you mean (old-book-new-book {:title Wild Seed, :authors (:name octavia)}) ? On Monday, 27 October 2014 13:45:45 UTC, Roelof Wobben wrote: Hello, I have this facts. (def octavia {:name Octavia E. Butler :birth-year 1947 :death-year 2006}) (def wild-seed {:title Wild Seed, :authors [octavia]}) So I thought when I do this : (defn old-book-new-book [book] (get book :authors)) (old-book-new-book {:title Wild Seed, :authors [octavia]}) I see this output : [{:death-year 2006, :name Octavia E. Butler, :birth-year 1947}] where I expected it to be octavia or octavia E. Butler Can someone explain why I see the wrong output ? Roelof But I see this output : -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Cannot understand why I get this output.
You do read it. You just don't turn it into a set. To turn a vector into a set, you can use the set function: (set [octavia]). On Monday, 27 October 2014, Roelof Wobben rwob...@hotmail.com wrote: correct, What I try to achieve is to read the vector called authors and convert it into a set later. So I thought i could read the contents of author with what I have put into my orginal question but apperently I made a thinking error. So back to the drawing table. :( Roelof Op maandag 27 oktober 2014 15:17:11 UTC+1 schreef Colin Yates: I am unsure of your question then - what you pasted is correct. On the linked page it shows a slightly different output: (old-book-new-book {:title Wild Seed, :authors [octavia]}) ;= {:title Wild Seed, :authors #{octavia}} The #{} syntax is a literal set, that is all. It isn't rendering the contents of octavia, merely indicating that it is a set with a single item in, that item being the var octavia. Maybe if you rephrase the question that might help? On Monday, 27 October 2014 14:10:37 UTC, Roelof Wobben wrote: Nope, the exercise I stated this : (old-book-new-book {:title Wild Seed, :authors [octavia]}) See exercise 22 on this page : http://iloveponies.github.io/ 120-hour-epic-sax-marathon/structured-data.html#exercise-22 Roelof Op maandag 27 oktober 2014 14:52:23 UTC+1 schreef Colin Yates: (get book :authors) is saying return the value of the :authors key in the book map. You provided {:title... :authors [octavia]} as the book map, the value of authors being a vector with a single element. That single element being {:name Octavia E. Butler :birth-year 1947 :death-year 2006} In other words, it is all working correctly. Did you mean (old-book-new-book {:title Wild Seed, :authors (:name octavia)}) ? On Monday, 27 October 2014 13:45:45 UTC, Roelof Wobben wrote: Hello, I have this facts. (def octavia {:name Octavia E. Butler :birth-year 1947 :death-year 2006}) (def wild-seed {:title Wild Seed, :authors [octavia]}) So I thought when I do this : (defn old-book-new-book [book] (get book :authors)) (old-book-new-book {:title Wild Seed, :authors [octavia]}) I see this output : [{:death-year 2006, :name Octavia E. Butler, :birth-year 1947}] where I expected it to be octavia or octavia E. Butler Can someone explain why I see the wrong output ? Roelof But I see this output : -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com javascript:_e(%7B%7D,'cvml','clojure@googlegroups.com'); Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com javascript:_e(%7B%7D,'cvml','clojure%2bunsubscr...@googlegroups.com'); For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com javascript:_e(%7B%7D,'cvml','clojure%2bunsubscr...@googlegroups.com');. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
tools.analyzer.jvm clojure.lang.Var$Unbound cannot be cast to clojure.lang.DynamicClassLoader
Hallo, Im trying to use tools.analyzer to analyse some clojure code and compile it. I have used '(ana/analyze+eval form)' and it has worked nicely. Now I always called my compile function either directly inside of the code, or I would call it like this 'lein run test.clj'. Now I tried to use 'lein uberjar' and use it standalone, but then if fails for protocols. (defprotocol REST (GET [self])) Inside of the project, or with lein run it works correctly. When running the uberjar: Exception in thread main java.lang.ClassCastException: clojure.lang.Var$Unbound cannot be cast to clojure.lang.DynamicClassLoader at clojure.core$gen_interface.doInvoke(genclass.clj:722) at clojure.lang.RestFn.invoke(RestFn.java:521) at clojure.lang.Var.invoke(Var.java:409) at clojure.lang.AFn.applyToHelper(AFn.java:178) at clojure.lang.Var.applyTo(Var.java:700) Is this a bug in tools.analyzer.jvm or is it something with my project compilation? Thanks for your help -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Cannot understand why I get this output.
On Monday, 27 October 2014, Roelof Wobben rwob...@hotmail.com wrote: Now Im complete confused. I never succeed in reading the value of authors so I can do the set command. Roelof And now you're kind of confusing me. What makes you think you do not read the value of authors? What did you expect instead of what you got? -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: filter but for non-sequences
On Monday, October 27, 2014 3:00:40 AM UTC-4, Marcus Magnusson wrote: I don't see how the macro version would offer any performance benefits - in both cases, x is evaluated once and pred is called once. Am I missing something? Nah. Someone upthread suggested a macro, for some reason. I don't see much advantage either, other than saving the overhead of a function call and having exactly the same performance as just writing (if (pred x) x). -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: CCW bug [SEVERE]
On Monday, October 27, 2014 5:05:55 AM UTC-4, Phillip Lord wrote: Fluid Dynamics a209...@trbvm.com javascript: writes: On Saturday, October 25, 2014 10:42:24 PM UTC-4, tbc++ wrote: What if my file had been corrupted, or truncated and only the first 42 bytes of the new version written thus far, or something like that at the moment when the hang started? So there's this new cool thing out there called a version control system. One of the more popular programs in this category is known as git...check it out sometime, it'll help you relax when programming, knowing that previous versions of your file are only a few keystrokes away. Besides, it's stupid to expect everyone to use a version control system, particularly just to ward against bugs that have no business existing in the first place. Actually, no, it's not. Using a VC system is something that more or less every programmer should do. Combined with backups which, no doubt you do, it makes the possibility of loosing work through someone elses fault quite remote. A VC with a number back-up save function on your IDE is the way to go. I'm not going through the ritual of check-in and check-back-out every single time I'd normally hit control-S. Too much friction, too much work-that-isn't-development. Really, you expect me to create an account and publish every little bit of code I play around with on github? Publication of code for VCS isn't really necessary. RCS which was released in 1982 didn't require it (actually, didn't support it). With the advent of DVCS, it's not needed now. Objection: relevance? The OP specifically suggested github, Sometimes I write some function or big static map or vector or something out a line at a time, saving every couple of minutes or if I pause for any reason. I'm certainly not about to commit code in such a state to a VCS, let alone publish it where others can see it. That's what rebasing is for, although I agree it doesn't avoid the usefulness of a numbered backup. I don't even know what rebasing is. I'd much rather not have to either, not when my current workflow is fine for me just so long as my tools have the courtesy not to threaten to crash in the middle of a save. How many hours, weeks, or months of ascending some no-doubt-steep learning curve would be involved in following your recommendation? Would I be able to resume making forward progress on my actual project by Christmas, or would it be closer to Valentine's Day? -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Cannot understand why I get this output.
Op maandag 27 oktober 2014 16:07:15 UTC+1 schreef Gary Verhaegen: On Monday, 27 October 2014, Roelof Wobben rwo...@hotmail.com javascript: wrote: Now Im complete confused. I never succeed in reading the value of authors so I can do the set command. Roelof And now you're kind of confusing me. What makes you think you do not read the value of authors? What did you expect instead of what you got? I expected the outcome : *octavia* but I see the output : [{:death-year 2006, :name Octavia E. Butler, :birth-year 1947}] Roelof -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Cannot understand why I get this output.
The hash map you posted has the value of [octavia] under the key :authors, and that's what printed out. The repl doesnt inline the variable name, instead it prints out the literal value. On Mon, Oct 27, 2014 at 9:22 AM, Roelof Wobben rwob...@hotmail.com wrote: Op maandag 27 oktober 2014 16:07:15 UTC+1 schreef Gary Verhaegen: On Monday, 27 October 2014, Roelof Wobben rwo...@hotmail.com javascript: wrote: Now Im complete confused. I never succeed in reading the value of authors so I can do the set command. Roelof And now you're kind of confusing me. What makes you think you do not read the value of authors? What did you expect instead of what you got? I expected the outcome : *octavia* but I see the output : [{:death-year 2006, :name Octavia E. Butler, :birth-year 1947}] Roelof -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: CCW bug [SEVERE]
On Mon, Oct 27, 2014 at 8:51 PM, Fluid Dynamics a2093...@trbvm.com wrote: Objection: relevance? The OP specifically suggested github, git != github http://en.wikipedia.org/wiki/Git_(software) http://en.wikipedia.org/wiki/GitHub -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Cannot understand why I get this output.
On 27 October 2014 13:45, Roelof Wobben rwob...@hotmail.com wrote: Hello, I have this facts. (def octavia {:name Octavia E. Butler :birth-year 1947 :death-year 2006}) So you've assigned the var octavia to the data structure: {:death-year 2006, :name Octavia E. Butler, :birth-year 1947} (def wild-seed {:title Wild Seed, :authors [octavia]}) Here you've assigned the var wild-seed to: {:title Wild Seed, :authors [octavia]} Which is the same as: {:title Wild Seed, :authors [{:death-year 2006, :name Octavia E. Butler, :birth-year 1947}]} So I thought when I do this : (defn old-book-new-book [book] (get book :authors)) (old-book-new-book {:title Wild Seed, :authors [octavia]}) Okay, so work through your code. You start with: (old-book-new-book {:title Wild Seed, :authors [octavia]}) Resolving this gets: (get {:title Wild Seed, :authors [octavia]} :authors) Resolving this gets: [octavia] Which resolves to: [{:death-year 2006, :name Octavia E. Butler, :birth-year 1947}] I'm not sure why you'd expect anything else. Did you not expect octavia to resolve? - James -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Cannot understand why I get this output.
Op maandag 27 oktober 2014 16:37:49 UTC+1 schreef James Reeves: On 27 October 2014 13:45, Roelof Wobben rwo...@hotmail.com javascript: wrote: Hello, I have this facts. (def octavia {:name Octavia E. Butler :birth-year 1947 :death-year 2006}) So you've assigned the var octavia to the data structure: {:death-year 2006, :name Octavia E. Butler, :birth-year 1947} (def wild-seed {:title Wild Seed, :authors [octavia]}) Here you've assigned the var wild-seed to: {:title Wild Seed, :authors [octavia]} Which is the same as: {:title Wild Seed, :authors [{:death-year 2006, :name Octavia E. Butler, :birth-year 1947}]} So I thought when I do this : (defn old-book-new-book [book] (get book :authors)) (old-book-new-book {:title Wild Seed, :authors [octavia]}) Okay, so work through your code. You start with: (old-book-new-book {:title Wild Seed, :authors [octavia]}) Resolving this gets: (get {:title Wild Seed, :authors [octavia]} :authors) Resolving this gets: [octavia] Which resolves to: [{:death-year 2006, :name Octavia E. Butler, :birth-year 1947}] I'm not sure why you'd expect anything else. Did you not expect octavia to resolve? - James I think I do not fully understand how clojure works as a beginner. As far as I see it I have to find a way to stop with [octavia] so I can make a set of it. Roelof -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: CCW bug [SEVERE]
Whenever someone has suggested something (using git, submitting a bug report), you've replied (paraphrase) meh, I can't be bothered. Okay, that's fine, is it also okay if we reply to your bug report with meh, we can't be bothered? I'm sure many people here are willing to help with your problems if you're willing to meet them half way. That's how free software works. You've been given an IDE for free, people have spent their time making something they give away. All they ask is that you be willing to give a bit in return in submitting a bug report or doing a bit of investigation on your own. Timothy On Mon, Oct 27, 2014 at 9:30 AM, Yohan Pereira yohan.pere...@gmail.com wrote: On Mon, Oct 27, 2014 at 8:51 PM, Fluid Dynamics a2093...@trbvm.com wrote: Objection: relevance? The OP specifically suggested github, git != github http://en.wikipedia.org/wiki/Git_(software) http://en.wikipedia.org/wiki/GitHub -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- “One of the main causes of the fall of the Roman Empire was that–lacking zero–they had no way to indicate successful termination of their C programs.” (Robert Firth) -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Cannot understand why I get this output.
Thanks, I already understand what happens now. Im now trying to find a way to convert this :authors [octavia] to :authors #{octavia} Somehow I have to use set I think but I have to figure out how . Roelof Op maandag 27 oktober 2014 16:48:10 UTC+1 schreef Ashton Kemerling: I think you're confused on the terminal output. Try typing [octavia] in the repl, and compare the output you get to the above code. Clojure prints out the raw values of any computation, not variable names. On Mon, Oct 27, 2014 at 9:45 AM, Roelof Wobben rwo...@hotmail.com javascript: wrote: Op maandag 27 oktober 2014 16:37:49 UTC+1 schreef James Reeves: On 27 October 2014 13:45, Roelof Wobben rwo...@hotmail.com wrote: Hello, I have this facts. (def octavia {:name Octavia E. Butler :birth-year 1947 :death-year 2006}) So you've assigned the var octavia to the data structure: {:death-year 2006, :name Octavia E. Butler, :birth-year 1947} (def wild-seed {:title Wild Seed, :authors [octavia]}) Here you've assigned the var wild-seed to: {:title Wild Seed, :authors [octavia]} Which is the same as: {:title Wild Seed, :authors [{:death-year 2006, :name Octavia E. Butler, :birth-year 1947}]} So I thought when I do this : (defn old-book-new-book [book] (get book :authors)) (old-book-new-book {:title Wild Seed, :authors [octavia]}) Okay, so work through your code. You start with: (old-book-new-book {:title Wild Seed, :authors [octavia]}) Resolving this gets: (get {:title Wild Seed, :authors [octavia]} :authors) Resolving this gets: [octavia] Which resolves to: [{:death-year 2006, :name Octavia E. Butler, :birth-year 1947}] I'm not sure why you'd expect anything else. Did you not expect octavia to resolve? - James I think I do not fully understand how clojure works as a beginner. As far as I see it I have to find a way to stop with [octavia] so I can make a set of it. Roelof -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clo...@googlegroups.com javascript: Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+u...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Cannot understand why I get this output.
I think you're confused on the terminal output. Try typing [octavia] in the repl, and compare the output you get to the above code. Clojure prints out the raw values of any computation, not variable names. On Mon, Oct 27, 2014 at 9:45 AM, Roelof Wobben rwob...@hotmail.com wrote: Op maandag 27 oktober 2014 16:37:49 UTC+1 schreef James Reeves: On 27 October 2014 13:45, Roelof Wobben rwo...@hotmail.com javascript: wrote: Hello, I have this facts. (def octavia {:name Octavia E. Butler :birth-year 1947 :death-year 2006}) So you've assigned the var octavia to the data structure: {:death-year 2006, :name Octavia E. Butler, :birth-year 1947} (def wild-seed {:title Wild Seed, :authors [octavia]}) Here you've assigned the var wild-seed to: {:title Wild Seed, :authors [octavia]} Which is the same as: {:title Wild Seed, :authors [{:death-year 2006, :name Octavia E. Butler, :birth-year 1947}]} So I thought when I do this : (defn old-book-new-book [book] (get book :authors)) (old-book-new-book {:title Wild Seed, :authors [octavia]}) Okay, so work through your code. You start with: (old-book-new-book {:title Wild Seed, :authors [octavia]}) Resolving this gets: (get {:title Wild Seed, :authors [octavia]} :authors) Resolving this gets: [octavia] Which resolves to: [{:death-year 2006, :name Octavia E. Butler, :birth-year 1947}] I'm not sure why you'd expect anything else. Did you not expect octavia to resolve? - James I think I do not fully understand how clojure works as a beginner. As far as I see it I have to find a way to stop with [octavia] so I can make a set of it. Roelof -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Cannot understand why I get this output.
On Monday, 27 October 2014, Roelof Wobben rwob...@hotmail.com javascript:_e(%7B%7D,'cvml','rwob...@hotmail.com'); wrote: I expected the outcome : *octavia* but I see the output : [{:death-year 2006, :name Octavia E. Butler, :birth-year 1947}] Roelof I see. You will not get octavia as an outcome. The presentation in iloveponies seems to be slightly misleading. In the evaluation model for Clojure (and the vast majority of peogramming languages), arguments are evaluated first, and the language does not keep track of which expression produced a value. What is important to understand is that octavia has been resolved (repmaced by its associated value) even before the value is bound to wild-seed. If this is not clear for you, I'd say you've reached the limit of hands-on learning and it's time for some theory. You really need to understand the evaluation model before going further. A free resource I'd recommend for that is Aphyr's tutorial: http://aphyr.com/posts/301-clojure-from-the-ground-up-welcome If you have any money available, I would highly recommend Brian Marick's Functional Programming for the Object Oriented Programmer. If you have no experience with OOP, you will probably have trouble understanding the points of chapters 4 and on, but even then, I think the book is worth buying for the first three chapters, which have a great explanation of Clojure's evaluation model. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: tools.analyzer.jvm clojure.lang.Var$Unbound cannot be cast to clojure.lang.DynamicClassLoader
Hi Nick, I looked into it, I'm not sure if this should be considered a clojure bug, a lein bug or a t.a.jvm one (I'd expect Compiler/LOADER to always be bound during compilation) but in the meantime I've pushed a workaround that should fix this and a 0.6.2 version is on its way to Maven Central. It should be available in a couple of hours, please let me know if it solved your issue or not. Thanks, Nicola Nick Zbinden writes: Hallo, Im trying to use tools.analyzer to analyse some clojure code and compile it. I have used '(ana/analyze+eval form)' and it has worked nicely. Now I always called my compile function either directly inside of the code, or I would call it like this 'lein run test.clj'. Now I tried to use 'lein uberjar' and use it standalone, but then if fails for protocols. (defprotocol REST (GET [self])) Inside of the project, or with lein run it works correctly. When running the uberjar: Exception in thread main java.lang.ClassCastException: clojure.lang.Var$Unbound cannot be cast to clojure.lang.DynamicClassLoader at clojure.core$gen_interface.doInvoke(genclass.clj:722) at clojure.lang.RestFn.invoke(RestFn.java:521) at clojure.lang.Var.invoke(Var.java:409) at clojure.lang.AFn.applyToHelper(AFn.java:178) at clojure.lang.Var.applyTo(Var.java:700) Is this a bug in tools.analyzer.jvm or is it something with my project compilation? Thanks for your help -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: CCW bug [SEVERE]
Fluid Dynamics a2093...@trbvm.com writes: Really, you expect me to create an account and publish every little bit of code I play around with on github? Publication of code for VCS isn't really necessary. RCS which was released in 1982 didn't require it (actually, didn't support it). With the advent of DVCS, it's not needed now. Objection: relevance? The OP specifically suggested github, You don't have to publish with github either, but then you do have to pay them. Sometimes I write some function or big static map or vector or something out a line at a time, saving every couple of minutes or if I pause for any reason. I'm certainly not about to commit code in such a state to a VCS, let alone publish it where others can see it. That's what rebasing is for, although I agree it doesn't avoid the usefulness of a numbered backup. I don't even know what rebasing is. Rewriting history. The general usage pattern is that you start a feature branch, make 20 attempts to get it working before you get it right. Once it's right, you squash your previous commits down so that just the correct changes get in. In the process, you lose the intermediate history, which is a) good because you have deleted all the junk, so it's easier to read and b) bad because you have lost the history. I'd much rather not have to either, not when my current workflow is fine for me just so long as my tools have the courtesy not to threaten to crash in the middle of a save. How many hours, weeks, or months of ascending some no-doubt-steep learning curve would be involved in following your recommendation? Would I be able to resume making forward progress on my actual project by Christmas, or would it be closer to Valentine's Day? That sort of depends on you. But, either way, you'll understand rebasing, and you'll have some mighty tales to tell about the rebase vs merge controversy. I've always found these go down very well at parties or romantic dinners. Phil -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: multimethod, record, type, and protocol pitfalls?
These responses are all super helpful, thank you! I'd love to hear more pitfalls/pain points if anyone else wants to share. Thanks! Daniel On Monday, October 27, 2014 6:59:43 AM UTC-4, Gary Verhaegen wrote: As recently mentioned on another thread, this also means that you cannot have two different protocols with the same method names in the same namespace. This may be surprising, especially from an OO background, where it is very natural to have two types with the same operations. On Monday, 27 October 2014, Sven Richter sve...@googlemail.com javascript: wrote: Hi Daniel, When running through tutorials and blog posts it did not occur to me that the functions of a defprotocol are namespaced to where they are defined. Meaning, calling these functions I have to use their original namespace. It is obvious when one reads the official documentation, but one does not always do this first, so that wsa one pitfall I ran into. Best Regards, Sven Am Sonntag, 26. Oktober 2014 16:48:29 UTC+1 schrieb Daniel Higginbotham: What's difficult when it comes to understanding multimethods, records, types, and protocols? I'm writing a chapter on multimethods, records, types, and protocols for the book Clojure for the Brave and True, and I'd love to hear about what kinds of pitfalls I should be sure to cover :) Thanks! Daniel -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: multimethod, record, type, and protocol pitfalls?
The differences between OOP and multimethods should be stressed. I just wrote about this on my blog, and those who mostly worked with OOP kept wondering, how do you get inheritance of functionality? Actually, they did not ask this clearly, so it took me awhile to understand their question, and then explain that you can simulate something like the inheritance of an interface, but not functionality. I also said that keyword inheritance and polymorphism could be combined to deliver a simulation of OOP style inheritance of functionality. But folks coming from the OOP world tend to hear the word inheritance and think there is a way to inherit functionality, and that is not really true. It's sort of an advanced subject, but you can store keywords (belonging to some hierarchy) in the :tags metadata on the var and then match against that with multimethds, and simulate something close to the OOP style, but that leads into the question of why it might be a bad idea to try to imitate every OOP idea in Clojure. There are some questions on Stackoverflow where people ask How do I get inheritance of functionality in Clojure? On Sunday, October 26, 2014 11:48:29 AM UTC-4, Daniel Higginbotham wrote: What's difficult when it comes to understanding multimethods, records, types, and protocols? I'm writing a chapter on multimethods, records, types, and protocols for the book Clojure for the Brave and True, and I'd love to hear about what kinds of pitfalls I should be sure to cover :) Thanks! Daniel -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
multimethod, record, type, and protocol pitfalls?
It has not been a pain point for me so far, but there is one more thing that may be somewhat surprising: multimethods and protocols introduce non-locality into the code. This means that, with code that uses multimethods or protocols, sometimes requiring a namespace and not using any symbol from it is not a mistake. It also means that debugging gets a lot harder. They are both pretty good to provide extension points, but it is a tradeoff that is maybe not emphasized enough, as code locality is, for me, the biggest advantage of functional programming. This is somewhat akin to use vs require. On Monday, 27 October 2014, Daniel Higginbotham nonrecurs...@gmail.com javascript:_e(%7B%7D,'cvml','nonrecurs...@gmail.com'); wrote: These responses are all super helpful, thank you! I'd love to hear more pitfalls/pain points if anyone else wants to share. Thanks! Daniel On Monday, October 27, 2014 6:59:43 AM UTC-4, Gary Verhaegen wrote: As recently mentioned on another thread, this also means that you cannot have two different protocols with the same method names in the same namespace. This may be surprising, especially from an OO background, where it is very natural to have two types with the same operations. On Monday, 27 October 2014, Sven Richter sve...@googlemail.com wrote: Hi Daniel, When running through tutorials and blog posts it did not occur to me that the functions of a defprotocol are namespaced to where they are defined. Meaning, calling these functions I have to use their original namespace. It is obvious when one reads the official documentation, but one does not always do this first, so that wsa one pitfall I ran into. Best Regards, Sven Am Sonntag, 26. Oktober 2014 16:48:29 UTC+1 schrieb Daniel Higginbotham: What's difficult when it comes to understanding multimethods, records, types, and protocols? I'm writing a chapter on multimethods, records, types, and protocols for the book Clojure for the Brave and True, and I'd love to hear about what kinds of pitfalls I should be sure to cover :) Thanks! Daniel -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Testing and infrastructure management for large Clojure app - how are you doing it?
On our non-trivial application, we have broken our testing into the following sets: * Unit Tests -- written by devs, run as part of our integration builder and when doing dev * Integration Tests -- automated, hitting our external APIs, written in clojure, maintained by the devs mostly, run as part of integration builder, and occasionally during dev * System Test -- Performed by QA team, manual and automated (using Ruby and pythong) against our external APIs, performed as final phase of our 2 week release cycle Domain knowledge (malware analysis) is a bigger limiter than clojure experience when it comes to our testing. Our QA team doesn't know clojure at all. They use the same public facing APIs for their tests that we expose to the customers. As far as infrastructure management, the same mechanism we use to deploy a production instance is used to deploy a staging and testing instance. There is nothing clojure specific about this, in fact it's Arch linux packages, systemd, and our own hand-rolled tachikoma orchestration tool. I would not try and pull in everything into your system and have deployment/configuration managed by clojure. I would not have testers writing unit tests. I would not have coders writing System Tests. Integration tests, depending on what interface they are targeting, can be done in any language. Most of ours are in clojure because we wrote an HTTP client early on, clj-mook, and didn't have a dedicatd QA team. Since then, we have integration tests implemented in a few different languages. In short, our system seems quite similiar to yours, but we are not trying to unify our test stack, or take over deploy/config in clojure (even tho we're at the core of the whole system). We leave that to the tools our Ops and QA team selects, and I don't see sufficient win in unifying all of them under clojure to justify that. On Mon, Oct 27, 2014 at 12:21 AM, David Mitchell monch1...@gmail.com wrote: Hi group, Apologies for the somewhat cryptic subject line - I'll try to explain... Apologies also for the length of the post, but I'm sure others will hit the same problem if they haven't already done so, and hopefully this discussion will help them find a way out of a sticky situation. We've got a (notionally agile) Clojure app under heavy development. The project itself follows the Agile Manifesto to a degree, but is constrained in having to interface with other applications that are following a waterfall process. Yep, it's awkward, but that's not what I'm asking about. Simplifying it as much as possible, we started with a pre-existing, somewhat clunky, Java app, then extended the server side extensively using Clojure, and added a web client. There's loads of (non-Clojure) supporting infrastructure - database cluster, queue servers, identity management, etc. At any point, we've got multiple streams of Clojure development going on, hitting different parts of the app. The web client development is traditional in that it's not using ClojureScript, and probably won't in the foreseeable future. As mentioned above, a key point is that the app has a significant requirement to interface to legacy systems - other Java apps, SAP, Oracle identity management stack and so on. From a testing perspective, for this app we've got unit tests written in Clojure/midje which are maintained by the app developers (as you'd expect). These work well and midje is a good fit for the app. However, given all the various infrastructure requirements of the app, it's hard to see how we can use midje to go all the way up the testing stack (unit - system - integration - pre-production - production). From the web client perspective, we've got UI automation tests written using Ruby/Capybara, a toolset which I suspect was chosen based on the existing skillset of the pool of testers. Again this works well for us. The problem is with the middle ground between the two extremes of unit and UI testing - our glaring problem at present is with integration testing, but there's also a smaller problem with system testing. We're struggling to find an approach that works here, given the skillsets we have on hand - fundamentally, we've got a (small) pool of developers who know Clojure, a (small) pool of testers who know Ruby, and a larger pool of testers who do primarily non-automated testing. In an ideal world, we'd probably use Clojure for all automated testing. It seems relatively straightforward to use Stuart Sierra's component library (https://github.com/stuartsierra/component) to mock out infrastructure components such as databases, queues, email servers etc., and doing so would let us address our system-level testing. On the integration front, we could conceivably also leverage the same component library to manage the state of all the various infrastructure components that the app depends on, and thus ensure that we had a suitably production-like environment for
Re: Cannot understand why I get this output.
Thanks. I did a peek at the answer and it seems that this one do make it work. (defn old-book-new-book [book] (let [authors (get book :authors)] (assoc book :authors (set authors Roelof Edit 1 : I think I found it. The course is in 1.5.1 and im not trying it in 1.6.0 Op maandag 27 oktober 2014 16:55:32 UTC+1 schreef Gary Verhaegen: On Monday, 27 October 2014, Roelof Wobben rwob...@hotmail.com wrote: I expected the outcome : *octavia* but I see the output : [{:death-year 2006, :name Octavia E. Butler, :birth-year 1947}] Roelof I see. You will not get octavia as an outcome. The presentation in iloveponies seems to be slightly misleading. In the evaluation model for Clojure (and the vast majority of peogramming languages), arguments are evaluated first, and the language does not keep track of which expression produced a value. What is important to understand is that octavia has been resolved (repmaced by its associated value) even before the value is bound to wild-seed. If this is not clear for you, I'd say you've reached the limit of hands-on learning and it's time for some theory. You really need to understand the evaluation model before going further. A free resource I'd recommend for that is Aphyr's tutorial: http://aphyr.com/posts/301-clojure-from-the-ground-up-welcome If you have any money available, I would highly recommend Brian Marick's Functional Programming for the Object Oriented Programmer. If you have no experience with OOP, you will probably have trouble understanding the points of chapters 4 and on, but even then, I think the book is worth buying for the first three chapters, which have a great explanation of Clojure's evaluation model. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: CCW bug [SEVERE]
On Monday, October 27, 2014 10:21:35 AM UTC-5, Fluid Dynamics wrote: I'm not going through the ritual of check-in and check-back-out every single time I'd normally hit control-S. Too much friction, too much work-that-isn't-development. Doesn't Eclipse already have a local file history version system built in that captures every save? -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [ANN] Clojure 1.7.0-alpha3 now available
Both apply and variadic functions have some overhead. This helps address both. On Mon, Oct 27, 2014 at 11:50 AM, Alex Miller a...@puredanger.com wrote: On Monday, October 27, 2014 9:36:02 AM UTC-5, Phillip Lord wrote: And the performance boost is just to avoid the list creation in the variadic argument? Yes. There's some perf timings in the ticket. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- “One of the main causes of the fall of the Roman Empire was that–lacking zero–they had no way to indicate successful termination of their C programs.” (Robert Firth) -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: multimethod, record, type, and protocol pitfalls?
On Mon, Oct 27, 2014 at 2:21 PM, larry google groups lawrencecloj...@gmail.com wrote: The differences between OOP and multimethods should be stressed. I just wrote about this on my blog, and those who mostly worked with OOP kept wondering, how do you get inheritance of functionality? First of all, let me state that I'm a complete Clojure noob. Still, I thought that Clojure's multimethods were a completely valid OOP approach. Q uoting Alan Kay: OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things. It can be done in Smalltalk and in LISP. There are possibly other systems in which this is possible, but I'm not aware of them. Notice that he intentionally left inheritance out from that definition. That means that the class based, C++ style that we usually call OOP is actually just one particular kind of OOP - so the way that JavaScript, Common-Lisp CLOS and, as I see it, Clojure multimethods do it are also valid OOP as well, I believe. Am I right? Or am I missing something here? Thanks in advance, Rogerio. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: multimethod, record, type, and protocol pitfalls?
Notice that he intentionally left inheritance out from that definition. there are more connotations of object oriented than there are quills on a porcupine. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: CCW bug [SEVERE]
On Monday, October 27, 2014 11:45:47 AM UTC-4, tbc++ wrote: Whenever someone has suggested something (using git, submitting a bug report), you've replied (paraphrase) meh, I can't be bothered. The former suggestion, especially, seems excessively heavyweight for the particular circumstances. Like suggesting I trade in my Miata for an armored Brinks van for driving to work, because of the small chance of crossing paths with terrorists along the way. While neglecting other considerations, such as the vehicle's top speed and fuel economy among other things ... not to mention whether it will still fit in my parking space. :) -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Cannot understand why I get this output.
Wierd, also on 1.5.1 I see the same output as 1.6.0. So there is a error in the page or the test are not checking it properly . Pity, this is a way I like to learn. Roelof Op maandag 27 oktober 2014 18:03:29 UTC+1 schreef Roelof Wobben: Thanks. I did a peek at the answer and it seems that this one do make it work. (defn old-book-new-book [book] (let [authors (get book :authors)] (assoc book :authors (set authors Roelof Edit 1 : I think I found it. The course is in 1.5.1 and im not trying it in 1.6.0 Op maandag 27 oktober 2014 16:55:32 UTC+1 schreef Gary Verhaegen: On Monday, 27 October 2014, Roelof Wobben rwob...@hotmail.com wrote: I expected the outcome : *octavia* but I see the output : [{:death-year 2006, :name Octavia E. Butler, :birth-year 1947}] Roelof I see. You will not get octavia as an outcome. The presentation in iloveponies seems to be slightly misleading. In the evaluation model for Clojure (and the vast majority of peogramming languages), arguments are evaluated first, and the language does not keep track of which expression produced a value. What is important to understand is that octavia has been resolved (repmaced by its associated value) even before the value is bound to wild-seed. If this is not clear for you, I'd say you've reached the limit of hands-on learning and it's time for some theory. You really need to understand the evaluation model before going further. A free resource I'd recommend for that is Aphyr's tutorial: http://aphyr.com/posts/301-clojure-from-the-ground-up-welcome If you have any money available, I would highly recommend Brian Marick's Functional Programming for the Object Oriented Programmer. If you have no experience with OOP, you will probably have trouble understanding the points of chapters 4 and on, but even then, I think the book is worth buying for the first three chapters, which have a great explanation of Clojure's evaluation model. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Cannot understand why I get this output.
On 27 October 2014 19:16, Roelof Wobben rwob...@hotmail.com wrote: Wierd, also on 1.5.1 I see the same output as 1.6.0. So there is a error in the page or the test are not checking it properly . Could you explain what you think is an error? Your messages are a little cryptic. - James -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Cannot understand why I get this output.
of course I can. If I look at answers other people gives then this is the solution : (defn old-book-new-book [book] (assoc book :authors (set (book :authors))) ) and then according to the explanation I would see this output ; (old-book-new-book {:title Wild Seed, :authors [octavia]});= {:title Wild Seed, :authors #{octavia}} but on 1.6.0 and on 1.5.1 I see another output as discussed here. But it seems that midje has aprove this solution so or midje checks against another output And then the tekst on the tutorial is very wrong. Or midje checks and aproves the wrong answer ( the answer in the text) and aproves the wrong answer. Roelof On Monday, October 27, 2014 8:24:12 PM UTC+1, James Reeves wrote: On 27 October 2014 19:16, Roelof Wobben rwo...@hotmail.com javascript: wrote: Wierd, also on 1.5.1 I see the same output as 1.6.0. So there is a error in the page or the test are not checking it properly . Could you explain what you think is an error? Your messages are a little cryptic. - James -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Cannot understand why I get this output.
On 27 October 2014 19:37, Roelof Wobben rwob...@hotmail.com wrote: of course I can. If I look at answers other people gives then this is the solution : (defn old-book-new-book [book] (assoc book :authors (set (book :authors))) ) and then according to the explanation I would see this output ; (old-book-new-book {:title Wild Seed, :authors [octavia]});= {:title Wild Seed, :authors #{octavia}} but on 1.6.0 and on 1.5.1 I see another output as discussed here. I don't think you're understanding that: {:title Wild Seed, :authors #{{:name Octavia E. Butler, :birth-year 1947, :death-year 2006}}} Evaluates to the same thing as: {:title Wild Seed, :authors #{octavia}} The difference is that in the first value, octavia has been replaced with its value. You can confirm the two data structures are the same by checking their equality: (= {:title Wild Seed, :authors #{{:name Octavia E. Butler, :birth-year 1947, :death-year 2006}} {:title Wild Seed, :authors #{octavia}}} This should return true. - James -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: multimethod, record, type, and protocol pitfalls?
On Mon, Oct 27, 2014 at 4:13 PM, Raoul Duke rao...@gmail.com wrote: Notice that he intentionally left inheritance out from that definition. there are more connotations of object oriented than there are quills on a porcupine. Sure. But since Alan Kay is the guy who invented the term object oriented, I guess his definition should be, at least, considered. It seems that nowadays that only Java is properly object oriented. This is far from true. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Cannot understand why I get this output.
nope, there is somewhere a error in the example. When I copie it as you made it then I see this error message : RuntimeException Unmatched delimiter: } clojure.lang.Util.runtimeException (Util.java:219) when I add a extra ) I see this message : RuntimeException Map literal must contain an even number of forms clojure.lang.Util.runtimeException (Util.java:219) Roelof Op maandag 27 oktober 2014 20:46:49 UTC+1 schreef James Reeves: On 27 October 2014 19:37, Roelof Wobben rwo...@hotmail.com javascript: wrote: of course I can. If I look at answers other people gives then this is the solution : (defn old-book-new-book [book] (assoc book :authors (set (book :authors))) ) and then according to the explanation I would see this output ; (old-book-new-book {:title Wild Seed, :authors [octavia]});= {:title Wild Seed, :authors #{octavia}} but on 1.6.0 and on 1.5.1 I see another output as discussed here. I don't think you're understanding that: {:title Wild Seed, :authors #{{:name Octavia E. Butler, :birth-year 1947, :death-year 2006}}} Evaluates to the same thing as: {:title Wild Seed, :authors #{octavia}} The difference is that in the first value, octavia has been replaced with its value. You can confirm the two data structures are the same by checking their equality: (= {:title Wild Seed, :authors #{{:name Octavia E. Butler, :birth-year 1947, :death-year 2006}} {:title Wild Seed, :authors #{octavia}}} This should return true. - James -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Clojure and concurrency
Loan, thank you! kl. 21:03:59 UTC+1 søndag 26. oktober 2014 skrev Leon Grapenthin følgende: On Sunday, October 26, 2014 11:37:43 AM UTC+1, Øyvind Teig wrote: I have been reading myself up on Clojure concurrency, starting at [1]. In [2] I read that The Clojure STM uses multiversion concurrency control with adaptive history queues for snapshot isolation, and provides a distinct commute operation but it still needs some explanation to me. Software transactional memory (STM) is described ok. But the adaptive history queues looks like implementation. In ADA, tasks on rendezvous queue up (so the Ravenscar high security profile prohibits them because they are non-deterministic). In Go goroutines on selective choice's select are queued (also nondeterministic). In occam the there is no such queue on the ALT. How is the Clojure queue, and what does it contain? I see that exchanging data between Clojure concurrent functions (threads?) described. But I haven't discovered how a thread that succeeds in writing, followed by a successful write immediately after by another thread - is signalled to the first thread? Is there any *wait* type of mechanism? There is no signalling. The write in the first thread always succeeds within the transaction but the real world is not affected until the transaction succeeds as a whole. If during the transaction another transaction succeeded, it is retried as a whole, potentially with the new values written by the other transaction, until it has also succeeded. So, this is basically as with atomics, no signalling? Is this because as such signalling is not needed, the basic algorithms that this is used on don't need such signalling? And if it's needed, then semaphors etc. may be built on top of these? A critical region has no signalling either, and it's ok in the context I, as an embedded programmer would most often see it: communication with interrupts. But of course, this involves some kind of polling to pick up something that's delivered from an interrupt. If a write fails and there is a retry, what's the limit of retries, is there a yield in between, and in case, how is this entry queued? There is no limit. (Unfortunately I don't know about the implementation details and hopefully somebody else can enlighten you on that.) Is it correct to say that *never to block means never to be 100% sure that a transaction succeeds at first attempt*? Yes. Good to have this confirmed, it helps my understanding; I haven't seen that sentence before. [3] states on commute that Thus fun should be commutative, or, failing that, you must accept last-one-in-wins behavior. commute allows for more concurrency than ref-set.. What's the metric of concurrency? No, little, some, more, much, max? How much happens at the same time in contrast to being queued up. Remember that only successful transactions affect the outside world. E. g.: Of two successful transactions, one had to be restarted because of the other completed during its first try = The two successful transactions didn't happen in parallel. Using commute reduces the potential of a retry and thus allow more successful transactions in parallel = more concurrency. Very interesting! I would have more questions, but they will come. I plan to blog about these matters at [4]. It's a do-for-fun only blog, with no money or ads involved. I try to read myself up via atomic to several other concurrency models than CSP, which is flowing in my veins the last 25 years. Øyvind Teig, Trondheim, Norway [1] - http://clojure.org/concurrent_programming [2] - http://clojure.org/Refs [3] - http://clojure.github.io/clojure/clojure.core-api.html#clojure.core/commute [4] - http://www.teigfam.net/oyvind/home/technology/ -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: CCW bug [SEVERE]
IntelliJ definitely does this, and since it also saves automatically (on losing focus, or on events like running something, or on 5 secs of inactivity) you get a very fine-grained history. I love this feature, I don't miss manual file saving at all. It basically works like a lightweight automatic VCS. On 28 October 2014 06:52, Alex Miller a...@puredanger.com wrote: On Monday, October 27, 2014 10:21:35 AM UTC-5, Fluid Dynamics wrote: I'm not going through the ritual of check-in and check-back-out every single time I'd normally hit control-S. Too much friction, too much work-that-isn't-development. Doesn't Eclipse already have a local file history version system built in that captures every save? -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Clojure and concurrency
Gary, thank you! kl. 22:41:02 UTC+1 søndag 26. oktober 2014 skrev Gary Verhaegen følgende: Transactions themselves are not queued (besides the obvious queueing of threads when you have more threads than cores). What gets adaptively queued is the historical values of refs involved in transactions. So if you have three concurrent transactions running, and three refs are involved in two of these transactions, and a fourth refs in involved in all three, the system will probably need to keep two previous values for the first three refs and three previous values for the last ref. Interesting. In my Atomic for all? blog (http://www.teigfam.net/oyvind/home/technology/090-atomic-for-all/ (*)) I wrote about some implementation details of atomic, where I quoted a guy I had talked with at a conference: For some atomic implementations the hardware needs four copies of the atomic variable, and there are four booleans – three written by the writer and one by the reader.. Would the ideas behind the clojure transactions be along that line, or am I shooting too far out: Make a table of the possibilities of getting something wrong then store what you need to be able to get things in order? (I do have a thick book about transactions, a friend said I needed it, but it's too thick for one life! But I know what might happen when I book a flight; it happened today! I came home, but 4 h late and one leg too much!) (*) My blog, no ads, no money involved, just curriculum. Code within a transaction should not have any other visible effect than updating refs. When a transaction reaches its end, the system checks the (current) value of all involved refs and retries if any has changed. On 26 October 2014 21:03, Leon Grapenthin grapent...@gmail.com javascript: wrote: On Sunday, October 26, 2014 11:37:43 AM UTC+1, Øyvind Teig wrote: I have been reading myself up on Clojure concurrency, starting at [1]. In [2] I read that The Clojure STM uses multiversion concurrency control with adaptive history queues for snapshot isolation, and provides a distinct commute operation but it still needs some explanation to me. Software transactional memory (STM) is described ok. But the adaptive history queues looks like implementation. In ADA, tasks on rendezvous queue up (so the Ravenscar high security profile prohibits them because they are non-deterministic). In Go goroutines on selective choice's select are queued (also nondeterministic). In occam the there is no such queue on the ALT. How is the Clojure queue, and what does it contain? I see that exchanging data between Clojure concurrent functions (threads?) described. But I haven't discovered how a thread that succeeds in writing, followed by a successful write immediately after by another thread - is signalled to the first thread? Is there any wait type of mechanism? There is no signalling. The write in the first thread always succeeds within the transaction but the real world is not affected until the transaction succeeds as a whole. If during the transaction another transaction succeeded, it is retried as a whole, potentially with the new values written by the other transaction, until it has also succeeded. If a write fails and there is a retry, what's the limit of retries, is there a yield in between, and in case, how is this entry queued? There is no limit. (Unfortunately I don't know about the implementation details and hopefully somebody else can enlighten you on that.) Is it correct to say that never to block means never to be 100% sure that a transaction succeeds at first attempt? Yes. [3] states on commute that Thus fun should be commutative, or, failing that, you must accept last-one-in-wins behavior. commute allows for more concurrency than ref-set.. What's the metric of concurrency? No, little, some, more, much, max? How much happens at the same time in contrast to being queued up. Remember that only successful transactions affect the outside world. E. g.: Of two successful transactions, one had to be restarted because of the other completed during its first try = The two successful transactions didn't happen in parallel. Using commute reduces the potential of a retry and thus allow more successful transactions in parallel = more concurrency. I would have more questions, but they will come. I plan to blog about these matters at [4]. It's a do-for-fun only blog, with no money or ads involved. I try to read myself up via atomic to several other concurrency models than CSP, which is flowing in my veins the last 25 years. Øyvind Teig, Trondheim, Norway [1] - http://clojure.org/concurrent_programming [2] - http://clojure.org/Refs [3] -
Re: Cannot understand why I get this output.
Sorry, I misplaced a couple of brackets: (= {:title Wild Seed, :authors #{{:name Octavia E. Butler, :birth-year 1947, :death-year 2006}}} {:title Wild Seed, :authors #{octavia}}) That should work. - James On 27 October 2014 20:20, Roelof Wobben rwob...@hotmail.com wrote: nope, there is somewhere a error in the example. When I copie it as you made it then I see this error message : RuntimeException Unmatched delimiter: } clojure.lang.Util.runtimeException (Util.java:219) when I add a extra ) I see this message : RuntimeException Map literal must contain an even number of forms clojure.lang.Util.runtimeException (Util.java:219) Roelof Op maandag 27 oktober 2014 20:46:49 UTC+1 schreef James Reeves: On 27 October 2014 19:37, Roelof Wobben rwo...@hotmail.com wrote: of course I can. If I look at answers other people gives then this is the solution : (defn old-book-new-book [book] (assoc book :authors (set (book :authors))) ) and then according to the explanation I would see this output ; (old-book-new-book {:title Wild Seed, :authors [octavia]});= {:title Wild Seed, :authors #{octavia}} but on 1.6.0 and on 1.5.1 I see another output as discussed here. I don't think you're understanding that: {:title Wild Seed, :authors #{{:name Octavia E. Butler, :birth-year 1947, :death-year 2006}}} Evaluates to the same thing as: {:title Wild Seed, :authors #{octavia}} The difference is that in the first value, octavia has been replaced with its value. You can confirm the two data structures are the same by checking their equality: (= {:title Wild Seed, :authors #{{:name Octavia E. Butler, :birth-year 1947, :death-year 2006}} {:title Wild Seed, :authors #{octavia}}} This should return true. - James -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Cannot understand why I get this output.
Np, So if I understand it right. I see the first one in repl. Because midje has #{octavia} and in another function is stated : (def octavia {:name Octavia E. Butler :birth-year 1947 :death-year 2006}) clojure makes from the first {octavia} the second {:name Octavia E. Butler :birth-year 1947 :death-year 2006}) so that is why there are both the same. Roelof Op maandag 27 oktober 2014 22:09:04 UTC+1 schreef James Reeves: Sorry, I misplaced a couple of brackets: (= {:title Wild Seed, :authors #{{:name Octavia E. Butler, :birth-year 1947, :death-year 2006}}} {:title Wild Seed, :authors #{octavia}}) That should work. - James On 27 October 2014 20:20, Roelof Wobben rwo...@hotmail.com javascript: wrote: nope, there is somewhere a error in the example. When I copie it as you made it then I see this error message : RuntimeException Unmatched delimiter: } clojure.lang.Util.runtimeException (Util.java:219) when I add a extra ) I see this message : RuntimeException Map literal must contain an even number of forms clojure.lang.Util.runtimeException (Util.java:219) Roelof Op maandag 27 oktober 2014 20:46:49 UTC+1 schreef James Reeves: On 27 October 2014 19:37, Roelof Wobben rwo...@hotmail.com wrote: of course I can. If I look at answers other people gives then this is the solution : (defn old-book-new-book [book] (assoc book :authors (set (book :authors))) ) and then according to the explanation I would see this output ; (old-book-new-book {:title Wild Seed, :authors [octavia]});= {:title Wild Seed, :authors #{octavia}} but on 1.6.0 and on 1.5.1 I see another output as discussed here. I don't think you're understanding that: {:title Wild Seed, :authors #{{:name Octavia E. Butler, :birth-year 1947, :death-year 2006}}} Evaluates to the same thing as: {:title Wild Seed, :authors #{octavia}} The difference is that in the first value, octavia has been replaced with its value. You can confirm the two data structures are the same by checking their equality: (= {:title Wild Seed, :authors #{{:name Octavia E. Butler, :birth-year 1947, :death-year 2006}} {:title Wild Seed, :authors #{octavia}}} This should return true. - James -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Cannot understand why I get this output.
Right. It's similar to writing: (def x 5) (= #{x} #{5}) You'd expect that to be true, right? When Clojure comes across an unquoted symbol (like x or octavia), it tries to evaluate it, replacing it with the value it represents. In a similar way, unquoted lists (anything in parentheses) are also evaluated as functions, macros or special forms. So: (= #{x} #{5}) Becomes: (= #{5} #{5}) Becomes: true - James On 27 October 2014 21:16, Roelof Wobben rwob...@hotmail.com wrote: Np, So if I understand it right. I see the first one in repl. Because midje has #{octavia} and in another function is stated : (def octavia {:name Octavia E. Butler :birth-year 1947 :death-year 2006}) clojure makes from the first {octavia} the second {:name Octavia E. Butler :birth-year 1947 :death-year 2006}) so that is why there are both the same. Roelof Op maandag 27 oktober 2014 22:09:04 UTC+1 schreef James Reeves: Sorry, I misplaced a couple of brackets: (= {:title Wild Seed, :authors #{{:name Octavia E. Butler, :birth-year 1947, :death-year 2006}}} {:title Wild Seed, :authors #{octavia}}) That should work. - James On 27 October 2014 20:20, Roelof Wobben rwo...@hotmail.com wrote: nope, there is somewhere a error in the example. When I copie it as you made it then I see this error message : RuntimeException Unmatched delimiter: } clojure.lang. Util.runtimeException (Util.java:219) when I add a extra ) I see this message : RuntimeException Map literal must contain an even number of forms clojure.lang.Util. runtimeException (Util.java:219) Roelof Op maandag 27 oktober 2014 20:46:49 UTC+1 schreef James Reeves: On 27 October 2014 19:37, Roelof Wobben rwo...@hotmail.com wrote: of course I can. If I look at answers other people gives then this is the solution : (defn old-book-new-book [book] (assoc book :authors (set (book :authors))) ) and then according to the explanation I would see this output ; (old-book-new-book {:title Wild Seed, :authors [octavia]});= {:title Wild Seed, :authors #{octavia}} but on 1.6.0 and on 1.5.1 I see another output as discussed here. I don't think you're understanding that: {:title Wild Seed, :authors #{{:name Octavia E. Butler, :birth-year 1947, :death-year 2006}}} Evaluates to the same thing as: {:title Wild Seed, :authors #{octavia}} The difference is that in the first value, octavia has been replaced with its value. You can confirm the two data structures are the same by checking their equality: (= {:title Wild Seed, :authors #{{:name Octavia E. Butler, :birth-year 1947, :death-year 2006}} {:title Wild Seed, :authors #{octavia}}} This should return true. - James -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Cannot understand why I get this output.
Thanks all persons for the help and patience with me. Roelof Op maandag 27 oktober 2014 22:23:50 UTC+1 schreef James Reeves: Right. It's similar to writing: (def x 5) (= #{x} #{5}) You'd expect that to be true, right? When Clojure comes across an unquoted symbol (like x or octavia), it tries to evaluate it, replacing it with the value it represents. In a similar way, unquoted lists (anything in parentheses) are also evaluated as functions, macros or special forms. So: (= #{x} #{5}) Becomes: (= #{5} #{5}) Becomes: true - James On 27 October 2014 21:16, Roelof Wobben rwo...@hotmail.com javascript: wrote: Np, So if I understand it right. I see the first one in repl. Because midje has #{octavia} and in another function is stated : (def octavia {:name Octavia E. Butler :birth-year 1947 :death-year 2006}) clojure makes from the first {octavia} the second {:name Octavia E. Butler :birth-year 1947 :death-year 2006}) so that is why there are both the same. Roelof Op maandag 27 oktober 2014 22:09:04 UTC+1 schreef James Reeves: Sorry, I misplaced a couple of brackets: (= {:title Wild Seed, :authors #{{:name Octavia E. Butler, :birth-year 1947, :death-year 2006}}} {:title Wild Seed, :authors #{octavia}}) That should work. - James On 27 October 2014 20:20, Roelof Wobben rwo...@hotmail.com wrote: nope, there is somewhere a error in the example. When I copie it as you made it then I see this error message : RuntimeException Unmatched delimiter: } clojure.lang. Util.runtimeException (Util.java:219) when I add a extra ) I see this message : RuntimeException Map literal must contain an even number of forms clojure.lang.Util.runtimeException (Util.java: 219) Roelof Op maandag 27 oktober 2014 20:46:49 UTC+1 schreef James Reeves: On 27 October 2014 19:37, Roelof Wobben rwo...@hotmail.com wrote: of course I can. If I look at answers other people gives then this is the solution : (defn old-book-new-book [book] (assoc book :authors (set (book :authors))) ) and then according to the explanation I would see this output ; (old-book-new-book {:title Wild Seed, :authors [octavia]});= {:title Wild Seed, :authors #{octavia}} but on 1.6.0 and on 1.5.1 I see another output as discussed here. I don't think you're understanding that: {:title Wild Seed, :authors #{{:name Octavia E. Butler, :birth-year 1947, :death-year 2006}}} Evaluates to the same thing as: {:title Wild Seed, :authors #{octavia}} The difference is that in the first value, octavia has been replaced with its value. You can confirm the two data structures are the same by checking their equality: (= {:title Wild Seed, :authors #{{:name Octavia E. Butler, :birth-year 1947, :death-year 2006}} {:title Wild Seed, :authors #{octavia}}} This should return true. - James -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Demoralising experience trying to install on Win 7
On Oct 25, 2014, at 8:20 AM, Geoff Caplan ghcap...@gmail.com wrote: I've worked on Open Source projects myself and realise the realities. But this is a big project, and ignoring the needs of new Windows users is surely hurting it significantly? If this was prioritised, I suspect someone could be found to do this. The general response has always been: if you’re interested in doing this for Windows, we welcome your efforts. It hasn’t been a priority because it seems that relatively few Windows users are motivated to solve the problem. It also seems that relatively few Windows users are interested enough in Clojure for there to be enough pain to motivate people to overcome it. I don’t know why that is. When we started ClojureBridge, we worried that we’d get a lot of WIndows users since ClojureBridge was aimed at beginners (new to programming) but the reality has been relatively few Windows users and the current instructions seem to have worked well for our workshops so far: https://github.com/ClojureBridge/curriculum/blob/master/outline/setup_win7.md https://github.com/ClojureBridge/curriculum/blob/master/outline/setup_win7.md https://github.com/ClojureBridge/curriculum/blob/master/outline/setup_win8.md https://github.com/ClojureBridge/curriculum/blob/master/outline/setup_win8.md The vast majority of students have been Mac users (we’ve also had a handful of Linux users). Although I’m primarily a Mac user myself, I grumbled about how hard it was to get Clojure / Leiningen installed and running on Windows XP some time ago (a few years back), but I don’t know enough about Windows to build an installer, so I futzed around and got wget installed (eventually) and then the nascent lein.bat worked. Since then, I’ve repeated that install process just once, on a Windows 8.1 laptop, using the djpowell installer which worked at the time. In other words, for each individual, it’s painful just once or twice, but not painful enough it seems to warrant figuring out an automated solution and maintaining it. Simply assuming that Windows users will be able to figure out all these steps while working in the dark is surely unrealistic? The instructions would need to be written by Windows users - and kept up to date by Windows users - and I’m sure the community would welcome folks stepping up to do that, but I think the reality is that the vast majority of Clojure users just don’t have the Windows expertise needed to do much about it :( Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ Perfection is the enemy of the good. -- Gustave Flaubert, French realist novelist (1821-1880) -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: tools.analyzer.jvm clojure.lang.Var$Unbound cannot be cast to clojure.lang.DynamicClassLoader
Version 0.6.2 introduced a bug in analyze+eval, I just released 0.6.3 which also includes a significant preformance improvement. Nicola Mometto writes: Hi Nick, I looked into it, I'm not sure if this should be considered a clojure bug, a lein bug or a t.a.jvm one (I'd expect Compiler/LOADER to always be bound during compilation) but in the meantime I've pushed a workaround that should fix this and a 0.6.2 version is on its way to Maven Central. It should be available in a couple of hours, please let me know if it solved your issue or not. Thanks, Nicola Nick Zbinden writes: Hallo, Im trying to use tools.analyzer to analyse some clojure code and compile it. I have used '(ana/analyze+eval form)' and it has worked nicely. Now I always called my compile function either directly inside of the code, or I would call it like this 'lein run test.clj'. Now I tried to use 'lein uberjar' and use it standalone, but then if fails for protocols. (defprotocol REST (GET [self])) Inside of the project, or with lein run it works correctly. When running the uberjar: Exception in thread main java.lang.ClassCastException: clojure.lang.Var$Unbound cannot be cast to clojure.lang.DynamicClassLoader at clojure.core$gen_interface.doInvoke(genclass.clj:722) at clojure.lang.RestFn.invoke(RestFn.java:521) at clojure.lang.Var.invoke(Var.java:409) at clojure.lang.AFn.applyToHelper(AFn.java:178) at clojure.lang.Var.applyTo(Var.java:700) Is this a bug in tools.analyzer.jvm or is it something with my project compilation? Thanks for your help -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Demoralising experience trying to install on Win 7
I hope I am not pre-announcing things before they've been tested to work, or misinterpreting work that is going on now, but it appears that Leiningen folks are fixing Windows-specific issues as this conversation is taking place (perhaps due to this conversation taking place). https://github.com/technomancy/leiningen/issues/1744 https://github.com/technomancy/leiningen/issues/1733 https://github.com/technomancy/leiningen/pull/1716 Andy On Mon, Oct 27, 2014 at 3:17 PM, Sean Corfield s...@corfield.org wrote: On Oct 25, 2014, at 8:20 AM, Geoff Caplan ghcap...@gmail.com wrote: I've worked on Open Source projects myself and realise the realities. But this is a big project, and ignoring the needs of new Windows users is surely hurting it significantly? If this was prioritised, I suspect someone could be found to do this. The general response has always been: if you’re interested in doing this for Windows, we welcome your efforts. It hasn’t been a priority because it seems that relatively few Windows users are motivated to solve the problem. It also seems that relatively few Windows users are interested enough in Clojure for there to be enough pain to motivate people to overcome it. I don’t know why that is. When we started ClojureBridge, we worried that we’d get a lot of WIndows users since ClojureBridge was aimed at beginners (new to programming) but the reality has been relatively few Windows users and the current instructions seem to have worked well for our workshops so far: https://github.com/ClojureBridge/curriculum/blob/master/outline/setup_win7.md https://github.com/ClojureBridge/curriculum/blob/master/outline/setup_win8.md The vast majority of students have been Mac users (we’ve also had a handful of Linux users). Although I’m primarily a Mac user myself, I grumbled about how hard it was to get Clojure / Leiningen installed and running on Windows XP some time ago (a few years back), but I don’t know enough about Windows to build an installer, so I futzed around and got wget installed (eventually) and then the nascent lein.bat worked. Since then, I’ve repeated that install process just once, on a Windows 8.1 laptop, using the djpowell installer which worked at the time. In other words, for each individual, it’s painful just once or twice, but not painful enough it seems to warrant figuring out an automated solution and maintaining it. Simply assuming that Windows users will be able to figure out all these steps while working in the dark is surely unrealistic? The instructions would need to be written by Windows users - and kept up to date by Windows users - and I’m sure the community would welcome folks stepping up to do that, but I think the reality is that the vast majority of Clojure users just don’t have the Windows expertise needed to do much about it :( Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ Perfection is the enemy of the good. -- Gustave Flaubert, French realist novelist (1821-1880) -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Demoralising experience trying to install on Win 7
I think it's a recent thing, FWIW: I've installed Clojure with lein.bat on several Windows (and Linux) machines with no difficulty. It's been truly wonderful, especially after wrestling with Ruby (and other Open Source) installations for years. I'm sure there's room for improvement; I'm just adding my Wow, this was great! voice for perspective. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Demoralising experience trying to install on Win 7
On Monday, October 27, 2014 7:07:52 PM UTC-4, blake wrote: I think it's a recent thing, FWIW: I've installed Clojure with lein.bat on several Windows (and Linux) machines with no difficulty. It's been truly wonderful, especially after wrestling with Ruby (and other Open Source) installations for years. I'm sure there's room for improvement; I'm just adding my Wow, this was great! voice for perspective. Another reason why relatively few Windows users might have been running into this: the typical Windows user prefers a graphical application to futzing around at the command line at all, and is consequently likely to install CCW, Enclojure, clooj, or something similar. AFAICT those all work out of the box on Windows with a straightforward install process and come batteries included with one version or another of Clojure. CCW comes with Leiningen as well and seems to make it work correctly, and the others probably each either do likewise or bypass Leiningen. CCW and clooj, at least, also bundle nrepl and use it to host your REPL in a separate JVM instance and then talk to that. No separate installations of Clojure, Leiningen, or nrepl are needed, though they all appear to require a previously installed JVM rather than bundling that too, or else Eclipse/Netbeans (possibly bundled with a JVM) first and then the corresponding Clojure plugin installed separately afterward. There might actually just not be that many Windows users that start off by directly getting Leiningen and using it from the command line. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: multimethod, record, type, and protocol pitfalls?
First of all, let me state that I'm a complete Clojure noob. Still, I thought that Clojure's multimethods were a completely valid OOP approach. Q uoting Alan Kay: When I have made that point (about Alan Kay's vision) to certain OOP evangelists, I have been told that Alan Kay's vision of OOP is no longer relevant, or that I have misunderstood it. I do not mean to drag you into a long debate, nor do I wish to waste your time, but if you are very patient, and you have a lot of free time on your hands, you can read what I wrote (very long and badly edited) here: http://www.smashcompany.com/technology/object-oriented-programming-is-an-expensive-disaster-which-must-end and then check out the various ways people responded on Hackers News (I feel that I was misunderstood, though I take the blame, as my essay was not as clear as it should have been): https://news.ycombinator.com/item?id=8420060 A dozen people wrote me private emails after I posted that blog post, and several of them asked me how to get inheritance of functionality in something like Clojure. I am writing a follow-up post (which I promise will be shorter and better edited than the original post) and one thing I am doing is writing examples of how you could imitate the OOP style using Haskell or Clojure (which apparently I should have done in the first post). --- lawrence On Monday, October 27, 2014 2:11:54 PM UTC-4, Rogerio Senna wrote: On Mon, Oct 27, 2014 at 2:21 PM, larry google groups lawrenc...@gmail.com javascript: wrote: The differences between OOP and multimethods should be stressed. I just wrote about this on my blog, and those who mostly worked with OOP kept wondering, how do you get inheritance of functionality? First of all, let me state that I'm a complete Clojure noob. Still, I thought that Clojure's multimethods were a completely valid OOP approach. Q uoting Alan Kay: OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things. It can be done in Smalltalk and in LISP. There are possibly other systems in which this is possible, but I'm not aware of them. Notice that he intentionally left inheritance out from that definition. That means that the class based, C++ style that we usually call OOP is actually just one particular kind of OOP - so the way that JavaScript, Common-Lisp CLOS and, as I see it, Clojure multimethods do it are also valid OOP as well, I believe. Am I right? Or am I missing something here? Thanks in advance, Rogerio. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: multimethod, record, type, and protocol pitfalls?
Not sure if this is exactly what you're looking for, but there might be some relevant info here: https://github.com/Prismatic/eng-practices/blob/master/clojure/20130926-data-representation.md Comments/suggestions/questions welcome. -Jason On Sunday, October 26, 2014 8:48:29 AM UTC-7, Daniel Higginbotham wrote: What's difficult when it comes to understanding multimethods, records, types, and protocols? I'm writing a chapter on multimethods, records, types, and protocols for the book Clojure for the Brave and True, and I'd love to hear about what kinds of pitfalls I should be sure to cover :) Thanks! Daniel -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Demoralising experience trying to install on Win 7
My personal experience with using Clojure on Windows has been pretty good - but that's largely because I've sidestepped Leiningen and instead used Eclipse with the fantastic Counterclockwise plugin. I like having a proper integrated IDE, the CCW REPL is great (much better than the standard Clojure one), and it's very useful to be able to do both Clojure and Java development in the same environment with very little friction. This basically gives you everything you need to get started with Clojure - you don't actually need to install Leiningen separately at all. Of course, you may still want to install Lein for command line / more advanced usage. But I've only really needed that for ClojureScript related build plugins so far. On Saturday, 25 October 2014 09:44:42 UTC+8, Geoff Caplan wrote: Hi Wanting to get Clojure running on a Win 7 machine with no diskspace for dual boot. It's been a demoralising experience. I tried the Win installer linked from the Leiningen website. It failed to download the Leiningen 1 jar - the shell simply flashed open and crashed. Dug around the git site and found a recent .bat file that's supposed to work with the latest Leiningen 2. Again, the shell flashed and crashed. Then manually downloaded the latest Leiningen 2 preview. Again running lein simply flashes and crashes the shell. There's been a recent open issue on Windows installation but it's supposed to be fixed. The lein.bat file is on my path and has exec permissions. I have Java 8 SDK installed and healthy. Not sure where I go from here - any advice much appreciated. I'm dithering between Clojure and Haskell for my next project. The Haskell community provide a well-maintained batteries-included Windows install for GHCi - I was in the Repl 60 seconds after visiting their site. I've been struggling with Leiningen for an hour and getting nowhere. It seems a great pity that the Clojure community seem to be ignoring those of us who are stuck with Windows - it must be having a negative effect on the uptake of the language. I see that this has been an issue for years, but hasn't been addressed. I'm more drawn to Clojure than to Haskell, but if I can't get it running I'll be forced to go elsewhere. Please help. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Leiningen setup for modifying a library the project is depending on
I've used the checkouts method, and found it to be a useful solution when I was actively modifying the library. When I'm not modifying the library very often, I've had fewer glitches by simply using 'lein install' from the library project directory. That installs the latest version of the library into my private set of libraries, and then the project that's using the library will find the new version. (Note that doing this will write a new pom.xml into your library project directory.) -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.