[Openmcl-devel] Initial bindings
ron at flownet.com
Wed Oct 6 17:09:44 UTC 2010
On Oct 6, 2010, at 2:06 AM, Gary Byers wrote:
> On Wed, 6 Oct 2010, Ron Garret wrote:
>> This is unbelievably frustrating. The default initial binding of ccl::*print-string-length* is 1000:
> No, it isn't (at least not exactly). The default value is the static,
> global value of CCL:*PRINT-STRING-LENGTH*, which is set to NIL when
> the image is built.
Ah. So it is. So why do I get 1000 in the IDE?
> In many cases, that behavior's useful: it's more useful when the initial value
> is some sort of stateful/shareable data structure (e.g., a stream.) It's less
> useful when the default initial value is a constant.
> It's ordinarily hard to change those static/global bindings from a
> thread that establishes dynamic bindings for those variables, and
> PROCESS-RUN-FUNCTION establishes such bindings. The initial thread
> isn't created by PROCESS-RUN-FUNCTION, and therefore doing:
> (setq ccl:*print-string-length* 1000)
> in the initial thread - unless that occurs within the extent of a dynamic
> binding of that variable in that thread - will modify the static value.
> The IDE's event loop runs in the initial thread; it should really run with
> standard thread-specific bindings in effect, to keep a random SETQ like
> the one above from modifying global state.
As far as I know I am not setting ccl:*print-string-length* to 1000. Does the IDE build process set it somewhere?
>> ;;; #<PROCESS foo(8) [Reset] #x302000DB1D0D> requires access to Shared Terminal Input
>> ;;; Type (:y 8) to yield control to this thread.
>> As an aside, following the instructions and typing (:y 8) in both the altconsole and the listener has no effect.
> One general workaround for this problem is to avoid it completely.
> See <http://trac.clozure.com/ccl/wiki/ReleaseNotes/Trunk>
> (That wouldn't have helped in this case: the thread's getting an error before
> establishing any dynamic thread-local bindings, including bindings of things
> like *TERMINAL-IO*.)
That's a handy-dandy feature! Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Openmcl-devel