This file contains hidden or 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
| { nixpkgs ? import <nixpkgs> {}, compiler ? "ghc883" }: | |
| let | |
| pkgs = nixpkgs; | |
| futhark = | |
| pkgs.haskell.packages.${compiler}.callCabal2nix "futhark" | |
| ( pkgs.lib.cleanSource ./. ) { }; | |
| in | |
| pkgs.haskell.lib.overrideCabal | |
| futhark |
This file contains hidden or 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
| { nixpkgs ? import <nixpkgs> {}, compiler ? "ghc883" }: | |
| let | |
| # pkgs = nixpkgs.pkgsMusl; | |
| pkgs = nixpkgs; | |
| futhark = | |
| pkgs.haskell.packages.${compiler}.callCabal2nix "futhark" | |
| ( pkgs.lib.cleanSource ./. ) { }; | |
| in | |
| pkgs.haskell.lib.overrideCabal |
This file contains hidden or 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
| { nixpkgs ? import <nixpkgs> {}, compiler ? "ghc882" }: | |
| let | |
| futhark = | |
| nixpkgs.haskell.packages.${compiler}.callCabal2nix "futhark" | |
| ( nixpkgs.lib.cleanSource ./. ) { }; | |
| in | |
| nixpkgs.haskell.lib.overrideCabal | |
| futhark | |
| ( oldDrv: { | |
| isLibrary = false; |
This file contains hidden or 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
| #include <stdio.h> | |
| #include <string.h> | |
| #include <CL/cl.h> | |
| const char rot13_cl[] = " \ | |
| __kernel void rot13 \ | |
| ( __global const char* in \ | |
| , __global char* out \ | |
| ) \ | |
| { \ | |
| const uint index = get_global_id(0); \ |
This file contains hidden or 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
| let minimal_prefix 'a [n] (p: a -> bool) (as: [n]a) (goal: i32) : []a = | |
| as | |
| |> map p | |
| |> map i32.bool | |
| |> scan (+) 0 | |
| |> zip (iota n) | |
| |> reduce (\(i, x) (j, y) -> if x >= goal | |
| then (i, x) | |
| else (j, y)) | |
| (0, -1) |
This file contains hidden or 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
| let minimal_prefix 'a [n] (p: a -> bool) (as: [n]a) (goal: i32) : []a = | |
| as | |
| |> map p | |
| |> map i32.bool | |
| |> scan (+) 0 | |
| |> zip (iota n) | |
| |> reduce (\(i, x) (j, y) -> if x >= goal | |
| then (i, x) | |
| else (j, y)) | |
| (n, goal) |
This file contains hidden or 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
| instantiateExtIxFun :: (MonadFreshNames m, Show d, Show u, Show ret) => | |
| Ident -> ExtIxFun -> | |
| m ([PatElemT (MemInfo d u ret)], IxFun) | |
| instantiateExtIxFun idd ext_ixfn = do | |
| let isAndPtps = S.toList $ | |
| foldMap onlyExts $ | |
| foldMap leafExpTypes ext_ixfn | |
| -- Find the existentials that reuse the sizeidents, and |
This file contains hidden or 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
| $ convert naur.png pam:- | ./stupidart - - -dAMD | convert pam:- output.png | |
| lib/github.com/diku-dk/lys/liblys.c:153: Futhark error 1: Error: division by zero | |
| Backtrace: | |
| -> #0 shapes/circle.fut:13:35-52 | |
| #1 shapegen.fut:50:11-27 | |
| #2 shapegen.fut:58:8-31 | |
| #3 lib/github.com/diku-dk/segmented/segmented.fut:74:20-40 | |
| #4 /futlib/soacs.fut:56:19-23 | |
| #5 /futlib/soacs.fut:56:3-37 |
This file contains hidden or 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
| import Data.Vect | |
| same : a -> a -> (a,a) | |
| same x y = (x,y) | |
| test : Vect n Integer -> Nat | |
| test v = | |
| let x = snd (Data.Vect.filter (>0) v) | |
| y = snd (Data.Vect.filter (>1) v) | |
| foo = same x y |
This file contains hidden or 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
| $ mono hello.exe | |
| Can't find custom attr constructor image: /home/athas/sandbox/hello.exe mtoken: 0x0a000001 due to: Could not load file or assembly 'FSharp.Core, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. | |
| Unhandled Exception: | |
| System.IO.FileNotFoundException: Could not load file or assembly 'FSharp.Core, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. | |
| File name: 'FSharp.Core, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' | |
| [ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'FSharp.Core, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. | |
| File name: 'FSharp.Core, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' |