Skip to content

Instantly share code, notes, and snippets.

@milesfrain
milesfrain / db.purs
Last active October 17, 2020 23:05 — forked from MrFincher/db.purs
Now compiles (although some additional debug still required), see https://try.ps.ai/?gist=540b36954ee840f8c32a95bfa4324d1f
data Column v = Column String
data Table columnRow = Table {name :: String, columns :: Record columnRow}
data Select tableColumns selectedColumns = Select
(Record tableColumns -> Record selectedColumns)
(Table tableColumns)
data ToStr = ToStr
@milesfrain
milesfrain / uint_assembly.log
Created October 7, 2019 20:58
Int vs UInt Performance
julia> @code_llvm debuginfo=:none runbench_expand(UInt)
define i64 @julia_runbench_expand_17321(%jl_value_t addrspace(10)*) {
top:
br label %L2
L2: ; preds = %L30, %top
%value_phi = phi i64 [ 0, %top ], [ %value_phi6, %L30 ]
%value_phi1 = phi i64 [ 1, %top ], [ %3, %L30 ]
br label %pass
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
[?25l[?25hPkgBenchmark: Running benchmarks...
Activating new environment at `/tmp/jl_80elOh/Project.toml`
Resolving package versions...
Updating `/tmp/jl_80elOh/Project.toml`
[864edb3b] + DataStructures v0.17.0 [`~/temp/DataStructures.jl`]
Updating `/tmp/jl_80elOh/Manifest.toml`
[864edb3b] + DataStructures v0.17.0 [`~/temp/DataStructures.jl`]
[bac558e1] + OrderedCollections v1.1.0
<!-- This configuration file specifies the required security policies
for Bluetooth core daemon to work. -->
<!-- Debian-compatible additions to https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/src/bluetooth.conf?h=5.49 -->
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- ../system.conf have denied everything, so we just punch some holes -->
@milesfrain
milesfrain / google_sheet_macro_steps.md
Last active September 25, 2018 17:48
How to create a

Instructions on creating a macro to move a row down by one in google sheets. Or in other words, swap the contents of the row containing the current active cell with the contents of the row below the current active cell.

This macro also supports moving multiple rows of any selected range.

There's a potential glitch if repeating the macro quickly multiple times before the previous iteration completes. It seems that google allows the next iteration to start before the first completes, which can cause an unexpected row to be shifted.

The macro takes about 1 second to execute, which is not ideal. I'm not sure if there are any ways to speed this up.

Tools > Script Editor
@milesfrain
milesfrain / bolt_build_issues.md
Last active May 21, 2018 00:37
bolt build issues

I'm trying to build bolt with the following commands:

meson build
ninja -C build

I'm seeing this error:

ninja: Entering directory `build'