This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//> using toolkit default | |
//> using option -no-indent | |
import sttp.client4.quick.* | |
import util.chaining.* | |
import upickle.default.* | |
import sttp.model.MediaType | |
case class Event( | |
id: String, | |
summary: String = "<no summary>", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//> using scala 3.7.0 | |
//> using dep software.amazon.smithy:smithy-model:1.57.1 | |
//> using dep com.disneystreaming.smithy4s::smithy4s-dynamic:0.18.35 | |
import software.amazon.smithy.model.Model | |
import software.amazon.smithy.model.selector.Selector | |
import software.amazon.smithy.model.shapes.ShapeId | |
import scala.jdk.CollectionConverters._ | |
import software.amazon.smithy.model.transform.ModelTransformer | |
import software.amazon.smithy.model.shapes.ServiceShape | |
import software.amazon.smithy.model.shapes.OperationShape |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
// Zed settings | |
// | |
// For information on how to configure Zed, see the Zed | |
// documentation: https://zed.dev/docs/configuring-zed | |
// | |
// To see all of Zed's default settings without changing your | |
// custom settings, run the `open default settings` command | |
// from the command palette or from `Zed` application menu. | |
{ | |
"theme": "One Dark Pro", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//> using dep org.typelevel::cats-effect:3.6.0 | |
import cats.effect.IO | |
import cats.effect.unsafe.IORuntime | |
import cats.effect.IOApp | |
enum Permission { | |
case View | |
case Edit | |
case Both(p1: Permission, p2: Permission) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://noelwelsh.com/talks/tagless-final-for-humans | |
trait Algebra: | |
type Ui[_] | |
trait Controls extends Algebra: | |
def text(prompt: String): Ui[String] | |
def choice(prompt: String, options: (String, Boolean)*): Ui[Boolean] | |
// etc... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//> using dep org.http4s::http4s-ember-server::0.23.28 | |
import cats.effect.IO | |
import cats.effect.IOApp | |
import cats.effect.std.UUIDGen | |
import cats.syntax.all.* | |
import fs2.concurrent.Topic | |
import org.http4s.HttpApp | |
import org.http4s.ember.server.EmberServerBuilder | |
import org.http4s.websocket.WebSocketFrame |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
runner.dialect = scala3 | |
runner.dialectOverride.allowSignificantIndentation = false | |
# allows `if x then y` | |
runner.dialectOverride.allowQuietSyntax = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//> using option -Ykind-projector | |
trait Demo { | |
type LA | |
type LB | |
type RA | |
type RB | |
def x(using | |
laEqLb: LA =:= LB, | |
raEqRb: RA =:= RB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//> using dep org.http4s::http4s-ember-server:0.23.27 | |
//> using dep org.http4s::http4s-dsl:0.23.27 | |
//> using dep org.http4s::http4s-circe:0.23.27 | |
//> using dep com.github.tarao::record4s-circe:0.13.0 | |
//> using option -Wunused:all | |
import cats.effect.IO | |
import cats.effect.IOApp | |
import com.comcast.ip4s.* | |
import com.github.tarao.record4s.% | |
import com.github.tarao.record4s.select |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
# You'll have to change this, also see note about caveat below | |
SDK_PATH=/Users/kubukoz/Developer/PlaydateSDK/C_API | |
rm -rf HelloWorld.pdx || true | |
rm Source/pdex.elf || true |
NewerOlder