chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] using mmap files as strings?


From: Kon Lovett
Subject: Re: [Chicken-users] using mmap files as strings?
Date: Wed, 27 Oct 2010 09:53:56 -0700


On Oct 27, 2010, at 9:45 AM, Jörg F. Wittenberger wrote:

<snip>

Not completely. Chicken library code uses sys namespace routines &
cached bindings for many string operations. Hooking the Chicken
string
representation in a routine by routine fashion will probably be
brittle.


I recently noticed that several of the ##sys# prefixes have been
eliminated recently (elsewhere in the code).

?.


Also I must ask here: do those namespaces have any special effect
besides a new symbol table entry?

From the standpoint of replacing a global binding, no.

 If not (and that's what my
observations indicate) it should be possible to just overwrite the
bindings.  At worst it might be a case of making sure the overwrite
happens early enough, at least before the caching.

That would need to be very early indeed:

(define string-operation
  (let ((strop1 strop1)
        (strop2 strop2) )
    ... code using stropN ... ) )

is a very common idiom.


...or early enough with some help by our friendly chicken.

I mean: some Scheme compiler(s) allow call/cc only with a command line
switch.  Why should chicken not get yet another one, enabling shared
substrings (which would mean to use half way replaced string handling).
I would contribute on that one.

Requires changes to chicken.h & runtime.c plus probably there are some assumptions about memory layout scattered about.



<snip>

Best Wishes,
Kon





reply via email to

[Prev in Thread] Current Thread [Next in Thread]