Langur is an open-source imperative/functional scripting language written by Anthony Davis. Its principles of design are sensibility to humans, accuracy in calculation, and a clean, expressive syntax.
The following is a partial list of langur's features.
I initially developed langur using Thorsten Ball's books (1, 2), with many changes made and features added.
Source code examples can be found on RosettaCode.org.
Try it and let me know what you think. Constructive feedback is welcome.
langur 0.4.23 beta source code (7-Zip, 118K, released September 12, 2019)
Compiling langur also requires the following.
You'll need to copy the files from Go's regexp folder (something like /usr/lib/go-1.10/src/regexp) to the langur/regexp folder. This is to account for the missing replace-with-maximum-count method in Go's standard library, which is needed to make langur's regex methods complete for re2.
Langur uses the Apache license 2.0.
A full revision history is included in the download.
2019-09-12 - 0.4.23 beta - check for invalid UTF-8 encoding in cpoint.Decode() - added Unicode Private Use Areas to allowed characters for comments and string literals - updated min() and max() functions to accept array, hash, range, string, or function (originally just arrays) for string, returns lowest or highest code point number for function, returns lowest or highest parameter count (-1 for no maximum) - deprecated argMin() and argMax(); use min() and max() instead - removed rounding of decimals used for string multiplication 2019-09-11 - 0.4.22 beta - brought back the 1 part for loop - updated keys() function to accept arrays and strings to return a series of indices (always 1-based indices) - changed escaping langur strings to also use the \x form - restricted allowed characters in string literals to tab (0x09), line feed (0x0A), carriage return (0x0D), or as determined from unicode.IsGraphic() - fixed some regex stringification - added compiler.wrapInstructions() to wrap without creating an OpScope opcode (just returns index) - in numbers package, fixed number copy test - in numbers package, changed from using dec.Quad type directly to using an alias type decType = dec.Quad - in numbers package, fixed constant int32Max - removed deprecated cpToString(), stringToCp(), and keyExists(); use cp2s(), s2cp(), and haskey() instead