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 return-fastest (&rest functions) | |
(let* ((retvals nil) | |
(threads nil) | |
(results-lock (bt:make-lock "results")) | |
(sig (bt:make-condition-variable)) | |
(wrapped (mapcar (lambda (fn) | |
(lambda () | |
(let ((got-results (bt:with-lock-held (results-lock) retvals))) | |
(format t "th: res1: ~a~%" got-results) | |
(unless got-results |
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
(defpackage :mlet-nonr | |
(:use :cl)) | |
(in-package :mlet-nonr) | |
(defun %attack (item fn) | |
(format t "attacking ~a, then calling fn~%" (car item)) | |
(funcall fn (car item))) | |
(defmacro attack (item fn) | |
"This is a macro so we can bind to multiple values. In this case, %attack only |
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
cd /path/to/turtl | |
mkdir -p tmp/release | |
cd tmp | |
unzip ../package.nw | |
# in your editor of choice, open main.js and find this block (around line 154): | |
# | |
# win.on('minimize', function() { | |
# win.hide(); | |
# // Window.hide() hides the tray menu, so we just remove it and re-add it |
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 sleeper () | |
(let ((f1 (green-threads:make-future))) | |
(as:delay (lambda () (complete-future f1 'hai)) :time 3) | |
f1)) | |
(defun app () | |
(with-green-thread | |
(format t "start sleeper~%") | |
(format t "end sleeper: ~a~%" (wait-on (sleeper))))) |
NewerOlder