Skip to content

Instantly share code, notes, and snippets.

View considerate's full-sized avatar

Viktor Kronvall considerate

View GitHub Profile
@considerate
considerate / Gradients.hs
Created January 18, 2018 10:43
Gradients Accelerate
(let a0 =
let a0 = use
(Array (Z :. 2 :. 2) [2.0250376117435733,18.7039690333509,25.755929376845543,35.32123856353882]) in
let a1 =
let a1 =
let a1 =
let a1 =
let a1 =
let a1 =
use
@considerate
considerate / BoardAcc.hs
Last active December 27, 2017 16:43
Accelerate Crash when mapping over canPlace
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE TypeOperators #-}
module BoardAcc where
import qualified Prelude as P
import Prelude(Show(..))
import Data.Maybe(Maybe(..))
Compiled from "Test.java"
public class Test {
public Test();
Code:
0: aload_0
1: invokespecial #1 // Method java/lang/Object."<init>":()V
4: new #2 // class Test$Specific
7: dup
8: aload_0
9: invokespecial #3 // Method Test$Specific."<init>":(LTest;)V
@considerate
considerate / Function.class.java
Created May 21, 2017 20:54
Small example of Java Functions without generics.
Compiled from "Function.java"
public abstract class Function {
public Function();
Code:
0: aload_0
1: invokespecial #1 // Method java/lang/Object."<init>":()V
4: return
public abstract java.lang.Object apply(java.lang.Object);
}