Skip to content

Instantly share code, notes, and snippets.

View kozross's full-sized avatar

Koz Ross kozross

View GitHub Profile
;;; package --- Summary
;;; flycheck-gdc.el
;; Copyright (C) 2015 Koz Ross
;; Author: Koz Ross <koz.ross@runbox.com>
;; Keywords: flycheck, gdc, dlang
;; Version: 0.0.1
;; This program is free software; you can redistribute it and/or modify
@kozross
kozross / gist:30db3d6bc28b97c55aaa
Created March 29, 2015 02:47
Backtrace from uTox execution
#0 0x00007ffff678129c in tox_new () from /usr/lib/libtoxcore.so.0
#1 0x00000000004315c1 in ?? ()
#2 0x00007ffff62fb374 in start_thread () from /usr/lib/libpthread.so.0
#3 0x00007ffff4b6427d in clone () from /usr/lib/libc.so.6
BEGIN {FS = ","}
# want to say 'replace $2 (second field) with "bell" if it is exactly "b"
BEGIN {FS = ","}
# want to say 'replace $2 (second field) with "bell" if it is exactly "b"
#!/usr/bin/awk -f
BEGIN {
FS=OFS=","
# edibility
translation[1, "p"] = "poisonous"
translation[1, "e"] = "edible"
# cap-shape
translation[2, "b"] = "bell"
translation[2, "c"] = "conical"
translation[2, "x"] = "convex"
4000000 constant LIMIT
\ n -- f
: is-even? 2 mod 0= ;
\ w1 w2 w3 -- w2 w1 w3
: flip rot swap ;
\ total prev curr -- total+ curr next
: add-even-and-gen dup is-even?
#!/usr/bin/gawk -f
BEGIN {
# set up tracker for which epoch we're in
epoch = -1
# set up counter for how many entries we've seen
counter = 0
;;;; My init.el
;;; Ensuring all my packages are installed
;; set up the packaging system
(require 'package)
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/"))
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/"))
(package-initialize)
-- I have the following table schemata in SQLite
CREATE TABLE experiments (
id integer not null primary key autoincrement,seed integer not null,
gens integer not null check (gens > 0),
keep_every integer not null check (keep_every > 0),
cluster_size integer not null check (cluster_size > 0),
search_width integer not null check (search_width > 0),
table_size integer not null check (table_size > 2)
);
\ This example is straight from Starting Forth.
HERE 5 CELLS ALLOT BASE !
: limit ( index -- addr ) CELLS [ BASE @ ] LITERAL + ;
DECIMAL
\ Is there a way to avoid the first line (i.e. dumping the address into a 'scratch variable')?
\ My initial thinking was something like:
: limit ( index -- addr ) CELLS [ HERE 5 CELLS ALLOT ] LITERAL + ;