Understanding Specter: Clojure's missing piece

Channel:Misophistful · Length:40:30 · Published:2017-10-06 · Views:11540

Watch on YouTube

Summary

A screencast tutorial on Specter, a Clojure library for navigating and transforming nested data structures declaratively, demonstrated in a REPL.

Why HN recommends it

Pointed to as a short, clear demonstration of how Specter simplifies manipulating complex nested data.

I highly recommend watching this short video to see how it works. — HN, 2017

Functional programming

Subtitles (excerpt)

hi everyone and welcome to a screencast about understanding Spectre Spectre is a data manipulation library for closure written by Nathan Mars now I want to take a little bit of your time to explain why it's one of my favorite closure libraries why I use it all the time and even why I think it's one of the best pieces of software engineering ever produced B claims huh so let's dig in and see if I'm right so let's start by explaining what I'm going to be talking about during this screencast I'm gonna try and cover three main areas first I'm gonna try and explain why Spectre why should you be interested in this library then I'm gonna try and explain how it works based on the understandings that I have and then I'm gonna go through a few examples of what you can do with it and why it's so powerful I choose start by saying that this this screencast is aimed mainly at people who already understand closure and presumably haven't been delving too deeply into Spectre yet if your respect to expert there's a chance that you won't learn too much new however if you haven't really used back to before or you've just looked briefly into it there's a big chance that you might find something new here for you and if you're brand new to

On Hacker News

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 r… — yogthos, 2017-10
> 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/Clojure[1] mentioned Specter[2] with a link to this video[3]. One of the first things the video covers is how the l… — kgwxd, 2021-03
(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] [VIDEO] — Scarbutt, 2019-06

Related videos