[Openmcl-devel] ns-date initializers on OSX 10.8

Paul Krueger plkrueger at comcast.net
Sat Jan 5 12:31:35 PST 2013


For the record I'm using vanilla 10.8.2, not one of the newer pre-release osx versions. Although as I think about it, I wonder if it's possible that Xcode knows that I'm a developer and automatically downloaded a newer development version of the libraries? As I said in my followup, the basic constructor returns an NSDate, but others are (I now suppose) returning some sort of tagged object. I'll see what I can find to deal with tagged objects in the current CCL code (pointer to that welcomed) and I am a paid-up authorized developer, so I'll also go see what I can find on Apple's site that might help (pointers to their relevant docs are also appreciated). Between those, perhaps I can create a work-around of some sort. Suggestions are always appreciated and if there is anything I can do to help you guys figure this out, please let me know. I'm sort of dead-in-the-water until I figure out something.

On Jan 5, 2013, at 1:23 PM, Gary Byers <gb at clozure.com> wrote:

> As you may or may not recall, Apple invented tagging within the last year.
> 
> Most NSObjects are represented as an aligned pointer (the low N bits
> are 0, where N=4 IIRC) whose first word is an ObjC class or metaclass
> object; with 10.8, they started representing some kinds of NSNumber
> instances as immediate objects where the low nibble was some
> distinguished non-zero value (that meant "some kind of NSNumber instance)
> and the upper 60 bits or so contained some immediate value and possibly some
> other type info.  I'm fairly sure that I looked and found that as of 10.8 only
> one of the ~15 available values was used (for this NSNumber case.)
> 
> That (using "low tags" to represent immutable objects) is a reasonable
> thing to do; I somehow missed the memo where they announced that such a change
> was forthcoming but managed to get support for this change into CCL before the
> 10.8 release.  (Or maybe just a little after.)
> 
> Your followup message suggested that this may have just been some sort of artifact,
> but it's possible that Apple has decided that at least some kinds of NSDate could
> also benefit from an immediate representation.  (If so, the memo's late again.)
> 
> I don't see this as of 10.8.2.
> 
> 
> 
> 
> On Sat, 5 Jan 2013, Paul Krueger wrote:
> 
>> When I try to create ns:ns-date objects in CCL (1.9-dev-r15559M-trunk  (DarwinX8664)) while running on OSX 10.8 I get the following:
>> 
>> ? (#/init (#/alloc ns:ns-date))
>> #<A Foreign Pointer #x41B69891A426BEFD>      <=== Not recognized as an ns-date instance
>> ? (#/init (#/alloc ns:ns-object))
>> #<NS-OBJECT [uninitialized] (#x25EDA860)>
>> 
>> All ns:ns-date initializers also return macptrs that CCL doesn't recognize as instances of ns-date or any other type of ns-object.
>> 
>> If I pass a pointer created by any ns-date initializer to an interface object that is expecting an ns-date object, it seems to take it and display it correctly. I just can't interact with that object in Lisp. So for example if it is changed in the interface and I get it back, I can't tell what was changed.
>> 
>> Is this because I'm running on a 10.8 system with an objective-c bridge for 10.6 or is something else going on? This isn't new functionality since 10.6, but did something internally change that screwed things up? This is the first class where I've run into this problem.
>> 
>> Recommendations?
>> _______________________________________________
>> Openmcl-devel mailing list
>> Openmcl-devel at clozure.com
>> http://clozure.com/mailman/listinfo/openmcl-devel
>> 
>> 




More information about the Openmcl-devel mailing list