remez.jl: update to work with Julia 1.0.
This program was originally developed for a much earlier version of Julia, and there have been a lot of changes to Julia semantics since then. But 1.0 is intended to be stable, so updating once to work with that should mean that no further updates are needed for a long time. Changes relevant to this script include new API calls for making arrays, evaluating Julia source-code expressions from strings, and parsing strings as numbers; scope and semantics changes requiring extra escaping in the @debug macro and some explicit 'global' to allow for-loops to update variables outside themselves; a syntax change for tuple types; and replacing 'beginswith' on strings with 'startswith'. There are a couple of remaining inconveniences with this version of the code. Firstly, the standard Julia 1.0 interpreter will consume a "--" option terminator on its command line even if it appears after the script name, so commands of the form 'julia remez.jl -- -1 1 ...' that worked in Julia 0.2 will no longer work. Adding an extra "--" before the script name works around this ('julia -- remez.jl -- ...') because the first "--" is seen by the Julia interpreter and the second goes to the script. But unfortunately that "--" can't be put in the #! line as well as the 'env', because of #! command line semantics. So users may have to work around this by explicitly invoking the interpreter. Secondly, Julia 1.0 has moved some mathematical functions (e.g. erf and gamma) out of its core library into the SpecialFunctions package, so any pre-existing command lines that used those functions will now need to qualify them with a package name, and be run on a Julia installation which has that package installed. Because Julia 0.4.x is still common (Ubuntu 16.04 and 18.04 both provide 0.4.5), I've included some backwards-compatibility code so that the script still runs on that version as well.
Loading
Please register or sign in to comment