Terje Norderhaug | 13 Jul 18:08 2005

Incomplete Cocoa support in Java

Potentially relevant for LISP´s positioning vs Java on the Mac:

"Features added to Cocoa in Mac OS X versions later than 10.4 will not be added to the Cocoa-Java programming interface. Therefore, you should develop Cocoa applications using Objective-C to take advantage of existing and upcoming Cocoa features."

_______________________________________________
Info-mcl mailing list
Info-mcl@...
http://digitool.com/mailman/listinfo/info-mcl_digitool.com
Sean Sit | 24 Jul 07:26 2005
Picon

Question about porting to Mac OS X

Hi,
  I would like to port an OS 9 application to OS X. When I compile the 
source code using MCL 5.1 in OS X, i got the following error "Error: While 
expanding: (TRAPS:_PBOPENWDSYNC PB)
>        Can't find shared library entry for "PBOpenWDSync". Trap emulator 
>does not work OSX native"

below is the code that cause the error:

(defun cache-directory-info (directory)
  (rlet ((filename :str255)
         (fpb :cinfopbrec))
    (let* ((volid (volume-refnum (second (pathname-directory directory))))
           (dirid (%stack-iopb (pb np)
                    (%path-to-iopb directory pb)
                    #-powerpc(#_pbopenwd pb) #+powerpc(#_pbopenwdsync pb)
                    (prog1
                      (rref pb wdpbrec.iowddirid)
                      #-powerpc (#_pbclosewd pb) #+powerpc (#_pbclosewdsync 
pb)))))
      (setf (rref fpb cinfopbrec.ioVrefnum) volid)
      (setf (rref fpb cinfopbrec.ionameptr) filename)
      (loop for count from 1
            for res = (progn
                        (setf (rref fpb cinfopbrec.iodirid) dirid)
                        (setf (rref fpb cinfopbrec.iofdirindex) count)
                        #-powerpc (#_pbgetcatinfo fpb) #+powerpc 
(#_pbgetcatinfosync fpb))
            until (not (zerop res))
            do
            (unless (logbitp 4 (rref fpb cinfopbrec.ioflattrib))
              (let ((modificationtime (+ (ash (%get-unsigned-word fpb 
$ioFlMdDat) 16) (%get-unsigned-word fpb (+ 2 $ioFlMdDat))))
                    (fname (%get-string filename)))
                (setf (gethash (namestring (merge-pathnames fname 
directory)) *fast-probe-cache*) modificationtime)))))))

It seems that PBopenWDsync open working directory and other function calls 
that use the old mac file system are no longer supported in Carbon. Does 
anyone know how to fix this code?

Thanks in advance!
__
Sean

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/

_______________________________________________
Info-mcl mailing list
Info-mcl@...
http://digitool.com/mailman/listinfo/info-mcl_digitool.com

Espen Vestre | 26 Jul 20:43 2005
Picon

Re: Incomplete Cocoa support in Java


On 13. jul. 2005, at 18.08, Terje Norderhaug wrote:

> Potentially relevant for LISP´s positioning vs Java on the Mac:
>
> "Features added to Cocoa in Mac OS X versions later than 10.4 will  
> not be added to the Cocoa-Java programming interface. Therefore,  
> you should develop Cocoa applications using Objective-C to take  
> advantage of existing and upcoming Cocoa features."

Wow. Thanks for the link. At some point some observers even thought  
that Apple would scrap Obj-C for Java - and now this!

--

-- 
   (espen)

_______________________________________________
Info-mcl mailing list
Info-mcl@...
http://digitool.com/mailman/listinfo/info-mcl_digitool.com

Pascal Costanza | 28 Jul 16:27 2005
Picon

Re: Incomplete Cocoa support in Java


On 26 Jul 2005, at 19:43, Espen Vestre wrote:

> On 13. jul. 2005, at 18.08, Terje Norderhaug wrote:
>
>> Potentially relevant for LISP´s positioning vs Java on the Mac:
>>
>> "Features added to Cocoa in Mac OS X versions later than 10.4 will  
>> not be added to the Cocoa-Java programming interface. Therefore,  
>> you should develop Cocoa applications using Objective-C to take  
>> advantage of existing and upcoming Cocoa features."
>
> Wow. Thanks for the link. At some point some observers even thought  
> that Apple would scrap Obj-C for Java - and now this!

This is good news. Obviously, they have finally realized that Java is  
too restricted to get anything serious done. Some friends of mine are  
Objective-C developers and explained to me features of Objective-C  
that are impossible to achieve in Java, so I am not surprised...

Pascal

--
2nd European Lisp and Scheme Workshop
July 26 - Glasgow, Scotland - co-located with ECOOP 2005
http://lisp-ecoop05.bknr.net/

_______________________________________________
Info-mcl mailing list
Info-mcl@...
http://digitool.com/mailman/listinfo/info-mcl_digitool.com

Joshua Moody | 29 Jul 01:34 2005
Picon

smashed hash table error


I've encountered a strange error in MCL with respect to this form/ 
closure:

(let ((copy-htable (make-hash-table #+Ignore :rehash-size #+Ignore  
1.5)))
   (defmethod copy-top-level (ORIGINAL-THING)
     (clrhash COPY-HTABLE)
     (copy-one ORIGINAL-THING COPY-HTABLE)))

This is part of the library that my group uses.  The trouble is that  
the copy-htable is getting smashed by something - probably GC.  This  
error occurs after ~18 hrs of computation.  Has anyone else  
encountered anything remotely similar?

Thanks,

jjm

MCL Version 5.1b4
Mac OS 10.4.2  Dual G5 2.5 GHz.

_______________________________________________
Info-mcl mailing list
Info-mcl@...
http://digitool.com/mailman/listinfo/info-mcl_digitool.com

Takehiko Abe | 29 Jul 07:08 2005

Re: Incomplete Cocoa support in Java

Pascal Costanza wrote:

> >> Potentially relevant for LISP´s positioning vs Java on the Mac:
> >>
> >> "Features added to Cocoa in Mac OS X versions later than 10.4 will  
> >> not be added to the Cocoa-Java programming interface. Therefore,  
> >> you should develop Cocoa applications using Objective-C to take  
> >> advantage of existing and upcoming Cocoa features."
> >
> > Wow. Thanks for the link. At some point some observers even thought  
> > that Apple would scrap Obj-C for Java - and now this!
> 
> This is good news. 

Good news? It means Apple's going to introduce more eye candies.
It is a bad news.

> Obviously, they have finally realized that Java is  
> too restricted to get anything serious done.

Is it obvious? If Java were the primary language for Cocoa,
the reverse might have happend.

_______________________________________________
Info-mcl mailing list
Info-mcl@...
http://digitool.com/mailman/listinfo/info-mcl_digitool.com

Randall Blanchard | 29 Jul 15:28 2005
Picon
Picon

Re: smashed hash table error

It is possible that your hash-table has grown-too-much -- try a lower 
factor than 1.5!
On Jul 28, 2005, at 7:34 PM, Joshua Moody wrote:

>
> I've encountered a strange error in MCL with respect to this 
> form/closure:
>
> (let ((copy-htable (make-hash-table #+Ignore :rehash-size #+Ignore 
> 1.5)))
>   (defmethod copy-top-level (ORIGINAL-THING)
>     (clrhash COPY-HTABLE)
>     (copy-one ORIGINAL-THING COPY-HTABLE)))
>
> This is part of the library that my group uses.  The trouble is that 
> the copy-htable is getting smashed by something - probably GC.  This 
> error occurs after ~18 hrs of computation.  Has anyone else 
> encountered anything remotely similar?
>
> Thanks,
>
>
> jjm
>
> MCL Version 5.1b4
> Mac OS 10.4.2  Dual G5 2.5 GHz.
>
>
> _______________________________________________
> Info-mcl mailing list
> Info-mcl@...
> http://digitool.com/mailman/listinfo/info-mcl_digitool.com
>

_______________________________________________
Info-mcl mailing list
Info-mcl@...
http://digitool.com/mailman/listinfo/info-mcl_digitool.com

Pascal Costanza | 31 Jul 18:30 2005
Picon

Re: Incomplete Cocoa support in Java


On 29 Jul 2005, at 07:08, Takehiko Abe wrote:

> Pascal Costanza wrote:
>
>> Obviously, they have finally realized that Java is
>> too restricted to get anything serious done.
>
> Is it obvious? If Java were the primary language for Cocoa,
> the reverse might have happend.

Objective-C allows you to extend system or third-party classes with  
your own methods, and some other modifications by using a (relatively  
simple Smalltalk-style) metaobject protocol. In Java, these things  
are either much harder or simply impossible. This means that certain  
important programming idioms that are used in Objective-C / Cocoa can  
simply not be mapped to Java.

Pascal

--
"No amount of language design can _force_ a programmer to write clear  
programs. [...] The emphasis should not be on eliminating "bad"  
language constructs, but on discovering or inventing helpful ones." -  
Guy Steele and Gerald Sussman

_______________________________________________
Info-mcl mailing list
Info-mcl@...
http://digitool.com/mailman/listinfo/info-mcl_digitool.com

Alexander Repenning | 31 Jul 21:09 2005
Picon

Re: Incomplete Cocoa support in Java

the more general point being that it's often not a good idea to wrap up one OO lib in language 1 with another OO lib in a language 2. Switching Java from Carbon to Cocoa was a mistake resulting in the worlds slowest Java implementation (OS X). The same would be true for MCL if it were to try the same. Wrapping CLOS around    
Objective-C is conceptually as well as implementationally speaking a bad idea. 

alex

On Jul 31, 2005, at 10:30 AM, Pascal Costanza wrote:


On 29 Jul 2005, at 07:08, Takehiko Abe wrote:


Pascal Costanza wrote:


Obviously, they have finally realized that Java is
too restricted to get anything serious done.


Is it obvious? If Java were the primary language for Cocoa,
the reverse might have happend.


Objective-C allows you to extend system or third-party classes with your own methods, and some other modifications by using a (relatively simple Smalltalk-style) metaobject protocol. In Java, these things are either much harder or simply impossible. This means that certain important programming idioms that are used in Objective-C / Cocoa can simply not be mapped to Java.


Pascal

--
"No amount of language design can _force_ a programmer to write clear programs. [...] The emphasis should not be on eliminating "bad" language constructs, but on discovering or inventing helpful ones." - Guy Steele and Gerald Sussman



_______________________________________________
Info-mcl mailing list


Prof. Dr. Alexander Repenning

vCard: http://www.cs.colorado.edu/~ralex/AlexanderRepenning.vcf



_______________________________________________
Info-mcl mailing list
Info-mcl@...
http://digitool.com/mailman/listinfo/info-mcl_digitool.com

Gmane