Frink Changelog

What's new in Frink 2024-04-12

Apr 15, 2024
  • Added a function factorUnits[unit] which factors a unit into a array of [scale, dimensions] where scale is a dimensionless number indicating a scale and dimensions is a unit with scale of 1 and the basic dimensions of the original unit.

New in Frink 2024-03-29 (Apr 15, 2024)

  • Added a function digitLength[num] to return the number of decimal digits in a number. It works on floating-point numbers which makes it useful for arbitrary-precision functions.
  • Greatly improved the arbitraryExp and arbitraryLn functions in ArbitraryPrecision.frink to be much faster and more accurate. This improves the performance of other arbitrary-precision functions such as arbitraryPow. This requires the digitLength function above.
  • Released a new version of Frink: The Next Generation (version 2024-03-29). This merges all changes from the main branch.

New in Frink 2024-03-18 (Mar 19, 2024)

  • The output of the methods[expr] function is now sorted.
  • Added a general image.applyKernel[array2d] method to apply an arbitrary filter / kernel to an image and return a new image. See the Image Methods documentation for more.

New in Frink 2024-02-27 (Feb 28, 2024)

  • Added image.edgeDetect[] which applies an edge detect filter to an image and returns a new image.

New in Frink 2024-02-26 (Feb 27, 2024)

  • Added image.unsharpMask[width, amount] which performs an unsharp mask on an image (sharpening the image) and returns a new image. Amount is usually 1 for 100% sharpening, but can be lower or higher.
  • Updated the final conversion factor for the British pound for 2023.

New in Frink 2024-02-24 (Feb 26, 2024)

  • Added image.gaussianBlur[width] which performs a Gaussian blur on an image and returns a new image.

New in Frink 2024-02-06 (Feb 7, 2024)

  • Fixed certain cases of VoxelArray.makeSupertoroid where the eccentricity of the smaller circle was a floating-point number that triggered numerical instability of the underlying algorithm. This often manifested as the inner part of the toroid not being rendered. See Frink's 3-D routines for more.

New in Frink 2024-02-03 (Feb 4, 2024)

  • Added methods img.mirrorX[] and img.mirrorY[] to flip an image horizontally or vertically. See the images documentation for more.

New in Frink 2024-01-21 (Feb 4, 2024)

  • Updated the sample program GeometricMedian.frink to find the point that minimizes the sum of the distances to other points.

New in Frink 2023-12-31 (Jan 3, 2024)

  • Updated copyright dates for 2024. Happy New Year!
  • Updated sanity checks to 2024 for economic routines.
  • Updated calculations and predictions for deltaT for 2024. It is currently hardcoded to 69.175 s.
  • Released a new version of Frink: The Next Generation (version 2023-12-31). This merges all changes from the main branch.

New in Frink 2023-12-28 (Jan 3, 2024)

  • The sample programs LeastSquares.frink and Matrix.frink have been enhanced to allow units of measure in least-squares fits and QR decomposition.

New in Frink 2023-12-21 (Jan 3, 2024)

  • Added allShortestDistances[startNode] algorithms to Graph.frink, which finds all possible distances from the start node to all reachable nodes.

New in Frink 2023-12-20 (Dec 21, 2023)

  • Added Writer.printAndClose[expr] method to quickly write and close a file.

New in Frink 2023-12-10 (Dec 11, 2023)

  • Added function allEqual[list, target] Returns true if all of the items in the EnumeratingExpression list are equal to target. See the Enumerating Expression Functions sections of the documentation for more.

New in Frink 2023-12-02 (Dec 4, 2023)

  • Added string functions lastIndexOf[str, substr] and lastIndexOf[str, substr, startPos] .

New in Frink 2023-11-27 (Nov 28, 2023)

  • Added set methods .copyAndPut[value] and .copyAndRemove[value]. For more information, see the Sets section of the documentation.

New in Frink 2023-11-26 (Nov 28, 2023)

  • Added algorithms for topological sort and all topological sorts to to Graph.frink, allowing you to create topological sorts or dependency graphs.
  • Updated the sample program GraphTest.frink with tests of topological sort and all topological sorts.

New in Frink 2023-11-18 (Nov 20, 2023)

  • Fixed the definition of the sverdrup. Thanks to Ken Mankoff for the report.
  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.

New in Frink 2023-11-13 (Nov 14, 2023)

  • Added permutationCount[m,n] function which returns the number of permutations of m things being taken n at a time, with order being important. This is sometimes called "mPn". This is equivalent to m!/((m-n)!) but calculated efficiently by calling factorialRatio[m,m-n] internally.

New in Frink 2023-10-30 (Oct 31, 2023)

  • Fixed a possible error in VoxelArray.makeSphere when coordinates were just so in Frink's 3-D routines.

New in Frink 2023-09-20 (Sep 22, 2023)

  • Added getBitBool[num, bit] function to return the specified bit of an integer as a boolean value.

New in Frink 2023-08-18 (Aug 20, 2023)

  • Added several functions for querying Unicode properties of characters and strings, for example, querying the Unicode block property. See the Unicode Properties section of the documentation for details.
  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.

New in Frink 2023-07-31 (Aug 2, 2023)

  • Added new dimension names electric_resistivity with dimensions ( ohm m ) and its reciprocal electric_conductivity with dimensions 1 / (ohm m) for use of bulk properties of materials (which is relevant to the current "superconductor" discussion.)

New in Frink 2023-07-04 (Jul 6, 2023)

  • The VoxelArray.union methods now allow you to pass in up to 1 undef argument in which case the non-undef object will be copied. This makes it easier to make unions of multiple objects. See Frink's 3-D routines.
  • Added the sample program caltrops.frink to generate a caltrops for 3-D printing. Don't step on it.

New in Frink 2023-07-01 (Jul 2, 2023)

  • Added a new, much more flexible planarEmboss method to Frink's VoxelArray class. These allow you to emboss a bitmap into the top of an object and add or remove from the surface of the object with variable depth based on the gray level of the pixels.. This lets, you, say, etch text or images or textures into an object. See Frink's 3-D routines. Also see the sample programs planarEmbossTest.frink for an example of its use.

New in Frink 2023-06-14 (Jun 19, 2023)

  • The parseInt[str, base] function can now take an array (or other enumerating expression) of strings as input.

New in Frink 2023-06-12 (Jun 19, 2023)

  • Fixed a problem in the jar file so the constraint solver classes could be constructed by name. Thanks to Hakan Kjellerstrand for the report.
  • Added a new, much more flexible sphericalEmboss method to Frink's VoxelArray class. These allow you to "wrap" a bitmap around any object and add or remove from the surface of the object with variable depth based on the gray level of the pixels.. This lets, you, say, etch text or images or textures into an object. See Frink's 3-D routines. Also see the sample programs sphericalEmbossGrayTest.frink for an example of its use.
  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.
  • Released a new version of Frink: The Next Generation (version 2023-06-12). This merges all changes from the main branch.

New in Frink 2023-06-11 (Jun 19, 2023)

  • Added a new, much more flexible cylindricalEmboss method to Frink's VoxelArray class. These allow you to "wrap" a bitmap around any object and add or remove from the surface of the object with variable depth based on the gray level of the pixels.. This lets, you, say, etch text or images or textures into an object. See Frink's 3-D routines. Also see the sample programs cylindricalEmbossGrayTest.frink for an example of its use.
  • Added an unzip function to seperate the columns of an array or other enumerating expression into seperate arrays.

New in Frink 2023-05-24 (Jun 19, 2023)

  • Fixed some formatting in MathML.frink which raised a ConformanceException when formatting some multiplication and exponentiation expressions which had units with dimensions as their first argument.

New in Frink 2023-05-23 (May 24, 2023)

  • Added a first cut at a rudimentary Constraint Programming solver! This will be extended in the future. It is already able to solve some interesting constraint problems.
  • constraintAllDifferent.frink - Tests the allDifferent constraint.
  • constraintSudoku.frink and constraintSudokuTest.frink - Uses the allDifferent constraint to solve any Sudoku problem, no matter how difficult (and find all possible solutions if there are multiple solutions) in just a few lines of code.
  • constraintNQueens.frink - a solver for an arbitrarily-large N-queens problem.
  • constraintSorter.frink - demonstrates less than, greater than, equals constraints, etc.
  • Added the MathML.frink library to format Frink expressions in "standard" mathematical notation using the MathML standard (including stuff like square root symbols, stacked fractions, raised exponents, etc.) MathML Presentation has been supported in Firefox for a long time and was recently added to Google Chrome.
  • The amazing Frink system-of-equations solver and, to a lesser extent, the single-equation solver can now typeset equations in standard mathematical form using MathML and the above library! Just click the "MathML" button if your browser supports it!
  • For example, see this quadratic equation solver.
  • Added floodFill method to Frink's VoxelArray class. This allows you to fill an object and, say, compute its volume. See Frink's 3-D routines. Also see the sample program floodFillTest.frink for an example of its use.
  • Added cylindricalEmboss and sphericalEmboss methods to Frink's VoxelArray class. These allow you to "wrap" a bitmap around any object and add or remove from the surface of the object where the pixels in the bitmap are dark. This lets, you, say, etch text or images into an object. See Frink's 3-D routines. Also see the sample programs cylindricalEmbossTest.frink and sphericalEmbossTest.frink for an example of their use.
  • Added multiple coordinate transformations to Frink's graphics libraries. These allow you to convert between alt-azimuth, spherical, and cylindrical coordinates.
  • The Matrix.frink sample program has added and improved algorithms for calculating many decompositions of matrices including QR decomposition and calculating least-squares fit to a system of equations, allowing you to perform a best-fit algorithm to a curve.
  • Added sample programs LeastSquares.frink and LeastSquaresTest.frink to demonstrate fitting curves to arbitrary equations, and calculating the goodness of their fits.
  • Added a fast version of Floyd's algorithm to Graph.frink, allowing you to calculate the lengths of all shortest paths between all nodes in a graph in an efficient fashion.

New in Frink 2023-03-18 (May 24, 2023)

  • The initial value of all of the elements of a new Java array can be specified with the three-argument version of the function: newJavaArray[classname, length, initValue]
  • This is much simpler than doing the same thing in Java, especially when initializing multidimensional arrays!

New in Frink 2023-02-10 (May 24, 2023)

  • Added functions allSame[expr] and allDifferent[expr] functions to test if all the elements of an array or other Enumerating Expression are same or different respectively. See the Enumerating Expression Functions sections of the documentation for more.

New in Frink 2023-01-30 (Feb 1, 2023)

  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.
  • Updated final UK currency data for 2022.
  • Refactored file-reading functions like read, readLines, and lines to allow reading from more Java data types including java.io.File, java.io.InputStream, and java.net.URL.
  • Added getSymbolsAsSymbols[expr] function.

New in Frink 2023-01-05 (Jan 6, 2023)

  • Added minmax[array] function to return the smallest and largest items in an array simultaneously. The return value is a two-item array [min, max]

New in Frink 2022-12-31 (Jan 3, 2023)

  • Updated copyright dates for 2023. Happy New Year!
  • Updated sanity checks to 2023 for economic routines.
  • Updated calculations and predictions for deltaT for 2023. It is currently hardcoded to 69.164 s.
  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.
  • Released a new version of Frink: The Next Generation (version 2022-12-31). This merges all changes from the main branch.
  • Released a new version of the frink-tng.war file from Frink: The Next Generation (version 2022-12-31).

New in Frink 2022-12-13 (Dec 14, 2022)

  • The International System of Units (SI) has been approved to have 4 new prefixes to extend beyond the yotta (1024) and the yocto (10-24). Frink now contains these prefixes in its standard data file.

New in Frink 2022-12-12 (Dec 14, 2022)

  • Updated the new library for processing graphs (graphs in the graph-theoretical sense of an object with nodes and edges) called Graph.frink to have sanity checks for all of the findShortestPath... algorithms to ensure that the start node and end node are actually in the graph.
  • In addition to the above, all of the findShortestPath... algorithms now reliably return undef if there is no path from the start node to the end node. Previously, they could loop forever or throw errors inside the methods.
  • Updates to the Tree.frink sample library for tree manipulation and traversal include a dump method to print an indented text representation of a Tree's structure.

New in Frink 2022-12-08 (Dec 9, 2022)

  • Important: Fixed a potential problem when calling from a class method to a function outside the class. In some cases, the class's internal variables could be accidentally modified. Please update as soon as possible.
  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.
  • Released a new version of Frink: The Next Generation (version 2022-12-08). This merges all changes from the main branch.
  • Released a new version of the frink-tng.war file from Frink: The Next Generation (version 2022-12-08).

New in Frink 2022-12-07 (Dec 9, 2022)

  • Updates to the Tree.frink sample library for tree manipulation and traversal include a rename of fields from "value" to "name" and added a "data" field. Some functions have been renamed to avoid confusion.

New in Frink 2022-12-04 (Dec 5, 2022)

  • array.transpose[] no longer fails on an empty array.
  • Added knapsack.frink and knapsackTest.frink sample programs with solvers for various versions of the Knapsack Problems (which are about fitting the most valuable items into a knapsack of fixed capacity.)
  • I have a feeling that the Advent of Code problems will have a knapsack-packing problem this year. Day 3 was about rucksacks...
  • Updates to the Tree.frink sample library for tree manipulation and traversal include an API change for traversing trees.

New in Frink 2022-11-29 (Dec 5, 2022)

  • The Matrix.frink sample program has added and improved algorithms for calculating many decompositions of matrices including QR decomposition and calculating least-squares fit to a system of equations, allowing you to perform a best-fit algorithm to a curve.

New in Frink 2022-11-20 (Dec 5, 2022)

  • The Matrix.frink sample program has added and improved algorithms for calculating many decompositions of matrices including the Cholesky-Crout and Cholesky-Banachiewicz decompositions, and calculating transpose and conjugate operations.

New in Frink 2022-11-07 (Dec 5, 2022)

  • Frink's web servers have been upgraded to much faster networking. Please let me know if you find anything that's not working.

New in Frink 2022-11-04 (Dec 5, 2022)

  • Updated the definition of the unit gasoline to match U.S. EPA definitions for the MPGe (miles per gallon electric). The MPGe was defined to be the number of miles that can be traveled by an electric vehicle using 33.7 kWh of energy. This changes the energy density in the unit gasoline from 1.4e8 J/gallon (which is about 38.88 kWh/gallon) to 33.70 kWh/gallon.
  • The previous definition may have been more accurate for very efficient combustion of gasoline, but this makes it match with EPA definitions and the MPGe. Please see the standard data file for more information about this change and to see current uncertainties and historical variations in the energy content of gasoline and other fuels.
  • Added the MPGe and its synonym mpge (for symmetry with the existing all-lowercase mpg) to represent miles per gallon electric. This unifies the current definition of the unit gasoline to match the MPGe.

New in Frink 2022-10-18 (Oct 18, 2022)

  • The method array.shuffle[] now returns the shuffled array so methods can be chained.
  • The trim[string] function can now be applied to arrays of strings.
  • Improved the error message and removed an exception when trying to verify that a class implements an interface when the class implements no interfaces.

New in Frink 2022-10-17 (Oct 18, 2022)

  • Added the array method array.get[index, altValue] which can be used to look up the value corresponding to the non-negative integer index or return the alternate value altValue if the array does not contain that index.

New in Frink 2022-10-10 (Oct 11, 2022)

  • Updated sanity checks for Java 18 and 19.
  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.

New in Frink 2022-10-04 (Oct 11, 2022)

  • Updated the new library for processing graphs (graphs in the graph-theoretical sense of an object with nodes and edges) called Graph.frink by fixing the breadth-first search algorithm (to use a queue instead of a stack) and adding a breadth-first traversal algorithm for user programs.

New in Frink 2022-09-28 (Sep 29, 2022)

  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.

New in Frink 2022-09-18 (Sep 19, 2022)

  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.

New in Frink 2022-09-12 (Sep 13, 2022)

  • Added a readBytes[url] function to read to an array of byte.
  • Made some (hopefully invisible) internal changes to the read function for better error-handling.
  • Fixed three-argument function base64Encode[expression, encoding,lineLength] to work correctly when expression is a Java array of bytes and the encoding is undef.

New in Frink 2022-09-11 (Sep 12, 2022)

  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.

New in Frink 2022-09-08 (Sep 9, 2022)

  • Added getColumn and setColumn methods and functions for two-dimensional arrays. See the Column Operations section of the documentation for more details.

New in Frink 2022-09-04 (Sep 5, 2022)

  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.

New in Frink 2022-08-31 (Sep 5, 2022)

  • Updated the new library for processing graphs (graphs in the graph-theoretical sense of an object with nodes and edges) called Graph.frink with A* search.
  • Updated the sample program GraphTest.frink with tests of A* search.

New in Frink 2022-08-28 (Sep 5, 2022)

  • Updated the new library for processing graphs (graphs in the graph-theoretical sense of an object with nodes and edges) called Graph.frink with Prim's algorithm for finding a minium spanning tree and Kruskal's algorithm for finding a minimum spanning forest. This update also adds many new functions for iterating through edges in a graph and a copy constructor.
  • Updated the sample program GraphTest.frink with tests of Kruskal's algorithm, and many improvements to readability of other tests.

New in Frink 2022-08-23 (Sep 5, 2022)

  • Updated the new library for processing graphs (graphs in the graph-theoretical sense of an object with nodes and edges) called Graph.frink with the breadth-first algorithm for finding the shortest path in a graph that has all equal weights.
  • Updated the sample program GraphTest.frink with tests of the breadth-first shortest-path algorithm.

New in Frink 2022-08-22 (Sep 5, 2022)

  • Updated the new library for processing graphs (graphs in the graph-theoretical sense of an object with nodes and edges) called Graph.frink with the Bellmann-Ford algorithm for finding the shortest path in a graph that has negative weights for edges.
  • Updated the sample program GraphTest.frink with a test of the Bellman-Ford shortest-path algorithm.

New in Frink 2022-08-19 (Sep 5, 2022)

  • Added a new library for processing graphs (graphs in the graph-theoretical sense of an object with nodes and edges) called Graph.frink. This currently has algorithms to find shortest paths in a directed or undirected graph.
  • The sample program GraphTest.frink demonstrates how to use Graph.frink to solve various problems such as mazes, adjacency matrices, and problems from various programming competitions.

New in Frink 2022-07-31 (Aug 1, 2022)

  • Added functions mostCommon[vals] and leastCommon[vals] which are specializations of the countToArray[vals] that only return the most or least common item(s) in a collection. See the Enumerating Expression Functions sections of the documentation for more.
  • Released a new version of Frink: The Next Generation (version 2022-06-09). This merges all changes from the main branch.

New in Frink 2022-07-25 (Jul 26, 2022)

  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.

New in Frink 2022-06-30 (Jul 1, 2022)

  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.

New in Frink 2022-06-11 (Jun 15, 2022)

  • Added a missing class to the jar file.

New in Frink 2022-06-09 (Jun 15, 2022)

  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.
  • Released a new version of Frink: The Next Generation (version 2022-06-09). This merges all changes from the main branch.

New in Frink 2022-06-07 (Jun 15, 2022)

  • Added columnize[array, columns] function which turns a one-dimensional array (or enumerating expression) into a two-dimensional array with columns number of columns. This can be used with the table formatting functions above to pretty-print a large array in columns for display. See the Formatting Tables section of the documentation for details.

New in Frink 2022-05-23 (May 24, 2022)

  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.

New in Frink 2022-05-20 (May 24, 2022)

  • Generalized more solvers to terms which contain both a cos[x]2 plus b sin[x]2 terms to the trignonometric solvers in solveTrigonometric.frink. These can now solve equations like cos[x]^2 - 13 sin[x]^2 = 10 tan[z/4].

New in Frink 2022-05-08 (May 24, 2022)

  • Added more solvers to terms which contain both cos[x] and sin[x] terms to the trignonometric solvers in solveTrigonometric.frink.

New in Frink 2022-05-07 (May 24, 2022)

  • Added a new Unicode character search sample Frink Server Pages page. This lets you search all Unicode character names for a pattern (specified as a case-insensitive regular expression.)
  • Added a link to the amazing Frink system-of-equations solver to the Frink Server Pages document. Of all the things Frink has ever achieved, this solver is probably the pinnacle.

New in Frink 2022-05-05 (May 6, 2022)

  • Updated links in the FAQ to more modern NIST Handbooks and fixed internal links in Special Publication 811. NIST Handbook 133 apparently supersedes NIST Handbook 44.
  • Added paintAlongHull method to Frink's VoxelArray class. This allows you to move a tool along the hull of a 3-D object, adding or removing material from the object and making larger or smaller. This can be used to give a "rounded" shape and is similar to the Minkowski sum method in tools like OpenSCAD. See Frink's 3-D routines.
  • Released a new version of Frink: The Next Generation (version 2022-05-05). This merges all changes from the main branch.
  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.

New in Frink 2022-04-27 (Apr 28, 2022)

  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.

New in Frink 2022-04-18 (Apr 19, 2022)

  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.

New in Frink 2022-04-01 (Apr 5, 2022)

  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.
  • Released a new version of Frink: The Next Generation (version 2022-04-01). This merges all changes from the main branch.

New in Frink 2022-03-16 (Mar 17, 2022)

  • Added function URLDecode[str, encoding="UTF8"] to decode part of a URL.
  • Added default encoding "UTF8" to the function URLEncode[str, encoding="UTF8"] to encode part of a URL.

New in Frink 2022-03-13 (Mar 15, 2022)

  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.
  • Added function lcm[array] which returns the least common multiple of an array (or enumerating expression) of integers.
  • Added function gcd[array] which returns the greatest common denominator of an array (or enumerating expression) of integers.

New in Frink 2022-03-10 (Mar 15, 2022)

  • The range operator can now take single-character strings as bounds.

New in Frink 2022-03-09 (Mar 15, 2022)

  • Added a formatMatrixCompact function which can format a table with Unicode bracket characters making traditional matrix brackets surrounding it. This is smaller than formatMatrix. See the Formatting Tables section of the documentation for details.

New in Frink 2022-03-03 (Mar 15, 2022)

  • Released a new version of Frink: The Next Generation (version 2022-03-03). This merges all changes from the main branch.

New in Frink 2022-03-02 (Mar 3, 2022)

  • Fixed an issue in the cached currency file which caused currency conversions not to read from cache.
  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.

New in Frink 2022-02-21 (Feb 22, 2022)

  • Updated Historical British Price Data for the final data for the year 2021.
  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.

New in Frink 2022-02-14 (Feb 15, 2022)

  • Added a new constructor to construct a java.util.Comparator that uses a Frink function to perform the comparisons. See the Iterating over Java Collections section of the documentation for more.

New in Frink 2022-01-30 (Jan 31, 2022)

  • Added method dict.get[key, altValue=undef] which be used to look up the value corresponding to the key or return the alternate value altValue if the dictionary does not contain that key. See the Dictionary Methods section of the documentation for more.
  • Added samples of sorting dictionaries by key or value. See the Dictionary Methods section of the documentation for more.

New in Frink 2022-01-27 (Jan 31, 2022)

  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.

New in Frink 2022-01-17 (Jan 31, 2022)

  • Made an improvement to greatCircleMap.frink which draws world maps centered on your location. The names of the countries are now centered around the untransformed polygon, making country names closer to the edge of the map to be located better.

New in Frink 2022-01-11 (Jan 12, 2022)

  • Fixed a null pointer exception in the nth function when requesting an item off the end of an enumerating expression.

New in Frink 2022-01-07 (Jan 9, 2022)

  • Reverted the recent change to char[array] that changed its behavior by returning an array of separate characters.

New in Frink 2021-12-31 (Jan 3, 2022)

  • Updated copyright dates for 2022. Happy New Year!
  • Updated sanity checks to 2022 for economic routines.
  • Updated calculations and predictions for deltaT for 2022. It is currently hardcoded to 69.294 s. USNO's servers that typically serve this information and predictions have been down for at least 27 months.
  • Released a new version of Frink: The Next Generation (version 2021-12-31). This merges all changes from the main branch.

New in Frink 2021-12-23 (Dec 24, 2021)

  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.

New in Frink 2021-12-19 (Dec 20, 2021)

  • Made CoordinateTransformer3DFloat.IDENTITY public. This class was very useful in Advent of Code 2021 Day 19.
  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.

New in Frink 2021-12-11 (Dec 12, 2021)

  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.

New in Frink 2021-12-04 (Dec 5, 2021)

  • Added single-argument method dict.increment[key] which is similar to the two-argument dict.increment[key, increment] but which always increments by 1.

New in Frink 2021-11-26 (Nov 29, 2021)

  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.

New in Frink 2021-11-14 (Nov 17, 2021)

  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.

New in Frink 2021-10-30 (Nov 17, 2021)

  • Added multiple convenience methods for creating cylinders from frink.graphics.Point3DFloat objects in Frink's VoxelArray class.

New in Frink 2021-10-29 (Oct 31, 2021)

  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.

New in Frink 2021-10-23 (Oct 24, 2021)

  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.

New in Frink 2021-10-17 (Oct 24, 2021)

  • Released a new version of Frink: The Next Generation (version 2021-10-17). This merges all changes from the main branch.

New in Frink 2021-10-14 (Oct 15, 2021)

  • Added function toASCIIHigh[str] to convert a string to a 7-bit ASCII safe representation that can be passed as input to Frink. This differs from the existing toASCII[str] in that it keeps high Unicode codepoints (above uFFFF as a single Unicode codepoint in a format that looks like u{1F384}.
  • Added several functions for querying Unicode properties of characters and strings, for example, querying the Unicode General Category property. See the Unicode Properties section of the documentation for details.

New in Frink 2021-10-10 (Oct 12, 2021)

  • Added isNegativeUnit[expr/I>] function which returns true if the expression is a unit of any kind (including dimensionless numbers) with a negative sign, false otherwise.
  • Updated the sample program, formatEquation.frink to print subtraction operations more like standard mathematical notation.

New in Frink 2021-10-06 (Oct 8, 2021)

  • Updated function formatBracketsCompact[expr] to format a table surrounded by Unicode square bracket characters, or ordinary square brackets if it fits into a single line. Brackets are now smaller (putting brackets only on the sides) and use better Unicode characters. See the FormattingTables section of the documentation for details.
  • Updated the sample program, formatEquation.frink, which demonstrates using table formatting functions to format equations into standard mathematical format, to use more compact brackets and parentheses.
  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.

New in Frink 2021-09-30 (Oct 1, 2021)

  • Added functions rotateLeft and rotateRight to rotate the bits of an integer left or right by a specified number of bits. See the Number Theory section of the documentation for more information.
  • Released a new version of Frink: The Next Generation (version 2021-09-30). This merges all changes from the main branch.
  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.

New in Frink 2021-09-25 (Sep 28, 2021)

  • Further updates to secant.frink to fix a divide-by-zero error in secant[x] in some cases. Thanks to Dr. Alberto Di Lullo for the bug report. Additional contributions to making these functions even more robust are welcome.
  • If you always want to sort a multi-dimensional array by column number, you can easily get an appropriate sorting function that sorts by a specified column by calling byColumn[int] and passing that as a sorting function. The column number is zero-based. For example, sort[list, byColumn[1]]. See the sorting section of the documentation for examples.

New in Frink 2021-09-24 (Sep 28, 2021)

  • Released a new version of Frink: The Next Generation (version 2021-09-24). This merges all changes from the main branch.
  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.

New in Frink 2021-09-22 (Sep 28, 2021)

  • Fixes to the exactSeasons program that calculates the equinoxes and solstices to high accuracy by adding a new function to secant.frink that works more correctly when finding angles around zero. This was causing autumnal equinox calculations that were off by exactly one hour.
  • Performance improvements for VoxelArray.makeSphere in Frink's VoxelArray class. See Frink's 3-D routines.

New in Frink 2021-09-17 (Sep 19, 2021)

  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.
  • Added libraries to generate screw threads for 3-D printing. These are available in the following files:
  • screwThreadsTest3Start.frink (generates a 3-start thread)
  • screwThreadsTest.frink (generates standard garden hose fittings)
  • screwThreads.frink (contains routines to parametrically generate screw threads)
  • parametric3D.frink (contains smart algorithms to move a tool based on a parametrized function in 3D.)

New in Frink 2021-08-24 (Aug 26, 2021)

  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.

New in Frink 2021-08-15 (Aug 15, 2021)

  • Added function< CODE>formatParensCompact[expr] to format a table surrounded by Unicode square bracket characters, or ordinary square brackets if it fits into a single line. See the FormattingTables section of the documentation for details.
  • Added a sample program, formatEquation.frink, which demonstrates a first cut at formatting equations into standard mathematical format.

New in Frink 2021-08-12 (Aug 15, 2021)

  • Added function getOperatorSymbol[expr] which returns the symbol for an expression that represents a mathematical operator like "+" or "*" as a string. See the Other Functions section of the documentation for details.
  • Added functions formatParens[expr] and formatParensCompact[expr] to format a table surrounded by Unicode parenthesis characters. See the FormattingTables section of the documentation for details.

New in Frink 2021-08-10 (Aug 11, 2021)

  • Added functions isOperator[expr] and getOperatorPrecedence[expr] to determine if an expression represents a mathematical operator like + or *. See the Other Functions section of the documentation for details.
  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.

New in Frink 2021-07-27 (Jul 28, 2021)

  • If you are using a Java data structure that puts Frink or Java data types into a data structure that needs a java.util.Comparator to perform the comparisons (e.g. java.util.PriorityQueue,) you can get Frink's default comparator (which follows the same semantics as Frink's three-way comparison operator , you can get a java.util.Comparator by calling getDefaultComparator[]. Frink's default comparator will also compare Java objects that implement the java.util.Comparable interface so it can be used for Frink and Java data types.
  • Added new methods for creating solids of rotation to Frink's VoxelArray class, to create a variety of shapes. See Frink's 3-D routines.
  • See the sample program VoxelSolidOfRotation.frink for a demonstration of making solids of rotation. This program makes nice little 3-D nameplates or chopstick rests for 3-D printing.

New in Frink 2021-07-03 (Jul 5, 2021)

  • Updated the currency conversion source to work again. As always, the availability of internet-based sources cannot be guaranteed and this fix may be temporary.
  • Note: Currency conversions will probably not work in Java 1.6 and before because they do not support Diffie-Hellman key exchanges larger than 1024 bits and the internet-based source uses 3072-bit keys.
  • Released a new version of Frink: The Next Generation (version 2021-07-03). This merges all changes from the main branch.

New in Frink 2021-07-02 (Jul 5, 2021)

  • Note: The currency conversion source that Frink uses has gone away and probably won't return. Currency conversions will not work correctly until a new source is found. Please let me know if you know a free currency conversion source.
  • Updated the currency conversion cache.

New in Frink 2021-06-25 (Jun 27, 2021)

  • Fixed some VoxelArray functions to correctly use the new extended range allowed by the new BiggerBitSet implementation.
  • Added getNextSetBitIndex and getPreviousSetBitIndex methods to VoxelArray.
  • Added getMinSetZ and getMaxSetZ methods to VoxelArray.

New in Frink 2021-06-11 (Jun 13, 2021)

  • Rewrote many of the internals of VoxelArray for 3-D printing. Most importantly, it was rewritten to use an improved BitSet, called BiggerBitSet.
  • BiggerBitSet is an improvement on Java's java.util.BitSet class in a few ways:
  • BiggerBitSet uses long instead of int to address bits in its API which greatly increases the size of bits addresable. The implementation of BitSet allows a maximum number of pixels of (2^31 - 1) or 2147483647, which is about 2 billion pixels. If 3-D printing at a resolution of 0.1 mm/pixel, this gives a maximum size of about 5.07 inches on a side.
  • ((2^31-1))^(1/3) 0.1 mm -> in
  • This is not quite big enough to fit a modern 3-D printer's bed.
  • With this class's API, the number of pixels is increased by a factor of 64. The calculation is: ((2^31-1) * 64)^(1/3) 0.1 mm -> in
  • which gives a cube of about 20 inches on a side. This is enough of an improvement to warrant the class.
  • BiggerBitSet does not not allow itself to be dynamically resized; this should give a performance improvement over BitSet. BitSet takes a lot of effort to check dynamic ranges, to validate invariants and resize with every set operation.
  • BiggerBitSet is constant across Java releases and implements functions (especially those to set a range of values quickly and efficiently) which did not exist in earlier versions of Java's BitSet.

New in Frink 2021-06-09 (Jun 10, 2021)

  • A dictionary is now hashable; this means that you can use a dict as the key in a dictionary, add it to a set, etc. Be sure not to modify the dictionary after inserting it into another data structure, or results will be undefined (and probably wrong.)
  • Released a new version of Frink: The Next Generation (version 2021-06-09). This merges all changes from the main branch.

New in Frink 2021-06-02 (Jun 3, 2021)

  • Added new functions for extruding while scaling and rotating polygons to Frink's VoxelArray class, to create a variety of shapes.

New in Frink 2021-05-30 (May 31, 2021)

  • Fixed writing of some special characters when writing graphics to HTML canvas format. For example, the ampersand character & was encoded incorrectly using HTML encoding rules instead of the necessary JavaScript encoding rules.

New in Frink 2021-05-21 (May 23, 2021)

  • Added several classes and functions for drawing parametric curves to Frink's VoxelArray class, to create a variety of shapes. See Frink's 3-D routines.
  • Added a new program, parametric3D.frink to demonstrate drawing 3-D curves for 3-D printing using parametric equations. This allows drawing of screw threads, for instance.
  • Fixed a problem with the definition of earthvolume in the standard data file.

New in Frink 2021-04-22 (Apr 23, 2021)

  • Fixed the charName and charNames functions to return an empty string (rather than a null or crashing) if a Unicode codepoint is undefined or if the Java Virtual Machine does not know its name (JVMs lag far behind the latest Unicode definitions.)

New in Frink 2021-04-10 (Apr 11, 2021)

  • Added a method, makeSupertoroid to Frink's VoxelArray class, to create a torus or other members of the toroid family. See Frink's 3-D routines.
  • Revised the arguments to VoxelArray.construct to be double instead of float for flexibility. See Frink's 3-D routines.
  • Improved error messages when parsing. If a program contains an unrecognized character, the error message also displays the Unicode name of the codepoint.

New in Frink 2021-03-28 (Apr 11, 2021)

  • Added a method to Frink's VoxelArray class, to extrude an image or text onto a specific plane. See Frink's 3-D routines.
  • Released a new version of Frink: The Next Generation (version 2021-03-28). This merges all changes from the main branch.

New in Frink 2021-03-23 (Apr 11, 2021)

  • Added a method to Frink's VoxelArray class, fillCube which draws a 3-D cuboid. See Frink's 3-D routines.
  • Added a fabulously powerful yet simple program, graph3D.frink, which graphs arbitrarily-complicated 3D equations and creates a file for 3-D printing.

New in Frink 2021-03-22 (Mar 23, 2021)

  • Added function img.getPixelGrayInt[x,y] to return the color of a pixel as a grayscale from 0 to 255 inclusive. This is meant for quick processing and does not perform any perceptual encoding. See the images documentation for more.
  • Added a method to Frink's VoxelArray class, strokeZTapered which allows drawing in 3-D along a polyline or polygon with a tapered tool. See Frink's 3-D routines.
  • Updated Historical British Price Data for final data from 2020.
  • Added polygon.isInside[x, y] method to test if a point is inside a polygon using the even-odd rule. See Polygon Methods for more information.

New in Frink 2021-03-17 (Mar 19, 2021)

  • Modified the table formatting functions so that centered text is biased toward the right so that numbers and negative signs line up better.
  • The Matrix.frink sample program has added and improved algorithms for matrix inversion, calculating the adjugate of a matrix, and improved determinant calculations. The Matrix class is still woefully incomplete but feel free to contribute unimplemented functions!

New in Frink 2021-03-12 (Mar 19, 2021)

  • Fixed the order of rotations in VoxelArray.rotateXYZ. When composing 3-D matrix transforms, you have to multiply them in reverse order! See Frink's 3-D routines.

New in Frink 2021-03-11 (Mar 19, 2021)

  • Additions and changes to Frink's 3-D routines, including extrusion of polygons and rotations.
  • Added functions to produce the Unicode names of characters from either strings or arrays of integers. See the Unicode in Strings sections of the documentation for the charName and charNames functions. For example:
  • charNames["u{1f63a}!"]
  • [SMILING CAT FACE WITH OPEN MOUTH, EXCLAMATION MARK]

New in Frink 2021-03-05 (Mar 8, 2021)

  • Lots of additions and changes to Frink's 3-D routines, including extrusion of polygons, scaling routines, and more.

New in Frink 2021-02-03 (Feb 5, 2021)

  • Added the function symmetricDifference[a, b] which calculates the "symmetric difference", also known as the "disjunctive union" of sets a and b. In other words, the new set contains only the elements that are in either set a or b but not in both. For example, the symmetric difference of the sets {1,2,3} and {3,4} is {1,2,4}.
  • For more information, see the Sets section of the documentation.

New in Frink 2021-02-02 (Feb 5, 2021)

  • Fixed an issue that manifested as a NoClassDefFoundError for frink.graphics.FrinkImage. The problem was caused by the obfuscator. Thanks to Ty Boyack for the report.
  • Released a new version of Frink: The Next Generation (version 2021-02-02). This merges all changes from the main branch.

New in Frink 2021-01-28 (Feb 1, 2021)

  • Added a formatTableInput function to format a 2-dimensional table into Frink's inputForm so that it can be parsed by Frink, passed to the eval function, pasted into a Frink program, etc. See the Formatting Tables section of the documentation for details.
  • Added some cool examples of recursive table formatting to format equations and Frink source code to the Formatting Tables section of the documentation.

New in Frink 2021-01-10 (Jan 11, 2021)

  • Fixed a bug in calling functions like addLeap that manifested as a NoClassDefFoundError for frink.date.LeapSeconds. The problem was caused by the obfuscator. Thanks to Tobias Jordan for the report.
  • Released a new version of Frink: The Next Generation (version 2021-01-10). This merges all changes from the main branch.

New in Frink 2021-01-01 (Jan 11, 2021)

  • Added new startup options for Frink:
  • When using the frink.gui.FrinkStarter class, the -1 command-line option will start Frink in one-line input mode (default is two-line input mode). This is similar to starting Frink and choosing the menu item Mode | One-Line or hitting Ctrl-1.
  • When using the frink.gui.FrinkStarter class, the -3 command-line option will start Frink in multi-line input mode (default is two-line input mode). This is similar to starting Frink and choosing the menu item Mode | Multi-Line or hitting Ctrl-3.
  • See the Running Frink section of the documentation for more details.

New in Frink 2020-12-31 (Jan 4, 2021)

  • Updated copyright dates for 2021. Happy New Year!
  • Updated sanity checks to 2021 for economic routines.
  • Updated calculations and predictions for deltaT for 2021. It is currently hardcoded to 69.359 s (it has been 69.184 s for the past 3 years.) USNO's servers that typically serve this information and predictions have been down for at least 15 months.
  • Released a new version of Frink: The Next Generation (version 2020-12-31). This merges all changes from the main branch.

New in Frink 2020-12-14 (Dec 15, 2020)

  • Fixed a bug in the rest[array] function that produced a program crash.
  • Added the function setBit[n, bit] which sets the specified bit of a number (least significant bit is 0) to 1 and returns a new number. This is equivalent to bitOr[n, shiftLeft[1, bit]]
  • Added the function clearBit[n, bit] which clears the specified bit of a number (least significant bit is 0) to 0 and returns a new number. This is equivalent to bitAnd[n, bitNot[shiftLeft[1, bit]]]
  • Added the function flipBit[n, bit] which flips the specified bit of a number (least significant bit is 0) and returns a new number. This is equivalent to bitXor[n, shiftLeft[1, bit]]
  • Released a new version of Frink: The Next Generation (version 2020-12-14). This merges all changes from the main branch.

New in Frink 2020-11-27 (Dec 1, 2020)

  • Added a convenience method to turn a graphics object into a bitmapped image: graphics.toImage[width, height]
  • which is identical to the image constructor: new image[graphics, width, height]
  • In both of the above functions to turn a graphics object into an image, now if exactly one of width or height are specified as undef, and the other is an integer, the size of the undefined axis will be calculated from the defined width or height and the aspect ratio of the graphics that is being drawn.
  • Released a new version of Frink: The Next Generation (version 2020-11-27). This merges all changes from the main branch.

New in Frink 2020-11-17 (Nov 20, 2020)

  • Added the ability to rotate a VoxelArray to Frink's 3-D routines. See the VoxelRotateTest.frink sample program. This makes almost feature-completeness to 3D modeling.
  • Released a new version of Frink: The Next Generation (version 2020-11-17). This merges all changes from the main branch.

New in Frink 2020-11-10 (Nov 11, 2020)

  • Added a rounded cube primitive to Frink's 3-D routines. See the roundedCubeTest.frink sample program.

New in Frink 2020-11-09 (Nov 10, 2020)

  • Improved the Frink-Java mapping to allow a FrinkImageExpression to be used where a FrinkImage is required. This enables some features in 3-D printing, notably extruding an image to 3 dimensions.
  • Added provisional Javadocs for Frink's 3-D routines. These will change and are intended for use in 3-D printing, and not realtime 3-D rendering. The class you want to look at is VoxelArray which contains a lot of methods for drawing primitives (like cubes, spheres, cylinders, capped cylinders, tapered cylinders,) performing constructive solid geometry (that is, taking the intersection of two objects, the union of two objects, or the difference of two objects,) extruding images and text, and more.
  • To see samples of Frink's increasing support for 3-D printing, search the sample programs for voxel. For older programs that render Wavefront .obj file formats directly, search for wavefront.
  • Added an extrude method to the VoxelArray class which allows you to extrude the black pixels of an image as a 3-D object. See extrudeTest.frink for a sample of its usage.

New in Frink 2020-10-29 (Oct 30, 2020)

  • Added a formatMatrix function which can format a table with Unicode box-drawing characters making traditional matrix brackets surrounding it.. See the Formatting Tables section of the documentation for details.

New in Frink 2020-10-25 (Oct 30, 2020)

  • Updated the SSL/TLS certificates for https://frinklang.org/. Let me know if you have any trouble connecting.

New in Frink 2020-10-20 (Oct 22, 2020)

  • Fixed a build problem that made the 2020-10-17 release not work on some platforms. Sorry about that.

New in Frink 2020-10-17 (Oct 19, 2020)

  • Added a formatTableBoxed function which can format a table with Unicode box-drawing characters separating the cells. See the Formatting Tables section of the documentation for details.
  • Added lots more code for 3-D modeling and 3-D printing (which has not been documented and is currently changing).

New in Frink 2020-10-01 (Oct 2, 2020)

  • Improved the performance of the approxLn function in ArbitraryPrecision.frink (and all the functions that depend on it. This performance will be most evident in Frink: The Next Generation.
  • Added lots of code for 3-D modeling and 3-D printing (which has not been documented and is currently changing).

New in Frink 2020-08-23 (Aug 24, 2020)

  • Added the method image.autocrop[] which automatically crops the sides of an image where the pixels are approximately equal. This returns a new image.

New in Frink 2020-08-17 (Aug 18, 2020)

  • Fixed an error in Frink-Java mapping which produced the error "cannot fit in a float" when in fact the number could fit into a float. This manifested for zero and negative numbers.
  • Released a new version of Frink: The Next Generation (version 2020-08-17). This merges all changes from the main branch.

New in Frink 2020-08-09 (Aug 18, 2020)

  • Modified the planets.frink astronomy libraries to optionally allow filling in the shape of Jupiter when drawing its moons and also optionally filling in the shape of Saturn.
  • Added a new sample program, drawJupiterSaturn.frink which draws Jupiter and Saturn as they would look in the sky relative to each other. This is for the great Jupiter-Saturn convergence of 2020 where Jupiter and Saturn will gradually close from August 29, 2020 to be about 0.11 degrees away (about 1/5 the diameter of the full moon) from each other on December 21, 2020. This requires the updated planets.frink library described above.
  • Some minor HTML fixups.

New in Frink 2020-08-04 (Aug 5, 2020)

  • Fixed a bug in the zero-argument Writer.println[] method which may have caused the error message "AbstractExpressionFormatter.formatUnknown passed null expression!" to be displayed to the user and possibly written into the file.

New in Frink 2020-07-30 (Aug 5, 2020)

  • Fixed a silly error in the planets.frink astronomy libraries where the radius and mass of Planet.Mars were accidentally the radius and mass of planet Earth. Please update.
  • This did not affect anything about the orbit or position of Mars, nor did it affect the constants marsradius nor marsmass in the standard data file; it just exposed itself when accessing the planets.frink library and requesting the fields Planet.Mars.radius or Planet.Mars.mass
  • Added a drawVenus.frink sample program that draws Venus as it appears from Earth.
  • Added a drawPlanets.frink sample program that draws the illuminated parts of planets as they appear from Earth. This currently draws random colors and will be updated.

New in Frink 2020-07-28 (Jul 29, 2020)

  • Released a new version of Frink: The Next Generation (version 2020-07-28). This merges all changes from the main branch.

New in Frink 2020-07-27 (Jul 29, 2020)

  • Added dictionary methods dict.keys[] and dict.values[] to let you enumerate through the keys and values of a dictionary. (There was already a keys[dict] function.) See the Dictionary Methods section of the documentation for more.

New in Frink 2020-07-25 (Jul 26, 2020)

  • Released a new version of Frink: The Next Generation (version 2020-07-25). This merges all changes from the main branch.

New in Frink 2020-07-24 (Jul 26, 2020)

  • Refactored the sun.frink and planets.frink astronomy libraries. If you update one of these, update both!
  • Added functions for drawing Saturn and its rings.
  • Function SaturnRingPosition was renamed to SaturnEphemeris and calculates more parameters.
  • Unified drawing of illuminated fraction of moon and planets.
  • Added several function for drawing Jupiter and its moons in different orientations.
  • Refactored and unified axis drawing routines.
  • Added a sample program, JupiterSaturnConvergence.frink to calculate the great convergence of Jupiter and Saturn that peaks in December 2020.
  • Added a sample program, plotConvergence.frink, to plot the output of the convergatron.frink program which predicts planet and moon alignments.
  • Added a sample program, drawSaturn.frink, to draw the orientation of Saturn and its rings.

New in Frink 2020-07-15 (Jul 19, 2020)

  • Added a new function rest[expr, num] returns everything after the first num elements of an array or enumerating expression. If the expression passed in is an array, the result is an array, otherwise it is a (possibly-infinite) enumerating expression. This is the opposite of first[expr, num]
  • See the Slicing Arrays and Enumerating Expression Functions sections of the documentation for more.

New in Frink 2020-07-14 (Jul 19, 2020)

  • Fixed the definition of the trit in the standard data file. It was incorrectly listed as dimensionless, and should have had dimensions of bits. Thanks to Adam Haun for the correction.
  • Updated the following mathematical transformation rule libraries for better solving:
  • solvingTransformations.frink
  • solveTrigonometric.frink
  • derivatives.frink

New in Frink 2020-07-13 (Jul 19, 2020)

  • In Frink: The Next Generation, full Unicode character classes and full Unicode case folding is enabled by default. This fixes the broken behavior of the Java 1.6 release when running on Java 1.7 and later and makes the /uU regex options essentially unnecessary and obsolete.
  • Documented that Frink: The Next Generation no longer uses the POSIX character class codes that look like [[:Alpha:]] and [[:Digit:]] are no longer available and have been replaced with Unicode regular expression classes as specified in Unicode Technical Standard 18: Unicode Regular Expressions. See the Regular Expression Replacement documentation of Frink:TNG.
  • Released a new version of Frink: The Next Generation (version 2020-07-13). This merges all changes from the main branch.
  • Added a new sample program, TaylorSeries.frink which generates a symbolic Taylor series for a function.

New in Frink 2020-07-07 (Jul 8, 2020)

  • The functions wordList, lineBreakList, and sentenceList now have two-argument versions that allow you to specify a language specifier which uses different human language's rules for detecting words, sentences, and places to break lines. See the Correct String Parsing section for details.
  • Added an Additional Array Functions section to the documentation which makes it clear that other many functions will work on arrays.

New in Frink 2020-07-04 (Jul 5, 2020)

  • Released a new version of Frink: The Next Generation (version 2020-07-046). This merges all changes from the main branch.

New in Frink 2020-07-03 (Jul 5, 2020)

  • Added calculation of the second and third virial coefficients to water.frink which calculates properties of water and steam according to the IAPWS model. See the comments to find out just what the heck "virial coefficients" are.
  • Added countToArray[expr] and countToDict[expr] functions that count the number of times that each element occurs in an array or other enumerating expression and returns the number of occurrences of each item. The array version returns an array with the most common items first. These can be used to easily build frequency tables. See the Enumerating Expression Functions for more details.

New in Frink 2020-06-26 (Jul 5, 2020)

  • The formatTable function now can take any enumerating expression, instead of just an array as its input. See the Formatting Tables section of the documentation for details.
  • The formatTable function can format a one-dimensional array into column form. See the Formatting Tables section of the documentation for details.
  • The Swing and AWT GUIs now have the option for using a monospaced font. This can be selected from the View | Font menu item. This is helpful when using the above formatTable functions.
  • Added array methods array.isEmpty[] and array.peek[] which are useful when using an array as a stack. See the Pushing and Popping section of the documentation for details.
  • Released a new version of Frink: The Next Generation (version 2020-06-26). This merges all changes from the main branch.
  • The Matrix.frink sample library has new methods like matrix.formatMatrix[] which use the new formatTable function to format a matrix that really looks like a matrix, complete with efficient use of space and Unicode box-drawing brackets. The Matrix class is still woefully incomplete but feel free to contribute unimplemented functions!
  • Fixed a bug in the Matrix.frink sample library when creating a matrix from a non-square array.

New in Frink 2020-06-15 (Jul 5, 2020)

  • Documented some new date/time formatting options such as numerical day of week, new AM/PM options, etc. These may require an up-to-date Java Virtual Machine. See the defining new date/time formats section of the documentation for more.

New in Frink 2020-06-13 (Jun 15, 2020)

  • Added functions for formatting tables. See the Formatting Tables section of the documentation for details.

New in Frink 2020-05-31 (Jun 2, 2020)

  • Added array.dimensions[] method to return the dimensions of a possibly-multiple-dimension array. See the Dimensions array method documentation for details.

New in Frink 2020-05-23 (Jun 2, 2020)

  • The following formatting functions can now take an array, set, or most other enumerating expressions as the first expression, making it much easier to format a collection of data to a specific format. If the value is an array or other collection, these functions return an array of strings, which can then be formatted using other functions like join, joinln, etc.
  • formatSci[value, divideBy, decPlaces] (Scientific notation)
  • formatEng[value, divideBy, decPlaces] (Engineering notation)
  • formatSig[value, divideBy, decPlaces] (Significant figures)
  • formatFixed[value, divideBy, decPlaces] (Fixed decimal places)
  • Also:
  • Updated some sanity checks for the new Java 15.
  • Released a new version of Frink: The Next Generation (version 2020-05-23). This merges all changes from the main branch.

New in Frink 2020-05-20 (Jun 2, 2020)

  • Reordered the search order for function names. This should slightly improve execution speed.

New in Frink 2020-05-09 (Jun 2, 2020)

  • Released a new version of Frink: The Next Generation (version 2020-05-09). This merges all changes from the main branch.

New in Frink 2020-05-05 (May 6, 2020)

  • Added an inputFormUnicode formatter that is like inputForm but assumes you have a working Unicode environment and does not escape non-ASCII characters.

New in Frink 2020-05-02 (May 3, 2020)

  • Added a concat[array1, array2] function that concatenates the elements of two arrays (or other enumerating expressions.)

New in Frink 2020-04-27 (May 3, 2020)

  • Made several fixes to make regular expressions in Frink and Frink: The Next Generation work more to the same. These were primarily fixes to the original version of Frink:
  • Unified the behavior of uHHHH which matches a specified Unicode character, where HHHH is a 4-digit hexadecimal code indicating a Unicode codepoint.
  • The left- and right-hand side of a substitution expression can now accept high Unicode characters in both Frink and Java format, that is in the format u{h...h} (Frink notation) and x{h...h} (Java regex notation) where h...h represents from 1 to 6 hexadecimal digits that represent the desired Unicode codepoint.
  • The right-hand side of a substitution expression can now contain character escapes in the format xhh where hh represents exactly 2 hexadecimal digits that represent the Unicode character. These previously worked in the left-hand side but not the right-hand side.
  • The right-hand side of a substitution expression currently expressly can not contain some of the antiquated and problematic character escapes defined in Java's Pattern class. The unsupported patterns are:
  • Octal escapes beginning with (that dangerous notation dies with me!)
  • The alert (bell) character a (use u0007 instead)
  • The escape character e (use u001B instead)
  • The escape sequence for control characters cX (specify it with its Unicode character instead.)

New in Frink 2020-04-22 (May 3, 2020)

  • There is a new 3-argument version of makeArray[dimensions, function, data] which allows you to pass in arbitrary additional data to a function when creating an array. See the Initializing Arrays section of the documentation for examples.

New in Frink 2020-04-19 (May 3, 2020)

  • The makeArray[dims, value] function can now take a function as the value parameter. The function will be called to provide the value of each cell. See the Initializing Arrays section of the documentation for examples.
  • Released a new version of Frink: The Next Generation (version 2020-04-19). This merges all changes from the main branch.

New in Frink 2020-04-18 (Apr 20, 2020)

  • Added a new program to approximate the factorial of a number using Stirling's approximation, Stirling.frink. This program gives a naïve calculation of Stirling's approximation, along with better calculations and corrections, and Gosper's formula.
  • Updated the file Pochhammer.frink, to calculate the "rising factorial" function. Also added functions in that program to calculate the "falling factorial" function and a generalization of the binomial theorem that works for non-integer values.
  • I also added a huge diatribe about the so-called "Pochhammer function" and whether it means a rising or falling factorial, which is ambiguous through history and across fields of study. The new preference is to call risingFactorial[x, n] or fallingFactorial[x, n]
  • The program Pochhammer.frink now contains a generalization of the binomial theorem to arbitrary bases as the function generalizedBinomial[r, k] It basically generalizes it as: generalizedBinomial[r, k] := fallingFactorial[r, k] / k!
  • Added a new program, StirlingCoefficients.frink, which calculates the "correction" terms to Stirling's approximation for the factorial of a number, and makes Stirling's approximation much more accurate, especially for large exponents. This is not currently used in Stirling.frink, but it should be someday.

New in Frink 2020-04-08 (Apr 9, 2020)

  • Made some workarounds due to Java 13's disastrous "module" system to "fix" code that has worked for 20 years.
  • Released a new version of Frink: The Next Generation (version 2020-04-08). This merges all changes from the main branch.

New in Frink 2020-04-01 (Apr 2, 2020)

  • Added arbitrary-precision square root functions:
  • sqrt[x, digits]: Arbitrary-precision square root to the specified number of digits. This can take arbitrarily-large and small arguments. This function only works with real-valued inputs.
  • sqrtExact[x, digits]: Arbitrary-precision square root to the specified number of digits. This can take arbitrarily-large and small arguments. If the input is an integer, this attempts to return an exact integer result when possible. This function only works with real-valued inputs.

New in Frink 2020-03-31 (Apr 1, 2020)

  • Fixed a problem in regular expressions and search-and-replace operations where a literal backslash was not consistently representable with two backslashes.
  • Released a new version of Frink: The Next Generation (version 2020-03-31). This merges all changes from the main branch.

New in Frink 2020-03-19 (Mar 20, 2020)

  • Updated the secant.frink file to invert a function more reliably (hopefully eliminating divide-by-zero errors) in the really cool secantInvert function.
  • The exactSeasons program that calculates the equinoxes and solstices to high accuracy uses secant.frink, but does not itself need to be updated. It also says that today is the first day of spring in the northern hemisphere!

New in Frink 2020-03-18 (Mar 20, 2020)

  • Added an until loop and a do...until loop which work just like the while loop and the do...while loop, except that they iterate until the condition becomes true.

New in Frink 2020-03-14 (Mar 16, 2020)

  • Added a FrinkGeneration[] function that returns an integer indicating the generation of Frink. 0=Frink original, 1=Frink:The Next Generation.
  • Programs can use this flag to warn that, say, calculating thousands of digits will be slow in the original version, or even switch behavior (e.g. use an integer-based routine in original Frink and a floating-point routine in Frink:TNG.)
  • If you don't know what Frink:The Next Generation is, it's a new version of Frink that runs on Java 1.6 and higher, but you should use it on Java 1.8 and higher because Java 1.8 has algorithms that Frink contributed to Java which makes its floating-point numbers orders of magnitude faster for numbers with lots of digits. You should be using it unless you have an old or broken Java implementation.
  • To support old versions of Frink before this function exists, you should probably wrap it in a call to eval:
  • if eval["FrinkGeneration[]"] != 1
  • println["""Note: this program will be orders of magnitude faster with Frink:The Next Generation, available at: https://frinklang.org/experimental.html"""]
  • Released a new version of Frink: The Next Generation (version 2020-03-14). This merges all changes from the main branch.

New in Frink 2020-03-11 (Mar 16, 2020)

  • Added a sample library, water.frink which calculates properties of water and steam according to the IAPWS model.

New in Frink 2020-03-06 (Mar 9, 2020)

  • Important: Fixed an incorrect optimization in algebraic simplification of power expressions like (x^y)^z which did not work correctly in some cases if z was a non-integer. It is highly recommended to update as soon as possible.
  • Released a new version of Frink: The Next Generation (version 2020-03-06). This merges all changes from the main branch.
  • Released a new version of the frink-tng.war file from Frink: The Next Generation (version 2020-03-06).

New in Frink 2020-03-02 (Mar 3, 2020)

  • Added joinln[list] function which takes an array and returns its result as a single string joined by newline characters, that is, it puts each element of list on its own line with no trailing newline.
  • Fixed a lot of sample programs to use the joinln function instead of whatever they were using to join lines.

New in Frink 2020-02-29 (Mar 3, 2020)

  • Released a new version of Frink: The Next Generation (version 2020-02-29). This merges all changes from the main branch.
  • Released a new version of the frink-tng.war file from Frink: The Next Generation (version 2020-02-29).

New in Frink 2020-02-26 (Feb 28, 2020)

  • Added the isEnumerating[expr] to test if an expression is an enumerating expression.
  • Added documentation to the ternary conditional operator condition ? trueClause : falseClause in the If / Then / Else section of the documentation.

New in Frink 2020-02-22 (Feb 25, 2020)

  • Further improved the flexibility of the numerator, denominator, and numeratorDenominator functions. These functions now take two optional parameters which allows you to select how rational numbers and units of measure are split between the numerator and denominator. See the description of the numeratorDenominator function in the Other Functions section of the documentation for details.

New in Frink 2020-02-17 (Feb 18, 2020)

  • Greatly improved the power of the numerator[expr] and denominator[expr] functions. They can now return the numerator and denominator of arbitrary symbolic expressions. denominator[expr] works by collecting multiplicative terms that are obviously divisions or have negative exponents, and numerator[expr] works by collecting the other parts.
  • Added a new numeratorDenominator[x] function which returns the numerator and denominator of an expression as a two-item array [numerator, denominator] This works on rational numbers, integers, units, and arbitrary symbolic expressions. It is better to use this function than to call numerator and denominator separately, as it's more efficient.
  • [n,d] = numeratorDenominator[noEval[1/4 G^-1 a^-1 c^4]]
  • [c^4, 4 G a]

New in Frink 2020-02-12 (Feb 18, 2020)

  • Added a Constraining Viewport section to the documentation which describes how to set the viewport that is visible in a graphics object. Normally, Frink's graphics are automatically scaled and centered in the display. All of the graphics that you draw will automatically be visible, no matter what coordinate system you use. However, sometimes you may want to have fine-grained control over the region that is displayed, even if you don't fill it entirely, or if you want to draw outside the region, or if you want to "zoom in" on just part of a graphic.

New in Frink 2020-02-11 (Feb 11, 2020)

  • Fixed a problem in the map["funcname", list] function when the first parameter was a string indicating a function name. This is a convenience function that tries to look up an appropriate function by name, based on the length of the first entry in list but may not have found an appropriate function if list was a list of non-list items. This may have manifested in an error message like:
  • MapFunction: No function found named 'funcname' with 0 arguments.
  • The function worked correctly if passed an anonymous or named function as the first argument (which is probably a more robust solution.)
  • Thanks to Chris Hansen for the bug report.

New in Frink 2020-02-10 (Feb 11, 2020)

  • Added more general rules for solving exponential/logarithmic relations that require the Lambert W function to powerTransformations.frink. This includes the forms:
  • a = n ln[n]
  • a = n ln[c n]
  • a = n ln[c n^x]
  • a = n^y ln[c n^x]
  • a = n / ln[n]
  • a = n / ln[c n]
  • a = n / ln[c n^x]
  • a = n^y / ln[c n^x]
  • z = w e^w
  • z = w e^(d w)
  • z = w^x e^(d w^y)
  • z = w b^w
  • z = w b^(d w)
  • z = w^x b^(d w^y)
  • In these, the exponents y and x can be negative, which indicates division by n.

New in Frink 2020-02-05 (Feb 11, 2020)

  • Released a new version of the frink-tng.war file from Frink: The Next Generation (version 2020-02-05). This attempts to fix some compilation issues from the last version. As a result, the Java Servlet API version compiled against had to be increased from 2.5 to 3.1.

New in Frink 2020-02-02 (Feb 3, 2020)

  • Released a new version of Frink: The Next Generation (version 2020-02-01). This merges all changes from the main branch.
  • Fixed a problem sqrtWayne.frink where a value that only needed to be calculated to a few digits could be calculated to maybe millions of digits. This affected programs like piChudnovskyNew.frink.

New in Frink 2020-02-01 (Feb 3, 2020)

  • Further enhanced the functionUtils.frink to add functions helpful for finding derivatives of an equation
  • Enhanced the functionUtilsTest.frink to include a sample of getting the derivative and integral of either a function defined in Frink or one defined in Java.

New in Frink 2020-01-30 (Jan 31, 2020)

  • Fixed a couple more issues in the log[x, base] function (which takes logarithms of the number x to the specified base base.) These did not return wrong results, but could throw ArithmeticExceptions or cause slowdowns.

New in Frink 2020-01-27 (Jan 28, 2020)

  • Added the splitLines[str] function which splits a string on newline characters and returns an array of strings with the newlines removed. See the split section of the documentation for an example.

New in Frink 2020-01-26 (Jan 27, 2020)

  • The primes[begin, end] function can now take the undef parameter for either argument. If begin is undef, the enumeration begins with 2. If end is undef, the enumeration is potentially infinite.

New in Frink 2020-01-24 (Jan 27, 2020)

  • Released a new version of Frink: The Next Generation (version 2020-01-24). This merges all changes from the main branch.
  • Removed the unit mohm as a synonym for the strange unit mobileohm. This conflicted with the milliohm. Thanks to Enon Harris for the catch.

New in Frink 2020-01-22 (Jan 27, 2020)

  • Added an Enumerating Expressions section to the documentation.
  • Added functions to work with (possibly infinite) enumerating expressions:
  • first[expr] returns the first element of an array or enumerating expression as a single expression.
  • first[expr, count] returns the first count elements of an array or enumerating expression. If the expression passed in is an array, the result is an array, otherwise it is a (possibly-infinite) enumerating expression.
  • rest[expr] returns everything after the first element of an array or enumerating expression. If the expression passed in is an array, the result is an array, otherwise it is a (possibly-infinite) enumerating expression. This is the opposite of first[expr]
  • last[expr] returns the last element of an array or enumerating expression as a single expression.
  • last[expr, count] returns the last count elements of an array or enumerating expression. The result is an array.
  • slice[expr, begin, end] returns a slice of an array or enumerating expression starting with index start and ending before index end. If the indices are beyond the ends of the array, only existing items will be returned. If begin or end is the value undef, the results will include the beginning or end of the expression respectively. If the expression passed in is an array, the result is an array, otherwise it is a (possibly-infinite) enumerating expression.
  • sliceLength[expr, begin, length] returns a slice of an array or enumerating expression starting with index start and having length items. If the expression passed in is an array, the result is an array, otherwise it is an enumerating expression.
  • nth[expr, index] returns the specified (zero-based) element of an array or enumerating expression. For example, to return the millionth prime (again, indexing is zero-based,) nth[primes[], million-1]

New in Frink 2020-01-18 (Jan 20, 2020)

  • Added the last[expr] function to return just the last element of an array or enumerating expression.
  • Added a primes[begin] function which returns an infinite enumerating expression of the prime numbers greater than or equal to begin and increasing. Note that this will produce infinite output if you even try to print it, so you probably want to call it from a for loop or from something like first[primes[3], 100]
  • Added a primes[begin, end] function which returns a finite enumerating expression of the prime numbers greater than or equal to begin and less than or equal to end.

New in Frink 2020-01-14 (Jan 20, 2020)

  • Added lineWrapper.frink library that wraps lines to a specified number of columns.

New in Frink 2020-01-12 (Jan 13, 2020)

  • Added the arg[z] function that returns the argument (that is, the phase) of a complex (or real) number. For a complex number z = x + i y, this is equivalent to arctan[y,x].

New in Frink 2020-01-11 (Jan 13, 2020)

  • Released a new version of Frink: The Next Generation (version 2020-01-11). This merges all changes from the main branch and fixes a class of Next-Generation-specific bugs.
  • When the right-hand-side of a substitution expression (that is, the %s/from/to/modifiers construct) contained character escapes, (for example, u2090) the character escapes were not properly turned into the actual characters.
  • The left- and right-hand side of a substitution expression can now accept high Unicode characters in both Frink and Java format, that is in the format u{h...h} (Frink notation) and x{h...h} (Java regex notation) where h...h represents from 1 to 6 hexadecimal digits that represent the desired Unicode codepoint.
  • The right-hand side of a substitution expression can now contain character escapes in the format xhh where hh represents exactly 2 hexadecimal digits that represent the Unicode character. These previously worked in the left-hand side but not the right-hand side.
  • The right-hand side of a substitution expression currently expressly can not contain some of the antiquated and problematic character escapes defined in Java's Pattern class. The unsupported patterns are:
  • Octal escapes beginning with (that dangerous notation dies with me!)
  • The alert (bell) character a (use u0007 instead)
  • The escape character e (use u001B instead)
  • The escape sequence for control characters cX (specify it with its Unicode character instead.)
  • These problematic patterns are still allowed on the left-hand side of a substitution expression, but that may change.
  • Released a new WAR file for Frink: The Next Generation for running Frink Server Pages.

New in Frink 2020-01-10 (Jan 13, 2020)

  • Added an experimental frink-tng.war file to allow you to easily run Frink: The Next Generation on your webserver to run Frink Server Pages. It's built with Java 1.6 and the Servlet 2.5 API, which means it should be backward-compatible with many servlet containers.

New in Frink 2020-01-05 (Jan 6, 2020)

  • Fixed a bug in graphics.invertGrays[] when a graphics object contained other graphics objects.
  • Added programs to draw U.S. states. These include programs to draw the United States in both rectangular coordinates and more correct sinusoidal coordinates:
  • mapStates.frink
  • mapStatesSinusoidal.frink

New in Frink 2020-01-04 (Jan 6, 2020)

  • The sample startup script for Frink on Linux now can use the rlwrap program to allow you to use the up/down arrows to repeat and edit calculations, and even to autocomplete units and functions. Download the updated file and its associated files from the Running Frink section of the documentation.

New in Frink 2020-01-02 (Jan 6, 2020)

  • Released a new version of Frink: The Next Generation (version 2020-01-02). This merges all changes from the main branch.
  • Released new versions of Frink for Android. These are available in Google Play and the Amazon App Store.

New in Frink 2020-01-01 (Jan 6, 2020)

  • At some point, Google Play silently reinstated the Frink app. Thank their benevolence in protecting you from programming languages.

New in Frink 20191231 (Jan 3, 2020)

  • Added the rest[expr] function to return everything after the first element in a list.
  • Updated copyright dates for 2020. Happy New Year!
  • Updated sanity checks to 2020 for economic routines.

New in Frink 20191227 (Jan 3, 2020)

  • Updated Frink's water vapor and absolute humidity and relative humidity calculation library waterVapor.frink with some calculations about how much water you have to vaporize to get a house or room to a particular humidity (inspired by my super-dry lungs in a high-altitude dry climate.)

New in Frink 20191221 (Dec 23, 2019)

  • Frink's equation solvers now recognize and solve cubic equations (that is, equations in the form of a x^3 + b x^2 + c x + d === 0)! It even now solves in the cases where b or c are zero and those terms disappear. These updates are located in solvingTransformations.frink.

New in Frink 20191219 (Dec 23, 2019)

  • On 2019-12-19, Google Play, in its infinite wisdom, removed the Frink app for two random unrelated reasons. These are under appeal. See below.
  • The first weird "reason" was that "something something...your app may appeal to children." This made no sense but if Frink makes children enjoy programming and getting physics answers right, then I'M ALL IN.
  • The second random banning was Google saying "something something... let's say billing policy violations." This was especially weird because:
  • Frink on Android has never been charged for. In any way. It has always been 100% free to download and use, with all features always enabled.
  • Frink has no way to bill you or charge you for anything. There is no way to pay me for any features. Everything all just works. It has always just worked. You don't have to buy some Candy Crush level to find out what 2+2 is. There is no "pi is 3.1... HAHAHA PAY ME TO SEE THE REST OF THE DIGITS."
  • 100% of all Frink's features have always been available for free in the app. You couldn't pay it to do anything different in any way.
  • Frink has always been 100% free of ads, of spyware, of phone-home behavior, of privacy violations. It all runs on your phone. It does not touch your address book like most of Google Play's better-paying (to Google) apps do. Frink collects nothing about you in any way. Frink doesn't care who your friends are, nor what you buy, unlike other apps.
  • The Frink on Android app is just a thin wrapper around a Frink interpreter. It runs the programs you write. That's all. It doesn't try to monetize you in any way.
  • There have never been any payment APIs nor ads in Frink. Never. Not a single one. There has never been an ad nor a tracker on any page in the Frink websites. Never once. Just use Frink and make yourself smarter. That's all I want.
  • None of this has ever changed in 10 years of the app being on the Google app store, or Google Play, or whatever they call themselves at the minute, which makes this all the more baffling.
  • LOL they tell me that someone will address this "within 2 business days."
  • Update 2019-12-21: They haven't addressed it within 2+ business days.

New in Frink 20191218 (Dec 23, 2019)

  • Fixed the calculation of the correlation coefficient of a quadratic fit in curveFit.frink.

New in Frink 20191215 (Dec 23, 2019)

  • The syntax highlighter now highlights function definitions. See it in use at Frink Sample Programs.
  • Added more comments and analysis to cambridgetempFourier.frink. This is useful to help understand Fourier transforms, especially with units of measure.

New in Frink 20191130 (Dec 2, 2019)

  • Added more simplifying solvers to the trignonometric solvers in solveTrigonometric.frink.

New in Frink 20191127 (Nov 28, 2019)

  • Fixed a couple of issues in the log[x, base] function (which takes logarithms of the number x to the specified base base.) These would manifest as a divide-by-zero error or an "exponent is too large" error when trying to take the logarithm of a rational number that was very close to 1. Incorrect values were never returned. The errors were in the code that tries to return exact rational or integer results when possible.
  • Extended the new relativity.frink library that performs relativity calculations. The additions include black hole calculations, relativistic Doppler shift, relativistic escape velocity, potential energy, and kinetic energy.

New in Frink 20191117 (Nov 18, 2019)

  • Added hyperbolic sin, cos, and tan solvers to the trignonometric solvers in solveTrigonometric.frink.
  • Added the first cut at a new relativity.frink library to perform relativity calculations. These currently include Lorentz transformations, relativistic rocket calculations, and will soon include black hole calculations, relativistic Doppler shift, relativistic velocity and other coordinate transformations, etc.

New in Frink 20191103 (Nov 14, 2019)

  • Added more general rules for solving exponential/logarithmic relations that require the Lambert W function to powerTransformations.frink

New in Frink 20191031 (Nov 1, 2019)

  • Added the first[expr] function to return just the first element of an array or enumerating expression.

New in Frink 20191029 (Oct 29, 2019)

  • Added functions to enumerate through Gray codes. These can have an arbitrary number of states.
  • Updated the MercuryTransit.frink sample program to draw the 2019-11-11 transit of Mercury in front of the Sun.

New in Frink 20190927 (Sep 30, 2019)

  • The Frink Sample Programs Search page will now search the filenames, and not just the bodies of all the Frink sample programs.

New in Frink 20190926 (Sep 30, 2019)

  • The sqrtWayne.frink sample program that performs fast square roots to arbitrary precision has been improved to handle arbitrarily-large and arbitrarily-small numbers and negative numbers.
  • The JSON parser has been slightly modified to allow any value as the top-level type.

New in Frink 20190920 (Sep 22, 2019)

  • The function bytesToString[bytes, encoding="UTF-8"] can now take an array of Frink integers that will fit into bytes, as well as an array of Java bytes.
  • The sample RSA.frink has been updated to use the fix for bytesToString above.
  • Added a function last[expr, num] to take the last num items from an expression (which can be an array or enumerating expression.) The result is returned as an array.
  • Released a new version of Frink: The Next Generation (version 2019-09-20). This merges all changes from the main branch.

New in Frink 20190916 (Sep 17, 2019)

  • Added dictionary methods dict.addToList[key, value] and dict.addToSet[key, value]. See the Dictionary Methods section of the documentation for more.

New in Frink 20190915 (Sep 17, 2019)

  • Added rules for solving exponential/logarithmic relations to powerTransformations.frink. Specifically, this solves equations in the form n / ln[c n] === a for n and equations of the form w e^(c w) === z for w, both of which require solutions in terms of the Lambert W function. This makes dependencies on LambertW.frink, ArbitraryPrecision.frink, and sqrtWayne.frink, and pi.frink These dependencies may change. In addition, you can comment out the use LambertW.frink statement without problems; you just won't be able to get a numerical result for the LambertW function; it will just give a symbolic result.
  • Added a rule to solvingTransformations.frink for transforming rules in terms of log base 10 into equations of natural log. This makes a lot of different types of equations more readily solved by already-existing rules: for example, LambertW rules and eliminates the need to rewrite all of these rules in multiple forms. to powerTransformations.frink.

New in Frink 20190905 (Sep 17, 2019)

  • Added functions to convert to/from galactic coordinates to the sun.frink astronomy library.

New in Frink 20190822 (Aug 23, 2019)

  • Made some fixes when using Custom Timezone specifications. This improves Frink's ability to parse these custom timezones, but especially to convert to these timezones, which was not reliable.

New in Frink 20190722 (Jul 23, 2019)

  • Fixed currency conversions to work again.

New in Frink 20190715 (Jul 16, 2019)

  • Added a new program, e.frink to calculate the constant e using binary splitting. This is efficient and resumable and maintains a cache; when you need more digits, the previous calculation is resumed, rather than restarted from scratch.
  • Added functions to draw the moon's rotational axis to the sun.frink astronomy library.
  • Extended the Moon position calculator to draw the rotational axis of the moon.

New in Frink 20190711 (Jul 16, 2019)

  • Added calculations for libration of the moon and the moon's axis angle to the sun.frink astronomy library.

New in Frink 20190709 (Jul 16, 2019)

  • Fixed some rules for solving exponential/logarithmic relations to powerTransformations.frink so they don't interfere with more specific rules in solvingTransformations.frink

New in Frink 20190708 (Jul 9, 2019)

  • Added several more rules for solving exponential/logarithmic relations to powerTransformations.frink and solvingTransformations.frink
  • Removed some errors when evaluating functions like isRational or isInteger in symbolic mode when evaluating conditions in a transformation rule.

New in Frink 20190604 (Jun 7, 2019)

  • Added isReal[expr] function which returns true if the argument is a real number (with or without dimensions, and not an interval,) false otherwise.
  • Added unitsWithValues[] function which returns an enumeration of [unitName, value] pairs.
  • Added unitsWithValues[expr] function which takes returns an enumeration of [unitName, value] pairs that match the specified dimensions.

New in Frink 20190527 (May 27, 2019)

  • Released a new version of Frink: The Next Generation (version 2019-05-27). This merges all changes from the main branch.

New in Frink 20190526 (May 27, 2019)

  • Fixed a bug where the new units for the impedance of vacuum (Z0 or impedanceofvacuum) and admittance of vacuum (Y0 or admittanceofvacuum) were swapped with each other. Again, thanks to Alain Fontaine for bringing these changes to my attention.

New in Frink 20190524 (May 27, 2019)

  • Frink's standard data file is now internally expected to be encoded in UTF-8 format, and is read as if it is encoded in UTF-8. This may change back, (the previous files have used ASCII escapes for Unicode characters) but some Unicode characters from the 2019 SI redefinitions have crept in for readability. Expecting an encoding prevents weird platform-specific bugs when parsing the standard data file. External data files can still use any encoding. But you should probably always use UTF-8 in this day and age.
  • Frink's standard data file has been updated to more exactly match the redefinition of the kelvin (K) based on the 2019 SI redefinition:
  • Under the 2019 redefinition, the Kelvin is now tied to the exactly-defined Boltzmann constant k.
  • The unit zerocelsius is now defined as an exact rational number.
  • As a result of the above, more conversions between temperature scales may now yield exact rational numbers. To format, say, a Fahrenheit temperature as a floating-point number with a fixed number of decimal places, you can use something like:
  • format[F[0 K], 1, 2]
  • -459.67
  • Comments in the data file have been updated. All of the new base units contain their new 2019 SI definitions. Comments about the triple point of water have changed, as the triple point of water is now an experimentally-measured quantity, and not an exactly-defined value.
  • Again, thanks to Alain Fontaine for bringing these changes to my attention.
  • Units for the impedance of vacuum (Z0 or impedanceofvacuum) and admittance of vacuum (Y0 or admittanceofvacuum) have been added.

New in Frink 20190521 (May 22, 2019)

  • Fixed a possible crash on Android when Frink doesn't have permission to access an external data directory. This may not completely fix all problems when Frink can't write to external storage. I'm currently evaluating fallback behaviors.
  • Frink's standard data file changed again in a couple of ways:
  • Improved the description of several units, and noted the changes between the pre-2019 definitions and the current definitions. Comments were updated and modernized.
  • Fixed the definitions of mu0 and epsilon0, the permeability and permittivity of vacuum (respectively) to match the changes made in the 2019 SI redefinitions. These are no longer "exactly-defined" values, as they were before, but are now "experimentally-measured" quantities. Their values changed very slightly, and they now have uncertainties. Thanks to Alain Fontaine for bringing these changes to my attention.

New in Frink 20190520 (May 21, 2019)

  • Happy World Metrology Day! And welcome to the first day of the new International System of Units!
  • Frink's standard data file has been updated again to incorporate the new 2018 CODATA values that were released by NIST yesterday. These change some physical constants to the newest best-known values, such as the gravitational coefficient and particle masses. In addition, several constants were redefined in terms of the new fundamental constants, including making some exact, like the gas constant R.
  • Released a new version of Frink: The Next Generation (version 2019-05-20). This merges all changes from the main branch.

New in Frink 20190519 (May 21, 2019)

  • World Metrology Day is May 20! This is one of the most important Metrology Days ever because it marks the release of the new International System of Units (SI). The new version of the SI fixes some (but not nearly all) of the fundamental problems of the old SI by re-defining some units in the SI as exact constants, and letting other units be defined in terms of these exact values.
  • (Since Frink version 2018-12-11, you can specify floating-point numbers to be exact using the "exact exponent" indicator which will turn them into exact rational numbers or integers. For example, the new exact SI value for Avogadro's number 6.02214076ee23 will become an exact integer. The exponents can also be negative, which will usually lead to an exact rational number, such as 6ee-1 which produces the exact rational number 3/5 (exactly 0.6). Previously, only integer mantissas could be specified with the exact exponent indicator.)
  • The new exact values are:
  • The Planck constant h: Now exactly 6.62607015 * 10-34 joule-second (J s). This is now represented in Frink as an exact fraction, 6.62607015ee-34 J s
  • The elementary charge of an electron or proton, used in Frink as the unit elementarycharge, or similarly electroncharge (negative) or protoncharge (positive), is now defined as exactly 1.602176634 * 10-19 coulombs, or, in Frink notation, 1.602176634ee-19 s A (a coulomb is an ampere times a second.)
  • Boltzmann's constant k is now defined as exactly 1.380649 * 10−23 J/K, or, in Frink notation, 1.380649ee-23 J/K
  • Avogadro's constant, the number of items in a mol, is now defined as exactly 6.02214076 * 1023 / mol, which is an exact integer, or, in Frink notation, 6.02214076ee23 mol^-1
  • Some constants have been redefined due to the above definitions. In the Frink standard data file, many definitions have been changed to turn them into their new exactly-defined values. For example, the electron-volt (which is the energy of an electron accelerated through a potential of one volt) is now an exactly-defined value.
  • Some units in the data file have been revised if they could be defined in terms of exactly-defined units. In the future, this should make it easier to keep the units exactly defined, and not require updating with new CODATA values every 4 years.
  • Standards bureaus like NIST and BIPM have been slow in adjusting their official values for constants. I'm not sure if they're going to switch everything over on May 20, or what. Right now they have the 2014 CODATA values (which are updated every 4 years) of the constants, with no notices about how this will change with the new SI.
  • Update: Since I posted this last night, the NIST site now states that it has the 2018 CODATA values of the constants! Frink's standard data file will change again with the new values.
  • The units that will change further include things like the gravitational constant G, masses of fundamental particles, etc., all of which are updated both because of new SI definitions and new experimental results. Watch for more Frink updates soon!
  • The Grid.frink sample program which allows you to automatically (or manually) add grid coordinates to a graphics object has been improved to fix a bug in horizontal labels with a customized formatting function.
  • The daylight.frink sample program which calculates sunrise and sunset and hours of daylight for any location has been improved to graph the times of sunrise and sunset, to not jump forward and backward a day on some dates, and to better handle timezones. It now requires the Grid.frink sample program to label its axes.

New in Frink 20190503 (May 6, 2019)

  • The functions read and lines and readLines can now take a java.io.Reader as an argument. Previously, they could take a URL or a java.io.InputStream. See the Reading Entire Files section of the documentation for more.

New in Frink 20190502 (May 6, 2019)

  • The Fourier.frink sample program now contains routines for plotting Fourier transforms (or ordinary arrays) as a magnitude and phase diagram, and for determining the frequency of a particular element of a Fourier transform. The location of these routines may change.

New in Frink 20190501 (May 2, 2019)

  • Improved the parser to allow "exact exponent" for integer mantissas to allow a + sign in the exponent, e.g. 1ee+1000. The + sign was previously allowed if the mantissa included a decimal point, but if it didn't, this wasn't parsed correctly (and could even produce parser crashes.)
  • Added a three-argument version of mapList[function, list, data] which allows arbitrary data to be passed to a function used in the mapList function. In this case, the function passed to mapList must take two arguments instead of one. See the map section of the documentation for more details.

New in Frink 20190421 (May 2, 2019)

  • Released a new version of Frink: The Next Generation (version 2019-04-21). This merges all changes from the main branch.

New in Frink 20190418 (Apr 22, 2019)

  • Fixed a bug in Java Introspection when working with a Java object that implements java.lang.Iterable. Previously, this eagerly fetched the Iterator from the object and returned the iterator, rather than the whole object itself. This was fine if you just wanted to iterate over the contents of the object, but bad if you wanted to call any of its other methods. You can once again call its methods or use it in a for loop.
  • Did more work to partially work around the 21-year-old (I'm not kidding) Java Bug 4071957 and Java Bug 4071593 and Java Bug 4283544 (and the dozens of related bugs) which causes method invocation to fail on classes that are declared private, even if the methods are public and access would be allowed from normal Java code.
  • This fix takes a stronger approach to work around these bugs and to mitigate the damage done by Java 9 and later's not-really-useful "module" system (that can never work right in the face of this bug and similar others). The code tries very hard to search for accessible method calls in the class, in its superclasses, and in its implemented interfaces to find and call a method, (that you would be able to call from compiled Java,) but if that fails, it will take the stronger step to call Java's AccessibleObject.setAccessible(true) on the method, and then try calling it again. This fixes a lot of poor design in Java's libraries, especially com.sun.internal classes, and works around the aforementioned bugs that Java has been promising to sorta think about 2 decades ago.
  • In Java 9 and later, you might get warnings about "illegal reflective access" if you call a method that has to be called using the stronger methods listed above (to work around the aforementioned Java bugs.) For now, the java command allows you to pass the --illegal-access flag: --illegal-access=value : permit or deny access to members of types in named modules by code in unnamed modules. value is one of deny, permit, warn, or debug. "This option will be removed in a future release."
  • You might be able to see what extended options your Java Virtual Machine has by executing java -X. You may have to add one of the options, especially --illegal-access=permit to your Frink startup script if you invoke methods that touch these Java bugs in Java 9 or later and you need these warnings silenced.
  • Improved logarithm functions:
  • The function log[x] (which takes logarithms to base 10) now returns exact integers or rational numbers in cases when arguments are integers and results are integers or 1 divided by an integer.
  • Added the log[x, base] function (which takes logarithms of the number x to the specified base base.) This returns exact integers or rational numbers in most cases when arguments are integers or 1 divided by an integer.
  • Note that the ordering of the arguments may be different from other programming languages! This order was chosen because log[x, base] can be rewritten as log[x] / log[base] for any logarithmic function that takes a logarithm to any base.
  • This follows the precedent set by functions like arctan[y, x] which is equivalent to arctan[y/x] except the former corrects for ambiguities in the quadrants. Similarly, it's simple to change log[x] / log[base] to log[x, base] without errors.
  • Some programming languages have taken the opposite approach, where the first argument is the base and the second argument is the number. This seems like a bad design choice, so be careful when transliterating mathematical expressions from other programming languages.

New in Frink 20190410 (Apr 22, 2019)

  • Added the conjugate[x] function to return the complex conjugate of a complex number or array of numbers.

New in Frink 20190404 (Apr 22, 2019)

  • Added a copyStream[inputStream, outputStream] function to copy the contents of one java.io.InputStream to a java.io.OutputStream. See the I/O Functions section of the documentation for more details.
  • Improved the ZipFile.frink sample program to unzip the contents of a zip file.

New in Frink 20190325 (Apr 22, 2019)

  • Updated the floatingPointBase.frink sample program which does base conversions on floating-point numbers. The new version has more correct internal precision calculations to produce more correct digits, and has new options for both parsing and formatting. The updated parseFloat function can produce exact rational numbers or a number with approximately the same number of significant digits as the string being parsed.

New in Frink 20190313 (Apr 22, 2019)

  • Released a new version of Frink: The Next Generation (version 2019-03-13). This merges all changes from the main branch.

New in Frink 20190311 (Mar 27, 2019)

  • Added method image.show[title] to show an image with the specified title.
  • Rewrote the code that writes Fourier-transformed images into a logarithmic magnitude-phase plot and reconstructs them from the aforementioned plot. This removes some numerical instability with larger images that caused large images to fail. See the FourierImage.frink sample program for sample usage.
  • The function to resize images, image.resize[width, height] method has been rewritten to use a much better area-averaging filter. This makes scaling of images much cleaner and less random, especially for strong downscaling.
  • Added ComplexArray2D.subtract[ComplexArray2D] method to create, say, difference between two images (after calling their .toComplexArray[] methods.) This can be turned back into an image by calling the toImage[] method on the result.

New in Frink 20180904 (Sep 5, 2018)

  • Added a fixup rule to improve solving some addition expressions. This fixes some issues in solving systems of equations, like one triggered by McKellarPuzzle.frink.
  • Improved formatting of code blocks.

New in Frink 20180830 (Aug 31, 2018)

  • Updated the SSL/TLS certificates for https://frinklang.org/. Let me know if you have any trouble connecting.
  • Note that Java 1.6 and earlier cannot use Diffie-Hellman key exchange parameters longer than 1024 bits (the site uses 4096 bits.) You should still be able to access the site through any modern web browser, or through Java 1.7 or later.

New in Frink 20180828 (Aug 28, 2018)

  • Fixed a solving rule in the experimental powerTransformations.frink transformation library to not (sometimes!) conflict with better rules for rational numbers defined in solvingTransformations.frink.
  • Revised the experimental powerTransformations.frink transformation library to use the natural log instead of log10 in its solutions, allowing simplification of expressions that use the natural log.
  • Updated the Frink Solver page to display multiple solutions better. Its solutions are once again more correct by the fixing of the above-mentioned rule.
  • Added a library, deBruijn.frink, to calculate de Bruijn sequences. When you need them, you'll know.
  • Canonicalized a bunch of URLs in sample programs to point to https://frinklang.org/.

New in Frink 20180807 (Aug 7, 2018)

  • Made the parser more efficient in some cases.
  • Forward-compatibility fixes of the lexer for newer versions of JFlex.
  • Released a new version of Frink: The Next Generation with fixes for parsing Unicode identifiers. Previously, you might see error messages for Unicode identifiers, especially when they are represented by two Unicode surrogate characters at the beginning of a line after a line break or semicolon.

New in Frink 20180714 (Jul 16, 2018)

  • Released a new version of Frink: The Next Generation with an updated version of the JavaCUP parser generator (version 11b-20160615). This should not contain any user-noticeable changes, but paves the way for such features as syntax completion, improved error messages, fixes potential parser size problems, and more.

New in Frink 20180530 (May 31, 2018)

  • Released a new version of Frink: The Next Generation (version is called 2018-05-29.) This is still experimental, but you can download and use it now. Improvements include: ◦Improved performance of the floor, ceil, round, and truncate functions. These were significant in some programs.
  • ◦Improved performance of writing graphics to HTML, SVG, and SVGZ formats. Some programs are now up to 13 times faster when writing these files.

New in Frink 20180529 (May 29, 2018)

  • Added a sample program, Pochhammer.frink, to calculate the Pochhammer function. This function is closely related to the gamma function, which is closely related to the factorial. The implementation also extends the Pochhammer function to negative values of k and even works with symbolic arguments.

New in Frink 20180526 (May 27, 2018)

  • Updated the Frink Solver page to allow the user to specify the units of measure used to display the result. This page is getting pretty cool.

New in Frink 20180510 (May 10, 2018)

  • Updated statistics.frink in a few ways: ◦Fixed a bug in poissonProbability[k,expected] function when k was exactly 1. The function was also simplified:
  • Renamed some variables and comments to be more internally consistent.
  • Added comments describing how the binomial distribution approximates the Poisson distribution in certain cases.

New in Frink 20180508 (May 8, 2018)

  • There have been some rewrites to the Swing GUI to attempt to work around problems with scrolling and repaint (and weird colors or invisible text) that appeared when running under Java 10 (sigh). It's unclear if this will fix all of the problems, but it seems to eliminate occasional Swing repaint problems in test environments on Fedora.
  • If you're running on Java 10, please let me know if you are having repaint troubles in the Swing GUI. Make sure you are using this latest release. Also include information on how you started Frink and your graphics card configuration. In my experience, most GUI weirdnesses are fixed by installing updated graphics drivers from your vendor.
  • Suggested command-line for starting Frink: java -cp /path/to/frink.jar frink.gui.FrinkStarter --swing
  • If your computer runs OpenGL, you can get improved graphics performance (and maybe fewer bugs on Java 10?) by enabling OpenGL rendering with the following command-line option to Java: -Dsun.java2d.opengl=True (If you write "True" with a capital T then you get debug information that indicates if OpenGL is actually being used. With a lowercase "true" then it's silent.) Thus, the command-line becomes: java -Dsun.java2d.opengl=True -cp /path/to/frink.jar frink.gui.FrinkStarter --swing
  • These changes have not attempted to alter the AWT user interface, but a user reported that running the AWT interface on Ubuntu did not exhibit the same problems. (This was opposite of the experience on Fedora. Double sigh.) To run Frink in AWT mode (which is not recommended; Swing mode is now preferred in general,) try: java -cp /path/to/frink.jar frink.gui.FrinkStarter --awt
  • Here is a (probably brittle) link from Java on diagnosing rendering issues. It describes how to turn on and off graphics acceleration for various platforms.

New in Frink 20180502 (May 6, 2018)

  • Fixed currency conversions to work again.

New in Frink 20180426 (Apr 26, 2018)

  • Added functions to allow you to compress or decompress files using the GZIP format on the fly. See the Compressing/Decompressing Files section of the documentation for more.
  • Added constructors for the Writer class that take java.io.OutputStream or java.io.Writer, so you can easily write to an already-existing stream. This enabled the GZIP compression above.

New in Frink 20180414 (Apr 16, 2018)

  • Added isString[expr] function.

New in Frink 20180404 (Apr 16, 2018)

  • Updated the Frink Solver page to allow numerical evaluation of the solved equation.
  • Added the experimental powerTransformations.frink transformation library to help solve equations with exponents. Note that this only gives real-valued solutions.

New in Frink 20180318 (Mar 19, 2018)

  • Frink: The Next Generation has been announced! It's still in testing, but you can download and use it! New features include:
  • Faster floating-point operations, especially with thousands or millions of digits! You can now calculate values with huge numbers of digits in seconds instead of hours or days! (Requires Java 1.8 to get the benefits, as the improvements I contributed to Java to make this possible were first included in Java 1.8.)
  • Modernized regular expressions with better Unicode support and lots of new features, including named matches!
  • JFlex upgrade to 1.6.1 which gives improved Unicode support in the parser, including better emoji support, better subscript support, and performance improvements.
  • Note that Frink: The Next Generation requires at least Java 1.6 to run, and Java 1.8 to take advantage of the faster numerics.
  • The Experimental Frink Features page has been officially announced. Read that page for lots of details on these new features! And watch it for documentation of powerful features that may have existed in your version of Frink but were never officially documented!

New in Frink 20180220 (Feb 21, 2018)

  • No major new features, but fixed a build issue that might have affected people running on Java 1.6 or 1.7.
  • Fixed a problem when printing a regular expression.

New in Frink 20180213 (Feb 14, 2018)

  • Fixed a bug in the command-line options that didn't set the window width or height correctly. See the GUI Options section of the documentation for more.
  • Made the --width and --height command-line options also work with SwingInteractivePanel.
  • Added a command-line option --fontsize int to set the font size of frink.gui.InteractivePanel or frink.gui.SwingInteractivePanel or frink.gui.FullScreenAWTStarter or
  • Made changes to the mod operator to improve containment, specifically when using imprecise floating-point arguments in the cases where numeric precision is being lost (such as when one argument is much bigger than the other.) When no meaningful result can be given, this can now return 0.

New in Frink 20180114 (Jan 14, 2018)

  • Added some performance optimizations:
  • Improved calling functions that are stored in a variable name.
  • Optimized calling of blocks with empty bodies.

New in Frink 20180109 (Jan 9, 2018)

  • Important: Fixed a bug in the range operator (that is, any loop that contains the to keyword) that might have caused infinite loops when the ends of the loop were near or exactly 231-1 or, when counting downwards, around -231.

New in Frink 20180102 (Jan 6, 2018)

  • Added isDate[expr] which returns true if the expression is a date/time, false otherwise.
  • Updated prediction of deltaT to be constantly 69.184 s through the end of 2018 (previously, this was only the prediction through July 1, 2018. It has not yet been announced if a leap second will be added on that date, but an announcement is expected within the next 6 days.)
  • Fixed a crash when calculating deltaT around the year 1988.
  • Future predictions of deltaT will probably use a variety of data sources, including:
  • Curve fits by Espenak and Meeus (link opens in new window) which were last updated about 2005 and may diverge from current best predictions.
  • U.S. Naval Observatory historical tabulations of deltaT from 1973-(approximate) present (link opens in new window) which are supposed to be updated "quarterly" but are now more than 6 months out of date.
  • USNO predictions for the next 8 years (link opens in new window) Note that these have rather large error margins (about 5 seconds in the next 8 years.)
  • It should be noted, however, that these data sources do not and will not always agree with each other. It's apparently difficult to predict the future.

New in Frink 20171116 (Nov 26, 2017)

  • Rewrote the internals of the mod and div operators for better performance, especially for integer values.

New in Frink 20171023 (Oct 23, 2017)

  • Behavior change: Modified the GeneralPath.addPoint[x, y] method to more closely match polygon or polyline. If the point added is the first point, this does a moveTo the specified point. If there are previous points, this does a lineTo the specified point. This may simplify code by eliminating the initial moveTo call and allows easy migration from polygon or polyline to GeneralPath.
  • Behavior change: The GeneralPath.close[] method now explicitly forces you to add a moveTo or addPoint before starting a new curve. This how the documentation always insisted that you do things, but the code might have implicitly allowed the previous point to be used.
  • Improved error messages when something goes wrong in JSON parsing.
  • Fixed a potential performance problem in the floor, ceil, trunc, and int functions.
  • Many Frink Server Pages examples are now more mobile-friendly.

New in Frink 20170708 (Jul 10, 2017)

  • Fixed the definition of paper areal densities like poundbookpaper which had incorrect dimensions.
  • If you wanted to estimate the mass of a U.S. letter page of "20 pound bond" paper, you could calculate it as: 20 poundbondpaper * 11 in * 8.5 in -> "grams" 4.5359237 grams
  • Added the dimension combination area_density to describe the mass density per area of a sheet of something, such as kg/m^2.
  • Thanks to Nathan Schiffer for an excellent bug report on most of the previous issues (and some that I have yet to research.)
  • Improved the error message when a user-defined sorting function does not return integer values.
  • Fixed a problem when using a custom data file that defines the radian as a fundamental dimension. (You really don't ever want to do this, unless you're having a really hard time debugging an example that uses angles.) The inverse trigonometric functions like arcsin and arccos were not returning the results with dimensions of radians, and possibly producing conformance errors.
  • Behavior change: Fixed some handling of command-line arguments in the GUI, especially in programming mode. Note that this may change behavior of some programs, depending on how you launch Frink:
  • Specifying your own units file using the -u filename command-line option now also applies to programming mode in the GUI, and not just to interactive mode. Be warned if you're loading a custom units file.
  • This change applies to all command-line options. Options which were previously only applied to interactive mode are now applied to programming mode also.
  • Eliminated some possible error messages when launching Frink using the -open filename option. (This is how double-clicking a .frink file works in Windows or some Linux environments with the proper file association set.)

New in Frink 20170629 (Jun 27, 2017)

  • Fixed the definition of specific_volume from its incorrect value m^3 kg to the correct m^3 kg^-1. Thanks to Benjamin Zax for the correction.

New in Frink 20170527 (May 28, 2017)

  • Further enhanced the functionUtils.frink to add functions helpful for solving an equation.
  • Enhanced the functionUtilsTest.frink to include a sample of solving an equation both symbolically and obtaining a numerical solution or set of solutions.

New in Frink 20170525 (May 25, 2017)

  • Added an interesting new library, functionUtils.frink, which provides simple ways of manipulating parts of functions and expressions, including obtaining the body of a function and its argument list. It also has simple functions that, along with other libraries, will help you easily obtain the derivative and integral of a function.
  • This will make it easier to perform symbolic transformations and calculus on functions and expressions that may not have been written with calculus or symbolic transformations in mind. It will also be useful in finding the minimum/maximum of expressions, graphing, inverting equations, and solving equations both numerically and with exact symbolic results. (Many of these are performed much more efficiently and exactly if you know the derivative of the function. For example, Newton's method requires knowing the derivative of a function.)
  • As a demonstration of the above, added a test library, functionUtilsTest.frink, which demonstrates taking the derivatives and integral of functions.

New in Frink 20170520 (May 22, 2017)

  • Added a copy constructor for Polygons and Polylines. This makes it easier to do things like creating stroked and filled polygons.

New in Frink 20170517 (May 17, 2017)

  • Updated the stellarMagnitude.frink sample program to allow easier calculations of stellar magnitudes, power fluxes, and apparent brightnesses.

New in Frink 20170509 (May 10, 2017)

  • Added a ConvexHull.frink sample program to calculate (and optionally graph) the convex hull of a bunch of points using the Graham scan algorithm (which is O(n log n) ).

New in Frink 20170506 (May 7, 2017)

  • Reinstated translations to and from Polish and Greek.
  • The graphics.write... methods now allow you to specify exactly one of the width or height as undef, the undefined axis will be calculated from the defined width or height and the aspect ration of the graphics that is being drawn.
  • Added --prog command-Line option to start Frink in programming mode.
  • Fixed a potential problem with the -open filename command-Line option if passed a relative filename without a parent.

New in Frink 20170426 (Apr 26, 2017)

  • Added a cool new graphics.invertGrays[] function that makes your graphics objects invert their grayscales so you can easily make a single graphics object that looks like Wargames (black background, white lines) for on-screen display but doesn't waste your printer ink (white background, black lines) when printed. Shall we play a game?
  • For more information, see the Showing Graphics section of the documentation.

New in Frink 20170424 (Apr 24, 2017)

  • Enhanced functionality for Polygons and Polylines:
  • The constructor for polygon, filledPolygon, and polyline can now take a list of points.
  • a = [ [1,3], [7,4], [6,2] ]
  • p = new polygon[a]
  • Added the following methods to polygon, filledPolygon, and polyline. See Polygon Methods for more information on any of these.
  • .getPoints[] returns a list of the points in a polygon.
  • .getArea[] calculates the area of the polygon.
  • .getCentroid[] returns the centroid of the polygon as an [x,y] array.
  • Added a .show[] method to easily display a polygon without adding it to a graphics object.

New in Frink 20170418 (Apr 19, 2017)

  • Improved the correctness of the experimental gamma function when a small number of digits is requested.

New in Frink 20170413 (Apr 13, 2017)

  • Added a previousPrime[n] to return the previous prime number less than n. This complements the existing nextPrime[n] function.

New in Frink 20170412 (Apr 12, 2017)

  • Drastically improved performance of parsing strings to integers. This introduces a divide-and-conquer algorithm of my own devising that improves Java's native parsing of strings to integers by several orders of magnitude for very large numbers. For example, parsing the largest-known Mersenne prime 274207281 went from 13124 seconds (that's about 218 minutes) down to 68.392 s (just over a minute), a factor of 192 times faster!
  • This improvement makes parsing of giant numbers from Java's worse-than O(n2) to about O(n1.513) at 10 million digits (with a good constant.)
  • This improvement works whenever Frink parses a large integer.
  • I may try to contribute these algorithms to Java. It took me 11 years for Java people to check in my vastly improved algorithms for multiplication and string conversion for large integers, though. These are finally part of Java 8.
  • Improved speed and memory usage of parsing integers from strings, with knowledge of each radix. When numbers between 6 and 9 digits are parsed (in base 10), parsing is now significantly faster and uses less memory. The same improvements occur for all bases from 2 to 36.

New in Frink 20170404 (Apr 4, 2017)

  • Various performance improvements for factorials and binomial coefficients were added:
  • For very large factorials or binomial coefficients, performance has been increased by orders of magnitude.
  • Factorials (using either the ! operator or the factorial[n] function) now use a binary splitting algorithm which makes them significantly faster on Java 1.8 and later. (Did you know that Java 1.8's BigInteger calculations got drastically faster because Frink's internal algorithms were contributed to it?)
  • The function factorialRatio[a, b] was added, which allows efficient calculation of the ratio of two factorials a! / b!, using a binary splitting algorithm.
  • As of the 2017-04-04 release, functions that calculate binomial coefficients like binomial[m,n] that calculate binomial coefficients are more efficient because of the use of binary splitting algorithms.
  • Note: binomial[m,n] is of the number of ways m things can be chosen n at a time, with order being unimportant. This is sometimes called "m choose n" or "m C n". This is equivalent to m!/(n! (m-n)!) although calculating that way often leads to way-too-big numbers. For example, binomial[10000, 9998] is equal to 49995000, but if you calculated it naively, you'd have to calculate 10000! which is a 35660-digit number, and divide it by another huge number, which could be inefficient and slow.
  • Added a section on the implementation of Factorials to the main documentation.

New in Frink 20170217 (Feb 18, 2017)

  • Improvements to the function suggester.
  • Some units of volume are now made exact, including the jeroboam, rehoboam, nebuchadnezzar, etc.
  • Improvements to the continuedFraction.frink sample library, including better detection of when working precision is exceeded. This will eventually become part of the standard distribution.
  • Added a similarUnits.frink library which suggests units that are similar to a specified value. This may someday become part of the standard distribution.
  • Algorithm dispatcher now detects the upcoming Java 10.

New in Frink 20170208 (Feb 9, 2017)

  • Fixed a bug when rendering HTML graphics. If the computer was set to certain locales, alpha channel opacity levels would be rendered with a comma decimal separator instead of a period. Thanks to Alexander Kosenkov for the report.
  • Opacity levels in SVG files are now rounded to 3 decimal places.
  • Improved performance of primality testing for mid-sized numbers. Thanks to the work of Sorenson and Webster, isPrime[n] is now guaranteed to prove primality for numbers up to 3,317,044,064,679,887,385,961,981, and uses a smaller number of pseudoprime tests up to this value, improving performance of both primality testing and factorization.

New in Frink 20170207 (Feb 8, 2017)

  • Fixed a bug that affected some functions that take other functions as arguments, such as sort[array, function]. If the passed-in function had multiple return statements instead of a single simpler expression, it might not behave correctly. (For example, in the case of sort the array might not be fully sorted.) This may have affected:
  • sort functions with user-defined comparison functions.
  • map
  • select
  • Constraint functions
  • The internals of function calling have been revised and improved to prevent this type of error in the future.

New in Frink 20170203 (Feb 5, 2017)

  • Fixed a bug in the Web Interface that broke the ability to set variables persistently.

New in Frink 20170114 (Jan 16, 2017)

  • Added a rangeOf[array] which returns an enumeration of all the indices in an array:
  • a = ["zero", "one", "two"]
  • for i = rangeOf[a]
  • println["index $i contains " + a@i]
  • index 0 contains zero
  • index 1 contains one
  • index 2 contains two

New in Frink 20170107 (Jan 9, 2017)

  • If you try to call a function that doesn't exist, Frink will now try to suggest functions (and methods, if called from within a class) with similar spellings and argument lists:
  • angles[]
  • No function match found for angles with 0 arguments.
  • Suggestions:
  • Functions:
  • Ingles[arg1]
  • Inglês[arg1]
  • Inglés[arg1]
  • Engels[arg1]
  • Inglese[arg1]
  • Anglais[arg1]
  • Made some improvements to the Web Interface to preserve some of the formatting that the Frink interpreter emits, especially for error messages.

New in Frink 20170101 (Jan 3, 2017)

  • Updated copyright dates for 2017. Happy New Year!
  • Updated sanity checks to 2017 for economic routines.
  • Researched future deltaT predictions for the year 2017 and later. The earth's rotation hasn't been slowing down as much as predicted in the past, and future predictions may need to be researched and updated if new predictions are available.
  • Verified the leap second added at the end of 2016 is being calculated correctly. Frink has taken this into account since the date it was announced, 2016-07-06. For more information see the Leap Seconds section of the documentation.

New in Frink 20161221 (Dec 21, 2016)

  • Improved the performance of the algorithm to calculate autocorrelation of a list of values in correlation.frink.

New in Frink 20161129 (Nov 30, 2016)

  • Improved some error messages, especially in the cases of class members with constraints.

New in Frink 20161128 (Nov 29, 2016)

  • Fixed a bug in getBit[n, bit] that affected n that would fit into a 32-bit integer and where the requested bit was outside of the integer. Thanks to Jeremy Roach for the research and bug report.
  • Improved the error message for a function definition that incorrectly uses = instead of :=

New in Frink 20161115 (Nov 16, 2016)

  • Fixed currency conversions to work again.

New in Frink 20161114 (Nov 15, 2016)

  • Fixed a bug in the two-argument read[URL, encoding] function to read from a file or a URL where you specify the encoding of the file or URL. The encoding might have been ignored.

New in Frink 20161106 (Nov 6, 2016)

  • Enhanced the DiscreteDistribution.frink sample library (which allows you to choose between items with a specified probability distribution) to also allow efficient selection of a deterministic item from the distribution.

New in Frink 20161102 (Nov 3, 2016)

  • Added the graphemeLength[str] function which returns the length of a string in graphemes, counting multiple Unicode codepoints that should be combined together as a single display glyph as a single character. See the Correct String Parsing section of the documentation for more details.
  • Fixed obscure classloading problems that only seemed to manifest themselves when run on an odd configuration (e.g. Tomcat 4 with a custom classloader running on Java 1.4). These might show up as a failure to initialize something like class frink.text.c. This may also fix running on a Java 1.6 or 1.7 JVM.

New in Frink 20161028 (Oct 28, 2016)

  • Fixed the build for the experimental compiled Windows Frink binary. This is not the best way to run Frink at all, but there it is.

New in Frink 20161027 (Oct 27, 2016)

  • To complement the lexicalSort functions, there are now similar methods that compare two strings using human language rules and Unicode normalization:
  • lexicalCompare[string1, string2]: Compares 2 strings using a comparison method that understands human languages. This version uses the default locale and language settings defined on your Java Virtual Machine to perform the comparison.
  • lexicalCompare[string1, string2, languageCode]: Like the previous function, this compares 2 strings using a comparison method that understands human languages. This version uses a specified language. The argument languageCode can be one of three types:
  • A string containing a 2-letter ISO 639-1 code for the language, such as "en" for English.
  • A java.text.Collator
  • A java.util.Locale
  • See the Lexical Sorting section of the documentation for more details on how powerful these functions are.

New in Frink 20161026 (Oct 26, 2016)

  • Backward compatibility fix for Java before 1.4. (The constructor Locale(String language) did not exist, so if you're on a very old JVM, you'll have to construct Locales manually with a language and a country.)
  • Improved error messages when strange characters are encountered in input.
  • Removed information about obsolete technologies from the documentation (e.g. Mac dashboard widgets, google gadgets, Sherlock search plugins, Palm compatibility, browser keywords, Palm devices, etc.) Frink has outlived you all.

New in Frink 20161025 (Oct 25, 2016)

  • There is now powerful new functionality for sorting strings according to human language rules. These allow correct handling of accented characters and easy sorting according to the rules of many, many human languages. The sorting is mostly encapsulated into the new lexicalSort functions:
  • lexicalSort[array] sorts an array of strings using the default language and locale settings defined in your Java Virtual Machine.
  • lexicalSort[array, languageCode] sorts according to the rules of the specified human language. languageCode is the ISO 639-1 two-letter code for the language.
  • If you need extreme control over the sorting order, languageCode can also be either a java.text.Collator or a java.util.Locale object which allows you very detailed control over creating custom sorting rules or locales. Please see the documentation for those classes for details on controlling sorting.
  • These allow Frink programs to sort many, many human languages correctly and easily, and allow correct internationalization and handling of strings, and make you look really smart.
  • See the Lexical Sorting section of the documentation for more details on these functions.
  • Some functions that sort their output (e.g. the "help" operator) that sort their output now sort them using correct lexical sorting order.
  • Made several usability and functionality improvements to the Swing and AWT user interfaces:
  • There are now quick keys (control-minus and control-equals) for increasing and decreasing the size of the fonts used.
  • Several improvements to focusing and scrolling.
  • The AWT output dialog from programming mode is now non-modal.
  • Updated the source for U.S. historical currency conversions to read from a new location, specifically here.
  • Added new named dimension combinations gravitational_constant and electric_force_constant so the -> operator could suggest their use in common calculations.

New in Frink 20160920 (Oct 20, 2016)

  • Frink's comparison operators, such as < , == , >= , including the three-way comparison operator can now compare Java objects that implement the java.lang.Comparable interface. This includes numeric types, strings, and many other types.

New in Frink 20160919 (Oct 19, 2016)

  • Frink's comparison operators, such as < , == , >= , including the three-way comparison operator can now compare Java objects that implement the java.lang.Comparable interface. This includes numeric types, strings, and many other types.
  • An immediate benefit of the above is that Frink can now sort Java arrays directly if they implement the Comparable interface.
  • Many improvements to sample libraries that provide arbitrary-precision calculations:
  • ArbitraryPrecision.frink: Added arbitrary-precision power function, improved natural log, cosine, sine, tangent, and exponentiation functions.
  • Gamma.frink: Contains a working arbitrary-precision calculator for the gamma function (a generalization of the factorial function) which works for large and small arguments.
  • pi.frink: Fixed cases where the number of digits requested is small.

New in Frink 20160918 (Oct 18, 2016)

  • Added normalizeUnicode[string, method="NFC"] function. This function normalizes the characters in a Unicode string using one of the methods described in the Unicode standard, specifically Unicode Standard Annex #15, Unicode Normalization Forms.
  • A Unicode string can use various methods to encode what is essentially the same character/glyph. For example, the character ô can be represented as either "u00F4" or "u006Fu0302". The former is a "composed" character, "LATIN SMALL LETTER O WITH CIRCUMFLEX", and the latter is two Unicode codepoints, an o followed by "COMBINING CIRCUMFLEX ACCENT". (This is usually referred to as a "decomposed" representation.) This function can convert these "equivalent" encodings into a canonical representation, whether it be composed or decomposed.
  • Unicode Standard Annex #15 currently defines four different methods of converting between these representations. (You might get the best idea of the differences between these by looking at figure 6 in the document.)
  • See the Other String Functions section of the documentation for more details on this function.

New in Frink 20160914 (Oct 14, 2016)

  • Minor usability fixes to the AWT and Swing user interfaces:
  • When loading a program in programming mode, the file is scrolled to the top instead of the bottom.
  • Tried harder to keep output window scrolled to the bottom in AWT and Swing.

New in Frink 20160929 (Sep 29, 2016)

  • Behavior change: When converting from Java byte to Frink types, bytes are now always returned as positive, unsigned values. That is, you no longer see Java's weird negative bytes that nobody in the world has ever wanted. (You could always convert numbers up to 255 into bytes, so this behavior change is only on output. You can still put negative numbers from -128 to -1 into bytes, but they'll be made into positive values when converted back to Frink types. This does not change their representation in Java objects.)
  • If your program did any of the following to work around signed bytes, it will still work fine:
  • if (byte < 0)
  • byte = byte + 256
  • byte = (byte + 256) mod 256
  • Possible behavior change: The messageDigest functions now force their input to be converted to bytes using the UTF-8 encoding before hashing. Previously, they used your platform's default encoding (which was likely UTF-8 already) but which may not have been portable from one system to another. See the Cryptographic Functions section of the documentation for more details on how to modify this behavior.
  • The messageDigest functions have been improved in several ways:
  • All messageDigest functions can now take an array of Java bytes as input.
  • Added a messageDigestBytes[input, algorithm] function to return the message digest as an array of Java bytes. Note: Most of the underlying cryptography routines in Java work with arrays of bytes, as these are safer than Strings which are immutable after construction and are eventually garbage-collected. Using arrays of bytes means that you can zero-out input buffers as soon as you're done with them.
  • Internal changes to ensure more reliable operations on platforms with sketchy implementations or strange encodings that can't encode all characters.
  • See the Cryptographic Functions section of the documentation for more details.
  • Added functions to convert strings to an array of bytes (with specified encoding) and vice versa:
  • stringToBytes[str,encoding="UTF-8"] turns a string into an array of Java bytes using the specified encoding. The encoding defaults to UTF-8, but can be a string indicating any encoding supported on your system.
  • See the encodings.frink sample program to see how to list all character encodings (and their aliases) available on your system.
  • bytesToString[bytes,encoding="UTF-8"] turns a Java array of bytes into a string using the specified encoding. The encoding defaults to UTF-8, but can be a string indicating any encoding supported on your system.
  • See the Other String Functions section of the documentation for more.

New in Frink 20160921 (Sep 23, 2016)

  • Possible functionality change: Improved the behavior of parsing user-defined date/time formats.
  • The new behavior is that user-defined date formats are given precedence when parsing. Frink will first attempt to match any user-defined date format, and, failing this, will attempt to match one of the formats in the default date formats file. This prevents ambiguity when two different patterns can match the same date. This usually happens only when a user-defined format uses a two-digit year (please don't do this, as even humans can't distinguish what format is intended in many cases. Learn from the lessons of Y2K, and prefer date formats like ISO-8601 where significant digits are first, like yyyy-MM-dd.)
  • This should not change the behavior of any program that worked correctly before, but might change the behavior of a program which was spuriously matching patterns incorrectly. Thanks to Jerrett Townsend for the bug report.
  • Frink can now parse Unicode superscript numbers as indicating exponentiation, such as 10⁻²³, which is equivalent to writing 10^-23, or x³, which is equivalent to x^3. See the Unicode Operators section of the documentation for more discussion and caveats.
  • Added and documented several Unicode operators as synonyms for multiplication and division. This makes it easier to cut and paste mathematical expressions from other sources and do the right thing with them. See the Unicode Operators section of the documentation for more details.

New in Frink 20160915 (Sep 17, 2016)

  • Added function toUnicodeSuperscript[int] to turn an integer into a string containing the equivalent Unicode superscript digits in base 10.
  • Added internal functions to more efficiently perform base conversions with custom alphabets, especially with smaller numbers.
  • RingBuffer is now deep copyable with the deepCopy[expr] function.

New in Frink 20160831 (Aug 31, 2016)

  • Added RingBuffer.isFull[] method.

New in Frink 20160830 (Aug 30, 2016)

  • Added a RingBuffer class that is useful for making efficient limited-sized queues and caches.

New in Frink 20160821 (Aug 22, 2016)

  • Added a DiscreteDistribution.frink sample library which allows you to choose between items with a specified probability distribution.

New in Frink 20160711 (Jul 12, 2016)

  • Added a demonstration of sending e-mails, SMS, or other messages from Android. See the Sending Intents section of the android documentation.

New in Frink 20160708 (Jul 9, 2016)

  • The padLeft[str, width, padChar] and padRight[str, width, padChar] functions can now take an arbitrary expression (instead of just a string) as the first argument. This makes it easier to pad numbers (but to be safe, you probably want to make sure that they're stringified correctly first.)
  • The output of the timezones[] function is now sorted.

New in Frink 20160707 (Jul 8, 2016)

  • Fixed a case in the "help" operator when only functions were matched. This could cause NullPointerExceptions. Thanks to Louis Blaine for the bug report.

New in Frink 20160706 (Jul 7, 2016)

  • Behavior change: Output from the double-question-mark "help" operator is now correctly displayed. It was possible that one of the lines was incorrectly appended to the other. In addition, instead of returning a list of strings, the double-question-mark help operator now returns a single string. The single-question-mark's behavior remains unchanged, other than still being sorted.
  • It was announced today that a leap second will be added at the end of December 2016. Validated that Frink's internal data file (loaded from the US Naval Observatory's tabulation of leap seconds) has the new leap second. For more information see the Leap Seconds section of the documentation.
  • Updated deltaT calculations with the new leap second.

New in Frink 20160625 (Jun 25, 2016)

  • Output from the "help" operator is now sorted, first by unit names and then by function names.
  • Function descriptors can now be sorted and compared.

New in Frink 20160607 (Jun 7, 2016)

  • Added the array.transpose[] method to transpose the elements of a 2-dimensional array, like in matrix calculations. This means that rows and columns are swapped. In other words, the element at array@i@j becomes the element at array@j@i.
  • Updated the Matrix.frink sample library to use the above-mentioned transpose function.

New in Frink 20160529 (May 29, 2016)

  • Added the function lineBreakList[string] which returns an enumeration of the places that a line can be broken. It correctly handles punctuation, numbers, and hyphenated words. See the Correct String Parsing section of the documentation for more details.

New in Frink 20160528 (May 29, 2016)

  • Functionality Change: Improved the reverse[str] which reverses a string. This is now a smarter reversal that follows Unicode rules to keep combining characters together and properly ordered.
  • For example, the string "g\u0308o" represents a g with combining diaeresis followed by the letter o. Or, in other words, "g̈o". Reversing this naïvely would cause the diaeresis to incorrectly show over the o instead of the g.
  • As another example, the Devanagari string "\u0915\u094D\u0937\u093F" (shown as क्षि ) is recognized as a single grapheme and the 4 Unicode codepoints that make it up are kept intact and not reversed.
  • If you, for some reason, need the old behavior, you can do something like:
  • reverse[charList[string]]
  • but keep in mind that this will still do the right thing like keeping surrogate pairs ordered correctly. Don't do this. It's never right for Unicode strings. Frink tries to always work on Unicode strings, and not individual characters, as working on individual characters or codepoints is almost always the wrong thing to do when processing Unicode.
  • Added methods to break up strings and iterate among their parts. Each of these returns an enumerating expression that allows you to loop through the parts of a string. See the Correct String Parsing section of the documentation for more details on the following:
  • graphemeList[string]: Enumerates through the graphemes of a string.
  • wordList[string]: Enumerates through the words of a string.
  • sentenceList[string]: Enumerates through the sentences of a string.

New in Frink 20160504 (May 4, 2016)

  • Added the ability to perform base conversions with custom alphabets. This allows you to both parse and format numbers in another base using a custom character set (as opposed to, say, the typical "0123456789abcdef" alphabet of base 16.) It also allows you to do custom base conversions well above base 36.
  • The examples show how to format and parse numbers in Bitcoin address format, Devanagari, and Unicode Superscripts

New in Frink 20160402 (Apr 3, 2016)

  • Added image.resize[width, height]] method to resize an image to the new specified width and height and returns a new image. It does not modify the original image. If either width or height are the special value undef or 0, then one dimension is constrained and the other dimension is calculated to preserve the aspect ratio of the original image.

New in Frink 20160331 (Mar 31, 2016)

  • Added multiplication by scalar to the Matrix.frink sample program.
  • Added functions to calculate inverse transformation matrices in the geometry.frink sample program.
  • Internal code additions to coordinate transforms and graphics views. These are intended to help pave the way for clickable, interactive graphics.

New in Frink 20160330 (Mar 30, 2016)

  • Added removeSlice[array, start, end] and removeSliceLength[array, start, length] functions to remove a "slice" from an array. These are the inverses of the previously-existing slice[array, start, end] and sliceLength[array, start, length] functions. See the Slicing Arrays section of the documentation for more.
  • Reorganized the documentation for array methods to make it more readable.

New in Frink 20160329 (Mar 29, 2016)

  • Rewrote exponentiation of complex numbers where the power is an exact (positive or negative) integer. For example, (3 + 2i)^3 or (3 + 1/2 i)^4. Results are improved in several ways:
  • Results are now complex numbers made up of exact integers or rational numbers when possible. (Previously, they were just exact up to powers of 2.)
  • Much larger or smaller results can now be obtained (previously, results were limited to IEEE-754 exponent ranges.) This is true even if the base is not composed of exact integers or rational numbers.
  • Floating-point errors are decreased or eliminated.
  • Increased precision is available even when the base contains floating-point numbers.

New in Frink 20160210 (Feb 11, 2016)

  • Minor fixes to historical currency calculations:
  • U.S. historical currency conversions now calculate the average for the previous year as soon as data for December is available.
  • Historical British Price Data is now updated with the recently-published 2015 figures.

New in Frink 20160201 (Feb 1, 2016)

  • Fixed a potential problem in the build of the frink.jar that might have prevented the use of high Unicode characters in Frink programs. This did not affect Android.

New in Frink 20160114 (Jan 14, 2016)

  • Completely rewrote the routines that provide Historical British Price Data. These should now work again, be more up-to-date, and initialize faster and more lazily.

New in Frink 20160105 (Jan 5, 2016)

  • Wrote a cool demonstration program greatCircleMap.frink which draws world maps centered on your location. This is based on the previous drawCountries.frink program which draws maps with different projections.
  • Updated the Country.frink library containing country shapes to have the country's polygons sorted from largest to smallest. This simplified mapping above and is more logical.

New in Frink 20160103 (Jan 3, 2016)

  • Improved the eval[expr] and unsafeEval[expr] functions so they wouldn't totally die when evaluating an array in which an element throws an exception. Now, elements of the aray that throw exceptions are returned as the special value undef.
  • Added positive[array] function to systemSolver2.frink which returns only positive results from a list.
  • Made tvaspect.frink work consistently and only return positive results.

New in Frink 20160102 (Jan 3, 2016)

  • Fixed the deltaT function which did not take into account the leap second introduced at the beginning of 2015-07-01. It was handled correctly in the Leap Seconds calculations, though. The calculations for delta-T need to be unified with the (automatically updated, smarter) leap seconds functions to avoid this issue in the future.
  • As a corollary of the above, my MIThenge predictions may be up to a second off for 2016 and may need recalculation. However, this error is much smaller than the current best uncertainty in the azimuth of the Infinite Corridor.
  • Updated future deltaT predictions for the year 2016. The earth's rotation hasn't been slowing down as much as predicted in the past, and future predictions may need to be researched and updated if new predictions are available.
  • Updated copyright dates for 2016. Happy New Year!
  • Updated sanity checks to 2016 for economic routines.

New in Frink 20151214 (Dec 15, 2015)

  • Updated algebraic simplification of power expressions that have units of measure in the base like (1/2 meter)^(-1/2). For a while, these were not simplified. They are now again simplified correctly.
  • Added the function realSignum[expr] which is a slightly-more-dangerous version of the signum[expr] function. This version only handles real numbers and returns -1, 0, or 1 depending on the number. All other values return the special value undef.

New in Frink 20151105 (Nov 5, 2015)

  • Important: Fixed a bug in algebraic simplification of power expressions like (1/2)^(-1/2) (which works correctly and transforms to 2^(1/2)) but did not work correctly in some cases if the base had units of measure and had a rational number for its scale and the exponent was a negative rational number.
  • Due to the way this code is invoked, it only appears to happen when using Frink's (somewhat undocumented) symbolic transformation capabilities which triggered this case. That is, it only appears to occur when building a symbolic expression and then transforming it by substituting parts of the expression. However, in any case, it is strongly recommended that you update whether you are using symbolic transformations or not.
  • Added a sample program to demonstrate Frink's symbolic solving capabilities which answers the question: If you dismantled the Great Pyramid of Giza, could you build a wall around France with the stone? And how big and thick could the wall be? GreatPyramid.frink

New in Frink 20151022 (Oct 23, 2015)

  • Added new expression constructors for several expression types. This allows them to be used in symbolic transformations.
  • Added a sample of definite integration to integrals.frink. This still needs some support from new language features to work seamlessly and efficiently.

New in Frink 20151008 (Oct 8, 2015)

  • Improved many error messages, especially those for conformance exceptions such as adding two values with different dimensions.
  • Updated all internal links to point to the new canonical Frink home, https://frinklang.org/

New in Frink 20151004 (Oct 4, 2015)

  • Added factorFlat[x] function to factor integers and return the results as a one-dimensional list instead of the two-dimensional list returned by factor[x]. This really isn't necessary, but makes some functional programs slightly easier to write. factorFlat[1000]
  • [2, 2, 2, 5, 5, 5]

New in Frink 20151001 (Oct 1, 2015)

  • Increased some internal cache sizes which should improve memory performance for certain types of programs.
  • Improved error messages for some operations.

New in Frink 20150923 (Sep 23, 2015)

  • Added a VenusApparent.frink sample program to graph the apparent position of Venus as seen from Earth. This uses the amazing planets.frink sample program which calculates the locations of the planets to high accuracy.
  • Added a function approximationsWithErrors to the continuedFraction.frink program to easily calculate the errors in continued fractions. This is demonstrated in the above program.

New in Frink 20150910 (Sep 11, 2015)

  • Changed the manifest in the frink.jar file to make the applet-based interface and the Java Web Start file work better from multiple hosts with modern Java security checks. (This is in anticipation of the upcoming move to the canonical site https://frinklang.org/ )

New in Frink 20150823 (Aug 23, 2015)

  • Fixes problem in the use statement on some platforms where the underlying system may throw a null pointer exception. This primarily affected Android 5.0.1 and higher.

New in Frink 20150704 (Jul 6, 2015)

  • Once again updated the code for U.S. historical currency conversions because my new data source evidently just switched to an HTTPS-only link. Thanks to Jesse Ira de Leon for letting me know that it was broken again.

New in Frink 20150630 (Jun 30, 2015)

  • The new 2014 CODATA values for the fundamental physical constants of the universe have been published and Frink has been updated! Be the first kid on your block to use the most accurate, latest and greatest research that has been compiled over the last 4 years!

New in Frink 20150629 (Jun 30, 2015)

  • Rewrote the source for U.S. historical currency conversions because I noticed that the previous Consumer Price Index source is no longer being updated regularly. (It's pretty sad when the Bureau of Labor Statistics, the original source of CPI data, can't even keep primary sources up-to-date. Also their "contact us" forms are broken. Yay government.)
  • The new source comes from the St. Louis Federal Reserve, specifically by parsing this file.
  • The new data is also cached in each Frink jar file in case you don't have network connectivity.

New in Frink 20150610 (Jun 10, 2015)

  • Updated sanity checks and performance optimizations to detect Java 9 and other VMs.
  • Removed debugging information that might have leaked to standard error.

New in Frink 20150508 (May 9, 2015)

  • Added graphics.backgroundColor[colorObject] method that sets the background color from a previously-obtained color object.

New in Frink 20150507 (May 8, 2015)

  • Fixed formatting of for and multifor loops that have labels.

New in Frink 20150506 (May 7, 2015)

  • Added getExponent[unit, dimension] to get the exponent for the specified base dimension. See the Other Functions section of the documentation for details. Thanks to Mike Meyer for the suggestion.
  • Updated sanity checks and performance optimizations to detect Java 9.

New in Frink 20150303 (Mar 4, 2015)

  • Rewrote code for sizing and placing windows:
  • Frink now requests that the operating system uses its algorithm for placing new windows (instead of letting Java do it badly.) This usually means that multiple graphics windows will be placed next to each other, rather than on top of each other, if your windowing system has a reasonable layout algorithm. This requires Java 1.5 or later to work, but previous versions of Java are still supported.
  • Rewrote the code for creating exactly-sized graphics windows. This means that the content of your windows will be exactly the size requested when using graphics.show[width, height]
  • image.show[] should now consistently display images at their exact native size by default. Previously, it may have been a couple of pixels off.
  • Initial user interface windows will more likely be placed sensibly, if your windowing system supports it.

New in Frink 201503012 (Mar 3, 2015)

  • Modified the int[x] and trunc[x] functions (which are the same thing) to work for interval arguments.

New in Frink 20150301 (Mar 2, 2015)

  • Addded functions to enumerate the partitions of an integer:
  • partitions[n] Returns an enumeration of the partitions of the integer n. For example:
  • for a = partitions[4]
  • println[a]
  • [4]
  • [3, 1]
  • [2, 2]
  • [2, 1, 1]
  • [1, 1, 1, 1]
  • partitionsCompact[n, countPermutations=false]: Like the partitions function above, but returns a more compact enumeration of the partitions of the integer n. Each list contains [num, count] pairs indicating the number and its count in a partition. For example, compare the following representation with the one from the partitions function above.
  • for a = partitionsCompact[4]
  • println[a]
  • [[4, 1]]
  • [[3, 1], [1, 1]]
  • [[2, 2]]
  • [[2, 1], [1, 2]]
  • [[1, 4]]
  • If the optional argument countPermutation is true, then each element also contains the number of possible permutations of the list.

New in Frink 20150222 (Feb 23, 2015)

  • Added a few new functions for manipulating filenames and URLs:
  • filenameToURL[string] turns a string containing a filename into a URL string.
  • fileURLs[string] takes a string representing a file or directory and returns an enumeration of files in that directory. Each string is the URL of a file in that directory.
  • fileURLsRecursive[string] takes a string representing a file or directory and returns an enumeration of files in that directory and all its subdirectories. Each string is the URL of a file in that directory.

New in Frink 20150216 (Feb 17, 2015)

  • Fixed problems in converting rational numbers with very large or very small parts to a double value. (i.e. if the numerator or denominator or result of the rational number couldn't fit into a double). When converting rationals to double, validity of results is now checked much more strongly, and alternate methods are used to perform the division if the numerator, denominator, or result isn't representable as an IEEE double. While most Frink functions don't use IEEE-754 double values directly, they are used in some APIs (like graphics libraries and hardware-accelerated trigonometric functions). The problems are usually directly apparent and cause programs to stop at higher levels, but Java's graphics APIs silently swallow NaN and infinite values, which made these cases possibly slip through the graphics system undetected.
  • Added a toRational[num] function to convert Frink's internal representation of a floating-point number to an exact rational number representation of the number represented.

New in Frink 20150204 (Feb 4, 2015)

  • Improved containment for intervals in the exponentiation operator and sin[] function.

New in Frink 20150121 (Jan 21, 2015)

  • Fixed some units in the standard data file that were directly or indirectly defined in terms of electroncharge, which changed sign recently.
  • Made several fixes to Formatting Functions: Documented the functions formatSci[value, divideBy, decPlaces]

New in Frink 20150116 (Jan 20, 2015)

  • Fixed the sign of electroncharge to be negative. Also added units elementarycharge, protoncharge, neutroncharge, upquarkcharge and downquarkcharge, and modified several definitions to use elementarycharge instead of electroncharge. Thanks to Enon Harris for the catch.
  • For Android: Fixed a crash and presented a better warning (with suggestions) when trying to load or save a file in programming mode when the SD card is not available.
  • Changed = to := in defintions of Mars's moons Phobos and Deimos in the standard data file. Thanks to Daniel Beskin for the catch. Also thanks to Daniel for writing an entertaining introductory article about Frink.

New in Frink 20150105 (Jan 6, 2015)

  • It was announced today that a leap second will be added at the end of June 2015. Validated that Frink's internal data file (loaded from the US Naval Observatory's tabulation of leap seconds) has the new leap second. For more information see the Leap Seconds section of the documentation.

New in Frink 20150102 (Jan 3, 2015)

  • When adding text to a graphics object, the text can now contain embedded newlines, which are broken into separate lines and handled appropriately. This makes it much easier to lay out multi-line blocks of text. It is now essential to explicitly set a font size on a graphics object before adding multi-line text.
  • Fixed miscalculation of some bounding boxes for rotated text, and for text vertically aligned to the baseline. To be more precise, the text was always rendered where it should have been, but due to miscalculation of the bounding box, it may not have been visible in the rendering area if it was on the edge of the graphic, or the only thing in the graphic. This did not affect the default case where the text was centered at the specified coordinates, but may have affected cases where horizontal and vertical alignment was not "center".
  • Updated copyright dates for 2015.

New in Frink 20141229 (Dec 30, 2014)

  • Added a version of array.lexicographicPermute[function] which takes an ordering function to perform the permutation. See the Array Methods section of the documentation.
  • When rendering graphics to HTML files, each bitmapped image is only included once in the output, even if it is rendered multiple times. This may greatly decrease the size of HTML files.
  • You can now add bitmapped images when rendering graphics to Scalable Vector Graphics (SVG) files.
  • Changed some internal sanity checks to the year 2015.

New in Frink 20141219 (Dec 19, 2014)

  • Internal changes to Frink's security manager:
  • Security errors when constructing an object with the new keyword or constructExpression function are now printed more specifically.
  • Security manager now has more granular control over expressions constructed with constructExpression function.

New in Frink 20141210 (Dec 10, 2014)

  • Added graphics.fillCenter[img, cx, cy, width, height] and graphics.fillCenter[img, cx, cy, width, height, leftSrc, topSrc, rightSrc, bottomSrc] methods which draw an image onto the graphics object with the specified center coordinates (cx,cy), making it completely fill the specified width and height without modifying the aspect ratio. Note that this may cut off part of the image. See the Images section of the documentation for more.

New in Frink 20141203 (Dec 3, 2014)

  • Graphics can now also be clipped to a GeneralPath, which means that graphics can now be clipped to all of the two-dimensional shapes that Frink supports. See the Clipping Graphics section of the documentation for more.
  • See the GeneralPathClipTest.frink sample program for an example of clipping to a GeneralPath.

New in Frink 20141123b (Nov 24, 2014)

  • Graphics can now also be clipped to an ellipse or a polygon. See the Clipping Graphics section of the documentation for more.

New in Frink 20141123 (Nov 24, 2014)

  • Frink's graphics now allow you to set an arbitrary clipping rectangle which constrains the drawing area. This improves graphing equations, drawing maps, and makes it safer to draw graphics into a specified area.
  • A cool thing about the clipping implementation is that, like all of Frink's graphics, you can render to any coordinate system that makes sense to you, even if it's rotated, scaled, skewed, and clipped, and Frink will automatically center and scale that into your graphics window by default, greatly simplifying many graphics programming tasks. In other words, this can be used to "zoom in" on a section of a larger graphic--just set a clipping region before drawing the graphic and only the section within the clipping region will be displayed.
  • See the Clipping Graphics section of the documentation for more.
  • Now that many browsers implement the even-odd winding rule in the HTML 5 canvas (previously, the specification only supported the rather useless nonzero winding rule,) Frink now requires that functionality, and will now draw many more concentric or self-intersecting objects correctly in HTML5.
  • This feature is being gradually implemented in current browsers, (but not yet in the official HTML5 Canvas spec!) Your browser needs to support the HTML Canvas's context.fill("evenodd") method for Frink's graphics to work properly now. This appears to be supported in current versions of Firefox (21+), Firefox on Android, Chrome (27+), Opera (15+), Safari 8.0, and IE11 (according to this).

New in Frink 20141020 (Oct 20, 2014)

  • The random[min, max] and random[int] functions can now handle arbitrarily-large integer arguments (previously, they could only handle arguments with magnitudes up to 231.)
  • Added an internal optimization that may make integer-heavy operations work faster.

New in Frink 20140924 (Sep 24, 2014)

  • Added Indian terms lakh (100 thousand) and crore (10 million). Thanks to Emily Lakdawalla for pointing these out in her coverage of India's Mars Orbiter's successful orbital insertion burn around Mars.
  • Internally rewrote some parsing routines for Devanagari numbers.

New in Frink 20140821 (Aug 21, 2014)

  • Added array methods:
  • array.indexOf[value]
  • array.indexOf[value, startIndex]
  • array.lastIndexOf[value]
  • array.lastIndexOf[value, startIndex]
  • array.contains[value]
  • See the Array Methods section of the documentation.
  • The left[string, len] and right[string, len] methods can now take negative arguments for len. If len is negative, it returns a string with -len characters removed, that is, if the original string is 5 characters long, and len is -1, 4 characters are returned. In any case, if the original string is shorter than the number of characters requested, the string returned will contain only the number of characters available, and will not return an error.

New in Frink 20140820 (Aug 21, 2014)

  • Fixed the exp[n] to not overflow or underflow. The functions in ArbitraryPrecision.frink are still preferred if you need exact, very large exponents.
  • Improved error messages for the parseInt[str, base] function.

New in Frink 20140731 (Jul 31, 2014)

  • Functionality Change: Suppressed a trailing newline that was printed from most programs loaded from a file. This behavior is due to the fact that Frink would print the value of the last evaluated expression when exiting. Most meaningful programs end with statements that have void values, so the only effect was a blank line. The blank line is now suppressed, but if the last statement in a program actually returns a value, it will still be printed. It was probably not noticeable unless you piped Frink's output into some other sensitive program. Thanks to Ty! Boyack for noticing the problem.
  • It's likely that the current behavior will change further. If you expect a program loaded from a file to output the last expression evaluated, you will soon likely have to wrap it in a println[] statement, as Frink will likely someday never output the value of the last expression evaluated.
  • Added (not-yet-officially-documented, pending final testing, but already much superior and recommended) functions for formatting units of measure which improve on and supersede the format[num, divideBy, decPlaces] function.
  • The new functions are:
  • formatSig[num, divideBy, decPlaces] : Divides num by divideBy and returns a string with decPlaces significant figures. The value will be in normal notation when possible and scientific notation when required to display the requested number of significant figures.
  • formatSci[num, divideBy, decPlaces] : Divides num by divideBy and returns a string in scientific notation with decPlaces significant figures.
  • formatEng[num, divideBy, decPlaces] : Divides num by divideBy and returns a string in engineering notation (that is, the exponent is a multiple of 3) with decPlaces significant figures.
  • formatFix[num, divideBy, decPlaces] : Divides num by divideBy and returns a string in with a fixed number decPlaces of digits after the decimal point.
  • formatFix matches the historical and current behavior of the format[num, divideBy, decPlaces] function.
  • Warning: format and formatFix are almost necessarily broken, lose information, and do not necessarily calculate all decimal places correctly, especially when displaying the values of exact fractions like 2/3 to a large number of decimal places. The behavior of the format function will eventually change to follow the behavior of formatSig as listed above. You may want to prepare modifying your programs now. Changing all instances of format[ to formatFix[ should preserve the current behavior forever, but it is strongly recommended to move to smarter functions like formatSig.
  • In all of the above, divideBy should be 1 if the number is dimensionless. If divideBy is a string, this evaluates the string, expecting a unit to be returned, and both divides by this unit and concatenates the string after the result.
  • Made lots of internal mathematical improvements to support more accurate rounding when formatting numbers. These improvements can be seen in the formating functions above, most notably when displaying exact rational numbers to a large number of decimal places, complex numbers, and intervals. Containment for intervals when calling the new formatting functions is vastly improved.

New in Frink 20140707 (Jul 9, 2014)

  • Modified the Web-based Interface to be a bit more usable, including controlling scrolling to the results, placing results right after the calculation field, and trying to work around auto-capitalization and autocorrect problems in mobile browsers.

New in Frink 20140702 (Jul 3, 2014)

  • Modified Functionality: Frink now handles high Unicode characters (those above \uFFFF) much more easily and correctly. These changes will not affect you if you don't process high Unicode characters, but if you do, there will be some changes:
  • High Unicode characters will be represented as a single character (rather than by two "surrogate pair" characters as in Java.) The following functions have been modified to behave properly and easily with high Unicode characters, treating them as a single character.
  • char[str]
  • chars[str]
  • charList[str]
  • editDistance[str1, str2]
  • editDistanceDamerau[str1, str2]
  • indexOf[string, substr]
  • indexOf[string, substr, startPos]
  • length[str]
  • padLeft[str, width, padChar]
  • padRight[str, width, padChar]
  • For more information, see the Unicode in Frink and Unicode in Strings sections of the documentation.
  • If you want the old, cumbersome Java-style string functions that treat high Unicode characters as a pair of surrogate characters, the following functions have been added. See the Raw String Functions section of the documentation for more.
  • charsRaw[string]
  • indexOfRaw[string, substr]
  • indexOfRaw[string, substr, startPos]
  • lengthRaw[string]
  • substrRaw[string, startPos, endBefore]
  • substrLenRaw[string, startPos, length]
  • The new Unicode escape sequence \u{XXXXXX} places a Unicode character into the string, where XXXXXX is a 1- to 6-digit hex value for the Unicode codepoint. For example, to create a string with a cat face, you would use "\u{1f638}" (this is the Unicode character "GRINNING CAT FACE WITH SMILING EYES".) For more information, see the Unicode in Strings section of the documentation.
  • Variables and identifiers in Frink programs can now be high Unicode characters:
  • 😸 = "kittyface" // Unicode \u{1f638}
  • \u{1f638} = "kittyface" // Alternate ASCII-safe representation.

New in Frink 20140609 (Jun 10, 2014)

  • The Swing GUI now tries harder to work around bugs in Swing. Namely, the Swing interactive GUI would refuse to scroll correctly if the font size was changed. This improves that situation on the JVMs it has been tested on.

New in Frink 20140603 (Jun 4, 2014)

  • Added array.remove[start, end] and array.removeLen[start, length] methods to remove a range of items from an array. See the Array Methods section of the documentation.

New in Frink 20140602 (Jun 3, 2014)

  • Many changes to date/time parsing:
  • Changes to allow ISO-8601-format dates like:
  • 2014-06-02T02:24:10Z
  • This required making changes so that quoted text literals in a format could actually work correctly. (e.g. the literal character T in the example above that separates the date from the time.) The above format is actually specified as:
  • # yyyy-MM-dd'T'HH:mm:ss #
  • where the single quotes do not actually appear in the date; they are ways of escaping the literal text T.
  • Timezone specifiers are now more flexible with respect to whitespace; the timezone name can be separated from the date/time with zero or more spaces. (Previously exactly one space was allowed.) This allows the ISO-8601 format above, where the "Z" timezone is flush up against the timezone name, and more latitude in parsing.
  • Allowed Custom Timezone specification in the formats allowed by RFC 822, RFC 1123, ISO-8601, and Java's default parsing. These look something like:
  • +0700
  • -0700
  • +07:00
  • -07:00
  • GMT+0700
  • GMT-0700
  • GMT+07:00
  • GMT-07:00
  • This allows ISO-8601 formats with the custom numeric-only timezone jammed directly onto the end of the date, such as:
  • 2014-06-02T02:24:10-06:00
  • Added Z (Zulu; a synonym for Universal Coordinated Time) timezone alias. This is required by ISO-8601 format dates.
  • Added an new Timezone Warning section to the documentation, warning about the problems with using the timezone aliases that look like Etc/GMT+7 or GMT+7 as defined by the Olson timezone database, the POSIX standard, and Java. These aliases should be considered error-prone and dangerous. Please read that section carefully.
  • Added parsers for RFC-8601, RFC 822, RFC 1123 to the standard date formats file. (RFC 822 and its successor, RFC 1123, specify date formats required in HTTP headers.)
  • Modified parsing of milliseconds for all time formats in the date formats file to use .S instead of .SSS which gives more flexibility and correctness in parsing (using .SSS required 3 digits to be present while .S can handle 1 to 3 digits.) There are also bugs in Java's parsing if .SSS is used and less than 3 digits were provided.
  • Added a sample in the Listing Timezones section of the documentation, showing how to find timezones that contain a substring.

New in Frink 20140526 (May 27, 2014)

  • Added functions integerDigits[num] and integerDigits[num, base] to return an array of the digits of a non-negative integer in the specified base.

New in Frink 20140521 (May 22, 2014)

  • Fixed the deepCopy[expr] function which was broken recently.

New in Frink 20140520 (May 21, 2014)

  • Fixed the bug introduced in Java 7 that long words or numbers in the Swing GUI do not wrap like they always have. They now wrap as they did since the first Swing releases. (See Java Bug 7125737 which was stupidly closed as "not an issue". This major compatibility bug is not easy for end developers to fix (but would be trivial for Java's developers to fix) and affects almost all Java programs that use Swing. Sigh.) This only affects the Swing GUI so an Android release was not made.

New in Frink 20140509 (May 10, 2014)

  • The select and remove functions now allow selector functions with more than one argument. Previously, all arguments were passed as an array to a single-formal-argument function, which will continue to work the same if you pass in a one-argument selector function. See the documentation select and remove for examples.
  • Behavior change: The select and remove functions now try harder to keep their return values as arrays if passed an array, and an enumerating expression if passed an enumerating expression. In addition, they now keep dictionaries as dictionaries, OrderedLists as OrderedLists, and sets as sets. To obtain other types, toArray[expr], toDict[expr], and toSet[expr] functions. If in doubt, use these functions directly to change the return types.)
  • Internal change: All array types are now also enumerating expressions (i.e. all ListExpressions are now also EnumeratingExpressions.) Almost all of them were already, but now all are. (The only changes were to ComplexArray and ComplexArray2D, used mostly in Fourier transforms.) This allows for simplification of some code (e.g. the select function has turned into a single, simpler implementation.)

New in Frink 20140505 (May 6, 2014)

  • Behavior change: Revised the select and remove functions to make them return an enumerating expression if passed an enumerating expression. (Previously, they returned an array. They still return an array if passed an array.) This makes these functions now work properly with very large or infinite series, and work much better with long-running operations. This change may also allow significantly-reduced memory consumption, as you can process each element and then forget about it, rather than holding on to a large array of values.
  • If for some reason you need them as arrays, you may want to wrap the call to select in a call to the toArray function to restore the original behavior.
  • Internally revised code to turn a java.io.File into a URL. This is safer and uses better libraries on Java Virtual Machines that have them (at the expense of doing a bunch of call-by-introspection.)
  • For Android: Added more hints on what to try if Java throws a low-level exception in random code. (This is usually due to the Android device not allocating enough stack space for highly recursive calculations.) Thanks to Andrew Webb for the report.

New in Frink 20140430 (May 2, 2014)

  • Added a remove function which is the inverse of the select function. It removes items that match a condition from an array or enumeration.
  • Documented a few regular expression patterns like (?!pattern) and (?=pattern) that have always been available but were not documented. See the Basic Patterns and Metacharacters section of the documentation for more.

New in Frink 20140423 (Apr 24, 2014)

  • Fixed a bug in the cache for the Historical British Price Data. This could return incorrect values when first requesting one unit for a given year (e.g. pound_1914) and then requesting another unit for the same year. (e.g. pence_1914).

New in Frink 20140421 (Apr 24, 2014)

  • Updated the jar file's manifest file to hopefully eliminate many of the new security warnings and dialogs presented by Java 7 when running Java Web Start. Note that in some cases, this will change the name of the icon on your desktop or start menu, or will create multiple icons. Sorry--this appears to be out of my control. Whenever Java Web Start gets confused (which seems to be always,) I always recommend deleting the application from your Java console and reinstalling it from the links in the Java Web Start section of the documentation (after reading the new warnings in that section.) Please let me know if older (or newer) versions of Java Web Start cannot start with these new changes. Again, make sure you read the new warnings in the Java Web Start section first.
  • Behavior change: The staticJava functions now try harder to turn their return values into Frink types. For example, types that were previously returned as JavaObject:java.lang.Integer are now returned as a normal Frink integer. This should not affect most programs, but If you need the original behavior, you can call the three-argument version, with the third argument false indicating that the value should not be converted to a Frink type. See the Accessing Static Java Fields section of the documentation for more details.
  • Added more security checks around method calls by name.

New in Frink 20140420 (Apr 24, 2014)

  • Modified newJava functions to explicitly throw exceptions when the user attempts to call a Java constructor with invalid arguments. Previously, the call could fail silently in some cases. Thanks to Frank van Noorden for the report.

New in Frink 20140417 (Apr 17, 2014)

  • Major New Functionality: Frink's formatters were totally rewritten to allow output in multiple formats. This includes a new "input form" which lets you easily save and load most Frink data structures (and programs,) send them over a network, etc., in a simple, safe and reversible way. See the Formatters section of the documentation for more.
  • This involved a large cleanup of lots of formatting code and redesign of many classes which should make it easier to make Frink render code in other languages and supports future features like genetic programming.
  • Several new functions have been added to support formatting in different formats:
  • format[expression, format] formats the expression to a string using the specified formatter. Current formatters include the strings "Input" and "Output". "Input" is a formatter that provides Frink's input form that can be easily parsed by a call to eval[str]. "Output" is the human-friendly formatter, which has been greatly improved in this release.
  • formatters[] lists the currently-available expression formatters.
  • inputForm[expression] and outputForm[expression] are aliases for format[expression,"Input"] and format[expression,"Output"] respectively.
  • Formatting options such as showApproximations[], rationalAsFloat[], setEngineering[], and showDimensionName[] and the :-> operator are now local to the interpreter, (and only effect the "Output" formatter,) not global to the entire Java Virtual Machine. This makes it safer to embed multiple Frink parsers in a single virtual machine, each with their own preferences, and makes Java Server Pages more robust against poorly-behaved scripts. (Programs still need to pass a security check to set these flags on an interpreter basis.)
  • Nested data structures are now indented appropriately.
  • The Julian day parser can now parse rational numbers or date intervals, for example:
  • Rational: # JD 212263942857555001/86400000000 #
  • Interval: # JD [212263942933679/86400000, 70754647644893/28800000] #
  • When outputting dates in "input form", the date will be formatted as an exact Julian day (possibly an interval or an exact rational number as above) if necessary, or in a human-readable format in UTC, if sub-millisecond precision is not required, which allows exact round-trips of dates.
  • Currently, objects created from a class specification will be output as a dict with name-value pairs for all instance variables. This may change. This is currently done because there's no way to guarantee that the Frink interpreter on the other end has loaded the same class or a compatible version. There are potential security and correctness issues if the classes are incompatible. A malicious user could also modify the data to get around security or logic checks and create invalid or dangerous objects. It's currently left up to the programmer to take these objects and turn them back into the objects they want on the other end. This may change.
  • Added toASCII[str] function to turn a string into a network and file-encoding safe ASCII-encoded equivalent. This is useful if you don't want the full quoting of inputForm.
  • Note: Many expression types have changed their child count and/or ordering with this release, so if you use the (undocumented and changing) functions getChildCount[function] and getChild[function, index], expect some changes. Hopefully universally for the better.
  • Made many changes to the way that functions allow you to discover their arguments and body using getChildCount[function] and getChild[function, index].
  • The arguments to a function are now first-class expressions, with information about their types, constraints, and default values.
  • The body of a function can be returned.
  • Named functions, such as those returned from the getFunction[name, argCount] actually remember their names and allow you to display their names and arguments correctly, and call them through an indirect variable.
  • In inputForm, the body of an function is dumped in a usable way (for anonymous functions defined in Frink code. The body of Frink functions implemented in Java are not dumped.)
  • Added expressionConstructors[] function which returns the names of all the expressions that can be constructed by name and argument list.
  • The three-way comparison operator is now a proper first-class operator with a proper precedence, and can dump itself properly.
  • The match operator =~ is now a proper first-class operator with a proper precedence, and can dump itself properly.
  • Regular expressions and search-and-replace expressions can now dump themselves in a human-readable format.
  • The child types of many expressions have changed from returning strings to returning SymbolExpressions for easier formatting and correctness.
  • Boolean algebra operators now dump themselves with a text string instead of symbols (e.g. and instead of &&.)
  • The existing functions toArray[expr] or array[expr] can turn an object created from a class specification into an array of [key, value] pairs.
  • The existing function toDict[expr] can turn an object created from a class specification into a dictionary of key, value pairs.
  • Added functions for dumping the children of an expression:
  • children[expr]: Returns an array containing all the children of the expression.
  • childrenWithTypes[expr]: Returns an array containing all the children of the expression and their types.
  • childTypes[expr]: Returns an array containing the types of all the children of an expression.

New in Frink 20140318 (Apr 14, 2014)

  • Modified the JSON parser to allow an escaped forward slash, to match the spec, and tightened the list of characters that are allowed in a string (that is, disallowed unescaped control characters.)
  • Now that the U.S. Bureau of Labor Statistics has now apparently made the Consumer Price Index file available from a non-broken HTTP site (as opposed to their old broken FTP site, see the notes for the 2013-07-09 release,) Frink now fetches the CPI file from their site instead of mine.

New in Frink 20131112 (Nov 13, 2013)

  • Frink can now render animated GIFs! These are quite simple to generate from a series graphics objects with very little additional code. See the Animated Images section of the documentation for details.

New in Frink 20131110 (Nov 11, 2013)

  • Changed calculation and display of approximations to rational numbers to use "engineering notation" whenever requested. This especially manifests itself when rationalAsFloat[true] is called. Note that the approximations are calculated slightly differently before (before, they could use IEEE-754 math and now they use Frink's division with proper rounding.) Many more numbers are correctly displayed as "exact" now. Note that this may change the display of some numbers (numbers close to zero with 5 or fewer leading zeros after the decimal point are currently not displayed in scientific notation.) Thanks to Phil Knodle for the bug report.
  • Updated references in the standard data file about the amount of energy in a quantity of TNT. This is another case where NIST Special Publication 811 is broken or vague.

New in Frink 20131029 (Oct 31, 2013)

  • You can now render arbitrary-resolution graphics objects into bitmapped images in memory using the constructor
  • For Android: Fixed a potential issue where images might not be rendered correctly if the file extension was in lowercase.
  • For Android: Enabled writing images and graphics to WEBP graphics format if your platform supports it.

New in Frink 20131021 (Oct 22, 2013)

  • The uppercase and lowercase functions can now be applied to a list of arguments.
  • Added a function readLines[URL] to read the contents of an entire URL into an array with one line per entry. Thanks to Millicent (whose name, when converted to lowercase, is a parseable Frink unit) for the inspiration.

New in Frink 20130928 (Sep 30, 2013)

  • Added base64[integer] to encode an integer to/from a string in standard base64 encoding format. If passed an integer, returns a string representing the integer as a base 64-encoded value. This uses standard base-64 indices in the order A-Za-z0-9+/. If passed a base-64 encoded string, this returns an integer with the corresponding value.
  • The base[integer, base] base conversion function can now have 64 as a base.
  • The parseInt[integer, base] base conversion function can now have 64 as a base.

New in Frink 20130922 (Sep 23, 2013)

  • Added graphics.alpha[opacity] command to set the transparency (often called "alpha channel") of all subsequent drawing operations. The opacity is a dimensionless number from 0 (fully transparent) to 1 (fully opaque.) This primarily allows you to draw transparent images, as transparency could already be specified when setting colors. If a color already has a transparency, that transparency value will be multiplied by this global transparency.
  • For Android: With respect to the changes above, modified the behavior of drawing bitmaps when the current drawing color has a transparent alpha channel. Previously, if the current drawing color had a transparent alpha value, the bitmap was rendered with the same transparency. This was probably unexpected and does not match the behavior of Frink on other platforms. Now, to render bitmaps with some transparency, you need to call graphics.alpha[opacity] before rendering the bitmap.
  • This global alpha channel also affects any other subsequent drawings that are being done, multiplying the alpha channel in drawn colors by the global alpha channel.

New in Frink 20130919 (Sep 21, 2013)

  • Again updated the statistics.frink to eliminate source of underflow/loss of precision when calling erfc and inverseErfc for large arguments.

New in Frink 20130916 (Sep 17, 2013)

  • Updated the statistics.frink to eliminate source of underflow when calling erfc for large arguments. Thanks to Dave Schulman for the bug report.

New in Frink 20130908 (Sep 9, 2013)

  • Started a new Frink Science mailing list. (Hosted by Yahoo! Groups. Link opens in new window.) This list is intended to discuss problems in math, science, and physics and explore solutions using the Frink language.

New in Frink 20130728 (Jul 29, 2013)

  • Added a labeled next LABEL level statement to jump to the next specified level of a multifor construct. See the documentation for multifor and the sample program multinexttest.frink for more.
  • Allowed OrderedList to take a second parameter which is an arbitrary data object that will be passed to the comparison function.

New in Frink 20130709 (Jul 11, 2013)

  • The U.S. historical currency converter in Frink and the associated webpage may not have been working for you if you are using a new version of Java, because it can't connect to the U.S. Bureau of Labor Statistics FTP server. Technical reasons at bottom, if you care.
  • As a result, Frink will now temporarily fetch the file from my site, http://futureboy.us/frinkdata/cpiai.txt instead of the URL ftp://ftp.bls.gov/pub/special.requests/cpi/cpiai.txt . I mirror the file on a daily basis for now. The current release of Frink will fix the problem temporarily.

New in Frink 20130703 (Jul 3, 2013)

  • Added array.clear[] method to remove all elements of an array.

New in Frink 20130619 (Jun 19, 2013)

  • Fixed a problem in formatting Dynamical Time values in later JVMs. This could possibly cause NullPointerExceptions. The design and implementation of Java's Calendar, Date, and TimeZone classes are quite insane.

New in Frink 20130615 (Jun 17, 2013)

  • Fixed a problem in the sun.frink astronomical library. The approxTransit function could potentially jump a day backward or forward, which could affect the date returned by the approxRiseSet, sunrise and sunset functions.

New in Frink 20130605 (Jun 5, 2013)

  • The special value undef is now a hashing expression, so it can be placed into a set, used as a key in a dictionary, and so on.
  • My super-fast divide-and-conquer Schönhage base conversion routines have been extended to work with all bases from 2 to 36. My improvements for faster multiplication and radix conversion will hopefully make it into Java 8 after 11 years of battling to get them approved. Much of my programming efforts over the last month has been in polishing and testing those routines and preparing staged patches for review.

New in Frink 20130328 (Mar 29, 2013)

  • Turned div, mod, and conforms operators into true operators in Frink so they know their precedence and can display themselves more effectively.
  • Modified all the links to colorize.fsp and highlight.fsp to have shorter links. Old links will still work too.

New in Frink 20130315 (Mar 15, 2013)

  • Allowed labeled next statements to break out to the next iteration of a specified loop (this includes for, multifor, do, and while loops. See the for loop section of the documentation for an example.
  • Fixed parser problem with labels preceding while loops.
  • Added getLowestSetBit[num] function which returns the index of the rightmost (lowest-order) one bit in an integer (the number of zero bits to the right of the rightmost one bit). Returns -1 if the integer contains no one bits.
  • Added shiftLeft[num, bits] function which shifts the bits of an integer left by the specified number of bits. New bits will contain zero. This is equivalent to multiplying by 2bits but is usually more efficient for large numbers.
  • Added shiftRight[num, bits] function which shifts the bits of an integer right by the specified number of bits, losing the bits pushed off the right side. This is equivalent to performing a div by 2bits but is usually more efficient for large numbers.

New in Frink 20130305 (Mar 6, 2013)

  • Fixed currency conversions to work again.

New in Frink 20130219 (Feb 19, 2013)

  • The DFT and InverseDFT functions can now take 2-dimensional arrays as well as 1-dimensional arrays. See the Other Functions section of the documentation for details.
  • Refactored the Fourier transform code to handle multi-dimensional arrays.
  • Added sample program to demonstrate 2-dimensional Fourier transforms. Note that this file is not actually necessary, as 2-dimensional Fourier transforms are now built into Frink, but this demonstrates the algorithm simply.

New in Frink 20130218 (Feb 18, 2013)

  • Changed Java Introspection to partially work around the 15-year-old (I'm not kidding) Sun Bug 4071957 (and its dozens of related bugs) which causes method invocation to fail on classes that are declared private, even if the methods are public and access would be allowed from normal Java code. This works around a major design flaw in Java's introspection. The fix this time now also looks in implemented interfaces to eliminate the problem.
  • Added randomBytes[numBytes] function to generate an array of random bytes (as a Java byte array.)
  • Added a sample of AES-256 encryption and decryption with proper padding and salting (I hope.)

New in Frink 20130214 (Feb 15, 2013)

  • The contents of an array can be randomly shuffled with the array.shuffle[] method.

New in Frink 20130205 (Feb 6, 2013)

  • Improved Frink-to-Java type conversions. The code now checks more strongly to see if numbers are dimensionless, are integer-valued, and will fit into the specified numeric type (e.g. int, byte, double, etc.)
  • This helps to disambiguate between previously-ambiguous calls such as doSomething[int] and doSomething[float]. If the value is a floating-point value, the above will always select the float method, rather than indicate that the call is ambiguous. If the value happens to be an integer, this is still ambiguous, because the integer could be coerced to a float parameter (but not the other way around.)
  • The code still does not try to disambiguate by the size of the value, such as between (int and short) or (double and float) if the value will fit into both, but if an integer value is too big to fit into a short, this will be unambiguous.

New in Frink 20130131 (Feb 1, 2013)

  • Added getSensorService[sensorNum, updateFrequency] which allows the user to specify the update frequency for sensors. See the documentation for SensorService for more information.
  • Added SensorService.getAccuracy[] method to return the accuracy of the readings from the sensor.
  • Added SensorService.waitForValues[] method. This returns the latest raw values from the sensor as an array of floating-point values without dimensions. If new, unread values are available, this returns them immediately, otherwise it blocks until new values become available. This is much preferable to polling.
  • Added a waitForGPSLocationJava[] method which returns the current-known GPS position as a Java object of type Location. If a new, unread GPS location is available, this returns it immediately, otherwise it blocks until the next GPS location is available. It should not return data until GPS locations are being returned. This is much preferable to polling.

New in Frink 20130124 (Jan 24, 2013)

  • Optimized several control flow commands such as return, next, and break to be faster. When calling a tight loop with short functions that return data, performance was improved by a factor of 2.7 to 3.4 on some architectures and JVMs! Unfortunately, it's only 1.15 times faster on Android/Dalvik.
  • Improved formatting of a list of statements. That is, doing things like dumping the body of a function.
  • Several smaller optimizations to variable lookup.

New in Frink 20130112 (Jan 18, 2013)

  • Fixed listen[prompt, numOptions] to actually present no more than the specified number of options to the user.

New in Frink 20130107 (Jan 9, 2013)

  • Important: The security manager now checks to see if you have permission to call methods or write fields on Java objects when security is enabled (e.g. when you're in an eval statement or when restrictive security has been turned on.) This prevents untrusted users from calling potentially-unsafe methods on arbitrary Java objects that might be accessible from their scope.
  • The last argument to callJava["classname", "method", argList] can now be eliminated if there are no arguments to the method.
  • The last argument to callByName[obect, "methodName", argList] can now be eliminated if there are no arguments to the method.
  • Internal changes to newJava function to simplify and reduce code.
  • Refactored and modified internals of functions to allow getChildCount[function] and getChild[function, index] to do useful things. Child 0 of a function is now a string representation of its argument list, (which may change to a more useful object type in the future), and child 1, if it exists, is the body of the function. This may allow you to do interesting things like take the derivative of a user-defined function.

New in Frink 20130105 (Jan 5, 2013)

  • The argument to the lines[] function can now be a java.io.InputStream, allowing you to iterate over InputStreams provided by other libraries.
  • The constructor new image[java.io.InputStream] allows you to construct an image from a java.io.InputStream, possibly entirely in memory.
  • Fixed rendering of graphics that have both transformations and units of length.

New in Frink 20121213 (Dec 14, 2012)

  • Added additional graphics transformation convenience methods graphics.rotate[angle, cx, cy] and graphics.scale[sx, sy, cx, cy] to rotate and scale around the specified point respectively. See the Transforming Graphics section of the documentation for more information.
  • Added arbitrary affine transform method graphics.transform[a,b,c,d,e,f] which allows you to specify all the coordinates of the affine transformation matrix, enabling skews and other effects. See the Transforming Graphics section of the documentation for more information.
  • Added possibly-educational technical notes to the Transforming Graphics section of the documentation, showing how matrix math can be used to achieve various transformations.
  • Fixed a problem where text alignment settings might be overwritten in the HTML5 renderer. The fix means a slightly more verbose HTML file, but it's probably necessary.

New in Frink 20121212 (Dec 12, 2012)

  • Java objects that implement the java.util.Iterator or java.util.Iterable interface are now turned into Frink enumerating expressions, which means that they can now be used in for loops transparently, among other uses. This is done in a call-by-name fashion so the code will still work on Java 1.1 and later.

New in Frink 20121211 (Dec 11, 2012)

  • Major New Functionality: Frink's graphics libraries now allow you to translate, scale, and rotate graphics on all platforms! This allows you to write simple code using the coordinate system that is most logical, and translate or scale it wherever you want. Like all of Frink's other graphics, Frink ensures that whatever you draw is automatically scaled and centered into the display no matter how confusing your transformations get, and can be exported to various file formats.
  • See the Transforming Graphics section of the documentation for more information.
  • For Android: Attempted to force a fix for a problem where programming mode might only have a single-line input. This only seemed to show up in the emulator, though.
  • For Android: The file chooser for loading files in programming mode now allows you to choose the parent directory, allowing the reading of files from anywhere you have permission to read. (You're still not allowed to save to arbitrary directories yet.)
  • For Android: Fixed a potential race condition when shutting down sensor services before they've had a chance to properly start. Thanks to the person who reported the problem via their Android device.

New in Frink 20121207 (Dec 8, 2012)

  • getBoundingBox[graphicsExpression] now returns undef if graphicsExpression contains an empty bounding box. (That is, there are no drawable elements in it.)
  • Various internal improvements and fixes to expression transformation:
  • Improved formatting of method calls.
  • Improved formatting of object dereference expressions (i.e. obj.member)
  • Loosened construction of method calls so more symbolic transformations would work on them.
  • Added expression constructor for object dereferences. This means that you can now use expressions like obj.member in transformation rules.

New in Frink 20121124 (Nov 26, 2012)

  • For Android: The GPS receiver is now enabled with much more sensible update frequencies (1 second updates, no distance threshold.) Previously, this was set much higher (updates possibly as far as 60 seconds apart and a 1 meter distance threshold.) While older devices may have ignored the too-high settings, newer devices may have updated too infrequently, even when moving.
  • For Android: Added a new two-argument function startGPS[minTime, minDist] which allows you to configure the GPS unit for less power consumption if you want less-frequent updates. See the GPS/Location section of the documentation for more information about this function. You probably don't want to use this version of the function without a lot of testing on multiple devices and Android versions. (The Android documentation says that Android versions before 4.1 (Jellybean) could have ignored these settings.)

New in Frink 20121111 (Nov 12, 2012)

  • The following (undocumented and generally unused) functions have changed their behavior. They now do evaluate their arguments before being executed, which they did not before. This means that you may have to wrap the arguments to these functions in a noEval[expr] block if you don't want them to evaluate their arguments first:
  • childCount[expr] (Returns number of children of the expression.
  • type[expr] (Returns the type of the expression as a string. This behavior may change to return a more useful object in the future.)
  • isConstant[expr] (Returns a boolean value indicating if the specified expression is constant.)
  • Also note that the behavior of these "undocumented" functions may change in the future, or the functions may be removed entirely.

New in Frink 20121109 (Nov 10, 2012)

  • HTML5 graphics can render drawings with dimensions of length. Unfortunately, there is apparently no way to query a browser for its screen resolution, so these graphics won't be sized appropriately.
  • Updated HTML5 canvas rendering to be more correct: in some places where the provisional HTML5 standard specified that integers are required, Frink would previously use floating-point numbers. While all browsers seemed to handle either case, it's good to be safe. Integers are now output in these situations.

New in Frink 20121107 (Nov 7, 2012)

  • Fixed problem in rendering ellipses in HTML5. They were being rendered incorrectly in some cases. (The provisional HTML5 standard specifies an ellipse function but most browsers don't implement that yet, so we have to draw circular arcs and transform them to kludge around it.)
  • HTML5 graphics now resize to fit the width of the browser window and repaint themselves on resize to give optimal resolution. Printing is still jaggy and substandard because of deficiencies in the HTML5 specification. If printing, use SVG when possibl

New in Frink 20121106 (Nov 6, 2012)

  • Frink can now render its graphics to an HTML5 document, using HTML5's canvas feature. While HTML5 will not be a finalized specification until at least 2014, major modern browsers for desktop and mobile devices (Firefox, Chrome, Opera, Safari, IE) support the HTML5 features that Frink requires. This includes the following features:
  • Transmission of vector graphics in vector formats, allowing efficient, antialiased rendering of vector graphics.
  • Bitmapped images are transmitted within the HTML document as embedded data URIs encoded in base-64, allowing you to send the entire graphic as a single HTML file. Bitmapped images are transmitted at the end of the file, and displayed as they are loaded, allowing progressive display of documents containing multiple bitmaps.
  • All of Frink's graphics primitives are supported, including bitmaps, GeneralPath, partially-transparent graphics, and rotated text.
  • HTML5 is rendered to relatively simple, user-modifiable code.
  • Sample graphic: graphicsTest.html which was generated from graphicsTest.frink. Do a "view source" on the HTML file to see the generated code. Note that this includes vector graphics, multiple bitmaps, and rotated, partially-transparent text.
  • What doesn't work in HTML5 (future wish list):
  • Drawings with dimensions (e.g. a rectangle with width 1 inch) does not get rendered properly to HTML5. I'm still doing research to see if we can get a reasonable resolution figure from the rendering environment.
  • HTML5, for some ungodly reason, does not support the even-odd winding rule for filling graphics, which becomes important when drawing an arbitrary GeneralPath and self-intersecting filled polygons. HTML5 only supports the rather stupid and useless nonzero winding rule which will make some objects with "hollow" centers not render the same in HTML5 as they do in all other sane environments (e.g. Swing, AWT, Android, SVG, PostScript, PDF).
  • Frink goes to some lengths to kludge around this problem, such as by alternating the drawing direction of circles/ellipses each time one is drawn. Sigh.
  • It would be nice if the graphic would re-render itself at the display device's resolution when resized. I'm not sure how I'll handle this; there may be zoom in/out buttons, or the graphic may track the width of the window and automatically resize itself to fill the browser window. The HTML5 specification is kinda stupid about canvas dimensions; it only allows a hard-coded number in pixels to be specified for the size of the canvas, and printing doesn't happen at the printing device's native resolution. This is stupid. Compare this to the SVG specification, or Frink's display and print routines which handle all of these issues sanely.
  • Animation is not yet possible in HTML5. It's not clear if this will be possible without porting all of Frink to JavaScript.
  • All bitmapped graphics are embedded in PNG format. These may be larger than the corresponding JPEG graphics, but they are lossless and allow alpha channels, which JPEG does not allow. It's possible that there may be a switch in the future to embed bitmaps in JPEG format and to control the quality, or the renderer may get "smarter" and determine if alpha channels are present, and switch rendering formats for efficiency.
  • A single bitmapped image currently cannot be rendered several times in the same graphic without retransmitting it.
  • When rendering just a portion of a bitmapped image to HTML5, the entire original bitmap file is transmitted in the HTML5 document.
  • If the browser doesn't support the HTML5 canvas element, Frink could theoretically render a small thumbnail image (or full-resolution image, but that would be wasteful) showing the user what they're missing. If the browser doesn't support canvas, the user is warned about possibly needing to open the document in a newer browser.
  • Refactored Frink's internal rendering of SVG and HTML documents into a common superclass and some derived classes, as all are approximately SGML implementations with similar syntax and needs.
  • Refactored the internal FrinkImage interface to render to an OutputStream instead of a File, which gives more flexibility to the rendering process, and allows images to be rendered to base-64 strings in memory, for example.
  • Added image.toBase64[format] method to allow a bitmapped image to render itself to a base-64 encoded string in the specified image format (e.g. "jpg", "png").
  • Added graphics.toBase64[format, width, height] method to allow a graphics object to render itself, as a bitmap, to a base-64 encoded string in the specified image format (e.g. "jpg", "png").

New in Frink 20121021 (Oct 25, 2012)

  • Added zip[a, b] and zip[a, b, defaultA, defaultB] functions to "zip" together corresponding elements of lists a and b and returns each pair as a two-element array. See the zip section of the documentation for more.
  • The base64Encode[expr, encoding] function can now take a Java array of bytes for the input expression.
  • Added a base64DecodeToBytes[string] function to decode a base-64 encoded string to a Java array of bytes.

New in Frink 20120929 (Sep 29, 2012)

  • Added array.pushAll[array] method to push all elements of an array onto the end of another array.
  • Added array.removeAll[value] to remove all elements in the array which have the specified value.

New in Frink 20120913 (Sep 13, 2012)

  • Made assignment-to-list more flexible:
  • [a, b] = 1 now assigns a=1 and b=undef (previously nothing was assigned if the right-hand-side was not a list.)
  • The values in the array on the left-hand-side can now be any assignable expression, not just simple variable names.
  • Modified the map function:
  • If the number of arguments passed to the function are greater than the number of formal arguments declared by the function, the extra arguments will be passed as an array to the last variable in the function.
  • Fixed the case where the first argument to map is a string indicating the name of a function.

New in Frink 20120910 (Sep 10, 2012)

  • Modified the date formats file to allow parsing of dates with single-digit days, like #2000 Jan 1#.

New in Frink 20120905 (Sep 5, 2012)

  • Fixed bug in split function when passed an empty delimiter string.

New in Frink 20120904 (Sep 4, 2012)

  • Rewrote the the multifor loop implementation to allow it to handle "triangular" loops where the bounds of one of the loops depends on the bounds of other loops.

New in Frink 20120830 (Aug 30, 2012)

  • Voice recognition (for as many languages as your device supports) is now available! The functions listen[prompt] and listen[prompt, numOptions] will now listen for voice input and return the text as a string. This is extremely powerful, and it allows you to write voice-controlled programs, automatic translators, voice calculators, and more! For more information, see the Speech Recognition section of the Android documentation.

New in Frink 20120822 (Aug 23, 2012)

  • Fixed null pointer exception when calling units.
  • For Android: Forced the spellchecker off in the input fields for interactive mode.

New in Frink 20120821 (Aug 21, 2012)

  • Yet again, further improved disambiguation of calling Java methods. This time, Frink tries harder to disambiguate when turning a Frink array into a Java array. Although Frink arrays are potentially heterogeneous, the new code looks at the first element of the Frink array to determine if it's mappable to the Java type. This handles many/most cases, but may need to potentially look at all elements in some cases, which it doesn't do now. Checking all elements could be a potentially huge performance hit, so it's not done now.

New in Frink 20120816 (Aug 17, 2012)

  • For Android: Made the right and left arrow buttons ensure that the cursor position was visible in the view when moving off the screen.
  • For Android: Various changes to the text-to-speech functions, specifically those dealing with SAMPA. Huge thanks to Manny Neira for testing and extremely detailed reporting.
  • speakSAMPA now sends out a briefer SSML (link opens in new window) string that appears to work better on many devices. The language used is no longer hardcoded to en-US but should better follow your platform's voice.
  • Added encodeSAMPA function to allow you to encode part of a string to be pronounced correctly.
  • Added a lot of warnings and caveats to the documentation of the above functions, indicating that they may work differently depending on which text-to-speech engine you have installed.

New in Frink 20120814 (Aug 16, 2012)

  • Added a "menu" button to the button bar to work around Android's new stupid missing menu button and the millions of cases where it works inconsistently and randomly.

New in Frink 20120810 (Aug 13, 2012)

  • Forced off spell checker in programming mode. This was causing significant performance issues on Android 4 devices.

New in Frink 20120707 (Jul 9, 2012)

  • Added = to Android user interface. Thanks to Albert de Koninck for the suggestion.

New in Frink 20120701 (Jul 2, 2012)

  • Fixed Sloppy Time Specifications so that they would work properly if the time conversion might cause an increment or decrement of the day.
  • Added formats like 9 AM and 10 PM to the date formats file.

New in Frink 20120623 (Jun 23, 2012)

  • Updated Sun position calculator pages to take arbitrary date/time values to calculate the position of the sun anywhere and anytime.

New in Frink 20120620 (Jun 21, 2012)

  • Made electric braces work better and tried harder not to indent inside a regular expression, quoted string, or anonymous function.
  • Suppressed echoes of input in comint-mode (which seems to be new in both Emacs and XEmacs.)
  • Forced cursor to jump to end-of-buffer when killing and restarting a Frink process. Due to race conditions, it may or may not have moved to the end of buffer.

New in Frink 20120612 (Jun 15, 2012)

  • Fixed foreign language translations to work again. The new code uses a regex-based solution, which is more powerful, robust, and will be easier to modify.
  • Added set methods set.subsets[] and set.subsets[allowEmptySet, allowOriginalSet] to return subsets of the elements in an set. For more information, see the Sets section of the documentation.

New in Frink 20120513 (May 23, 2012)

  • Changed the single-item and multi-item input functions to behave similarly on user cancels. This means that if the user cancels/closes an input dialog, or end-of-file is encountered, all input functions return the special value undef.
  • In AWT mode: allowed the window "close" button to work on input dialogs. This will cancel input and return undef.
  • In Swing mode: made single-line input window return undef on window close. (Previously, you couldn't close it.) Made multi-line input windows return undef if closed/cancelled by user.
  • In text mode: single-line input functions will return undef when end-of-file (EOF) is encountered. If EOF is encountered on the first line of a multi-input field, the return value is the single value undef. If EOF is encountered after the first line of a multi-input field, the partially-completed values will be returned, and the rest of the fields will be undef.
  • For Android: For input function, hitting the "back" button now returns undef when cancelling single and multi-line inputs.
  • Added a new example of creating cross-platform user interfaces to take and process user input and handle cancellation gracefully. See the Making Interactive Interfaces section of the documentation for more.

New in Frink 20120426 (Apr 28, 2012)

  • When constructing a power expression, many roots are simplified at construction time to a more canonical form. For example, 4^(1/2) is immediately simplified to 2, and 8^(1/2) is immediately simplified to 2 * 2^(1/2). Other fractional powers are similarly simplified. The compile-time simplifications improve symbolic math. More compile-time simplifications and canonicalizations will follow.
  • Expanded intersection[arg1,arg2] function to return the intersection of intervals or ordinary units. The return type in this case will be an interval or an ordinary real number. If there is no intersection between the arguments, the function will currently return undef although this behavior may change to return an empty interval in the future.
  • Made the min and max functions do something sensible when passed overlapping intervals. (Previously, they just threw an OverlapException, which could be improved.)

New in Frink 20120410 (Apr 11, 2012)

  • Multi-dimensional arrays of Java objects can now be constructed by passing an array of integers to the second argument of the newJavaArray function.
  • When passing an array of Java objects to a Java method, the disambiguation rules were improved to eliminate some incorrect "can match" errors.

New in Frink 20120402 (Apr 2, 2012)

  • Added single-argument constructor new dict[array] to construct a dictionary from an array. See the Dictionary Constructors section of the documentation for more.
  • Added toDict[array] function which behaves exactly as the constructor above.
  • Added two-argument constructor new dict[keys, values] to construct a dictionary from two separate arrays (or enumerating expressions.) See the Dictionary Constructors section of the documentation for more.
  • Added dictionary.invert[] method to return a new dictionary with key-value pairs inverted. See the Dictionary Methods section of the documentation for more.
  • Internally rewrote enumerating expressions for better compile-time typesafety.

New in Frink 20120301 (Mar 1, 2012)

  • For Android: Added experimental unit name completion in interactive mode. You can now start typing the first 2 or more letters of a unit name, and Frink will present an autocompletion list. This seems to be slow in some Android devices, so if it becomes too ponderous, it's gone. If it's useful, it may be expanded. Note that this list does not include all possible completions; you can still enter suffixes or units that may not be listed (like dollar_1910).
  • For Android: Added a class file that may have been missing from the past release.

New in Frink 20120216 (Feb 17, 2012)

  • Added a map[function, list] applies the specified function to all the members of a list, and returns a new list containing the results. See the map section of the documentation for more.
  • Added getFunction[name, numArgs] which returns a reference to the function with the specified name (specified as a string) and number of arguments. This can then be assigned to variables, or called as noted in the Anonymous Functions and map sections of the documentation.
  • Rearranged split and join sections of the documentation.

New in Frink 20120208 (Feb 10, 2012)

  • Added functions for converting text to/from base-64 encoding. See the Other String Functions section of the documentation for more information.
  • Added a "fallback" constraint source that will match arbitrary object names.

New in Frink 20120206 (Feb 6, 2012)

  • Added a built-in Writer class to enable easy writing to files without including external libraries. See the Writing Files section of the documentation for more information.
  • Changed these documentation pages to reflect the fact that I'm now putting new announcements on Twitter at @frinklang, and not using Freshmeat any more.

New in Frink 20120203 (Feb 4, 2012)

  • Improved error messages when array bounds errors occur.

New in Frink 20120126 (Jan 27, 2012)

  • Added urlFile[string] to return a string indicating the filename of a specifed URL string, that is the last path part of a URL (e.g. "http://futureboy.us/frinkdocs/whatsnew.html" will return "whatsnew.html")
  • Added urlPath[string] to return a string indicating the entire path of a specifed URL string, (e.g. "http://futureboy.us/frinkdocs/whatsnew.html" will return "/frinkdocs/whatsnew.html")
  • Added browse[URL] function to launch the specified URL in your computer's browser (or however your computer likes to launch things.) This also works on Android, but Android doesn't like to launch many protocol types other than http.
  • Wrote a colorillusion.frink program to draw color illusions like the one here. (You'll want to supply your own image file.) I don't think my algorithm is quite right yet, as colors easily become saturated or blocky and don't produce quite the right colors in the inverse. Note that this program requires today's release of Frink!

New in Frink 20120121 (Jan 23, 2012)

  • Updated data file to account for the leap second that will be introduced at the end of June, 2012.

New in Frink 20120118 (Jan 21, 2012)

  • Worked around some weird issues in calling methods on Java objects. I ran into weird cases where multiple methods have the same signature (function name and arguments) but different return types. The code now tries to disambiguate and uses the method with the most specific return type. I don't know if that's what you actually want to do, so let me know if there are issues with this.
  • Added a cool demo program to use Java's MIDI music synthesis to play music from Frink. See midisynth.frink . Note that your Java Virtual Machine must have implemented this feature. (e.g. Sun/Oracle's JVM works, while OpenJDK does not.)

New in Frink 20120106 (Jan 9, 2012)

  • Updated planets.frink with the radii and masses of planets, and allowed calculation and drawing of bright limb angle.
  • Updated sun.frink to allow drawing of the illuminated fraction of planets.

New in Frink 20120103 (Jan 3, 2012)

  • As of 2011-12-01, Google has eliminated free access to their translation APIs, so they are no longer available through Frink. If you wish to pay for an API license, you may still be able to modify GoogleTranslate.frink (although the version 2 API has changed significantly.)
  • Added isComplex[expr] function.
  • Updated sanity checks for the year 2012.
  • Updated copyright dates.
  • Forced creation of frink directory on Android.
  • No leap seconds were added at the end of 2011, so no changes were made.

New in Frink 20111205 (Dec 6, 2011)

  • Text in graphics can be now drawn rotated at any angle. See the Graphics with Text section of the documentation for more information.

New in Frink 20111115 (Nov 16, 2011)

  • Changed eulerTotient[1] to return 1.
  • For Android: Made input fields expand themselves to multi-line, rather than always horizontally scrolling.

New in Frink 20111110 (Nov 14, 2011)

  • Updated many units in the standard data file (particle masses, charges, gravitational constant, Planck's constant, etc.) to match 2010 CODATA values, which were first released by CODATA in June, 2011. A reference for the 2010 CODATA values can be found at NIST.

New in Frink 20111025 (Nov 4, 2011)

  • Fixed a bug in the allFactors function which effectively made the parameter onlyToSqrt always equal false. Thanks to Tom Louie for the bug report.
  • Added a three-argument sort function to allow the user to pass in arbitrary "helper" data to be used in a sorting operation. See the Sorting section of the documentation for more information. Thanks to Jim Fishman for the report.

New in Frink 20110916 (Sep 20, 2011)

  • Modified the read[location] to read from standard input (stdin) if passed the argument "-". See the Reading Entire Files section of the documentation for examples.

New in Frink 20110915 (Sep 15, 2011)

  • Added the ability to call functions and methods by name using the callByName[object, methodName, argList] function. See the Calling Functions and Methods by Name section of the documentation for more.
  • Added slice[array, start, end] and sliceLength[array, start, length] functions to take a "slice" out of an array.
  • Modified the lines[location] to read from standard input (stdin) if passed the argument "-". See the Reading Lines section of the documentation for examples.
  • Added messageDigestInt[str, algorithm] to calculate a message digest and return its value as an integer. See the sample program drawMD5.frink which graphs the output of subsequent inputs to the MD5 hashing algorithm.

New in Frink 20110905 (Sep 7, 2011)

  • Added array.combinations[take] method to generate the combinations of the elements in an array. See the Array Methods section of the documentation.
  • The sample program pokerhands.frink demonstrates using the combinations method to enumerate all possible 5-card poker hands.

New in Frink 20110817 (Aug 22, 2011)

  • Various improvements and changes in Frink-Java mapping:
  • When calling methods on Java objects, when there is ambiguity, Frink now attempts to find the method with the most specific arguments. For example, if a class has methods doSomething(String) and doSomething(Object), and the method is passed a string, Frink will call doSomething(String). This will not yet disambiguate between primitive types.
  • Java function calls that return void now return Frink's void type instead of undef. I don't really like having a void type, so this may change back.

New in Frink 20110810 (Aug 11, 2011)

  • Made improvements to make it easier to read data from standard input (stdin) using the input functions.
  • input functions now return undef at EOF, or when the user enters an EOF character (usualy Ctrl-D on Unix variants, Ctrl-Z on Windows).
  • Removed the single-space of padding if the empty string is specified as the prompt of the input function. A trailing space is still added if the prompt string is non-empty. This is to make input legible and give some uniformity to both GUI-based and command-line based calls to the function.
  • The multi-line input form of the input function now returns undef for arguments on which the user enters the EOF character and for following arguments.
  • Piping input from another file or process and reading it with the input functions now works in a less error-prone fashion. Previously, it could throw NullPointerException if you were testing its return value in certain ways. Now, with it always returning undef, its behavior is more predictable.
  • If, for some reason, you're in a GUI mode and you still want to read from standard input, you can call readStdInput[] to read one line from standard input. This is just like calling input[""] from command-line mode, which is what you really want to be calling if you're trying to make programs that work both interactively and non-interactively, and in GUI mode and non-GUI mode.
  • Improved synchronization and removed multiple constructions of buffers that caused problems with reading single lines from stdin.
  • Modified some of logic when reading from stdin to ensure that we always catch EOF.
  • Some more exponential expressions are simplified at compile-time, such as 12^-1 is immediately reduced to the exact rational number 1/12.

New in Frink 20110801 (Aug 1, 2011)

  • Added additional security restrictions in sandbox mode.

New in Frink 20110714 (Jul 15, 2011)

  • For Android: Many user interface enhancements for programming mode, including:
  • Created a new preferences screen.
  • Font size selection moved to preferences screen.
  • Allowed the user to hide the "run" buttons on screen. These can still be accessed with Menu+R or through the new "Run" menu item.
  • Stack size is now user-configurable.
  • Mode switch menu item now just takes one click to switch to "convert" mode.

New in Frink 20110710 (Jul 13, 2011)

  • Optimized setIntersection[set1, set2] function.
  • Added setsIntersect[set1, set2] function.
  • Improved documentation of the date formats file.
  • Added allFactors function to find all factors of a number, not just the prime factors. See the Number Theory section of the documentation for more information.
  • Allowed bounds in a for loop or range object to be boolean values, for example: for a=false to true.
  • Improved the documentation for the for loop.
  • Added construction-time optimizations for the not operator. If possible, this simplifies boolean expressions on construction.
  • The graphics.print[] and graphics.printTiled[pagesWide, pagesHigh] functions now print with no insets--that is, they print as wide as possible on the page. (Previously, they filled up 95% of the page.) If you want the old behavior, see the new functions that take insets arguments in the Showing Graphics section of the documentation.
  • The image.print[] and image.printTiled[pagesWide, pagesHigh] functions now print with no insets--that is, they print as wide as possible on the page. (Previously, they filled up 95% of the page.) If you want the old behavior, see the new functions in the Images section of the documentation.

New in Frink 20110706 (Jul 7, 2011)

  • Fixed a bug where multi-line comments might cause syntax errors in classes or interfaces.
  • Added Dymaxion.frink library file and demo file drawDymaxion.frink to draw maps of the world using the Buckminster Fuller "Dymaxion" icosahedral projection.

New in Frink 20110702 (Jul 4, 2011)

  • The methods[obj] function will now display argument types and return types of a method if known. Notably, this is only for methods on Java objects at the moment. This makes it easier to play around interactively with Java objects without a reference.
  • Made construction of complicated bounding boxes for graphics expressions more efficient.
  • Added getBoundingBox[graphicsExpression] to return the bounding box of a graphics expression. See the Graphics Functions section of the documentation for more.
  • Added calculations for the centroid and area of a polygon to the geometry.frink sample program.
  • Added a Country.frink library containing country shapes and a cool demonstration program drawCountries.frink to draw them.
  • Added degree symbol ° (\u00B0) to the standard datafile as a synonym for degree. This is an angular degree and should not be used for temperatures.
  • Improved the "Save File/New File" GUI ergonomics for Android. Worked around a stupid android bug which doesn't let you select the beginning of a line, and fixed an incorrect display name of the file to save.

New in Frink 20110626 (Jun 28, 2011)

  • The manifest file of frink.jar now launches the Swing GUI by default. If you're on some old Java VM without a Swing implementation and you've been launching Frink by something like the equivalent of double-clicking the file, you'll need to specify the old AWT main class when you start. See the Running Frink section of the documentation for more information.
  • Fixed double-drawing of polyline in an enviroment that uses Java's Graphics2D class. This might have manifested as "blurred" polylines if your Java platform's renderer isn't repeatable. The internal method for rendering also changed from using a GeneralPath to Graphics2D.drawPolyline, which might be a bit faster or more memory-efficient.

New in Frink 20110623 (Jun 24, 2011)

  • Added product[x] function to return the product of the elements of an array or enumerating expression.

New in Frink 20110619 (Jun 21, 2011)

  • Updated planets.frink to calculate rise, set, and transit times of planets, added functions to calculate when a planet would be at a specified altitude, and improved the secantAzimuth calculations to work better around discontinuities.

New in Frink 20110603 (Jun 7, 2011)

  • Removed incorrect double-eval when retrieving values using the array dereference operator array@index . Symbolic values can now be retrieved from an array correctly.
  • Added new range[lower, upper] and new range[lower, upper, stepSize] constructors to create a range operator. This is similar to writing lower to upper or lower to upper step stepSize, but more useful in many places.
  • Changed the operation of the range operator to be more useful in more places.
  • Modified the documentation of the multifor loop to use the new range syntax.
  • Added allFactors2.frink sample program to find all factors of a number using the multifor construct. Compare this to the allFactors.frink program which does not use the construct.
  • Added documentation about the new range syntax to the For Loop documentation.
  • Revised several classes internally for maintainability.
  • Added multifor structure support to the Frink Emacs Mode.

New in Frink 20110529 (May 31, 2011)

  • Added a new multifor loop construct to perform several loops at once. See the multifoor loop section of the documentation.

New in Frink 20110525 (May 25, 2011)

  • Added binaryToGray[num] and grayToBinary[num] functions to convert numbers to/from binary reflected Gray code. More information in the Other Functions section of the documentation.
  • The arguments for new array now match the arguments for makeArray See the Initializing Arrays section of the documentation for more information.
  • Added a three-argument version of the select statement that allows you to pass in arbitrary helper data.
  • Added a mastermind.frink program to solve Mastermind near-optimally.

New in Frink 20110518 (May 21, 2011)

  • Worked around a bug in Java's Calendar.add method which exists in some JVMs. This would cause displayed times of day to be sometimes in error by an hour when doing date/time math around a daylight saving time boundary, usually only during part of that day. It is very strongly recommended to update.
  • It's not clear which JVMs are susceptible to the above bug, but it occurs in the latest JVM from Oracle and in current OpenJDK. All calls to the broken and insane Calendar.add methods have been removed.
  • Due to the way that date/time values are stored internally in Frink (as a Julian Day referenced to UTC,) this bug only occurred when formatting dates for display to the user. Internal calculations were still likely to be correct, and this error did not tend to propagate unless a date was output and that text re-parsed as input.

New in Frink 20110517 (May 17, 2011)

  • Added makeArray[dims, initialValue] and makeArray[dims] functions to allow easy construction and initialization of multi-dimensional (and one-dimensional) arrays. See the Initializing Arrays section of the documentation for more information.
  • Added several new distributions to statistics.frink including exponential, Weibull, and log-normal distributions.

New in Frink 20110512 (May 12, 2011)

  • Added Poisson distribution calculations to statistics.frink and improved documentation.

New in Frink 20110504 (May 5, 2011)

  • Improved compile-time optimization and canonicalization of some exponentiation expressions, notably, things like (1/2)^(-1/2) are canonicalized to 2^(1/2).

New in Frink 20110428 (May 2, 2011)

  • Removed double-printing of errors in some cases in the GUI.
  • Improved cursor movement between windows in Frink Emacs Mode.

New in Frink 20110424 (Apr 26, 2011)

  • Fixed null pointer exception when drawing a polygon/polyline when it has no points.

New in Frink 20110419 (Apr 21, 2011)

  • Added a tutorial on regular expression syntax to the documentation.

New in Frink 20110412 (Apr 13, 2011)

  • Frink now returns exact integer and rational roots for numbers when possible. Previously, exact integer roots were only returned for the square root case. For example:
  • a = 10^100
  • a^(1/20)
  • 100000
  • (8/125)^(1/3)
  • 2/5
  • Added bitwise functions bitAnd[n,m], bitOr[n,m], bitXor[n,m], bitNor[n,m], bitNand[n,m], and bitNot[n] to perform efficient bitwise operations on numbers. See the documentation for more information on how these functions work.

New in Frink 20110408 (Apr 8, 2011)

  • Updated the output formatter to make sure that exponents with a negative base like (-2)^x are parenthesized properly on the left-hand-side. Standard mathematical notation treats negation as having lower precedence than exponentiation, so the exponentiation is performed first and then the result is negated, unless the left-hand-side is parenthesized.

New in Frink 20110329 (Mar 30, 2011)

  • Rewrote boolean algebra expressions (AND, OR, NOR, NAND, NOT, IMPLIES, XOR) to be able to have an arbitrary number of children.
  • Boolean algebra expressions are now flattened so that expressions like a AND b AND c are parsed into a single AND expression with three children.
  • Enhanced pattern matching of boolean algebra expressions so that all possible permutations of sub-expressions are tested. This allows automatic simplification of boolean expressions, etc.
  • Revised construction of boolean algebra expressions to ensure flattening.

New in Frink 20110320 (Mar 21, 2011)

  • Updated sun.frink to add moonApogee[date] and moonPerigee[date] functions.
  • Extended the Moon position calculator page to calculate and display apogee and perigee times and distances.

New in Frink 20110310 (Mar 15, 2011)

  • Allowed C/C++/Java-style block comments that can span multiple lines or comment out just part of a line. This style of comments can also be nested. /* This is a 
   multi-line comment. */ 
See the Comments section of the documentation for more information.
  • Frink Emacs Mode updated to handle the new block comments. Unfortunately, XEmacs 21 does not handle nested comments properly at this time, so nested comments may not be highlighted exactly like they will be parsed. If comments are not nested, everything displays just fine.
  • Once again fixed the "shebang" parsing. That is, if the first line of your file is something like: #!/path/to/frink 
then you can start Frink programs easily from a (newish) Bourne or bash shell, by just typing the filename, instead of frink thefilename. (Up until recently, many versions of bash or sh wouldn't allow you to specify another script as your start script; it required an "executable binary" magic number.)
  • Updated the script that colorizes programs for the web server to highlight block comments.
  • Forced input fields in Multi-Input box to be opaque to work around inconsistencies in rendering in different JVMs. This fixes the "light text on white" problem in some JVMs.

New in Frink 20110310 (Mar 15, 2011)

  • Allowed C/C++/Java-style block comments that can span multiple lines or comment out just part of a line. This style of comments can also be nested. /* This is a 
   multi-line comment. */ 
See the Comments section of the documentation for more information.
  • Frink Emacs Mode updated to handle the new block comments. Unfortunately, XEmacs 21 does not handle nested comments properly at this time, so nested comments may not be highlighted exactly like they will be parsed. If comments are not nested, everything displays just fine.
  • Once again fixed the "shebang" parsing. That is, if the first line of your file is something like: #!/path/to/frink 
then you can start Frink programs easily from a (newish) Bourne or bash shell, by just typing the filename, instead of frink thefilename. (Up until recently, many versions of bash or sh wouldn't allow you to specify another script as your start script; it required an "executable binary" magic number.)
  • Updated the script that colorizes programs for the web server to highlight block comments.
  • Forced input fields in Multi-Input box to be opaque to work around inconsistencies in rendering in different JVMs. This fixes the "light text on white" problem in some JVMs.

New in Frink 20110303 (Mar 4, 2011)

  • Revised the order in which symbols are looked up. Names of classes (basically for static methods) are now looked up before units. The name of a class will thus hide the name of a unit! If you need a hidden unit, you can preface it with the prefix unit_
  • Added a new function source into which user-defined functions will be parsed. The major impact of this change is now that user-defined functions will hide built-in functions with the same name. (Currently there is no warning if you do so.)

New in Frink 20110220 (Feb 21, 2011)

  • The text-mode input[] function now prints the default value in square brackets.
  • Expanded and improved the error messages when mapping to/from Java types.

New in Frink 20110122 (Jan 22, 2011)

  • Fixed SVG rendering so that SVG can be rendered in a Frink Server Page. See the Rendering Graphics section of the Frink Server Pages documentation for more information.
  • Modified SVG rendering so that it by default renders in UTF-8 format.
  • Added a Braille renderer Frink Server Page for converting text to Braille.

New in Frink 20110117 (Jan 18, 2011)

  • Greatly improved the root.frink sample program which finds roots and exponents to arbitrary precision. It now reliably finds integer and rational roots reliably and quickly. It may become part of the standard distribution soon.
  • Added Braille.frink and BrailleTest.frink sample programs to encode text into Braille (including Unicode representations) and render it graphically to standard sizes and formats suitable for punching with a slate and stylus. Currently, only Grade 1 Braille (the version of Braille without contractions) is supported.

New in Frink 20110110 (Jan 14, 2011)

  • Added repeat[str, times] method to repeat a string the specified number of times.
  • Added padLeft[str, width, padChar] and padRight[str, width, padChar] functions to pad a string to the specified width.
  • Added a new font width guesser which hopefully reduces the overestimation of the bounding box for text in graphics mode. Previously, it was assumed that each character was as wide as it was tall, which is only true for characters like lowercase "m". The new guesser tries to use ordinary character widths for common fonts. This should make bounding boxes tighter for text, and fit better, at the possible risk of making text run off the screen when rendered.

New in Frink 20101231 (Jan 4, 2011)

  • Fixed some foreign language translation pairs to work again.
  • Updated sanity checks for the year 2011. There will be no leap second added at the end of 2010, so no changes are necessary to Dynamical Time calculations.
  • For Android: Added speakSAMPA[str] to speak strings encoded in the Extended SAMPA alphabet. This allows you to describe exactly how text is to be pronounced.

New in Frink 20101209 (Dec 10, 2010)

  • Added set.shallowCopy[] method.
  • Removed NullPointerException when calling a constructor with a nonexistent argument list when the constructor requires an argument list.
  • Improved error messages when assignments fail.
  • Added internal check and error message to prevent assignment to negative array indices.
  • Added argument to eval[expr, rethrows, hidesPrevious] function to allow hiding of local variables.
  • Allowed objects created from a class definition to be added to sets and dictionaries. For now, only the identity of the object is used for hashing.
  • Added more rules to solvingTransformations.frink
  • Lots of amazing updates to the all-new simultaneous equation solver! It's not quite complete yet, but it is solving systems of equations that it could never solve before!

New in Frink 20101201 (Dec 2, 2010)

  • Added getSymbolsByComplexity[expr] function to return a list of the symbols in an expression with a rough estimate of their depth and usage.

New in Frink 20101120 (Nov 20, 2010)

  • Added methods to the Frink class to simplify setting of variables from an Object. See Frink's integration methods, specifically for the Frink class.

New in Frink 20101118 (Nov 19, 2010)

  • For safety, Frink now performs a deep copy on any key used in a dictionary or set. This may make it somewhat slower to insert complex objects as keys into sets or dictionaries, but it will also prevent lots of problems if you modify the original key.
  • Added "set" constraint so a variable can be forced to be a set.

New in Frink 20101106 (Nov 9, 2010)

  • Made the font size in the output window match the font size in the programming window, both in the Swing and AWT GUIs. Thanks to Peter Padilla for the report.

New in Frink 20101027 (Oct 29, 2010)

  • For Android: Fixed a crash that occurs when selecting text backwards in the interactive interface and then hitting a tool button. Thanks to whoever chose to hit the "report" button on their Android!

New in Frink 20101020 (Oct 21, 2010)

  • Added setDefaultTimezone[tzstring] function to allow setting of default timezone used for parsing and display.
  • Reordered default output date format to put the most significant information (AM or PM) before the time. Thanks to Dr. Joachim Wiedemann-Heinzelmann for the suggestion.
  • Fixed a lot of date formats to require that 12-hour date formats have an explicit AM or PM specifier. This was not done consistently.
  • Added a lot of date parsing formats to ensure that dates could be written or parsed with AM or PM before or after the time specification.
  • Extended the date formats file to ensure that dates that could be produced could be parsed.

New in Frink 20100912 (Sep 13, 2010)

  • Made it possible to put sets into dictionaries, or into other sets. A set can even be put into itself. Whitehead and Russell, take note. However, you shouldn't try to print out cyclic data structures like this yet. (In fact, it actually triggers an internal Java Hotspot crash.)
  • Added dict.containsKey[key] method to see if a dictionary contains the specified key.

New in Frink 20100907 (Sep 8, 2010)

  • Fixed newlines in translations from Google Translate engine.

New in Frink 20100809 (Aug 10, 2010)

  • For Android: Improved handling of potential race conditions for shutting down GPS or other services before they start. This guarantees that all services are shut down on exit, even if they are requested to be shut down even before their thread starts.

New in Frink 20100803 (Aug 4, 2010)

  • For Android: Fixed a potential crash when changing from convert mode to programming mode from within the user interface.
  • For Android: Greatly improved the behavior of both conversion and programming modes when the display is rotated or the keyboard is slid in/out. Normally, Android restarts the entire application in these cases, which loses results of your running calculations, loses the state of your interpreter, and forces you to recreate interpreters, which can be expensive. This removes a lot of the annoying problems when (intentionally or accidentally) rotating the device or moving the keyboard.

New in Frink 20100727 (Jul 27, 2010)

  • For Android: Files with the extension .frink can now be launched from applications like Astro, or launched with an Intent with the ACTION_VIEW action. (the data must be a Uri with a file: URL.) This allows you to, say, make a folder of Frink programs on your Android device that can be opened with a single click. See the Launching Files section of the Android documentation for more information.
  • The following restrictions on launching files are for security reasons:
  • The file will not be run by default, but will require the user to hit the "run" button, to ensure that they intended to run the program.
  • Files with the .frink extension will be launched if they are on the filesystem. Files with the .frink extension will never be launched from http URLs or from the network.

New in Frink 20100722 (Jul 27, 2010)

  • Added an entry about the odd history of the (choose one: acre, rod, furlong, township, section, league, statutemile, etc.) to the FAQ because it is indeed a frequently asked question

New in Frink 20100720 (Jul 21, 2010)

  • Added more synchronization to Frink Server Pages dispatcher.
  • This makes Frink Server Pages both more robust when hit with simultaneous requests, and helps prioritize requests so that a single user session making a lot of simultaneous requests doesn't monopolize the server.

New in Frink 20100719 (Jul 20, 2010)

  • Renamed some internal directories after painstakingly figuring out with several days' effort that the Android Market would silently make your entire application disappear for everyone in the world if your .apk file contained a directory called "/lib", even if it didn't have anything in it. Dear Android Market, you are the worstest thing evAr!

New in Frink 20100708 (Jul 10, 2010)

  • Extended the Google Translate program GoogleTranslate.frink to handle translations to/from other languages, to handle errors better, to guess languages, and to automatically guess the language that a text is written in and translate it to your language.
  • These functions may make it into the standard distribution soon.

New in Frink 20100707 (Jul 8, 2010)

  • Added some error messages and diagnostic information and eliminated a NullPointerException when trying to run on a platform with a broken classloader that doesn't load resources correctly from Frink's jar file. (Notably Jython, probably related to their bug 1373.)
  • For Android: Handled the "back" button in the program output view so it would just switch back to the program window instead of exiting Frink entirely.

New in Frink 20100620 (Jun 21, 2010)

  • For Android: The programming mode now watches for changes to the current program and prompts you to save any changes before loading another file or creating a new program.
  • For Android: Added "New Program" option to Android's programming mode. This clears the current program (prompting you to save first).
  • For Android: The Android version of Frink now requires Android 1.5 (API level 3) or higher. This was necessary to do some simple things such as tracking when the user changes data in a field. I based this decision on Google's metrics which show that only 0.1% of users are running anything before Android 1.5. If someone is running Android 1.1 and really needs Frink to work on that device, let me know.

New in Frink 20100514 (May 22, 2010)

  • Fixed a problem when modifying a transformation rule (with default values and a condition) in which the condition would not be copied when substituting parts of the rule.
  • Updated hubbleconstant with the latest WMAP data.
  • Internally modified the representation of operator precedence to make more sense.
  • Ensured that when printing out expressions containing operators that rational numbers are treated with the precedence of a multiply/divide operator. This ensures that expressions like x^(1/2) are printed correctly with those parentheses.

New in Frink 20100508 (May 10, 2010)

  • Further improved symbolic math capabilities by making undefined function calls evaluate their arguments before returning themselves.
  • Added isRational[num] function which returns true if a number is a rational number (and not an integer,) false otherwise.
  • Further increased the awesomeness of the systemSolver2.frink program which solves systems of equations. It now detects simultaneous equations and solves them correctly.

New in Frink 20100429 (Apr 30, 2010)

  • Added inverse hyperbolic tangent function arctanh[x] or atanh[x]. This function works for complex and interval arguments.
  • Added lcm[x,y] function to return the least common multiple of two integers.

New in Frink 20100405 (Apr 6, 2010)

  • Fixed problem where Android might produce the error "Your Java platform does not support the BufferedImage class." This allows Android to create a new writable, modifiable image with the new image[width, height] call.

New in Frink 20100331 (Apr 1, 2010)

  • Improved an error message when trying to access a member variable of an object that actually wasn't an object at all.
  • Eliminated a null pointer exception when trying to print out a null expression.

New in Frink 20100329 (Mar 30, 2010)

  • For Android: Added a doUI[expr] function to execute the specified message on the user interface thread. Android requires that many methods, including anything to create views or user interface components, is executed on the UI thread. This allows you to call more Java methods to create Toasts, AlertDialogs, etc, that require construction on the UI thread.

New in Frink 20100323 (Mar 25, 2010)

  • Rewrote threading model for displaying input dialogs and graphics windows on Android. This reduces the numbers of Threads and Loopers created and runs all graphics on a single thread.
  • This may eliminate some problems hinted at in reviews (but never officially reported) that on some old platforms, alert dialogs and other input windows might appear behind other windows, however that may happen.

New in Frink 20100309 (Mar 10, 2010)

  • Added graphics.show[width, height] and graphics.show[width, height, insets] methods to allow display of a graphics window at a specified size (when supported on the target platform.) See the Showing Graphics section of the documentation for more information.

New in Frink 20100305 (Mar 6, 2010)

  • The graphics.color[r,g,b] and graphics.color[r,g,b,a] methods now return a color object that you can use again later to set the color.
  • Added graphics.color[colorObject] method so you can set the color with a color object you obtained from the calls above.
  • Added constructors new color[r, g, b, alpha] and new color[r, g, b] to create a color object. See the Shapes and Colors section of the document for more information about these methods. Thanks to Duncan McKenzie for the suggestions.
  • Regenerated the (expired) signing certificate for frink.jar. This may prompt you to accept the new certificate if you're using Java Web Start.

New in Frink 20100127 (Jan 27, 2010)

  • Fixed an overeager sanity check in Frink's symbolic simplification routines that caused the error "Error in evaluation: Expression requires 2 or more arguments." when evaluating a simple expression. Thanks to N.S. for the bug report and creating a very simple testcase. Updating is highly recommended.

New in Frink 20100106 (Jan 6, 2010)

  • Added the function URLEncode[str, encoding] to encode a string to be used as part of a URL. The encoding should probably be the string "UTF8" for most applications.
  • Added a test program GoogleTranslate.frink to translate text using Google's translation API. It requires the URLEncode function above to work, so this release is required.
  • Added functions isSubset[setA, setB] and isProperSubset[setA, setB] functions to perform relation tests on sets.

New in Frink 20091216 (Dec 17, 2009)

  • Announced the first release of Frink for Android mobile devices. This is a full port of all of Frink's features, not a limited subset. This provides a wonderful marriage between an easy-to-use programming language and a powerful, standardized platform with real-world sensors and other interesting features. It should work on all Android platforms version 1.1 and later. (API Level 1.)
  • This includes anti-aliased graphics with transparency, animation, image manipulation, integration with the Android's sensors, GPS, text-to-speech, and other features. For more details please see the Frink for Android page.
  • The Android port consists of about 4000 lines of new code, and some architectural changes and rewrites to the graphics code, which mostly consisted of removing references to classes not available on Android. The rest of Frink (about 100,000 lines of code) compiled without modification, primarily because I take lots of care to only use Java constructs that will be available on all platforms.

New in Frink 20090915 (Sep 15, 2009)

  • Improved and expanded Frink's symbolic transformation routines to handle transformations where the result is split into a list of multiple solutions.
  • Using the above fix, updated the solvingTransformations.frink file to solve equations with squared terms. (The solution becomes a list of multiple solutions.)
  • Added a font size selector to the Swing GUI.

New in Frink 20090830 (Aug 31, 2009)

  • Fixed an important bug which could cause underflow when raising a floating-point number to a large negative rational power. It is very strongly recommended to update.
  • Improved cases of float^-float in the exponentiation operator which would normally underflow using IEEE-754 math. These fixups makes Frink return nonzero results for these cases and extends beyond the range of IEEE-754 numbers.

New in Frink 20090719 (Jul 25, 2009)

  • Important Change: The compiler now tries to perform more symbolic simplification and optimization of symbolic expressions as they are constructed or evaluated. For example, the following transformations are now applied:
  • Gathering of additive terms: x + 2x is transformed into 3x.
  • Gathering of multiplicative terms: x * 3x^2 is transformed into 3 x^3.
  • This allows purely symbolic conversions to be performed. For example:
  • pack = 10 dog
  • tribe = 10 pack
  • tribe / dog
  • 100
  • Hint: to avoid "undefined symbol" warnings, call symbolicMode[true] which suppresses warnings about undefined variables and changes some behavior when encountering undefined symbols from fail-fast to a more tolerant deferred evaluation.
  • Note that at all times, dog is an undefined variable that is manipulated purely symbolically. Also note that prefix, suffix, and plural checking is not performed on local variable names, so you can't write dog or dogs interchangeably like you can if you define a concrete unit.
  • These changes should be essentially invisible to most programs, but may have an effect on variables that later contain interval arguments. The symbolic simplification will sometimes create a different result than the original formulation may have produced. In most cases, the resultant interval will actually be tighter than the previous result, such as in the case:
  • a = new interval[-2, 3]
  • a*a
  • [0,9]
  • Note that this interval is tighter than a naïve implementation which would produce [-6,9]. This will also symbolically simplify expressions such as x/x to 1.
  • Added functions isDefined[x] and isVariableDefined[x] to test if an identifier is defined in the current scope. The difference is that isDefined[x] checks local variables and unit definitions, while isVariableDefined[x] just checks local variables.
  • These functions can be called with either a variable name or a string. For example:
  • isVariableDefined[a]
  • isVariableDefined["a"]
  • See the Testing Variables section of the documentation for more.
  • Weakened the equality check for two different "new" operators so they're not considered to return identical objects, even if called with the same arguments.
  • Fixed the conversion operator -> to allow more relaxed conversion of undefined variables to give better symbolic behavior.
  • Improved printing of several expression types, including assignment statements, comparison expressions, and boolean operators such as AND and OR.
  • Added the ability for transformation rules to have conditions that must be met before they are applied. For example, a rule to make sure that x is on the left-hand-side of an expression is:
  • solve[_left == _right, _x] :: freeOf[_left, _x] solve[_right == _left, _x]
  • The condition follows the :: operator. This allows much more powerful transformation rules to be written. For example, see the solvingTransformations.frink file which solves many algebraic equations with only a very small number of rules.
  • Note that the syntax for anything dealing with transformation rules may change.
  • Changed the signature of a method in a base class which caused its logic to be changed in about 100 classes.

New in Frink 20090409 (Apr 11, 2009)

  • Major new functionality: Added image loading and drawing capabilities! Frink now has the ability to load bitmap image files (e.g. JPEG, GIF, PNG) and display them onscreen, or resize and render them to a graphics object (which can then be printed, saved to a file, printed tiled across several pages, modified, drawn upon, etc.)
  • This gives the ability to modify images, add watermarks or text to images, build collages or thumbnails, rescale images, overlay transparent images on each other, and much more. See the new Images section of the documentation to see how to load and display images.
  • Added methods graphics.write[filename, x, y, insets] and graphics.write[filename, x, y, insets] which allow you to control the borders around your graphics when written to a file. The default is to only use 95% of the width and height of the image file to allow a small border around the image, but setting insets to 1 (which equals 100%) forces 100% of the space to be used, that is, no border to be drawn. This allows an image to be effectively re-rendered to different formats, watermarked, or modified, without changing its size or introducing a border.
  • Added rewriteImage.frink sample file which loads a bitmap image and writes a semi-transparent watermark on it and then saves it back out to a file. Demonstrates image loading, drawing over images, and saving image files at their original size.
  • Fixed an off-by-one error in the calculation of the bounding box when writing to image files. This was probably undetectable until the changes above were made which allowed an image to be loaded and rewritten.
  • Modified the initialization of some data structures in the Frink interpreter to hopefully improve startup performance. The actual improvement is rather small (about 5%,) and may further be improved by deferred initialization of standard functions.

New in Frink 20090328 (Mar 30, 2009)

  • Added new methods to GeneralPath to allow drawing of true ellipses and circular arcs. This allows drawing of perfect circles with transparent holes in the center, which was previously impossible. Previously, circular arc segments could be approximated with cubic Bézier curves, but this was an imperfect approximation.
  • More information is available in the GeneralPath section of the documentation.
  • Updated sample program GeneralPathTest.frink to demonstrate drawing with ellipses and circular arcs.
  • Internally rewrote the GeneralPath class to allow these new curve types, and to allow curves to calculate their own tight bounding boxes.
  • The definition of marsday has been changed to use the solar day instead of the sidereal day. Both definitions are still available, as always, as marssiderealday and marssolarday.

New in Frink 20090310 (Mar 11, 2009)

  • The graphics package gets a powerful new GeneralPath class which allows drawing of complicated outlines and filled shapes, which may be composed of straight lines and quadratic and cubic Bézier curves. This allows filled shapes with transparent holes (such as the letter "P") which were previously impossible to obtain.
  • Note: The GeneralPath functionality is only available under Java 1.2 and later.
  • More information is available in the GeneralPath section of the documentation.
  • Added sample program GeneralPathExample.frink to demonstrate drawing cubic and quadratic curves, and generate the image files used in the documentation.
  • Added sample program GeneralPathTest.frink to demonstrate the GeneralPath class's ability to draw filled shapes with open holes, which was previously impossible.

New in Frink 20090303 (Mar 5, 2009)

  • Improved exponentiation operator for rational exponents, e.g. (1/4)^(1/2). Previously, if intermediate results were too big (such as when the numerator of the exponent became large enough,) this could stop the program with an error due to overflow. This situation has been fixed.
  • Changed the graphics.show[] method to suppress printing "frink.graphics.PaintController" if it's the last method called in a program.

New in Frink 20090218 (Feb 19, 2009)

  • Added descriptions of several operators to the standard data file, and improved the descriptions of others.
  • In the same file, extended my diatribe against the candela, and cited some hopeful progress between the BIPM and the CIE which may someday get us to a workable, authoritative, single definition for the candela at more than one infinitesimal wavelength.

New in Frink 20090204 (Feb 11, 2009)

  • Added the ability for a graphics window to repaint itself on demand, allowing graphics to incrementally paint itself onscreen. There is more information in the Animation section of the documentation.

New in Frink 20081205 (Dec 8, 2008)

  • Fixed conversion operator (->) when the left-hand-side is an interval and the right-hand-side is an array, like:
  • a = new interval[1.0 kg, 2.0 kg]
  • a -> ["lb", "oz"]
  • [(2 lb, 3.2739619495804129157 oz), (4 lb, 6.5479238991608258314 oz)]
  • Previously, this would return strange results in a strange format that didn't make much sense. Thanks to Mark Feeney for reporting the problem.
  • Slightly changed the value of the sidereal day to match best-known results.

New in Frink 20081021 (Oct 22, 2008)

  • Added the method graphics.text[text, x, y, horizontalAlign, verticalAlign] to allow text to be drawn with its sides aligned to the right, left, top, bottom, centered, etc. See the Graphics with Text section of the documentation for more information.
  • Fixed race condition in repainting graphics that caused a failure to repaint the first time that a graphics window was maximized. Also simplified the painting chain so it's easier to predict and minimizes the need for speculative repaints.

New in Frink 20081015 (Oct 16, 2008)

  • Text can now be drawn into Frink's graphics! Text is high-quality, with transparent aliased edges, and can either automatically scale with the drawing or be rendered at a fixed size as the drawing is scaled. More details and sample programs are available in the Graphics with Text section of the documentation.

New in Frink 20081009 (Oct 10, 2008)

  • Major New Functionality: Frink now has powerful but easy-to-use graphics! This is a very important and large upgrade to Frink's capabilities. It is now very easy to draw high-quality, scalable graphics, and display them, print them, or write them to a variety of image formats. Here are some of the features:
  • Flexible coordinate system: You can draw your graphics to any coordinates you wish, and Frink will, by default, automatically scale and center them in your display device, eliminating the tedium and error of manual coordinate conversions, adjustment for different window or printer sizes, etc.
  • Dimensioned drawings: Graphics can be specified with explicit lengths (such as "3 cm",) so exactly-sized drawings can be printed. (Well, as accurately as your printer's driver allows them to be!)
  • Infinitely scalable: Frink's graphics are primarily designed to work with shapes, not individual pixels, so they can be re-scaled perfectly to display with full resolution on printers, in resizable graphics windows, in image files, or in rescalable vector formats.
  • High-quality shapes: Polygons and polylines are drawn with properly-joined, angled corners.
  • Anti-Aliasing: Lines and shapes are anti-aliased, eliminating jagged edges. (When running under Java 1.2 or later. Frink's graphics will also run on Java 1.1, but without antialiased edges.)
  • Transparency (alpha channel): Allows transparent shapes and lines, and see-through shapes to be drawn on top of other shapes. Anti-aliased edges are drawn with proper transparency so they can be overlaid on any background color or image. (Requires Java 1.2 or later for transparency.)
  • Easy writing to files: Graphics can be easily written to various file formats, including JPEG, PNG, and Scalable Vector Graphics (SVG) formats. PNG supports transparency (alpha channel) and allows antialiased, semi-transparent lines and shapes to be overlaid over other backgrounds or layers. SVG format allows infinite rescaling and perfect rendering to high-resolution devices such as printers, and perfect import into other vector graphics programs.
  • Easy display on different devices: The same graphics object can be created and then displayed on screen, printed to a printer, or written to a file, using a single command.

New in Frink 20080902 (Sep 2, 2008)

  • The jar file once again starts the AWT GUI when double-clicked, instead of the Swing GUI. In more technical terms, the AWT GUI (specifically, frink.gui.InteractivePanel) is now the "Main-Class" of the jar file.

New in Frink 20080825 (Aug 26, 2008)

  • Added a programming mode to the Swing GUI. This makes the capabilities of the AWT GUI and the Swing GUI about the same, and the Swing GUI is somewhat more attractive. It has gotten to the point that the Swing interface should be considered to be the preferred one.