Skip to content

Instantly share code, notes, and snippets.

-- WirePlumber script to handle inputs based on processing program state. This allows me to use
-- my virtual microphone in all programs and have it still work with or without REAPER open.
-- There is almost definitely a much more sane way of doing this, but I'm neither an audio
-- expert nor a Lua expert.
--
-- The three nodes we care about are Scarlett (hardware microphone), REAPER (processor), and Voice (virtual microphone)
--
-- When REAPER is open:
-- Scarlett->REAPER->Voice
--

[fit] Algebra to

[fit] (Co)monads


$$Cᴮᴬ = (Cᴮ)ᴬ$$


$$Cᴮᴬ = (Cᴮ)ᴬ$$

$$Pair<A,B> → C ≅ A → B → C$$

@valconius
valconius / BaldursGate3EarlyAccessOnNixOS.md
Last active November 19, 2023 20:46
Baldurs Gate 3 Early Access on NixOS

On all OSes, you need to use the beta or "next" version of Proton. In your games library, search for "Proton", right-click on the "5.0" entry, and opt-in to the beta in the "next" branch. If you do not do this, then nothing will work.

On NixOS, install amdvlk by adding the following to your configuration.nix. For more information, refer to the relevant nixos/nixpks pull request. You can test this with vulkaninfo or vkcube, both of which should just work. If you do vulkaninfo | grep GPU, then on radv you see (AMD RADV ...) but on amdvkl you see (Radeon ...).

hardware.opengl.extraPackages = [ pkgs.amdvlk ];
environment.variables.VK_ICD_FILENAMES = "/run/opengl-driver/share/vulkan/icd.d/amd_icd64.json";

Some believe the launcher works with protontricks 1086940 dotnet48, but that did not work for me. Therefore, I needed to *[refer to this ValveSoftware/Proton issue](ValveSoftware/Proton#4243

Monads and delimited control are very closely related, so it isn’t too hard to understand them in terms of one another. From a monadic point of view, the big idea is that if you have the computation m >>= f, then f is m’s continuation. It’s the function that is called with m’s result to continue execution after m returns.

If you have a long chain of binds, the continuation is just the composition of all of them. So, for example, if you have

m >>= f >>= g >>= h

then the continuation of m is f >=> g >=> h. Likewise, the continuation of m >>= f is g >=> h.

{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
module Data.Some
( Some (..)
, Some1 (..)
, Any

A Self-Taught Course in Automated Reasoning using Haskell

Variables, Terms, and Syntactic Unification

Resources

  • [Introduction to Unification Theory Lecture 1][itut-1]
  • Sections 8.1 and 8.2 of [The Handbook of Automated Reasoning][hoar]

Exercises

@chrpinedo
chrpinedo / insert-signature-in-pdf.md
Created April 4, 2016 10:27
How to insert your signature in a PDF file by using PDFtk

How to insert your signature in a PDF file by using PDFtk

Your signature in all the sheets

  1. convert the signature image to PDF file
convert firma.png firma.pdf
@denpatin
denpatin / springer.sh
Last active January 19, 2016 03:58
Script for downloading free books from Springer
#!/bin/bash
#
# Usage:
# $ springer.sh
# will save all books
#
# $ springer.sh word
# will save all books whose titles or authors match "word"
# Link with books and links
@chrisdone
chrisdone / typing.md
Last active May 9, 2024 15:27
Typing Haskell in Haskell

Typing Haskell in Haskell

MARK P. JONES

Pacific Software Research Center

Department of Computer Science and Engineering

Oregon Graduate Institute of Science and Technology

@cazador481
cazador481 / .ctags
Created November 27, 2013 03:23
.ctags for system verilog
--langdef=systemverilog
--langmap=systemverilog:.sv.svh.svi.v
--regex-systemverilog=/^\s*(\b(static|local|virtual|protected)\b)*\s*\bclass\b\s*(\b\w+\b)/\3/c,class/
--regex-systemverilog=/^\s*(\b(static|local|virtual|protected)\b)*\s*\btask\b\s*(\b(static|automatic)\b)?\s*(\w+::)?\s*(\b\w+\b)/\6/t,task/
--regex-systemverilog=/^\s*(\b(static|local|virtual|protected)\b)*\s*\bfunction\b\s*(\b(static|automatic)\b)?\s*\b\w+\b(\s*\[.+\])*\s*(\w+::)?\s*(\b\w+\b)/\7/f,function/
--regex-systemverilog=/^\s*\bmodule\b\s*(\b\w+\b)/\1/m,module/
--regex-systemverilog=/^\s*\bprogram\b\s*(\b\w+\b)/\1/p,program/
--regex-systemverilog=/^\s*\binterface\b\s*(\b\w+\b)/\1/i,interface/
--regex-systemverilog=/^\s*\btypedef\b\s+.*\s+(\b\w+\b)\s*;/\1/e,typedef/