Numbers in Haskell are typed of course. They also exist as instances of a numeric typeclass hierarchy. I was confused with converting and working with numbers of different types, and not being sure which functions were polymorphic and could work with different numeric types. So I created a little diagram. Do note that the typeclass hierarchy of Haskell actually does somewhat follow the hierarchy of numbers in Math.
| #!/bin/sh | |
| # Brainfuck interpreter implemented in pure POSIX sh builtins only (except I/O) | |
| # Tested in bash and busybox ash (getchar uses a bash-specific read) | |
| # === I/O === | |
| getchar() { | |
| # bashism | |
| IFS= read -rN 1 a | |
| if [ -z "$a" ]; then | |
| echo $th |
| #!/usr/bin/env python | |
| #coding: utf-8 | |
| import os | |
| import sys | |
| import ctypes | |
| def is_loaded(lib): | |
| libp = os.path.abspath(lib) | |
| ret = os.system("lsof -p %d | grep %s > /dev/null" % (os.getpid(), libp)) |
To remove a submodule you need to:
- Delete the relevant section from the .gitmodules file.
- Stage the .gitmodules changes git add .gitmodules
- Delete the relevant section from .git/config.
- Run git rm --cached path_to_submodule (no trailing slash).
- Run rm -rf .git/modules/path_to_submodule (no trailing slash).
- Commit git commit -m "Removed submodule "
- Delete the now untracked submodule files rm -rf path_to_submodule
This is a guide on how to email securely.
There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.
In general, check the crt/host_config.h file to find out which versions are supported.
Sometimes it is possible to hack the requirements there to get some newer versions working, too :)
Thrust version can be found in $CUDA_ROOT/include/thrust/version.h.
Download Archives: https://developer.nvidia.com/cuda-toolkit-archive
Release notes for CUDA Toolkit (CTK):
std::set phoenix;
phoenix.key_comp();| // Just before switching jobs: | |
| // Add one of these. | |
| // Preferably into the same commit where you do a large merge. | |
| // | |
| // This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
| // and then it quickly escalated into more and more evil suggestions. | |
| // I've tried to capture interesting suggestions here. | |
| // | |
| // Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
| // @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
| module HList where | |
| open import Level | |
| open import Data.Bool | |
| open import Data.Nat hiding (_⊔_) | |
| open import Data.Vec | |
| open import Data.List | |
| data HList {a} : List (Set a) → Set (Level.suc a) where | |
| [] : HList [] |
| -W | |
| -Wextra | |
| -Wmissing-field-initializers | |
| -Wignored-qualifiers | |
| -Winitializer-overrides | |
| -Wsemicolon-before-method-body | |
| -Wmissing-method-return-type | |
| -Wsign-compare | |
| -Wunused-parameter | |
| -W#pragma-messages |