Skip to content

Instantly share code, notes, and snippets.

View bryant's full-sized avatar

bryant bryant

  • New York; Berlin
View GitHub Profile
_gleLLVMVecInterpolateClip: ## @gleLLVMVecInterpolateClip
.cfi_startproc
## BB#0: ## %cond_false183
pxor %xmm0, %xmm0
xorps %xmm1, %xmm1
cmpltps %xmm1, %xmm1
pxor %xmm2, %xmm2
packssdw %xmm1, %xmm2
pblendw $127, %xmm0, %xmm2
pmovmskb %xmm2, %eax
commit fda5c8f46b58fb43e9245609579334df19bbb5d4
Author: bryant <[email protected]>
Date: Wed May 18 18:34:31 2016 -0400
use a retry loop for `plainroot`
because detection of the ${ROOT} device could take some time
diff --git a/components/9990-main.sh b/components/9990-main.sh
index e5884f9..10a746a 100755
# Building just clang-9.0 for creduce.
execute_process(
COMMAND "grep" "^processor" "/proc/cpuinfo"
COMMAND "wc" "-l"
COMMAND "tr" "-d" "'\n'"
OUTPUT_VARIABLE ncpu)
message("Building with ${ncpu} cpus")
set(LLVM_PARALLEL_COMPILE_JOBS ${ncpu} CACHE STRING "")
PACKAGES="sudo,\
aptitude,\
pump,\
ifupdown,\
less,\
vim-tiny,\
openssh-server,\
iputils-ping,\
iproute2,\
linux-image-amd64,\

test:

\lim_{n \rightarrow \infty}{\left( 1 + \frac{1}{n} \right) ^n} = e

dollar signs:

$$ \lim_{n \rightarrow \infty}{\left( 1 + \frac{1}{n} \right) ^n} = e

ARCH_FLAGS="-mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16"
WA=$(echo $ARCH_FLAGS | sed -e 's# #,#g')
CLANG_CALL="clang -no-integrated-as -Wa,$WA -target arm-none-eabi $ARCH_FLAGS"
export AS_FOR_TARGET="arm-none-eabi-as $ARCH_FLAGS"
export GCC_FOR_TARGET=$CLANG_CALL
export CC_FOR_TARGET=$CLANG_CALL
export CFLAGS_FOR_TARGET=$ARCH_FLAGS
../configure \
--prefix=$HOME/usr \
--target=arm-none-eabi \
{-# LANGUAGE MultiParamTypeClasses #-}
class C a b where
idk :: a -> b -> Maybe (a, b)
instance C Int Bool where idk _ _ = Nothing
f :: Int -> Bool -> [Either Int Bool]
f a b =
let g a b = maybe [] (const $ []) $ idk a b in
@bryant
bryant / trigger.conf
Created February 3, 2015 01:49
weechat darkened join-part messages.
# create a trigger.conf with the below contents. or, apply the below to section
# [trigger] of the existing trigger.conf. then issue /reload from inside
# weechat.
[trigger]
irc_join.arguments = "2000|weechat_print"
irc_join.command = ""
irc_join.conditions = "${tg_tags} =~ ,irc_join,"
irc_join.enabled = on
irc_join.hook = modifier
const : {A B : Set} -> A -> B -> A
const x y = x
data List (A : Set) : Set where
Nil : List A
Cons : A -> List A -> List A
map : {A B : Set} -> (A -> B) -> List A -> List B
map f Nil = Nil
map f (Cons x xs) = Cons (f x) (map f xs)
@bryant
bryant / clang-subst-fail
Created May 29, 2014 03:49
clang-subst-fail
23:47:47 ~> cat subst-fail.cpp
#include <memory>
template <typename T, typename ...U> std::unique_ptr<T, U...> f() { return std::unique_ptr<T, U...>(); }
main() { f<int, std::default_delete<int>>(); }
23:47:52 ~> g++ -std=c++11 subst-fail.cpp
23:48:02 ~> clang++ -std=c++11 subst-fail.cpp
subst-fail.cpp:3:1: error: C++ requires a type specifier for all declarations
main() { f<int, std::default_delete<int>>(); }