Dynamically Reify Interfaces

2017-11-07 Thread Nick Mudge
I need to dynamically reify some java interfaces based on data from a map. One way I can see to do this is to generate the reify code with a function using syntax quotes, quotes and unquote and unquote splice. And then evaluate it using eval. I hesitate using eval, but is eval the right tool

Re: Who Uses import-vars?

2017-11-07 Thread Didier
I found private/public works fine. I put my public interface at the bottom of the file with a nice comment header. Using another namespace like .impl, I've always had the issue that nobody on my team can agree with what the name convention should be for what an impl namespace should be called

ANN: Kibit 0.1.6

2017-11-07 Thread Daniel Compton
Hi folks Kibit 0.1.6 is out now. There are a few fixes you can see in the release notes, but the big one by far is that Kibit now supports reading namespaced keywords correctly, just in time for Clojure 1.9. This has been an open issue

RE: Who Uses import-vars?

2017-11-07 Thread Sean Corfield
I’m with Timothy (and Alex) on Potemkin. For me, it’s been the source of some very weird transitive dependency bugs as well as strange binding issues across a number of projects where it has been dragged in by various third party libraries (e.g., clj-http). It’s made me very wary of it  I

Re: Migrating nREPL out of Clojure Contrib

2017-11-07 Thread Nick Mudge
I am new to the clojure community. What does it mean to "reboot" the project? On Friday, July 21, 2017 at 5:15:49 AM UTC-7, Herwig Hochleitner wrote: > > 2017-07-18 14:48 GMT+02:00 Chas Emerick >: > > I would like to hear here (no more private mails, please! :-) from any

Re: Who Uses import-vars?

2017-11-07 Thread Alex Miller
I agree with Tim - I don't like any of the Potemkin import-* functionality. Every time I am working against libs like this, "go to source" ends up in the wrong place. From my perspective, this is a bit of complexity and redirection that serves little purpose other than to confuse those looking

Re: Who Uses import-vars?

2017-11-07 Thread Alan Thompson
Looking at the source code here I can see that `import-vars` delegates to `import-fn` or `import-macro`, which in turn calls `link-vars`. That uses `add-watch` with a function described by the docstring: "Makes sure

Re: Who Uses import-vars?

2017-11-07 Thread Nick Mudge
I think import-vars is for convenience. It delegates to import-fn and import-macro. On Tuesday, November 7, 2017 at 12:09:10 PM UTC-8, Alan Thompson wrote: > > In the Tupelo library, I have been using `import-fn` and `import-macro` > from Potemkin so that I can define functions/macros in a

Re: Who Uses import-vars?

2017-11-07 Thread Nick Mudge
Thanks Timothy, this is really useful! On Tuesday, November 7, 2017 at 11:11:30 AM UTC-8, tbc++ wrote: > > I structure my code very explicitly. Normally the most common constructs > are put in a single file named after the library itself (not in core.clj, > do that half your files will be named

Re: Who Uses import-vars?

2017-11-07 Thread Alan Thompson
In the Tupelo library, I have been using `import-fn` and `import-macro` from Potemkin so that I can define functions/macros in a single namespace `tupelo.impl`, but then expose an API in "user-visible" namespaces like: - tupelo.core - tupelo.char - tupelo.test - etc Perhaps I've been

Re: Who Uses import-vars?

2017-11-07 Thread Nick Mudge
Thanks Ducan, this is incredibly useful! On Tuesday, November 7, 2017 at 11:17:28 AM UTC-8, Duncan McGreggor wrote: > > > > On 7 November 2017 at 13:11, Timothy Baldridge > wrote: > >> I structure my code very explicitly. Normally the most common constructs >> are put in a

Re: Who Uses import-vars?

2017-11-07 Thread Duncan McGreggor
On 7 November 2017 at 13:11, Timothy Baldridge wrote: > I structure my code very explicitly. Normally the most common constructs > are put in a single file named after the library itself (not in core.clj, > do that half your files will be named core). > >

Re: Who Uses import-vars?

2017-11-07 Thread Timothy Baldridge
I structure my code very explicitly. Normally the most common constructs are put in a single file named after the library itself (not in core.clj, do that half your files will be named core). https://github.com/halgari/odin/blob/master/src/com/tbaldridge/odin.clj Anything not in the API that

Re: Who Uses import-vars?

2017-11-07 Thread Duncan McGreggor
I use it in some large fraction of my Clojure projects (25-50%?). The primary driver is to balance an "internal" organization (e.g., that allows me to keep file line counts low) that would be cumbersome as an API vs. an ideal "developer experience" (e.g., less hierarchy and easier access to

Who Uses import-vars?

2017-11-07 Thread Nick Mudge
I am interested to know if people/you use import-vars to decouple the structure of code from its API. import-vars is from the potemkin library: https://github.com/ztellman/potemkin If you don't use import-vars how do you structure your code and provide an API? -- You received this message

[ANN] Clojure 1.9.0-RC1

2017-11-07 Thread Alex Miller
Clojure 1.9.0-RC1 is now available. Try it via - Download: https://repo1.maven.org/maven2/org/clojure/clojure/1.9.0-RC1 - Leiningen: [org.clojure/clojure "1.9.0-RC1"] 1.9.0-RC1 is the same as 1.9.0-beta4. We would appreciate anything you can do to try out this release. We do not plan to make

Functional Programming Blogs

2017-11-07 Thread Alex Mesropians
Hey All, Hope everyone is well! Just wanted to share with you Functional Works which has curated various FP related articles from across the globe! Of course feel free to contribute

Re: Migrating nREPL out of Clojure Contrib

2017-11-07 Thread Chas Emerick
A final update: https://github.com/cemerick/nREPL has been reconstituted as described previously, and a release candidate has been deployed to maven central with contents effectively identical to the latest tools.nrepl release (only difference is an ipv6-related bugfix that was encountered in the