Skip to content

Instantly share code, notes, and snippets.


Danilo Vidovic vydd

Block or report user

Report or block vydd

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:6062bc9369fa969f2ad7
(defun render-grid (grid cell-size)
(with-pen (make-pen :fill (gray 0.2) :stroke +white+)
(dolist (row grid)
(dolist (cell row)
(rect 0 0 cell-size cell-size)
(with-font (make-font :color (hash-color (char-code (elt cell 0)))
View gist:a2337c0f0702536a2318
(defparameter *theta* 0)
(defsketch recursive-tree (:width 640 :height 360) ()
(background +black+)
(with-pen (make-pen :stroke +white+)
(let ((*theta* (* 90 (/ (in :mouse-x) width))))
(translate (/ width 2) height)
(line 0 0 0 -120)
(translate 0 -120)
View gist:eb888d6873df6c64c0b2
(defun set-window-fullscreen (win fullscreen-p &optional desktop-p)
(let ((fs (if fullscreen-p
(if desktop-p
(check-rc (sdl-set-window-fullscreen win fs))))
View cypress
(setf sb-impl::*default-external-format* :utf-8)
(asdf:oos 'asdf:load-op 'cypress)
(sb-ext:save-lisp-and-die "cypressmac"
(lambda ()
(:compile-toplevel :load-toplevel :execute)
(sb-int:set-floating-point-modes :traps nil))
(tmt:with-body-in-main-thread (:blocking t)
(setf xelf::*executable* t)
vydd / build-ccl.lisp
Created Dec 21, 2015
^ ^ V V < > < > B A
View build-ccl.lisp
;; (push (merge-pathnames "lib/" *default-pathname-defaults*)
;; asdf:*central-registry*)
;; (push #P"/home/dto/blocky/"
;; asdf:*central-registry*)
;; (push #P"/home/dto/2x0ng/"
;; asdf:*central-registry*)
(ql:quickload '(:trivial-main-thread :cocoahelper :lispbuilder-sdl-mixer :lispbuilder-sdl-ttf :lispbuilder-sdl-image :uuid :cl-opengl :cl-fad))
(defpackage :xelf-asd)
View psilord's highlighter
(defun ansi-boolean (x)
'string "\\_<\\(" (symbol-name x) "\\)\\_>") 0 ''ansi-lisp-boolean))
(defun ansi-constant (x)
'string "\\_<\\(" (symbol-name x) "\\)\\_>") 0 ''ansi-lisp-constant))
View gist:baf2d6d1f2d1179fc5b6
(signal-zip A
(signal-map f B)
(signal-switch predicatep C D))
(signal-graph (A (f B) (if predicatep C D))
View xelf 4x0ng
#!/usr/bin/env sh
sbcl \
--eval "#+(and darwin sbcl)(eval-when (:compile-toplevel :load-toplevel :execute)(sb-int:set-floating-point-modes :traps nil))" \
--eval "(ql:quickload :swank)" \
--eval "(ql:quickload :trivial-main-thread)" \
--eval "(ql:quickload :4x0ng)" \
--eval "(tmt:call-in-main-thread #'4x0ng:4x0ng)"
View maze.lisp
(ql:quickload :sketch)
(ql:quickload :alexandria)
(in-package :sketch)
(defparameter *maze-w* 60)
(defparameter *maze-h* 40)
(defparameter *tile-size* 10)
(defparameter *maze* nil)
You can’t perform that action at this time.