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
## -*- 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
# 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
#!/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
#!/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 |