Re: Disable swagger.ui in production

2019-02-21 Thread brjann
Hi,

Thank you for the suggestion! I also got a backchannel reply that one could
simply put the swagger map in a (when dev-mode? {:swagger {...}}) form. For
some reason I though that wouldn't be possible because api is a macro but
that actually works fine.

Thanks,
Brjánn

On Thu, 21 Feb 2019 at 01:22, Matching Socks  wrote:

> Would it be fair to paraphrase the question as, how to pass a different
> data structure to compojure's api function depending on whether the program
> is running in the development environment or "in production"?  One very
> general technique is to wield the classpath to advantage.  Suppose for
> example that your program's main (i.e., entrypoint) function is in the
> org.draintheaquifer.asbestos namespace.  Instead of putting it under src
> with most of your program, you may put one version in
> dev/org/draintheaquifer/asbestos.clj and another version in
> ops/org/draintheaquifer/asbestos.clj.  Then configure Leiningen, or
> whatever, to include dev and src on the classpath for development (actually
> this may be its default setting) and ops and src in the uberjar.  An easier
> but more lopsided way to achieve a similar effect is to avoid calling your
> uberjar's aot-compiled main-class namespace from development, or in other
> words, let src/org/draintheaquifers/asbestos.clj configure the app for
> production, and instead of asbestos.clj use dev/user.clj to do the
> analogous thing in development.
>
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] rep 0.1.2

2019-02-21 Thread Jason Felice
On Thu, Feb 21, 2019 at 2:28 AM Didier  wrote:

> Hum, is there some advantage to using this over just normal `clj -e`?
>

It's intended more for shell scripting remote control of an *existing*
Clojure process and editor/REPL integration for editors that lean on the
POSIX shell.

It's a Graal native-image, which improves boot time considerably, which is
important for editor responsiveness:

[jfelice@C02X421DJHD4 src]$ time for ((i = 0; i < 100; i++)); do rep '(+ 2
2)' >/dev/null; done

real0m2.323s
user0m0.875s
sys 0m0.872s
[jfelice@C02X421DJHD4 src]$ time for ((i = 0; i < 100; i++)); do clj -e '(+
2 2)' >/dev/null; done

real1m32.994s
user2m37.918s
sys 0m14.129s
[jfelice@C02X421DJHD4 src]$


-Jason

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ANN] org.clojure/java.jdbc 0.7.9

2019-02-21 Thread Sean Corfield
The Contrib wrapper for JDBC has a minor update:

It contains a couple of tweaks around insert-multi! and highly experimental 
datafy/nav functionality (for Clojure 1.10). See 
https://github.com/clojure/java.jdbc/blob/master/CHANGES.md for more details.

I wrote about the datafy/nav work here 
http://corfield.org/blog/2018/12/03/datafy-nav/ while I was at Clojure/conj.

Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.