This file contains 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
// GLSL code for rendering numbers without using any textures or global arrays, using a tiny bitmap font | |
// for debugging! | |
// public domain. use under the creative commons zero license (any version) | |
// warning: the float-to-decimal conversion logic is "incorrect" and can only give around around four or five decimal places of floating point decision | |
const int _print_number_max_float_digits = 5; | |
const int _print_number_scale = 2; | |
const int _print_number_stretch_x = 1; | |
const int _print_number_stretch_y = 1; |
This file contains 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
use chumsky::{prelude::*, input::SpannedInput}; | |
// This token is a tree: it contains within it a sub-tree of tokens | |
#[derive(PartialEq, Debug)] | |
enum Token { | |
Num(i64), | |
Add, | |
Mul, | |
Parens(Vec<(Token, SimpleSpan)>), | |
} |
This file contains 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
/* aeabi.h - declares the ARM run-time helper-function ABI for programs written in C. | |
* | |
* This is free and unencumbered software released into the public domain. | |
* | |
* Anyone is free to copy, modify, publish, use, compile, sell, or | |
* distribute this software, either in source code form or as a compiled | |
* binary, for any purpose, commercial or non-commercial, and by any | |
* means. | |
* In jurisdictions that recognize copyright laws, the author or authors |
This file contains 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
#!/bin/sh | |
# Update: As of March 24th 2017 this script won't work. | |
# The script at https://get.haskellstack.org/ is broken | |
# because the binary of Stack 1.4 for ARM is missing from https://www.stackage.org/stack/ . | |
# You can still get the binary for Stack 1.3.2 from | |
# https://github.com/commercialhaskell/stack/releases/download/v1.3.2/stack-1.3.2-linux-arm.tar.gz | |
# and place it at $USR_LOCAL_BIN/stack in your system. | |
# Once Stack is installed you can proceed with the Install LLVM step |
This file contains 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
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE DeriveDataTypeable #-} | |
import Data.Aeson | |
import qualified Data.ByteString.Char8 as BS | |
import qualified Data.ByteString.Lazy.Char8 as BSL | |
import Data.ByteString.Lazy (toChunks) | |
import Data.List | |
import Data.Maybe | |
import Data.Typeable (Typeable) |
This file contains 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
module Main where | |
import Test.QuickCheck (quickCheck) | |
import Your.Module (encrypt, decrypt) | |
prop_reverseReverse :: [Char] -> Bool | |
prop_reverseReverse s = (reverse . reverse) s == s | |
prop_encryptDecrypt :: [Char] -> Bool | |
prop_encryptDecrypt s = (encrypt . decrypt) s == s |