Re: [ANN] lein-jlink: A leiningen plugin for custom JRE creation

2018-01-31 Thread Ning Sun
Hi Laurens,

I haven't got chance to play with proguard. I doubt of it works well with 
non-Android projects. For now I think the best method is to keep you dependency 
tree from bloated.

On January 31, 2018 12:09:57 AM GMT+08:00, Laurens Van Houtven <_...@lvh.io> 
wrote:
>This is great! Thanks Ning! Do you have any
>experience/pointers/projects
>around reducing deployable size on the code side (as opposed to
>runtime)?
>They seem like very related concerns. I've messed with proguard but it
>mostly seems to be great at producing jars that are 10% of the size and
>don't actually work ;-)
>
>On Tue, Jan 30, 2018 at 8:24 AM, Ning Sun 
>wrote:
>
>> Hi clojurians,
>>
>> I just created a Leiningen plugin that creates custom Java Runtime
>> Environment based on you configuration. The custom JRE can be as
>small
>> as 29MB, and it's fully capable to run a Ring web app.
>>
>> With this plugin:
>> 0. You can test your Clojure application against the custom JRE;
>> 1. You can distribute your Clojure application with runtime attached
>and
>> don't have to assume your user has JRE installed;
>> 2. You can create minimal Docker image for your Clojure service, it
>> takes less than 50MB at minimal setup, comparing to others can be
>350MB+;
>> 3. You discover.
>>
>> The plugin is here:
>> https://github.com/sunng87/lein-jlink
>>
>> I have a blog post about it:
>> https://sunng.info/blog/custom-jre-for-clojure-app-distribution.html
>>
>> And I'd like to hear your ideas about it.
>>
>> Don't forget it requires JDK9 or 10. Because jlink is a feature
>> introduced in JDK9.
>>
>> --
>> 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.

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
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] lein-jlink: A leiningen plugin for custom JRE creation

2018-01-30 Thread Ning Sun
Hi clojurians,

I just created a Leiningen plugin that creates custom Java Runtime
Environment based on you configuration. The custom JRE can be as small
as 29MB, and it's fully capable to run a Ring web app.

With this plugin:
0. You can test your Clojure application against the custom JRE;
1. You can distribute your Clojure application with runtime attached and
don't have to assume your user has JRE installed;
2. You can create minimal Docker image for your Clojure service, it
takes less than 50MB at minimal setup, comparing to others can be 350MB+;
3. You discover.

The plugin is here:
https://github.com/sunng87/lein-jlink

I have a blog post about it:
https://sunng.info/blog/custom-jre-for-clojure-app-distribution.html

And I'd like to hear your ideas about it.

Don't forget it requires JDK9 or 10. Because jlink is a feature
introduced in JDK9.

-- 
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.


signature.asc
Description: OpenPGP digital signature


[ANN] diehard 0.6.0: Rate limiter

2017-07-08 Thread Ning Sun
Hi,

I'm happy to announce the release of diehard 0.6.0.

This release includes a new rate limiter that you can control the speed
of your code, prevent it from overwhelming certain resource.

The new release can be found at:
https://github.com/sunng87/diehard

BTW, what's diehard?

Diehard is a library made for safety. It provides you flexible safety
utilities includes:

* Retry
* Circuit Breaker
* Rate Limiter

Part of diehard is based on jhalterman's failsafe:
https://github.com/jhalterman/failsafe

Feedback and new ideas are always welcomed. Feel free to add an issue on
github if you have more tools want to be added to this library.

-- 
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.


signature.asc
Description: OpenPGP digital signature


Re: The simplest way to publish to Clojars?

2017-05-31 Thread Ning Sun
PGP is a general-purpose encryption/sign tool. Lein uses it for two things:

* Encrypting your clojars credentials on your disk

* Signing your pom/jars to ensure those things are created by you, which is 
widely used in OpenSource world

There were a lot of guides on the web on how to setup your keys. You can google 
"pgp getting started".

You may also configure your git, email and many other tools to use gpg too.

On May 31, 2017 10:58:11 PM GMT+08:00, Jiyin Yiyong  
wrote:
>I bookmarked this 
>post
>http://thornydev.blogspot.hk/2013/03/signing-and-promoting-your-clojure.html
>
>and read it for several times. I never managed to remember the steps.
>What 
>I can do is only copy/paste the commands.
>
>On Wednesday, May 31, 2017 at 6:35:16 PM UTC+8, James Reeves wrote:
>>
>> The hardest part is setting up GnuPG, and that only needs to be done
>once 
>> per machine. Leiningen has a guide on it:
>>
>> https://github.com/technomancy/leiningen/blob/master/doc/GPG.md
>>
>> Once that's done, deploying is just a single command: "lein deploy 
>> clojars".
>>
>> I believe the process for Boot is similar, except the command is
>"boot 
>> push --repo clojars".
>>
>> On 31 May 2017 at 10:07, Jiyin Yiyong > 
>> wrote:
>>
>>> I tried Lein and Boot. It requires several steps and confused me
>very 
>>> long time at first. After I made it work in Boot then I never want
>to write 
>>> the configs by myself again.
>>>
>>> Now a year has part. What's the simplest way to do it? Can I do that
>in a 
>>> way as simple as npm?
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To post to this group, send email to clo...@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+u...@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+u...@googlegroups.com .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> -- 
>> James Reeves
>> booleanknot.com
>>
>
>-- 
>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.

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
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] Leiningen 2.7.0

2016-08-29 Thread Ning Sun
There is a minor issue in code example of
https://github.com/technomancy/leiningen/blob/stable/doc/MANAGED_DEPS.md#lein-parent-projects,
where `inherits` should be `inherit`.



On 08/25/2016 08:03 AM, Jean Niklas L'orange wrote:
> Greetings, fellow Clojurians!
> 
> I am happy to announce Leiningen 2.7.0! This release contains mostly
> bugfixes, but two major new improvements were added. There is now a
> PowerShell version of `lein.bat`, and `:managed-dependencies` has been
> added to Leiningen.
> 
> Both improvements should be considered to be in beta, but please try
> them out and report bugs you find in the GitHub issue tracker. The
> rationale for `:managed-dependencies` can be found at [1].
> 
> To replace `lein.bat` with the PowerShell equivalent, download
> `lein.cmd` [2] and `lein.ps1` [3] in its stead, and run as usual. If
> you end up with an error related to `Invoke-WebRequest`, then it may
> be a result of an old version of PowerShell, which seems to be
> resolved by installing the Windows Management Framework 4.0 [4].
> 
> The full list of significant user changes:
> 
> * Add PowerShell script for Windows users. (Brian Lalonde)
> * Run `:prep-tasks` before `lein test`, so generated test namespaces
>   will be tested. (Martin Reck)
> * Better error message when attempting to do `lein run` without
>   `project.clj`. (Eduardo Seabra Silva)
> * Add support for `:managed-dependencies`. (Chris Price)
> * Provide the current clojars certificate. (Toby Crawley)
> * Add `*eval-print-dup*` to evaluate forms passed to
>   `eval-in-leiningen` with `*print-dup*`. (Eduardo Seabra Silva)
> * Update bash completions. (Zack Dever)
> * Respect `:scm :dir` in `lein vcs` commands. (Ian Kerins)
> * Improve whitespace handling from `JVM_OPTS`. (Stephen Nelson)
> * Catch and handle fixture errors during `lein test`. (Alex Hall)
> * Fix a bug where spaces in directory names on Windows caused crashes.
>   (Leon Mergen, Tobias Kiertscher, Jean Niklas L'orange)
> * Fix a bug where `lein search` would take forever downloading
>   clojars.org. (Paul Dorman)
> * Retain user defined private repositories when building jars,
>   uberjars and deploy. (Rick Moynihan)
> * Honor whitelist settings when `lein javac` is called via `lein jar`.
>   (Chris Price)
> * `lein vsc push` for git will now only push branch-related tags.
>   (Łukasz Klich)
> 
> Those who have manually installed Leiningen can run `lein upgrade` to
> pull down 2.7.0. `lein downgrade 2.6.1` will back it down to the
> previous version if you run into any issues. Keep in mind that the
> PowerShell script was introduced in this release, hence there are no
> downgrade candidates for it right now.
> 
> We have had lots of contributors help out making this release happen,
> and I'd especially like to thank Chris Price (cprice404) and Florian
> Anderiasch (winks) for their help with this release.
> 
> [1]:
> https://github.com/technomancy/leiningen/blob/stable/doc/MANAGED_DEPS.md
> [2]:
> https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein.cmd
> [3]:
> https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein.ps1
> [4]:
> http://social.technet.microsoft.com/wiki/contents/articles/21016.how-to-install-windows-powershell-4-0.aspx
> 
> -- Jean Niklas
> 
> 
> -- 
> 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.


signature.asc
Description: OpenPGP digital signature


Re: ANN: diehard 0.3.0

2016-08-09 Thread Ning Sun
Thank you, Richard. I hope this library will be helpful to you.
Feel free to report any issue you have with it.

On 08/08/2016 11:37 AM, Richard Möhn wrote:
> Great! I was just going go implement a primitive retry myself, when I
> found this by chance. Thanks for contributing!
> 
> -- 
> 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.


signature.asc
Description: OpenPGP digital signature


ANN: diehard 0.3.0

2016-08-07 Thread Ning Sun
Diehard 0.3.0 just released! Diehard is a library provides retry and
circuit breaker for your clojure code. Currently it's based on Failsafe.

What's new in 0.3.0:

* Updated to Failsafe 0.9.2
* New option :jitter-factor and :jitter-ms on retry policy for adding
randomness to retry delay
* :fallback value and handler for retry block
* `defretrypolicy` for defining named policy

Github: https://github.com/sunng87/diehard
Docs: https://sunng87.github.io/diehard



-- 
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.


signature.asc
Description: OpenPGP digital signature


Re: ANN: diehard 0.1.0, a Clojure wrapper for Failsafe

2016-07-14 Thread Ning Sun
Quick update: diehard 0.2.2 released with circuit breaker support.

;; Define a circuit breaker with failure threshold:
;; it will be open when 35 executions in 50 failed
;; and it waits 1000ms to become half-open, and tests 50 executions to
;; see if failure is recovered

(diehard/defcircuitbreaker test-cb {:failure-threshold-ratio [35 50]
:delay-ms 1000})

;; you code within `with-circuit-breaker` will be protected by this
;; circuit breaker `test-cb`
;; if it's open, the block will throw a
;; `net.jodah.failsafe.CircuitBreakerOpenException`
;; and fail fast without blocking.

(diehard/with-circuit-breaker test-cb
  ;; your protected code here
  )

For more information and issue reporting:

https://github.com/sunng87/diehard
https://sunng87.github.io/diehard/


On 07/04/2016 11:32 PM, Ning Sun wrote:
> That's already in progress:
> https://github.com/sunng87/diehard/pull/1
> 
> On 07/03/2016 02:21 AM, Janko Muzykant wrote:
>> Eagerly waiting for circuit-breaker wrapper :)
>>
>> cheers,
>> j.
>>
>>
>> Ning Sun  writes:
>>
>>> Hi all,
>>>
>>> Just to announce the first release of diehard[1], a clojure wrapper over
>>> the Failsafe[2] library, which deals retry stuff for you.
>>>
>>> Diehard allows you to set retry criteria for any block a clojure code, like:
>>>
>>> (diehard/with-retry {:retry-on IOException}
>>>   (http/get "https://google.com";))
>>>
>>> The first release only has retry supported, more to come in next few
>>> versions.
>>>
>>> [1]: https://github.com/sunng87/diehard/
>>> [2]: https://github.com/jhalterman/failsafe
>>
> 

-- 
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.


signature.asc
Description: OpenPGP digital signature


Re: ANN: diehard 0.1.0, a Clojure wrapper for Failsafe

2016-07-04 Thread Ning Sun
That's already in progress:
https://github.com/sunng87/diehard/pull/1

On 07/03/2016 02:21 AM, Janko Muzykant wrote:
> Eagerly waiting for circuit-breaker wrapper :)
> 
> cheers,
> j.
> 
> 
> Ning Sun  writes:
> 
>> Hi all,
>>
>> Just to announce the first release of diehard[1], a clojure wrapper over
>> the Failsafe[2] library, which deals retry stuff for you.
>>
>> Diehard allows you to set retry criteria for any block a clojure code, like:
>>
>> (diehard/with-retry {:retry-on IOException}
>>   (http/get "https://google.com";))
>>
>> The first release only has retry supported, more to come in next few
>> versions.
>>
>> [1]: https://github.com/sunng87/diehard/
>> [2]: https://github.com/jhalterman/failsafe
> 

-- 
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.


signature.asc
Description: OpenPGP digital signature


Re: ANN: diehard 0.1.0, a Clojure wrapper for Failsafe

2016-07-02 Thread Ning Sun
Nice! You may also like its clustered version:
https://github.com/sunng87/slacker-cluster

Slacker and slacker-cluster now serves tens of millions RPC in our
production.

Feel free to contact me if you have any issue with both libraries.



On 07/02/2016 12:31 PM, Stanislav Yurin wrote:
> Thank you.
> 
> Also recently made a use of your https://github.com/sunng87/slacker lib
> - really interesting approach.
> 
> On Thursday, June 30, 2016 at 6:08:27 PM UTC+3, Sun Ning wrote:
> 
> Hi all,
> 
> Just to announce the first release of diehard[1], a clojure wrapper
> over
> the Failsafe[2] library, which deals retry stuff for you.
> 
> Diehard allows you to set retry criteria for any block a clojure
> code, like:
> 
> (diehard/with-retry {:retry-on IOException}
>   (http/get "https://google.com";))
> 
> The first release only has retry supported, more to come in next few
> versions.
> 
> [1]: https://github.com/sunng87/diehard/
> 
> [2]: https://github.com/jhalterman/failsafe
> 
> 
> -- 
> 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.


signature.asc
Description: OpenPGP digital signature


ANN: diehard 0.1.0, a Clojure wrapper for Failsafe

2016-06-30 Thread Ning Sun
Hi all,

Just to announce the first release of diehard[1], a clojure wrapper over
the Failsafe[2] library, which deals retry stuff for you.

Diehard allows you to set retry criteria for any block a clojure code, like:

(diehard/with-retry {:retry-on IOException}
  (http/get "https://google.com";))

The first release only has retry supported, more to come in next few
versions.

[1]: https://github.com/sunng87/diehard/
[2]: https://github.com/jhalterman/failsafe

-- 
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.


signature.asc
Description: OpenPGP digital signature


Re: [ANN] core.async 0.2.382

2016-06-23 Thread Ning Sun
I guess this change is to encourage user to configure their own pool
size based on their use case, instead of completely relying on the default.

On 06/23/2016 11:33 AM, Daniel Compton wrote:
> I knew I must be missing something. You can also set the core.async
> threadpool size with
> 
> (System/setProperty "clojure.core.async.pool-size" "42")
> 
> as long as that runs before any core.async code tries to use the
> threadpool. Some context on why the change was made to 8 would be good,
> but it is easy to set this value yourself.
> 
> On Thu, Jun 23, 2016 at 9:13 AM Daniel Compton
> mailto:daniel.compton.li...@gmail.com>>
> wrote:
> 
> Bumping this too. What was the context for this change? I don’t see
> any JIRA tickets linked in the commits
> 
> 
>  with
> a rationale for why 8 was picked as the thread pool size. This has
> the potential for breaking or reducing efficiency for apps that were
> relying on the 42 + 2 * cores behaviour. I’m happy that this is now
> configurable, but puzzled as to why the default wasn’t kept as 42 +
> 2 * cores? 
> 
> Also, because this needs to be passed as a java property, if we want
> our applications to be able to handle differing core counts (e.g.
> running on heterogenous servers) it seems like we will need to write
> a bash script to calculate our threadpool size before starting up.
> 
> Perhaps I’m missing something really obvious here, if so, please let
> me know :)
> 
> Tim Ewald, can you help with this?
> 
> On Tue, Jun 14, 2016 at 9:10 AM Fluid Dynamics  > wrote:
> 
> On Monday, June 13, 2016 at 4:14:25 PM UTC-4, Alex Miller wrote:
> 
> core.async 0.2.382 is now available.
> 
> Try it via:  [org.clojure/core.async "0.2.382"]
> 
> 0.2.382 includes the following changes:
> 
> - Change default dispatch thread pool max size to 8.
> - Add Java system property clojure.core.async.pool-size to
> override the dispatch thread pool max size
> 
> 
> Why 8, rather than, say, (.availableProcessors
> (Runtime/getRuntime))?
> 
> -- 
> 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.
> 
> -- 
> —
> Daniel
> 
> -- 
> —
> Daniel
> 
> -- 
> 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.


signature.asc
Description: OpenPGP digital signature


Re: New Clojars feature: atomic deploys

2016-03-08 Thread Ning Sun
Thanks! This is a great feature and especially important for users with
a poor network connection.

On 03/08/2016 10:43 PM, Mayank Jain wrote:
> Thank you so much for this! I've personally faced this issue before. So
> I know how helpful this change is. Great job! :)
>
> On Mar 8, 2016 7:39 PM, "Toby Crawley"  > wrote:
>
> We just pushed a new release of Clojars that includes a new
> implementation of our internal deploy logic. The big change there is
> deployments are now atomic - if the deployment fails (due to a network
> interruption/corruption or invalid artifacts), then we no longer write
> it to the repository.
>
> We verify the deployment by applying a set of validations (see
> https://github.com/clojars/clojars-web/wiki/Pushing#validations) after
> all of the artifacts have been uploaded, but before we send back a
> response to the final PUT. This allows us to return a (hopefully
> helpful) error message if any of the validations fail.
>
> >From a user perspective, deployment should behave the same for the
> most part - the only thing that would be different is we now validate
> after all of the artifacts are uploaded instead of applying some
> validations for each artifact. This means that if you try to redeploy
> a non-SNAPSHOT version, for example, it used to fail on the first
> artifact, but will now fail after the /last/ artifact has been
> uploaded.
>
> As part of this change, we repaired any invalid non-SNAPSHOT
> maven-metadata.xml files that had resulted from partial deploys
> (likely from network interruptions) in the past.
>
> Since this is a big internal change, please let us know if you see any
> issues or oddness with deployment. You can file an issue
> (https://github.com/clojars/clojars-web/issues), or find us in
> #clojars on either the Clojurians slack or Freenode.
>
> - Toby
>
> --
> 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.


-- 
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.


signature.asc
Description: OpenPGP digital signature


[ANN] Rigui: Hierarchical Timing Wheels for Clojure and ClojureScript

2016-02-27 Thread Ning Sun
Rigui is an implementation of hierarchical timing wheels, for Clojure
and ClojureScript. The idea was inspired by this blog post[1]. Kafka has
been using timing wheels based timer to track request timeout.

Rigui provides a few functions for you to `start!` a timer, schedule
something for `later!`, or repeatedly for `every!` fixed interval.

Also it has an experimental core.async channel `delayed-chan`. Values
put into it will be available to take after some delay.

The library is at:
https://github.com/sunng87/rigui

[1]
http://www.confluent.io/blog/apache-kafka-purgatory-hierarchical-timing-wheels

-- 
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.


signature.asc
Description: OpenPGP digital signature


Re: [ANN] Leiningen 2.5.3

2015-09-23 Thread Ning Sun
Thanks for the release! I confirm the GPG issue is fixed in 2.5.3.

On 09/22/2015 06:04 AM, Jean Niklas L'orange wrote:
> Greetings, Clojurians.
>
> I am happy to announce the release of Leiningen version 2.5.3. This
> version
> contains mostly bugfixes, most notably an issue where environment
> variables were
> not propagated down to GPG. This caused `lein deploy` and similar
> commands to
> fail if you set up GPG with the `GPG_AGENT_INFO` environment variable. In
> addition, `lein vcs tag` now supports `--no-sign` if you do not want
> to sign
> your git tags.
>
> Here's a list of user-visible changes:
>
> ## 2.5.3 / 2015-09-21
>
> * Add CHANGELOG.md to default lein templates. (Daniel Compton)
> * `lein vcs tag` now supports the `--no-sign` flag. (Daniel Compton)
> * Fix a bug where javac errors were not printed to terminal. (Brandon
> Shimanek)
> * Fix a bug where environment variables were not propagated down to
> GPG. (Brandon Shimanek)
> * `lein retest` now saves information on which tests that fail.
> (Shalaka Patil)
>
> For those who manually installed, `lein upgrade` will pull in 2.5.3,
> and `lein
> downgrade 2.5.2` will bring you back to the previous version if you
> run into any
> issues.
>
> Thanks to all the contributors who made this happen!
>
> -- Jean Niklas
>
> -- 
> 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.


[ANN] Ring-jetty9-adapter(rj9a) updated with HTTP2 support

2015-07-26 Thread Ning Sun

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hi all,

I am pleased to announce the 0.9 release of ring-jetty9-adapter(rj9a):
https://github.com/sunng87/ring-jetty9-adapter

The new version is based on Jetty 9.3.1, which means you will be able to
run your existed clojure web application on HTTP2 protocol. There is no
change required for your ring app.* You can find a quick example here:
https://github.com/sunng87/ring-jetty9-adapter/blob/master/examples/rj9a/http2.clj

You can start the server by:

$ lein with-profile default,example-http2 run

And test your server with nghttp2 or Firefox.

* Note that jdk8 is required.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQEcBAEBCAAGBQJVtJHyAAoJEBnCozJnPTdiyRUIAIKiLBNktjOl11oujYNMOhZI
7mpAApT+/cMUVPI/naAJVviUtQJTbWDbZ404PrPkzEVQWLlepUgxdCOIjQTHSxQC
B6jMKXKq6CHprvX5ZNlLaQ1AAFzxURVCEB3krtlGEnoxWfXQ29o3vWJqYfoexT4r
RAzItRAid/1BrbAs7eUB0PBShnQKzxE2bAGuRxev22DJQaalHmQ00em2q0TUOLtz
qTkY77vFt7DMJb6yPrDcfkabMsVDn8UrglCz/Dd8crE1NXTydvAtUaJrXxGao28E
vgmQd+20ysr+zfE2r/4UuV3GwqeQDG9xkq9VmbpYxxHF+/0huyzfu/mhfw0Eldc=
=w7VD
-END PGP SIGNATURE-


-- 
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.