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
#!/usr/bin/lisp --script | |
(defmacro home (path) | |
`(merge-pathnames ,path (user-homedir-pathname))) | |
#-quicklisp | |
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" | |
(user-homedir-pathname)))) | |
(when (probe-file quicklisp-init) | |
(load quicklisp-init))) |
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
;;;; ltktest.asd | |
(asdf:defsystem #:ltktest | |
:description "Describe ltktest here" | |
:author "Jeremiah LaRocco <[email protected]>" | |
:license "ISC" | |
:depends-on (#:ltk | |
#:iterate | |
#:alexandria) | |
:serial t |
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
#include <stdio.h> | |
int my_function(int bob[20]) { | |
return sizeof(bob); | |
} | |
int main(int argc, char *argv[]) { | |
int array[22] = {0}; | |
printf("%d\n", my_function(array)); | |
return 0; |
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
#include <iostream> | |
#include <chrono> | |
uint64_t fib(uint64_t n) { | |
uint64_t a=1; | |
uint64_t b=1; | |
uint64_t c = b+a; | |
for (uint64_t i=0; i<(n-2); ++i) { | |
c = b + a; | |
b = a; |
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
;;;; package.lisp | |
(defpackage #:trie | |
(:use #:cl) | |
(:export #:create | |
#:add | |
#:contains | |
#:words | |
#:with-prefix | |
#:from-file |
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
#!/usr/bin/lisp --script | |
#-quicklisp | |
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" | |
(user-homedir-pathname)))) | |
(when (probe-file quicklisp-init) | |
(load quicklisp-init))) | |
(let* ((bzr-out-string (make-array '(0) :element-type 'base-char | |
:fill-pointer 0 :adjustable t)) |
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
#!/usr/bin/lisp --script | |
#-quicklisp | |
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" | |
(user-homedir-pathname)))) | |
(when (probe-file quicklisp-init) | |
(load quicklisp-init))) | |
(ql:update-dist "quicklisp") |
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
;; (load "tsp.lisp") | |
(ql:quickload 'cl-ppcre) | |
(defstruct svg | |
(points nil :type list) | |
(polys nil :type list) | |
(lines nil :type list)) | |
(defstruct point |
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
(defstruct svg | |
(points nil :type list) | |
(polys nil :type list) | |
(lines nil :type list)) | |
(defstruct point | |
(x 0.0 :type (or float integer)) | |
(y 0.0 :type (or float integer))) | |
(defstruct line |
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
#!/usr/bin/env python3 | |
import io | |
import sys | |
import json | |
import httplib2 | |
from lxml import etree | |
roads_url = 'http://cotrip.org/speed.htm' | |
def printJSON(json): |