Julia Changelog

What's new in Julia 1.10.0

Feb 14, 2024
  • New language features:
  • JuliaSyntax.jl is now used as the default parser, providing better diagnostics and faster parsing. Set environment variable JULIA_USE_FLISP_PARSER to 1 to switch back to the old parser if necessary (and if you find this necessary, please file an issue) (#46372).
  • ⥺ (U+297A, leftarrowsubset) and ⥷ (U+2977, leftarrowless) may now be used as binary operators with arrow precedence (#45962).
  • Language changes:
  • When a task forks a child, the parent task's task-local RNG (random number generator) is no longer affected. The seeding of child based on the parent task also takes a more disciplined approach to collision resistance, using a design based on the SplitMix and DotMix splittable RNG schemes (#49110).
  • A new more-specific rule for methods resolves ambiguities containing Union{} in favor of the method defined explicitly to handle the Union{} argument. This makes it possible to define methods to explicitly handle Union{} without the ambiguities that commonly would result previously. This also lets the runtime optimize certain method lookups in a way that significantly improves load and inference times for heavily overloaded methods that dispatch on Types (such as traits and constructors).
  • The "h bar" ℏ (hslash U+210F) character is now treated as equivalent to ħ (hbar U+0127).
  • The @simd macro now has more limited and clearer semantics: it only enables reordering and contraction of floating-point operations, instead of turning on all "fastmath" optimizations. If you observe performance regressions due to this change, you can recover previous behavior with @fastmath @simd, if you are OK with all the optimizations enabled by the @fastmath macro (#49405).
  • When a method with keyword arguments is displayed in the stack trace view, the textual representation of the keyword arguments' type is simplified using the new @Kwargs{key1::Type1, ...} macro syntax (#49959).
  • Compiler/Runtime improvements:
  • The mark phase of the garbage collector is now multi-threaded (#48600).
  • JITLink is enabled by default on Linux aarch64 when Julia is linked to LLVM 15 or later versions (#49745). This should resolve many segmentation faults previously observed on this platform.
  • The precompilation process now uses pidfile locks and orchestrates multiple julia processes to only have one process spend effort precompiling while the others wait. Previously all would do the work and race to overwrite the cache files. (#49052)
  • Command-line option changes:
  • New option --gcthreads to set how many threads will be used by the garbage collector (#48600). The default is N/2 where N is the number of worker threads (--threads) used by Julia.
  • Build system changes:
  • SparseArrays and SuiteSparse are no longer included in the default system image, so the core language no longer contains GPL libraries. However, these libraries are still included alongside the language in the standard binary distribution (#44247, #48979, #49266).
  • New library functions:
  • tanpi is now defined. It computes tan(π*x) more accurately than tan(pi*x) (#48575).
  • fourthroot(x) is now defined in Base.Math and can be used to compute the fourth root of x. It can also be accessed using the unicode character ∜, which can be typed by fourthroot (#48899).
  • Libc.memmove, Libc.memset, and Libc.memcpy are now defined, whose functionality matches that of their respective C calls.
  • Base.isprecompiled(pkg::PkgId) has been added, to identify whether a package has already been precompiled (#50218).
  • New library features:
  • binomial(x, k) now supports non-integer x (#48124).
  • A CartesianIndex is now treated as a "scalar" for broadcasting (#47044).
  • printstyled now supports italic output (#45164).
  • parent and parentindices support SubStrings.
  • replace(string, pattern...) now supports an optional IO argument to write the output to a stream rather than returning a string (#48625).
  • startswith now supports seekable IO streams (#43055).
  • Standard library changes:
  • The initialized=true keyword assignment for sortperm! and partialsortperm! is now a no-op (#47979). It previously exposed unsafe behavior (#47977).
  • Printing integral Rationals will skip the denominator in Rational-typed IO context (e.g. in arrays) (#45396).
  • Package Manager:
  • Pkg.precompile now accepts timing as a keyword argument which displays per package timing information for precompilation (e.g. Pkg.precompile(timing=true)).
  • LinearAlgebra:
  • AbstractQ no longer subtypes AbstractMatrix. Moreover, adjoint(Q::AbstractQ) no longer wraps Q in an Adjoint type, but instead in an AdjointQ, that itself subtypes AbstractQ. This change accounts for the fact that typically AbstractQ instances behave like function-based, matrix-backed linear operators, and hence don't allow for efficient indexing. Also, many AbstractQ types can act on vectors/matrices of different size, acting like a matrix with context-dependent size. With this change, AbstractQ has a well-defined API that is described in detail in the Julia documentation (#46196).
  • Adjoints and transposes of Factorization objects are no longer wrapped in Adjoint and Transpose wrappers, respectively. Instead, they are wrapped in AdjointFactorization and TranposeFactorization types, which themselves subtype Factorization (#46874).
  • New functions hermitianpart and hermitianpart! for extracting the Hermitian (real symmetric) part of a matrix (#31836).
  • The norm of the adjoint or transpose of an AbstractMatrix now returns the norm of the parent matrix by default, matching the current behaviour for AbstractVectors (#49020).
  • eigen(A, B) and eigvals(A, B), where one of A or B is symmetric or Hermitian, are now fully supported (#49533).
  • eigvals/eigen(A, cholesky(B)) now computes the generalized eigenvalues (eigen: and eigenvectors) of A and B via Cholesky decomposition for positive definite B. Note: The second argument is the output of cholesky.
  • Printf:
  • Format specifiers now support dynamic width and precision, e.g. %*s and %*.*g (#40105).
  • REPL:
  • When stack traces are printed, the printed depth of types in function signatures will be limited to avoid overly verbose output (#49795).
  • Test:
  • The @test_broken macro (or @test with broken=true) now complains if the test expression returns a non-boolean value in the same way as a non-broken test (#47804).
  • When a call to @test fails or errors inside a function, a larger stacktrace is now printed such that the location of the test within a @testset can be retrieved (#49451).
  • InteractiveUtils:
  • code_native and @code_native now default to intel syntax instead of AT&T.
  • @time_imports now shows the timing of any module __init__()s that are run (#49529).
  • Deprecated or removed:
  • The @pure macro is now deprecated. Use Base.@assume_effects :foldable instead (#48682).

New in Julia 1.9.0 (May 10, 2023)

  • New language features:
  • It is now possible to assign to bindings in another module using setproperty!(::Module, ::Symbol, x) (#44137) (#44231).
  • Slurping in assignments is now also allowed in non-final position. This is handled via Base.split_rest (#42902).
  • Character literals now support the same syntax allowed in string literals; i.e. the syntax can represent invalid UTF-8 sequences as allowed by the Char type (#44989).
  • Support for Unicode 15 (#47392).
  • Nested combinations of tuples and named tuples of symbols are now allowed as type parameters (#46300).
  • New builtins getglobal(::Module, ::Symbol[, order]) and setglobal!(::Module, ::Symbol, x[, order]) for reading from and writing to globals. getglobal should now be preferred for accessing globals over getfield (#44137) (#44231).
  • Language changes:
  • The @invoke macro introduced in 1.7 is now exported. Additionally, it now uses Core.Typeof(x) rather than Any when a type annotation is omitted for an argument x so that types passed as arguments are handled correctly (#45807).
  • The invokelatest function and @invokelatest macro introduced in 1.7 are now exported (#45831).
  • Compiler/Runtime improvements:
  • Time to first execution (TTFX, sometimes called time to first plot) is greatly reduced. Package precompilation now saves native code into a "pkgimage", meaning that code generated during the precompilation process will not require compilation after package load. Use of pkgimages can be disabled via --pkgimages=no (#44527) (#47184).
  • The known quadratic behavior of type inference is now fixed and inference uses less memory in general. Certain edge cases with auto-generated long functions (e.g. ModelingToolkit.jl with partial differential equations and large causal models) should see significant compile-time improvements (#45276, #45404).
  • Non-concrete call sites can now be union-split to be inlined or statically resolved even if there are multiple dispatch candidates. This may improve runtime performance in certain situations where object types are not fully known statically, by statically resolving @nospecialize-d call sites and avoiding excessive compilation (#44512).
  • All uses of the @pure macro in Base have been replaced with the now-preferred Base.@assume_effects (#44776).
  • invoke(f, invokesig, args...) calls to a less-specific method than would normally be chosen for f(args...) are no longer spuriously invalidated when loading package precompile files (#46010).
  • Command-line option changes:
  • In Linux and Windows, --threads=auto now tries to infer the usable number of CPUs from the process affinity which is set typically in HPC and cloud environments (#42340).
  • --math-mode=fast is now a no-op (#41638). Users are encouraged to use the @fastmath macro instead, which has more well-defined semantics.
  • The --threads command-line option now accepts auto|N[,auto|M] where M specifies the number of interactive threads to create (auto currently means 1) (#42302).
  • New option --heap-size-hint= suggests a size limit to invoke garbage collection more eagerly. The size may be specified in bytes, kilobytes (1000k), megabytes (300M), or gigabytes (1.5G) (#45369).
  • Multi-threading changes:
  • Threads.@spawn now accepts an optional first argument: :default or :interactive. An interactive task desires low latency and implicitly agrees to be short duration or to yield frequently. Interactive tasks will run on interactive threads, if any are specified when Julia is started (#42302).
  • Threads started outside the Julia runtime (e.g. from C or Java) can now become able to call into Julia code by calling jl_adopt_thread. This is done automatically when entering Julia code via cfunction or a @ccallable entry point. As a consequence, the number of threads can now change during execution (#46609).
  • Build system changes:
  • New library functions:
  • New function Iterators.flatmap (#44792).
  • New pkgversion(m::Module) function to get the version of the package that loaded a given module, similar to pkgdir(m::Module) (#45607).
  • New function stack(x) which generalises reduce(hcat, x::Vector{

New in Julia 1.8.5 (Jan 10, 2023)

  • Backports for Julia 1.8.5 by @KristofferC in #48011
  • release-1.8: set VERSION to 1.8.5 by @KristofferC in #48132

New in Julia 1.8.1 (Sep 11, 2022)

  • This is the first patch release in the 1.8 series of releases.

New in Julia 1.8.0 (Aug 22, 2022)

  • New language features:
  • Mutable struct fields may now be annotated as const to prevent changing them after construction, providing for greater clarity and optimization ability of these objects (#43305).
  • Type annotations can now be added to global variables to make accessing them type stable (#43671).
  • Empty n-dimensional arrays can now be created using multiple semicolons inside square brackets, e.g. [;;;] creates a 0×0×0 Array (#41618).
  • try-blocks can now optionally have an else-block which is executed right after the main body only if no errors were thrown (#42211).
  • @inline and @noinline can now be placed within a function body, allowing one to annotate anonymous function (#41312).
  • @inline and @noinline can now be applied to a function at callsite or block to enforce the involved function calls to be (or not to be) inlined (#41328).
  • ∀, ∃, and ∄ are now allowed as identifier characters (#42314).
  • Support for Unicode 14.0.0 (#43443).
  • Module(:name, false, false) can be used to create a module that contains no names (it does not import Base or Core and does not contain a reference to itself) (#40110, #42154).
  • Language changes:
  • Newly-created Task objects (@spawn, @async, etc.) now adopt the world age for methods from their parent Task upon creation, instead of using the global latest world at start. This is done to enable inference to eventually optimize these calls. Places that wish for the old behavior may use Base.invokelatest (#41449).
  • Unbalanced Unicode bidirectional formatting directives are now disallowed within strings and comments, to mitigate the "trojan source" vulnerability (#42918).
  • Base.ifelse is now defined as a generic function rather than a builtin one, allowing packages to extend its definition (#37343).
  • Every assignment to a global variable now first goes through a call to convert(Any, x) (or convert(T, x) respectively if a type T has been declared for the global). This means great care should be taken to ensure the invariant convert(Any, x) === x always holds, as this change could otherwise lead to unexpected behavior (#43671).
  • Builtin functions are now a bit more like generic functions, and can be enumerated with methods (#43865).
  • Compiler/Runtime improvements:
  • Bootstrapping time has been improved by about 25% (#41794).
  • The LLVM-based compiler has been separated from the run-time library into a new library, libjulia-codegen. It is loaded by default, so normal usage should see no changes. In deployments that do not need the compiler (e.g. system images where all needed code is precompiled), this library (and its LLVM dependency) can simply be excluded (#41936).
  • Conditional type constraints are now be forwarded interprocedurally (i.e. propagated from caller to callee). This allows inference to understand e.g. Base.ifelse(isa(x, Int), x, 0) returns ::Int-value even if the type of x is not known (#42529).
  • Julia-level SROA (Scalar Replacement of Aggregates) has been improved: allowing elimination of getfield calls with constant global fields (#42355), enabling elimination of mutable structs with uninitialized fields (#43208), improving performance (#43232), and handling more nested getfield calls (#43239).
  • Abstract call sites can now be inlined or statically resolved as long as the call site has a single matching method (#43113).
  • Inference now tracks various effects such as side-effectful-ness and nothrow-ness on a per-specialization basis. Code heavily dependent on constant propagation should see significant compile-time performance improvements and certain cases (e.g. calls to uninlinable functions that are nevertheless effect free) should see runtime performance improvements. Effects may be overwritten manually with the Base.@assume_effects macro (#43852).
  • Precompilation (with explicit precompile directives or representative workloads) now saves more type-inferred code, resulting in reduced time-to-first task for packages that use precompilation. This change also eliminates the runtime performance degradation occasionally triggered by precompilation on older Julia versions. More specifically, any newly-inferred method/type combinations needed by your package--regardless of where those methods were defined--can now be cached in the precompile file, as long as they are inferrably called by a method owned by your package (#43990).
  • Command-line option changes:
  • The default behavior of observing @inbounds declarations is now an option via auto in --check-bounds=yes|no|auto (#41551).
  • New option --strip-metadata to remove docstrings, source location information, and local variable names when building a system image (#42513).
  • New option --strip-ir to remove the compiler's IR (intermediate representation) of source code when building a system image. The resulting image will only work if --compile=all is used, or if all needed code is precompiled (#42925).
  • When the program file is - the code to be executed is read from standard in (#43191).
  • Multi-threading changes:
  • Threads.@threads now defaults to a new :dynamic schedule option which is similar to the previous behavior except that iterations will be scheduled dynamically to available worker threads rather than pinned to each thread. This behavior is more composable with (possibly nested) @spawn and @threads loops (#43919, #44136).
  • Build system changes:
  • New library functions:
  • New function eachsplit(str) for iteratively performing split(str) (#39245).
  • New function allequal(itr) for testing if all elements in an iterator are equal (#43354).
  • hardlink(src, dst) can be used to create hard links (#41639).
  • setcpuaffinity(cmd, cpus) can be used to set CPU affinity of sub-processes (#42469).
  • diskstat(path=pwd()) can be used to return statistics about the disk (#42248).
  • New @showtime macro to show both the line being evaluated and the @time report (#42431).
  • The LazyString and the lazy"str" macro were added to support delayed construction of error messages in error paths (#33711).
  • New library features:
  • A known concurrency issue of iterate methods on Dict and other derived objects such as keys(::Dict), values(::Dict), and Set is fixed. These methods of iterate can now be called on a dictionary or set shared by arbitrary tasks provided that there are no tasks mutating the dictionary or set ([#44534]).
  • @time and @timev now take an optional description to allow annotating the source of time reports, e.g. @time "Evaluating foo" foo() (#42431).
  • range accepts either stop or length as a sole keyword argument (#39241).
  • precision and setprecision now accept a base keyword argument (#42428).
  • TCP socket objects now expose closewrite functionality and support half-open mode usage (#40783).
  • extrema now accepts an init keyword argument (#36265, #43604).
  • Iterators.countfrom now accepts any type that defines + (#37747).
  • @time now separates out % time spent recompiling invalidated methods ([#45015]).
  • Standard library changes:
  • Keys with value nothing are now removed from the environment in addenv (#43271).
  • Iterators.reverse (and hence last) now supports eachline iterators (#42225).
  • The length function on certain ranges of certain element types no longer checks for integer overflow in most cases. The new function checked_length is now available, which will try to use checked arithmetic to error if the result may be wrapping. Or use a package such as SaferIntegers.jl when constructing the range (#40382).
  • Intersect returns a result with the eltype of the type-promoted eltypes of the two inputs (#41769).
  • Iterating an Iterators.Reverse now falls back on reversing the eachindex iterator, if possible (#43110).
  • Package Manager:
  • New ⌃ and ⌅ indicators beside packages in pkg> status that have new versions available. ⌅ indicates when new versions cannot be installed (Pkg#2906).
  • New outdated::Bool kwarg to Pkg.status (--outdated or -o in the REPL mode) to show information about packages not at the latest version (Pkg#2284).
  • New compat::Bool kwarg to Pkg.status (--compat or -c in the REPL mode) to show any [compat] entries in the Project.toml (Pkg#2702).
  • New pkg> compat (and Pkg.compat) mode for setting Project compat entries. Provides an interactive editor via pkg> compat, or direct entry manipulation via pkg> Foo 0.4,0.5 which can load current entries via tab-completion. i.e. pkg> compat Fo autocompletes to pkg> Foo 0.4,0.5 so that the existing entry can be edited (Pkg#2702).
  • Pkg now only tries to download packages from the package server in case the server tracks a registry that contains the package (Pkg#2689).
  • Pkg.instantiate will now warn when a Project.toml is out of sync with a Manifest.toml. It does this by storing a hash of the project deps and compat entries (other fields are ignored) in the manifest when it is resolved, so that any change to the Project.toml deps or compat entries without a re-resolve can be detected (Pkg#2815).
  • If pkg> add cannot find a package with the provided name it will now suggest similarly named packages that can be added (Pkg#2985).
  • The julia version stored in the manifest no longer includes the build number i.e. master will now record as 1.9.0-DEV (Pkg#2995).
  • Interrupting a pkg> test will now be caught more reliably and exit back to the REPL gracefully (Pkg#2933).
  • InteractiveUtils:
  • New macro @time_imports for reporting any time spent importing packages and their dependencies, highlighting compilation and recompilation time as percentages per import (#41612,[#45064]).
  • LinearAlgebra:
  • The BLAS submodule now supports the level-2 BLAS subroutine spr! (#42830).
  • cholesky[!] now supports LinearAlgebra.PivotingStrategy (singleton type) values as its optional pivot argument: the default is cholesky(A, NoPivot()) (vs. cholesky(A, RowMaximum())); the former Val{true/false}-based calls are deprecated (#41640).
  • The standard library LinearAlgebra.jl is now completely independent of SparseArrays.jl, both in terms of the source code as well as unit testing (#43127). As a consequence, sparse arrays are no longer (silently) returned by methods from LinearAlgebra applied to Base or LinearAlgebra objects. Specifically, this results in the following breaking changes:
  • Concatenations involving special "sparse" matrices (*diagonal) now return dense matrices; As a consequence, the D1 and D2 fields of SVD objects, constructed upon getproperty calls are now dense matrices.
  • 3-arg similar(::SpecialSparseMatrix, ::Type, ::Dims) returns a dense zero matrix. As a consequence, products of bi-, tri- and symmetric tridiagonal matrices with each other result in dense output. Moreover, constructing 3-arg similar matrices of special "sparse" matrices of (nonstatic) matrices now fails for the lack of zero(::Type{Matrix{T}}).
  • Printf:
  • Now uses textwidth for formatting %s and %c widths (#41085).
  • Profile:
  • CPU profiling now records sample metadata including thread and task. Profile.print() has a new groupby kwarg that allows grouping by thread, task, or nested thread/task, task/thread, and threads and tasks kwargs to allow filtering. Further, percent utilization is now reported as a total or per-thread, based on whether the thread is idle or not at each sample. Profile.fetch() includes the new metadata by default. For backwards compatibility with external profiling data consumers, it can be excluded by passing include_meta=false (#41742).
  • The new Profile.Allocs module allows memory allocations to be profiled. The stack trace, type, and size of each allocation is recorded, and a sample_rate argument allows a tunable amount of allocations to be skipped, reducing performance overhead (#42768).
  • A fixed duration cpu profile can now be triggered by the user during running tasks without Profile being loaded first and the report will show during execution. On MacOS & FreeBSD press ctrl-t or raise a SIGINFO. For other platforms raise a SIGUSR1 i.e. % kill -USR1 $julia_pid. Not currently available on windows (#43179).
  • REPL:
  • RadioMenu now supports optional keybindings to directly select options (#41576).
  • ?(x, y followed by TAB displays all methods that can be called with arguments x, y, .... (The space at the beginning prevents entering help-mode.) MyModule.?(x, y limits the search to MyModule. TAB requires that at least one argument have a type more specific than Any; use SHIFT-TAB instead of TAB to allow any compatible methods (#38791).
  • New err global variable in Main set when an expression throws an exception, akin to ans. Typing err reprints the exception information (#40642).
  • SparseArrays:
  • The code for SparseArrays has been moved from the Julia repo to the external repo at https://github.com/JuliaSparse/SparseArrays.jl. This is only a code movement and does not impact any usage (#43813).
  • New sparse concatenation functions sparse_hcat, sparse_vcat, and sparse_hvcat return SparseMatrixCSC output independent from the types of the input arguments. They make concatenation behavior available, in which the presence of some special "sparse" matrix argument resulted in sparse output by multiple dispatch. This is no longer possible after making LinearAlgebra.jl independent from SparseArrays.jl (#43127).
  • Logging:
  • The standard log levels BelowMinLevel, Debug, Info, Warn, Error, and AboveMaxLevel are now exported from the Logging stdlib (#40980).
  • Unicode:
  • Added function isequal_normalized to check for Unicode equivalence without explicitly constructing normalized strings (#42493).
  • The Unicode.normalize function now accepts a chartransform keyword that can be used to supply custom character mappings, and a Unicode.julia_chartransform function is provided to reproduce the mapping used in identifier normalization by the Julia parser (#42561).
  • Test:
  • @test_throws "some message" triggers_error() can now be used to check whether the displayed error text contains "some message" regardless of the specific exception type. Regular expressions, lists of strings, and matching functions are also supported (#41888).
  • @testset foo() can now be used to create a test set from a given function. The name of the test set is the name of the called function. The called function can contain @test and other @testset definitions, including to other function calls, while recording all intermediate test results (#42518).
  • TestLogger and LogRecord are now exported from the Test stdlib (#44080).
  • Distributed:
  • SSHManager now supports workers with csh/tcsh login shell, via addprocs() option shell=:csh (#41485).
  • Tooling Improvements:
  • GC.enable_logging(true) can be used to log each garbage collection, with the time it took and the amount of memory that was collected (#43511).

New in Julia 1.7.0 (Dec 2, 2021)

  • New language features:
  • (; a, b) = x can now be used to destructure properties a and b of x. This syntax is equivalent to a = getproperty(x, :a); b = getproperty(x, :b) (#39285).
  • Implicit multiplication by juxtaposition is now allowed for radical symbols (e.g. x√y and x∛y) (#40173).
  • The short-circuiting operators && and || can now be dotted to participate in broadcast fusion as .&& and .|| (#39594).
  • ⫪ (U+2AEA, Top, downvDash) and ⫫ (U+2AEB, Bot, upvDash, indep) may now be used as binary operators with comparison precedence (#39403).
  • Repeated semicolons can now be used inside array concatenation expressions to separate dimensions of an array, with the number of semicolons specifying the dimension. Just as a single semicolon in [A; B] has always described concatenating in the first dimension (vertically), now two semicolons [A;; B] do so in the second dimension (horizontally), three semicolons ;;; in the third, and so on (#33697).
  • A backslash () before a newline inside a string literal now removes the newline while also respecting indentation. This can be used to split up long strings without newlines into multiple lines of code (#40753).
  • A backslash before a newline in command literals now always removes the newline, similar to standard string literals, whereas the result was not well-defined before (#40753).
  • The default behavior of observing @inbounds declarations is now an option via auto in --check-bounds=yes|no|auto ([#41551])
  • Language changes:
  • macroexpand, @macroexpand, and @macroexpand1 no longer wrap errors in a LoadError. To reduce breakage, @test_throws has been modified so that many affected tests will still pass (#38379).
  • The middle dot · (cdotp U+00b7) and the Greek interpunct · (U+0387) are now treated as equivalent to the dot operator ⋅ (cdot U+22c5) (#25157).
  • The minus sign − (minus U+2212) is now treated as equivalent to the hyphen-minus sign - (U+002d) (#40948).
  • Destructuring will no longer mutate values on the left-hand side while iterating through values on the right-hand side. In the example of an array x, x[2], x[1] = x will now swap the first and second elements of x, whereas it used to fill both entries with x[1] because x[2] was mutated during the iteration of x (#40737).
  • The default random number generator has changed, so all random numbers will be different (even with the same seed) unless an explicit RNG object is used. See the section on the Random standard library below (#40546).
  • Iterators.peel(itr) now returns nothing when itr is empty instead of throwing a BoundsError (#39607).
  • Multiple successive semicolons in an array expresion were previously ignored (e.g., [1 ;; 2] == [1 ; 2]). This syntax is now used to separate dimensions (see New language features).
  • Unbalanced Unicode bidirectional formatting directives are now disallowed within strings and comments, to mitigate the "trojan source" vulnerability ([#42918]).
  • Compiler/Runtime improvements:
  • Command-line option changes:
  • The Julia --project option and the JULIA_PROJECT environment variable now support selecting shared environments like .julia/environments/myenv the same way the package management console does: use julia --project=@myenv resp. export JULIA_PROJECT="@myenv" (#40025).
  • Multi-threading changes:
  • Intrinsics for atomic pointer operations are now defined for certain byte sizes (#37847).
  • Support for declaring and using individual fields of a mutable struct as atomic has been added; see the new @atomic macro (#37847).
  • If the JULIA_NUM_THREADS environment variable is set to auto, then the number of threads will be set to the number of CPU threads (#38952).
  • Every Task object has a local random number generator state, providing reproducible (schedule-independent) execution of parallel simulation code by default. The default generator is also significantly faster in parallel than in previous versions (#40546).
  • Tasks can now migrate among threads when they are re-scheduled. Previously, a Task would always run on whichever thread executed it first (#40715).
  • Build system changes:
  • New library functions:
  • Two argument methods findmax(f, domain), argmax(f, domain) and the corresponding min versions (#35316).
  • isunordered(x) returns true if x is a value that is normally unordered, such as NaN or missing (#35316).
  • New keepat!(vector, inds) function which is the inplace equivalent of vector[inds] for a list inds of integers (#36229).
  • Two arguments method lock(f, lck) now accepts a Channel as the second argument (#39312).
  • New functor Returns(value), which returns value for any arguments (#39794).
  • New macros @something and @coalesce which are short-circuiting versions of something and coalesce, respectively (#40729).
  • New function redirect_stdio for redirecting stdin, stdout and stderr (#37978).
  • New macro Base.@invoke f(arg1::T1, arg2::T2; kwargs...) provides an easier syntax to call invoke(f, Tuple{T1,T2}, arg1, arg2; kwargs...) (#38438).
  • New macro Base.@invokelatest f(args...; kwargs...) providing a convenient way to call Base.invokelatest(f, args...; kwargs...) (#37971).
  • New library features:
  • The optional keyword argument context of sprint can now be set to a tuple of :key => value pairs to specify multiple attributes (#39381).
  • bytes2hex and hex2bytes are no longer limited to arguments of type Union{String,AbstractVector{UInt8}} and now only require that they're iterable and have a length (#39710).
  • stat(file) now has a more detailed and user-friendly show method (#39463).
  • Standard library changes:
  • count and findall now accept an AbstractChar argument to search for a character in a string (#38675).
  • New methods range(start, stop) and range(start, stop, length) (#39228).
  • range now supports start as an optional keyword argument (#38041).
  • Some operations on ranges will return a StepRangeLen instead of a StepRange, to allow the resulting step to be zero. Previously, λ .* (1:9) gave an error when λ = 0 (#40320).
  • islowercase and isuppercase are now compliant with the Unicode lower/uppercase categories (#38574).
  • iseven and isodd functions now support non-Integer numeric types (#38976).
  • escape_string now accepts a collection of characters via the keyword keep that are to be kept as they are (#38597).
  • getindex for NamedTuples now accepts a tuple of symbols in order to index multiple values (#38878).
  • Subtypes of AbstractRange now correctly follow the general array indexing behavior when indexed by Bools, erroring for scalar Bools and treating arrays (including ranges) of Bool as logical indices (#31829).
  • keys(::RegexMatch) is now defined to return the capture's keys, by name if named, or by index if not (#37299).
  • keys(::Generator) is now defined to return the iterator's keys (#34678).
  • RegexMatch is now iterable, giving the captured substrings (#34355).
  • lpad/rpad are now defined in terms of textwidth (#39044).
  • Test.@test now accepts broken and skip boolean keyword arguments, which mimic Test.@test_broken and Test.@test_skip behavior, but allows skipping tests failing only under certain conditions.
  • @lock is now exported from Base (#39588).
  • The experimental function Base.catch_stack() has been renamed to current_exceptions(), exported from Base and given a more specific return type (#29901).
  • Some degree trigonometric functions, sind, cosd, tand, asind, acosd, asecd, acscd, acotd, atand now accept a square matrix (#39758).
  • replace(::String) now accepts multiple patterns, which will be applied left-to-right simultaneously, so only one pattern will be applied to any character, and the patterns will only be applied to the input text, not the replacements (#40484).
  • The length function on certain ranges of certain specific element types no longer checks for integer overflow in most cases. The new function checked_length is now available, which will try to use checked arithmetic to error if the result may be wrapping. Or use a package such as SaferIntegers.jl when constructing the range. ([#40382])
  • New replace methods to replace elements of a Tuple (#38216).
  • Package Manager:
  • If a package is using or imported from the julia> prompt that isn't found but is available from a registry, a pkg> add prompt now offers to install the package into the current environment, precompile it, and continue to load it (#39026).
  • A new Manifest.toml format is now used that captures extensible metadata fields, including the julia version that generated the manifest. Old format manifests are still supported and will be maintained in their original format, unless the user runs Pkg.upgrade_manifest() to upgrade the format of the current environment's manifest without re-resolving (#40765).
  • pkg> precompile will now precompile new versions of packages that are already loaded, rather than postponing to the next session (the ?-marked dependencies) (#40345).
  • pkg> rm, pin, and free now accept the --all argument to call the action on all packages.
  • Registries downloaded from the Pkg Server (not git) are no longer uncompressed into files but instead read directly from the compressed tarball into memory. This improves performance on filesystems which do not handle a large number of files well. To turn this feature off, set the environment variable JULIA_PKG_UNPACK_REGISTRY=true.
  • It is now possible to use an external git executable instead of the default libgit2 library for the downloads that happen via the Git protocol by setting the environment variable JULIA_PKG_USE_CLI_GIT=true.
  • Registries downloaded from the Pkg Server (not git) is now assumed to be immutable. Manual changes to their files might not be picked up by a running Pkg session.
  • Adding packages by directory name in the REPL mode now requires prepending ./ to the name if the package is in the current directory; e.g. add ./Package is required instead of add Package. This is to avoid confusion between the package name Package and the local directory Package.
  • The mode keyword for PackageSpec has been removed.
  • LinearAlgebra:
  • Use Libblastrampoline to pick a BLAS and LAPACK at runtime. By default it forwards to OpenBLAS in the Julia distribution. The forwarding mechanism can be used by packages to replace the BLAS and LAPACK with user preferences (#39455).
  • On aarch64, OpenBLAS now uses an ILP64 BLAS like all other 64-bit platforms (#39436).
  • OpenBLAS is updated to 0.3.13 (#39216).
  • SuiteSparse is updated to 5.8.1 (#39455).
  • The shape of an UpperHessenberg matrix is preserved under certain arithmetic operations, e.g. when multiplying or dividing by an UpperTriangular matrix (#40039).
  • Real quasitriangular Schur factorizations S can now be efficiently converted to complex upper-triangular form with Schur{Complex}(S) (#40573).
  • cis(A) now supports matrix arguments (#40194).
  • dot now supports UniformScaling with AbstractMatrix (#40250).
  • qr[!] and lu[!] now support LinearAlgebra.PivotingStrategy (singleton type) values as their optional pivot argument: defaults are qr(A, NoPivot()) (vs. qr(A, ColumnNorm()) for pivoting) and lu(A, RowMaximum()) (vs. lu(A, NoPivot()) without pivoting); the former Val{true/false}-based calls are deprecated (#40623).
  • det(M::AbstractMatrix{BigInt}) now calls det_bareiss(M), which uses the Bareiss algorithm to calculate precise values (#40868).
  • Random:
  • The default random number generator has been changed from Mersenne Twister to Xoshiro256++. The new generator has smaller state, better performance, and superior statistical properties. This generator is the one used for reproducible Task-local randomness (#40546).
  • REPL:
  • Long strings are now elided using the syntax "head" ⋯ 12345 bytes ⋯ "tail" when displayed in the REPL (#40736).
  • Pasting repl examples into the repl (prompt pasting) now supports all repl modes (julia, pkg, shell, help?) and switches mode automatically (#40604).
  • help?> for modules without docstrings now returns a list of exported names and prints the contents of an associated README.md if found (#39093).
  • SparseArrays:
  • new sizehint!(::SparseMatrixCSC, ::Integer) method (#30676).
  • cholesky() now fully preserves the user-specified permutation (#40560).
  • issparse now applies consistently to all wrapper arrays, including nested, by checking issparse on the wrapped parent array (#37644).
  • Dates:
  • The Dates.periods function can be used to get the Vector of Periods that comprise a CompoundPeriod (#39169).
  • Downloads:
  • If a cookie header is set in a redirected request, the cookie will now be sent in following requests (https://github.com/JuliaLang/Downloads.jl/pull/98).
  • If a ~/.netrc file exists, it is used to get passwords for authenticated websites (https://github.com/JuliaLang/Downloads.jl/pull/98).
  • Server Name Indication is now sent with all TLS connections, even when the server's identity is not verified (see NetworkOptions; https://github.com/JuliaLang/Downloads.jl/pull/114).
  • When verifying TLS connections on Windows, if the certificate revocation server cannot be reached, the connection is allowed; this matches what other applications do and how revocation is performed on macOS (https://github.com/JuliaLang/Downloads.jl/pull/115).
  • There is now a 30-second connection timeout and a 20-second timeout if no data is sent; in combination, this guarantees that connections must make some progress or they will timeout in under a minute (https://github.com/JuliaLang/Downloads.jl/pull/126).
  • Tar:
  • Tar.extract now ignores the exact permission mode in a tarball and normalizes modes in the same way that Tar.create does, which is, in turn the same way that git normalizes them (https://github.com/JuliaIO/Tar.jl/pull/99).
  • Functions that consume tarballs now handle hard links: the link target must be a previously seen file; Tar.list lists the entry with :hardlink type and .link field giving the path to the target; other functions — Tar.extract, Tar.rewrite, Tar.tree_hash — treat a hard link as a copy of the target file (https://github.com/JuliaIO/Tar.jl/pull/102).
  • The standard format generated by Tar.create and Tar.rewrite now includes entries for non-empty directories; this shouldn't be neccessary, but some tools that consume tarballs (including docker) are confused by the absence of these directory entries (https://github.com/JuliaIO/Tar.jl/pull/106).
  • Tar now accepts tarballs with leading spaces in octal integer header fields: this is technically not a valid format according to the POSIX spec, but old Solaris tar commands produced tarballs like this so this format does occur in the wild, and it seems harmless to accept it (https://github.com/JuliaIO/Tar.jl/pull/116).
  • Tar.extract now takes a set_permissions keyword argument, which defaults to true; if false is passed instead, the permissions of extracted files are not modified on extraction (https://github.com/JuliaIO/Tar.jl/pull/113).
  • Mmap:
  • mmap is now exported (#39816).
  • DelimitedFiles:
  • readdlm now defaults to use_mmap=false on all OSes for consistent reliability in abnormal filesystem situations (#40415).

New in Julia 1.6.4 (Nov 21, 2021)

  • This is the fourth patch release in the 1.6 series of releases.

New in Julia 1.6 (Jul 15, 2021)

  • New language features:
  • Types written with where syntax can now be used to define constructors, e.g. (Foo{T} where T)(x) = ....
  • (op).(x...), which can be useful for passing the broadcasted version of an operator to higher-order functions, for example map(.*, A, B) for an elementwise product of two arrays of arrays (#37583).
  • The syntax import A as B (plus import A: x as y, import A.x as y, and using A: x as y) can now be used to rename imported modules and identifiers (#1255).
  • Unsigned literals (starting with 0x) which are too big to fit in a UInt128 object are now interpreted as BigInt (#23546).
  • It is now possible to use ... on the left-hand side of assignments for taking any number of items from the front of an iterable collection, while also collecting the rest, for example a, b... = [1, 2, 3]. This syntax is implemented using Base.rest, which can be overloaded to customize its behavior for different collection types (#37410).
  • Language changes:
  • The postfix conjugate transpose operator ' now accepts Unicode modifiers as suffixes, so e.g. a'ᵀ is parsed as var"'ᵀ"(a), which can be defined by the user. a'ᵀ parsed as a' * ᵀ before, so this is a minor breaking change (#37247).
  • Macros that return :quote expressions (e.g. via Expr(:quote, ...)) were previously able to work without escaping (esc(...)) their output when needed. This has been corrected, and now esc must be used in these macros as it is in other macros (#37540).
  • The --> operator now lowers to a :call expression, so it can be defined as a function like other operators. The dotted version .--> is now parsed as well. For backwards compatibility, --> still parses using its own expression head instead of :call.
  • The a[begin, k] syntax now calls firstindex(a, 1) rather than first(axes(a, 1)) (#35779), but the former now defaults to the latter for any a (#38742).
  • ⌿ (U+233F) and ¦ (U+00A6) are now infix operators with times-like and plus-like precedence, respectively. Previously they were parsed as identifier characters (#37973).
  • Compiler/Runtime improvements:
  • All platforms can now use @executable_path within jl_load_dynamic_library(). This allows executable-relative paths to be embedded within executables on all platforms, not just MacOS, which the syntax is borrowed from (#35627).
  • Constant propagation now occurs through keyword arguments (#35976).
  • The precompilation cache is now created atomically (#36416). Invoking n Julia processes simultaneously may create n temporary caches.
  • Command-line option changes:
  • There is no longer a concept of "home project": starting julia --project=dir is now exactly equivalent to starting julia and then doing pkg> activate $dir and julia --project is exactly equivalent to doing that where dir = Base.current_project(). In particular, this means that if you do pkg> activate after starting julia with the --project option (or with JULIA_PROJECT set) it will take you to the default active project, which is @v1.6 unless you have modified LOAD_PATH (#36434).
  • Multi-threading changes:
  • Locks now automatically inhibit finalizers from running, to avoid deadlock (#38487).
  • New function Base.Threads.foreach(f, channel::Channel) for multithreaded Channel consumption (#34543).
  • There is no longer a restriction on the number of threads ([#36778]).
  • Build system changes:
  • Windows Installer now has the option to 'Add Julia to Path'. To unselect this option from the commandline simply remove the tasks you do not want to be installed: e.g. ./julia-installer.exe /TASKS="desktopicon,startmenu,addtopath", adds a desktop icon, a startmenu group icon, and adds Julia to system PATH.
  • New library functions:
  • New function Base.kron! and corresponding overloads for various matrix types for performing Kronecker product in-place (#31069).
  • New function Base.readeach(io, T) for iteratively performing read(io, T) (#36150).
  • Iterators.map is added. It provides another syntax Iterators.map(f, iterators...) for writing (f(args...) for args in zip(iterators...)), i.e. a lazy map (#34352).
  • New function sincospi for simultaneously computing sinpi(x) and cospi(x) more efficiently (#35816).
  • New function cispi(x) for more accurately computing cis(pi * x) (#38449).
  • New function addenv for adding environment mappings into a Cmd object, returning the new Cmd object.
  • New function insorted for determining whether an element is in a sorted collection or not (#37490).
  • New function Base.rest for taking the rest of a collection, starting from a specific iteration state, in a generic way (#37410).
  • New library features:
  • The redirect_* functions now accept devnull to discard all output redirected to it, and as an empty input (#36146).
  • The redirect_* functions can now be called on IOContext objects (#36688).
  • findfirst, findnext, findlast, and findall now support AbstractVector{

New in Julia 1.5.4 (Mar 12, 2021)

  • This is the fourth patch release in the 1.5 series of releases.

New in Julia 1.5.3 (Nov 10, 2020)

  • This is the third patch release in the 1.5 series of releases.

New in Julia 1.5.2 (Sep 25, 2020)

  • This is the second patch release for Julia v1.5.

New in Julia 1.5.1 (Aug 26, 2020)

  • This is the first patch release for Julia v1.5.0.

New in Julia 1.5.0 (Aug 4, 2020)

  • New language features:
  • Macro calls @foo {...} can now also be written @foo{...} (without the space) (#34498).
  • ⨟ is now parsed as a binary operator with times precedence. It can be entered in the REPL with bbsemi followed by TAB (#34722).
  • ± and ∓ are now unary operators as well, like + or -. Attention has to be paid in macros and matrix constructors, which are whitespace sensitive, because expressions like [a ±b] now get parsed as [a ±(b)] instead of [±(a, b)] (#34200).
  • Passing an identifier x by itself as a keyword argument or named tuple element is equivalent to x=x, implicitly using the name of the variable as the keyword or named tuple field name. Similarly, passing an a.b expression uses b as the keyword or field name (#29333).
  • Support for Unicode 13.0.0 (via utf8proc 2.5) (#35282).
  • The compiler optimization level can now be set per-module using the experimental macro Base.Experimental.@optlevel n. For code that is not performance-critical, setting this to 0 or 1 can provide significant latency improvements (#34896).
  • Language changes:
  • The interactive REPL now uses "soft scope" for top-level expressions: an assignment inside a scope block such as a for loop automatically assigns to a global variable if one has been defined already. This matches the behavior of Julia versions 0.6 and prior, as well as IJulia. Note that this only affects expressions interactively typed or pasted directly into the default REPL (#28789, #33864).
  • Outside of the REPL (e.g. in a file), assigning to a variable within a top-level scope block is considered ambiguous if a global variable with the same name exists. A warning is given if that happens, to alert you that the code will work differently than in the REPL. A new command line option --warn-scope controls this warning (#33864).
  • Converting arbitrary tuples to NTuple, e.g. convert(NTuple, (1, "")) now gives an error, where it used to be incorrectly allowed. This is because NTuple refers only to homogeneous tuples (this meaning has not changed) (#34272).
  • The syntax (;) (which was deprecated in v1.4) now creates an empty named tuple (#30115).
  • @inline macro can now be applied to short-form anonymous functions (#34953).
  • In triple-quoted string literals, whitespace stripping is now done before processing escape sequences instead of after. For example, the syntax """an b""" used to yield the string " anb", since the single space before b set the indent level. Now the result is "an b", since the space before b is no longer considered to occur at the start of a line. The old behavior is considered a bug (#35001).
  • : can now be broadcasted over arrays with .: (#35085)
  • The line number of function definitions is now added by the parser as an additional LineNumberNode at the start of each function body (#35138).
  • Statements of the form a' now get lowered to var"'"(a) instead of Base.adjoint(a). This allows for shadowing this function in local scopes, although this is generally discouraged. By default, Base exports var"'" as an alias of Base.adjoint, so custom types should still extend Base.adjoint (#34634).
  • Compiler/Runtime improvements:
  • Immutable structs (including tuples) that contain references can now be allocated on the stack, and allocated inline within arrays and other structs (#33886). This significantly reduces the number of heap allocations in some workloads. Code that requires assumptions about object layout and addresses (usually for interoperability with C or other languages) might need to be updated; for example any object that needs a stable address should be a mutable struct. As a result, Array views no longer allocate (#34126).
  • Command-line option changes:
  • Deprecation warnings are no longer shown by default. i.e. if the --depwarn=... flag is not passed it defaults to --depwarn=no. The warnings are printed from tests run by Pkg.test() (#35362).
  • Color now defaults to on when stdout and stderr are TTYs (#34347).
  • -t N, --threads N starts Julia with N threads. This option takes precedence over JULIA_NUM_THREADS. The specified number of threads also propagates to worker processes spawned using the -p/--procs or --machine-file command line arguments. In order to set number of threads for worker processes spawned with addprocs use the exeflags keyword argument, e.g. addprocs(...; exeflags=`--threads 4`) (#35108).
  • Multi-threading changes:
  • Parts of the multi-threading API are now considered stable, with caveats. This includes all documented identifiers from Base.Threads except the atomic_ operations.
  • @threads now allows an optional schedule argument. Use @threads :static ... to ensure that the same schedule will be used as in past versions; the default schedule is likely to change in the future.
  • Build system changes:
  • The build system now contains a pure-make caching system for expanding expensive operations at the latest possible moment, while still expanding it only once (#35626).
  • New library functions:
  • Packages can now provide custom hints to help users resolve errors by using the experimental Base.Experimental.register_error_hint function. Packages that define custom exception types can support hints by calling the Base.Experimental.show_error_hints from their showerror method (#35094).
  • The @ccall macro has been added to Base. It is a near drop-in replacement for ccall with more Julia-like syntax. It also wraps the new foreigncall API for varargs of different types, though it lacks the capability to specify an LLVM calling convention (#32748).
  • New functions mergewith and mergewith! supersede merge and merge! with combine argument. They don't have the restriction for combine to be a Function and also provide one-argument method that returns a closure. The old methods of merge and merge! are still available for backward compatibility (#34296).
  • The new isdisjoint function indicates whether two collections are disjoint (#34427).
  • Add function ismutable and deprecate isimmutable to check whether something is mutable (#34652).
  • include now accepts an optional mapexpr first argument to transform the parsed expressions before they are evaluated (#34595).
  • New function bitreverse for reversing the order of bits in a fixed-width integer (#34791).
  • New function bitrotate(x, k) for rotating the bits in a fixed-width integer (#33937).
  • New function contains(haystack, needle) and its one argument partially applied form have been added, it acts like occursin(needle, haystack) (#35132).
  • New function Base.exit_on_sigint is added to control if InterruptException is thrown by Ctrl-C (#29411).
  • New function popat!(vector, index, [default]) for removing an element at an arbitrary index from a Vector (#35513, #36070).
  • New library features:
  • Function composition now works also on one argument ∘(f) = f (#34251).
  • One argument methods startswith(x) and endswith(x) have been added, returning partially-applied versions of the functions, similar to existing methods like isequal(x) (#33193).
  • isapprox (or ≈) now has a one-argument "curried" method isapprox(x) which returns a function, like isequal (or ==) (#32305).
  • @NamedTuple{key1::Type1, ...} macro for convenient NamedTuple declarations (#34548).
  • Ref{NTuple{N,T}} can be passed to Ptr{T}/Ref{T} ccall signatures (#34199).
  • x::Signed % Unsigned and x::Unsigned % Signed are supported for integer bitstypes.
  • signed(unsigned_type) is supported for integer bitstypes, unsigned(signed_type) has been supported.
  • accumulate, cumsum, and cumprod now support Tuple (#34654) and arbitrary iterators (#34656).
  • In splice! with no replacement, values to be removed can now be specified with an arbitrary iterable (instead of a UnitRange) (#34524).
  • The @view and @views macros now support the a[begin] syntax that was introduced in Julia 1.4 (#35289).
  • open for files now accepts a keyword argument lock controlling whether file operations will acquire locks for safe multi-threaded access. Setting it to false provides better performance when only one thread will access the file (#35426).
  • The introspection macros (@which, @code_typed, etc.) now work with do-block syntax (#35283) and with dot syntax (#35522).
  • count now accepts the dims keyword.
  • new in-place count! function similar to sum!.
  • peek is now exported and accepts a type to peek from a stream (#28811).
  • Standard library changes:
  • Empty ranges now compare equal, regardless of their startpoint and step (#32348).
  • A 1-d Zip iterator (where Base.IteratorSize is Base.HasShape{1}()) with defined length of n has now also size of (n,) (instead of throwing an error with truncated iterators) (#29927).
  • The @timed macro now returns a NamedTuple (#34149).
  • New supertypes(T) function returns a tuple of all supertypes of T (#34419).
  • Views of builtin ranges are now recomputed ranges (like indexing returns) instead of SubArrays (#26872).
  • Sorting-related functions such as sort that take the keyword arguments lt, rev, order and by now do not discard order if by or lt are passed. In the former case, the order from order is used to compare the values of by(element). In the latter case, any order different from Forward or Reverse will raise an error about the ambiguity.
  • close on a file (IOStream) can now throw an exception if an error occurs when trying to flush buffered data to disk (#35303).
  • The large StridedArray Union now has special printing to avoid printing out its entire contents (#31149).
  • LinearAlgebra:
  • The BLAS submodule now supports the level-2 BLAS subroutine hpmv! (#34211).
  • normalize now supports multidimensional arrays (#34239).
  • lq factorizations can now be used to compute the minimum-norm solution to under-determined systems (#34350).
  • sqrt(::Hermitian) now treats slightly negative eigenvalues as zero for nearly semidefinite matrices, and accepts a new rtol keyword argument for this tolerance (#35057).
  • The BLAS submodule now supports the level-2 BLAS subroutine spmv! (#34320).
  • The BLAS submodule now supports the level-1 BLAS subroutine rot! (#35124).
  • New generic rotate!(x, y, c, s) and reflect!(x, y, c, s) functions (#35124).
  • Markdown:
  • In docstrings, a level-1 markdown header "Extended help" is now interpreted as a marker dividing "brief help" from "extended help". The REPL help mode only shows the brief help (the content before the "Extended help" header) by default; prepend the expression with '?' (in addition to the one that enters the help mode) to see the full docstring (#25930).
  • Random:
  • randn!(::MersenneTwister, ::Array{Float64}) is faster, and as a result, for a given state of the RNG, the corresponding generated numbers have changed (#35078).
  • rand!(::MersenneTwister, ::Array{Bool}) is faster, and as a result, for a given state of the RNG, the corresponding generated numbers have changed (#33721).
  • A new faster algorithm ("nearly division less") is used for generating random numbers within a range (#29240). As a result, the streams of generated numbers are changed (for ranges, like in rand(1:9), and for collections in general, like in rand([1, 2, 3])). Also, for performance, the undocumented property that, given a seed and a, b of type Int, rand(a:b) produces the same stream on 32 and 64 bits architectures, is dropped.
  • REPL:
  • SparseArrays:
  • lu! accepts UmfpackLU as an argument to make use of its symbolic factorization.
  • The trim keyword argument for the functions fkeep!, tril!, triu!, droptol!,dropzeros! and dropzeros has been removed in favour of always trimming. Calling these with trim=false could result in invalid sparse arrays.
  • Dates:
  • The eps function now accepts TimeType types (#31487).
  • The zero function now accepts TimeType types (#35554).
  • Statistics:
  • Sockets:
  • Joining and leaving UDP multicast groups on a UDPSocket is now supported through join_multicast_group() and leave_multicast_group() (#35521).
  • Distributed:
  • launch_on_machine now supports and parses ipv6 square-bracket notation (#34430).
  • Deprecated or removed:
  • External dependencies:
  • OpenBLAS has been updated to v0.3.9 (#35113).

New in Julia 1.3.1 (Dec 31, 2019)

  • This is the first patch release for Julia version 1.3. It contains bug fixes, documentation enhancements, and performance improvements only, no new features or changes.

New in Julia 1.3.0 (Nov 27, 2019)

  • This is the third minor release in the 1.x series of releases.

New in Julia 1.1.1 (Aug 20, 2019)

  • Bug fixes:
  • #30554 - llvm: fix target triple
  • #30564 - fix lambda-optimize-vars! with complex assignment RHSs
  • #30644 - fix #30643, correctly propagate iterator traits through Stateful
  • #30754 - Handle :error and :invalid expressions gracefully in REPL helpmode
  • #30798 - fix #30792, static param constraints between positional and kw args
  • #30804 - fix at-everywhere using in Distributed stdlib
  • #30821 - Fix signature of git_libgit2_opts
  • #30930 - fix #30911, bug in deepcopy of UnionAll
  • #30880 - fix #30679, call correct method for invoke calls in jl_invoke fallback
  • #31047 - fix #29936, precompile should not assume UnionAlls have stable addresses
  • #31312 - allow chop to take an empty string
  • #30296 - Fix 29545: Implement unaliascopy for ReinterpretArray
  • #30569 - Improve REPL completions
  • #31642 - Fix show_vector for long offset arrays with :limit=true
  • #31187 - Fix -, conj, and conj! for sparse matrices with invalid entries in nzval
  • #31615 - fix parse(ComplexF64, "inf")
  • #31443 - minor fixes in multiplication with Diagonals
  • #31405 - inference: fix typeof-tfunc impl
  • #31699 - Backport bug fix to v1.1: don't Const-prop unitialized structs
  • Performance improvements:
  • #30895 - Fallback for copying views into sparse matrices
  • Documentation:
  • #30600 - fix typo in string search api docs
  • #30697 - some documentation improvements
  • #30689 - improve docstring of SparseMatrixCSC
  • #30678 - fix typo in devdocs/sysimg.md
  • #30717 - Singleton Types H4 -> H3
  • #30716 - fix #30499, document behavior of return at top level
  • #30747 - fix #28647, add doc string for Symbol
  • #30745 - Add kw_str for =
  • #30761 - Fix RemoteChannel example in parallel-computing.md
  • #30736 - Document indexing by different numbers of indices
  • #30884 - isapprox() doc mentioned deprecated 'vecnorm'
  • #30398 - Fix enumerate documentation

New in Julia 1.1.0 (May 16, 2019)

  • New language features:
  • An exception stack is maintained on each task to make exception handling more robust and enable root cause analysis. The stack may be accessed using the experimental function Base.catch_stack (#28878).
  • The experimental macro Base.@locals returns a dictionary of current local variable names and values (#29733).
  • Binary ~ can now be dotted, as in x .~ y (#30341).
  • Language changes:
  • Parser inputs ending with a comma are now consistently treated as incomplete. Previously they were sometimes parsed as tuples, depending on whitespace (#28506).
  • Spaces were accidentally allowed in broadcast call syntax, e.g. f. (x). They are now disallowed, consistent with normal function call syntax (#29781).
  • Big integer literals and command syntax (backticks) are now parsed with the name of the macro (@int128_str, @uint128_str, @big_str, @cmd) qualified to refer to the Core module (#29968).
  • Using the same name for both a local variable and a static parameter is now an error instead of a warning (#29429).
  • findall(in(b), a) now returns a CartesianIndex when a is a matrix or a higher-dimensional array, for consistency with other findall methods. Use LinearIndices(a)[findall(in(b), a)] to get the old behavior, or CartesianIndices(a)[findall(in(b), a)] to get the new behavior on previous Julia versions (#30226).
  • findmin(::BitArray) and findmax(::BitArray) now return a CartesianIndex when a is a matrix or a higher-dimensional array, for consistency with other array types. Use LinearIndices(a)[findmin(a)[2]] to get the old behavior, or CartesianIndices(a)[findmin(a)[2]] to get the new behavior on previous Julia versions (#30102).
  • Method signatures such as f(::Type{T}, ::T) where {T

New in Julia 1.0.0 (Sep 1, 2018)

  • Standard Library Changes:
  • The Libdl module's methods dlopen() and dlsym() have gained a throw_error keyword argument, replacing the now-deprecated dlopen_e() and dlsym_e() methods. When throw_error is false, failure to locate a shared library or symbol will return nothing rather than C_NULL. (#28888)
  • Deprecated or removed:
  • The old package manager (now called OldPkg) has been moved to a separate repository at https://github.com/JuliaArchive/OldPkg.jl (#27930)

New in Julia 0.6.3 (Jun 1, 2018)

  • Bug fixes for the 0.6 series of releases.

New in Julia 0.5.0 (Sep 20, 2016)

  • New language features:
  • Generator expressions: `f(i) for i in 1:n` ([#4470]). This returns an iterator that computes the specified values on demand. This is useful for computing, e.g. `sum(f(i) for i in 1:n)` without creating an intermediate array of values.
  • Generators and comprehensions support filtering using `if` ([#550]) and nested iteration using multiple `for` keywords ([#4867]).
  • Fused broadcasting syntax: ``f.(args...)`` is equivalent to ``broadcast(f, args...)`` ([#15032]), and nested `f.(g.(args...))` calls are fused into a single `broadcast` loop ([#17300]). Similarly, the syntax `x .= ...` is equivalent to a `broadcast!(identity, x, ...)` call and fuses with nested "dot" calls; also, `x .+= y` and similar is now equivalent to `x .= x .+ y`, rather than `x = x .+ y` ([#17510]).
  • Macro expander functions are now generic, so macros can have multiple definitions (e.g. for different numbers of arguments, or optional arguments) ([#8846], [#9627]). However note that the argument types refer to the syntax tree representation, and not to the types of run time values.
  • Varargs functions like `foo{T}(x::T...)` may now restrict the number of such arguments using `foo{T,N}(x::Vararg{T,N})` ([#11242]).
  • `x ∈ X` is now a synonym for `x in X` in `for` loops and comprehensions, as it already was in comparisons ([#13824]).
  • The `PROGRAM_FILE` global is now available for determining the name of the running script ([#14114]).
  • The syntax `x.:sym` (e.g. `Base.:+`) is now supported, while using `x.(:sym)` or `x.(i)` for field access are deprecated in favor of `getfield` ([#15032]).
  • Function return type syntax `function f()::T` has been added ([#1090]). Values returned from a function with such a declaration will be converted to the specified type `T`.
  • Many more operators now support `.` prefixes (e.g. `.≤`) ([#17393]). However, users are discouraged from overloading these, since they are mainly parsed in order to implement backwards compatibility with planned automatic broadcasting of dot operators in Julia 0.6 ([#16285]). Explicitly qualified operator names like `Base.≤` should now use `Base.:≤` (prefixed by `@compat` if you need 0.4 compatibility via the `Compat` package).
  • User-extensible bounds check elimination is now possible with the new `@boundscheck` macro ([#14474]). This macro marks bounds checking code blocks, which the compiler may remove when encountered inside an `@inbounds` call.
  • Experimental language features:
  • Support for [multi-threading](http://docs.julialang.org/en/latest/manual/parallel-computing/#multi-threading-experimental). Loops with independent iterations can be easily parallelized with the `Threads.@threads` macro.
  • Support for arrays with indexing starting at values different from 1. The array types are expected to be defined in packages, but now Julia provides an API for writing generic algorithms for arbitrary indexing schemes ([#16260]).
  • Language changes:Each function and closure now has its own type. The captured variables of a closure are fields of its type. `Function` is now an abstract type, and is the default supertype of functions and closures. All functions, including anonymous functions, are generic and support all features (e.g. keyword arguments). Instead of adding methods to `call`, methods are added by type using the syntax `(::ftype)(...) = ...`. `call` is deprecated ([#13412]). A significant result of this language change is that higher order functions can be specialized on their function arguments, leading to much faster functional programming, typically as fast as if function arguments were manually inlined. See below for details.
  • Square brackets and commas (e.g. `[x, y]`) no longer concatenate arrays, and always simply construct a vector of the provided values. If `x` and `y` are arrays, `[x, y]` will be an array of arrays ([#3737], [#2488], [#8599]).
  • `using` and `import` are now case-sensitive even on case-insensitive filesystems (common on Mac and Windows) ([#13542]).
  • Relational algebra symbols are now allowed as infix operators ([#8036]): `⨝`, `⟕`, `⟖`, `⟗` for joins and `▷` for anti-join.
  • A warning is always given when a method is overwritten; previously, this was done only when the new and old definitions were in separate modules ([#14759]).
  • The `if` keyword cannot be followed immediately by a line break ([#15763]).
  • Juxtaposition of numeric literals ending in `.` (e.g. `1.x`) is no longer allowed ([#15731]).
  • The built-in `NTuple` type has been removed; `NTuple{N,T}` is now implemented internally as `Tuple{Vararg{T,N}}` ([#11242]).
  • Use of the syntax `x::T` to declare the type of a local variable is deprecated. In the future this will always mean type assertion, and declarations should use `local x::T` instead ([#16071]). When `x` is global, `x::T = ...` and `global x::T` used to mean type assertion, but this syntax is now reserved for type declaration ([#964]).
  • Dictionary comprehension syntax `[ a=>b for x in y ]` is deprecated. Use `Dict(a=>b for x in y)` instead ([#16510]).
  • Parentheses are no longer allowed around iteration specifications, e.g. `for (i = 1:n)` ([#17668]).
  • Breaking changes:
  • This section lists changes that do not have deprecation warnings.
  • All dimensions indexed by scalars are now dropped, whereas previously only trailing scalar dimensions would be omitted from the result ([#13612]). This is a very major behavioral change, but should cause obvious failures. To retain a dimension sliced with a scalar `i` slice with `i:i` instead.
  • The assignment operations `.+=`, `.*=` and so on now generate calls to `broadcast!` on the left-hand side (or call to `view(a, ...)` on the left-hand side if the latter is an indexing expression, e.g. `a[...]`). This means that they will fail if the left-hand side is immutable (or does not support `view`), and will otherwise change the left-hand side in-place ([#17510], [#17546]).
  • Method ambiguities no longer generate warnings when files are loaded, nor do they dispatch to an arbitrarily-chosen method; instead, a call that cannot be resolved to a single method results in a `MethodError` at run time, rather than the previous definition-time warning ([#6190]).
  • Array comprehensions preserve the dimensions of the input ranges. For example, `[2x for x in A]` will have the same dimensions as `A` ([#16622]).
  • The result type of an array comprehension depends only on the types of elements computed, instead of using type inference ([#7258]). If the result is empty, then type inference is still used to determine the element type.
  • `reshape` is now defined to always share data with the original array. If a reshaped copy is needed, use `copy(reshape(a))` or `copy!` to a new array of the desired shape ([#4211]).
  • `mapslices` now re-uses temporary storage. Recipient functions that expect input slices to be persistent should copy data to other storage ([#17266]). All usages of `mapslices` should be carefully audited since this change can cause silent, incorrect behavior, rather than failing noisily.
  • Local variables and arguments are represented in lowered code as numbered `Slot` objects instead of as symbols ([#15609]).
  • The information that used to be in the `ast` field of the `LambdaStaticData` type is now divided among the fields `code`, `slotnames`, `slottypes`, `slotflags`, `gensymtypes`, `rettype`, `nargs`, and `isva` in the `LambdaInfo` type ([#15609]).
  • `A >>`) now handle negative shift counts differently: Negative counts are interpreted as shifts in the opposite direction. For example, `4 >> -1 == 4

New in Julia 0.4.7 (Sep 20, 2016)

  • Bug fix release

New in Julia 0.3.4 (Jan 10, 2015)

  • New language features:
  • Type parameters now permit any arbitrary isbits type, not just Int and Bool (#9161).

New in Julia 0.3.0 (Dec 29, 2014)

  • Highlights:
  • System image caching for fast startup.
  • A pure-Julia REPL was introduced, replacing readline and providing expanded functionality and customization.
  • The workspace() function was added, to clear the environment without restarting.
  • Tab substitution of Latex character codes is now supported in the REPL, IJulia, and several editor environments.
  • Unicode improvements including expanded operators and NFC normalization.
  • Multi-process shared memory support. (multi-threading support is in progress and has been a major summer focus)
  • Improved hashing and floating point range support.
  • Better tuple performance.