Skip to content

Instantly share code, notes, and snippets.

View kmsquire's full-sized avatar

Kevin Squire kmsquire

  • SecondSpectrum
  • Los Angeles
View GitHub Profile
@kmsquire
kmsquire / output.txt
Created January 20, 2021 00:50
Missing symbols when creating custom sysimage with PackageCompiler.jl
┌ Debug: running `gcc -m64 -march=x86-64 -shared -L/Users/kevinsquire/src/julia/usr/lib -o /var/folders/18/dh5c58yx0337hrntc94m04hr0000gq/T/jl_yen5Lb/tmp_sys.so -Wl,-all_load /var/folders/18/dh5c58yx0337hrntc94m04hr0000gq/T/jl_QV9UC0.o -ljulia -Wl,-rpath,@executable_path -Wl,-rpath,@executable_path/../lib -fPIC`
└ @ PackageCompiler ~/.julia/dev/PackageCompiler/src/PackageCompiler.jl:500
Undefined symbols for architecture x86_64:
"_jl_RTLD_DEFAULT_handle", referenced from:
_julia___preinit_threads___17744 in jl_QV9UC0.o(text.o)
_julia__start_22442 in jl_QV9UC0.o(text.o)
_julia___init___23289 in jl_QV9UC0.o(text.o)
_julia___init___15032 in jl_QV9UC0.o(text.o)
_julia_init_active_project_20763 in jl_QV9UC0.o(text.o)
_julia_coverage_enabled_8287 in jl_QV9UC0.o(text.o)
@kmsquire
kmsquire / conjugate_priors_output_test.jl
Created May 29, 2016 18:53
Valid way to install ConjugatePriors.jl on Julia v0.5
kevin@Kevins-MacBook-Pro:~$ rm -Rf .julia
kevin@Kevins-MacBook-Pro:~$ julia
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _' | |
| | |_| | | | (_| | | Version 0.5.0-dev+4329 (2016-05-26 00:11 UTC)
_/ |\__'_|_|_|\__'_| | Commit ef7101b* (3 days old master)
|__/ | x86_64-apple-darwin14.5.0
#include <stdio.h>
#include "merge.h"
#include "diff.h"
#include "rebase.h"
#include "checkout.h"
int main() {
printf("get_merge_flag_t: %zu\n", sizeof(git_merge_flag_t));
printf("get_merge_file_flavor: %zu\n", sizeof(git_merge_file_favor_t));
printf("git_merge_file_flag_t: %zu\n", sizeof(git_merge_file_flag_t));
@kmsquire
kmsquire / 0_select_vs_nsmallest.jl
Created March 7, 2015 03:15
select vs select! vs nsmallest in Julia
using DataStructures
times_select = DefaultDict((Int,Int), Vector{Float64}, ()->Float64[])
times_select! = DefaultDict((Int,Int), Vector{Float64}, ()->Float64[])
times_nsmallest = DefaultDict((Int,Int), Vector{Float64}, ()->Float64[])
# warmup
select([1,2,3,4,5], 1:3)
nsmallest(3, [1,2,3,4,5])
@kmsquire
kmsquire / results.txt
Created March 7, 2015 03:14
select vs select vs nsmallest in Julia
julia> include("test_select.jl")
sz = 10, n = 5:
select : mean: 0.00000065 median 0.00000058
select! : mean: 0.00000043 median 0.00000040
nsmallest: mean: 0.00000112 median 0.00000104
sz = 100, n = 5:
select : mean: 0.00000154 median 0.00000133
select! : mean: 0.00000071 median 0.00000068
nsmallest: mean: 0.00000232 median 0.00000219
sz = 100, n = 50:
@kmsquire
kmsquire / webcam.jl
Last active August 29, 2015 14:06 — forked from SimonDanisch/webcam.jl
import VideoIO
using GLPlot, Reactive, GLAbstraction
camera = VideoIO.opencamera()
img = VideoIO.read(camera)
# Just for fun, lets apply a laplace filter:
kernel = [-1 -1 -1;
-1 8 -1;
// g++-4.9 local_hist.cpp -g -I ../include -L ../bin -lHalide `libpng-config --cflags --ldflags` -lpthread -ldl -o local_hist
// LD_LIBRARY_PATH=../bin ./local_hist
#include <Halide.h>
#include <stdio.h>
using namespace Halide;
#include "image_io.h"
#include "clock.h"
@kmsquire
kmsquire / 00_sort_comparison.jl
Last active August 29, 2015 14:03
Comparison of code generated by normal forward sorting and sorting "by=x->x".
x = rand(1000000);
ord = Base.Sort.ord(isless, x->x, false, Base.Order.Forward)
# The lines below compare the sort code generated using forward ordering,
# and using "by=x->x".
# The output of the code is below
@code_llvm sort!(x, 1, 1000000, QuickSort, Base.Order.Forward)
@code_llvm sort!(x, 1, 1000000, QuickSort, ord)
# @code_native union!(s, x[1], y[1])
.text
Filename: /home/kevin/.julia/v0.3/DataStructures/src/disjoint_set.jl
Source line: 47
push RBP
mov RBP, RSP
push R15
push R14
push R13
push R12
@kmsquire
kmsquire / Pkg output
Created February 1, 2014 00:14
Error: version 0.2.8 already exists
julia> Pkg.tag("GZip")
INFO: Tagging GZip v0.2.8
INFO: Committing METADATA for GZip
julia> Pkg.publish()
INFO: Validating METADATA
INFO: Pushing GZip permanent tags: v0.2.8
INFO: Submitting METADATA changes
INFO: Forking JuliaLang/METADATA.jl to kmsquire
Enter host password for user 'kmsquire':