Skip to content

Instantly share code, notes, and snippets.

View sgithens's full-sized avatar

Steven Githens sgithens

View GitHub Profile
@sgithens
sgithens / phoenix.js
Created June 30, 2024 20:09
phoenix.js config
// Preferences
Phoenix.set({
daemon: false,
openAtLogin: true,
});
// Globals
const HIDDEN_DOCK_MARGIN = 3;
const INCREMENT = 0.05;
const CONTROL_SHIFT = ['control', 'shift'];
@sgithens
sgithens / 2023-10-03-boxer.sbcl.diff
Created October 4, 2023 01:54
Hacking to get all of current Boxer source to load/compile in to SBCL with asdf and fail on an actual unit test
diff --git a/boxer-sunrise-test.asd b/boxer-sunrise-test.asd
index 212c92a..9466ba6 100644
--- a/boxer-sunrise-test.asd
+++ b/boxer-sunrise-test.asd
@@ -21,7 +21,7 @@
(:test-file "alternate-names-tests")
;; (:test-file "chunker-tests")
(:test-file "vrtdef-tests")
- (:test-file "loader-tests")
+ ; (:test-file "loader-tests")
@sgithens
sgithens / graphics-command.lisp
Created September 18, 2023 19:53
Boxer Historical Graphics Commands
;;;;
;;;; Boxer
;;;; Copyright 1985-2022 Andrea A. diSessa and the Estate of Edward H. Lay
;;;;
;;;; Portions of this code may be copyright 1982-1985 Massachusetts Institute of Technology. Those ;;;; portions may be
;;;; used for any purpose, including commercial ones, providing that notice of MIT copyright is ;;;; retained.
;;;;
;;;; Licensed under the 3-Clause BSD license. You may not use this file except in compliance with ;;;; this license.
;;;;
;;;; https://opensource.org/licenses/BSD-3-Clause
@sgithens
sgithens / gist:f3f840538e7490fac42c1d06e70c9d14
Created August 21, 2023 16:25
Transformation matrix with determinant zed
CL-USER 1 > (3D-MATRICES:MAT4 #(0.1299038 -0.074999996 0.0 408.0877 0.074999996 0.1299038 0.0 122.7445 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0))
(3D-MATRICES:MAT4 #(0.1299038 -0.074999996 0.0 408.0877 0.074999996 0.1299038 0.0 122.7445 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0))
CL-USER 2 > (setf wowm (3D-MATRICES:MAT4 #(0.1299038 -0.074999996 0.0 408.0877 0.074999996 0.1299038 0.0 122.7445 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0)))
(3D-MATRICES:MAT4 #(0.1299038 -0.074999996 0.0 408.0877 0.074999996 0.1299038 0.0 122.7445 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0))
CL-USER 3 > wowm
(3D-MATRICES:MAT4 #(0.1299038 -0.074999996 0.0 408.0877 0.074999996 0.1299038 0.0 122.7445 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0))
CL-USER 4 > (3d-matrices:mdet wowm)
@sgithens
sgithens / transformations.lisp
Created June 9, 2023 23:34
transformations.lisp
(in-package :boxgl)
(defvar *vs-transforms-example*
"#version 330 core
layout (location = 0) in vec3 aPos;
layout (location = 1) in vec3 aColor;
layout (location = 2) in vec2 aTexCoord;
out vec3 ourColor;
out vec2 TexCoord;
@sgithens
sgithens / textures.lisp
Created June 9, 2023 03:00
textures.lisp
(in-package :boxgl)
(defvar *vs-vanilla*
"#version 330 core
layout (location = 0) in vec3 aPos;
void main()
{
gl_Position = vec4(aPos.x, aPos.y, aPos.z, 1.0);
}")
@sgithens
sgithens / tests.lisp
Created September 17, 2022 17:37
initial tests for .boxer file format
;; Basic test of creating a box structure, saving it, re-opening it, and verifying a few bits
(let* ((boxer::*supress-graphics-recording?* t)
(boxer::*draw-status-line* nil)
(current-time (simple-name-timestamp))
(new-tests-dir (cl-fad:merge-pathnames-as-directory cl-user::*boxer-project-dir*
(format nil "tests/data/testing/~A/" current-time)))
(zip-results-dir (cl-fad:merge-pathnames-as-directory new-tests-dir "unzip-results/"))
(newbox (make-instance 'boxer::data-box))
(reopened-box nil)
(zipped-reopened-box nil))
@sgithens
sgithens / dumper.lisp
Created May 24, 2022 22:54
Boxer Embedded png pixmap encoding hacking.
(defun dump-pixmap (pixmap stream)
(log:debug "Inside dump-pixmap")
(enter-table pixmap)
(write-file-word bin-op-pixmap stream)
(cond
((>= *version-number* 13)
(dump-png-encoded-pixmap pixmap stream)
)
(t (let ((depth (offscreen-bitmap-depth pixmap)))
(case depth
CL-USER 7 > (pprint (macroexpand-1 '(boxer-eval::evaluator-body (2) nil)))
(BOXER-EVAL::WITH-EVALUATOR-STATE-VARIABLES-AND-UNWIND-PROTECT
(BOXER-EVAL::INIT-TIMING)
(BOXER-EVAL::TRACE-ENTERING EVAL)
(SETQ BOXER-EVAL::*POLL-COUNT* BOXER-EVAL::*INITIAL-POLL-COUNT*)
(TAGBODY
BOXER-EVAL::STANDARD-ENTRY (BOXER-EVAL::TRACE-ENTERING BOXER-EVAL::STANDARD-ENTRY)
(WHEN (NULL NIL)
(SETQ BOXER-EVAL::*RETURNED-VALUE* BOXER-EVAL::*NOVALUE*)
@sgithens
sgithens / stuff.lisp
Created March 29, 2022 13:03
macroexpanded defboxer preference
(pprint (macroexpand-1 '(defboxer-preference bu::print-fractions (true-or-false)
((*print-rationals* :boolean (boxer-eval::boxer-boolean *print-rationals*))
#+capi results #-capi result-appearance
("Should fractional numbers (e.g., 1/2) appear as ")
("fractions (1/2), rather than decimals (0.5) ?"))
(setq *print-rationals* true-or-false)
boxer-eval::*novalue*)))
(PROGN
(UNLESS (FAST-MEMQ 'BOXER-USER::PRINT-FRACTIONS *BOXER-PREFERENCES-LIST*)