This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defrecord machine-state | |
;; Registers | |
pc sp a b c d e f h l | |
;; Memory Regions | |
video-ram ext-ram work-ram sprite-ram mmap-i/o z-ram | |
;; Debug Fields | |
;; Lists of what the last instruction changed | |
affected-regs affected-flags memory-updates | |
;; The instruction that was just disassembled this step. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun multiline? (string) | |
(position ?\n string)) | |
(defun multiline-comment (string) | |
(concat "#||\n" string "\n||#\n")) | |
;; Note: Redefining to send the error message too. | |
(defun chebert-eval-async (sexp &optional cont package) | |
"Evaluate EXPR on the superior Lisp and call CONT with the result." | |
(declare (indent 1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun make-vector (length elt) (make-array length :initial-element elt)) | |
(defun vector-elt (vec i) (aref vec i)) | |
(defun vector-set! (vec i elt) (setf (aref vec i) elt)) | |
(defun matrix (m n vec) (list m n vec)) | |
(defun matrix-m (m) (first m)) | |
(defun matrix-n (m) (second m)) | |
(defun matrix-vec (m) (third m)) | |
(defun num-elements (m n) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defpackage :pacman | |
(:use :cl)) | |
(in-package :pacman) | |
;;; The charms/ll library contains all of the FFI bindings to Ncurses. | |
(ql:quickload :cl-charms) | |
;;; Here are all of the functions I'll be using from Ncurses. | |
(import '( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
map ,g :!gcc % -o %:r -lncurses && ./%:r <CR> | |
*/ | |
#include <assert.h> | |
#include <stdint.h> | |
#include <ncurses.h> | |
#include <sys/time.h> | |
#include <time.h> | |
#include <stdlib.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nmap <silent> <leader>s :set opfunc=SendToTmux<CR>g@ | |
nmap <silent> <leader>ss :call SendLineToTmux()<CR> | |
vmap <silent> <leader>s :<C-U>call SendToTmux(visualmode(), 1)<CR> | |
function! SendLineToTmux() | |
let line = line('.') | |
let col = col('.') | |
" TODO: this assumes the leader is ',' | |
:normal 0,s$"" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define-foreign-library alsa | |
(t (:default "libasound"))) | |
(defcenum snd-pcm-stream-t | |
:snd_pcm_stream_playback | |
:snd_pcm_stream_capture) | |
(defcenum snd-pcm-state-t | |
:SND_PCM_STATE_OPEN | |
:SND_PCM_STATE_SETUP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct FileChooserDialog { | |
private: | |
struct FileCompare { | |
bool operator() (const Glib::RefPtr<Gio::File>& a, const Glib::RefPtr<Gio::File>& b) const { | |
std::clog << (a->equal(b) ? "equal" : "not equal") << std::endl; | |
return a->equal(b); | |
} | |
}; | |
public: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
filetype off | |
"Bundles | |
set rtp+=~/.vim/bundle/vundle | |
call vundle#rc() | |
Bundle 'gmarik/vundle' | |
Bundle 'embear/vim-localvimrc' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Available Fonts: | |
A-OTF Futo Min A101 Pr5 Bold | |
A-OTF Futo Min A101 Pro Bold | |
A-OTF Midashi Min MA31 Pr5 MA31 | |
A-OTF Midashi Min MA31 Pro MA31 | |
A-OTF Ryumin Std B-KO | |
A-OTF Ryumin Std B-KS | |
A-OTF Ryumin Std H-KO | |
A-OTF Ryumin Std H-KS | |
A-OTF Ryumin Std L-KO |