X-Git-Url: https://git.hcoop.net/clinton/website/src/unknownlamer.org.git/blobdiff_plain/5fac9f164e7f618649a8af09dd004faa662290b0..a6b655d948abcc28489bd1fc7974ebb8610f10c3:/Code.muse?ds=sidebyside diff --git a/Code.muse b/Code.muse index 5349455..0d8d775 100644 --- a/Code.muse +++ b/Code.muse @@ -42,14 +42,14 @@ fork. [[http://retes.hu/~mega/git/?p=clon.git;a=summary][Clon]] is a nice library for scheduling tasks within a Lisp image, but it used the SBCL timer extension. I wanted to run something using Clon -on [[http://trac.clozure.com/openmcl][Clozure CL]] and so I looked at the SBCL and found that, after a bit -of fairly straightforward editing, it was possible to write a portable -version for any compiler supporting [[http://common-lisp.net/project/bordeaux-threads/][Bordeaux Threads]]. The SBCL timers -internally use =sb-unix:setittimer=; Rather than using [[http://common-lisp.net/project/osicat/][Osicat]] to emulate -this I chose to rework the scheduling loop to run in a dedicated -thread that sleeps on a condition variable with a timeout. This seems -*cleaner* to me than using POSIX lib calls, but requires a threaded Lisp -to use. +on [[http://trac.clozure.com/openmcl][Clozure CL]] and so I looked at the SBCL source and found that, after +a bit of fairly straightforward editing, it was possible to write a +portable version for any compiler supporting [[http://common-lisp.net/project/bordeaux-threads/][Bordeaux Threads]]. The +SBCL timers internally use =sb-unix:setittimer=; Rather than using +[[http://common-lisp.net/project/osicat/][Osicat]] to emulate this I chose to rework the scheduling loop to run in +a dedicated thread that sleeps on a condition variable with a +timeout. This seems *cleaner* to me than using POSIX lib calls, but +requires a threaded Lisp. [[http://release.unknownlamer.org/trivial-timers/][Releases are available]] with the usual [[darcsweb::trivial-timers][darcs repo]]. Currently there is a native SBCL implementation and a portable implementation relying upon @@ -72,7 +72,7 @@ is fairly powerful. =dsmith= from =#guile= has a nicely featured bot written on top of Bobot++; if I find time I shall attempt to post the source. -There is now a [[darcsweb::bobot++][darcs repo]] available with a few minor changes. I am +There is now a [[darcsweb::bobot%2B%2B][darcs repo]] available with a few minor changes. I am sporadically working to make the internals of the bot fully threadsafe so that multithreaded Scheme extensions don't run into issues. I may potentially clean up the Scheme interface as well (as it was clearly