Ads

Thursday, March 31, 2011

Let over lambda saves the day (sbcl threads)

Messing with threads and sbcl/common lisp.


(loop for n from 1 to parallel-decision-num do
(format t "~&outsidethread~a" n)
(sleep 0.5)
(sb-thread:make-thread
(let ((m n))
(lambda ()
(sleep (random 5))
(format t "~&insidethread~a" m)
(sleep 2)))))


Remember to use a let so that the threads all have their own scope as you are spawning them. Also, join those mo-fos back up so that you don't cause horrible things.


(loop for thread in (sb-thread:list-all-threads)
do
(if (equal thread sb-thread:*current-thread*)
'()
(sb-thread:join-thread thread)))


Probably not the best way to do it, but it is *a* way.

Wednesday, March 30, 2011

M1911 Adoption Centennial

The M1911 was adopted on March 29, 1911.

To celebrate, I gathered my M1911(well, technically closer to the M1911A1 standard, but I digress) owning friends (friend).

Highlights of the celebration included "eyes closed" 1911 disassembly and reassembly.

My best times for eyes closed were: 41 seconds disassembly, 76 seconds reassembly.
Best times for eyes open was 19 seconds disassembly (stupid barrel bushing!) and 38 seconds reassembly.

Andy got 12 seconds disassembly with his eyes open, he basically picked it up and shook it and parts rained down. He was consistently faster at disassembly but slower with assembly. I think that my disregard for light scratches from the slide stop helped me there.

Went and got the patent for it, number 984519. I found something that shocked me, apparently the firearm originally had a magazine disconnect. Glad he came to his senses. I think one element of the longevity can be attributed to the nice trigger (ha, also that the plans are available and not patent encumbered like other newer designs).

Anyway, thanks JMB, PBUH.

Update: Thinking about the magazine disconnect, it *should* be possible to make one that does not affect trigger pull. I'll need to look at the hi-power and see why it increases trigger pull/gritty-ness. Anyone want to donate to the "Get me a hi-power" fund?

Tuesday, March 22, 2011

Just in: We interrupt this lack of posts for...

Just thought I would let people know how I am feeling. I have in my bloodstream:

Cetirizine Hydrochloride (Zyrtec)
mometasone furoate monohydrate (nasonex)
Diphenhydramine (Benadryl)
Acetaminophen, Dextromethorphan hydrobromide, phenylephrine (Alka-Seltzer Plus Day)

Reason?:
Pollen count soars (2248 grains per cubic meter of air) 89 is the max that can be called moderate, 1500 is the max high, and anything about that is very high.

Also might have a cold, which is why I was on the Alka-seltzer.

Blog posts coming soon (aren't they always?), I need to fix a computer to get some photos off of it.