Skip to content

Instantly share code, notes, and snippets.

Karl-Oskar Rikås funrep

Block or report user

Report or block funrep

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
@funrep
funrep / lisp.sml
Created Jun 3, 2014
Unfinished (but working) lisp interpreter in SML.
View lisp.sml
(* simple lisp interpreter *)
type sym = string
datatype exp = Sym of sym
| List of exp list
| Num of int
| Str of string
| Bool of bool
| Lam of (sym list) * ((sym * exp) list) * exp
@funrep
funrep / lenstute.md
Last active Aug 29, 2015
Mini van Laarhoven lens tutorial
View lenstute.md

Basic functional references with pairs.

data FRef a b = FRef
  { get :: a -> b
  , set :: b -> a -> a
  }

fstF :: FRef (x, y) x
fstF = FRef
@funrep
funrep / gittips.md
Created May 14, 2014
Foxborons awesome git tips
View gittips.md

GIT STUFF!!!!

if you fuck up shit

git clone blalbblalb
cd blablabla
git checkout -b bar origin/bar
git checkout master
git checkout -b foo
git cherry-pick foo~1
@funrep
funrep / fonts.conf
Last active Aug 29, 2015
Nice font config from trisquil
View fonts.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/fonts.conf file to configure system font access -->
<fontconfig>
<!--
DO NOT EDIT THIS FILE.
IT WILL BE REPLACED WHEN FONTCONFIG IS UPDATED.
LOCAL CHANGES BELONG IN 'local.conf'.
@funrep
funrep / gist:0c3459669c6280f002cd
Created May 2, 2014
Linux temperature check laptop
View gist:0c3459669c6280f002cd
sudo apt-get install xsensor
View gist:10902904
<Player>:
canvas:
Rectangle:
pos: root.center
size: 40, 40
<Screen>:
Player
View errors
*Main> main
> NICK tob
> USER tob 0 * :tob
:irc.codetalk.io NOTICE AUTH :*** Looking up your hostname...
failed to parse
:irc.codetalk.io NOTICE AUTH :*** Couldn't resolve your hostname; using your IP address instead
failed to parse
PING :D433C6EE
failed to parse
^CInterrupted.
@funrep
funrep / lispmonad.hs
Last active Aug 29, 2015
crazy and most likely stupid idea i got on the bus
View lispmonad.hs
Note to self: possible to write a Lisp-like DSL within Haskell using Writer monad?
main = runLisp $ do
def "f" $ do
args $ do
"x"
"y"
body $ do
"x" + "y"
lispPrint $ "f" $ do
You can’t perform that action at this time.