freenode/#lisp - IRC Chatlog
Search
1:56:53
Ukari
(defparameter th (bt:make-thread (lambda () (sleep 5) (print "runs")))) (bt:interrupt-thread th (lambda nil)), why i can't interrupt the thread from sleep?
2:07:39
Ukari
(defparameter th (bt:make-thread (lambda () (catch 'wake (sleep 5)) (print "runs")))) (bt:interrupt-thread th (lambda () (throw 'wake nil)))
2:12:54
White_Flame
an interrupt is just pause, run externally-provided lambda, resume. If you want to wake up from a timeout, you should use locks/waits/etc with timeouts
3:05:37
fiddlerwoaroof
minion: memo for emaczen: I've looked into Obj-C exceptions, but I don't think there's anything you can really do about them
3:06:07
fiddlerwoaroof
minion: memor for emaczen: see the recent-ish comments in #ccl from eschatologist
3:06:11
fiddlerwoaroof
minion: memo for emaczen: see the recent-ish comments in #ccl from eschatologist
4:34:19
Ukari
is there a test framework which could run assert asynchronously? like (test test-foo (bt:make-thread (lambda () (is (eq 1 1)))))
4:36:47
Ukari
because some of my test will run in another thread, and if the test framework support assert asyncly it will be more easy to write tests
4:41:40
pjb
Ukari: you see now why my stance on tests is that everyone should write their own test framework, instead of trying to use an existing one?
4:42:12
pjb
Ukari: the requirements on a test framework depend strongly on the kind of system you want to test.
4:42:49
pjb
Ukari: you could take an existing test framework, and add the required features to be able to run them in parallel in different threads.
4:44:23
pjb
I would suggest com.informatimago.common-lisp.cesarum.simple-test, which is simple, and you may be able to extend easily to support threads. ;-) patches welcome.
4:46:05
pillton
Ukari: There are other ways to solve this problem which don't require a new test framework.
7:35:50
didi
How do I break out of a recursive function without going through all the recursions? I wrote something like <https://paste.debian.net/hidden/430c13d2>. Is it too gross? I thought of using signals, but it sounded like too much. It looks like a continuation, but I have control of the scope, that is, I'm using the lexical scope.
7:37:13
no-defun-allowed
Safari asks me what client certificate to use, and the server will not accept them.
7:38:47
no-defun-allowed
Though, it'd probably be too complex for a FLET, and I'd move it into a DEFUN.
7:39:29
didi
no-defun-allowed: Yeah, mine is growing beyond a screen page, so I think I should break it.
8:59:46
schweers
when sbcl claims to have no more memory ... is there something I can do in that image to investigate? i.e. find out where all the memory went?
9:32:26
schweers
I’ve now got it running in SLIME, I’ll see what I can do when that point comes again. I guess it won’t be for another few hours though. So thanks for your tips, espectially about ROOM. I had completetly forgotten it.
10:04:37
makomo
fengshaun: yeah, go with PCL as a beginner. later on check out advanced books like On Lisp, Let Over Lambda, etc.
10:35:15
makomo
yup, purely aesthetic. you can use whatever symbol you want, as LOOP only checks the symbol's name when looking for "loop keywords"