Interjected Future
  • Home
  • Essays
  • Lab Notes
  • Deep Research
  • Today I Learned
  • Past Projects
Sign in Subscribe

Latest

TIL: Covariant vs Contravariant Types

Today I Learned

TIL: Covariant vs Contravariant Types

When working with type systems in programming languages like TypeScript, Scala, Java, or even Python (via type hints), you'll encounter the concepts of covariance and contravariance. These terms describe how the subtype relationships of generic types behave when you substitute their type parameters. Understanding them can help you

By Wil Chung 11 Apr 2025
TIL Message handler inside of useEffect

Today I Learned

TIL Message handler inside of useEffect

useEffects have a lot of footguns, especially with the dependency list. This is one of them. If I have a web worker that I need to communicate with, I need to have a message handler. The message handler needs to change the state of my frontend application. It's

By Wil Chung 06 Feb 2025
TIL Poor man's quoting in Python

Today I Learned

TIL Poor man's quoting in Python

In Lisp, you can quote an expression to delay its evaluation while passing it around as a value. In Python, this means in practice, I want a function that looks like it's executing, but reality, I'm delaying its actual execution. I can use decorators to achieve

By Wil Chung 10 Nov 2024
Interjected Future
Powered by Ghost

Nerdsniped?

And like what you see? Sign up for more.