Skip to content

Instantly share code, notes, and snippets.

View philderbeast's full-sized avatar

Phil de Joux philderbeast

View GitHub Profile
@philderbeast
philderbeast / README.md
Created May 8, 2018 10:56 — forked from dwhitney/README.md
Quick React Native with PureScript
  1. create-react-native-app purescript-app; cd purescript-app

  2. pulp init --force

  3. pulp build

  4. src/Main.js

var React = require("react");
var RN = require("react-native");

exports.text = function(props){
@philderbeast
philderbeast / InflatableWing.md
Created March 27, 2018 12:52
We Have Capture: Inflatable Wing

With the end of Mercury, attention turned to Gemini and Apollo. Both programs were growing like mad - in the case of Gemini, growing out of control. Originally budgeted at aronud $530 million, it was now expected to price out at twice that - or more. Every element of Gemini cost more than the original estimate: the basic spacecraft, the Titan 2 launch vehicle, the Atlas-Agena target vehicle, the ejection seats, the fuel cells. Money was spent on the idea of flying Gemini to touchdown on return to earth using an inflatable wing a plan that never really had a prayer of working, but it ate up a couple of years and a few million bucks. (The North American test pilot for the Rogallo wing happened to be Jack Swigert, my former roommate from the astronaut interview week.)

SOURCE: We Have Capture: Tom Stafford and the Space Race by Thomas P. Stafford with Michael Cassutt

@philderbeast
philderbeast / sudoku-loeb.hs
Created June 9, 2017 16:04
Solve Sudoku using the magical Loeb function.
import Data.List
-- This code solves Sudoku puzzles using a magical function called Loeb.
--
-- Loeb allows you to define a list of functions which resolves into a list
-- of values, allowing the list to self-reference. In the case of Sudoku, the
-- solver code will terminate only in the case where the Sudoku puzzle has
-- a unique solution.
--
-- The code starts with a 1-dimensional list (representing the 2-dimensional
@philderbeast
philderbeast / FunctionParens.fsx
Last active August 29, 2015 14:19
F# function arguments and parens style.
// A difference of F# to C# is tupled versus curried function arguments.
// I suggest this F# function application style;
// * Separate functions from their arguments with a space.
// * Only use parens with tuples or when adding type annotations to curried args.
let f x = x
let add x y = x + y
let add' (x, y) = x + y
let y = f 1 // not f(1)
@philderbeast
philderbeast / _.md
Created May 16, 2014 01:26
Simple multi-line chart2
@philderbeast
philderbeast / _.md
Created April 21, 2014 01:15
Time Lines
open System
open System.Collections.Generic
type IMonoid<'T> =
abstract member mempty : unit -> 'T
abstract member mappend : 'T * 'T -> 'T
type MonoidAssociations private() =
static let associations = new Dictionary<Type, obj>()
static member Add<'T>(monoid : IMonoid<'T>) = associations.Add(typeof<'T>, monoid)
@philderbeast
philderbeast / Capture.fs
Last active December 15, 2015 11:28 — forked from lobrien/gist:5250556
namespace VideoCaptureInFSharp
open System
open System.Drawing
open System.IO
open MonoTouch.Foundation
open MonoTouch.UIKit
open MonoTouch.AVFoundation
open MonoTouch.CoreMedia
open MonoTouch.CoreGraphics