Skip to content

Instantly share code, notes, and snippets.

Carter Tazio Schonwald cartazio

Block or report user

Report or block cartazio

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View $HOME .nix-profile etc profile.d
#! /usr/local/bin/fish
if test -n "$HOME" ;
set -xg NIX_LINK "$HOME/.nix-profile"
# Set the default profile.
if not test -L "$NIX_LINK" ;
echo "creating $NIX_LINK" >&2
set -l _NIX_DEF_LINK /nix/var/nix/profiles/default
/nix/store/cdybb3hbbxf6k84c165075y7vkv24vm2-coreutils-8.23/bin/ln -s "$_NIX_DEF_LINK" "$NIX_LINK"
View examples-fromListN.hs
$ rg -e fromListN -t haskell ./
139: let termCounts = V.fromListN (M.size nodeItems)
174: let termCounts = V.fromListN (M.size nodeItems)
171: let termCounts = V.fromListN (M.size nodeItems)
View babyCalculusEqations.hs
d/dx (x ^ a) == d/dx (a -> x )
we never consider a ^ x === x -> a ()
log_x(\nu Y -> T) == \mu Z -> log_X T , where Z == log_X Y
(translation: every time we see log_X Y , in T, replace taht with Z )
View Sadd.hs
module Main where
import Data.Word
import Data.Int
import Foreign.Ptr
import Foreign.C.Types
main = c_MD5Final `seq` print "yay"

directions to do a release quality build of GHC == 8.0.* with the Make based build system with all the docs

context: this is a draft for planned edits / cleanups to the current mac build directions

getting setup

  1. have apple command line tools installed, as well as mactex, and your favorite OS X package manager (which for the rest of these directions we assume is brew)

  2. since we assume we're using brew, install it!

cartazio / StructExample.hs
Created Jun 6, 2019
hacky unfinished scribblings about how to do fancy struct instances
View StructExample.hs
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE RoleAnnotations #-}
{-# LANGUAGE ExplicitForAll#-}
module Main where
import Data.Struct
--import Data.Struct.TH
--import qualified Data.Coerce as Crc
import Data.Coerce (coerce)
cartazio /
Last active May 28, 2019
xcode 5 + OS X 10.9 mavericks GHC work around nuttiness


just use GHC for OSX

the rest of these directions are preserved for historical purposes

TLDR version, if you have homebrew

xcode-select --install ; brew tap homebrew/versions ;   brew tap homebrew/dupes \
View chordCorrect.als
/* ========================================================================
Pamela Zave, August 2016.
Copyright AT&T Labs, Inc., 2016, 2018.
======================================================================== */
open util/ordering[Time] as trace
open util/ordering[Node] as ring
cartazio / packagesize.txt
Last active Feb 19, 2019
rounded up to the nearest megabyte, generated with du -hm -d1 ./ | sort -rn
View packagesize.txt
143 .//sugarhaskell-0.1
122 .//morfette-0.4.7
53 .//http2-1.6.4
40 .//cjk-
39 .//qt-
37 .//uhc-light-
37 .//cld2-
33 .//texmath-0.11.2
33 .//happstack-yui-7373.5.3
32 .//scholdoc-texmath-
cartazio / fixYoMath.r
Last active Feb 11, 2019
NAN NAN you cant get the undefined float value man
View fixYoMath.r
install("inline")# not needed after the first time
nanBoom <- cfunction(c(dummy="ANY"),body="
fenv_t fenv;
unsigned int new_excepts = FE_DIVBYZERO | FE_INVALID ;
fenv.__mxcsr &= ~(new_excepts << 7);
return dummy;
",includes="#include <fenv.h>",language="C")
You can’t perform that action at this time.