DEV Community

Yuki Kimoto - SPVM Author
Yuki Kimoto - SPVM Author

Posted on

SPVM::Sys 0.26 is released - The Project for Python/NumPy Porting to Perl

SPVM::Sys 0.26 is released. You will see it in a few hours on CPAN. SPVM::Sys is a class for calling system calls such as File I/O, Socket, User/Group, Process. SPVM::Sys is developed on SPVM::Sys on Github.

For the Project for Python/NumPy Porting to Perl, SPVM::Sys is the basic class to read/write data from files.

Changes:

0.26 2022-11-12
  [Incompatible Changes]
    * The definitions of the following methods in the Sys::IO::Stat class are changed.
      [Before]
        method st_dev : int ();
        method st_ino : int ();
        method st_nlink : int ();
        method st_rdev : int ();
      [After]
        method st_dev : long ();
        method st_ino : long ();
        method st_nlink : long ();
        method st_rdev : long ();
   * The stat and lstat methods in the Sys::IO class are moved to the Sys::IO::Stat class.

  [New Features]
    * Added the following methods to the Sys::IO::Stat class.
      static method fstat_raw : int ($fd : int, $stat : Sys::IO::Stat);

      static method fstat : int ($fd : int, $stat : Sys::IO::Stat);

    * Added the following methods to the Sys::IO class.

      static method readline : mutable string ($stream : Sys::IO::FileStream);

      static method ftruncate : int ($fd : int, $length : long);

      static method ungetc : int ($c : int, $stream : Sys::IO::FileStream);

      static method fsync : int ($fd : int);

      static method freopen : Sys::IO::FileStream ($path : string, $mode : string, $stream : Sys::IO::FileStream);

      static method setvbuf : int ($stream : Sys::IO::FileStream, $buf : mutable string, $mode : int, $size : int);

      static method setbuf : void ($stream : Sys::IO::FileStream, $buf : mutable string);

      static method setbuffer : void ($stream : Sys::IO::FileStream, $buf : mutable string, $size : int);

      static method setlinebuf : void ($stream : Sys::IO::FileStream);

      static method stdin : Sys::IO::FileStream ()

      static method stdout : Sys::IO::FileStream ()

      static method stderr : Sys::IO::FileStream ()

    * Added the following methods to the Sys::IO::Constant class.

      static method STDIN_FILENO : int ();

      static method STDOUT_FILENO : int ();

      static method STDERR_FILENO : int ();

      static method BUFSIZ : int ();

      static method _IONBF : int ();

      static method _IOLBF : int ();

      static method _IOFBF : int ();

    * Added the offset argument to the following methods.
      [Before]
      static method read : int ($fd : int, $buf : mutable string, $count : int);
      static method write : int ($fd : int, $buf : string, $count : int);
      static method fread : int ($ptr : mutable string, $size : int, $nmemb : int, $stream : Sys::IO::FileStream);
      static method fgets : mutable string ($s : mutable string, $size : int, $stream : Sys::IO::FileStream);
      static method fwrite : int ($ptr : string, $size : int, $nmemb : int, $stream : Sys::IO::FileStream);

      [After]
      static method read : int ($fd : int, $buf : mutable string, $count : int, $buf_offset = 0 : int);
      static method write : int ($fd : int, $buf : string, $count : int, $buf_offset = 0 : int);
      static method fread : int ($ptr : mutable string, $size : int, $nmemb : int, $stream : Sys::IO::FileStream, $ptr_offset = 0 : int);
      static method fgets : mutable string ($s : mutable string, $size : int, $stream : Sys::IO::FileStream, $s_offset = 0 : int);
      static method fwrite : int ($ptr : string, $size : int, $nmemb : int, $stream : Sys::IO::FileStream, $ptr_offset = 0 : int);

Enter fullscreen mode Exit fullscreen mode

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.

Top comments (0)