Skip to content

Instantly share code, notes, and snippets.

View lepinay's full-sized avatar

foo bar code lepinay

View GitHub Profile
// Author @patriciogv - 2015
// http://patriciogonzalezvivo.com
#ifdef GL_ES
precision mediump float;
#endif
uniform vec2 u_resolution;
uniform vec2 u_mouse;
uniform float u_time;
#r @"..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll"
#r @"..\packages\FsPickler.0.9.11\lib\net45\FsPickler.dll"
#r @"..\packages\FSPowerPack.Core.Community.3.0.0.0\Lib\Net40\FSharp.PowerPack.dll"
#r @"..\packages\FSPowerPack.Linq.Community.3.0.0.0\Lib\Net40\FSharp.PowerPack.Linq.dll"
#r @"..\packages\Google.ProtocolBuffers.2.4.1.521\lib\net40\Google.ProtocolBuffers.dll"
#r @"..\packages\Google.ProtocolBuffers.2.4.1.521\lib\net40\Google.ProtocolBuffers.Serialization.dll"
#r @"..\packages\Helios.1.4.1\lib\net45\Helios.dll"
#r @"..\packages\Akka.1.0.4\lib\net45\Akka.dll"
#r @"..\packages\Akka.Remote.1.0.4\lib\net45\Akka.Remote.dll"
#r @"..\packages\Akka.FSharp.1.0.4\lib\net45\Akka.FSharp.dll"
@lepinay
lepinay / gist:90836b560b8da7f6df2d
Last active August 29, 2015 14:16
Unit testing in F# interactive
open System
open System.IO
Environment.CurrentDirectory <- __SOURCE_DIRECTORY__
if not (File.Exists "paket.exe") then
let url = "https://github.com/fsprojects/Paket/releases/download/0.26.3/paket.exe"
use wc = new Net.WebClient() in let tmp = Path.GetTempFileName() in wc.DownloadFile(url, tmp); File.Move(tmp,Path.GetFileName url)
And I won't even argue it would be easier phone on programmer to solve this problem done for a programmer because the norm program there is more restricted it doesn't know about programming doesn't know that Jeff a script into some nobody knows about we have a list and we want to start up something the list so how you do it Soho a non programmable will think about it will just think about the train I have played it was just say I will go through the list and down if I find items I want to sort of I just switch it with the item before and the problem is done butts for programmer you both are the same time think about how you will so that you know a real life but your mind is also annoyed how do I do a switch will I need to present for temporary viable how am I going to travel the list all Trevor obviously oh okay if I use a follow-up done I'm going to have some kind of loop and then maybe I will need a temporary variable to store the previous I'm going to switch the letter on that I can use to some tricky why
@lepinay
lepinay / leap.hs
Last active August 29, 2015 14:14
module LeapYear where
data Check a = Check (a -> Bool)
isLeap (Check check) n = check n
instance Monad (Check) where
return a = Check (\_ -> True)
(Check check) >>= cont = Check (\n -> isLeap (cont n) n ) -- check n && cont n
@lepinay
lepinay / test.hs
Last active August 29, 2015 14:12
test haskell
import System.IO
import Control.Monad
import Data.List
main :: IO ()
main = do
hSetBuffering stdout NoBuffering -- DO NOT REMOVE
-- The code below will read all the game information for you.
-- On each game turn, information will be available on the standard input, you will be sent: