This file contains hidden or 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
| open Sqlite3 | |
| let result = ref [] | |
| let sqls = | |
| ["select id || ' ' || name || ' ' || address from x"; "select id from x"] | |
| let _ = | |
| let db = db_open "t" in | |
| sqls |
This file contains hidden or 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
| import random | |
| import pygame | |
| import sys | |
| import math | |
| FPS = 80 | |
| WINDOW_WIDTH = 800 | |
| WINDOW_HEIGHT = 600 | |
| NRECTS = 16 | |
| RECT_SIZE = 64 |
This file contains hidden or 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
| // to compile and run: gcc -o Mikas t.c -lsdl2 && ./Mikas | |
| // | |
| #include <stdio.h> | |
| #include <stdbool.h> | |
| #include <SDL2/SDL.h> | |
| #include <stdlib.h> | |
| #define WINDOW_WIDTH 800 | |
| #define WINDOW_HEIGHT 600 | |
| #define RECT_SIZE 64 |
This file contains hidden or 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
| ;;;Sets up the file for use | |
| (defparameter *my-file* (open "~/_work_/parse.lisp")) | |
| ;;;Reads the entire file printing each line, (loopfile file) | |
| (defun loopfile (x) | |
| (loop for line = (read-line x nil) | |
| while line do (print line))) | |
| ;; Strings are vectors. Vectors are sequences. | |
| ;; Strings are vectors and sequences. So all operations for them apply: |
This file contains hidden or 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
| (defvar *notes* | |
| '("C" "Db" "D" "Eb" "E" "F" "Gb" "G" "Ab" "A" "Bb" "B")) | |
| ;; 0 1 2 3 4 5 6 7 8 9 10 11 | |
| (defvar *intervals* | |
| '("R" "2b" "2" "3b" "3" "4" "5b" "5" "5#" "6" "7b" "7")) | |
| (defvar *scales*) | |
| (setf *scales* | |
| '(;; MAJOR SCALES |
This file contains hidden or 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
| option base 1 | |
| if @main then | |
| mode -1, -1, windowed or banked | |
| sprites() | |
| endif | |
| def sprites() | |
| spriterenderpoint 0 | |
| bankedon |
This file contains hidden or 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
| Yacht | |
| (Yet Another Cycle Hunting Table) | |
| ------------------------------------------------------------------------------- | |
| Forewords : | |
| ------------------------------------------------------------------------------- | |
| This document is based on : | |
| - 9th Edition of M68000 8-16-32-bit Microporcessor User's Manual | |
| (Motorola, 1993) (laterly refered as M68000UM) |
This file contains hidden or 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
| vim.api.nvim_create_autocmd({'BufNewFile', 'BufRead'}, { | |
| pattern = {'*.nim', }, | |
| -- command = 'set shiftwidth=4', | |
| callback = function () | |
| vim.lsp.start({ | |
| name='nimlsp', | |
| cmd={'/Users/$USER/.nimble/bin/nimlsp.cmd'}, | |
| root_dir='~' | |
| }) | |
| vim.lsp.buf_attach_client(0, 1) |
This file contains hidden or 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
| ; fasm demonstration of writing 64-bit ELF executable | |
| ; (thanks to František Gábriš) | |
| ; syscall numbers: /usr/src/linux/include/asm-x86_64/unistd.h | |
| ; parameters order: | |
| ; r9 ; 6th param | |
| ; r8 ; 5th param | |
| ; r10 ; 4th param | |
| ; rdx ; 3rd param |
This file contains hidden or 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
| (defn get-nth-byte [v n] | |
| (bit-and 0xff (bit-shift-right v (* 8 n)))) | |
| (defn pack-little-endian [v n] | |
| (let [l []] | |
| (for [i (range n)] | |
| (into (get-nth-byte v i) l)))) | |
| (defn pack-big-endian [v n] | |
| (let [l []] |
OlderNewer