Re: Monorepos with separate artifacts?

2017-05-01 Thread David McNeil
We have used a monorepo to produce multiple artifacts with lein as described here: http://david-mcneil.com/post/160191443293/using-lein-to-produce-multiple-artifacts-from-a -David -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this

Re: [ANN] Clojure 1.7.0-beta2

2015-04-24 Thread David McNeil
I did a real quick test on one of our projects. I had to upgrade to the latest compojure (seems the old version used a version of instaparse that wouldn't compile) but after that it seemed to work and was noticably faster. -David -- You received this message because you are subscribed to the

Re: Coding Standard - ns usage

2012-11-11 Thread David McNeil
I have not heard from anyone that http://dev.clojure.org/display/design/Library+Coding+Standards is out of date, so I take that to mean that the following is still the standard: Be explicit and minimalist about dependencies on other packages. (Prefer the :only option to use and require).

Coding Standard - ns usage

2012-11-08 Thread David McNeil
I notice the following item at http://dev.clojure.org/display/design/Library+Coding+Standards Be explicit and minimalist about dependencies on other packages. (Prefer the :only option to use and require). The page was last edited on Mar 29, 2011 and ns usage has been discussed a fair bit

Re: Build Issues with Eclipse

2012-10-29 Thread David McNeil
Does this thread address your need? https://groups.google.com/forum/?fromgroups=#!searchin/clojure/local$20repository$20/clojure/1Ne8RqiffVI/aGoCPWiiCakJ -David -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

core.match - matching missing map values

2012-05-25 Thread David McNeil
#(= :clojure.core.match/not-found %))}] [match x]) ;;= [match nil] I am curious: is this by design? Thanks. -David McNeil -- 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

core.match - variable length match patterns

2012-05-18 Thread David McNeil
From what I can see core.match does not support matching a variable length series of values. For example, in a vector, match a series of 0-to-N values of 1 followed by a value of 2. I am interested to know whether/how match patterns like this would fit into core.match. Thank you. -David McNeil

Re: core.match - variable length match patterns

2012-05-18 Thread David McNeil
On Friday, May 18, 2012 9:59:40 AM UTC-5, David Nolen wrote: It sounds like you're describing searching for a pattern? Yes, I think that sounds right. I am not sure how that fits into the core.match picture. Thanks. -David McNeil -- You received this message because you are subscribed

Re: Trickiness with protocols and extends (1.3.0)

2011-10-29 Thread David McNeil
A couple of more thoughts on this. On Oct 28, 12:46 pm, Howard Lewis Ship hls...@gmail.com wrote: (extend-type cascade.Asset   ToAttributeValueString   (to-attribute-value-string [asset] (:client-url asset))) The reason this is probably not what you really want is that the set of types which

Re: Trickiness with protocols and extends (1.3.0)

2011-10-28 Thread David McNeil
://david-mcneil.com/post/3495351254/clojure-protocol-adapters [2] https://github.com/david-mcneil/clojure-adapt -- 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

Re: metadata for records

2011-10-01 Thread David McNeil
Razvan Rotaru wrote: Is there a way to attach metadata to defrecord ? Is this what you are looking for? (defrecord MyRecord [a b]) (let [r (with-meta (MyRecord. 1 2) {:extra 100})] (meta r)) ;;- {:extra 100} -David -- You received this message because you are subscribed to the Google

Revelytix hiring Clojure developers

2011-09-23 Thread David McNeil
or semantic technology experience, but this is a great place to get it! If you are interested, email a note and your resume to careers _at_ revelytix.com. [1] http://revelytix.com/ Thanks. -David McNeil -- You received this message because you are subscribed to the Google Groups Clojure group

Re: Any ways to prevent protocol functions from being hardcoded in?

2011-07-01 Thread David McNeil
On Jun 30, 7:54 am, Stuart Sierra the.stuart.sie...@gmail.com wrote: Recently the received wisdom has been: protocols are a low-level implementation detail. Actual APIs should be built with normal functions that call the protocol methods. Stuart- I am a bit confused by this statement, and

Clojure 1.3 - Embedding Java literal objects

2011-05-31 Thread David McNeil
I noticed the following behavior in Clojure 1.3 related to the new object literal syntax [1]: Clojure 1.3.0-master-SNAPSHOT user= (defrecord Foo [a b]) user.Foo user= (:a #user.Foo{:a 1 :b 2}) 1 user= #java.awt.Point[10 20] #Point java.awt.Point[x=10,y=20] user= (.getX #java.awt.Point[10 20])

Re: Idiomatic use of records vs. maps

2011-05-31 Thread David McNeil
A couple of aspects of records that I have found useful: * they provide a type for dispatching. Rather than rooting around in the map to find out what it is, a multi-method can dispatch directly on the type of the object. * having a central definition of the main keys contained in the structure

Re: partial vs anonymous function?

2011-04-16 Thread David McNeil
For those who duck it in the future, there is more discussion here: http://groups.google.com/group/clojure-dev/browse_thread/thread/f4907ebca8ef6e11 -David -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: eval'ing records

2011-04-16 Thread David McNeil
For those who duck it in the future, there is more discussion here: http://groups.google.com/group/clojure-dev/browse_thread/thread/f4907ebca8ef6e11 -David -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: def and ;dynamic

2011-04-15 Thread David McNeil
Thank you for your solution, but can you explain why it works ? As best I recall... in Clojure 1.3 vars are no longer dynamic by default. In the short-term, to ease the pain of this change, Clojure 1.3 will automatically make vars with earmuffs (e.g. *foo*) into dynamic variables. But it warns

partial vs anonymous function?

2011-04-14 Thread David McNeil
I am puzzled by the results below. Can anyone explain the difference in behavior? -David (defn mapper [f stream] `(map ~f ~stream)) (eval (mapper #(+ 1 %) [10 11 12])) ;; - (11 12 13) (eval (mapper (partial + 1) [10 11 12])) ;; - No matching ctor found for class clojure.core$partial...

Re: partial vs anonymous function?

2011-04-14 Thread David McNeil
Mark - Thanks. I am able to permute it to make it work. However, I cannot explain why the original code fails. -David -- 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

eval'ing records

2011-04-14 Thread David McNeil
I have learned that instances of records do not eval to themselves. This seems inconsistent to me. I am curious if this is intentional or if it is a gap in the current record implementation in Clojure. Thanks. -David (defn eval-type [x] (class (eval x))) ;; instances of structural types

Re: eval'ing records

2011-04-14 Thread David McNeil
I remember reading about it in the Joy of Clojure. It may be fixed in the future versions of Clojure. Ivan - Thanks for the response. I checked Joy of Clojure and I see a reference at the top of page 191 to the fact that records cannot be printed and then eval'd. I was aware of this, however

Protocol functions higher order functions

2011-04-06 Thread David McNeil
The following code shows surprising behavior related to using protocol functions in higher order functions. I sort of understand the reason wrapped-x first fails is that calling extend-protocol in a sense redefines the x protocol function. I can't decide if I think this is a bug or just the way

Re: Protocol functions higher order functions

2011-04-06 Thread David McNeil
I think not a bug. If you want indirection in your wrapper, you can ask for it, e.g.:  (defn wrap [f]    (fn [ args]      (apply @f args)))  (def wrapped-x (wrap #'x)) Thank you! -David -- You received this message because you are subscribed to the Google Groups Clojure group. To post

Re: Struct vs. Record: Now and Future

2011-01-28 Thread David McNeil
. This is a snapshot of a defrecord2 implementation that I have been using. Among other things it makes records print in an eval'able form. https://github.com/david-mcneil/defrecord2 -David -- You received this message because you are subscribed to the Google Groups Clojure group. To post

Re: Reading back record instances

2011-01-26 Thread David McNeil
I discuss one solution to this problem here: http://david-mcneil.com/post/958196603/enhanced-clojure-records-part-2 -David -- 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

Re: disk-backed memoize?

2010-09-18 Thread David McNeil
http://github.com/alienscience/cache-dot-clj Thanks for the link. That is helpful. Would JDBC suit your needs as a storage medium? I suppose that would work, but I am thinking that an ehcache based plugin for cache-dot-clj might be a good solution. -David -- You received this message

Re: Protocol type hints - Java interface

2010-06-12 Thread David McNeil
David - Thanks for the tips on definterface and the new statics feature. I will need to look into these because I am not familiar with either. What is the difference between gen-interface and definterface? Thanks. -David McNeil -- You received this message because you are subscribed

Re: Destructuring namespace qualified map keys

2010-05-13 Thread David McNeil
(let [{x :x/y} {:x/y 20}] x) 20 That will work. Thank you! -David McNeil -- 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

Cyclical refs fail on Clojure 1.2?

2010-05-11 Thread David McNeil
anyone explain this? Thank you. -David McNeil -- 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

Re: Cyclical refs fail on Clojure 1.2?

2010-05-11 Thread David McNeil
Peter- Thanks for the tip. I was aware of the stack overflow issue you described, but your comment motivated me to switch to using mvn clojure:repl instead of mvn clojure:swank to test the code, and this does appear to work (modulo the REPL printing issue). Thank you. -David McNeil -- You

ClojureQL - joining 3 tables

2010-05-04 Thread David McNeil
In ClojureQL I do not see how to join three or more tables using the join function. Does anyone know if this is possible? Thank you. -David McNeil -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure

Defining a namespace inside a let

2010-04-27 Thread David McNeil
on with namespaces that I do not understand and I hope that somewhere here can explain it. Thank you. -David McNeil -- 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

Re: Extending Java class in Clojure with multiple constructors

2010-04-19 Thread David McNeil
Stephan- Thank you, gen-class is what I needed. -David -- 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

Extending Java class in Clojure with multiple constructors

2010-04-18 Thread David McNeil
a macro to avoid duplicating the proxy definition. My question is: is there a better way to accomplish this, perhaps using a mechanism other than proxy? Thank you. -David McNeil Person.java = package demo; public class Person { private int id = 0; private String name; public