Some ByteArray methods in FFI and Cuis base image

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
bpi
Reply | Threaded
Open this post in threaded view
|

Some ByteArray methods in FFI and Cuis base image

bpi
Hi Juan,

When loading STE I am asked for author initials. I tracked it down to loading FFI. There is a method category named FFI in ByteArray in the base Cuis4.2-1788.image. When you load FFI those method get moved to the FFI package. A ChangeSet for the base image is created.

However, none of the methods seems to be used in the base image. My feeling is, that they should just be removed. What do you think?

Cheers,
Bernhard
_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Some ByteArray methods in FFI and Cuis base image

KenDickey
I have not yet done much investigation, but have taken a brief run at getting Crypto-NaCl (from Squeak/Pharo) up on Cuis.

This is my first use of the FFI.

Feature require: 'FFI'.
works great and the updated NaCl tests pass, but three tests from the (old) FFI unit test suite fail:
        FFIPluginTests>>#TestPoint2
        FFIPluginTests>>#TestPoint4
        FFIPluginTests>>#TestPointers

All by primitive failed:
        ByteArray>>integerAt:put:size:signed

This is using the latest Linux CogVM.

Any suggestions?  Do I need an updated FFI test suite?  

Thanks much!
--
Ken [dot] Dickey [at] whidbey [dot] com

VVVV==============Cog Output============VVVV
>>> uname -a
Linux clearly 3.9.11 #1 SMP Sat Jul 27 19:40:54 GMT-8 2013 i686 i686 i386 GNU/Linux
>>> my-applications/bin/squeak Cuis-4.2/Cuis-Smalltalk-Dev/Crypto-1788.image
warning, processHasThreadId flag is unset; cannot function as a threaded VM if so.
warning: VM parameter 48 indicates Process doesn't have threadId; VM will not thread
warning: VM parameter 48 indicates Process doesn't have threadId; VM will not thread
warning: VM parameter 48 indicates Process doesn't have threadId; VM will not thread
warning: VM parameter 48 indicates Process doesn't have threadId; VM will not thread
warning: VM parameter 48 indicates Process doesn't have threadId; VM will not thread
warning: VM parameter 48 indicates Process doesn't have threadId; VM will not thread
warning: VM parameter 48 indicates Process doesn't have threadId; VM will not thread
warning: VM parameter 48 indicates Process doesn't have threadId; VM will not thread
warning: VM parameter 48 indicates Process doesn't have threadId; VM will not thread
warning: VM parameter 48 indicates Process doesn't have threadId; VM will not thread
4 characters came in as
c1 = A (41)
c2 = A (41)
c3 = A (41)
c4 =  (1)
The two floats are 41.000000 and 1.000000
The two floats are 65.000000 and 65.000000
4 ints came in as
i1 = 65 (41)
i2 = 65 (41)
i3 = 65 (41)
i4 = 1 (1)
Hello World!
4 shorts came in as
s1 = 65 (41)
s2 = 65 (41)
s3 = 65 (41)
s4 = 1 (1)
4 characters came in as
c1 = A (41)
c2 = A (41)
c3 = A (41)
c4 =  (1)
The two floats are 65.000000 and 65.000000
The two floats are 65.000000 and 65.000000
4 ints came in as
i1 = 65 (41)
i2 = 65 (41)
i3 = 65 (41)
i4 = 1 (1)
Hello World!
4 shorts came in as
s1 = 65 (41)
s2 = 65 (41)
s3 = 65 (41)
s4 = 1 (1)
4 characters came in as
c1 = A (41)
c2 = A (41)
c3 = A (41)
c4 =  (1)
The two floats are 65.000000 and 65.000000
The two floats are 65.000000 and 65.000000
4 ints came in as
i1 = 65 (41)
i2 = 65 (41)
i3 = 65 (41)
i4 = 1 (1)
Hello World!
4 ints came in as
i1 = -1191112957 (b9010f03)
i2 = -1191112957 (b9010f03)
i3 = -1191112957 (b9010f03)
i4 = -1191112957 (b9010f03)
==================== E O F ====================


_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
-KenD
bpi
Reply | Threaded
Open this post in threaded view
|

Re: Some ByteArray methods in FFI and Cuis base image

bpi
Hi Ken,

Which FFI do you use? The one from the StyledTextEditor or hhzl/Cuis-FFI?

Cheers,
Bernhard

Am 10.08.2013 um 17:40 schrieb Ken Dickey:

> I have not yet done much investigation, but have taken a brief run at getting Crypto-NaCl (from Squeak/Pharo) up on Cuis.
>
> This is my first use of the FFI.
>
> Feature require: 'FFI'.
> works great and the updated NaCl tests pass, but three tests from the (old) FFI unit test suite fail:
> FFIPluginTests>>#TestPoint2
> FFIPluginTests>>#TestPoint4
> FFIPluginTests>>#TestPointers
>
> All by primitive failed:
> ByteArray>>integerAt:put:size:signed
>
> This is using the latest Linux CogVM.
>
> Any suggestions?  Do I need an updated FFI test suite?  
>
> Thanks much!
> --
> Ken [dot] Dickey [at] whidbey [dot] com
>
> VVVV==============Cog Output============VVVV
>>>> uname -a
> Linux clearly 3.9.11 #1 SMP Sat Jul 27 19:40:54 GMT-8 2013 i686 i686 i386 GNU/Linux
>>>> my-applications/bin/squeak Cuis-4.2/Cuis-Smalltalk-Dev/Crypto-1788.image
> warning, processHasThreadId flag is unset; cannot function as a threaded VM if so.
> warning: VM parameter 48 indicates Process doesn't have threadId; VM will not thread
> warning: VM parameter 48 indicates Process doesn't have threadId; VM will not thread
> warning: VM parameter 48 indicates Process doesn't have threadId; VM will not thread
> warning: VM parameter 48 indicates Process doesn't have threadId; VM will not thread
> warning: VM parameter 48 indicates Process doesn't have threadId; VM will not thread
> warning: VM parameter 48 indicates Process doesn't have threadId; VM will not thread
> warning: VM parameter 48 indicates Process doesn't have threadId; VM will not thread
> warning: VM parameter 48 indicates Process doesn't have threadId; VM will not thread
> warning: VM parameter 48 indicates Process doesn't have threadId; VM will not thread
> warning: VM parameter 48 indicates Process doesn't have threadId; VM will not thread
> 4 characters came in as
> c1 = A (41)
> c2 = A (41)
> c3 = A (41)
> c4 =  (1)
> The two floats are 41.000000 and 1.000000
> The two floats are 65.000000 and 65.000000
> 4 ints came in as
> i1 = 65 (41)
> i2 = 65 (41)
> i3 = 65 (41)
> i4 = 1 (1)
> Hello World!
> 4 shorts came in as
> s1 = 65 (41)
> s2 = 65 (41)
> s3 = 65 (41)
> s4 = 1 (1)
> 4 characters came in as
> c1 = A (41)
> c2 = A (41)
> c3 = A (41)
> c4 =  (1)
> The two floats are 65.000000 and 65.000000
> The two floats are 65.000000 and 65.000000
> 4 ints came in as
> i1 = 65 (41)
> i2 = 65 (41)
> i3 = 65 (41)
> i4 = 1 (1)
> Hello World!
> 4 shorts came in as
> s1 = 65 (41)
> s2 = 65 (41)
> s3 = 65 (41)
> s4 = 1 (1)
> 4 characters came in as
> c1 = A (41)
> c2 = A (41)
> c3 = A (41)
> c4 =  (1)
> The two floats are 65.000000 and 65.000000
> The two floats are 65.000000 and 65.000000
> 4 ints came in as
> i1 = 65 (41)
> i2 = 65 (41)
> i3 = 65 (41)
> i4 = 1 (1)
> Hello World!
> 4 ints came in as
> i1 = -1191112957 (b9010f03)
> i2 = -1191112957 (b9010f03)
> i3 = -1191112957 (b9010f03)
> i4 = -1191112957 (b9010f03)
> ==================== E O F ====================
>
>
> _______________________________________________
> Cuis mailing list
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org


_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Some ByteArray methods in FFI and Cuis base image

KenDickey
On Sat, 10 Aug 2013 18:38:11 +0200
Bernhard Pieber <[hidden email]> wrote:

> Hi Ken,
>
> Which FFI do you use? The one from the StyledTextEditor or hhzl/Cuis-FFI?

Feature require: 'FFI'.

  naturally autoloads the from the Cuis-Smalltalk-StyledTextEditor sibling directory.

The unit test suite was from hhzl/Cuis-FFI, so there may be a mismatch.

Given the high expected usage level, I recommend moving the FFI package from Cuis-Smalltalk-StyledTextEditor into Cuis-Smalltalk-Dev/Packages.

--
Ken [dot] Dickey [at] whidbey [dot] com

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
-KenD
Reply | Threaded
Open this post in threaded view
|

Re: Some ByteArray methods in FFI and Cuis base image

KenDickey
> On Sat, 10 Aug 2013 18:38:11 +0200
> Bernhard Pieber <[hidden email]> wrote:
>
> > Hi Ken,
> >
> > Which FFI do you use? The one from the StyledTextEditor or hhzl/Cuis-FFI?

> ..from the Cuis-Smalltalk-StyledTextEditor sibling directory.

I tried the hhzl/Cuis-FFI package but there were a lot of failures on Linux, both from the FFI unit tests and the NaCl unit tests.

I have not looked at FFI differences.

--
Ken [dot] Dickey [at] whidbey [dot] com

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
-KenD
bpi
Reply | Threaded
Open this post in threaded view
|

Re: Some ByteArray methods in FFI and Cuis base image

bpi
In reply to this post by KenDickey
Am 11.08.2013 um 00:54 schrieb Ken Dickey <[hidden email]>:
> Given the high expected usage level, I recommend moving the FFI package from Cuis-Smalltalk-StyledTextEditor into Cuis-Smalltalk-Dev/Packages.
I think that is a great idea.

Cheers,
Bernhard
_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Some ByteArray methods in FFI and Cuis base image

Hannes Hirzel
On 8/11/13, Bernhard Pieber <[hidden email]> wrote:
> Am 11.08.2013 um 00:54 schrieb Ken Dickey <[hidden email]>:
>> Given the high expected usage level, I recommend moving the FFI package
>> from Cuis-Smalltalk-StyledTextEditor into Cuis-Smalltalk-Dev/Packages.
> I think that is a great idea.

+1


> Cheers,
> Bernhard
> _______________________________________________
> Cuis mailing list
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org