Skip to content

Instantly share code, notes, and snippets.

View jamii's full-sized avatar

Jamie Brandon jamii

View GitHub Profile
jamie@wanderer:~/code/monolog$ ls ~/.m2/repository/com/joestelmach/natty/0.13-SNAPSHOT/
maven-metadata-local.xml _remote.repositories
natty-0.13-SNAPSHOT.jar resolver-status.properties
natty-0.13-SNAPSHOT.pom
jamie@wanderer:~/code/monolog$ lein repl
Could not find artifact com.joelstemach:natty:jar:0.13-SNAPSHOT in clojars (https://clojars.org/repo/)
...
<center>
<h2>tools for thought</h2>
</center>

data first

  • browse / explore
  • share / publish
  • names and time
  • undo / versioning / change
  • memory
  • (change control reduces need for interfaces)
  • (urls, dvcs, can, blockchain, dht)
module Layout
type Uninitialized end
layout(val) = begin
seen = ObjectIdDict()
vals = Any[val]
while length(vals) > 0
val = pop!(vals)
if !isbits(val) && !haskey(seen, val) && (val != Uninitialized)

The best:

cat /proc/cpuinfo | grep popcnt
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb pln pts dtherm tpr_shadow vnm
@jamii
jamii / .jl
Last active December 29, 2015 02:08
@generated construct{T}(key::Type{Val{T}}, value) = begin
ixes = key.parameters[1].parameters[1]
:(begin
$(Expr(:meta, :inline))
tuple($([:(value[$ix]) for ix in ixes]...))
end)
end
reshape(xs, ys, ykey) = begin
for x in xs
@jamii
jamii / map.rs
Last active December 18, 2015 03:40
extern crate alloc;
use std::ptr;
use std::mem;
use self::alloc::heap;
use std::slice;
use std::cmp::{max};
#[derive(Copy, Clone)]
struct Header {
@jamii
jamii / map.rs
Created December 18, 2015 03:26
fn as_slice<'a>(&'a self, leaf_bytes: usize) -> &'a [u64] {
let layout = self.layout(leaf_bytes);
unsafe {
&slice::from_raw_parts(self.start as *mut u64, layout.allocated_bytes / 8)
}
}