I hereby claim:
- I am skyb0rg007 on github.
- I am ssoss (https://keybase.io/ssoss) on keybase.
- I have a public key ASCAT7BWiVK3mLDaoyVI7mN9srBI3lMk-eIkkKGKSMEv6wo
To claim this, I am signing this object:
datatype 'a nested = | |
Nest of 'a * 'a list nested | |
| Epsilon | |
fun sumListWith f lst = let | |
fun go ([], acc) = acc | |
| go (x :: xs, acc) = go (xs, f x + acc) | |
in | |
go (lst, 0) |
" vim: set ft=vim: | |
" Directory setup: move everything to $APPDATA\Vim and $LOCALAPPDATA\Vim | |
set backupdir=$LOCALAPPDATA\Vim\backup | |
set directory=$LOCALAPPDATA\Vim\swap | |
set undodir=$LOCALAPPDATA\Vim\undo | |
set viewdir=$LOCALAPPDATA\Vim\view | |
set viminfofile=$LOCALAPPDATA\Vim\viminfo | |
set packpath=$APPDATA\Vim,$VIM\vimfiles,$VIMRUNTIME | |
let g:netrw_home=expand("$LOCALAPPDATA\\Vim") |
#!/usr/bin/env stack | |
{- | |
stack script | |
--resolver lts-22.14 | |
--package freer-simple | |
--package fused-effects | |
--package hspec | |
--package list-t | |
--package mtl | |
--package polysemy |
{ | |
stdenv, | |
fetchurl, | |
lib, | |
... | |
}: let | |
arch = "64"; | |
version = "110.99.6"; | |
baseurl = "http://smlnj.cs.uchicago.edu/dist/working/${version}"; | |
sources = map fetchurl [ |
I hereby claim:
To claim this, I am signing this object:
<#PSScriptInfo | |
.VERSION 1.0 | |
.GUID dadcf7db-a1ab-4360-b66b-25d5e7a1666a | |
.AUTHOR [email protected] | |
.COPYRIGHT Skye Soss 2024 |
CREATE top3 3 CELLS ALLOT top3 3 CELLS 0 FILL | |
0 VALUE file | |
12 CONSTANT max-line | |
CREATE line-buffer max-line ALLOT | |
: init-file ( -- ) S" day1.txt" R/O OPEN-FILE THROW TO file ; | |
: free-file ( -- ) file CLOSE-FILE THROW 0 TO file ; | |
: step ( -- u f ) line-buffer max-line 2 - file READ-LINE THROW ; |
#!/usr/bin/env stack | |
-- stack script --resolver lts-19.30 | |
{-# LANGUAGE GADTs, ViewPatterns, ScopedTypeVariables, InstanceSigs, MultiParamTypeClasses, DeriveFunctor, StandaloneDeriving, UnicodeSyntax, ImportQualifiedPost #-} | |
import Control.Applicative (liftA2) | |
import Control.Monad (join) | |
import Data.Proxy (Proxy (Proxy)) | |
-- |
local | |
structure Cont = SMLofNJ.Cont | |
structure IntervalTimer = SMLofNJ.IntervalTimer | |
structure S = Signals | |
in | |
(* `withTimeout t f` calls `f ()` and returns `SOME x` where `x` is the result of the function call. | |
* If `f ()` takes longer than `t` to execute, `withTimeout` instead returns `NONE` *) | |
fun withTimeout t f = | |
let | |
val result = ref NONE |
#!/usr/bin/env stack | |
-- stack script --resolver lts-18.18 | |
module Main (main) where | |
import Control.Applicative (liftA2) | |
import Control.Comonad (extract) | |
import Control.Comonad.Cofree (Cofree ((:<))) | |
import Control.Monad (forM_) | |
import Control.Monad.ST (runST) |