Instantly share code, notes, and snippets.

Shao Cheng TerrorJack

View GitHub Profile
View 0.configure.txt
Using Parsec parser
Configuring random-1.1...
creating dist/build
creating dist
creating dist/build
Searching for ghc in path.
Found ghc at
/home/terrorjack/.stack/programs/x86_64-linux/ghc-8.7.20181115/bin/ghc
/home/terrorjack/.stack/programs/x86_64-linux/ghc-8.7.20181115/bin/ghc --numeric-version
/home/terrorjack/.stack/programs/x86_64-linux/ghc-8.7.20181115/bin/ghc is
View v3.txt
File monitor 'config' changed: first run
Project settings changed, reconfiguring...
creating /tmp/random/random-1.1/dist-newstyle
creating /tmp/random/random-1.1/dist-newstyle/cache
The package description file ./random.cabal has warnings: random.cabal:15:2:
Tabs used as indentation at 15:2, 16:2, 17:2
this build was affected by the following (project) config files:
File monitor 'improved-plan' changed: first run
File monitor 'elaborated-plan' changed: first run
File monitor 'compiler' changed: first run
View FList.hs
{-# LANGUAGE GADTs #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
module FList
( FList
) where
import GHC.Exts
View DeBruijn.hs
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE RankNTypes #-}
module DeBruijn
( Expr(..)
, DBI(..)
, toDBI
) where
import Control.Applicative
View !wasmllvm.md

NOTE: the content is out-of-date. All development is moved to the https://github.com/yurydelendik/wasmception

Using WebAssembly in LLVM

Compiling

# locations, e.g.
export WORKDIR=~/llvmwasm; mkdir -p $WORKDIR
export INSTALLDIR=$WORKDIR
View Freer.hs
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}
{-# OPTIONS_GHC -Wall #-}
module Freer
( Freer
, liftFreer
, foldFreer
) where
View a.cpp
// beginning a Binaryen API trace
#include <math.h>
#include <map>
#include "src/binaryen-c.h"
int main() {
std::map<size_t, BinaryenFunctionTypeRef> functionTypes;
std::map<size_t, BinaryenExpressionRef> expressions;
std::map<size_t, BinaryenFunctionRef> functions;
std::map<size_t, BinaryenImportRef> imports;
std::map<size_t, BinaryenExportRef> exports;
View a.cpp
// beginning a Binaryen API trace
#include <math.h>
#include <map>
#include "src/binaryen-c.h"
int main() {
std::map<size_t, BinaryenFunctionTypeRef> functionTypes;
std::map<size_t, BinaryenExpressionRef> expressions;
std::map<size_t, BinaryenFunctionRef> functions;
std::map<size_t, BinaryenImportRef> imports;
std::map<size_t, BinaryenExportRef> exports;
View build.mk
SRC_HC_OPTS = -O -H64m
GhcStage1HcOpts = -O
GhcStage2HcOpts = -O2
GhcLibHcOpts = -O2
BUILD_PROF_LIBS = YES
SplitObjs = NO
SplitSections = YES
BUILD_SPHINX_HTML = YES
BUILD_SPHINX_PDF = NO
HADDOCK_DOCS = YES
View nvm-node-nightlies.md

You can install Node Nightlies/RCs via nvm using NVM_NODEJS_ORG_MIRROR environment variable.

Install latest Node RC

NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/rc/ nvm i node

Install latest Node.js Nightly

NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/nightly/ nvm i node