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
{-# LANGUAGE RecordWildCards #-} | |
module Joystick ( | |
JoystickState(..), | |
joystickSource, | |
selectJoystick, | |
withJoystickOr, | |
getJoystickNames, | |
) where |
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
{-# LANGUAGE DeriveDataTypeable #-} | |
module Main where | |
import Data.Data | |
import System.Console.CmdArgs | |
data FooBar = Foo { fooArg :: Int} | |
| Bar { barArg :: Int} | |
deriving (Show, Data, Typeable) |
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
clang | |
-L../gcc-arm-none-eabi/lib/gcc/arm-none-eabi/4.9.3/ | |
-L../gcc-arm-none-eabi/arm-none-eabi/lib | |
-lc | |
-Wall | |
-Wno-multichar | |
-Os | |
-mcpu=cortex-m4 | |
-mthumb | |
-m32 |
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
# clang++ (for build/src/main.cpp.o) | |
# clang++ (for build/src/Uplink.cpp.o) | |
# clang++ (for build/src/Joystick.cpp.o) | |
# clang++ (for build/src/FlightData.cpp.o) | |
# clang++ (for build/src/Assert.cpp.o) | |
# clang++ (for build/i2c_t3/i2c_t3.cpp.o) | |
# clang++ (for build/cores/teensy3/yield.cpp.o) | |
# clang (for build/cores/teensy3/usb_serial.c.o) | |
# clang (for build/cores/teensy3/usb_seremu.c.o) | |
# clang (for build/cores/teensy3/usb_rawhid.c.o) |
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
$ cabal install | |
Some add-source dependencies have been modified. They will be reinstalled... | |
Resolving dependencies... | |
In order, the following will be installed: | |
sdl2-2.0.0 (reinstall) | |
jpl-0.1.0.0 (new package) | |
Warning: Note that reinstalls are always dangerous. Continuing anyway... | |
Notice: installing into a sandbox located at | |
C:\Users\jophish\projects\a-crummiest-nth-loop\jpl\.cabal-sandbox | |
Configuring sdl2-2.0.0... |
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
$ cabal exec -- ghc --make Main.hs -fforce-recomp | |
[1 of 4] Compiling Uplink ( Uplink.hs, Uplink.o ) | |
[2 of 4] Compiling FlightData ( FlightData.hs, FlightData.o ) | |
Loading package ghc-prim ... linking ... done. | |
Loading package integer-gmp ... linking ... done. | |
Loading package base ... linking ... done. | |
[3 of 4] Compiling Joystick ( Joystick.hs, Joystick.o ) | |
[4 of 4] Compiling Main ( Main.hs, Main.o ) | |
Linking Main.exe ... |
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
* = song I've yet to buy | |
Happy | |
Happy to be Unhappy - Captain Tractor | |
* Wake up Boo - Boo Radleys | |
Here Comes the Sun - The Beatles | |
Good Day Sunshine - The Beatles | |
* Walking On Sunshine - Katrina and the Waves | |
Good Vibrations - Beach Boys | |
Wouldn't it be nice - Beach Boys |
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 | |
find . -not \( -type d -name ".?*" -prune \) -type f -not -name "update-symlinks.sh" | while read f; do ln -s "`pwd`/${f:2}" "$HOME/.${f:2}"; 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
/* lighting fragment shader (not quite phong) | |
* http://www.lighthouse3d.com/opengl/glsl/index.php/index.php?ogldir1 | |
* James Stanley 2011 | |
*/ | |
#version 120 | |
uniform sampler2D texture; | |
void main() { |
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
template <std::string literal, std::string name> | |
std::unique_ptr< LiteralTerminal< literal, name > > LiteralTerminal::Parse( std::string::const_iterator& stream_begin, std::string::const_iterator stream_end ) | |
{ | |
if( ( stream_end - stream_begin ) < literal.size() ) | |
{ | |
if( std::equal( literal.begin(), literal.end(), stream_begin ) ) | |
{ | |
stream_begin += literal.size(); | |
return std::unique_ptr< LiteralTerminal< literal, name > >( new LiteralTerminal< literal, name > ); | |
} |