[Cuis] About Squeak's FFI package ported to Cuis

H. Hirzel hannes.hirzel at gmail.com
Thu Jan 24 03:12:25 CST 2013


I put the tests into FFI-Tests.pck.st and updated the load script
https://github.com/hhzl/Cuis-FFI

Otherwise it would not load properly.

--hjh

On 1/24/13, H. Hirzel <hannes.hirzel at gmail.com> wrote:
> On 1/23/13, H. Hirzel <hannes.hirzel at gmail.com> wrote:
>> Hello Juan
>>
>> tank you for the explanations how to find out about the porting
>> status. This is fine. However I think it is easier for future porting
>> efforts to archive a copy of the original in the same repository.
>>
>> I now have created an FFI repository on github
>>
>>     https://github.com/hhzl/Cuis-FFI
>>
>>
>> As initial commit it contains a copy of what you have done:
>>
>>    https://github.com/bpieber/Cuis-StyledTextEditor/blob/master/FFI.pck
>>
>>
>> And in the branch
>>     https://github.com/hhzl/Cuis-FFI/tree/UpdateJanuary2013
>>
>> I am working on a update.
>>
>> I add the FFI-Tests category. I only did two minor fixes and it is
>> left with 3 tests failing.
>>
>> Details see
>>
>> https://github.com/hhzl/Cuis-FFI/blob/UpdateJanuary2013/notes/PortingNotes.md
>>
>> Actually only one thing prevents them from all passing.
>>
>> The <primitive: 'primitiveFFIIntegerAtPut' module:'SqueakFFIPrims'>
>> fails.
>>
>> Here I do not know how to continue.
>>
>> You write in another thread that you used it on MSWindows. What did
>> you use it for? Could you provide an example?
>
> Examples which run fine
>
> https://github.com/hhzl/Cuis-FFI/blob/UpdateJanuary2013/Win32Utils.st
>
>        Win32Utils getEnvironmentVariables
>
>
> https://github.com/hhzl/Cuis-FFI/blob/UpdateJanuary2013/Win32Shell.st
>
>        Win32Shell new shellExplore: 'c:\'
>
>
>
>> Kind regards
>>
>> Hannes Hirzel
>>
>> On 1/17/13, Juan Vuletich <juan at jvuletich.org> wrote:
>>> Hi Hannes,
>>>
>>> (below)
>>>
>>> H. Hirzel wrote:
>>>> On 1/16/13, Juan Vuletich <juan at jvuletich.org> wrote:
>>>>
>>>>> Hi Hannes,
>>>>>
>>>>> H. Hirzel wrote:
>>>>>
>>>>>> And I see that there is as well FFI
>>>>>>
>>>>>> https://github.com/bpieber/Cuis-StyledTextEditor/blob/master/FFI.pck
>>>>>>
>>>>>> Where did the code come from?
>>>>>> What is the status?
>>>>>>
>>>>>>
>>>> ..
>>>>
>>>>> It came from Squeak's FFI package. The status is usable. I used it
>>>>> only
>>>>> on Windows, but there should not be (big) problems to use it on other
>>>>> platforms.
>>>>>
>>>>> Cheers,
>>>>> Juan Vuletich
>>>>>
>>>>>
>>>>
>>>> Thank you, Juan,  for the clarification. Good to know that we have the
>>>> FFI (Foreign Function Interface) package in Cuis.
>>>>
>>>> Squeak has the following load script in the 'extending the system'
>>>> workspace
>>>>
>>>> (Installer repository: 'http://source.squeak.org/FFI')
>>>> 	install: 'FFI-Pools';
>>>> 	install: 'FFI-Kernel';
>>>> 	install: 'FFI-Tests';
>>>> 	install: 'FFI-Win32';
>>>> 	install: 'FFI-MacOS';
>>>> 	install: 'FFI-Unix'.
>>>>
>>>> So I assume you took the code from http://source.squeak.org/FFI?
>>>>
>>>> Your
>>>> https://github.com/bpieber/Cuis-StyledTextEditor/blob/master/FFI.pck
>>>> was changed 9 months ago.
>>>>
>>>> In that case probably everything released in 2011 was included but not
>>>> the updates by Torsten Bergmann, right?
>>>>
>>>> Just curious, do you remember, was it more or less a 1:1 file-in as it
>>>> does not touch GUI classes or did you have to do changes?
>>>>
>>>> --Hannes
>>>>
>>>>
>>>
>>> Querying the code is more reliable than querying my memory. Let me guide
>>> you.
>>>
>>> - In an updated Cuis Image, open a File List. Navigate to FFI.pck.
>>> Select it. Click on (code). This opens a browser on the package code
>>> without actually loading it.
>>> - Open a web browser on http://source.squeak.org/FFI . Download the last
>>> version of each Monticello package.
>>> - In Cuis, open a File List, navigate to the .mcz files. Select each
>>> one, and click on (code). Yes, Cuis can show you the contents of
>>> Monticello packages.
>>>
>>> Now it is rather easy to see that FFI.pck includes the stuff in
>>> FFI-Kernel and FFI-Pools. No platform specific stuff is included.
>>>
>>> So, you think that the Cuis package doesn't include some newer cool
>>> updates. (I haven't been following  Torsten's work.) Ok. Let's see. Now
>>> do install the FFI.pck. Select FFI-Kernel.mcz. This time select
>>> contents. A browser that shows a list of methods opens. Now select any
>>> method. Mhh. Well, the package uses the Cr line separators, not Lf as in
>>> Cuis. No big deal. Click on (linePrettyDifs). Now line separators and
>>> formatting are not an issue when comparing code. Click (deselectAll) Now
>>> do 'select methods equivalent to current' (via right click menu on the
>>> methods list) and 'remove selected methods'.
>>>
>>> Now you can compare the differences, see what changes were needed for
>>> Cuis, see what has been changed recently in the Squeak package, etc.
>>>
>>> Cheers,
>>> Juan Vuletich
>>>
>>> _______________________________________________
>>> Cuis mailing list
>>> Cuis at jvuletich.org
>>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>>>
>>
>




More information about the Cuis mailing list