Skip to content

Instantly share code, notes, and snippets.

View garrison's full-sized avatar

Jim Garrison garrison

View GitHub Profile
@garrison
garrison / gist:d974aaeda947a0674c3012391fcb9970
Created January 1, 2022 03:15
Julia e8d116735cfa under Valgrind
$ valgrind --smc-check=all-non-file --suppressions=contrib/valgrind-julia.supp --leak-check=full --show-leak-kinds=definite ./julia -e ""
==xxxxxx== Memcheck, a memory error detector
==xxxxxx== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==xxxxxx== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==xxxxxx== Command: ./julia -e
==xxxxxx==
==xxxxxx==
==xxxxxx== HEAP SUMMARY:
==xxxxxx== in use at exit: 97,755,918 bytes in 75,184 blocks
==xxxxxx== total heap usage: 166,179 allocs, 90,995 frees, 104,815,918 bytes allocated
@garrison
garrison / build-log
Last active September 19, 2021 02:09
ekam build failure with ccache on Fedora 34
This file has been truncated, but you can view the full file.
[vagrant@fedora34 ~]$ git clone https://github.com/capnproto/ekam.git
Cloning into 'ekam'...
remote: Enumerating objects: 2218, done.
remote: Counting objects: 100% (273/273), done.
remote: Compressing objects: 100% (159/159), done.
remote: Total 2218 (delta 189), reused 167 (delta 113), pack-reused 1945
Receiving objects: 100% (2218/2218), 1.89 MiB | 2.32 MiB/s, done.
Resolving deltas: 100% (1599/1599), done.
[vagrant@fedora34 ~]$ cd ekam
[vagrant@fedora34 ekam]$ nano Makefile
@garrison
garrison / Dockerfile.debian
Last active August 5, 2022 00:35
Sandstorm Docker builds
# buster compiles just fine.
# bullseye works, with some warnings about "not a dynamic executable" at the end. My own testing has shown that the resulting package works, as expected since Kenton claims on IRC to use bullseye.
FROM debian:bullseye
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y build-essential libcap-dev xz-utils zip \
unzip strace curl discount git python3 zlib1g-dev \
golang-go cmake strace flex bison locales
# Install meteor as a regular user; otherwise the build cannot find node.h.
(v1.0) pkg> add RandomMatrices
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Resolving package versions...
Installed CMake ─────────────────────── v1.0.2
Installed GenericSVD ────────────────── v0.2.0
Installed DataStructures ────────────── v0.12.0
Installed NLSolversBase ─────────────── v7.1.0
Installed RandomMatrices ────────────── v0.4.0
Installed DiffEqBase ────────────────── v4.25.0
@garrison
garrison / indexin.txt
Created January 20, 2018 15:00
Uses of `indexin` in julia package ecosystem
./BayesNets/src/Factors/factors_dims.jl: index_common1 = indexin(common, ϕ1.dimensions)
./BayesNets/src/Factors/factors_dims.jl: index_common2 = indexin(common, ϕ2.dimensions)
./BayesNets/src/Factors/factors_dims.jl: index_unique1 = indexin(unique1, ϕ1.dimensions)
./BayesNets/src/Factors/factors_dims.jl: index_unique2 = indexin(unique2, ϕ2.dimensions)
./BayesNets/src/Factors/factors_dims.jl: inds = (indexin(dims, ϕ)...)
./BayesNets/src/Factors/factors_dims.jl: inds = (indexin(dims, ϕ)...)
./BayesNets/src/Factors/factors_dims.jl: inds = indexin(dims, ϕ)
./BayesNets/src/Factors/factors_dims.jl: inds = indexin(dims, ϕ)
./BayesNets/src/Factors/factors_main.jl:Base.indexin(dim::NodeName, ϕ::Factor) = findnext(ϕ.dimensions, dim, 1)
./BayesNets/src/Factors/factors_main.jl:Base.indexin(dims::NodeNames, ϕ::Factor) = indexin(dims, names(ϕ))
ArrayFire/generate/generate.jl: "is_sparse" => "issparse", "sparse_to_dense" => "full",
ArrayFire/src/array.jl:import Base: Array, SparseMatrixCSC, copy, deepcopy_internal, issparse, sparse, full, complex, conj
ArrayFire/src/util.jl: @assert issparse(a) "AFArray is not sparse"
ArrayFire/src/util.jl: if issparse(a)
ArrayFire/src/util.jl:toa(a) = issparse(a) ? SparseMatrixCSC(a) : Array(a)
ArrayFire/src/wrap.jl:export is_row, is_scalar, is_single, is_vector, is_window_closed, isinf, isnan, issparse, iszero, le, lgamma
ArrayFire/src/wrap.jl:function issparse(arr::AFArray)
ArrayFire/test/sparse.jl:@test !issparse(A)
ArrayFire/test/sparse.jl:@test issparse(a1)
ArrayFire/test/sparse.jl:@test issparse(Aid)
$ valgrind -q --smc-check=all --suppressions=/home/garrison/julia/contrib/valgrind-julia.supp --trace-children=yes make
CC src/jltypes.o
CC src/gf.o
FLISP src/julia_flisp.boot
FLISP src/julia_flisp.boot.inc
CC src/ast.o
CC src/builtins.o
CC src/module.o
CC src/codegen.o
In file included from codegen.cpp:746:0:
$ valgrind -q --smc-check=all --suppressions=/home/garrison/julia/contrib/valgrind-julia.supp --trace-children=yes make
CC src/jltypes.o
CC src/gf.o
FLISP src/julia_flisp.boot
FLISP src/julia_flisp.boot.inc
CC src/ast.o
CC src/builtins.o
CC src/module.o
CC src/codegen.o
CC src/disasm.o
$ valgrind -q --smc-check=all --suppressions=/home/garrison/julia/contrib/valgrind-julia.supp --trace-children=yes make
CC src/jltypes.o
CC src/gf.o
FLISP src/julia_flisp.boot
FLISP src/julia_flisp.boot.inc
CC src/ast.o
CC src/builtins.o
CC src/module.o
CC src/codegen.o
CC src/disasm.o
$ valgrind -q --smc-check=all --suppressions=$PWD/contrib/valgrind-julia.supp --trace-children=yes make
CC src/jltypes.o
CC src/gf.o
FLISP src/julia_flisp.boot
FLISP src/julia_flisp.boot.inc
CC src/ast.o
CC src/builtins.o
CC src/module.o
CC src/codegen.o
CC src/disasm.o