Skip to content

Instantly share code, notes, and snippets.

View chessai's full-sized avatar

chessai chessai

View GitHub Profile
[ This program prints Sierpinski triangle on 80-column display. ]
>
+ +
+ +
[ < + +
+ +
+ + + +
> - ] >
+ + + + + + + +
[ >
+++++++++++++[->++>>>+++++>++>+<<<<<<]>>>>>++++++>--->>>>>>>>>>+++++++++++++++[[
>>>>>>>>>]+[<<<<<<<<<]>>>>>>>>>-]+[>>>>>>>>[-]>]<<<<<<<<<[<<<<<<<<<]>>>>>>>>[-]+
<<<<<<<+++++[-[->>>>>>>>>+<<<<<<<<<]>>>>>>>>>]>>>>>>>+>>>>>>>>>>>>>>>>>>>>>>>>>>
>+<<<<<<<<<<<<<<<<<[<<<<<<<<<]>>>[-]+[>>>>>>[>>>>>>>[-]>>]<<<<<<<<<[<<<<<<<<<]>>
>>>>>[-]+<<<<<<++++[-[->>>>>>>>>+<<<<<<<<<]>>>>>>>>>]>>>>>>+<<<<<<+++++++[-[->>>
>>>>>>+<<<<<<<<<]>>>>>>>>>]>>>>>>+<<<<<<<<<<<<<<<<[<<<<<<<<<]>>>[[-]>>>>>>[>>>>>
>>[-<<<<<<+>>>>>>]<<<<<<[->>>>>>+<<+<<<+<]>>>>>>>>]<<<<<<<<<[<<<<<<<<<]>>>>>>>>>
[>>>>>>>>[-<<<<<<<+>>>>>>>]<<<<<<<[->>>>>>>+<<+<<<+<<]>>>>>>>>]<<<<<<<<<[<<<<<<<
<<]>>>>>>>[-<<<<<<<+>>>>>>>]<<<<<<<[->>>>>>>+<<+<<<<<]>>>>>>>>>+++++++++++++++[[
>>>>>>>>>]+>[-]>[-]>[-]>[-]>[-]>[-]>[-]>[-]>[-]<<<<<<<<<[<<<<<<<<<]>>>>>>>>>-]+[
#include <stdio.h>
#include <stdlib.h>
int main() {
char mem[30000],
*ptr = mem;
++ptr;
++(*ptr);
++(*ptr);
++(*ptr);
++(*ptr);
{-# LANGUAGE CPP #-}
#define InnieOuttie IO
#define class module
#define begin where
#define mayo main
-- #define () Unit
#define memo putStrLn
-- #define :: beA
-- #define = ==
# Invoking nix-shell sets up an environment where we can build ghc
# by only invoking hadrian.
{ package ? "ghc-dev", compiler ? "ghc822" }:
let
fetchNixpkgs = import ./fetchNixpkgs.nix;
nixpkgs = fetchNixpkgs {
rev = "01705125314fa0c7753f27c3dd7c4bfbda55c375";
sha256 = "1a96vb4hlhnadm445lifq02wg2vz0a2hyxrcl6d0jy2cn7427aq6";
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeInType #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE KindSignatures #-}
module Foo where
import Data.Proxy
import GHC.Types
data L a = Nil | Cons a (L a)
-- -*- coding: utf-8; mode: haskell; -*-
-- File: src/Silvi/Tutorial.hs
--
-- License:
-- Copyright 2017 Daniel Cartwright
--
-- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
--
-- 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
#!/usr/bin/env bash
set -e
nix_opts='--show-trace --option extra-binary-caches https://nixcache.reflex-frp.org'
# use succ_opts when builds succeed
succ_opts='-j -8 -Q'
# use fail_opts when builds fail (for debugging with nix)
fail_opts='-j -1 --keep-going'
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Data.Interval.Discrete
( Interval(..)
, (...)
, (+/-)