Squeak and bluetooth

Davide Varvello d.varvello at quinary.com
Tue Jan 10 15:35:47 UTC 2006


Hi Torsen,

> Hi,
>
> Carbon is a C API whereas Cocoa is Objective C.

Right

> The Squeak VM is a C
> program so its natural to use Carbon.

Ok, but there are many posts on using squeak with cocoa (see http:// 
thread.gmane.org/gmane.comp.lang.smalltalk.squeak.general/34633) and  
I think if I can use cocoa libraries, probably the development of my  
little project will be easier.
By the way I've many problems to install the ObjectiveC-avi.70.mcz,  
it seems the ObjectiveCPlugin is missing. I'll investigate and post  
more info.
Thanks
  Davide

> Torsten
>
> On Mon, 9 Jan 2006, Davide Varvello wrote:
>
>> Thanks Bert,
>>  I'll keep an eye on the BlueS' high level API, but, please,  tell  
>> me more, what are the issues you see in using Cocoa instead of  
>> Carbon?
>> More opinions from other squeakers are welcome, of course.
>> TIA
>>  Davide
>>
>> ________________________________
>>
>> From: squeak-dev-bounces at lists.squeakfoundation.org on behalf of  
>> Bert Freudenberg
>> Sent: Mon 1/9/2006 10:29 AM
>> To: The general-purpose Squeak developers list
>> Subject: Re: Squeak and bluetooth
>>
>>
>>
>> Sure. AFAIK the BlueZ lib, which is the base for the Linux BlueS
>> implementation, is Linux-only, so you couldn't use it anyway.
>>
>> But the BlueS project consists of two parts. First, the high-level
>> BlueS API which should be very much platform-independent:
>>
>>         http://lisa.math.uni-magdeburg.de/~eldeh/squeak/blues/doc/
>> kernel_sample_session.txt
>>
>> and secondly, the low-level Linux implementation, wrapping the Linux
>> library:
>>
>>         http://lisa.math.uni-magdeburg.de/~eldeh/squeak/blues/doc/
>> linux_wrapper_sample_session.txt
>>
>> It would be very nice if your implementation would also conform to
>> the high-level interface, so we would have the two major platforms
>> covered ;-)
>>
>> As for your questions, yes, FFI is just fine for this. And I'd
>> recommend Carbon.
>>
>> For a bit of working recent Carbon FFI code have a look at
>>
>>         http://source.impara.de/Sophie.html
>>
>> The "Files-Locations" package uses FFI calls to locate system  
>> folders.
>>
>> - Bert -
>>
>> Am 08.01.2006 um 22:21 schrieb Davide Varvello:
>>
>>> Hi Bert,
>>>  Yes I read about BlueS, but I'd prefer to have a libraty ready to
>>> use and not to have to compile it. Therefore I'd like to use the
>>> IOBluetoothUI.framework as this example in ruby: http://tinyurl.com/
>>> 7ltl5
>>>
>>> Thanks
>>>  Davide
>>>
>>> ________________________________
>>>
>>> From: squeak-dev-bounces at lists.squeakfoundation.org on behalf of
>>> Bert Freudenberg
>>> Sent: Sun 1/8/2006 9:30 PM
>>> To: The general-purpose Squeak developers list
>>> Subject: Re: Squeak and bluetooth
>>>
>>>
>>>
>>>
>>> Am 08.01.2006 um 21:02 schrieb Davide Varvello:
>>>
>>>> Hi All,
>>>>  I'd like to interface Squeak, running on my mac, with a bluetooth
>>>> device, but I'm a bit confused on what kind of approach to choose.
>>>> First: FFI or plugins? I read FFI is quite slow compared to
>>>> plugins, but if I have to call an os library and the rate of calls
>>>> are not very frequent, probably FFI is a better choice (correct me
>>>> if I'm wrong)
>>>> Second: Carbon or Cocoa? As I read from the list and the swiki,
>>>> there is a bridge, from Avi, to connect to Cocoa, but I didn't
>>>> understand if I can use it from FFI.
>>>> Finally: I tried the examples of FFI in a 3.8 image for MacOSX (ex.
>>>> MacPixPatPtr, MacRect, ...), but the code use an obsolete module,
>>>> InterfaceLib, instead of Carbon.framework (see http://
>>>> minnow.cc.gatech.edu/squeak/5585), I changed the first with the
>>>> second and I had no errors, but nothing displayed.
>>>>  Suggestions?
>>>
>>> Are you aware of BlueS?
>>>
>>>         http://minnow.cc.gatech.edu/squeak/3321
>>>
>>> - Bert -
>>
>>
>>
>>
>>
>




More information about the Squeak-dev mailing list