[cmucl-imp] Snapshot 2015-06
Raymond Toy
toy.raymond at gmail.com
Thu Jun 11 15:53:52 UTC 2015
>>>>> "Fare" == Far <Far> writes:
Fare> On Thu, Jun 11, 2015 at 2:40 AM, Carl Shapiro <carl.shapiro at gmail.com> wrote:
>> On Wed, Jun 10, 2015 at 11:09 PM, Faré <fahree at gmail.com> wrote:
>>>
>>> Lazy getenv, putenv — and if you want to get all of them, or to pass
>>> all of them, use an equal hash-table with strings as key, not an alist
>>> with keywords as keys.
>>
>> Thanks for the clarification.
>>
>> Is your issue with the search time? The libc getenv and putenv uses a
>> linear search with a linear time compare of strings. It is unlikely to be
>> faster than an a-list search.
>>
Fare> My issue is that ext:*environment-list* is an abstraction inversion.
Fare> Instead of providing a higher-level view on an existing API, it
Fare> reinvents a new low-level data structure that doesn't provide any
Fare> performance advantage (indeed, only slowdown) yet introduces a new
Fare> semantic gap (albeit small) between what was and what is, and only
Fare> gets in the way of a further API improvement.
My assumption is that it exists so that execve or whatever can be
called with a new environment that can be easily manipulated from
lisp.
Fare> But if you declare it the official way to access the environment in
Fare> cmucl, I'll revert to using it.
I will put back unix-getenv into the core. And I'll update the main
tarball to include the unix contrib.
--
Ray
More information about the cmucl-imp
mailing list