diff --git a/README.md b/README.md index ffe0de45381ca..e29d6be679314 100644 --- a/README.md +++ b/README.md @@ -84,16 +84,16 @@ Then, acquire the source code by cloning the git repository: Be sure to also configure your system to use the appropriate proxy settings, e.g. by setting the `https_proxy` and `http_proxy` variables.) -By default you will be building the latest unstable version of Julia. However, most users should use the most recent stable version of Julia, which is currently the `0.6` series of releases. You can get this version by changing to the Julia directory and running +By default you will be building the latest unstable version of Julia. However, most users should use the most recent stable version of Julia, which is currently the `1.0` series of releases. You can get this version by changing to the Julia directory and running - git checkout v0.6.4 + git checkout v1.0.0 Now run `make` to build the `julia` executable. To perform a parallel build, use `make -j N` and supply the maximum number of concurrent processes. (See [Platform Specific Build Notes](https://github.com/JuliaLang/julia#platform-specific-build-notes) for details.) When compiled the first time, it will automatically download and build its [external dependencies](#required-build-tools-and-external-libraries). This takes a while, but only has to be done once. If the defaults in the build do not work for you, and you need to set specific make parameters, you can save them in `Make.user`, and place the file in the root of your Julia source. The build will automatically check for the existence of `Make.user` and use it if it exists. Building Julia requires 5GiB of disk space and approximately 2GiB of virtual memory. -For builds of julia starting with 0.5.0-dev, you can create out-of-tree builds of Julia by specifying `make O= configure` on the command line. This will create a directory mirror, with all of the necessary Makefiles to build Julia, in the specified directory. These builds will share the source files in Julia and `deps/srccache`. Each out-of-tree build directory can have its own `Make.user` file to override the global `Make.user` file in the top-level folder. +You can create out-of-tree builds of Julia by specifying `make O= configure` on the command line. This will create a directory mirror, with all of the necessary Makefiles to build Julia, in the specified directory. These builds will share the source files in Julia and `deps/srccache`. Each out-of-tree build directory can have its own `Make.user` file to override the global `Make.user` file in the top-level folder. If you need to build Julia on a machine without internet access, use `make -C deps getall` to download all the necessary files. Then, copy the `julia` directory over to the target environment and build with `make`. diff --git a/README.windows.md b/README.windows.md index 76056b69959ed..a13c1ba5a86b0 100644 --- a/README.windows.md +++ b/README.windows.md @@ -23,7 +23,7 @@ Instructions for adding fonts to the terminal are available at Additionally, rather than sticking with the default command prompt, you may want to use a different terminal emulator program, such as -[Conemu](https://code.google.com/p/conemu-maximus5/) or [Mintty]( +[Conemu](https://conemu.github.io/) or [Mintty]( https://github.com/mintty/mintty) (note that running Julia on Mintty needs a copy of `stty.exe` in your `%PATH%` to work properly). Alternatively, you may prefer the features of a more full-function IDE, such as [Juno](http://junolab.org), diff --git a/doc/Manifest.toml b/doc/Manifest.toml index badaf09863125..d2669e5686fb4 100644 --- a/doc/Manifest.toml +++ b/doc/Manifest.toml @@ -3,17 +3,20 @@ uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" [[Compat]] deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"] -git-tree-sha1 = "c478aec93ea90bb99c307a92df17a76131bf275f" +git-tree-sha1 = "277d3807440d9793421354b6680911fc95d91a84" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "1.0.0" +version = "1.0.1" [[Dates]] +deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" [[DelimitedFiles]] +deps = ["Mmap"] uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" [[Distributed]] +deps = ["LinearAlgebra", "Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" [[DocStringExtensions]] @@ -24,11 +27,12 @@ version = "0.4.5" [[Documenter]] deps = ["Compat", "DocStringExtensions", "Logging", "REPL"] -git-tree-sha1 = "db9efaced47fd05e8fa5f6ec3f6925dc2f1425aa" +git-tree-sha1 = "ef29b036c7eb40bca1ac5471639ec01e98717d27" uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -version = "0.19.1" +version = "0.19.3" [[InteractiveUtils]] +deps = ["LinearAlgebra", "Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" [[LibGit2]] @@ -38,48 +42,62 @@ uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" [[LinearAlgebra]] +deps = ["Libdl"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" [[Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" [[Markdown]] +deps = ["Base64"] uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" [[Mmap]] uuid = "a63ad114-7e13-5084-954f-fe012c677804" [[Pkg]] +deps = ["Dates", "LibGit2", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" [[Printf]] +deps = ["Unicode"] uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" [[REPL]] +deps = ["InteractiveUtils", "Markdown", "Sockets"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[Random]] +deps = ["Serialization"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +[[SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" + [[Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" [[SharedArrays]] +deps = ["Distributed", "Mmap", "Random", "Serialization"] uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" [[Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" [[SparseArrays]] +deps = ["LinearAlgebra", "Random"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" [[Statistics]] +deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" [[Test]] +deps = ["Distributed", "InteractiveUtils", "Logging", "Random"] uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [[UUIDs]] +deps = ["Random"] uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" [[Unicode]] diff --git a/doc/src/manual/profile.md b/doc/src/manual/profile.md index 00d91cf5f0d7c..e3403cd449131 100644 --- a/doc/src/manual/profile.md +++ b/doc/src/manual/profile.md @@ -312,3 +312,34 @@ memory allocation). The recommended procedure is to force compilation by executi you want to analyze, then call [`Profile.clear_malloc_data()`](@ref) to reset all allocation counters. Finally, execute the desired commands and quit Julia to trigger the generation of the `.mem` files. + +# External Profiling + +Currently Julia supports `Intel VTune`, `OProfile` and `perf` as external profiling tools. + +Depending on the tool you choose, compile with `USE_INTEL_JITEVENTS`, `USE_OPROFILE_JITEVENTS` and +`USE_PERF_JITEVENTS` set to 1 in `Make.user`. Multiple flags are supported. + +Before running Julia set the environment variable `ENABLE_JITPROFILING` to 1. + +Now you have a multitude of ways to employ those tools! +For example with `OProfile` you can try a simple recording : + +``` +>ENABLE_JITPROFILING=1 sudo operf -Vdebug ./julia test/fastmath.jl +>opreport -l `which ./julia` +``` + +Or similary with with `perf` : + +``` +$ ENABLE_JITPROFILING=1 perf record -o /tmp/perf.data --call-graph dwarf ./julia /test/fastmath.jl +$ perf report --call-graph -G +``` + +There are many more interesting things that you can measure about your program, to get a comprehensive list +please read the [Linux perf examples page](http://www.brendangregg.com/perf.html). + +Remember that perf saves for each execution a `perf.data` file that, even for small programs, can get +quite large. Also the perf LLVM module saves temporarly debug objects in `~/.debug/jit`, remember +to clean that folder frequently. diff --git a/src/julia-parser.scm b/src/julia-parser.scm index e319d9cc3ecca..9d832894f9bb1 100644 --- a/src/julia-parser.scm +++ b/src/julia-parser.scm @@ -779,7 +779,7 @@ (begin (if (not (ts:space? s)) (error "space required before \"?\" operator")) (take-token s) ; take the ? - (let ((t (with-whitespace-newline (without-range-colon (peek-token s))))) + (let ((t (with-whitespace-newline (without-range-colon (require-token s))))) (if (not (ts:space? s)) (error "space required after \"?\" operator"))) (let ((then (without-range-colon (parse-eq* s)))) @@ -788,7 +788,7 @@ (if (not (ts:space? s)) (error "space required before colon in \"?\" expression")) (take-token s) ; take the : - (let ((t (with-whitespace-newline (peek-token s)))) + (let ((t (with-whitespace-newline (require-token s)))) (if (not (ts:space? s)) (error "space required after colon in \"?\" expression"))) (list 'if ex then (parse-eq* s))))) diff --git a/stdlib/LinearAlgebra/src/adjtrans.jl b/stdlib/LinearAlgebra/src/adjtrans.jl index f75c42117ec8e..208c2f884c563 100644 --- a/stdlib/LinearAlgebra/src/adjtrans.jl +++ b/stdlib/LinearAlgebra/src/adjtrans.jl @@ -150,7 +150,7 @@ similar(A::AdjOrTrans, ::Type{T}, dims::Dims{N}) where {T,N} = similar(A.parent, # sundry basic definitions parent(A::AdjOrTrans) = A.parent -vec(v::AdjOrTransAbsVec) = v.parent +vec(v::TransposeAbsVec) = parent(v) cmp(A::AdjOrTransAbsVec, B::AdjOrTransAbsVec) = cmp(parent(A), parent(B)) isless(A::AdjOrTransAbsVec, B::AdjOrTransAbsVec) = isless(parent(A), parent(B)) diff --git a/stdlib/LinearAlgebra/src/generic.jl b/stdlib/LinearAlgebra/src/generic.jl index ac55b9ed696ae..ea23e8d51cee7 100644 --- a/stdlib/LinearAlgebra/src/generic.jl +++ b/stdlib/LinearAlgebra/src/generic.jl @@ -1274,7 +1274,7 @@ julia> logabsdet(B) (0.6931471805599453, 1.0) ``` """ -logabsdet(A::AbstractMatrix) = logabsdet(lu(A)) +logabsdet(A::AbstractMatrix) = logabsdet(lu(A, check=false)) """ logdet(M) diff --git a/stdlib/LinearAlgebra/test/adjtrans.jl b/stdlib/LinearAlgebra/test/adjtrans.jl index 5abba308fcec0..ba3faac50374d 100644 --- a/stdlib/LinearAlgebra/test/adjtrans.jl +++ b/stdlib/LinearAlgebra/test/adjtrans.jl @@ -271,8 +271,10 @@ end @testset "Adjoint and Transpose vector vec methods" begin intvec = [1, 2] - @test vec(Adjoint(intvec)) === intvec + @test vec(Adjoint(intvec)) == intvec @test vec(Transpose(intvec)) === intvec + cvec = [1 + 1im] + @test vec(cvec')[1] == cvec[1]' end @testset "horizontal concatenation of Adjoint/Transpose-wrapped vectors and Numbers" begin diff --git a/stdlib/LinearAlgebra/test/generic.jl b/stdlib/LinearAlgebra/test/generic.jl index 1c38883356efb..13d18e1d29b23 100644 --- a/stdlib/LinearAlgebra/test/generic.jl +++ b/stdlib/LinearAlgebra/test/generic.jl @@ -80,6 +80,8 @@ n = 5 # should be odd @test logdet(A) ≈ log(det(A)) @test logabsdet(A)[1] ≈ log(abs(det(A))) @test logabsdet(Matrix{elty}(-I, n, n))[2] == -1 + infinity = convert(float(elty), Inf) + @test logabsdet(zeros(elty, n, n)) == (-infinity, zero(elty)) if elty <: Real @test logabsdet(A)[2] == sign(det(A)) @test_throws DomainError logdet(Matrix{elty}(-I, n, n)) diff --git a/stdlib/REPL/docs/src/index.md b/stdlib/REPL/docs/src/index.md index 42348a1eae06a..0920ab36549c3 100644 --- a/stdlib/REPL/docs/src/index.md +++ b/stdlib/REPL/docs/src/index.md @@ -6,18 +6,12 @@ it has a searchable history, tab-completion, many helpful keybindings, and dedic shell modes. The REPL can be started by simply calling `julia` with no arguments or double-clicking on the executable: -``` -$ julia - _ - _ _ _(_)_ | A fresh approach to technical computing - (_) | (_) (_) | Documentation: https://docs.julialang.org - _ _ _| |_ __ _ | Type "?help" for help. - | | | | | | |/ _` | | - | | |_| | | | (_| | | Version 0.6.0-dev.2493 (2017-01-31 18:53 UTC) - _/ |\__'_|_|_|\__'_| | Commit c99e12c* (0 days old master) -|__/ | x86_64-linux-gnu - -julia> +```@eval +io = IOBuffer() +Base.banner(io) +banner = String(take!(io)) +import Markdown +Markdown.parse("```\n\$ julia\n\n$(banner)\njulia>\n```") ``` To exit the interactive session, type `^D` -- the control key together with the `d` key on a blank diff --git a/test/syntax.jl b/test/syntax.jl index 935c7ce58add5..4e4417dd5a3b6 100644 --- a/test/syntax.jl +++ b/test/syntax.jl @@ -1642,3 +1642,7 @@ end for ex in [:([x=1]), :(T{x=1})] @test Meta.lower(@__MODULE__, ex) == Expr(:error, string("misplaced assignment statement in \"", ex, "\"")) end + +# issue #28576 +@test Meta.isexpr(Meta.parse("1 == 2 ?"), :incomplete) +@test Meta.isexpr(Meta.parse("1 == 2 ? 3 :"), :incomplete)