Repository navigation
zevic v0.4.1
zevic v0.4.1
What's new
Standard library growth, and examples for other languages.
Language and prelude:
Text.Format("%5d|%-8s|%.2f", ...)(proposal 0008): C-style formatting that returns aString. LikePrintf, the format is a string literal and the compiler checks the number and the types of the values.Printf/Eprintf/Formatnow also accept%o %e %E %g %G. Both compilers implement it; the runtime collects the pieces in a per-thread bufferStringBuilderin the preludeIterable:TakeSkipTakeWhileSkipWhileFlatMapZipChunkPartitionGroupByDistinctMinMaxMinByMaxBy;Array:RepeatReversedSortedSortedBySwapFillRetainWhereIndexWhereBinarySearch;Map:GetOrGetOrInsertUpdateExtendRemoveWhereEntriesFromPairs;Set:FromArrayAddAllUnionIntersectDifferenceSymmetricDifferenceIsSubsetIsSupersetIsDisjointEqualsText: UTF-8 awareToCharsFromCharsCharAtSliceCharsReverse,PadLeftPadRightCenter,TrimPrefixTrimSuffixIsBlankLastIndexOfCountSplitNWordsReplaceFirstEqualsIgnoreCaseCapitalizeTruncate;StartsWith/EndsWithcompare bytes (they panicked on some non-ASCII text)
New modules:
Zevic.Chars,Zevic.Path,Zevic.Bytes,Zevic.Encoding(hex, Base64, URL, form),Zevic.Digest(CRC-32, Adler-32, SHA-256, HMAC-SHA-256; checked against the NIST and RFC 4231 vectors)Zevic.DateTime(calendar, fixed-offset zones, arithmetic, ISO 8601 and pattern formatting and parsing),Zevic.Log(levels, text and JSON lines, fields, sinks),Zevic.Cli(flags, options, positionals, subcommands, generated help)Zevic.Regex(Pike VM: groups, named groups, lazy repeats, replace, split),Zevic.Csv(RFC 4180),Zevic.Toml(TOML 1.0)Zevic.Net: TCP streams and listeners, UDP sockets,Resolve, timeouts- archives:
Zevic.Deflate/Zlib/Gzip(RFC 1951/1950/1952, with a decompression size limit),Zevic.ZipandZevic.Tar(read, write, extract with zip-slip protection,ZipDir/Unzip/TarDir/Untar,.tar.gz) Fs:ReadBytesWriteBytesAppendBytesReadLinesWriteLinesSizeModifiedMillisIsSymlinkCopyCreateDirAllRemoveAllWalkCopyDirMakeTempDir;Env.OS;Json.Quote
Tools and examples:
-
the C implementation (
zevic0/, the Czevpm/) moved to its own repository, zevic-lang/zevic-c. This repository builds withmakefrombootstrap/zevic.lland clang alone (the seed compiler buildstools/zevic1);make bootstrapchecks the fixed point; CI no longer needs a C compiler for Zevic -
zevic --lib --pic(also inzevic1): the library archive is position independent, so it can go into a shared library (Pythonctypes) -
examples/interop/: C++, Rust, Go and Python call a Zevic library, and Zevic calls Rust and C++ (make test-interop) -
zevfmtcompares operators by bytes, so non-ASCII sources no longer panic
Known limits: DateTime zones are fixed offsets only; TOML date-times stay as text; regex flags apply to the whole pattern; the Windows branches of Path and the runtime are not run on Windows here (CI covers them).
Downloads
| File | |
|---|---|
install.ps1 |
installer for Windows (PowerShell) |
install.sh |
installer for Linux and macOS |
zevic-0.4.1-linux-x64.tar.gz |
Linux x64: unpack and put bin on PATH (or run install.sh) |
zevic-0.4.1-macos-arm64.pkg |
macOS installer package |
zevic-0.4.1-macos-arm64.tar.gz |
macOS (Apple silicon): unpack and put bin on PATH (or run install.sh) |
zevic-0.4.1-windows-x64-setup.exe |
|
zevic-0.4.1-windows-x64.zip |
Windows: unzip and put bin on PATH (or run install.ps1) |
zevic_0.4.1_amd64.deb |
Debian / Ubuntu package (sudo apt install ./<file>) |
Install
Linux and macOS: sh install.sh (or unpack the archive and add its bin directory to PATH).
Windows (PowerShell): .\install.ps1, or unzip and add the bin folder to PATH.
Then zevic --version, zevpm new hello, cd hello, zevpm run. The standard library is the Zevic package in packages/Zevic.
clang 15 or newer must be installed: zevic hands the generated LLVM IR to it.
Commits since v0.4.1-build.18
- tests: find the specification's Appendix B by its English heading (06c85c2)
- Packaging: signed apt repository, Windows installer and winget manifests (d12e76b)
- docs: translate the language specification to English (433c2cc)
- docs: plan formatting (bfe0307)
- docs: translate the implementation plan to English (70f0a3a)
- docs: translate proposals 0004 to 0007 to English (72263d4)
- docs: translate proposals 0002 and 0003 to English (b022e81)
- docs: translate the proposal template, proposal 0001 and the IR notes to English (2278823)
- README: translate to English (4de07ea)
Contents
bin/zevic,bin/zevpm,bin/zevfmt0.4.1packages/Zevic/: the standard library, a zevpm package namedZevic(version 0.4.1)runtime/,examples/,LICENSE,README.md,VERSION