DEV Community

Yuki Kimoto - SPVM Author
Yuki Kimoto - SPVM Author

Posted on

SPVM 0.9662 is released - The Project for Python/NumPy Porting to Perl

SPVM 0.9662 is released. SPVM is an essential module for SPVM::Numpy.

Changes

0.9662 2022-11-15

  [Incompatible Changes]
    * The reader of the byte and short field return the int type.
      This is because public API is good to return the int type regardless of the internal field type byte/short.
    * The writer of the byte and short field recieve the int type.
      This is because public API is good to receive the int type regardless of the internal field type byte/short.
    * The reader of the byte and short class variable return the int type.
      This is because public API is good to return the int type regardless of the internal class variable type byte/short.
    * The writer of the byte and short class variable return the int type.
      This is because public API is good to return the int type regardless of the internal class variable type byte/short.
    * The definitions of the following method in the Fn class is changed. This is because all of the argument and return type is from byte/short to int.
      -  static method BYTE_MAX : byte ()
      +  static method BYTE_MAX : int ()
      -  static method BYTE_MIN : byte ()
      +  static method BYTE_MIN : int ()
      -  static method INT16_MAX : short ()
      +  static method INT16_MAX : int ()
      -  static method INT16_MIN : short ()
      +  static method INT16_MIN : int ()
      -  static method INT8_MAX : byte ()
      +  static method INT8_MAX : int ()
      -  static method INT8_MIN : byte ()
      +  static method INT8_MIN : int ()
      -  static method SHORT_MAX : short ()
      +  static method SHORT_MAX : int ()
      -  static method SHORT_MIN : short ()
      +  static method SHORT_MIN : int ()
      -  static method UBYTE_MAX : byte ()
      +  static method UBYTE_MAX : int ()
      -  static method UINT16_MAX : short ()
      +  static method UINT16_MAX : int ()
      -  static method UINT8_MAX : byte ()
      +  static method UINT8_MAX : int ()
      -  static method USHORT_MAX : short ()
      +  static method USHORT_MAX : int ()
      -  static method replace_chars : void ($string : mutable string, $from_ch : byte, $to_ch : byte)
      +  static method replace_chars : void ($string : mutable string, $from_ch : int, $to_ch : int)
      -  precompile static method replace_chars : void ($string : mutable string, $from_ch : byte, $to_ch : byte) {
      +  precompile static method replace_chars : void ($string : mutable string, $from_ch : int, $to_ch : int) {
    * The definitions of the following method in the Array class is changed. This is because all of the argument and return type is from byte/short to int.
      -  static method memset_byte : void ($array : byte[], $element : byte, $offset = 0 : int, $length = -1 : int)
      +  static method memset_byte : void ($array : byte[], $element : int, $offset = 0 : int, $length = -1 : int)
      -  static method memset_short : void ($array : short[], $element : short, $offset = 0 : int, $length = -1 : int)
      +  static method memset_short : void ($array : short[], $element : int, $offset = 0 : int, $length = -1 : int)      
      -  precompile static method memset_byte : void ($array : byte[], $element : byte, $offset = 0 : int, $length = -1 : int) {
      +  precompile static method memset_byte : void ($array : byte[], $element : int, $offset = 0 : int, $length = -1 : int) {      [After]
      -  precompile static method memset_short : void ($array : short[], $element : short, $offset = 0 : int, $length = -1 : int) {
      +  precompile static method memset_short : void ($array : short[], $element : int, $offset = 0 : int, $length = -1 : int) {
    * The definitions of the following method in the Byte class is changed. This is because all of the argument and return type is from byte/short to int.
      -  static method new : Byte ($value : byte)
      +  static method new : Byte ($value : int)      
    * The definition of the following method in the Short class is changed. This is because all of the argument and return type is from byte/short to int.
      -  static method new : Short ($value : short);
      +  static method new : Short ($value : int);        
    * The definitions of the following method in the ByteList class is changed. This is because all of the argument and return type is from byte/short to int.
      -  method get : byte ($index : int)
      +  method get : int ($index : int)      
      -  method insert : void ($index : int, $value : byte)
      +  method insert : void ($index : int, $value : int)      
      -  method pop : byte ()
      +  method pop : int ()
      -  method push : void ($value : byte)
      +  method push : void ($value : int)
      -  method remove : byte ($index : int)
      +  method remove : int ($index : int)
      -  method set : void ($index : int, $value : byte)
      +  method set : void ($index : int, $value : int)
      -  method shift : byte ()
      +  method shift : int ()
      -  method unshift : void ($value : byte)
      +  method unshift : void ($value : int)
    * The definitions of the following method in the ShortList class is changed. This is because all of the argument and return type is from byte/short to int.
      -  method get : byte ($index : int)
      +  method get : int ($index : int)      
      -  method insert : void ($index : int, $value : byte)
      +  method insert : void ($index : int, $value : int)      
      -  method pop : byte ()
      +  method pop : int ()
      -  method push : void ($value : byte)
      +  method push : void ($value : int)
      -  method remove : byte ($index : int)
      +  method remove : int ($index : int)
      -  method set : void ($index : int, $value : byte)
      +  method set : void ($index : int, $value : int)
      -  method shift : byte ()
      +  method shift : int ()
      -  method unshift : void ($value : byte)
      +  method unshift : void ($value : int)
    * The definitions of the following method in the Sort class is changed. This is because all of the argument and return type is from byte/short to int.
      -  static method sort_byte : void ($array : byte[], $comparator : Comparator::Byte, $offset = 0 : int, $length = -1 : int)
      +  static method sort_byte : void ($array : byte[], $comparator : Comparator::Int, $offset = 0 : int, $length = -1 : int)
      -  Sort->sort_byte($array, method : int ($a : byte, $b : byte) { return $a <=> $b; }, $offset, $length);
      +  Sort->sort_byte($array, method : int ($a : int, $b : int) { return $a <=> $b; }, $offset, $length);
      -  static method sort_short : void ($array : short[], $comparator : Comparator::Short, $offset = 0 : int, $length = -1 : int)
      +  static method sort_short : void ($array : short[], $comparator : Comparator::Int, $offset = 0 : int, $length = -1 : int)
      -  Sort->sort_short($array, method : int ($a : short, $b : short) { return $b <=> $a; }, $offset, $length);
      +  Sort->sort_short($array, method : int ($a : int, $b : int) { return $b <=> $a; }, $offset, $length);
      [After]
    * The definitions of the following method in the Hash class is changed. This is because all of the argument and return type is from byte/short to int.
      -  get_byte : byte ($name : string)
      +  get_byte : int ($name : string)
      -  get_short : short ($name : string)
      +  get_short : int ($name : string)
      -  set_byte : void ($name : string, $value : byte)
      +  set_byte : void ($name : string, $value : int)
      -  set_short : void ($name : string, $value : short)
      +  set_short : void ($name : string, $value : int)
    * The definitions of the following method in the StringBuffer class is changed. This is because all of the argument and return type is from byte/short to int.
      -  method push_char : void ($char : byte)
      +  method push_char : void ($char : int)
    * Removed the Comparator::Byte class. Use Comparator::Int instead.
    * Removed the Comparator::Short class. Use Comparator::Int instead.
  [Document Changes]
    * Renamed the conceptual name "Accessor Method" to "Accessor".
    * Renamed the conceptual name "Getting Method" to "Reader".
    * Renamed the conceptual name "Setting Method" to "Writer".
  [Internal Changes]
    * Renamed SPVM_OP_build_convert to SPVM_OP_build_type_cast.

Enter fullscreen mode Exit fullscreen mode

How to install SPVM::Numpy

How to install SPVM::Numpy.

cpanm SPVM::Numpy
Enter fullscreen mode Exit fullscreen mode
# Developper
cpanm SPVM;
git clone https://github.com/yuki-kimoto/SPVM-Numpy.git
Enter fullscreen mode Exit fullscreen mode

See also Installing SPVM::Numpy

What Is SPVM?

SPVM is a static typed language that can be used from Perl. SPVM is the essential part of the Python/numpy porting to Perl. If you haven't heard of Perl's SPVM. Please see also SPVM Language Specification.

How potential dose SPVM have?

Growth is expected in the fields of Bio Tech, AI/ML, Apple/iPhone/iPad Apps, Google/Android Apps, IoT Device, Connected Car, Smart Device, Smart Home, etc.

This is because SPVM can produce an executable file that supports cross platforms and make easy to calculate arrays and bind C/C++ and Nvidia/GPU/cuda.

SPVM Documents

SPVM Modules

This project really needs contributors, sponsors, investors.

This project really needs contributors. I am looking for contributors, sponsors, investors.

Oldest comments (0)