This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# warning may need updating | |
# You might want to modify the first line to specify your own install location. | |
# In theory the rest should not need tweaking... | |
export GCC_PREFIX="$HOME/gcc4.7" | |
# Hopefully, you can tweak these as they get out of date, but the download URL's | |
# may not be stable to text substitution. | |
GMP_DOWNLOAD_VERSION=gmp-5.0.5 | |
MPFR_DOWNLOAD_VERSION=mpfr-3.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <thread> | |
#include <iostream> | |
#include <pthread.h> | |
using namespace std; | |
void foo() | |
{ | |
string s = "thread1"; | |
char name[16]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DYLD_LIBRARY_PATH=/Users/admin1/libgcc47/downloads/boost_1_53_0/stage/lib/:/Users/admin1/libgcc47/downloads/hpx/install/lib/hpx/ ./bin/fibonacci --n-value 20 --hpx:threads 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# source: http://www.haskell.org/pipermail/haskell-cafe/2011-March/090170.html | |
sudo rm -rf /Library/Frameworks/GHC.framework | |
sudo rm -rf /Library/Frameworks/HaskellPlatform.framework | |
sudo rm -rf /Library/Haskell | |
rm -rf .cabal | |
rm -rf .ghc | |
rm -rf ~/Library/Haskell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#make R with GCC | |
./configure CC="gcc-mp-4.7 -arch x86_64" CXX="gcc-mp-4.7 -arch x86_64" F77="gfortran-mp-4.7 -arch x86_64" FC="gfortran-mp-4.7 -arch x86_64" OBJC="gcc-mp-4.7 -arch x86_64" --x-includes=/usr/X11/include/ --x-libraries=/usr/X11/lib/ --with-blas='-framework Accelerate' --with-lapack --without-aqua CPPFLAGS="-D__ACCELERATE__" --prefix=/Users/admin1/lib/R --enable-BLAS-shlib | |
#make R with Clang | |
./configure CC="clang -arch x86_64" CXX="clang -arch x86_64" F77="gfortran -arch x86_64" FC="gfortran -arch x86_64" OBJC="clang -arch x86_64" --x-includes=/usr/X11/include/ --x-libraries=/usr/X11/lib/ --with-blas='-framework Accelerate' --with-lapack --without-aqua CPPFLAGS="-D__ACCELERATE__" --prefix=/Users/admin1/libclang34 --enable-BLAS-shlib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# unregister broken GHC packages. Run this a few times to resolve | |
# dependency rot in installed packages. ghc-pkg-clean -f | |
# cabal/dev/packages*.conf also works. | |
function ghc-pkg-clean() { | |
for p in `ghc-pkg check $* 2>&1 | grep problems | awk '{print $6}' | sed -e 's/:$//'` | |
do | |
echo unregistering $p; ghc-pkg $* unregister $p | |
done | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## -*- mode: make; tab-width: 8; -*- | |
## | |
## Simple Makefile | |
## | |
## From RInside examples | |
## TODO: | |
## proper configure for non-Debian file locations, [ Done ] | |
## allow RHOME to be set for non-default R etc | |
## comment this out if you need a different version of R, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8; -*- | |
// | |
// Simple example showing how expose a C++ function | |
// | |
// Copyright (C) 2010 Dirk Eddelbuettel and Romain Francois | |
#include <RInside.h> // for the embedded R via RInside | |
// a c++ function we wish to expose to R | |
const char* hello( std::string who ){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:set prompt "λ: " | |
:set -fno-warn-unused-imports | |
:def hlint const . return $ ":! hlint \"src\"" | |
:def hoogle \s -> return $ ":! hoogle --count=15 \"" ++ s ++ "\"" | |
:def pl \s -> return $ ":! pointfree \"" ++ s ++ "\"" |