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 blerp () | |
(declare (optimize (speed 3) (safety 3) (debug 1))) | |
(%gl:depth-func :gequal)) | |
; file: /private/var/tmp/slimeUxycfQ | |
; in: DEFUN BLERP | |
; (CL-OPENGL-BINDINGS:DEPTH-FUNC :GEQUAL) | |
; --> BLOCK MULTIPLE-VALUE-PROG1 CFFI:FOREIGN-FUNCALL LET LET IF | |
; ==> | |
; #:VALUE2 |
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
;; You might want to paste these in your .emacs file | |
;; when over one paren it shows it's match | |
(show-paren-mode t) | |
;; C-c ) jumps to the matching paren | |
(defun goto-match-paren (arg) | |
"Go to the matching if on (){}[], similar to vi style of % " | |
(interactive "p") | |
;; first, check for "outside of bracket" positions expected by forward-sexp, etc. |
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
;; like emit except it expects a values for for the data argument | |
(v-defmacro emit-values ((&key point-size) position data) | |
`(progn | |
,@(when point-size `((setf gl-point-size ,point-size))) | |
(setf gl-position ,position) | |
,@(when data `((emit-data ,data))) | |
(emit-vertex))) |
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-g q:dot ((quat-a :vec4) (quat-b :vec4)) | |
(+ (* (w quat-a) (w quat-b)) | |
(* (x quat-a) (x quat-b)) | |
(* (y quat-a) (y quat-b)) | |
(* (z quat-a) (z quat-b)))) |
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
(in-package :test) | |
(defvar *data* nil) | |
(defvar *ssbo* nil) | |
(defstruct-g bah | |
(data (:int 100))) | |
(defun-g yay-compute (&uniform (woop bah :ssbo)) | |
(declare (local-size :x 1 :y 1 :z 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
<ERROR> [22:22:39] cl-bodge.host system.lisp (initialize-system :after host-system with-truncated-stack-lambda) - | |
Unhandled error: | |
WGL: Failed to create OpenGL context | |
[Condition of type SIMPLE-ERROR] | |
#<ENVIRONMENT {1007723AC3}> | |
[Environment of thread #<THREAD "main-thread" RUNNING {1006D66123}>] | |
Available restarts: | |
0: [CONTINUE] Skip flow block returning nil |
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
baggers@alittlecave:~/Downloads/notalone$ ./notalone | |
<ERROR> [22:11:34] cl-bodge.concurrency execution.lisp (ignite h1) - | |
Uncaught error during task execution: GLX: Failed to make context current | |
Unhandled SIMPLE-CONDITION in thread #<SB-THREAD:THREAD "single-threaded-executor" RUNNING | |
{1006466B23}>: | |
SIMPLE-ERROR: GLX: Failed to make context current | |
Backtrace for: #<SB-THREAD:THREAD "single-threaded-executor" RUNNING {1006466B23}> | |
0: (SB-DEBUG::DEBUGGER-DISABLED-HOOK #<SIMPLE-CONDITION "~A: ~A" {10038D5083}> #<unused argument> :QUIT T) | |
1: (SB-DEBUG::RUN-HOOK *INVOKE-DEBUGGER-HOOK* #<SIMPLE-CONDITION "~A: ~A" {10038D5083}>) |
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
;; In swank-repl.lisp comment out the original #'spawn-repl-thread and paste this | |
;; | |
;; Props to Luis for the idea and Shinmera as I bodged the implementation of find-main-thread | |
;; from his trivial-main-thread library | |
(defun find-main-thread () | |
(or | |
#+sbcl (find "main thread" (all-threads) :from-end T :key #'sb-thread:thread-name :test #'equal) | |
#+ecl (find 'si:top-level (all-threads) :from-end T :key #'mp:process-name) | |
#+ccl ccl::*initial-process* |
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 open-file-externally () | |
"In dired, open the file named on this line." | |
(interactive) | |
(let* ((file (dired-get-filename nil t))) | |
(message "Opening %s..." file) | |
(call-process "gnome-open" nil 0 nil file) ;; switch gnome-open to whatever you prefer. xdg-open is probably sensible | |
(message "Opening %s done" file))) | |
(add-hook 'dired-mode-hook | |
(lambda () |
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 test-issue (compiled-stages prog-id) | |
(register-lambda-pipeline | |
compiled-stages | |
(let* ((image-unit -1) | |
(implicit-uniform-upload-func | |
(or (%create-implicit-uniform-uploader compiled-stages 'nil) | |
#'fallback-iuniform-func))) | |
(declare | |
(ignorable image-unit) | |
(type function implicit-uniform-upload-func)) |