September 2017 Archives

How to do Bit Operation Correctly in Perl? One Answer is SPVM.

How to do Bit Operation Correctly in Perl? One Answer is SPVM.

Perl don't have type system in Language because Perl is completly dynamic type language.

If you use SPVM, you can use byte, short, int, long, float, double type as same as Java.

my $num : int = 0x1234;

And you can do Bit Operation easily.

$num & 0x0F;

Perl Big Problem is numeric operation

Pe…

Easy C/C++ Binding using SPVM

I introduce Easy C/C++ Binding using SPVM . In Perl, C/C++ binding is very very hard work. If you use SPVM, the work become very easy.

If You don't yet know SPVM itself, See SPVM Document at first.

SPVM Module:

# lib/SPVM/MyMathNative.spvm
package MyMathNative {
  
  # Sub Declaration
  sub sum ($nums : int[]) : native int;
}

C Source File:

// lib/SPVM/MyMat…

SPVM Language Specification. I start to write it Today.

I start to write SPVM Language Specification.

SPVM Language Specification(Beta before 1.0)

SPVM array operation is 6x faster than Perl 5.26 now. If JIT is implemented, array operation maybe 20x faster than Perl 5.26. This is planed in one year.

SPVM provide you,

-You can write Fast culculation without XS
-You can bind C library without XS
-You can write C language inline without Inline::C

XS is very complex and difficu…

About Yuki Kimoto

user-pic I'm Perl Programmer. I LOVE Perl. I want to contribute Perl community and Perl users.