Skip to content

Instantly share code, notes, and snippets.

View nightscape's full-sized avatar

Martin Mauch nightscape

View GitHub Profile
@johnhungerford
johnhungerford / getEither.scala
Last active March 27, 2024 12:08
Kotlin/TypeScript -like syntax for accessing nested optional types
//> using scala 3.3
import scala.util.{Failure, NotGiven, Success, Try, boundary}
import boundary.{Label, break}
import scala.annotation.targetName
/**
* Proof of concept implementation of a syntax similar to Kotlin and
* typescript. Within the context provided by [[getEither]], you can call
* `?` on any optional/failable type (currently supports [[Option]],
@veekaybee
veekaybee / normcore-llm.md
Last active May 4, 2024 21:03
Normcore LLM Reads

Anti-hype LLM reading list

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.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

Thank you for your work on Bleep! Developing a first-class Scala build experience that goes beyond Sbt is a daunting task, but one I believe is very much necessary for the health of industrial Scala.

Some preliminary thoughts:

Thank you for having a look and sharing your thoughts around this, greatly appreciated!

  1. I love that you went build-as-data. Tooling matters, and the build tool is the center of the entire tooling pipeline. Other tools need the ability to both read and write build data, and this can only be done economically with build-as-data.

Bleep is an experiment of thow far we can take build-as-data. So far I see no limits 🚀

@jimsrc
jimsrc / gpt4_text_compression.md
Last active February 21, 2024 22:16
Minimizing the number of tokens usage to interact with GPT-4.

Overview

I just read this trick for text compression, in order to save tokens in subbsequent interactions during a long conversation, or in a subsequent long text to summarize.

SHORT VERSION:

It's useful to give a mapping between common words (or phrases) in a given long text that one intends to pass later. Then pass that long text to gpt-4 but encoded with such mapping. The idea is that the encoded version contains less tokens than the original text. There are several algorithms to identify frequent words or phrases inside a given text, such as NER, TF-IDF, part-of-speech (POS) tagging, etc.

@anthonyjclark
anthonyjclark / helixish.js
Last active November 3, 2023 07:04
Custom bindings for DCsunset/vscode-modal-editor
// List of extensions
// - https://github.com/alefragnani/vscode-bookmarks
// - https://github.com/dkundel/vscode-new-file
// - https://github.com/haberdashPI/vscode-select-by-indent
// - https://github.com/kaiwood/vscode-center-editor-window
// - https://github.com/qcz/vscode-text-power-tools
// - https://github.com/stkb/Rewrap/
// - https://github.com/viablelab/vscode-capitalize
package jp.rdlabo.capacitor.plugin.screenshotevent;
import com.getcapacitor.JSObject;
import com.getcapacitor.NativePlugin;
import com.getcapacitor.Plugin;
import com.getcapacitor.PluginCall;
import com.getcapacitor.PluginMethod;
import com.getcapacitor.util.HostMask;
import android.os.FileObserver;
@hilios
hilios / FutureConcurrentEffect.scala
Last active April 2, 2019 14:44
Effect[Future]
import scala.concurrent.{Await, ExecutionContext, Future, Promise}
import cats.implicits._
import scala.concurrent.duration.Duration
import scala.util.{Failure, Success}
final case class FutureConcurrentEffect()(implicit ec: ExecutionContext) extends FutureEffect with ConcurrentEffect[Future] {
def start[A](fa: Future[A]): Future[Fiber[Future, A]] = Future.successful {
FutureFiber(fa)
}
@StephenSorriaux
StephenSorriaux / install-kubernetes-archlinux.md
Created October 25, 2018 18:47
Install Kubernetes on bare-metal ArchLinux host

Installing Kubernetes on ArchLinux

Packages

pacman -S curl docker ebtables ethtool wget unzip

Also cfssl is needed but available on AUR, using pacaur

pacaur -S cfssl

Kakmacs

Introduction

Setup

Dependencies

These aren’t all dependencies, but only the ones which isn’t loaded by my usual init-file.