On Sun, Nov 11, 2012 at 10:56 PM, Softaddicts
<lprefonta...@softaddicts.ca>wrote:

> Since you use emacs, why not create a key binding to an expression that
> would get
> evaluated in the REPL ? or to eval the zxcv macro ?
>
> Luc P.
>

Luc,

Yes, the solutions you described (Clojure utility macro, or Emacs key
binding) are possible solutions to my "problem", but I was asking, because
I thought I wasn't the only one to have this "issue".

Denis


>
>
>
> > I just find this puzzling, the "coding standards" emphasizes reducing
> dependencies.
> > Now if you add dependencies in your boiler plate that may in fact not be
> used by the source code
> > in the current name space, how can a human reader understand your
> dependencies by reading the top nth lines of your source file ?
> >
> > This will worsen as your boiler plate expands.
> >
> > Why not require a utility name space (:use [my-boilerplate]) with a
> single public uniquely named macro
> > (zxcv or any adjacent keys on your keyboard that you find easy to type)
> > to get all that stuff on your behalf in the REPL ?
> >
> > Include this systematically and just type (zxcv) at the REPL. If you
> want to avoid the typing while in dev mode,
> > add (zxcv) in the source code after the (ns) macro. It will require all
> the other things you need until you are done
> > with it. No need to type it in the REPL anymore.
> >
> > Later on you can add the real dependencies in the ns macro. That can be
> the last step after your dev is done.
> > It should sum up to a few requires with aliases. The zxcv is still
> available (requiring twice the same name space
> > with the same alias has no bad effects) when you go back later at the
> REPL.
> >
> > I maintain that once you require a name space, is entirely loaded so the
> explicit narrowing of function used
> > looks to me an overkill. Especially if you have an alias in your require
> call. There's no possible confusion with
> > an alias and calls are can easily be searched as text strings which all
> IDEs support.
> >
> > Luc P.
> >
> > On Sun, 11 Nov 2012 20:44:24 +0100
> > Denis Labaye <denis.lab...@gmail.com> wrote:
> >
> > > On Sun, Nov 11, 2012 at 6:02 AM, Softaddicts
> > > <lprefonta...@softaddicts.ca>wrote:
> > >
> > > > How does that shrink his boilerplate ?
> > > >
> > > > Why such a long boilerplate ? Do you need the string library
> > > > everywhere ? Why not drop :only ?
> > > >
> > >
> > > oftentimes, I am at the REPL, and I know this particular function in
> > > clojure.set (or clojure,io, or ...) is exactly what I need
> > > I want it at my fingertips, I don't want to break my flow and
> > > `require` it.
> > >
> > > And when creating a new namespace, I don't know in advance what other
> > > namespaces I will need.
> > > That's why I always paste the same boilerplate when creating a new
> > > namespace.
> > >
> > > In Java land, all IDEs have shortcut to import classes at the time
> > > it's needed, maybe that's what I need (in Emacs in my case).
> > >
> > >
> > >
> > > >
> > > > Luc P.
> > > >
> > > >
> > > > > Convert (:use [lib :only [...]]) => (:require [lib :refer
> > > > > [...] :as ...])
> > > > >
> > > > > On Sun, Nov 11, 2012 at 12:49 PM, Denis Labaye
> > > > > <denis.lab...@gmail.com
> > > > >wrote:
> > > > >
> > > > > > Talking about `use` and `require`:
> > > > > >
> > > > > > How are you dealing with the repetition of each namespace
> > > > "configuration"?
> > > > > >
> > > > > > Each time I create a new namespace I add the following
> > > > > > boilerplate:
> > > > > >
> > > > > >
> > > > > > (ns foo.bar
> > > > > >
> > > > > >   (:use      [clojure
> > > > > >
> > > > > >              [pprint              :only [pprint pp]]
> > > > > >
> > > > > >              [repl                :only [doc find-doc apropos]]]
> > > > > >
> > > > > >             [clojure.java.javadoc :only [javadoc]]
> > > > > >
> > > > > >             [clojure.tools.trace  :only [trace deftrace
> > > > > > trace-forms
> > > > trace-ns untrace-ns trace-vars]])
> > > > > >
> > > > > >   (:require [clojure
> > > > > >
> > > > > >              [set                     :as set]
> > > > > >
> > > > > >              [string                  :as str]
> > > > > >
> > > > > >              [xml                     :as xml]]
> > > > > >
> > > > > >             [clojure.java
> > > > > >
> > > > > >              [shell                   :as sh]
> > > > > >
> > > > > >              [io                      :as io]]))
> > > > > >
> > > > > >
> > > > > > How do you avoid repeating this ? A clojure macro?, IDE
> > > > > > support?, ... ?
> > > > > >
> > > > > >
> > > > > > On Fri, Nov 9, 2012 at 7:07 PM, Softaddicts <
> > > > lprefonta...@softaddicts.ca>wrote:
> > > > > >
> > > > > >> Yep but still longer to type :) we are in the process of
> > > > > >> shrinking the code base,
> > > > > >> nit expanding it, any bytes count :))
> > > > > >>
> > > > > >>
> > > > > >> > On Fri, Nov 9, 2012 at 8:28 AM, Sean Corfield <
> > > > seancorfi...@gmail.com>
> > > > > >> wrote:
> > > > > >> > > On Thu, Nov 8, 2012 at 3:19 PM, Softaddicts <
> > > > > >> lprefonta...@softaddicts.ca> wrote:
> > > > > >> > >> Removing use would force us to redefine it somehow.
> > > > > >> > > (:use clojure.tools.trace) => (:require
> > > > > >> > > [clojure.tools.trace
> > > > :refer
> > > > > >> :all)
> > > > > >> >
> > > > > >> > *sigh* no paredit in Gmail and I haven't had my coffee yet:
> > > > > >> >
> > > > > >> > (ns ...
> > > > > >> >   (:use clojure.tools.trace) => (:require
> > > > > >> > [clojure.tools.trace
> > > > :refer
> > > > > >> :all])
> > > > > >> >   ...)
> > > > > >> >
> > > > > >> > but I'm sure y'all knew what I meant.
> > > > > >> > --
> > > > > >> > Sean A Corfield -- (904) 302-SEAN
> > > > > >> > An Architect's View -- http://corfield.org/
> > > > > >> > World Singles, LLC. -- http://worldsingles.com/
> > > > > >> >
> > > > > >> > "Perfection is the enemy of the good."
> > > > > >> > -- Gustave Flaubert, French realist novelist (1821-1880)
> > > > > >> >
> > > > > >> > --
> > > > > >> > 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
> > > > > >> >
> > > > > >> --
> > > > > >> Softaddicts<lprefonta...@softaddicts.ca> sent by ibisMail from
> > > > > >> my
> > > > ipad!
> > > > > >>
> > > > > >> --
> > > > > >> 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 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 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
> > > > --
> > > > Softaddicts<lprefonta...@softaddicts.ca> sent by ibisMail from my
> > > > ipad!
> > > >
> > > > --
> > > > 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
> > > >
> > >
> >
> >
> >
> > --
> > Luc P.
> >
> > ================
> > The rabid Muppet
> >
> > --
> > 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
> >
> --
> Softaddicts<lprefonta...@softaddicts.ca> sent by ibisMail from my ipad!
>
> --
> 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 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

Reply via email to