I release SPVM.

SPVM

---------------------------------------------------------------------------



SPVM - Fast calculation, GC, static typing, VM with perlish syntax

SPVM(CPAN)



----------------------------------------------------------------------------

Do you know that there are many criticisms against Perl 5 on the Perl 11 blog?

Much of the criticism is about Perl's data structure and performance.

"Perl does not have a good data structure and implementation regarding numbers."

"Perl can not calculate a number using the stack of functions."

"Understanding about virtual machines is lacking in p5p."

I am an engineer who loves Perl 5 and p5p and is using Perl 5 to create a company service.

I want to contribute to reducing the weaknesses of Perl 5, by making modules.

I hope the SPVM will be of help.

Features

Do you need faster Perl? SPVM provides fast calculation to Perl.

Fast calculation - The Perl's biggest weak point is the calculation performance. SPVM provides fast calculations.

GC - You don't need to care about freeing memory

Static typing - Static typing for performance

VM - Byte codes are generated so that you can run them on SPVM language

Perlish syntax - SPVM syntax is very similar to Perl

Perl module - SPVM function can be called from Perl itself.

Example

use FindBin; use lib "$FindBin::Bin/lib"; use SPVM 'MyModule2'; my $total = SPVM::MyModule2::foo(SPVM::int(3), SPVM::int(5)); print $total->value . "

";

The following is SPVM module files. Extention is "spvm".

# lib/SPVM/MyModule1.spvm package MyModule1 { has x : int; has y : int; sub sum ($a : int, $b : int) : int { my $total = $a + $b; return $total; } } # lib/SPVM/MyModule2.spvm use MyModule1; package MyModule2 { sub foo ($a : int, $b : int) : int { my $total = ($a * $b) + MyModule1::sum(2, 4); return $total; } }