Skip to content

Instantly share code, notes, and snippets.

View fouric's full-sized avatar

kono dio da fouric

View GitHub Profile

Keybase proof

I hereby claim:

  • I am fouric on github.
  • I am fouric (https://keybase.io/fouric) on keybase.
  • I have a public key whose fingerprint is 6EAA 6653 327A 196E 7663 A14D 6588 A311 DF91 1830

To claim this, I am signing this object:

@fouric
fouric / rfc3161.txt
Created May 22, 2018 22:06 — forked from Manouchehri/rfc3161.txt
List of free rfc3161 servers.
http://sha256timestamp.ws.symantec.com/sha256/timestamp
http://timestamp.globalsign.com/scripts/timstamp.dll
https://timestamp.geotrust.com/tsa
http://timestamp.verisign.com/scripts/timstamp.dll
http://timestamp.comodoca.com/rfc3161
http://timestamp.wosign.com
http://tsa.startssl.com/rfc3161
http://time.certum.pl
http://timestamp.digicert.com
https://freetsa.org
(
;; favorite stack:
favorites (
("<shadowgraph>" "MYTH&ROID" 0.7) ;; Boogiepop & Others opening music
("No Sugar Coated Love (oomiee Remix)" "Tape Machines" 0.9)
("High Enough (Baaku Remix)" "Justin Caruso ft. Rosie Darling" 0.8 ())
("My Body (RudeLies ReBoot)" "Hot Shade X Palm Trees Feat. Sophia Ayana" 0.7 (suggestive ))
("Speak In Tongues" "machineheart" 0.7 ())
("Collide" "Vicetone ft. Rosi Golan" 0.8 (cool-video ))
("Waiting For You" "Coyote Kisses ft. Madison Love" 1.0 ())
(proclaim '(optimize (speed 0) (safety 0) (space 0) (debug 3)))
(eval-when (:compile-toplevel)
(ql:quickload :sdl2)
(ql:quickload :sdl2-ttf))
(let ((rect (sdl2:make-rect 0 0 0 0)))
(defun render-rectangle (renderer x y w h r g b &optional (filled t))
;; NOT thread-safe!
(plus-c:c-let ((rect sdl2-ffi:sdl-rect :from rect))
(defmacro with-gethash-accessors (bindings &body body)
`(macrolet ,(mapcar (lambda (b)
(if (symbolp b)
(let ((sym (gensym))
(keyword (intern (string b) :keyword)))
`(,b (,sym) `(gethash ,,keyword ,,sym))))) bindings)
,@body))
;; target input:
(with-gethash-accessors (x y)
EPERM 1 Operation not permitted
ENOENT 2 No such file or directory
ESRCH 3 No such process
EINTR 4 Interrupted system call
EIO 5 Input/output error
ENXIO 6 No such device or address
E2BIG 7 Argument list too long
ENOEXEC 8 Exec format error
EBADF 9 Bad file descriptor
ECHILD 10 No child processes
(defclass animal ()
())
(defclass bear (animal)
((height :initarg :height)))
(defgeneric noise (animal))
(defmethod noise ((animal bear))
(format t "ROAR~%"))
(defgeneric run (machine))
(defgeneric does-not-understand (object message))
(defmethod does-not-understand ((object bear) message)
CL-USER(4): (time (fresh-start))
Evaluation took:
8.166 seconds of real time
0.187492 seconds of total run time (0.071998 user, 0.115494 system)
2.29% CPU
2 forms interpreted
43 lambdas converted
17,109,338,607 processor cycles
9,877,040 bytes consed
Python (3) to (Common) Lisp feature comparison
Memory model & typing:
CL & Python are both managed-memory languages.
Both are also dynamically-typed languages with strong type systems (no implicit type coercion), although Python's design leans toward "duck" typing, and CL's does not.
(set-dispatch-macro-character #\# #\l
(lambda (stream c n)
(declare (ignore c))
(let ((list (read stream nil (values) t))
(arg-names '(x y z w)))
(when (consp list)
(let ((n (if n
(min (1- (length arg-names)) n)
0)))
`(lambda (,@(subseq arg-names 0 n))