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
else if(t==PT_FUSE) | |
{ | |
if(parts[i].life<=0) { | |
t = PT_NONE; | |
kill_part(i); | |
create_part(-1, x, y, PT_SMKE); | |
goto killed; | |
} | |
for(nx=-2; nx<3; nx++) |
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
else if(t==PT_FUSE) | |
{ | |
if(parts[i].life<=0) { | |
t = PT_NONE; | |
kill_part(i); | |
create_part(-1, x, y, PT_SMKE); | |
goto killed; | |
} | |
for(nx=-2; nx<3; nx++) |
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
(defmacro define-awesome-function (function args) | |
(if (null args) | |
`(defun ,function () | |
,(multiple-value-bind (name) (read-from-string | |
(format "(slime-eval '(cl-awesome::%s))" function)) name)) | |
`(defun ,function ,args | |
,(multiple-value-bind (name) (read-from-string | |
(format "(slime-eval `(cl-awesome::%s %s))" function | |
(let ((return-string "")) | |
(loop for i in args do |
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
fib :: (Integral a) => a -> a | |
fib 0 = 0 | |
fib 1 = 1 | |
fib x = fib (x - 1) + fib (x - 2) | |
fibs :: (Integral a) => [a] | |
fibs = map fib [0..] | |
col :: (Integral a) => a -> a | |
col 1 = 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
fib :: (Integral a) => a -> a | |
fib 0 = 0 | |
fib 1 = 1 | |
fib x = fib (x - 1) + fib (x - 2) | |
fibs :: (Integral a) => a -> [a] | |
fibs 0 = [0] | |
fibs 1 = [1] | |
fibs x = fibs (x - 1) ++ [fib x] |
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
(defun mandelbrot (file) | |
(let ((png (make-instance 'zpng:png | |
:color-type :grayscale-alpha | |
:width 200 | |
:height 200)) | |
(c (complex 0 0)) | |
(z (complex 0 0)) | |
(xres 800) | |
(yres 800) | |
(k 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
(paredit-mode t) | |
(turn-on-eldoc-mode) | |
(eldoc-add-command | |
'paredit-backward-delete | |
'paredit-close-round) | |
(local-set-key (kbd "RET") 'electrify-return-if-match) | |
(eldoc-add-command 'electrify-return-if-match) | |
(show-paren-mode 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
(defun set-pixel (image x y channel) | |
(loop for i from 0 to (- (array-dimension image 2) 1) | |
do (setf (aref image x y i) (nth i channel)))) |
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
(defmacro define-awesome-function (function args) | |
(if (null args) | |
`(defun ,function () | |
,(multiple-value-bind (name) (read-from-string | |
(format "(slime-eval '(cl-awesome::%s))" function)) name)) | |
`(defun ,function ,args | |
,(multiple-value-bind (name) (read-from-string | |
(format "(slime-eval `(cl-awesome::%s %s))" function | |
(let ((return-string "")) | |
(loop for i in args do |
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
use sdl | |
include SDL | |
SDLVersion_: cover from struct SDL_version { | |
major: extern UInt8 | |
minor: extern UInt8 | |
patch: extern UInt8 | |
} | |
SDLAudioCVT: cover from struct SDL_AudioCVT { |