2015-09-23 10:32 GMT+01:00 Phillip Lord :
> Specifically wrt to CIDER, the easier solution is the cache the metadata
> map each time it is used. I suspect that CIDER would need this for
> performance -- I mean indentation requiring ongoing evaluation in
> Clojure is
Artur Malabarba writes:
>>
> Yes, that's what the current (but unmerged) implementation does. :)
>
>> If this cache were persisted between Emacs sessions then the problem
>> largely goes away.
>>
> Yes, that's very plausible to do.
I am happy to do the implementation
Great! ☺ Bring it up on the cider gitter room.
On 23 Sep 2015 3:55 pm, "Phillip Lord" wrote:
> Artur Malabarba writes:
> >>
> > Yes, that's what the current (but unmerged) implementation does. :)
> >
> >> If this cache were persisted between
Artur Malabarba writes:
> You're right about indentation depending on the code being evaluated, but
> that's still better than nothing. ☺
>
> People who do a significant amount of coding without a live session can
> still manually configure indentation like they
On Tuesday, September 22, 2015 at 6:31:34 AM UTC-4, Phillip Lord wrote:
>
> ... The interesting question then is what
> percentage of the time do Clojure developers work *without* a repl
> active.
>
Uhhh, zero? :)
--
You received this message because you are subscribed to the Google
Groups
Sometimes more than 0% when I'm doing something small in clojurescript,
can't be bothered with the setup, and browser refresh is good enough :-).
On Tue, Sep 22, 2015 at 4:02 PM Fluid Dynamics wrote:
> On Tuesday, September 22, 2015 at 6:31:34 AM UTC-4, Phillip Lord wrote:
>>
You're right about indentation depending on the code being evaluated, but
that's still better than nothing. ☺
People who do a significant amount of coding without a live session can
still manually configure indentation like they currently do, and they're no
worse off.
The editor can even parse
Do you know about lein figwheel?
On 22 Sep 2015 21:05, "Gary Trakhman" wrote:
> Sometimes more than 0% when I'm doing something small in clojurescript,
> can't be bothered with the setup, and browser refresh is good enough :-).
> On Tue, Sep 22, 2015 at 4:02 PM Fluid
Fluid Dynamics writes:
> On Tuesday, September 22, 2015 at 6:31:34 AM UTC-4, Phillip Lord wrote:
>>
>> ... The interesting question then is what
>> percentage of the time do Clojure developers work *without* a repl
>> active.
>>
>
> Uhhh, zero? :)
Some I am sure. I do,
Artur Malabarba writes:
> Over at CIDER we're adding a feature where the author of a macro (or
> function) can specify how that macro should be indented by adding an :indent
> metadata to its definition. This way the editor (and other tools, like
> cljfmt) will
Nice. It's good to see that it's so similar.
Apparently they use a separate spec for grouping args as well.
2015-09-17 8:28 GMT+01:00 Jozef Wagner :
> Dunaj uses metadata to guide IDEs and pretty printer regarding
> indentations, arg grouping, ...
>
>
Hi Chas,
This is a questionable proposal. It:
>
> * introduces completely orthogonal, transient concerns (presentation) into
> code, ideally a canonical, long-lived source-of-truth
>
Yes, I'm ok with that. No one is better equipped to define a macro's
indentation than it's author, and the
Dunaj uses metadata to guide IDEs and pretty printer regarding
indentations, arg grouping, ...
http://www.dunaj.org/metadata.html#_indentation
http://www.dunaj.org/day10.html#_ide_support
Jozef
On Sunday, September 13, 2015 at 12:06:50 PM UTC+2, Artur Malabarba wrote:
>
> Hi everyone,
>
>
>
2015-09-15 20:08 GMT+01:00 Josh Tilles :
> I suspect that “Matching Socks” meant that there should be a standard
> namespace, similar to how the recent Socket Server REPL design
>
Hi all; here to satisfy the quarterly quota to maintain my status as
"that guy".
This is a questionable proposal. It:
* introduces completely orthogonal, transient concerns (presentation)
into code, ideally a canonical, long-lived source-of-truth
* sets up a bikeshed at the top of every def*
Hi Colin, it's great to get your thoughts on this.
2015-09-15 22:52 GMT+01:00 Colin Fleming :
> I think it's important that the declaration of the formatting be separated
> from the declaration of the macro itself. This allows forms which the
> editor developer
Unfortunately as tools developers we can't force our indentation
preferences on our users, although I'd be fine with it if you convinced
everyone to just use two spaces for everything, even though it's not my
preferred formatting. Cursive has supported this for ages (copied from
Emacs) but I don't
I'm kind of puzzled by the last couple of responses. Obviously very few
forms (probably only macros) would have indentation specifications and
editors can certainly disregard them, so I don't see the code being
littered with indentation specs any time soon or some indentation being
forced on
This is an interesting proposal, and I like it in general. Everything in
Cursive is based on extensions identified by the head form, like this:
(style/register-formatting :clojure.core/def :only-indent)
(style/register-formatting :clojure.core/defn- :only-indent)
(style/register-formatting
On Sunday, September 13, 2015 at 8:25:42 AM UTC-4, Artur Malabarba wrote:
>
>
> On 13 Sep 2015 12:33 pm, "Matching Socks" > wrote:
> >
> > Unless clojure.core itself will carry these annotations, could the
> keyword be namespaced?
>
> Or do you mean it should be ::indent?
Hi everyone,
Over at CIDER we're adding a feature where the author of a macro (or
function) can specify how that macro should be indented by adding an :indent
metadata to its definition. This way the editor (and other tools, like
cljfmt) will know what's the proper way of indenting any
My knee-jerk reaction is:
- +10
- leaving it up to the user is absolutely the right thing to do
- the name ‘indent’ and what it is actually capturing are at different levels
of abstraction. Possibly ‘structure’ might be a better name as that is what it
is describing?
But don’t listen to a
It's probably obvious, but let me say it just in case it isn't - I'm super
supportive of Artur's idea. I've been thinking about something similar for
a while and I believe deciding on something that's going to be used by many
Clojure tools (CIDER, Cursive, fireplace, ccw, cljfmt, etc) will be
2015-09-13 11:15 GMT+01:00 Colin Yates :
> - the name ‘indent’ and what it is actually capturing are at different
> levels of abstraction. Possibly ‘structure’ might be a better name as that
> is what it is describing?
Good point, we should consider this. Though :structure
On Sunday, September 13, 2015 at 12:10:00 PM UTC-4, Artur Malabarba wrote:
>
> > This scheme won't play nicely with forms with variable numbers of
> special
> > arguments.
>
> True, but I've never seen anyone indent specially these optional
> arguments. For instance, every defn I see
Unless clojure.core itself will carry these annotations, could the keyword
be namespaced?
--
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
On 13 Sep 2015 1:25 pm, "Artur Malabarba"
> Or do you mean it should be ::indent?
Typo. Ignore the "Or".
--
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
This scheme won't play nicely with forms with *variable numbers of special
arguments*. Of which one is one of the most common macros to use:
(defn foo
[x]
(+ x 3))
(defn bar
"Adds four to x."
[x]
(+ x 4))
--
You received this message because you are subscribed to the
On 13 Sep 2015 12:33 pm, "Matching Socks" wrote:
>
> Unless clojure.core itself will carry these annotations, could the
keyword be namespaced?
Or do you mean it should be ::indent? (i.e., carry the namespace of the var
that they're applied on)
In this case, I think it would
> This scheme won't play nicely with forms with variable numbers of special
> arguments.
True, but I've never seen anyone indent specially these optional
arguments. For instance, every defn I see (including clojure.core), is
indented like this:
(defn foo
[x]
(+ x 3))
(defn bar
"Adds four
I also love this idea - the more info we give to tools to provide a uniform
formatting, the less I have to worry about configuring my local editor to
match the project styles.
On Sun, Sep 13, 2015 at 3:15 AM, Colin Yates wrote:
> My knee-jerk reaction is:
> - +10
> -
31 matches
Mail list logo