Re: When to use metadata

2015-01-29 Thread Jan Herich
Solussd is absolutely correct, but maybe even more simplistic (or easier to grasp) explanation would be to use metadata if you don't want the additional (meta)data to change the equality semantics of the map, for example: (def test-desc1 {:number-of-threads 10}) (def test-desc2 ^{:integration

When to use metadata

2015-01-29 Thread Jonathon McKitrick
Is there a rule of thumb or set of use cases when metadata is a more elegant solution than simply adding more entries to a map or record? -- 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

Re: When to use metadata

2015-01-29 Thread Joseph Smith
Yes- when the data you want to add shouldn't affect the value of the map. --- Joe R. Smith @solussd On Jan 29, 2015, at 9:10 AM, Jonathon McKitrick jmckitr...@gmail.com wrote: Is there a rule of thumb or set of use cases when metadata is a more elegant solution than simply adding more

Re: gofmt like tool for Clojure?

2015-01-29 Thread Papa Balyo
Thanks, Lucas, this is exactly what I was looking for! On Wed, Jan 28, 2015 at 9:50 PM, Lucas Bradstreet lucasbradstr...@gmail.com wrote: This was released recently: https://github.com/weavejester/cljfmt On 29 January 2015 at 10:20, Papa Balyo papaba...@gmail.com wrote: Greetings, Is

Re: core.match: order of patterns

2015-01-29 Thread Carlo Zancanaro
On Thu, Jan 29, 2015 at 10:46:45AM +, László Török wrote: One thing that isn't obvious to me, how it should work when matching more than one pattern. I can't seem to find it anywhere in the core.match wiki, but I'm fairly sure it tries them in order, returning the first one that matches.

core.match: order of patterns

2015-01-29 Thread László Török
Hi, I started experimenting with core.match. One thing that isn't obvious to me, how it should work when matching more than one pattern. In the following example, the expression returns 3 or 4 depending on which pattern comes first: (require '[clojure.core.match :as cm]) (cm/match [:a true

Re: [ANN] Hoplon: web applications in Clojure and ClojureScript

2015-01-29 Thread Catonano
2013-12-20 21:42 GMT+01:00 Alan Dipert a...@dipert.org: The result, in my opinion, is mindblowingly beautiful and extremely powerful. By making the DOM a Lisp - and not just any Lisp, ClojureScript - we have a means to *real* DOM component modularity. The exact same modularity that you

Re: [ANN] Clojure 1.7.0-alpha5 now available

2015-01-29 Thread Nicola Mometto
Jozef, I looked into this and opened a ticket with a proposed patch to fix this issue: http://dev.clojure.org/jira/browse/CLJ-1650 Jozef Wagner writes: With CLJ-979 applied, lein may crash when doing :aot :all. This is caused when lein forces recompilation of already compiled classes. Not

Re: [ANN] Clojure 1.7.0-alpha5 now available

2015-01-29 Thread Jozef Wagner
Thank you very much Nicola! On Thu, Jan 29, 2015 at 7:24 PM, Nicola Mometto brobro...@gmail.com wrote: Jozef, I looked into this and opened a ticket with a proposed patch to fix this issue: http://dev.clojure.org/jira/browse/CLJ-1650 Jozef Wagner writes: With CLJ-979 applied, lein may

Re: Help sought on issue with AOT, hadoop, classloaders, and consistency of Clojure fn classes

2015-01-29 Thread Sean Corfield
Which version of Clojure are you using? Does clojure-hadoop or Schema include AOT-compiled versions of other libraries and/or core namespaces? If the answers are 1.7.0 Alpha 5 and yes then you've run into the same problem I and a few others did: the previously undefined behavior of loading

is this a bug in clojure.core/into ?

2015-01-29 Thread Giovanni Gherdovich
Hello, I have clojure 1.6.0 I get these errors: -- -- 8 -- -- 8 -- -- 8 -- -- 8 -- -- 8 -- -- 8 user= ;; expecting {:a 1, :b 2} user= (into {} '((:a 1) (:b 2))) java.lang.ClassCastException: clojure.lang.Keyword cannot be cast to java.util.Map$Entry (NO_SOURCE_FILE:0) user= ;; expecting {'([a

Re: Help sought on issue with AOT, hadoop, classloaders, and consistency of Clojure fn classes

2015-01-29 Thread Jason Wolfe
On Thursday, January 29, 2015 at 9:45:25 AM UTC-8, Sean Corfield wrote: Which version of Clojure are you using? 1.6.0, both for AOT and at runtime. Does clojure-hadoop or Schema include AOT-compiled versions of other libraries and/or core namespaces? No, as far as I know the only AOT

Re: Switched map for record and got slower

2015-01-29 Thread Pedro Pereira Santos
Hey guys, The major problem was the (.name unit). Changed to (:name unit) and got the speed back. Still not very much faster than maps, but at least not so slow. Thank you for the info :) On Wednesday, January 28, 2015 at 9:00:37 PM UTC, Mike Rodriguez wrote: Sorry. That was a typo. I meant

datomic - datascript transfers

2015-01-29 Thread henry w
I am knocking out a webapp, backed by datomic on the server side and planning to use datascript in the client. the plan is to: 1) export a bunch of related data to the client (datomic query/pull/entity apis to create edn data suitable for transact into datascript) -- could be a one-time

Re: is this a bug in clojure.core/into ?

2015-01-29 Thread Giovanni Gherdovich
ah, just seen that Justin Smith reported the bug on JIRA http://dev.clojure.org/jira/browse/CLJ-1651 On Thu, Jan 29, 2015 at 7:08 PM, Giovanni Gherdovich g.gherdov...@gmail.com wrote: Hello, I have clojure 1.6.0 I get these errors: -- -- 8 -- -- 8 -- -- 8 -- -- 8 -- -- 8 -- -- 8 user= ;;

Re: datomic - datascript transfers

2015-01-29 Thread Leon Grapenthin
I have considered the approach once and dropped it quickly. The key problem is the loss of atomicity. It introduces a second transactor (the Datascript transactor) and thus synchronization requirements that can rarely be fulfilled. One example where they would be fulfilled automatically is

Re: Clojurescript :advanced compilation extern only partly working.

2015-01-29 Thread Crispin Wellington
I got to the bottom of it. It's almost embarrassing to say. But the path to the w3c_audio.js extern file was wrong. Unfortunately, lein doesn't give any sort of warning or error if any of the externs files don't exist. I'm not sure if it's a cljsbuild issue, or a clojurescript issue, or a

Re: Help sought on issue with AOT, hadoop, classloaders, and consistency of Clojure fn classes

2015-01-29 Thread shlomivaknin
Hey, Just to be sure, are you loading the full uberjar to hadoop? On Wednesday, January 28, 2015 at 11:39:54 PM UTC-8, Jason Wolfe wrote: First off, I apologize in advance for not having a reduced test case, and express my sincere gratitude in advance for any assistance. I've been

Re: Help sought on issue with AOT, hadoop, classloaders, and consistency of Clojure fn classes

2015-01-29 Thread Jason Wolfe
Thanks for the help everyone. After some more fiddling, with two changes I can hack things to work but it's not pretty. First, this change to schema: https://github.com/Prismatic/schema/commit/e835d447ea2525471a40d65768b5e6435a469fc7 Second, if I just (require 'top-level-ns) things still

Re: Help sought on issue with AOT, hadoop, classloaders, and consistency of Clojure fn classes

2015-01-29 Thread Jason Wolfe
On Thursday, January 29, 2015 at 4:18:15 PM UTC-8, shlomi...@gmail.com wrote: Hey, Just to be sure, are you loading the full uberjar to hadoop? Yes. The issue isn't too few classes being found, it's too many :). If I start an nrepl server inside the job and futz around with loading

From JavaScript to ClojureScript (Doing Computers screencast)

2015-01-29 Thread Mike Patella
Hey folks! I started the screencast series Doing Computers at the beginning of this month. I wanted to share what I believe is the best of the three screencasts I've released so far. https://www.youtube.com/watch?v=8UYa8PV3CXQ I managed to introduce a few obvious bugs while recording this