Skip to content

Instantly share code, notes, and snippets.

@RockyRoad29
RockyRoad29 / README.org
Last active May 27, 2022 09:29
Emacs loaded packages exploration tools

Exploring your loaded emacs libraries (spacemacs)

lpkg-explorer

file:lpkg-explorer.el These functions are designed basically for use in a lisp interaction session, where more variants may easily be tailored for your needs .

My main purpose here is to detect potential org-mode conflicts between built-in (typically older) and user local versions.

@paolino
paolino / dataflow.hs
Last active April 18, 2021 13:32
A couple of data flow exercises from Doaitse Swiestra (USCS 2016)
{-# language ScopedTypeVariables, ViewPatterns, DeriveFunctor #-}
import Data.Semigroup
data Bin a = Bin a (Bin a) (Bin a) | L a deriving (Eq,Functor, Show)
-- set everywhere the monoidal sum of the tree values, traversing once
setSum :: forall a. Semigroup a => Bin a -> Bin a
setSum t = r where
@14427
14427 / hkt.rs
Last active August 31, 2024 00:57
Higher-kinded type trait
use std::rc::Rc;
trait HKT<U> {
type C; // Current type
type T; // Type with C swapped with U
}
macro_rules! derive_hkt {
($t:ident) => {
impl<T, U> HKT<U> for $t<T> {
@sjoerdvisscher
sjoerdvisscher / adjointFoldPlain.hs
Last active July 26, 2023 13:04
Adjoint folds, using regular Category from base (but custom Functor)
-- http://www.cs.ox.ac.uk/ralf.hinze/SSGIP10/AdjointFolds.pdf
-- http://www.cs.ox.ac.uk/ralf.hinze/publications/SCP-78-11.pdf
-- https://www.cs.ox.ac.uk/people/nicolas.wu/papers/URS.pdf
-- https://arxiv.org/pdf/2202.13633.pdf
{-# LANGUAGE
MultiParamTypeClasses
, FunctionalDependencies
, GADTs
, PolyKinds
@nrolland
nrolland / Setup.fsx
Created April 4, 2012 20:46 — forked from ovatsus/Setup.fsx
Script to setup F# Interactive session, loading everything in the current solution. works with many project with a bit of hand cleaning
#if INTERACTIVE
#r "System.Xml"
#r "System.Xml.Linq"
#endif
open System
open System.IO
open System.Xml.Linq
open System.Text.RegularExpressions