Manpage logo

SPVM - The SPVM Language

Name  Description  Usage  One Liner  Executing An SPVM Program  Generating An Executable File  Calling An SPVM Method from Perl  Features  Tutorial  Documents  Exchange APIs  Builder APIs  Commands  Modules  Examples  Wiki  Repository  Author  Core Developers  Contributors  Copyright & License 

Name

SPVM − The SPVM Language

Description

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 <https://github.com/yuki-kimoto/SPVM/wiki/Backward-Compatibility>.

Usage

One Liner

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"]);'

Executing An SPVM Program

Write a SPVM class named "hello.spvm" to print "Hello World!" using say operator.

# hello.spvm
say "Hello World!";

This class is an anon class and has "main" method that is an bootstrap method.

Run the SPVM program using spvm command.

spvm hello.spvm

Generating An Executable File

Generate an executable file using spvmcc command.

spvmcc −B ˜/.spvm_build −o ./hello −−no−config hello.spvm

Run the executable file.

./hello

Calling An SPVM Method from Perl

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

Features

•

Perl starndard functions and Perl standard modules.

•

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 <https://github.com/yuki-kimoto/SPVM/wiki/Benchmark>

Tutorial

•

SPVM Tutorial <https://github.com/yuki-kimoto/SPVM/wiki/Tutorial>

Documents

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

•

Exchange APIs

Builder APIs

•

Builder APIs

•

Builder Utility APIs

•

Config Builder

•

SPVM Script Information

Commands

•

spvm − Executing SPVM Programs

•

spvmcc − Generating Executable Files

•

spvmdist − Distributing SPVM Modules

•

spvmdeps − Class Dependencies Analyzer

Modules

•

Standard Modules

•

CPAN Modules <https://github.com/yuki-kimoto/SPVM/wiki/CPAN-Modules>

Examples

•

SPVM Test Cases <https://github.com/yuki-kimoto/SPVM/tree/doc/t/02_vm/lib/SPVM/TestCase>

•

Binding C/C++ Libraries <https://github.com/yuki-kimoto/SPVM/tree/doc/examples/native>

Wiki

•

Wiki <https://github.com/yuki-kimoto/SPVM/wiki>

Repository

SPVM − Github <https://github.com/yuki-kimoto/SPVM>

Author

Yuki Kimoto <[email protected]>

Core Developers

moti<[email protected]>

Contributors

•

Mohammad S Anwar

•

akinomyoga

•

NAGAYASU Shinya

•

Reini Urban

•

chromatic

•

Kazutake Hiramatsu

•

Yasuaki Omokawa

•

Suman Khanal

•

Ryunosuke Murakami <https://github.com/ryun0suke22>

•

Yoshiyuki Itoh <https://github.com/YoshiyukiItoh>

•

Tore Aursand <https://github.com/toreau>

•

greengorcer <https://github.com/greengorcer>

Copyright & License

Copyright (c) 2023 Yuki Kimoto

MIT License


Updated 2026-06-01 - jenkler.se | uex.se