Understanding nav

2019-02-12 Thread Mark Bastian
Hi All, In an attempt to understand the nav part of the new datafy/nav protocols I've created an example project (found here) that I'd like to share and get your feedback on to see if I'm doing it right. I'll inline the code as well. For refe

Re: How to call Clojure from Java?

2017-06-04 Thread Mark Bastian
I recently put together a project that demonstrates a few ways to call Clojure from Java: https://github.com/markbastian/java-calls-clojure Hope that helps. -Mark -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to

Re: clojure.spec: Relationships Between Specs

2016-10-19 Thread Mark Bastian
Very cool. 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,

clojure.spec: Relationships Between Specs

2016-10-19 Thread Mark Bastian
Is it possible to specify relationships between spec values. For example: (s/def ::x0 (int-in 0 100)) (s/def ::x1 (int-in 0 100)) ;I now want to say something along the lines of (note that the :where is totally made up - just conveying the intent): (s/def ::xrange (s/keys ::req [::x0 ::x1 :where

Re: Macro Help with Symbols and Evaluation

2015-03-19 Thread Mark Bastian
To provide a little more context, the problem I am trying to solve is this: Often in Java I see constructors that have a pattern of (ClassName. X) where X is some static integer value. For example, in Swing you build a Box like so (Box. BoxLayout/X_AXIS). I want to simplify this by doing somethi

Macro Help with Symbols and Evaluation

2015-03-19 Thread Mark Bastian
Hi All, I am trying to write a simple macro to resolve local symbols and I just can't seem to figure out the right invocation. Here are some commands you can type/paste in a repl: (def ONE 1) ;define one (def s1 (symbol "ONE")) ;get the symbol (eval s1) ;evaluates to 1, no surprise ;My goal i