Re: JAVA_OPTS not accessible in my Clojure project

2014-01-13 Thread aidy lewis
Hi Phill, Thanks for the heads up. I've entered this in project.clj :jvm-opts ["javax.net.ssl.keyStore"] Restarted the CIDER REPL and entered in core.clj (System/getProperty "javax.net.ssl.keyStore") I evaluated that expression and it returns nil. But, if I go to the command-line and at the r

Re: JAVA_OPTS not accessible in my Clojure project

2014-01-13 Thread Softaddicts
To set java properties on the cmd line you need to enter something like: -Djavax.net.ssl.keyStore=value try :jvm-opts ["-Djavax.net.ssl.keyStore=full-spec-of-your-file"] Luc P. > Hi Phill, > > Thanks for the heads up. > > I've entered this in project.clj > :jvm-opts ["javax.net.ssl.keyStore"

>! on channels that are not yet closed

2014-01-13 Thread t x
Hi, I have the following problem: I have a set of channels #{ ... } some of the channels are closed, some of the channels are open * for the channels that are open, I want to (>! chan msg) * for the channels that are closed, I want to remove the channel from the hash-set ## Problem

[ANN] Simbase: A vector similarity database

2014-01-13 Thread Mingli Yuan
Hi, folks, We just release an alpha version of Simbase, a vector similarity database that talks redis protocol. Since it is the first version of all its releases, we decided to keep it in alpha right now, for we want to hear from the community for any comments and improvements. Github page --

Re: >! on channels that are not yet closed

2014-01-13 Thread t x
Is there anyway, to "pierce the deftype" https://github.com/clojure/core.async/blob/master/src/main/clojure/clojure/core/async/impl/channels.clj#L31 to read the "closed" field of the ManytoMany Channel? That's basically all I need to do. On Mon, Jan 13, 2014 at 1:47 AM, t x wrote: > Hi, > >

Re: >! on channels that are not yet closed

2014-01-13 Thread t x
(let [c (async/chan 10)] (println @(.-closed c)) (async/close! c) (println @(.-closed c))) And we're done. Sorry for the spam. Last message send in case someone finds my question via Google. On Mon, Jan 13, 2014 at 2:11 AM, t x wrote: > Is there anyway, to "pierce the deftype" > > > htt

Re: JAVA_OPTS not accessible in my Clojure project

2014-01-13 Thread aidy lewis
Hi Softaddicts Thanks for the advice, but my aim was to retrieve the JAVA_OPTS from my environment variables in order to not hard-code them. Aidy On 13 January 2014 09:46, Softaddicts wrote: > To set java properties on the cmd line you need to enter something like: > > -Djavax.net.ssl.keyStor

Re: JAVA_OPTS not accessible in my Clojure project

2014-01-13 Thread aidy lewis
The problem - if anyone is interested - is that I had not set $JAVA_OPTS in the Emacs config file. Sorry, for being a balloon. Thanks Aidy On 13 January 2014 10:34, aidy lewis wrote: > Hi Softaddicts > > Thanks for the advice, but my aim was to retrieve the JAVA_OPTS from my > environment va

How to handle configuration in Clojure?

2014-01-13 Thread James Trunk
I've been investigating how to handle configuration in a Clojure application/library, and have discovered two main candidates: dynamics vars and argument passing. The downsides to dynamic vars seem to be: hiddenness, thread safety, and more complex tests (binding before each test). The downsid

Re: ClojureScript integration with Emacs/Cider ?

2014-01-13 Thread Gary Trakhman
I've released a cljs port of clojure-complete: Here's the mailing list announcement, also inlined. https://groups.google.com/forum/#!topic/clojurescript/Dt1s4laHFXc cljs-complete, A Clojure library designed to auto-complete clojurescript based on cljs compiler state. - With leiningen: [clj

Re: ANN: cljson, for faster browser deserialization

2014-01-13 Thread Murtaza Husain
Alan, I am exploring what option to use for exchanging data between my server and client. EDN and Cljson are two of the options. What are the pros / cons of using cljson over edn ? What was the motive in creating this library ? Thanks, Murtaza On Tuesday, June 25, 2013 12:58:11 AM UTC+5:30, A

Re: ClojureScript integration with Emacs/Cider ?

2014-01-13 Thread Gary Trakhman
On talking to Chas, https://github.com/cemerick/piggieback/issues/22 it seems like the right approach is to reify ac-nrepl's use of eval into a real "complete" op, and reimplement it to use that, then a common middleware can either use clojure's environment (clojure-complete) or piggieback's compi

Re: ClojureScript integration with Emacs/Cider ?

2014-01-13 Thread Bozhidar Batsov
Cider’s completion understands a `complete` op, so the middleware is the best approach if you ask me. The only reason that there’s also an eval based completion mechanism (the one used by default) is that clojure-complete is present as a REPLy (which is used by lein) dependency and many newcomer

Re: How to handle configuration in Clojure?

2014-01-13 Thread Josh Smith
On Monday, January 13, 2014 8:50:54 AM UTC-5, James Trunk wrote: > > I've been investigating how to handle configuration in a Clojure > application/library, and have discovered two main candidates: dynamics vars > and argument passing. > I would suggest you add Environment variables to your list

Re: How to handle configuration in Clojure?

2014-01-13 Thread Josh Glover
On 13 January 2014 14:50, James Trunk wrote: > What is the current best practice for handling configuration? While I haven't tried this myself, this popped up on Planet Clojure a couple of days back: http://tech.puredanger.com/2014/01/03/clojure-dependency-injection/ Whilst DI is not precisely

A question about lazy seq with io

2014-01-13 Thread Kashyap CK
Hi, I've been dabbling with Clojure for a bit and I am really loving it!!! I am trying to write a clojure program to download a bunch of URLs and I was wondering what is the right way to do it - My current implementation is as follows (def url-sequence (map #(str "http://www.mysite.com/list.php

Re: ANN: cljson, for faster browser deserialization

2014-01-13 Thread Alan Dipert
Hi Murtaza, the primary motivation of cljson is to improve browser deserialization performance when the client is ClojureScript and the server is Clojure. You can start with EDN and easily move to cljson if client-side deserialization becomes your bottleneck. Alan On Monday, January 13, 2014

Re: ClojureScript integration with Emacs/Cider ?

2014-01-13 Thread Gary Trakhman
Austin's lein-plugin already manipulates project middlewares, so that's an easy target. Onward! On Mon, Jan 13, 2014 at 10:10 AM, Bozhidar Batsov wrote: > Cider’s completion understands a `complete` op, so the middleware is the > best approach if you ask me. The only reason that there’s also an

Re: How to handle configuration in Clojure?

2014-01-13 Thread Joachim De Beule
There's also this: https://github.com/clojure-cookbook/clojure-cookbook/blob/master/local-io/edn-config/edn-config.asciidoc Joachim -- -- 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 No

[ANN] cljs-start 0.1.1

2014-01-13 Thread Mimmo Cosenza
I just published to clojars the 0.1.1 release of cljs-start lein template to create a batteries included Clojurescript lib. https://github.com/magomimmo/cljs-start This release uses lein profiles (:user, :dev, :simple and :advanced) to keep the corresponding CLJS builds separated from each oth

Re: ANN: cljson, for faster browser deserialization

2014-01-13 Thread Murtaza Husain
Alan, Thanks for your reply. I was also looking for a RPC mechanism, and I looked at castra from the hoplon stack. One thing that is turning me off is that I will have to define my api as special 'defn', instead of regular defns. I have used shoreleave / fetch before and have liked their simp

Re: How to handle configuration in Clojure?

2014-01-13 Thread Andrey Antukh
https://github.com/james-henderson/nomad can be one option for manage/store a configuration ;) (it uses edn...) Andrey 2014/1/13 Joachim De Beule > There's also this: > https://github.com/clojure-cookbook/clojure-cookbook/blob/master/local-io/edn-config/edn-config.asciidoc > > Joachim > > -- >

Re: How to handle configuration in Clojure?

2014-01-13 Thread Travis Vachon
Another option is to use leiningen profiles to change the classpath, loading different versions of a (eg) config.clj file in different environments. This lets you `require` the config namespace and refer to config parameters like `config/the-configured-value` Travis On Mon, Jan 13, 2014 at 11:05

Re: A question about lazy seq with io

2014-01-13 Thread Mauricio Aldazosa
On Mon, Jan 13, 2014 at 8:49 AM, Kashyap CK wrote: > > I'd really appreciate it if someone could tell me what's going on when I > do the following - > > user> (defn xx [] (map println [1 2 3 4 5 6])) > #'user/xx > user> (take 2 (xx)) > (1 > 2 > 3 > 4 > 5 > 6 > nil nil) > user> > There are many t

Re: How to handle configuration in Clojure?

2014-01-13 Thread Kristoffer Skjutare
This got me thinking about Stuart Sierras Component: https://github.com/stuartsierra/component Kristoffer Den måndagen den 13:e januari 2014 kl. 16:22:55 UTC+1 skrev Joachim De Beule: > > There's also this: > https://github.com/clojure-cookbook/clojure-cookbook/blob/master/local-io/edn-config/

Re: A question about lazy seq with io

2014-01-13 Thread Kashyap CK
Thanks Mauricio ... I think I understand it now. Regards, Kashyap On Monday, January 13, 2014 9:48:28 PM UTC+5:30, Mauricio Aldazosa wrote: > > > > On Mon, Jan 13, 2014 at 8:49 AM, Kashyap CK > > wrote: > >> >> I'd really appreciate it if someone could tell me what's going on when I >> do the fo

Re: How to handle configuration in Clojure?

2014-01-13 Thread Stefan Kanev
On 13/01/14, James Trunk wrote: > The downsides to dynamic vars seem to be: hiddenness, thread safety, and > more complex tests (binding before each test). I am curious about what you mean by 'thread safety'. As far as I know, dynamic variables are thread-local, which means that they are thread-

Re: How to handle configuration in Clojure?

2014-01-13 Thread Jonah Benton
A middle ground between dynamic vars and passing state through functions that themselves don't need it, but which is needed by functions they call, is to build on top of defprotocol and defrecord, to refactor so that the functions that need "configuration" state in their operations are defined by p

Re: Nginx-Clojure Let You Deploy Clojure Web App on Nginx Without Any Java Web Server

2014-01-13 Thread Sergey Didenko
Looks very interesting, thank you for your work! I wonder how this is going to improve latency in comparison to nginx + http-kit for some real world test that is not using heavy DB operations. On Mon, Jan 13, 2014 at 5:57 AM, Xfeep Zhang wrote: > > So far I have found why nginx-clojure is slow

Re: HttpKit, Enlive (html retrieval and parsing)

2014-01-13 Thread Jarrod Swart
This is exactly what I do and it works great! On Saturday, January 11, 2014 7:00:22 PM UTC-5, Jan Herich wrote: > > I don't recommend using java's built in HTTP retrieval (by passing > java.net.URL object to enlive html-resource function). > Not only is it significantly slower then using clj-http

Re: A question about lazy seq with io

2014-01-13 Thread Jan Herich
As Mauricio already mentioned, map is not meant to be used for side-effects, if you want to need to evaluate a sequence for side-effects, use doseq instead. Regarding your first question about explicit loop-recur, i think it's reasonable w

Eastwood lint tools - some Qs

2014-01-13 Thread Sean Corfield (Clojure)
Just started using this and I see the argslist caveat that causes Eastwood to misdiagnose :wrong-arity (the readme specifies java.jdbc 0.3.x but it also gets tripped up by congomongo). Can you (Andy or Jonas or any other Eastwood user) clarify how the arglists cause the problem and what, if anythi

Re: Eastwood lint tools - some Qs

2014-01-13 Thread Nicola Mometto
Sean, it looks like the issue is caused by arglists like this one: https://github.com/clojure/java.jdbc/blob/master/src/main/clojure/clojure/java/jdbc.clj#L782-L783 tools.analyzer.jvm uses :arglists to detect possible invoke calls with a misplaced arity, expecting that to be a valid value, in you

Re: Eastwood lint tools - some Qs

2014-01-13 Thread Sean Corfield
Thanx for the specific example! Yeah, I've used :arglists for "examples" in a couple of places instead of actual argument lists. I'll fix that in 0.3.3 and may do the same with CongoMongo (although it's a far worse culprit in several areas - and we're in the process of migrating to Monger now a

Re: Am I using core.async/go in an un-clojurish ?

2014-01-13 Thread Stephen Cagle
Did you mean *(go (loop [ ... ]* * (case ...* *.. (func arg1 foo1)* *.. (func arg2 foo2)* *.. (func arg3 foo3)))* *where (defn func [ ... ] (.. >! .. ))* , as func (not foo) is the thing in function position? Ignoring that, and working in a general sense: I t

Re: Managing role-based permissions in Ring apps

2014-01-13 Thread Alexandr Kurilin
Disclaimer: I think what Friend is trying to do is super important and cemerick rocks. However, I found Friend to be really difficult to grok the first time I took a stab at it many months ago, perhaps I'm more capable of getting into it now. My concern was that it is so broadly encompassing and t

Re: Managing role-based permissions in Ring apps

2014-01-13 Thread Christopher Allen
I might follow up with a more thorough reply, but I had to drop Friend for the same reason I had to drop Liberator. Customizing the assumptions/defaults the libraries made was too default. Relatively simple content negotiation involved trying to do insane monkey-patches of Liberator's protocols

Re: Managing role-based permissions in Ring apps

2014-01-13 Thread Christopher Allen
To clarify, that was an example of content negotiation middleware, not ACL. If I were to tackle this, I would try to find or implement a pure ACL (not aware of web apps per se) library and then hook it up via Ring middleware. On Monday, January 13, 2014 12:45:23 PM UTC-8, Christopher Allen wrote

Re: How to handle configuration in Clojure?

2014-01-13 Thread Christopher Allen
github.com/weavejester/environ/ + environment variables. 12-factor it that way, proxy the environment variables via a config namespace so that configuration values are programmatically generated in case something needs to intervene. On Monday, January 13, 2014 5:50:54 AM UTC-8, James Trunk wro

Re: How to handle configuration in Clojure?

2014-01-13 Thread Christopher Allen
Example here: https://github.com/bitemyapp/berossus/blob/master/src/berossus/rocks/your/data/config.clj On Monday, January 13, 2014 1:57:06 PM UTC-8, Christopher Allen wrote: > > > github.com/weavejester/environ/ + environment variables. 12-factor it > that way, proxy the environment variables v

Ragtime w/ Korma

2014-01-13 Thread Arlandis Lawrence
I'm trying to use H2's in-memory database feature for running specs, so I'm using Ragtime to run migrations before the test. Problem is, I can't get Korma to cooperate. Could someone take a look at this gist and see if it makes sense? https://gist.github.com/arlandism/8408370 -- -- You receiv

Re: Eastwood lint tools - some Qs

2014-01-13 Thread Andy Fingerhut
Sean: Eastwood's current use of :arglists for :wrong-arity linter checking is definitely 'at odds' with the way java.jdbc and some other libraries use it for clearer documentation of fn/macro args. I would recommend leaving :arglists as-is for java.jdbc, and wait for the next version of Eastwood

Re: How to handle configuration in Clojure?

2014-01-13 Thread Mark Mandel
+1 for environ as well. I also have combined that with the Stuart Sierra reloaded workflow (started it before Components, don't know if I want to switch). http://thinkrelevance.com/blog/2013/06/04/clojure-workflow-reloaded Finding it a great fit, as it's easy to switch out environ variables in yo

Re: Ragtime w/ Korma

2014-01-13 Thread Christopher Allen
Try it without H2 and check the contents of the database manually. "Korma cooperating" doesn't mean a lot if the tables don't actually exist. Error messages should be provided in future. On Monday, January 13, 2014 1:44:28 PM UTC-8, Arlandis Lawrence wrote: > > I'm trying to use H2's in-memory d

Re: Eastwood lint tools - some Qs

2014-01-13 Thread Sean Corfield
On Jan 13, 2014, at 2:05 PM, Andy Fingerhut wrote: > Eastwood's current use of :arglists for :wrong-arity linter checking is > definitely 'at odds' with the way java.jdbc and some other libraries use it > for clearer documentation of fn/macro args. > Google seems to indicate that :arglists is

Re: Am I using core.async/go in an un-clojurish ?

2014-01-13 Thread t x
Hi Stephen, I don't undersand your suggestion: (defn foo [c] (async/>! c "hi")) (defn test [] (let [c (async/chan 10)] (async/go (foo c) (println (! not used in go block ... On Mon, Jan 13, 2014 at 12:03 PM, Stephen Cagle wrote: > Did you mean > > > *(go (loop [ ... ]* >

Re: Eastwood lint tools - some Qs

2014-01-13 Thread Nicola Mometto
Sean Corfield writes: > Sounds like Eastwood should ignore :arglists and just use the actual argument > lists for the arity check, with perhaps an additional lint warning for when > what's in :arglists doesn't match possible real signatures of the function? I > can see the latter being useful

Re: Am I using core.async/go in an un-clojurish ?

2014-01-13 Thread Stephen Cagle
I just want to re-iterate that there are many (some are probably better) ways to do this, but using what I suggested above it would be: (defn foo [] (async/go "hi")) (defn test [] (println (async/! c (async/http://groups.google.com/group/clojure?hl=en --- You received this message because

Re: Am I using core.async/go in an un-clojurish ?

2014-01-13 Thread Stephen Cagle
And already, I see that the first one should have been (defn test [] (async/go (println (async/ > I just want to re-iterate that there are many (some are probably better) > ways to do this, but using what I suggested above it would be: > > (defn foo [] > (async/go "hi")) > > (defn tes

Re: A question about lazy seq with io

2014-01-13 Thread Kashyap CK
Thank you very very much Jan idiomatic is what I need to learn :) Regards, Kashyap On Tuesday, January 14, 2014 12:47:19 AM UTC+5:30, Jan Herich wrote: > > As Mauricio already mentioned, map is not meant to be used for > side-effects, if you want to need to evaluate a sequence for side-effec

Re: Eastwood lint tools - some Qs

2014-01-13 Thread Sean Corfield
On Jan 13, 2014, at 3:09 PM, Nicola Mometto wrote: > To be honest I don't like the idea of libraries attaching not-valid > :arglists meta to Vars at all since the doc[1] for `def` says that :arglists > will be "a list of vector(s) of argument forms, as were supplied to > defn" and the clojure Comp

Re: Am I using core.async/go in an un-clojurish ?

2014-01-13 Thread t x
Hi Stephen, I now understand what you meant. Thanks writing a minimal test case. On Mon, Jan 13, 2014 at 3:34 PM, Stephen Cagle wrote: > And already, I see that the first one should have been > > (defn test [] >(async/go > (println (async/ > Boy I wish you could edit this post after

go "kill infinite loop"

2014-01-13 Thread t x
Consider the following code block: (defn make-stupid [] (go (loop [] (recur (def x (make-stupid)) ;; ... is there a way to kill this infinite go-loop ? Now, is there a way, using the variable "x", to kill this infinite loop -- or did I basically kill a java thread? Thanks! --

lein script installation errors on CentOS 6.5

2014-01-13 Thread gvim
The lein script is producing errors when I try to install it on CentOS 6.5: $ lein /sw/bin/lein: command substitution: line 93: syntax error near unexpected token `)' /sw/bin/lein: command substitution: line 93: `dirname "$PWD")"' /sw/bin/lein: command substitution: line 110: syntax error near

Re: lein script installation errors on CentOS 6.5

2014-01-13 Thread Matching Socks
Scripts in Red Hat ought to begin with #!/bin/bash which is writable only by root and kept updated by system updates. But lein uses #!/usr/bin/env bash -- "use whatever bash executable is on my path" -- which is less well controlled and might be different. Try "which bash" to see what shell is

Re: lein script installation errors on CentOS 6.5

2014-01-13 Thread gvim
Resolved, thanks. Still puzzled as Red Hat's /bin/bash is 4.1.2 and my custom /sw/bin/bash is 4.2.24. Surely such a minor version difference should not result in such a catastrophe? gvim On 14/01/2014 01:31, Matching Socks wrote: Scripts in Red Hat ought to begin with #!/bin/bash which is wri

Re: Nginx-Clojure Let You Deploy Clojure Web App on Nginx Without Any Java Web Server

2014-01-13 Thread Xfeep Zhang
You're welcome. I think there are several difficult phases : (1) update the test program in clojure-web-server-benchmarks, make the some packages to be the latest. (eg. http-kit from 1.3.0-alpha2 --> 2.1.16) and add nginx-php testi

Re: Eastwood lint tools - some Qs

2014-01-13 Thread Colin Fleming
This is an interesting discussion, I've been thinking about some of these problems as I move towards adding inspections in Cursive. arglist parsing is a real problem in Clojure. I'd like to be able to flag invocations of functions with bad arities in the editor, but it's very difficult. Even defn i

Re: Eastwood lint tools - some Qs

2014-01-13 Thread Ben Wolfson
Actual arglists have a set structure and can be parsed automatically: https://github.com/bwo/macroparser/blob/master/src/macroparser/bindings.clj It's true that you couldn't reconstruct something as informative as the :arglists metadata on defn from the actual declaration, of course. On Mon, Jan

Re: Am I using core.async/go in an un-clojurish ?

2014-01-13 Thread Timothy Baldridge
This is a often asked question, but one I think requires a bit of thought. The key to solving this kind of issue in your code is to think of channel ops as "io" and as side-effecting. It's tempting to stick these operations deep inside nested functions, but I think that's rather "un-functional", an

Re: Am I using core.async/go in an un-clojurish ?

2014-01-13 Thread t x
This is what I ended up building: (defmacro wrap-error [& body] `(slingshot.slingshot/try+ (let [ans# ~body] {:tag :ok :message ans#}) (catch Exception e# {:tag :error :message e#}))) (defmacro wgo [& body] `(clojure.core.async/go (wrap-error ~@body)

closing-buffer

2014-01-13 Thread t x
I am aware of: DroppingBuffer and SliddingBuffer I would like to build a channel with different semantics: When I try to put an item on a full channel: * DroppingBuffer drops the new item * SliddingBuffer evicts the oldest item * ClosingBuffer should _close the channel_ (thus, the r

ANN Langohr 2.2.1

2014-01-13 Thread Michael Klishin
Langohr [1] is a small, feature complete Clojure client for RabbitMQ. Hot on the heels of 2.2.0, 2.2.1 is out with one bug fix. Release notes: http://blog.clojurewerkz.org/blog/2014/01/14/langohr-2-dot-2-1-is-released/ 1. http://clojurerabbitmq.info -- MK http://github.com/michaelklishin http:

Re: go "kill infinite loop"

2014-01-13 Thread Ben Mabey
On Mon Jan 13 18:11:10 2014, t x wrote: Consider the following code block: (defn make-stupid [] (go (loop [] (recur (def x (make-stupid)) ;; ... is there a way to kill this infinite go-loop ? No, you can not kill the loop with the go channel that is bound to x. You need to r

Re: go "kill infinite loop"

2014-01-13 Thread t x
Understood. Thanks for the clarification. On Mon, Jan 13, 2014 at 9:28 PM, Ben Mabey wrote: > On Mon Jan 13 18:11:10 2014, t x wrote: > >> Consider the following code block: >> >> >> (defn make-stupid [] >> (go (loop [] >> (recur >> >> (def x (make-stupid)) >> >> ;; ... is there a

Re: go "kill infinite loop"

2014-01-13 Thread Mark Mandel
I found this macro I wrote really useful for exactly this type of thing: https://github.com/markmandel/while-let As long as you are happy for your go loop to stop when nil comes through (i.e. when it gets closed). (go (while-let [data ( wrote: > Understood. Thanks for the clarification. > > > On

Re: go "kill infinite loop"

2014-01-13 Thread Kelker Ryan
Maybe something like this? (go-loop [c (chan)] (let [x (: > On Mon Jan 13 18:11:10 2014, t x wrote: > >>  Consider the following code block: >> >>  (defn make-stupid [] >>    (go (loop [] >>  (recur >> >>  (def x (make-stupid)) >> >>  ;; ... is there a way to kill this infinite go-lo

Re: go "kill infinite loop"

2014-01-13 Thread t x
I really like Mark's while-let. I've always felt loop ... recur slightly cubersome, but never got around to writing a custom macro to just get around it. while-let much elegant. wow. On Mon, Jan 13, 2014 at 9:49 PM, Kelker Ryan wrote: > Maybe something like this? > > (go-loop [c (chan)] > (

Re: Eastwood lint tools - some Qs

2014-01-13 Thread Andy Fingerhut
Nicola can answer more authoritatively, as I haven't checked that part of tools.analyzer recently, but I am pretty sure that the :arglists with things like doc-string? attr-map? are simply treated as if they were normal positional arguments, with no 'guessing' that they are optional due their symbo

Re: Eastwood lint tools - some Qs

2014-01-13 Thread Cedric Greevey
IMO, :eastwood-arglist (and a proliferation of other tool-specific metadata) would be exactly the wrong approach; :arglists should be the real defn-form arglists. Instead there should be an optional :pretty-arglists for documentation generators to use in lieu of :arglists if it is present. That wou

Re: Eastwood lint tools - some Qs

2014-01-13 Thread Colin Fleming
Interesting - but there must be some sort of magic there since otherwise every call to defn would be flagged, since its :arglists implies it has 6 arguments. And in fact, there's nothing there indicating that the body is in fact the body. On 14 January 2014 18:56, Andy Fingerhut wrote: > Nicola

Re: closing-buffer

2014-01-13 Thread Michał Marczyk
Instead of actually implementing a new channel type, you could use the regular MTMCs, but with your own factory function, custom buffers and a sprinkle of mutability: (defprotocol PBufferThatMightCloseAChannel (this-is-your-channel! [this c] "Informs the buffer that c is the channel it might

Re: closing-buffer

2014-01-13 Thread t x
If I understand your strategy correctly, it works as follows: * write new buffer class * extend buffer class with a field/atom that stores the channel that owns the buffer * on overflow, call (async/close!) on the owned channel However, looking at : * https://github.com/clojure/core.async/blob/

Re: Eastwood lint tools - some Qs

2014-01-13 Thread Andy Fingerhut
defn is a macro, and thus macro-expanded during Eastwood analysis, I believe ignoring the :arglists. I think it is really only the :arglists of functions that matter for Eastwood :wrong-arity warnings Andy On Mon, Jan 13, 2014 at 10:22 PM, Colin Fleming wrote: > Interesting - but there must b

[ANN] incise 0.1.0 - An extensible static site generator

2014-01-13 Thread Ryan McGowan
Hi all! After consuming quite a bit of my spare time for the past several months, I have finally released version 0.1.0 of incise. It is a static site generator written in Clojure (of course). I like it quite a bit and I think others might benefit from it too. I am