Re: lein-codox custom writer

2018-03-05 Thread James Reeves
Leiningen has an "update-in" task for updating the project map on the fly,
so something like:

lein update-in :codox assoc :writer my.custom/writer -- codox

You have to make sure that the custom writer is on the classpath of course,
which may require updating the project file to include new dependencies as
well.

On 5 March 2018 at 18:45, Janko Muzykant  wrote:

>
> Codox documentation mentions how to set up a custom output writer using
> leiningen :codox option:
>
>   :codox {:writer codox.writer.html/write-docs}
>
> Is there any way to achieve the same without touching project.clj,
> eg. by providing writer location at lein command-line (similarly to what
> boot-codox provides with -w option) and by injecting writer
> implementation into a classpath?
>
> JM.
>
> --
> 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.
>



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


lein-codox custom writer

2018-03-05 Thread Janko Muzykant

Codox documentation mentions how to set up a custom output writer using
leiningen :codox option:

  :codox {:writer codox.writer.html/write-docs}

Is there any way to achieve the same without touching project.clj,
eg. by providing writer location at lein command-line (similarly to what
boot-codox provides with -w option) and by injecting writer
implementation into a classpath?

JM.

-- 
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: Developing in Clojure with Emacs: Mastering the Keyboard

2018-03-05 Thread Leandro Doctors
Hi, Chris,

Have you tried Spacemacs? It comes with a pre-configured Clojure layer...
Spacemacs.org

For me, it worked flawlessly (the only big difference with the default
configuration being using parinfer instead of paredit).

Best,
Leandro

On 3 Mar 2018 13:11, "Chris Shellenbarger"  wrote:

> I spent the last week learning and using Emacs and CIDER for Clojure
> Development.
>
> I've started to write up a lot of the lessons I've learned from doing so
> in the hopes that it will help some other people who attempt something
> similar.
>
> Anyway, if you're interested in getting started with Emacs and CIDER,
> you'll have to learn about how to use the keyboard so I wrote a couple of
> key lessons in a Medium post:  Developing in Clojure with Emacs:
> Mastering the Keyboard
> 
> .
>
> My environment was Emacs 24.5.1 with CIDER 0.16.0 on Linux Mint 18.3.
>
> I used the Clojure for the Brave and True  book
> for a basic intro into Emacs  and
> used the provided emacs configuration files as a starting point.  However,
> these only worked with CIDER 0.8.0 and were about four years old.  I made
> some modifications of the files to work with CIDER 0.16.0 and put them up
> for anyone to use on my BitBucket Repository
> .
>
> I have a lot more to share about my Emacs experience, but I found that
> there was so much that I had to split it into multiple posts.
>
> Hope it helps someone out there!
>
>
>
> --
> 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: Developing in Clojure with Emacs: Mastering the Keyboard

2018-03-05 Thread Didier
I'd second spacemacs, just make sure you go Holy and use Ivy.

Helm I find is way too slow. And with Evil mode, you are now learning 3 things 
at once, Clojure, Emacs and Vim. Unless you already master Vim, then you can go 
Evil.

-- 
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: Developing in Clojure with Emacs: Mastering the Keyboard

2018-03-05 Thread Mark Stang
I have found spacemacs to be the easiest to get things running.

Clojure Development with Cider (https://practicalli.github.io/spacemacs/)

I have used Cursive over the years, but I don't use it enough to justify
continuing to pay for it.

Spacemacs provides a whole group of editors for odd languages.

However, oddly enough, not Groovy.

regards,

Mark

On Mon, Mar 5, 2018 at 8:56 AM, Phillip Lord 
wrote:

>
>
> which-key is a fantastic package. The Emacs out-of-the-box experience is
> getting better, but slowly; this sort of functionality really needs to
> be in core, automatically active.
>
> Phil
>
> Chris Shellenbarger  writes:
>
> > I found them useful for getting the repl to run - after following these
> > instructions I was able to run 'cider-jack-in' and get to a repl that
> > worked the same was as the one I had been using in Cursive.
> >
> > They also pointed me to a couple of suggested packages to install, in
> which
> > whichkey was one.
> >
> > However, with a running REPL, I had no idea what to do - I was consulting
> > cheat sheets for things I knew I wanted to do, but did not have a clear
> way
> > to discover all the options available to me.  That's when I turned to the
> > CftBT book and his configuration because at least I could see what a
> > Clojure Developer was using.   Installing whichkey and whatever package
> > allows the search for functions was incredibly helpful (which inspired
> the
> > original post).
> >
> > What I feel is missing from a lot of the Clojure world is documentation
> on
> > how the real professional Clojure developers are working from a day to
> day
> > perspective.  This includes any that work in Emacs/CIDER - how are they
> > working more productively than we can in Cursive or another IDE?  With
> the
> > tools I mention in my post, I can see how you can get started down that
> > path.
> >
> > As far as the CIDER docs go, I think a huge way to increase their utility
> > would be to provide an example Emacs configuration so that people can
> just
> > download it and get up and running within a context that can be discussed
> > in the documentation.  I'm sure people have these configurations running
> -
> > you can use the ones that I put up as well.
> >
> >
> > On Sunday, March 4, 2018 at 7:13:37 AM UTC-6, Bozhidar Batsov wrote:
> >>
> >> Btw, didn't you find the instructions in the official manual useful (
> >> http://cider.readthedocs.io/en/latest/installation/ and
> >> http://cider.readthedocs.io/en/latest/up_and_running/). Admitted they
> are
> >> not great, but they do cover a lot of ground and are reasonably
> up-to-date.
> >>
> >> On 3 March 2018 at 23:11, Chris Shellenbarger  >> > wrote:
> >>
> >>> I spent the last week learning and using Emacs and CIDER for Clojure
> >>> Development.
> >>>
> >>> I've started to write up a lot of the lessons I've learned from doing
> so
> >>> in the hopes that it will help some other people who attempt something
> >>> similar.
> >>>
> >>> Anyway, if you're interested in getting started with Emacs and CIDER,
> >>> you'll have to learn about how to use the keyboard so I wrote a couple
> of
> >>> key lessons in a Medium post:  Developing in Clojure with Emacs:
> >>> Mastering the Keyboard
> >>>  clojure-with-emacs-mastering-the-keyboard-6cb9bef7f760>
> >>> .
> >>>
> >>> My environment was Emacs 24.5.1 with CIDER 0.16.0 on Linux Mint 18.3.
> >>>
> >>> I used the Clojure for the Brave and True 
> book
> >>> for a basic intro into Emacs  basic-emacs/> and
> >>> used the provided emacs configuration files as a starting point.
> However,
> >>> these only worked with CIDER 0.8.0 and were about four years old.  I
> made
> >>> some modifications of the files to work with CIDER 0.16.0 and put them
> up
> >>> for anyone to use on my BitBucket Repository
> >>> .
> >>>
> >>> I have a lot more to share about my Emacs experience, but I found that
> >>> there was so much that I had to split it into multiple posts.
> >>>
> >>> Hope it helps someone out there!
> >>>
> >>>
> >>>
> >>> --
> >>> 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 .
> 

Re: Developing in Clojure with Emacs: Mastering the Keyboard

2018-03-05 Thread Phillip Lord


which-key is a fantastic package. The Emacs out-of-the-box experience is
getting better, but slowly; this sort of functionality really needs to
be in core, automatically active.

Phil

Chris Shellenbarger  writes:

> I found them useful for getting the repl to run - after following these 
> instructions I was able to run 'cider-jack-in' and get to a repl that 
> worked the same was as the one I had been using in Cursive.
>
> They also pointed me to a couple of suggested packages to install, in which 
> whichkey was one. 
>
> However, with a running REPL, I had no idea what to do - I was consulting 
> cheat sheets for things I knew I wanted to do, but did not have a clear way 
> to discover all the options available to me.  That's when I turned to the 
> CftBT book and his configuration because at least I could see what a 
> Clojure Developer was using.   Installing whichkey and whatever package 
> allows the search for functions was incredibly helpful (which inspired the 
> original post).
>
> What I feel is missing from a lot of the Clojure world is documentation on 
> how the real professional Clojure developers are working from a day to day 
> perspective.  This includes any that work in Emacs/CIDER - how are they 
> working more productively than we can in Cursive or another IDE?  With the 
> tools I mention in my post, I can see how you can get started down that 
> path.
>
> As far as the CIDER docs go, I think a huge way to increase their utility 
> would be to provide an example Emacs configuration so that people can just 
> download it and get up and running within a context that can be discussed 
> in the documentation.  I'm sure people have these configurations running - 
> you can use the ones that I put up as well.
>
>
> On Sunday, March 4, 2018 at 7:13:37 AM UTC-6, Bozhidar Batsov wrote:
>>
>> Btw, didn't you find the instructions in the official manual useful (
>> http://cider.readthedocs.io/en/latest/installation/ and 
>> http://cider.readthedocs.io/en/latest/up_and_running/). Admitted they are 
>> not great, but they do cover a lot of ground and are reasonably up-to-date. 
>>
>> On 3 March 2018 at 23:11, Chris Shellenbarger > > wrote:
>>
>>> I spent the last week learning and using Emacs and CIDER for Clojure 
>>> Development.
>>>
>>> I've started to write up a lot of the lessons I've learned from doing so 
>>> in the hopes that it will help some other people who attempt something 
>>> similar.
>>>
>>> Anyway, if you're interested in getting started with Emacs and CIDER, 
>>> you'll have to learn about how to use the keyboard so I wrote a couple of 
>>> key lessons in a Medium post:  Developing in Clojure with Emacs: 
>>> Mastering the Keyboard 
>>> 
>>> .
>>>
>>> My environment was Emacs 24.5.1 with CIDER 0.16.0 on Linux Mint 18.3.
>>>
>>> I used the Clojure for the Brave and True  
>>> book 
>>> for a basic intro into Emacs  
>>> and 
>>> used the provided emacs configuration files as a starting point.  However, 
>>> these only worked with CIDER 0.8.0 and were about four years old.  I made 
>>> some modifications of the files to work with CIDER 0.16.0 and put them up 
>>> for anyone to use on my BitBucket Repository 
>>> .
>>>
>>> I have a lot more to share about my Emacs experience, but I found that 
>>> there was so much that I had to split it into multiple posts.   
>>>
>>> Hope it helps someone out there!
>>>
>>>
>>>
>>> -- 
>>> 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.
>>>
>>
>>

-- 
Phillip Lord,   Phone: +44 (0) 191 208 7827
Biology, Medicine, ComputingEmail: phillip.l...@newcastle.ac.uk
School of Computing,
http://homepages.cs.ncl.ac.uk/phillip.lord
Room 5.012 Urban Sciences Building, skype: russet_apples
Newcastle University,   twitter: phillord
NE4 5TG

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

Re: What’s the best way to browse all lein templates?

2018-03-05 Thread jmckitrick
I'll definitely try that again, but since I'm not read to get specific yet,
I'm still working at a 'fuzzy logic' level. I'm especially interested in
what is most popular, current, and has a lot of community support.

On Sun, Mar 4, 2018 at 8:11 PM Edward Knyshov  wrote:

> Did you try to narrow down your result set with Clojars search syntax?
> https://github.com/clojars/clojars-web/wiki/Search-Query-Syntax
> It's based on lucene and I think you can do lots of things with it.
>
> On Sunday, March 4, 2018 at 10:06:45 PM UTC+7, Jonathon McKitrick wrote:
>>
>> There are 1860 lein templates on clojars as of this writing. Is there a
>> sane way to view them and group them by category?
>>
>> I’m looking for a handful of templates to consider for my next project.
>>
> --
> 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 a topic in the
> Google Groups "Clojure" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/clojure/_wgCeD-dCkA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Jonathon McKitrick

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

2018-03-05 Thread Alexander Yakushev
I'm happy to release the first version of clj-memory-meter 
. It's a thin 
wrapper around jamm  which allows 
measuring how much space an arbitrary object occupies. clj-memory-meter is 
usable from the REPL, can be loaded on-demand, and doesn't require to 
launch JVM with special parameters.

Blog post with a little more detail and usage examples: 
http://clojure-goes-fast.com/blog/introspection-tool-object-memory-meter/

To start, using add [com.clojure-goes-fast/clj-memory-meter "0.1.0"], or 
run the following with clj:

$ clj -Sdeps "{:deps {com.clojure-goes-fast/clj-memory-meter {:mvn/version 
\"0.1.0\"}}}"
Clojure 1.9.0

;; Nevermind the warning, it doesn't break the library.
user=> (require '[clj-memory-meter.core :as mm])
objc[59881]: Class JavaLaunchHelper is implemented in both 
/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/bin/java 
(0x1089814c0) and 
/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/jre/lib/libinstrument.dylib
 
(0x10d9dc4e0). One of the two will be used. Which one is undefined.
nil

user=> (mm/measure (vec (range 10)))
"2.8 MB"

user=> (mm/measure (list 1 2 3 4 5) :debug true)

root [clojure.lang.PersistentList] 320 bytes (40 bytes)
  |
  +--_first [java.lang.Long] 24 bytes (24 bytes)
  |
  +--_rest [clojure.lang.PersistentList] 256 bytes (40 bytes)
|
+--_first [java.lang.Long] 24 bytes (24 bytes)
|
+--_rest [clojure.lang.PersistentList] 192 bytes (40 bytes)
  |
  +--_first [java.lang.Long] 24 bytes (24 bytes)
  |
  +--_rest [clojure.lang.PersistentList] 128 bytes (40 bytes)
|
+--_first [java.lang.Long] 24 bytes (24 bytes)
|
+--_rest [clojure.lang.PersistentList] 64 bytes (40 bytes)
  |
  +--_first [java.lang.Long] 24 bytes (24 bytes)

"320 B"

I hope this library will be useful for you. Enjoy!

-- 
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: Why does the `def-` not exist?

2018-03-05 Thread Chris Ford
This isn't foolproof Léo, but sometimes folks use docstrings to make that
distinction i.e. if it's got a docstring it's part of the public API.
Codox, for example, takes this approach when deciding what to include in
generated API documentation.

On 4 March 2018 at 12:50, Léo Noel  wrote:

> Or maybe people are confused because the :private metadata *complects*
> two separate concerns : *API commitment* and *visibility*.
> If there was a way to programmatically make the distinction between
> implementation and API without impacting visibility, it would be
> tremendously valuable for tooling and I would definitely use it.
>
>
> On Saturday, March 3, 2018 at 6:02:00 PM UTC+1, Alex Miller wrote:
>>
>> > ^:private is the stale and sleazy co-conspirator of another blunt
>> instrument, the whole-ns :use.
>>
>> It’s also useful for anything that uses the var meta to show you only
>> public vars in an ns, such as dir, ns-publics, etc. those are all useful
>> and would affect your repl experience even if you never :use or :refer
>> :all.
>>
>> I find people have different relationships with :private depending on
>> what kind of work they do. It’s very useful in in libs for delineating
>> public apis, much less important in an app context.
>
> --
> 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.