Skip to content
0:00 / 0:00

#clojure#specter#functionalprogramming

Understanding Specter: Clojure's missing piece

Misophistful

1.6K subscribers • 4 videos on Hallway

YouTube
  • Recommended by 4 people: 1 on Hacker News, 1 on Lobsters and 2 in engineering communities.
  • Linked in the descriptionnathanmarz/specter

Intermediate. Assumes working knowledge.

11K views9 years ago4 recommendations

Programming languagesSoftware designLisp and ClojureFunctional programmingData structures

This tutorial demonstrates how to use the Specter library in Clojure to query and transform deeply nested data structures declaratively.

Learn how to elegantly manipulate nested data structures with Specter. Specter: github.com/nathanmarz/specter Language: clojure.org Editor: atom.io/ proto-repl: atom.io/packages/proto-repl proto-repl setup guide: gist.github.com/jasongilman/d... Atom syntax theme: atom.io/themes/borealis-syntax

Why it's here

4 people recommend this

What people say. Recommended as a great introduction to using Specter for elegant data structure manipulation in Clojure.

u/MM-7757in r/Clojure • Recommends

"Understanding Specter: Clojure's missing piece" by Misophistful (updated link)

u/aarkerioin r/Clojure • Recommends

Understanding Specter: Clojure's missing piece

yogthoson Hacker News • Recommends

On “Why I'm Productive in Clojure (2013)”

Explicit recursion is rarely used in FP, and it's often a code smell. It's almost always better to use higher order functions instead. The advantage is that you can implement a particular transformation once, check for edge cases, and reuse it from there on. You also end up with declarative code that talks about what it's doing without distracting your with implementation details. Clojure has a rich set of functions for manipulating data such as map, filter, reduce, and so on. There are also libraries such as Specter link that allow you to declaratively transform complex data. I highly recommend watching this link to this video short video to see how it works.

Yogthoson Lobsters • Recommends

Manipulating complex data structures using Specter

u/Collaborologistin r/Clojure • Mentions

Just came across specter... mind blown! Mind blown... Check these if you haven't already: - Understanding Specter: Clojure's missing piece - Specter Powerful and Simple Data Structure Manipulation - Nathan Marz I kinda do and wanna "get it"... Now gotta go rewrite some code... (Thanks, Nathan!)

u/yogthosin r/haskell • Mentions

On “Clojure vs. The Static Typing World (haskell in particular)”

Now compare to how you do this Clojure.

Scarbutton Hacker News • Mentions

On “Why GitHub used Haskell for Semantic”

(assoc-in foo "bar" "alice" "bob" 12) Of course, in clojure you mostly use :keywords instead "strings" as keys which has a ton of benefits. There's also specter if want something more powerful at the cost of an additional lib. link link to this video

kgwxdon Hacker News • Mentions

On “Clojure from a Schemer's Perspective”

> You might just be using a completely different underlying data structure than expected, depending on which operations you've performed. I haven't had the pleasure of using Clojure in production, but I'm somewhat obsessed with the language and follow it fairly closely. Someone on r/Clojure1 mentioned Specter2 with a link to this video3. One of the first things the video covers is how the library deals with this concern. 1 link 2 link 3 link to this video

u/yogthosin r/haskell • Mentions

On “Professional Haskellers: What are your major pain points?”

I recommend taking a look at this as an example of a nice way of working with complex hierarchical data.