# HG changeset patch # User Steve Losh # Date 1577138519 18000 # Node ID e1295ede4c11dce6b69b73e46ce66f40e008b640 # Parent f1457db0c563048807ffb3a0b85badb6a37a3f17 Cleanup diff -r f1457db0c563 -r e1295ede4c11 .hgignore --- a/.hgignore Sat Aug 13 15:54:30 2016 +0000 +++ b/.hgignore Mon Dec 23 17:01:59 2019 -0500 @@ -4,3 +4,5 @@ syntax: re build/silt$ silt.prof +silt +silt-bin diff -r f1457db0c563 -r e1295ede4c11 Makefile --- a/Makefile Sat Aug 13 15:54:30 2016 +0000 +++ b/Makefile Mon Dec 23 17:01:59 2019 -0500 @@ -6,7 +6,8 @@ sbcl --noinform --load make-quickutils.lisp --eval '(quit)' build/silt: $(lisps) - ros build build/silt.ros + sbcl --disable-debugger --noinform --load 'build/build.lisp' --quit + mv silt build/silt update-deps: hg -R /home/sjl/cl-losh pull -u diff -r f1457db0c563 -r e1295ede4c11 build/build.lisp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/build/build.lisp Mon Dec 23 17:01:59 2019 -0500 @@ -0,0 +1,17 @@ +(unless (find-package :silt) + (ql:quickload '(:silt) :silent t)) + +(declaim (optimize (debug 1) (safety 1) (speed 3))) + +(let ((*standard-output* (make-broadcast-stream)) ; shut + (*error-output* (make-broadcast-stream))) ; up + (asdf:load-system 'silt :force t)) + +(defun main (&rest argv) + (declare (ignore argv)) + (silt::main)) + +(sb-ext:save-lisp-and-die "silt" + :toplevel 'silt::run + :save-runtime-options t + :executable t) diff -r f1457db0c563 -r e1295ede4c11 build/silt.ros --- a/build/silt.ros Sat Aug 13 15:54:30 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -#!/bin/sh -#|-*- mode:lisp -*-|# -#| -exec ros -Q -- $0 "$@" -|# - - -(unless (find-package :silt) - (ql:quickload '(:silt) :silent t)) - -(declaim (optimize (debug 0) (safety 1) (speed 3))) - -(let ((*standard-output* (make-broadcast-stream)) ; shut - (*error-output* (make-broadcast-stream))) ; up - (asdf:load-system 'silt :force t)) - -(defun main (&rest argv) - (declare (ignore argv)) - (silt::main)) diff -r f1457db0c563 -r e1295ede4c11 package.lisp --- a/package.lisp Sat Aug 13 15:54:30 2016 +0000 +++ b/package.lisp Mon Dec 23 17:01:59 2019 -0500 @@ -2,7 +2,6 @@ (:use #:cl #:iterate - #:cl-arrows #:losh #:beast #:silt.quickutils) diff -r f1457db0c563 -r e1295ede4c11 silt.asd --- a/silt.asd Sat Aug 13 15:54:30 2016 +0000 +++ b/silt.asd Mon Dec 23 17:01:59 2019 -0500 @@ -9,8 +9,8 @@ :depends-on (#:iterate #:cl-charms - #:cl-arrows #+sbcl #:sb-sprof + #:alexandria #:losh #:beast) diff -r f1457db0c563 -r e1295ede4c11 silt.lisp --- a/silt.lisp Sat Aug 13 15:54:30 2016 +0000 +++ b/silt.lisp Mon Dec 23 17:01:59 2019 -0500 @@ -7,7 +7,7 @@ ;;;; Data ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(define-constant +world-exponent+ 9) +(define-constant +world-exponent+ 10) (define-constant +world-size+ (expt 2 +world-exponent+)) (defparameter *screen-width* 1) (defparameter *screen-height* 1) @@ -94,9 +94,9 @@ (decf (car entry))) (dead (entry) (minusp (car entry)))) - (->> ticklist - (mapc #'decrement) - (remove-if #'dead)))) + (-<> ticklist + (mapc #'decrement <>) + (remove-if #'dead <>)))) (defun ticklist-contents (ticklist) (mapcar #'cdr ticklist)) @@ -298,7 +298,7 @@ (defmacro modf (place n) - `(zap% ,place #'mod % ,n)) + `(zapf ,place (mod % ,n))) ;;;; Terrain Generation ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -386,10 +386,10 @@ ;;;; Name Generation ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defparameter *name-syllables* - (-> "syllables.txt" - slurp + (-<> "syllables.txt" + alexandria:read-file-into-string read-from-string - (coerce 'vector))) + (coerce <> 'vector))) (defun random-name () (format nil "~:(~{~A~}~)" @@ -422,8 +422,8 @@ (push e (aref *coords-contents* (coords/x e) (coords/y e)))) (defun coords-remove-entity (e) - (zap% (aref *coords-contents* (coords/x e) (coords/y e)) - #'delete e %)) + (zapf (aref *coords-contents* (coords/x e) (coords/y e)) + (delete e %))) (defun coords-move-entity (e new-x new-y) (coords-remove-entity e) @@ -451,7 +451,7 @@ (defmethod initialize-instance :after ((entity coords) &key) - (zapf (coords/x entity) #'wrap + (callf (coords/x entity) #'wrap (coords/y entity) #'wrap)) (defmethod entity-created :after ((entity coords)) @@ -850,7 +850,7 @@ (defun fountain-act (f) (with-slots (recent) f - (zapf recent #'ticklist-tick) + (callf recent #'ticklist-tick) (iterate (for creature :in (remove-if-not #'creature? (nearby f))) (unless (member creature (ticklist-contents recent)) @@ -1140,7 +1140,7 @@ ((#\R) (return :regen)) ((#\?) (return :help)) - ((#\Space) (zapf *paused* #'not)) + ((#\Space) (callf *paused* #'not)) ((#\`) (when *paused* (tick-world))) ((#\+) (incf *temperature*)) @@ -1148,7 +1148,7 @@ ((#\]) (incf *frame-skip*)) ((#\[) (setf *frame-skip* (clamp 1 100 (1- *frame-skip*)))) - ((#\!) (zapf *sleep* #'not)) + ((#\!) (callf *sleep* #'not)) ((#\h) (move-view -5 0)) ((#\j) (move-view 0 5)) @@ -1278,9 +1278,9 @@ (defun main () (handler-case - (progn - (run) - (format t "Goodbye.~%")) + (progn + (run) + (format t "Goodbye.~%")) (t (e) (declare (ignore e)) (format t "Something went wrong, sorry.~%"))))