Main reason for shipping the MCP server (with docs included) is that nobody RTFM (including agents). >90% could get SO MUCH MORE out of Knip, and the two main reasons for that are 1) "ignore" config is misunderstood & abused (Knip is not a regular file linter!) and 2) ignorance of production mode.
Posts by Gabriele Petronella
Ah, this resonates a lot! Opus was indeed abusing the ignore array before I told it explicitly to pay attention to it. And I think I actually don’t have production mode turned on 😅 Thanks for the answer, I’ll give this a spin!
Hi, genuine question as I’m starting to use Claude code in a project with knip. Did you see any significant improvement in using the MCP sever wrt letting the agent use the CLI? Feels like a recurring theme in this space (MCP vs CLI) and I wonder if you have first hand experience with this
Watching the video I think this is as typesafe as useContext. It won’t statically enforce that it is set, it will just enforce what you can set/get from it.
Your example is the same as not setting a Provider, from what I can understand
I first learned about it in react aria examples, where IIRC it’s used to display the value of the slider knob as it changes
I’ve done the first few lessons and I’m finally building an intuition for when to use transitions vs keyframe animations.
When I first saw this course announced I thought “aw, I don’t need animations almost at all for my job, it’s gonna be the first course from Josh I won’t buy”
But who am I kidding, the early access was announced and here I am tweaking Bézier curves and enjoying the usual top notch content 🥳
If you make that “lazy” you can:
const x = () => f()
const y = () => f()
is the same program as
const x = () => f()
const y = x
It’s required in the sense that eager computations do not follow this property, eg. if f returns a Promise
const x = f()
const y = f()
is not safely replaceable by
const x = f()
const y = x
since Promises are eager and their result is cached
In PL theory it’s also called referential transparency, and it’s a really cool property to have!
Right, so back to the original example,
the cardinality of Unit -> X is the same as X.
The cardinality of X -> Unit is 1.
One hand wavy intuition is that types have cardinalities: Unit has a cardinality of 1, so going in that direction you’re “shrinking” X and losing information (you’re mapping infinite X to 1).
It’s a bit like hashing (going from a big set to a smaller set), if that makes any sense
The fascinating thing is that in languages like Scala this is actually how it works, not just in theory.
def f = 42 // a function without parameters
type checks the same as
val f = 42 // a constant value
(*caveats apply because the JVM, but this is conceptually sound)
Basically:
() => x is the same as x
but
(x) => {} is not the same as x
Unit -> X means you create an X from nothing. The only possible way is having an X already. In js terms: a function returning a constant is isomorphic to that constant
X -> Unit consumes an X, so it’s not the same as having an X.
I’ve straight up started seeing nudity/soft porn (not marked as such) in my Discover timeline
Very different, but yeah, you basically play normal chess for 2 mins and then it becomes flag fiesta
Finally, Scala 3 is quite advanced in this regard, and there’s is active research to build an effect system into the language using “capabilities”, which again is another angle to “proofs” (e.g. prove this function does not throw).
Here’s a cool paper (a bit hard to digest, but you might like it)
They’re similar in the sense that you need to “prove” you have a db instance before you can use, or “prove” you know how to add two things, etc. Often you can materialize those proofs by importing a library, similarly to the Mathlib examples in your post
Not sure how much you know about it already, but you may like the concept of “typeclasses” which are widely used in those languages and sort of resemble proofs in Lean.
Pleasant read, thanks for the intro!
Many concepts you talk about are alien in TypeScript, but quite familiar in functional languages like Haskell and Scala (Lean syntax looks a bit like Haskell and I doubt it’s coincidental).
Bullet is the worse, I play 3-0 and that’s barely considerable chess at my level
Uninteresting is one thing, but I can definitely when it goes off tracks completely. Usually it’s like 20-30 relevant posts and then it shows popular network posts (aka crap).
Now it’s just crap , so it’s broken like it was a while back when they found and fixed a bug after @danabra.mov reported it
JFC Discover is completely broken again 🙃 We’re back to American politics, random artists’ drawings and AI stuff.
@support.bsky.team how can this break every few weeks? 🥲
Today I’ve opened X after months of inactivity, and the content is very noise but far more relevant :/
AI generated PRs like this deserve random AI generated reviews. Kinda like Cloudflare AI labyrinth, but for PRs. Let the bots fight each other!
One of the most powerful tools in my toolbox is SVG. When combined with CSS and JavaScript, we can do some truly remarkable things. ✨
📝 I’ve just published a brand-new blog post that covers the most critical fundamentals. It’s chock full of interactive demos. 😄
Check it out:
RR + unstable RSC support has shipped. Please give it a go and let me know about any pain points.
remix.run/blog/react-r...
Congrats! I wonder how many are still on the react-query package also