Repository navigation
v3.5.1 #58
minirang
announced in
Announcements
v3.5.1
#58
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Description
Fixed:
DLC:randomwas not safe to use from several threads at once. The generator is one per process and was shared without a lock, so two programs on different threads that calledrandom_int,random_float,random_choice,random_shuffleorrandom_seedtogether could corrupt it (ThreadSanitizer reported a data race). Every use of the generator is now locked. Seeded sequences are the same as before, and a single program is not measurably slower.Behavior change:
input()no longer returns the carriage return of a CRLF line on Linux and macOS. A line that ended in\r\nwas returned with a trailing\r, soinput() is "yes"failed for input written on Windows, while Windows itself andfile_readlinesalready dropped it. A program now reads the same text from a file written on any platform. A carriage return inside a line is kept.Behavior change:
cuffshexits with status 1 when a script it was given through a pipe or a redirect fails, ascuffcdoes, and with 0 when the script ran. It used to exit with 0 either way, so a shell script or a CI job could not tell. An interactive session still ends with 0.Changed: the
User-AgentofDLC:networkisCuffScript (+DLC:network). It named version 1.7, which was never kept up to date. The error for anhttps://address points at theDLC:networkpage.Fixed: the usage text of
--no-networkand--no-filesystemsaid they disable theuseline. They switch the library off:usesucceeds and every call raisesE5-005. The usage text now says that.Fixed: examples and statements in the documentation that did not match the engine. The pattern reference had examples that failed (
"<tag>[any]*</tag>"isE3-001, because<begins a named capture;set match ... to find ...isE4-020) and one that could never run (matchfinding nothing givesempty, not an error). Besides those it now says what the engine does formatch(it searches), unknown words in brackets (a set of letters),|,~,<,>and]in patterns, optional groups, flags per statement, and the exact shapes of[int],[float],[email],[phone]and[url]. The language reference now says thatreturnwith a value outside a function isE4-016, thatlengthandcontainscome with the string, list or map library andindex_ofwith the string or list library only, thatsetrequires its type, that arepeatrange is never empty (1 ~ 0runs twice), that the target ofaddandremoveis a plain name, how a constant map is protected, and how numbers are displayed. The library pages describeto_number,str_pad_left,str_pad_right,list_range, the JSON reader, the network client's redirects and the filesystem functions' failure values as they behave, and the module guide describesuse ... frompaths as they are resolved.Fixed: the error catalogue and other stale text. The descriptions of
E2-009,E3-001,E3-004,E3-007,E3-009andE5-005now match when the engine raises them.SECURITY.mdnamedgetandpostinstead ofnetwork_getandnetwork_post, the extending guide and the design notes cited files and versions that do not exist, and the question issue template used#comments and commands that do not exist.Added: documentation. An installation guide for Linux, macOS and Windows, a cookbook, a FAQ, the grammar of the language and of patterns, a glossary, a C++ API reference, a list of known limitations, a description of the continuous integration, a map of the source files, and
SUPPORT.md. Every error code a program can raise is explained in the catalogue with an example that the documentation check runs, the pages of all ten libraries describe each function's arguments, edge cases and errors, andexamples/embeddingis a complete C++ program that hosts the engine. The documentation check runs 148 examples, up from 30. Bug report and feature request issue forms and a rewrittenCONTRIBUTING.mdcomplete the repository's community files.Added: tests.
builtins_test.cppcoversinput()with LF and CRLF endings and the behaviour ofDLC:random; the threads test now draws random numbers on every thread; the shell tests check the exit status of piped scripts.This discussion was created from the release v3.5.1.
All reactions