Releases: jawkio/jawk
Release list
v7.1.01
What's Changed
- FIX: Convert numbers with the AWK rule when comparing against a string by @NassimBtk in #604
- Document the members the Javadoc report flags, and doclint for them in verify by @bertysentry in #597
- Report the running Jawk version to JSR 223 hosts by @bertysentry in #600
Full Changelog: v7.1.00...v7.1.01
v7.1.00
Jawk 7.1 makes Jawk easy to install — curl -fsSL https://jawk.io/get | sh and you have a
jawk command — and takes a deep pass over the numeric core: printf/sprintf are now
implemented natively with POSIX AWK / gawk semantics, integral arithmetic is computed exactly in
64 bits, and getline follows gawk down to which variables each form sets. Along the way, scripts
run measurably faster.
📦 One-command installation
- Install the
jawkexecutable with one command —curl -fsSL https://jawk.io/get | shon
Linux/macOS,irm https://jawk.io/get.ps1 | iexon Windows. Nosudo: the launcher goes into
~/.local/bin(or%LOCALAPPDATA%\Jawk), and it locates a Java runtime (Java 8 or later) at
run time, so upgrading Java never requires a reinstall.JAWK_VERSIONpins a release,
JAWK_INSTALL_DIRchanges where the launcher lands. Every release now also publishes a
version-lessjawk-standalone.jaralias with.sha256checksums, so
releases/latest/download/jawk-standalone.jaris a stable download URL
by @bertysentry in #584 JAWK_CLASSPATHin the launchers — set it and the launcher runs the CLI with the standalone
jar plus your entries on the JVM class path, so custom
extension jars load with-l <fully.qualified.ClassName>.
Previously the launcher always usedjava -jar, which ignores every class path setting
by @bertysentry in #588- CI smoke tests for both installers — the real scripts are exercised end to end on every
change, so a brokenjawk.io/getcannot reach the site
by @bertysentry in #587
🖨️ Native printf with AWK semantics
printf/sprintf no longer delegate to the Printf4J library, which emulated glibc's printf();
they are implemented in the new io.jawk.jrt.AwkPrintf with the semantics POSIX specifies and gawk
implements, verified against gawk 5.0/5.1
by @bertysentry in #543
%suses AWK's number-to-string rules — integral values print without a fractional part
(printf "%s", iafteri++prints1, not1.0), non-integral values honor the script's
currentCONVFMT.%cprints the character for a numeric code point — numbers, numeric strings, and fields
alike — or the first character of a string value.- Dynamic precision
%.*fjoins dynamic width%*d, negative values included; gawk
positional specifiers (%2$s) and the'grouping flag (%'d) are supported. - Out-of-range integers follow gawk — negative values wrap to unsigned 64-bit for
%u/%o/%x/%X, and values beyond 64 bits print their full decimal expansion for%d/%i. - NaN and infinities print as
nan,inf,-infinstead of Java'sNaN/Infinity— in
print,printf, and number-to-string conversions. - Correct rounding —
%e/%f/%ground the exact binary value of the double, halfway cases
to even, like the C library gawk uses (printf "%.0f", 2.5prints2), and the same rounding
applies throughCONVFMTandOFMT(#548). - Too few arguments is a fatal error, as in gawk; unknown conversions — including
%n, which
Printf4J turned into a newline — print verbatim without consuming an argument. - New
JavaStringFormatAwkSinkfor Java embedders: a sink whoseprintf/sprintfuse
String.format(...), giving scripts Java-only conversions such as%,dand%tY.
🔢 Exact numbers
- Integral arithmetic is computed exactly in 64 bits —
+,-,*, an evenly-dividing/,
%, unary±,++/--and the compound assignments, on variables, array elements, and fields
alike, keep all their digits beyond 2^53:print 9007199254740992 + 1prints9007199254740993,
where gawk computes in doubles and prints9007199254740992unless run with-M. Overflow falls
back to floating point, and comparisons between two exact integers are exact as well. Values
beyond the 64-bit range are no longer saturated either:print 2^100prints the full
1267650600228229401496703205376
by @bertysentry in #552 - Fields keep their numeric value through
+=and++, like=always did, and rebuilding
$0converts numeric fields withCONVFMT, as POSIX requires and gawk does:
{ $1 = 0.1 + 0.2; print }prints0.3 ...instead of the raw0.30000000000000004 ...
by @bertysentry in #552 - Exponent literals are lexed as one number —
print 2e3prints2000; previously the lexer
stopped before the exponent, so2e3parsed as2concatenated with an uninitialized variable
e3. Long numeric strings now keep all their digits instead of stopping after 26 characters, an
integer literal too large for 64 bits is a floating-point constant instead of a
NumberFormatException, andsubstr()'s length argument accepts every AWK number form
by @bertysentry in #544 - Array subscripts convert with the
CONVFMTin effect when the subscript is used, as POSIX
requires and gawk does, so a laterCONVFMTchange no longer retroactively rewrites existing
keys — and integral subscripts beyond the 64-bit range key as their exact digits
by @bertysentry in #551 - Blank-padded numeric strings are recognized as strnums — the record
" 12 "compares
numerically ($0 == 12is true), as in gawk; string constants such asx = " 12 "still compare
as strings (#550)
by @bertysentry in #573
📥 getline, redirections, and special filenames
- Redirected
getlinesets exactly the variables gawk documents —getline < fileand
cmd | getlineset$0andNFonly;getline var < fileandcmd | getline varsetvar
only. Previously every redirected form also advancedNR, so a side read shifted the record
numbers of the whole main input, and took overFILENAME
by @bertysentry in #572 - A
getlinethat cannot open its file returns-1withERRNOcarrying the gawk-style
description, so the idiomaticwhile ((getline line < f) > 0)guard and probing for optional
files work; previously the underlying JavaIOExceptionaborted the whole script
by @bertysentry in #572 - A
getlinethat reads nothing leaves its target untouched, as POSIX requires — no more
clearing$0/NFor assigning the empty string at end of input or on error
by @bertysentry in #572 getlineinto a field —getline $n < file,cmd | getline $n, and plaingetline $n—
stores the record into that field and rebuilds$0; previously any of these forms corrupted the
interpreter's operand stack and crashed the script on the first record
by @bertysentry in #572- The gawk special filenames
/dev/stdout,/dev/stderr,/dev/stdinand their/dev/fd/N
spellings route to the streams the process already holds open, instead of being opened — and
truncated — as regular files.close()flushes the redirection and reports success without ever
closing the underlying stream
by @bertysentry in #564 /dev/nulldesignates the null device on Windows (NUL) in redirections, ingetline, and
as an input operand, as gawk's Windows port does. Previously it was opened as a relative path,
creating and truncatingdev\null— and keeping the output that was meant to be discarded
by @bertysentry in #568
🖥️ CLI and process integration
- POSIX attached option-arguments —
-fprog.awk,-vx=1,-F:and the Jawk-specific-L,
-K,-lnow work like their spaced forms, as in gawk, mawk, BWK awk, and goawk; previously the
glued form was rejected withUnknown parameter
by @bertysentry in #576 -V/--versionprints the Jawk version and the Java runtime that executes it, and the
usage printed by-hnow names the command you actually typed — the installed launchers pass it
through the newJAWK_PROGRAM_NAMEvariable — instead of always describing ajava -jar
invocation the user never made
by @bertysentry in #593system()and command-pipe children inherit the standard input, as POSIX requires and gawk,
mawk, and BWK awk do:echo hi | jawk 'BEGIN { "sort" | getline l; print l }'printshi, and
terminal-aware commands such as"stty size" | getlinecan reach the controlling terminal.
Previously the child's standard input was always closed, so stdin filters read nothing
by @bertysentry in #577
🧩 Language and correctness
nextis accepted inside user-defined functions, as in gawk, mawk, and BWK awk: called from
an input rule it abandons the current record and unwinds the active calls; called fromBEGIN,
END,BEGINFILE, orENDFILEit is a runtime fatal error, matching gawk. Previously anynext
inside a function was rejected at compile time
by @bertysentry in #582- Conditional expressions feeding a further operation now optimize correctly — shapes like
(v ? v : 24) * 2,-(v ? 5 : 24), or$(v ? 1 : 2). The peephole literal fold used to merge
the false branch's literal with the operation at the branches' join point, so(60 ? 60 : 24) * 2
yielded 48 and leaked a value onto the operand stack that displaced later...
v7.0.01
What's Changed
- Continue print expression list after parenthesized argument by @bertysentry in #539
- Evaluate range pattern conditions lazily by @bertysentry in #540
- Print numeric-looking strings verbatim by @bertysentry in #541
Full Changelog: v7.0.00...v7.0.01
v7.0.00 - Full GNU Awk (gawk) extension support 🎉
Jawk 7 is a major milestone: beyond POSIX AWK, Jawk now supports the full set of gawk
language extensions and built-in functions — enabled by default, with a strict --posix
mode when you want the standard and nothing else. Scripts written for gawk now run on
Jawk, on the JVM, unchanged.
🚀 gawk language extensions
BEGINFILE/ENDFILEspecial rules, together with thenextfilestatement and the
ERRNOandARGINDspecial variables, with gawk-compatible semantics for unreadable
files,FILENAME/FNRhandling, and hook restrictions
by @bertysentry in #515@include,@namespace, typed regexp literals (@/re/), and indirect function calls
(@f()) — including namespaced indirect calls dispatching user-defined, built-in, or
extension functions
by @bertysentry in #533- gawk-compatible array and scalar typing — untyped function arguments stay untyped
until used, with gawk's runtime diagnostics for invalid array/scalar contexts
by @bertysentry in #534
🧰 gawk built-in functions (now all implemented)
- Array sorting and type introspection:
asort(),asorti()(with all
PROCINFO["sorted_in"]comparison modes, also honored byfor (i in a)),typeof(),
isarray(),mkbool(), andgensub()
by @bertysentry in #504 - The remaining gawk builtins:
systime(),mktime(),strftime(),strtonum(),
patsplit(), and the i18n interface (bindtextdomain(),dcgettext(),
dcngettext()) — plus honestSYMTABandFUNCTAB
by @bertysentry in #527
🖥️ CLI and POSIX conformance
- Handle
--and-per POSIX, and pass unknown options through toARGVlike gawk
by @bertysentry in #526
⚡ Performance and internals
- Cache compiled dynamic regexps in the runtime
by @bertysentry in #514 - Refactor built-in function dispatch to an enum switch
by @bertysentry in #506
🏗️ Build
- Standalone POM: no more dependency on
org.metricshub:oss-parent
by @bertysentry in #513
Full Changelog: v6.1.00...v7.0.00
Dependabot
- build(deps): bump com.github.spotbugs:spotbugs-annotations from 4.9.8 to 4.10.3 by @dependabot[bot] in #510
- build(deps): bump devops-infra/action-pull-request from 1.2.1 to 1.4.0 by @dependabot[bot] in #508
- build(deps): bump org.metricshub:oss-parent from 4 to 5 by @dependabot[bot] in #507
- build(deps): bump actions/checkout from 6 to 7 by @dependabot[bot] in #503
- build(deps-dev): bump com.github.spotbugs:spotbugs-maven-plugin from 4.9.8.3 to 4.10.3.0 by @dependabot[bot] in #509
- build(deps): bump org.apache.maven.plugins:maven-release-plugin from 3.1.1 to 3.3.1 by @dependabot[bot] in #520
- build(deps): bump org.apache.maven.plugins:maven-compiler-plugin from 3.14.0 to 3.15.0 by @dependabot[bot] in #519
- build(deps-dev): bump org.apache.maven.plugins:maven-artifact-plugin from 3.6.0 to 3.6.1 by @dependabot[bot] in #518
- build(deps-dev): bump org.apache.maven.plugins:maven-source-plugin from 3.3.1 to 3.4.0 by @dependabot[bot] in #517
- build(deps-dev): bump org.apache.maven.plugins:maven-surefire-plugin from 3.5.3 to 3.5.6 by @dependabot[bot] in #516
- build(deps): bump org.apache.maven.plugins:maven-javadoc-plugin from 3.11.2 to 3.12.0 by @dependabot[bot] in #525
- build(deps-dev): bump org.apache.maven.plugins:maven-gpg-plugin from 3.2.7 to 3.2.8 by @dependabot[bot] in #524
- build(deps-dev): bump org.apache.maven.plugins:maven-failsafe-plugin from 3.5.3 to 3.5.6 by @dependabot[bot] in #523
- build(deps-dev): bump org.apache.maven.plugins:maven-jar-plugin from 3.4.2 to 3.5.0 by @dependabot[bot] in #522
- build(deps-dev): bump org.apache.maven.plugins:maven-resources-plugin from 3.3.1 to 3.5.0 by @dependabot[bot] in #521
- build(deps): bump org.sentrysoftware.maven:maven-skin-tools from 1.8.00 to 1.8.01 by @dependabot[bot] in #531
- build(deps-dev): bump org.apache.maven.plugins:maven-jar-plugin from 3.5.0 to 3.5.1 by @dependabot[bot] in #532
Full Changelog: v6.4.01...v7.0.00
v6.4.01
What's Changed
- Integrate benchmark publishing into the release workflow by @bertysentry in #481
- Expand JMH coverage for JRT and AVM hot paths by @bertysentry in #483
- Implement AWK strnum semantics for input-derived numeric strings by @bertysentry in #486
- Add ASSIGN_NOPUSH to eliminate redundant assignment pushes by @bertysentry in #494
- Optimize chained string concatenation with counted CONCAT by @bertysentry in #495
Dependabot
- build(deps): bump actions/upload-pages-artifact from 4 to 5 by @dependabot[bot] in #480
- build(deps-dev): bump org.apache.maven.plugins:maven-surefire-report-plugin from 3.5.5 to 3.5.6 by @dependabot[bot] in #493
- build(deps): bump devops-infra/action-pull-request from 0.6.1 to 1.2.1 by @dependabot[bot] in #492
- build(deps): bump metricshub/workflows/.github/workflows/maven-central-deploy.yml from 4 to 6 by @dependabot[bot] in #491
- build(deps-dev): bump org.apache.maven.plugins:maven-changelog-plugin from 3.0.0-M1 to 3.0.0-M2 by @dependabot[bot] in #489
- build(deps): bump softprops/action-gh-release from 2 to 3 by @dependabot[bot] in #485
Full Changelog: v6.4.00...v6.4.01
v6.4.00
What's Changed
- Release v6.3.00 and prepare v6.4.00-SNAPSHOT by @github-actions[bot] in #472
- Refactor tuples into typed opcode subclasses by @bertysentry in #473
- Optimize JRT.compare2 hot paths and publish benchmark reports by @bertysentry in #477
Full Changelog: v6.3.00...v6.4.00
v6.3.00
New Features
- You can now pass List objects to AWK scripts, which will be accessible like regular maps/arrays: @bertysentry in #469
- Add profiling report file support by @bertysentry in #471
Full Changelog: v6.2.01...v6.3.00
v6.2.01
What's Changed
- Release v6.2.00 and prepare v6.3.00-SNAPSHOT by @github-actions[bot] in #465
- Fixed compatibility dashboards generation in documentation site by @bertysentry in #467
Full Changelog: v6.2.00...v6.2.01
v6.2.00
New Features
- Add full support for Persistent Memory in Java, Cli and gawk-style memory file by @bertysentry in #464
What's Changed
- Add compatibility dashboards to the documentation site by @bertysentry in #461
- Add failsafe-driven compatibility harness by @bertysentry in #451
- Group compatibility suites by upstream package by @bertysentry in #459
Dependabot
- build(deps-dev): bump org.codehaus.mojo:exec-maven-plugin from 3.6.1 to 3.6.3 by @dependabot[bot] in #463
- build(deps-dev): bump org.codehaus.mojo:build-helper-maven-plugin from 3.6.0 to 3.6.1 by @dependabot[bot] in #460
Full Changelog: v6.1.00...v6.2.00
v6.1.00
What's Changed
- Release/v6.0.00 by @bertysentry in #437
- Add optional gawk-style arrays of arrays (
a[i][j]) by @bertysentry in #439 - build(deps): bump actions/upload-pages-artifact from 3 to 5 by @dependabot[bot] in #442
- build(deps): bump actions/deploy-pages from 4 to 5 by @dependabot[bot] in #441
- build(deps): bump actions/download-artifact from 4 to 8 by @dependabot[bot] in #440
- Removed temporary GitHub Actions workflow by @bertysentry in #444
- [codex] add --posix CLI option by @bertysentry in #448
Full Changelog: v6.0.00...v6.1.00