A few thoughts about Specter from someone new to it but who's already found
it incredibly useful. I'm happy to be corrected on any points that I've
misunderstood.
Clojure functions follow something like the Unix "do one thing and do it
well" ideal. There are exceptions, but a lot of what's gr
I rarely program in Clojure. At work I have to deal with a lot of deeply
nested data structures. Specter helps me to navigate those nested data
pretty easily.
The navigators does looks unlispy for the newcomer. But if you bother to
learn it , you don't have to invent your own.
Above all, the co
On Mar 4, 2017 12:35 AM, "Asim Jalis" wrote:
What might be a Clojurey syntax for doing path navigation? In other words
how could get-in be extended so that it could parse nested vectors like it
parses nested maps? Thinking out aloud, an integer in the path when the
data structure at that level is
Moe: Good point. The specific use case I had was that I wanted to be able
to extract all the values that were on a path—in other words the ability to
use a wildcard in get-in. For example, this returns "X1". I would like to
use get-in to return ["X1" "X2"]. In other words use a wildcard for :b1.
(
The "language" Specter introduces "specific"ally navigates the "domain" of
Clojure data structures. Regexes also provide a DSL that navigate or
operate over the string/text domain and that's often considered a large,
generic, unstructured domain. What matters is the semantic surface area the
librar
On Mar 5, 2017 2:10 PM, "Gregg Reynolds" wrote:
see the section titled "deftype and defrecord?" at https://clojure.org/
reference/datatypes
Specter traffics in abstractions, afaik, just like clojure. it does not
depend in any way on application concepts like "bank account", so i think
it's a lit
see the section titled "deftype and defrecord?" at
https://clojure.org/reference/datatypes
Specter traffics in abstractions, afaik, just like clojure. it does not
depend in any way on application concepts like "bank account", so i think
it's a little unfair to call it x-specific for any x; that ma
Okay, let's call it a Context Specific Vocabulary (CSV) ;)
Every function is at least a mini DSL, IMO. And as promising as Spec
sounds, I still haven't trained up on it because of the size of the new
vocabulary (or DSL or whatever you want to call it) it introduces. Adding
semantics is expensive f
On Mar 5, 2017 1:04 PM, "Timothy Baldridge" wrote:
>> Specter is not a DSL.
Specter implements a set of terms (navigators) specific to the library that
are interpreted by the library (the transform function) to accomplish some
task for a specific domain (manipulating data structures). In the sa
>> Specter is not a DSL.
Specter implements a set of terms (navigators) specific to the library that
are interpreted by the library (the transform function) to accomplish some
task for a specific domain (manipulating data structures). In the same way,
`update-in` is a DSL. Both Specter and `updat
To answer a few comments/misconceptions on this thread:
- Specter is not a DSL. Things like ALL and MAP-VALS are first class
objects that implement the underlying navigator interface. Specter's core
is a high-performance method of composing implementations of that
interface. It makes zero assum
2017-03-05 0:25 GMT+01:00 Didier :
> I'm not too sure what the contribs are. Are they simply packages maintained
> by the Clojure team itself, or are they actually part of the standard
> library?
As I understand it, they aren't any more sanctioned than any
third-party library, but the goal is to p
This got me thinking, what is Clojure?
As I see it, Clojure is a combination of syntax and semantics combined with
a standard library of functions and macros. Given the Clojure syntax, and
the Clojure special forms, and Clojure core, I have myself Clojure.
Given that, we should be careful when
Gregg, agreed. But as an aside, as an external library, like core.async,
Specter is a shining example of why Clojure (and lisp) is such an awesome
platform. The fact that Nathan was able to even implement this
functionality, in some places even more performant than core idioms, imho
proves that Clo
On Mar 4, 2017 5:08 PM, "John Newman" wrote:
Gregg, agreed. But as an aside, as an external library, like core.async,
Specter is a shining example of why Clojure (and lisp) is such an awesome
platform.
+1001. to be clear, i am _not_ saying specter is anthing less than
awesome. just talking ui.
On Mar 4, 2017 3:52 PM, "Gregg Reynolds" wrote:
On Mar 3, 2017 6:27 PM, "John Newman" wrote:
I think the path navigator DSL feels slightly un-Clojurey. But other than
that, I think Specter is pure magic and Nathan is right that editing deeply
nested data structures in Clojure is a point of de
On Mar 3, 2017 6:27 PM, "John Newman" wrote:
I think the path navigator DSL feels slightly un-Clojurey. But other than
that, I think Specter is pure magic and Nathan is right that editing deeply
nested data structures in Clojure is a point of deficiency, especially for
people coming from mutable
On Sat, Mar 4, 2017 at 6:35 AM, Asim Jalis wrote:
> What might be a Clojurey syntax for doing path navigation? In other words
> how could get-in be extended so that it could parse nested vectors like it
> parses nested maps? Thinking out aloud, an integer in the path when the
> data structure at
The first time I watched Nathan talk about Specter, I had the exact same
thoughts -- "My data structures aren't that complex, I can't relate to
these examples, I don't need Specter, I'm fine with Clojure's get-in,
update-in, assoc-in."
But then, I challenged myself for one day to use Specter's sel
My thoughts on this were spurred by this tweet from Nikita Prokopov
https://twitter.com/nikitonsky/status/837049980053516310
I generally don't have the need to alter stuff deep down in data structures,
but when I do, I don't mind writing the functions to do so.
The two things that worries me a
What might be a Clojurey syntax for doing path navigation? In other words
how could get-in be extended so that it could parse nested vectors like it
parses nested maps? Thinking out aloud, an integer in the path when the
data structure at that level is a vector should treat the integer as an
index.
I've never used Specter, but my needs are modest compared to some Clojure
programmers'. (Great introductory blog post, Nathan, btw.) Intuitively,
it feels to me like Specter is too big of a monster to be in core. I am
not surprised that that's not going to be an option.
The idea of making
I think the path navigator DSL feels slightly un-Clojurey. But other than
that, I think Specter is pure magic and Nathan is right that editing deeply
nested data structures in Clojure is a point of deficiency, especially for
people coming from mutable languages/data structures. To that extent, I
th
On Wednesday, February 15, 2017 at 3:41:36 PM UTC-6, Nathan Marz wrote:
>
> Alex – care to elaborate? When I get this question it would be nice to be
> able to tell people why the core team isn't interested.
>
The default answer to all such questions is no. Clojure has a small library
and Rich
One must recognize Clojure as an art project. It follows, that the choice
of curated libraries is an aspect of the artistic expression. Look at them
-- what else could it be?
clojure.xml was unorthodox. clojure.zip is anti-gravity.
clojure.core.logic is inside-out. clojure.core.typed is au
Alex – care to elaborate? When I get this question it would be nice to be
able to tell people why the core team isn't interested.
Beau – new navigators can easily be provided in external libraries. The
core of Specter (navigator composition and inline compilation/caching) is
very stable at this
> The main thing that makes me hesitate to suggest this is getting
bottlenecked on Clojure's dev process.
Imo this is a big deal. I like the way specter has the ability to add new
generally useful navigators and paths with new versions as people
"discover" them, I don't think that's a great fit
I don't think Rich would be interested in including Specter in core. Making it
a contrib doesn't really seem like it would have many advantages to me over its
current status.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, sen
I like Specter and would love to have it readily available in any project,
so that aspect is appealing. However, there are a handful of subtle ways
that Specter doesn't feel like it was designed by the same people who wrote
core. For example, Clojure's built-in transformation functions on data
st
How about making specter into a contrib 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.
T
While I've looked at Specter several times, I have yet to use it in a
project for many of the same reasons that Rangel mentioned. Either my data
is shallow enough that clojure.core functions work just fine, or my data is
complex enough that I need cross-entity joins, and arbitrary clojure logic.
In
Nathan - Specter has been an indispensable part of any
Clojure/ClojureScript that I've started in the recent 1+ years. From my
experience with it so far (and I'm definitely not using it to its full
potential) it has had one killer feature and that is modifying a nested 3+
levels deep data struc
One of the most common questions I get about Specter is whether it will
ever become part of Clojure core. I think it's an interesting proposal and
would like to see what the community and core team thinks.
The primary reason for contributing would be that Specter makes Clojure a
stronger langua
33 matches
Mail list logo