Releases: funvibe/funterm
Funterm v0.2.0
Funterm v0.2.0 Release Notes
This release focuses on enhanced loop syntax, advanced bitstring operations, and editor support.
New Features
Loop Enhancements
Numeric for loops now support optional step parameter. Use positive steps for forward iteration and negative steps for backward counting. Supports optional parentheses.
for i = 0, 100, 10 {
print(i)
}
for i = 100, 0, -10 {
print(i)
}C-style for loops provide traditional syntax with full flexibility for initialization, condition, and increment expressions. Supports optional parentheses.
for (i = 0; i < 10; i = i + 1) {
print(i)
}
for i = 0; i < 10; i = i + 1 {
print(i)
}For-in loops supports optional parentheses.
for item in array {
print(item)
result = result + item
}All loop types support break and continue statements for flow control.
Bitstring and Arithmetic
Big integer support with arbitrary precision arithmetic. Operations handle numbers beyond 64-bit ranges seamlessly.
huge = 999999999999999999999999999999
result = huge * 2Dynamic size expressions in bitstring patterns now support arithmetic with big integers.
data = <<10:8, payload/binary>>
match data {
<<size:8, content:(size * 8)/binary>> -> {
print("Extracted", size, "bytes")
}
}Bitwise operations fully supported including OR, AND, XOR for integer manipulation.
flags = 0x01 | 0x04 | 0x10
masked = flags & 0xFF
inverted = ~flagsUnified Operator Support
Ternary operator and Elvis operator for conditional expressions.
grade = score >= 80 ? "A" : "B"
username = user.name ?: "Anonymous"Optional parentheses in if and while conditions provide flexible syntax.
if x > 5 {
print("condition without parens")
}
while counter < limit {
counter = counter + 1
}Pattern Matching Improvements
In-place pattern matching for direct variable extraction without match blocks.
response = <<0x200:16, 13:16, "Hello">>
<<status:16, length:16, body:length/binary>> = responseUTF-8 pattern matching with automatic codepoint extraction.
text = "Hello"
<<h/utf8, e/utf8, l1/utf8, l2/utf8, o/utf8>> = textSize operator for bitstring length queries returning size in bytes.
data = <<"test">>
size = @dataBuilt-in Functions
New print function for unified output across all value types with proper formatting.
print("Value:", 42, "Data:", data)concat function for multi-array concatenation.
result = concat([1, 2], [3, 4], [5, 6])len function returns length of arrays, strings, and maps.
count = len(array)id function for identity operations.
value = id(42)Editor Support
Syntax highlighting available for major editors:
VS Code: Install via VSIX file with bracket auto-closing and language block highlighting.
Sublime Text: Automatic .su file detection with full syntax support across platforms.
Vim/Neovim: Automatic filetype detection and color scheme compatibility with quick installation script.
All editors support language blocks, bitstring patterns, operators, and qualified variables.
Funterm v0.1.0 - Multi-Language REPL with Bitstring Pattern Matching
Multi-Language REPL & Binary Data Processor.
Integrates Python, Lua, JavaScript, and Go with bitstring pattern matching, cross-language pipes, and data processing capabilities.
Features
- Multi-Language Support: Python, Lua, JavaScript (Node.js), Go
- Bitstring Pattern Matching: Erlang-style binary parsing with
<< >>syntax - Inplace Pattern Matching: Direct variable extraction with
<<pattern>> = value - Cross-Language Pipes: Chain functions between languages with
| - Background Execution: Non-blocking tasks with
&operator - String Concatenation:
++operator with automatic type conversion - Controlled Variable Persistence: Explicit state management
Download
Binaries are available for the following platforms:
- Linux AMD64:
funterm-linux-amd64.tar.gz - Linux ARM64:
funterm-linux-arm64.tar.gz - macOS Intel:
funterm-darwin-amd64.tar.gz - macOS Apple Silicon:
funterm-darwin-arm64.tar.gz - Windows AMD64:
funterm-windows-amd64.zip - Windows ARM64:
funterm-windows-arm64.zip - FreeBSD:
funterm-freebsd-amd64.tar.gz - OpenBSD:
funterm-openbsd-amd64.tar.gz
Quick Start
- Download the binary for your platform.
- Extract the archive.
- Run
./funterm(orfunterm.exeon Windows).
Examples
# Bitstring pattern matching
lua.packet = <<0xDEAD, 0xBEEF, "Hello"/binary>>
match lua.packet {
<<a:8, b:8, text/binary>> -> lua.print("Found:", a, b, text)
}
# Cross-language pipes
py.data = "hello world"
js (upper) { function upper(s) { return s.toUpperCase(); } }
lua.result = js.upper(py.data)Build from Source
git clone https://github.com/funvibe/funterm.git
cd funterm
go build -o funterm main.go config.go batch.goDocumentation
- See
README.mdfor comprehensive documentation. - The
examples/directory contains use cases. - The
tests/directory contains feature demonstrations.