DEV Community

Yuki Kimoto - SPVM Author
Yuki Kimoto - SPVM Author

Posted on

First release of SPVM::Resource::RE2 Resourcing the regular expression library Google RE2

This week we made the first release of SPVM::Resource::RE2, a regular expression engine developed by Google RE2 is characterized by the fact that it does not return exponentially growing response times for the input of regular expressions themselves. This is an essential feature for implementations such as search engines that accept regular expressions as input.

Google RE runs on Linux, Mac, and Windows; the Google RE2 CI has not tested MinGW on Windows, but SPVM has tested this on Windows because it uses MinGW as a compiler on Windows. Windows. We have confirmed that Google RE2 works on the latest version of Windows Server 2022, and we have confirmed that it also works on Windows Server 2019.

The previous release of SPVM-Resource-Re2-V2022_06_01 did not pass the test on the latest version of Windows Server 2022, but SPVM::Resource::RE2 does. However, PVM::Resource::RE2 requires C++17.

The version of RE2 is 2023-02-01, which is almost the latest version of RE2 as a resource.

What are SPVM resources?

SPVM resources are a collection of C/C++(or GPGPU/cuda, etc) source and header files and compilation instructions. It is accompanied by documentation to set up the linker for user use. These are called SPVM resources.

Resources are independent of binding modules; SPVM::Resource::RE2 is a resource and the binding module is SPVM::Regex.

Thus, resources and bindings share roles independently. It took some time for this to be clearly recognized. It took a while for this to be clearly recognized, because such a mechanism did not exist in Perl, or if it did, it could not be found.

For example, Perl's Tk module contains the source code and headers for tcl/tk and its bindings. The resources and the bindings are tightly coupled.

The Compress::Raw::Zlib module contains zlib source code and headers, and its bindings. The resources and bindings are tightly coupled.

On the other hand, SPVM::Resource::RE2 contains source code and headers, but no bindings. The binding role is played by SPVM::Regex.

The usefulness of this approach will be further recognized as we create other resource modules, binding modules, and applications.

SPVM has finally included regular expression functionality

SPVM, through Google RE2, has gotten regular expression functionality. In order to create file path related modules such as SPVM::FindBin, SPVM::File::Spec, SPVM::File::Find, SPVM::File::Copy, SPVM::File::Path, etc., the regular expression feature must work on Linux, Mac and Windows. Windows.

SPVM::Resource::RE2 makes this possible.

Symbolic Link Enhancements

Next week, we would like to work on enhancing symbolic link functionality. Recent versions of Windows have made it possible to create symbolic links that are somewhat compatible with Linxu, albeit with some limitations. The next release of the latest version of Perl will allow this functionality. Therefore, SPVM will also implement this feature in SPVM::Sys.

The Go language already has this feature, and we plan to implement it in SPVM as well.

Translated with www.DeepL.com/Translator (free version)

Oldest comments (0)