Skip to content

Instantly share code, notes, and snippets.

View tonyarkles's full-sized avatar

Tony Arkles tonyarkles

  • Persea Systems
  • Saskatoon, SK, Canada
View GitHub Profile
@tonyarkles
tonyarkles / SketchSystems.spec
Created November 11, 2021 15:54
My Awesome Sketch
My Awesome Sketch
First State
some event -> Second State
Second State
Login
Main Login
bad password -> Main Login
forgot password -> Forgot Password
correct -> SMS Verification
register -> Registration
SMS Verification
skip -> Main Screen
ok -> PIN Setup
@tonyarkles
tonyarkles / SketchSystems.spec
Created December 5, 2019 18:33
Flare Test UI
Flare Test UI
logs -> Log Page
Loading*
saved -> Device Page
notfound -> Scan
Device Page
disconnect -> Scan
Scan
choose -> Device Page
Log Page
(ql:quickload "hunchentoot")
(ql:quickload "hunchensocket")
(hunchentoot:define-easy-handler (say-yo :uri "/yo") (name)
(setf (hunchentoot:content-type*) "text/plain")
(format nil "Hey ~@[~A~]!" name))
(defclass chat-room (hunchensocket:websocket-resource)
((name :initarg :name :initform (error "Name this room") :reader name))
(:default-initargs :client-class 'user))
#include <stdio.h>
#include <stdlib.h>
#include "ecl/ecl.h"
cl_object foo() {
return ecl_make_integer(42);
}
cl_object bar(cl_object x) {
(defstruct stl-file header num-points points)
(defstruct stl-point normal point attribs)
(defun read-header (stream)
(let ((data (make-array 80 :initial-element nil)))
(read-sequence data stream)
data))
(defun read-num-triangles (stream)
(let ((data (make-array 4 :element-type '(unsigned-byte 8))))
(ql:quickload :sdl2)
(require :sdl2)
(require :cl-opengl)
(defun render ()
"drawing whatever happens in a frame"
(gl:clear :color-buffer)
(gl:begin :triangles)
(gl:color 0.0 1.0 0.0)
(gl:vertex 0.0 1.0)
@tonyarkles
tonyarkles / gist:f8b5871e5814f669e28801b64b796ec2
Created December 6, 2018 15:25
Maxima weird unit problem
(%i8) 1`(m/s) * 0`(1/s);
1
(%o8) 0 ` -
s
(%i9) 0`(1/s) * 1`(m/s);
m
(%o9) 0 ` --
2
s
(%i10) (1`(m/s)) * (0`(1/s));
kill(all);
load("ezunits");
x : c1*t^2 + c2*t + c3$
dx : diff(x,t)$
eqns : [ev(x,t=0`s) = 0`m,
ev(x,t=5`s) = 5`m,
ev(dx,t=0`s) = 1`(m/s)]$
(defparameter *width* 8)
(defparameter *height* 8)
(defparameter *board*
(make-array (list *width* *height*) :initial-element 0))
(defun birth (x y)
(setf (aref *board* x y) 1))
(defun death (x y)