SPVM - SPVM Language
SPVM is a statically typed programming language that has Perl-like syntax.
SPVM has not yet reached a stable release of version 1.0. For now, there is currently no policy to keep the backward compatibility.
Run a one liner using spvm command.
# Hello World! spvm -e 'say "Hello World!";';
Run a one liner with loading a class.
# foo,bar,baz spvm -M Fn -e 'say Fn->join(",", ["foo", "bar", "baz"]);'
Write a SPVM class to print "Hello World!" using the say operator.
# lib/SPVM/HelloWorld.spvm class HelloWorld { static method main : void () { say "Hello World!"; } }
Run the SPVM program using spvm command.
spvm -I lib/SPVM HelloWorld
Generate an executable file using spvmcc command.
spvmcc -B ~/.spvm_build -o ./hello --no-config -I lib/SPVM HelloWorld
Run the executable file.
./hello
Write an SPVM class.
# lib/SPVM/MyMath.spvm class MyMath { static method sum : int ($nums : int[]) { my $total = 0; for (my $i = 0; $i < @$nums; $i++) { $total += $nums->[$i]; } return $total; } }
Write a Perl program calling an SPVM method using exchange APIs.
# sum.pl use FindBin; use lib "$FindBin::Bin/lib"; use SPVM 'MyMath'; my $total = SPVM::MyMath->sum([3, 6, 8, 9]); print "$total\n";
Run the Perl program.
# Run perl sum.pl
Native threads and goroutines.
Executing SPVM programs
Generating an executable file
AOT(Ahead-of-time compilation) and JIT(Just-in-time compilation).
Static types, type inference and static analysis.
C and C++ binding and resource system for C and C++ libraries.
Perl binding for SPVM methods.
Perl-like syntax with class syntax.
High performance
SPVM Tutorial
All SPVM Documents
Language Specification
Lexical Tokenization
Syntax Parsing
Class Definition
Types
Statements
Operators
Exception Handling
Garbage Collection
System Setting
Native Classes
Native Class Config
Native APIs
Runtime Native APIs
Basic Type Native APIs
Class Variable Native APIs
Field Native APIs
Method Native APIs
Argument Native APIs
Type Native APIs
Compiler Native APIs
Class File Native APIs
String Buffer Native APIs
Allocatord Native APIs
Mutex Native APIs
Internal Native APIs
Resources
Environment Variables
Exchange APIs
Builder APIs
Builder Utility APIs
Config Information
spvm - Executing SPVM Programs
spvmcc - Generating Executable Files
spvmdist - Distributing SPVM Modules
Standard Modules
CPAN Modules
SPVM Test Cases
Binding C/C++ Libraries
Wiki
SPVM - Github
Yuki Kimoto <kimoto.yuki@gmail.com>
moti<motohiko.ave@gmail.com>
Mohammad S Anwar
akinomyoga
NAGAYASU Shinya
Reini Urban
chromatic
Kazutake Hiramatsu
Yasuaki Omokawa
Suman Khanal
Ryunosuke Murakami
Yoshiyuki Itoh
Tore Aursand
greengorcer
Copyright (c) 2023 Yuki Kimoto
MIT License
To install SPVM, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SPVM
CPAN shell
perl -MCPAN -e shell install SPVM
For more information on module installation, please visit the detailed CPAN module installation guide.