langur

revision history

A full revision history is included in the download.

2023-04-07 - 0.12.6 - updated date/time literals and duration literals to accept fractional seconds, with 1 to 9 digits after a decimal point - fixed default date/time conversion to string to include nanoseconds when present - added VM mode nowIncludesNano to determine if "now" should include nanoseconds (default false); previously would always include nanoseconds - removed deprecated syntax (from 0.12.5) for case alternate operator - changed execTh() to execTH() for consistency; deprecated using execTh() - updated execT() and execTH() to format error string newlines according to system - updated execT() to add the exit status code if returning an exception - added cd() command to change the working directory within a script; has no effect on parent processes; can't be done with execT() or execTH() since they create new processes 2023-03-10 - 0.12.5 - new syntax for alternate operator between case conditions, such as case[and]; deprecated old syntax new syntax also allows for other types of infix operators between case conditions - updated lcase(), ucase() and tcase() to accept (and return) a code point integer, not just a string - conflated code for series() and pseries() functions - fixed bug in number/math.go toInt() function 2023-02-17 - 0.12.4 - updated truthiness checking of ... number: zero value as non-truthy string: zero-length string as non-truthy regex: zero-length pattern as non-truthy range: descending as non-truthy - updated building a range to throw an exception if not valid pair of values for a range - updated toNumber() to accept a numeric range and return a prospective count for an integer range (if were to be converted to an array of elements) - changed conversion of range to string not to include parentheses - some clean up of object package; added IsTruthy() directly to Object interface - dropped superfluous toBool() and toBoolOrNull() functions - dropped using to token in place of .. ; use .. only 2023-02-05 - 0.12.3 - updated toHash() to accept ranges in place of arrays - added exit status codes to system package - revised exit status codes in main() to be more specific, using system package - updated exit() to accept an optional second argument, which it writes to standard error, appending a newline, only if the exit code is non-zero - updated exit() to accept a Boolean in place of the code argument, true indicating success (code 0) and false indicating failure and returning a generic non-zero code specific to the system (Linux or Windows) - updated exit() to restrict status code within a range specific to the system - shortened internal bi_map() and mapMultiple() functions 2023-01-25 - 0.12.2 - allow variable expansion on decoupling assignment - (also in 0.5.16) changed ZLS token to zls - (also in 0.5.16) edit langur/cpoint/ to match dropping of escape codes \P and \L (in 0.12.0) - (also in 0.5.16) dropped where() function (deprecated in 0.11.2); use filter() 2023-01-09 - 0.12.1 - fix/clarify token parsing for calling built-ins without parentheses - updated toHash() function to pass through a hash - fix warning on number literals starting with 0 to only check integers - fix warning on integer literals starting with 0 with successive zeros 2022-12-25 - 0.12.0 - changed operator precedence (prefix minus lower than exponent) and stopped lexing minus into number literal so a minus sign is processed in a mathematician's way relative to an exponent - fix straight-up numeric negation as it is parsed; no need to evaluate it later - account for prefix operator token on first argument in calling built-in without parentheses - dropped escape codes \N, \P, and \L - added simple catch (using a colon instead of curly braces); doesn't allow catch else with simple catch - renamed if statement as simple if to reflect what it really is - generate error in parsing switch/given if last condition in a case is a nil right (partial) expression and there is no space between the operator and the colon (for clarity and for future proofing in case of operators using a colon)

breaking changes

0.12.6 changes the default "now" to not include nanoseconds

0.12.6 changes execTh() to execTH() and deprecates using execTh()

0.12.5 adds new syntax for alternate operator between case conditions, such as case[and]; 0.12.6 removes old syntax

0.12.4 changes truthiness checking for numbers, strings, regexes, and ranges

0.12.4 drops the to token ; use .. instead

0.12.4 drops the toBool() and toBoolOrNull() functions

0.12.2 changes the ZLS token to zls

0.12.0 swaps operator precedence for exponents and prefix minus.

0.12.0 drops escape codes \N, \P, and \L.

0.11.4 makes curly braces on catch no longer optional.

0.11.2 changed where() to filter() (deprecated use of where()) and dropped superfluous built-in function bestTag()

0.11.1 changes the name of the default rounding mode to "half away from 0" to match what it actually does.

0.11 changes default rounding to round half away from zero.

0.11 drops likely superfluous functions best(), bestkey(), good(), and wherekeys().

0.10 changes parsing multi-variable assignment in 2 ways (limited to statement context or tests of if expressions, and no longer uses parentheses).

0.10 disallows declarations in given test expressions, but no one will miss it.

0.10 removes break with value not using assignment operator (deprecated in 0.9.6).

0.10 removes using explicitly negated modifiers, as no longer necessary (deprecated in 0.9.4).

0.9.3 allows an ending block quote marker to be spaced from the beginning of the line with tabs and spaces. It also standardizes the result of group() when called with 1 argument (by truthiness) to always put true array first, then false array second.

0.9.2 returns nanoseconds, not seconds, from toNumber() when passed a date-time.

0.9 limits declaration expression context to statement or to if/given expression tests.

0.8.4 changes the default of base and hex interpolation modifiers to pad with spaces; precede the number with 0 to pad with zeroes. 0.8.4 also fixes padding counts for interpolation modifiers to include the sign, if one present.

0.8 changes the 1 part for loop (test only) to a while loop, with implicit loop variable _while.

0.8 changes the decimal implementation from a fixed 34 digit precision to an "arbitrary precision" decimal. The following changes were also made.

0.7 changes the implicit exception variable from .err to _err.

0.7 removes the use of carriage return/line feed combination for new lines in source code (deprecated since 0.6.8). Use ASCII line feed only ("Linux new line").

0.7 evaluates complex test expressions for given expressions once instead of on every case. This is both more efficient and convenient.

0.6 disallows anything but a variable to be used as a lone token in an interpolation.