Releases: HyperMatrixDev/HyperMatrix-Language
HyperMatrix v1.0.7 ( Stability Update )
HyperMatrix v1.0.7 Release Notes
Welcome to HyperMatrix v1.0.7! This update focuses on improving stability, refining the shell experience, enhancing error handling, and optimizing performance. Additionally, major enhancements have been made to escape sequences, error messaging, and parser speed.
Core Improvements
Parser & Error Handling Enhancements
- Parsing Improvements:
- Fixed an issue where block bodies were not parsed correctly.
- Improved handling of set expressions like
<1, 2>
. - Enhanced identifier error tracking for more precise debugging.
- Error Handling Upgrades:
- Increased error-handling efficiency by 40%.
- Improved file source tracking for better debugging.
- Detailed error messages for various error types:
- Type Errors: Invalid type casting, assignment to constants, undefined types.
- Syntax Errors: Undefined operators, invalid expressions, reserved keywords.
- Argument Errors: Errors when function arguments do not match expectations.
- IO Errors: Clearer messages when files are missing or inaccessible.
- Index Errors: Improved range checking with better feedback.
- Name Errors: More detailed variable resolution error messages.
Command-Line & Interactive Shell Enhancements
- New Command Flags:
-version
/--version
: Displays the language version and build details (highest priority, overrides all other flags).-grammar
: Retrieves the full grammar file (priority 4).- Updated
-help
: Now provides a basic usage guide instead of displaying the full grammar file.
- Interactive Shell Upgrades:
- Running
run
with no arguments now repeats the last executed file. - If no file has been executed before, a usage guide is displayed.
- Running
- Refined Shell Command Structure for Clarity:
Usage: hmatrix [options] [path] [arguments] Options: -version Show version information (priority 1) -help Show help information (priority 2) -setup Setup a HyperMatrix project (priority 3) -grammar Retrieve the grammar file (priority 4) -continue Enter interactive mode (priority *) -time <path> Show execution time for a file (priority *) -lib:<path> Specify a library path (priority *) -settings:<path> Attach a syntax settings file (priority *) -resource:<path> Attach a resource file (priority *)
New Language Features & Escape Sequences
Enhanced Escape Sequence Handling
- Escape sequences now support nesting within
{}
or[]
. - New shorthand escape sequences:
\s
→ Non-breaking space (\u00A0
).\z
→ Zero Width Non-Joiner (\u200c
).
- Advanced Text Formatting:
- Improved Rainbow Text Rendering.
\C[...]
now supports step-based color cycling (\C2{...}{...} [...]
).- Enabled structured color effects, such as checkerboard patterns.
- Raw String Literals (
\\...\\
):- Supports multi-line input while automatically trimming leading/trailing newlines.
- Ideal for regular expressions, file paths, and formatted text.
Custom Escape Definitions
- New Syntax:
\def[key]{value}
supports escape nesting and arguments. - Example Usage:
\def[chess]{\|invert|\C2{\|#fff|}{\|#000|}[\#10{\#26\s\n}]} println(\chess);
Performance & Parsing Enhancements
- Parsing speed increased by eliminating redundant checks and backtracking.
- Optimized binary, octal, and hexadecimal escape sequences to follow consistent syntax (
\0
,\124
,\b
,\x
etc.). - Escape sequences outside of strings now automatically convert into implicit strings.
- Randomized escape sequences (
\?8
,\?{01}8
) now support explicit length specification. - Fixed parser bug preventing
!
from functioning as a negation operator. - Introduced new
void [expr]
unary operator, which evaluates an expression but always returnsundefined
.
Expanded Unicode Support
HyperMatrix now includes over 100 pre-defined Unicode character escapes, including:
- Mathematical Symbols:
≈
,≠
,≥
,≤
,∞
,√
- Currency Symbols:
$
,€
,¥
,£
,₹
,₿
- Greek Letters:
α
,β
,γ
,π
,θ
,σ
,ω
- Directional Arrows:
←
,↑
,→
,↓
,⇐
,⇒
,↔
- Special Symbols:
©
,®
,™
,¶
,•
,♥
,♫
,☀
- Box Drawing & Blocks:
█
,▓
,▒
,░
,─
,│
,┌
,┘
- Chess Symbols:
♔
,♕
,♖
,♗
,♘
,♙
- Emoji & Miscellaneous:
😀
,😂
,🚀
,🔥
,✔
,❌
,⚠
Looking Ahead
- Stability & Performance Refinements
- Further optimization of memory and AST processing.
- Faster
.hpr
execution with improved deserialization.
- Expanded Debugging & Error Handling
- Improved debugging tools for real-time error tracking.
- Detailed error suggestions for syntax and type errors.
- More Shell & Scripting Enhancements
- Improved usability for project setup and scripting automation.
Thank you for using HyperMatrix! Your feedback helps us refine and expand the language. Share your suggestions or report issues on our GitHub Issues.
HyperMatrix v1.0.6 ( Lexer & ParserUpdate )
HyperMatrix v1.0.6 Release Notes
Welcome to HyperMatrix v1.0.6! This update introduces major improvements in performance, parsing, lexing, and expands language features for enhanced usability and flexibility.
Core Improvements
Memory Optimization
- Reduced runtime memory allocation for improved efficiency.
- Optimized execution to minimize unnecessary resource usage.
Lexer and Parser Overhaul
- Rebuilt the lexer for better efficiency and flexibility.
- Rebuilt the parser to enhance usability and support future updates.
- Prepared the lexer and parser for upcoming syntax settings updates.
New Features & Enhancements
Expanded Numeric Support
- Added lexing for:
- Binary numbers (
0b100110
) - Hexadecimal numbers (
0xfe14d5
) - Octal numbers (
0o521237
) - Numbers with exponents (
45e+2
)
- Binary numbers (
Multi-Word Keywords
- Introduced flexible keyword combinations:
hash tag
(both words form a keyword, individually they are not)is not
(each is a keyword, but together they form another keyword)is null
(the first is a keyword, the second is not, but together they form a new keyword)
Static Initializers
- Added static initializers for classes, similar to Java:
class Example { static { println("Static block initialized"); } }
- Allows initializing static variables multiple times within a class.
- Executes in the order defined.
Stable Unit Expressions
- Unit expressions are now stable and out of the experimental phase.
- Fully supports numeric types:
45m // Integer with unit 5.3cm // Float with unit 0b100110turn // Binary number with unit
Performance Improvements
- Optimized
switch
andif
statements by reducing evaluation overhead, increasing speed by 76%. - Fixed infinite loop bug caused by unclosed parenthesis
(5
, now properly throws an error instead.
AST Serialization Support
- The parser is now ready for AST serialization with
.hpr
files (High Performance Load format). - No need for lexing or parsing
.hpr
files—direct deserialization enables instant execution.
Extended Escape Character Support
HyperMatrix now supports a vastly expanded escape sequence family:
Standard Escapes
\0
→ Null character\a
→ Bell/alert\e
→ Escape character\n
→ Newline\t
→ Tab\v
→ Vertical tab\r
→ Carriage return\b
→ Backspace\f
→ Form feed\'
→ Single quote\"
→ Double quote\\
→ Backslash
Unicode & Hexadecimal Support
\uXXXX
→ Unicode character\xXX / \x{XXXX}
→ Hexadecimal character
Randomized Escapes
\?;
→ Random ASCII character\?{abcde};
→ Random character from a set\???
→ Three random characters\?{01}??
→ Random binary with a specific length
Repetition & Formatting
\#Nchar;
→ Repeat a characterN
times\#N{text};
→ Repeat a stringN
times\|color|text
→ Apply text color formatting\|#RRGGBB|text
→ Custom RGB text color\|##RRGGBB|text
→ Custom RGB background color\|<|
→ Return to previous color\|<<|
→ Reset all colors
Control & Special Characters
\cX
→ Control character escape\M{name}
→ Maintained Unicode character\N
→ Auto-incrementing counter\N;
→ Auto-incrementing counter without placing a value\B{binary}
→ Binary character representation\C[text]
→ Rainbow text\D{format}
→ Date formatting\T{format}
→ Time formatting
Upcoming Enhancements
- Further optimizations in the parser and lexer for faster execution.
- Expanded AST functionality for more efficient deserialization.
- Additional improvements to static initialization handling.
Thank you for using HyperMatrix! This update brings foundational improvements, making the language more powerful and extensible. Let us know your thoughts and suggestions on our GitHub Issues.
HyperMatrix v1.0.4 ( Shell Update )
HyperMatrix v1.0.4 Release Notes
Welcome to HyperMatrix v1.0.4! This release focuses on shell updates, new command-line flags, and key bug fixes to improve usability and expand functionality.
Shell Updates
Color Removal
- Removed colors from the shell output, including error messages. This resolves issues where some terminals displayed unsupported or garbled text instead of colors.
New Shell Start Message
- A new shell startup message has been added for a more informative and welcoming experience.
New hmatrix
Command Flags
-time
- Prints the execution time of the program after it finishes.
-lib:<path>
- Attaches a library folder to the current run.
- Example:
hmatrix -lib:/path/to/lib myfile.hm
-setup
and -setup:<path>
- Sets up a HyperMatrix project in the current folder or at the specified path.
- Exits the program after setup is complete.
- Examples:
hmatrix -setup hmatrix -setup:/path/to/project
-settings:<path>
- Attaches a settings file for the current run.
- Note: This flag will be fully functional after the upcoming lexer update.
-resource:<path>
- Attaches resource files for the current run.
- Example:
hmatrix -resource:/path/to/resources myfile.hm
-help
- Displays grammar documentation in Markdown format and exits the program.
- Note: This flag cannot be used with other flags. If combined with the
-setup
flag,-help
will take precedence.
Fixes
this
in Thematic
- Fixed an issue where the
this
keyword could not be used within thematic blocks.
Thank you for using HyperMatrix! This update enhances the shell experience and introduces powerful new tools for managing your projects. Let us know your thoughts or suggestions on our GitHub Issues.
HyperMatrix v1.0.3 ( Archetype Refactoring )
HyperMatrix v1.0.3 Release Notes
Welcome to HyperMatrix v1.0.3! This release introduces major improvements, fixes critical issues, and refines the functionality of archetypes for enhanced performance and usability.
Fixes and Improvements
Class Instance Properties
- Resolved an issue where all instances of a class shared the same properties. Instances now maintain independent properties.
Function Display in Console
- Fixed a bug where functions were incorrectly displayed as strings in the console.
this
Scope Binding
- Corrected a problem where the
this
object unintentionally referenced the parent scope. It now correctly binds to local variables.
Instance Variables in -continue
Mode
- Addressed issues accessing instance variables in interactive
-continue
mode.
Instance Representation
- Improved instance handling: instances now display their
stringify
method if defined; otherwise, they default to showing the object representation.
Compiler and Lexer Enhancements
- Enhanced compiler performance for faster stringification of values and function calls.
- Improved multi-line comment handling: the lexer now ignores any
*/
sequences without a valid start delimiter. Once a proper delimiter is detected, it behaves as expected.
Archetype Refactoring
Memory Optimization
- Refactored archetypes to better optimize memory usage.
- Unique archetypes (
uniquearche
) are created only when accessed. - Global archetypes (
archetype
) are optimized for shared functionality.
- Unique archetypes (
Enhanced Functionality
-
View Archetypes:
- Use the
identity
unary operator or the__arche__
property to inspect a value's archetype.println(identity "Matrix"); // Outputs the value's identity, including archetype details. println("Matrix".__arche__); // Outputs the string archetype object.
- Use the
-
Custom Archetypes:
- Define custom methods for built-in or user-defined types.
string.archetype.reverse = () -> { return this.split('').reverse().join(''); }; number.archetype.double = () -> { return this * 2; }; println("Hyper".reverse()); // Output: repyH println((5).double()); // Output: 10
- Define custom methods for built-in or user-defined types.
New Features
Improved Imports
- Added support for importing native modules and aliasing them with
as
. Examples:import os as OS import "file.hm" as file import {newFile, delFile} as file from "file.hm" import * as file from "file.hm"
New printf
Function
- Introduced the
printf(string, ...args)
function for formatted output.
Thank you for supporting HyperMatrix! Your feedback drives our progress, and we’re excited to see how you use this release.
HyperMatrix v1.0.1
HyperMatrix v1.0.1 Release Notes
Welcome to HyperMatrix v1.0.1! This release focuses on resolving key issues and refining core features to enhance the development experience.
Fixes and Improvements
Class Declarations in Loops
- Resolved an issue where variables could not be declared within
while
scopes due to conflicts with existing variable names.
Reverse Assignments in Nested Scopes
- Fixed problems with reverse assignment expressions failing in nested scopes.
Logical Operator Behavior
- Corrected the functionality of
and
andor
operators to align with expected behavior:or
now functions as a logical OR.and
now functions as a logical AND.
Assignment Evaluation
- Ensured assignments are evaluated only once to prevent unexpected behavior.
Control Flow Statements
- Updated
break
,continue
, andreturn
statements to properly stop the intended scope or loop, rather than halting the entire program.
Multi-Line Strings
- Improved handling of multi-line strings with backticks (`) for cleaner processing:
- Leading spaces are trimmed to match the lowest indentation level.
- New lines are removed if they are the first or last character.
- Added descriptive error messages for improper use of quotes (
'
or"
) in multi-line strings.
Additional Enhancements
- Enhanced support for the
undefined
type in logical comparisons withis
andis not
. - Improved error messages for better debugging and clarity.
Thank you for supporting HyperMatrix! Your feedback drives our progress, and we’re excited to see how you use this release.
HyperMatrix v1.0.0
Welcome to HyperMatrix v1.0.0!
This is the first official release of HyperMatrix, a high-level programming language designed to empower developers with simplicity, flexibility, and innovative features.