Skip to content

Instantly share code, notes, and snippets.

View JoeyEremondi's full-sized avatar

Joey Eremondi JoeyEremondi

View GitHub Profile
module Vec2 where
import Transform2D
type Vec = {x: Float, y:Float}
type Tform = {a: Float, b:Float, c: Float, d:Float, x: Float, y:Float}
eps = 0.0000001
@JoeyEremondi
JoeyEremondi / game2048.elm
Last active August 29, 2015 13:58
2048 in Elm
--2048 in Elm
--Written by Joey Eremondi
[email protected]
--Based on 2048 by Gabriele Cirulli
--which was based on 1024 by Veewo Studio
--and similar to Threes by Asher Vollme
{- Copyright (c) 2014, Joey Eremondi
All rights reserved.
import String
import Array
import Http
import Math.Vector3 (..)
import Math.Matrix4 (..)
import Graphics.WebGL (..)
type VertV = {position: Vec3}
package nfa;
import java.util.*;
import java.lang.Math;
import DFA.DFAState;
import automata.FiniteAutomaton;
package DFA;
import java.util.*;
import java.lang.Math;
import automata.FAState;
import automata.FiniteAutomaton;
public class DFAState {
import Graphics.Input (Input, input, dropDown)
import Text
main : Signal Element
main = lift display style.signal
style : Input String
style = input <| snd <| head colorOptions
display : String -> Element
Loading package conduit-1.1.7 ... linking ... done.
Loading package yaml-0.8.8.4 ... ghc.exe: Unknown PEi386 section name `.text.unlikely' (while processing: C:\Users\joey\
js-cabal\.cabal-sandbox\x86_64-windows-ghc-7.8.2\yaml-0.8.8.4\HSyaml-0.8.8.4.o)
ghc.exe: panic! (the 'impossible' happened)
(GHC version 7.8.2 for x86_64-unknown-mingw32):
loadObj "C:\\Users\\joey\\js-cabal\\.cabal-sandbox\\x86_64-windows-ghc-7.8.2\\yaml-0.8.8.4\\HSyaml-0.8.8.4.o": f
ailed
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
@JoeyEremondi
JoeyEremondi / elm-install.sh
Last active August 29, 2015 14:05
Elm installation script
#!/bin/sh
echo "************** Elm Installer version 0.0.1 **************"
PLATFORM=`uname -m`
BINARY_URL_PREFIX="http://JoeyEremondi.github.io/elm-linux-binaries/$PLATFORM"
INSTALL_DIR= ~/.elm-install
@JoeyEremondi
JoeyEremondi / gist:dce7c429971dd69b2708
Created October 26, 2014 19:52
Test file for webgl static textures
import Http (..)
import Math.Vector2 (Vec2)
import Math.Vector3 (..)
import Math.Matrix4 (..)
import Graphics.WebGL (..)
import Array
-- Define the mesh for a crate
crate : [Triangle { pos:Vec3, coord:Vec3 }]
import Json.Decode as Json
import Json.Encode as Encode
import Dict
{-| Given the number of constructors a type has, a constructor name string,
and a list of JSON values to pack,
pack the values into a JSON object representing an ADT,