[ANN] clj-new -- creating new Clojure projects using the clj CLI

2018-04-17 Thread Sean Corfield
clj-new -- https://github.com/seancorfield/clj-new

This will generate new projects for you, either based on `clj`, or from any 
existing Leiningen or Boot template (or, I hope in the future, `clj-template` 
projects!).

You'll probably want to add clj-new as an alias in your ~/.clojure/deps.edn 
like this:

{:aliases
{:new {:extra-deps {seancorfield/clj-new
 {:git/url "https://github.com/seancorfield/clj-new;
  :sha "492bb2e7ad7373a8b5958124a86cddc4c7a123d5"}}
:main-opts ["-m" "clj-new.create"]}}
...}

Create a basic application:

clj -A:new app myname/myapp
cd myapp
clj -m myname.myapp

Run the tests:

clj -A:test:runner

Yes, the `deps.edn` generated from the `app` (and `lib`) built-in template 
includes aliases to include your `test` folder, add `test.check` as a 
dependency, and bring in and run Cognitect's `test-runner`

The project name should either be a qualified Clojure symbol or a multi-segment 
name -- single segment project names are not allowed!

For a qualified Clojure symbol, the first part is typically your GitHub account 
name or your organization's domain reversed, e.g., `com.acme`, and the second 
part is the "local" name for your project (and is used as the name of the 
folder in which the project is created).

For a multi-segment project name, such as `foo.bar`, the folder that will be 
created would be called `foo.bar` and will contain `src/foo/bar.clj`.

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.


Re: Tack scheduler

2018-04-17 Thread Luke Burton
There may be other games in town these days, but I've had some success with 
http://clojurequartz.info , although I think I 
ended up just using the Java Quartz library directly.

Folks will chime (heh) in and recommend libraries like at-at, chime, or tick. 
However, once your app starts causing side effects in the real world, you want 
a scheduling system that has the remaining 80% of features you need, like:

- persistent storage of jobs
- logging and monitoring
- pause and resume
- dependencies between jobs
- configurable retry policies

Based on your additional criteria, I'm aware of no other scheduling system that 
satisfies all that, other than Quartz. Would be happy to hear other's 
recommendations too though.

Luke.


> On Apr 17, 2018, at 2:34 PM, Brjánn Ljótsson  > wrote:
> 
> Hi,
> 
> I'm about to implementera a task scheduler in a Clojure web app. It should do 
> various tasks such as cleaning up temporary files, send e-mail reminders to 
> users, and flagging database entries based on rules. It is currently 
> implemented in a php script which runs as a Cron job and executes task 
> objects (one for each task) that inherit from a task superclass that has 
> methods such as initialize, execute, and finish. But now I want to implement 
> it using Clojure idioms. 
> 
> Are there good libraries/examples of
> - A scheduling function that executes a task runner every X minutes?
> - An abstract description of a task with methods and timeout rules?
> - An extensible task list that can prioritize tasks according to conditions 
> such as time of day, time since last run, or other arbitrary conditions?
> 
> Thanks,
> Brjánn Ljótsson
> 
> -- 
> 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.


Tack scheduler

2018-04-17 Thread Brjánn Ljótsson
Hi,

I'm about to implementera a task scheduler in a Clojure web app. It should do 
various tasks such as cleaning up temporary files, send e-mail reminders to 
users, and flagging database entries based on rules. It is currently 
implemented in a php script which runs as a Cron job and executes task objects 
(one for each task) that inherit from a task superclass that has methods such 
as initialize, execute, and finish. But now I want to implement it using 
Clojure idioms. 

Are there good libraries/examples of
- A scheduling function that executes a task runner every X minutes?
- An abstract description of a task with methods and timeout rules?
- An extensible task list that can prioritize tasks according to conditions 
such as time of day, time since last run, or other arbitrary conditions?

Thanks,
Brjánn Ljótsson

-- 
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-nsorg - Leiningen plugin for keeping ns declarations organized

2018-04-17 Thread Immo Heikkinen
I have written a small Leiningen plugin to help keeping Clojure(Script) ns
declarations lexicographically sorted:

https://github.com/immoh/lein-nsorg

The core functionality is also available as standalone Clojure library:

https://github.com/immoh/nsorg

Maybe someone else finds it also useful.

Best regards,
Immo

-- 
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] clj-memory meter – measure the memory used by arbitrary objects

2018-04-17 Thread Alexander Yakushev
Love to hear that!

On Tuesday, April 17, 2018 at 2:57:18 PM UTC+3, Kimmo Koskinen wrote:
>
> We just tried this library with a colleague while trying to track down a 
> memory leak when parsing a jdbc result set and saw a stunning victory :)
> With clj-memory-meter we were able to see that lazy parsing of json 
> strings left references to quite large buffers (in comparison to actual 
> data) to each item in the sequence, while strict parsing naturally removed 
> the problem.
>
> clj-memory-meter showed it's usefulness, so a big thanks for the library! 
> :)
>
> keskiviikko 7. maaliskuuta 2018 18.13.23 UTC+2 Alexander Yakushev 
> kirjoitti:
>>
>> Looks like it's because of JDK9. I created a Github issue, let's take it 
>> there: https://github.com/clojure-goes-fast/clj-memory-meter/issues/1
>>
>> On Wednesday, March 7, 2018 at 5:49:07 PM UTC+2, 路Ricardo M. wrote:
>>>
>>> Java Version:
>>> java version "9.0.4"
>>> Java(TM) SE Runtime Environment (build 9.0.4+11)
>>> Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)
>>> System: Arch Linux
>>>
>>

-- 
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] clj-memory meter – measure the memory used by arbitrary objects

2018-04-17 Thread Kimmo Koskinen
We just tried this library with a colleague while trying to track down a 
memory leak when parsing a jdbc result set and saw a stunning victory :)
With clj-memory-meter we were able to see that lazy parsing of json strings 
left references to quite large buffers (in comparison to actual data) to 
each item in the sequence, while strict parsing naturally removed the 
problem.

clj-memory-meter showed it's usefulness, so a big thanks for the library! :)

keskiviikko 7. maaliskuuta 2018 18.13.23 UTC+2 Alexander Yakushev kirjoitti:
>
> Looks like it's because of JDK9. I created a Github issue, let's take it 
> there: https://github.com/clojure-goes-fast/clj-memory-meter/issues/1
>
> On Wednesday, March 7, 2018 at 5:49:07 PM UTC+2, 路Ricardo M. wrote:
>>
>> Java Version:
>> java version "9.0.4"
>> Java(TM) SE Runtime Environment (build 9.0.4+11)
>> Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)
>> System: Arch Linux
>>
>

-- 
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: Using Clojure for public facing system in a bank - code security scanning - any luck?

2018-04-17 Thread Jason Turner
Thanks a lot Aaron for getting in touch.

We are pretty much following all the practices you have listed - and I agree 
that they overall have more impact than static analysis, and can do more to 
lead to a secure deliverable; it is good though to note them and review to what 
extent we can make them a bit more formal. The main appeal of static analysis 
for us and our customer base is that it provides a somewhat objective point of 
comparison, so if we can see our way to partly or fully replacing that with a 
more formal/objective presentation of these aspects that may well help us.

-- 
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: Using Clojure for public facing system in a bank - code security scanning - any luck?

2018-04-17 Thread Jason Turner
Dragan our experience is that organisations often adopt something like
BlackDuck and then use that as their benchmark.

On Sun, Apr 15, 2018 at 10:59 AM, Dragan Djuric  wrote:

> Hi all. Very interesting thread! I guess that not many Clojure developers
> are in this situation, but I hope many more will be; that would mean that
> Clojure got the foot in the door of the enterprise.
>
> Gregg, I need a little clarification on the last thing you mentioned: Is a
> dependency treated as secure and given the green checkmark in usual
> security procedures if there is a (community) security audit that
> systematically listed vulnerabilities and recommended ways to avoid them?
> What is (in your experience with banking) the minimum amount of "burden"
> necessary so that an artifact is given a passing mark? Is there a broader
> standard, or each client has its own checklist? How defined those
> procedures are? Do they update at glacial place, or a good and honest
> efforts on case-to-case basis are accepted (such as hiring a security
> expert to audit the code with not-so-standard procedures)?
>
> On Friday, April 13, 2018 at 11:24:54 PM UTC+2, Gregg Reynolds wrote:
>>
>>
>>
>> On Fri, Apr 13, 2018, 4:09 PM Aaron Bedra  wrote:
>>
>>> Penetration testing is something performed on an application, but a
>>> source code review of the language is certainly an interesting idea. My
>>> company does these all the time. I ran this by my folks and there was
>>> certainly interest. If we could publish the results and create a healthy
>>> discussion my company would be happy to participate and do this at a fixed
>>> and heavily discounted price.
>>>
>>
>> Naive question from the clueless peanut gallery: are you talking about a
>> security audit of clojure core (& etc) source, which could then be cited as
>> evidence by app developers?
>>
>> E.g. I build an app against a signed version of clojure which is
>> "certified" in some sense? Then I only have to audit my code (and lib
>> dependencies)?
>>
>> Gregg
>>
> --
> 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.