I hereby claim:
- I am bitonic on github.
- I am bitonic (https://keybase.io/bitonic) on keybase.
- I have a public key whose fingerprint is 81AE B4F4 45B7 79AD F92E 0872 F59F FEA3 BBE1 A8C8
To claim this, I am signing this object:
# Edit this configuration file to define what should be installed on | |
# your system. Help is available in the configuration.nix(5) man page | |
# and in the NixOS manual (accessible by running ‘nixos-help’). | |
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix |
#! /usr/bin/env bash | |
# Script to install NixOS from the Hetzner Cloud NixOS bootable ISO image. | |
# (tested with Hetzner's `NixOS 20.03 (amd64/minimal)` ISO image). | |
# | |
# This script wipes the disk of the server! | |
# | |
# Instructions: | |
# | |
# 1. Mount the above mentioned ISO image from the Hetzner Cloud GUI |
function signNonZero(x: number): number { | |
return x < 0 ? -1 : 1; | |
} | |
function inClosedInterval(a: number, x: number, b: number): boolean { | |
return (x-a) * (x-b) <= 0; | |
} | |
function segContainsPoint(a: number, b: number, x: number): number { | |
return (b > x ? 1 : 0) - (a > x ? 1 : 0); |
// Vectorized (SSE and AVX, through Eigen) atan2 and acos. | |
// | |
// Care has been taken to ensure that the vectorized results are identical to the non-vectorized | |
// ones. | |
// | |
// Original functions from <https://developer.download.nvidia.com/cg/index_stdlib.html>, adapted | |
// to work in bulk. Both seem to be very accurate (only tested that error < 0.01 | |
// degrees, which is what I need). | |
#include <Eigen/Core> |
// Compiled with | |
// | |
// g++ -std=c++17 -march=native -O3 -I<path-to-eigen-master> eigen-avx.c -o eigen-avx | |
// | |
// Expected output: | |
// | |
// With size 8, normal_count: 0, packet4_count: 0, packet8_count: 1 | |
// With size 9, normal_count: 1, packet4_count: 0, packet8_count: 1 | |
// | |
// Actual output: |
Play this game by pasting the script in http://www.puzzlescript.net/editor.html |
import GHC.Generics | |
import Data.Kind | |
import qualified Data.Vector as V | |
import qualified Data.HashMap.Strict as HMS | |
import qualified Data.Map.Strict as Map | |
import Data.Hashable (Hashable) | |
type family WebApiType a :: * |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
{-# LANGUAGE ConstraintKinds #-} | |
{-# LANGUAGE GADTs #-} | |
module Test where |
I hereby claim:
To claim this, I am signing this object:
I very often find myself wanting unboxed polymorphic types
(e.g. types that contain UNPACK
ed type variables). I find
it extremely frustrating that it's easier to write fast and
generic code in C++ than in Haskell.
I'd like to submit to the mailing list a very rough proposal on how this could be achieved in a pretty straightforward way in GHC.