Skip to content

Releases: fglock/PerlOnJava

v3.0.0: Performance Boost, New Modules, and Streamlined Configuration

26 Feb 18:07
Compare
Choose a tag to compare

v3.0.0: Performance Boost, New Modules, and Streamlined Configuration

This release enhances PerlOnJava with significant performance optimizations, expanded module support, and improved configuration management, making Perl on the JVM faster and more efficient.


Highlights

1. Faster Start-up with On-Demand Code Generation

Code generation is now executed on demand, significantly reducing module loading time and improving overall performance.

2. Optimized Memory Usage

Scalar variables now use int instead of enum, lowering memory overhead and improving efficiency.

3. Improved Invocation Speed

Switched to JVM MethodHandle instead of Method, enabling faster execution of dynamically generated code.

4. Expanded Module Support

Added Time::HiRes and Benchmark modules, providing high-resolution timing and benchmarking capabilities for performance-critical applications.

5. Enhanced Regular Expressions

Introduced the /ee regex modifier, allowing double evaluation of replacement expressions for advanced text processing.

6. Configuration and Dependency Management

  • Added a --upgrade option to Configure.pl, making it easier to upgrade dependencies seamlessly.
  • Introduced a Dockerfile for simplified containerized deployment.

7. Relaxed Strictness for Compatibility

PerlOnJava now supports no strict 'vars' and no strict 'subs', improving compatibility with legacy code and dynamic constructs.


All Changes

Performance Enhancements:

  • Execute code generation on demand for faster module loading.
  • Use int instead of enum to reduce scalar variable memory overhead.
  • Utilize JVM MethodHandle for more efficient invocation of generated code.

New Features:

  • Added Time::HiRes and Benchmark modules.
  • Added the /ee regex modifier for advanced text transformation.
  • Allowed no strict 'vars' and no strict 'subs' for improved script compatibility.

Configuration and Deployment:

  • Introduced a --upgrade option in Configure.pl to update dependencies.
  • Added a Dockerfile for container-based execution.

This release refines the performance and usability of PerlOnJava, making it a more powerful and flexible Perl distribution for the JVM ecosystem.

Explore the project: [GitHub](https://github.com/fglock/PerlOnJava)\
Try the new Docker support! Check out the included Dockerfile for easy deployment.

v2.3.0: Enhanced Syntax, Regex, and New Modules

04 Feb 16:56
Compare
Choose a tag to compare

v2.3.0: Modern Perl Features, Expanded Modules, and Developer Tools

This release delivers substantial enhancements to PerlOnJava, introducing advanced language features, powerful regex capabilities, and tools to simplify module development and command-line usage.


Highlights

1. New Modules for Data Handling and Unicode:

Added YAML, YAML::PP, Text::Balanced, and Unicode::Normalize modules, enabling structured data serialization, text parsing, and Unicode processing.

2. Subroutine Signatures and class Keyword:

Support for subroutine signatures (sub foo ($x, $y) { ... }) and the experimental class keyword, modernizing Perl’s syntax for clearer code structure.

3. Advanced Regex Engine:

Added named capture groups ((?'name'...)), Unicode property support (\p{...}), possessive quantifiers (*+, ++), atomic groups ((?>...)), and modifiers (/p, /c, /n).

4. Wrapper Scripts for Seamless Execution:

Introducing jperl and jperl.bat scripts to simplify running Perl scripts on the JVM.

5. Operator and Overload Improvements:

Chained operators, stacked file tests (-f -r $file), and new overload methods ("", 0+, bool) for custom object behavior.


All Changes

New Features:

  • Syntax Enhancements:

    • Subroutine signatures (signature feature).
    • class keyword for experimental OOP.
    • Chained comparison operators (e.g., 1 < $x < 10).
    • Stacked file test operators (e.g., -f -r $file).
    • Here documents (<< and <<~ for indented text).
    • module_true feature for module boolean handling.
  • Regular Expressions:

    • Modifiers: /p (preserve match data), /c (continue match), /n (non-capturing groups).
    • Named capture groups (?'name'...) and backreferences \k<name>, \g{name}.
    • Unicode properties (\p{...}, \P{...}) and relative backreferences (\g{-n}).
    • Possessive quantifiers (*+, ++, ?+, {n,m}+).
    • Atomic groups ((?>...)) and (?^ to clear modifiers.
  • Overloading:

    • Added "" (stringify), 0+ (numerify), bool, fallback, and nomethod handlers.

New Modules:

  • YAML and YAML::PP for YAML data serialization.
  • Text::Balanced for extracting delimited text structures.
  • Unicode::Normalize for Unicode normalization forms.

Command-Line Improvements:

  • Added jperl and jperl.bat wrapper scripts for streamlined execution.

Configuration and Documentation:

  • Updated project description to "A Perl Distribution for the JVM" in README.md.
  • Added docs/PORTING_MODULES.md guide for porting Perl modules to the JVM.

Library Upgrades:

  • Updated Maven and Gradle dependencies to their latest versions.

This release empowers developers with cutting-edge Perl syntax, robust regex tools, and expanded module support, further bridging Perl’s flexibility with the JVM ecosystem.

Explore the project: GitHub
Porting Modules? Check the new PORTING_MODULES.md guide!

v2.2.0: More modules and features

06 Jan 18:15
Compare
Choose a tag to compare

v2.2.0: Core Modules, DBI Support, and Extended Features

This release marks a significant step forward with new modules, enhanced loop functionality, and tools to streamline configuration and documentation.


Highlights

1. Upgraded Perl Version:

Aligned with Perl v5.40.0, bringing the latest features and compatibility improvements to PerlOnJava.

2. for Loop Enhancements:

The for loop now supports iterating over multiple values simultaneously, and loop variables are aliased for more expressive code.

3. DBI Module with JDBC Support:

Database interaction is now possible via the DBI module, leveraging JDBC drivers for flexible database connectivity.

4. Built-in Methods and Operators:

Added Perl builtin methods such as inf, nan, weaken, unweaken, is_weak, blessed, refaddr, reftype, ceil, floor, trim, and more. Also introduced the low-precedence XOR operator ^^.

5. Configuration and Documentation Tools:

The new Configure.pl script simplifies setting compiler options and adding JDBC drivers. Documentation updates include links to JVM-specific resources and a new SUPPORT.md file.


All Changes

New Features:

  • Perl v5.40.0 compatibility.
  • Enhanced for loop with multi-value iteration and aliasing.
  • Added built-in methods: inf, nan, weaken, unweaken, is_weak, blessed, refaddr, reftype, created_as_string, created_as_number, stringify, ceil, floor, indexed, trim, is_tainted.
  • Added XOR operator ^^.

New Modules:

  • DBI with JDBC support.
  • URI::Escape.

New Command-Line Features:

  • Added -S switch for enhanced script handling.

Configuration and Documentation:

  • Introduced Configure.pl for compiler options and JDBC drivers.
  • Updated README with Perl on JVM resources.
  • Added SUPPORT.md for detailed support information.

This update expands the capabilities of PerlOnJava, delivering a more robust and versatile Perl experience on the JVM.

Explore the project: GitHub

v2.1.0: More modules and optimization

05 Dec 18:38
Compare
Choose a tag to compare

v2.1.0: More Modules, Improved Performance, and New Features

This release introduces new modules, optimizations, and extended feature support, further enhancing Perl's capabilities on the JVM.


Highlights

1. Getopt::Long Support:

The Getopt::Long module now runs seamlessly, requiring only a minor one-line change to avoid the "indirect object" syntax.

2. Efficient JSON Processing:

The JSON module leverages fastjson2 for fast encoding/decoding, while maintaining the familiar JSON.pm API from Perl.

3. Faster Output Processing:

Output to STDOUT and STDERR now occurs in a separate thread, reducing the main application's workload. This optimization delivers up to 2x faster terminal output compared to the previous version.

All Changes

1. New Modules:

  • Getopt::Long
  • JSON

2. Performance Enhancements:

  • Optimized print for STDOUT/STDERR using multithreading.

3. New Features:

  • Added the subs pragma.
  • Added regex special variable $+.
  • Added command-line switches: -v, -V.
  • Added file test operators: -R, -W, -X, -O, -t.
  • Added feature flag: evalbytes.
  • Added support for CORE::GLOBAL and overriding core functions.
  • Added support for hexadecimal floating-point numbers.

4. Internal Improvements:

  • Introduced a new io module to support additional handle types.

This update represents another significant step in bringing a robust, efficient Perl implementation to the JVM.

v2.0.0: Towards a Complete Perl Port on the JVM

28 Nov 17:05
Compare
Choose a tag to compare

v2.0.0: A Major Leap Towards a Complete Perl Port on the JVM 🚀

With v2.0.0, we mark a significant milestone in the journey of implementing Perl on the JVM. This release focuses on expanding core module support, introducing advanced language features, and bridging compatibility gaps with the native Perl ecosystem.

New Features

Core Perl Modules Added (Unmodified):
    File::Basename, File::Find, Data::Dumper, Term::ANSIColor, Time::Local, HTTP::Date, HTTP::CookieJar.

Additional Module Support:
    Cwd, File::Spec, File::Spec::Functions, HTTP::Tiny.

Feature Pragma (use feature): Implemented support for:
    fc, say, current_sub, isa, state, try, bitwise, postderef.

Hash-like Stash Access:
    $namespace::{entry} to access the symbol table directly as a hash.

Stash Constants:
    Define constants in the stash: $constant::{_CAN_PCS} = \$const;.

Enhanced Subroutine Handling:
    Check existence: exists &sub.
    Check definition: defined &sub.

Pragma Improvements:
    builtin: Added true, false, is_bool.
    re: Added is_regexp.
    vars: Introduced support for the vars pragma.

Class and Method Resolution:
    Added support for SUPER::method.

Default Subroutine Handling:
    Implemented AUTOLOAD.

Operators:
    Added stat, lstat (with some fields returning undef where JVM limitations apply).
    Directory operators like opendir, readdir, and closedir.

Regex Enhancements:
    Added patterns: [[:ascii:]], [[:print:]], (?#comment).
    Introduced the /xx regex modifier.

Work in Progress

While this release significantly narrows the gap between Perl and its JVM port, several features are still under development:

lexical_subs feature.
Network-related operators: socket, bind, etc.
Compatibility with use VERSION and require VERSION.
Lexical scoping for warnings, features, strictness, and UTF-8 source code.
Operators: truncate, seek.
Preprocessor directives: # line.
Legacy support: use subs.
Modules: Getopt::Long, JSON.
Subroutine prototypes.

Looking Ahead

Version 2.0.0 is not just a feature-rich release but a clear statement of progress towards a full-featured, robust Perl runtime on the JVM. With an extensive library of core modules and enhanced language capabilities, we are closer than ever to making the JVM a viable and performant platform for Perl development.

Compile-time Features

13 Nov 17:34
Compare
Choose a tag to compare
  • v1.11.0: Compile-time Features
    • Added BEGIN, CHECK, UNITCHECK, INIT, END blocks.
    • Added subroutine hoisting: Invoking subroutines before their actual declaration in the code.
    • Improved Exporter.pm, glob assignment.
    • Added modules: constant, if, lib, Internals (SvREADONLY), Carp.
    • Added goto &name; not a tail-call.
    • Added state variables.
    • Added $SIG{ALRM}, ${^GLOBAL_PHASE}.
    • Added operators: fileno, getc, prototype.
    • Added \N{U+hex} operator in double quoted strings and regex.

Full Changelog: v1.10.0...v1.11.0

Operators and Special Variables

04 Nov 17:41
Compare
Choose a tag to compare
  • v1.10.0: Operators and Special Variables
    • Error messages mimic those in Perl for consistency.
    • Added $., $], $^V, ${^LAST_FH}, $SIG{__DIE__}, $SIG{__WARN__} special variables.
    • Added command line switches -E, -p, -n, -i, -0, -a, -F, -m, -M, -g, -l, -x, -?.
    • Added select(filehandle) operator, ARGVOUT filehandle.
    • Added ~., &., |., ^. operators.
    • Added try catch statement.
    • Added Scalar::Util: blessed, reftype.
    • Added UNIVERSAL: VERSION.
    • Added v-strings.
    • Added Infinity, -Infinity, NaN.
    • Added \N{name} operator for named characters in double quoted strings and in regex.
    • Added lvalue subroutines.
    • CI/CD runs in Ubuntu and Windows

Full Changelog: v1.9.0...v1.10.0

Operators and Special Variables

22 Oct 19:04
Compare
Choose a tag to compare
  • v1.9.0: Operators and Special Variables
    • Added bitwise string operators.
    • Added lvalue substr, lvalue vec
    • Fix %b specifier in sprintf
    • Emulate Perl behaviour with unsigned integers in bitwise operators.
    • Regex m?pat? match-once and the reset() operator are implemented.
    • Regex \G and the pos operator are implemented.
    • Regex @-, @+, %+, %- special variables are implemented.
    • Regex $`, $&, $' special variables are implemented.
    • Regex performance comparable to Perl; optimized regex variables.
    • Regex matching plain strings: $var =~ "Test".
    • Added __SUB__ keyword; readpipe.
    • Added &$sub call syntax.
    • Added local dynamic variables.
    • Tests in src/test/resources are executed automatically.

Full Changelog: v1.8.0...v1.9.0

Loops, Operators, and File Handling

11 Oct 17:37
Compare
Choose a tag to compare
  • v1.8.0: Loops, Operators, and File Handling
    • Added continue blocks and loop operators next, last, redo; a bare-block is a loop
    • Added bitwise operators vec, pack, unpack
    • Added srand, crypt, exit, ellipsis statement (...)
    • Added readdir, opendir, closedir, telldir, seekdir, rewinddir, mkdir, rmdir
    • Added file test operators like -d, -f
    • Added the variants of diamond operator <> and special cases of while
    • Completed chomp operator; fixed qw// operator, defined-or and x=
    • Added modules: parent, Test::More

Full Changelog: v1.7.0...v1.8.0

Performance Improvements

24 Sep 16:09
Compare
Choose a tag to compare

v1.7.0: Performance Enhancements and Developer Tools Improvements

  • Execution Engine Optimization: Enhanced the performance of frequently used operators, resulting in faster execution.
  • Improved Error Handling and Debugging: Introduced more detailed debugging symbols into the bytecode for smoother troubleshooting. The Carp module has been added to provide clearer error reporting.
  • Standard Library Integration: Several core Perl standard library modules are now embedded directly within the JAR file, simplifying module access and usage.
  • Expanded Test Coverage and Bug Fixes: Broadened test coverage and resolved various bugs to ensure improved stability and reliability.

Full Changelog: v1.6.0...v1.7.0