Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.
| #!/usr/bin/env bash | |
| # cc - Claude Code wrapper with session naming | |
| # Usage: | |
| # cc Start a new Claude Code session | |
| # cc n <name> Start a new session with a name | |
| # cc ls List sessions (current project) | |
| # cc ls -a List sessions across all projects | |
| # cc r <name|index> Resume a session by name or index | |
| # cc rn <index> <name> Rename a session | |
| # cc rm <name|index> Delete a session |
| import scala.deriving.Mirror.ProductOf | |
| object Decoder { | |
| type Row = List[String] | |
| extension (row: Row) | |
| def as[T](using p: ProductOf[T], d: RowDecoder[p.MirroredElemTypes]): T = | |
| p.fromProduct(d.decode(row)) | |
| trait RowDecoder[A]: |
| //> using scala "3.3.0" | |
| import scala.util.boundary, boundary.break | |
| object Loops: | |
| type ExitToken = Unit { type Exit } | |
| type ContinueToken = Unit { type Continue } | |
| type Exit = boundary.Label[ExitToken] |
If you're generating your website with Jekyll or another static website generator, don't forget to also expose a web feed for us old timer using RSS readers. The format we'll be preferring here is Atom.
Some reasons to expose a web feed:
If you're looking for a recommendation on online RSS readers, I personally like Newsblur.
| import cats._ | |
| import cats.implicits._ | |
| import doobie._ | |
| import doobie.implicits._ | |
| def setIntOpt(n: Int, v: Option[Int]): PreparedStatementIO[Unit] = | |
| v match { | |
| case None => FPS.setNull(n, java.sql.Types.INTEGER) | |
| case Some(s) => FPS.setInt(n, s) | |
| } |
I was talking to a coworker recently about general techniques that almost always form the core of any effort to write very fast, down-to-the-metal hot path code on the JVM, and they pointed out that there really isn't a particularly good place to go for this information. It occurred to me that, really, I had more or less picked up all of it by word of mouth and experience, and there just aren't any good reference sources on the topic. So… here's my word of mouth.
This is by no means a comprehensive gist. It's also important to understand that the techniques that I outline in here are not 100% absolute either. Performance on the JVM is an incredibly complicated subject, and while there are rules that almost always hold true, the "almost" remains very salient. Also, for many or even most applications, there will be other techniques that I'm not mentioning which will have a greater impact. JMH, Java Flight Recorder, and a good profiler are your very best friend! Mea