Skip to content

Instantly share code, notes, and snippets.

Avatar

Elliot Saba staticfloat

View GitHub Profile
View vmmap.log
This file has been truncated, but you can view the full file.
Process: julia [92097]
Path: /Users/USER/*/julia
Load Address: 0x102940000
Identifier: julia
Version: ???
Code Type: ARM64
Platform: macOS
Parent Process: julia [92089]
Date/Time: 2023-04-11 12:17:08.759 -0700
@staticfloat
staticfloat / Makefile
Created April 5, 2023 15:12
Accelerate NEWLAPCK dpstrf bug
View Makefile
all: run
dpstrf_newlapack: dpstrf_test.c
$(CC) -o $@ -Ddpstrf='dpstrf$$NEWLAPACK' dpstrf_test.c -framework Accelerate
dpstrf_newlapack_ilp64: dpstrf_test.c
$(CC) -o $@ -Ddpstrf='dpstrf$$NEWLAPACK$$ILP64' -DILP64 dpstrf_test.c -framework Accelerate
dpstrf_oldlapack: dpstrf_test.c
$(CC) -o $@ -Ddpstrf='dpstrf_' dpstrf_test.c -framework Accelerate
@staticfloat
staticfloat / Manifest.toml
Last active February 27, 2023 23:55
Diffractor Performance Comparison
View Manifest.toml
# This file is machine-generated - editing it directly is not advised
julia_version = "1.10.0-DEV"
manifest_format = "2.0"
project_hash = "6985a7b33b28c6ef7f7c6220f3b93174d59aec37"
[[deps.AbstractFFTs]]
deps = ["ChainRulesCore", "LinearAlgebra"]
git-tree-sha1 = "69f7020bd72f069c219b5e8c236c1fa90d2cb409"
uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c"
View grb.bash
#!/bin/bash
# Git rebase entire branch
grb()
{
if git show-ref --verify --quiet refs/remotes/origin/main; then
BASE=${1:-origin/main}
else
BASE=${1:-origin/master}
fi
View objwalk.jl
using REPL
# Helper function to determine if something is "struct"-like
is_struct_like(x) = Base.nfields(x) > 0
function is_array_like(x)
return typeof(x) <: AbstractArray
end
# We sadly can't use `∉` because `missing ∉ haystack` is `missing`, not `false` :(
function missing_resistant_contains(needle, haystack)
@staticfloat
staticfloat / README.md
Last active January 4, 2023 21:28
UDP latency loopback test
View README.md

With no sleep enabled, I consistently get extremely low send/recv times:

$ gcc -o udp_loopback_test_c udp_loopback_test.c && ./udp_loopback_test_c 
[1.0] send: 4.93us      recv: 7.41us
[2.0] send: 4.68us      recv: 7.04us
[3.0] send: 4.86us      recv: 7.58us
[4.0] send: 4.79us      recv: 7.60us
[5.0] send: 4.88us      recv: 7.03us
[6.0] send: 4.70us recv: 7.57us
@staticfloat
staticfloat / openwrt.dts
Created December 9, 2022 19:43
Ubiquiti device tree vs. OpenWRT device tree
View openwrt.dts
/dts-v1/;
/ {
#address-cells = <0x02>;
model = "Ubiquiti UniFi 6 LR v2";
#size-cells = <0x02>;
interrupt-parent = <0x01>;
compatible = "ubnt,unifi-6-lr-v2\0mediatek,mt7622";
i2c@11009000 {
View openwrt_config
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 5.10.146 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 11.2.0 r19803-9a599fee93) 11.2.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=110200
CONFIG_LD_VERSION=237000000
CONFIG_CLANG_VERSION=0
CONFIG_LLD_VERSION=0
View ubiquiti_config
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 4.4.198 Kernel Configuration
#
CONFIG_SUPPORT_OPENWRT=y
CONFIG_ARM64=y
CONFIG_64BIT=y
CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
CONFIG_MMU=y
CONFIG_ARCH_MMAP_RND_BITS_MIN=18
@staticfloat
staticfloat / environment_artifact_audit.jl
Created August 17, 2022 18:01
Audit script to print out which packages are using the most artifacts in an environment
View environment_artifact_audit.jl
using Pkg, Artifacts, TOML, Base.BinaryPlatforms, Printf
# First, collect the list of packages available in this environment
function collect_pkg_roots()
ctx = Pkg.Types.Context()
curr_proj_dir = dirname(Base.active_project())
pkg_roots = Dict{String,String}(
basename(curr_proj_dir) => curr_proj_dir,
)
for (_, pkg) in ctx.env.manifest.deps