Skip to content

Instantly share code, notes, and snippets.

View windymelt's full-sized avatar
😄
Working from Home

Windymelt windymelt

😄
Working from Home
View GitHub Profile
package dev.capslock.gist.scalacli
object Greeting:
def hello(name: String): String = s"Hello, $name!"
import scala.math.BigInt
/** Common math utilities */
object MathUtils:
@annotation.tailrec
def gcd(a: BigInt, b: BigInt): BigInt =
if b == 0 then a.abs else gcd(b, a % b)
//////////////////////////////////////////////////////////////
// 1. Rational labels : p / q ------------------------------------------------
@windymelt
windymelt / 1.md
Last active May 14, 2025 16:29
Feedback for MCP server in Metals v1.5.3

Metals MCP Server Tools - Debug Report (Debugged with AI Agent)

1. Introduction

This report summarizes the results of an investigation into the behavior of tools provided by the Metals MCP server. The investigation was based on the information about MCP support found in the Metals release notes.

Test Environment:

  • JVM: OpenJDK 24
  • Metals Version: 1.5.3
@windymelt
windymelt / requiem.scala.sc
Created September 14, 2024 00:29
粛聖!! ロリ神レクイエム☆
// DSL
trait 監獄[Repr]:
def 入獄(罪人たち: Seq[(Int, 罪人[String])]): Unit
def 点呼(): Repr
trait 罪人[Repr]:
def 触る(): Repr
def 逮捕()(using 監獄[Repr]): Repr
def ごめんなさい(): Repr
import cats.effect.kernel.Resource
import cats.effect.IO
import cats.data.EitherT
trait Client {
def get(uri: String): IO[String]
}
val client: Resource[IO, Client] = Resource.pure(new {
def get(uri: String): IO[String] = IO.pure("result")
})
@windymelt
windymelt / vector.scala.sc
Created April 2, 2024 13:51
Vector APIを使った
//> using scala 3.4.0
//> using dep "com.outr::scribe::3.13.2"
// run via:
// scala-cli -J --add-modules -J jdk.incubator.vector -J -Xmx16G vector.scala.sc
import jdk.incubator.vector.*
import scribe._
def mult2a(arr: Array[Double]): Array[Double] = arr.map(_ * 1.618)
//> using scala 3.3.0
import java.awt.Desktop
import java.net.URI
if (Desktop.isDesktopSupported) {
Desktop.getDesktop.browse(new URI("https://scala-cli.virtuslab.org/"))
}
//> using scala 3.3.0
//> using dep org.http4s::http4s-ember-server:0.23.23
//> using dep org.http4s::http4s-dsl:0.23.23
import cats.effect._
import com.comcast.ip4s._
import org.http4s.HttpRoutes
import org.http4s._
import org.http4s.dsl.io._
import org.http4s.ember.server._
//> using scala 3.3.0
//> using dep org.http4s::http4s-ember-server:0.23.23
//> using dep org.http4s::http4s-dsl:0.23.23
//> using dep org.http4s::http4s-circe:0.23.23
//> using dep "io.circe::circe-generic:0.14.5"
//> using dep "io.circe::circe-literal:0.14.5"
import cats.effect._
import com.comcast.ip4s._
import org.http4s.HttpRoutes
//> using scala 3.3.0
//> using dep org.http4s::http4s-ember-server:0.23.23
//> using dep org.http4s::http4s-dsl:0.23.23
import cats.effect._
import com.comcast.ip4s._
import org.http4s.HttpRoutes
import org.http4s._
import org.http4s.dsl.io._
import org.http4s.ember.server._