From 495e9657777e1a8db125da32a20a7f8f0d4fc98d Mon Sep 17 00:00:00 2001 From: Stefano Campanella <15182642+stefanocampanella@users.noreply.github.com> Date: Thu, 28 Dec 2023 11:50:30 +0100 Subject: [PATCH] Add more exercises --- applications/netcdf.jl | 115 ++++++++++++----------------------------- track 1/arrays.jl | 113 +++++++++++++++++++++++++++++++++------- track 1/built-ins.jl | 99 +++++++++++++++++++++++++++++------ track 1/controlflow.jl | 34 +++++++----- track 1/variables.jl | 112 ++++++++++++++++++++++++++++----------- 5 files changed, 314 insertions(+), 159 deletions(-) diff --git a/applications/netcdf.jl b/applications/netcdf.jl index 592176e..bdbe49a 100644 --- a/applications/netcdf.jl +++ b/applications/netcdf.jl @@ -1,5 +1,5 @@ ### A Pluto.jl notebook ### -# v0.19.29 +# v0.19.36 using Markdown using InteractiveUtils @@ -16,9 +16,6 @@ using GeoMakie, CairoMakie # ╔═╡ e0ea98a5-3c6a-4fe1-8fae-0d618b1427c5 using LinearAlgebra -# ╔═╡ 5e580944-6898-4463-9c04-eb2d23ec5642 -using BenchmarkTools - # ╔═╡ d193f148-53a4-11ee-2604-41b68e706cd1 ncquery = "https://dsecho.ogs.it/thredds/dodsC/pilot8/model_OGS_v2/RFVL/$(Dates.format(today(), "yyyymmdd"))/$(Dates.format(today() + Day(1), "yyyymmdd"))_h-OGS--RFVL-MITgcmBFM-pilot8-b$(Dates.format(today(), "yyyymmdd"))_fc-v01.nc?time[0:1:23],depth[0:1:26],latitude[0:1:299],longitude[0:1:493],uo[0:1:23][0:1:26][0:1:299][0:1:493],vo[0:1:23][0:1:26][0:1:299][0:1:493]" @@ -29,7 +26,11 @@ ds = NCDataset(ncquery, "r") lon, lat, u, v = map(var -> ds[var], ["longitude", "latitude", "uo", "vo"]) # ╔═╡ d849dab4-e880-433c-bae5-c7191f9a1803 -let stride = 12, time = 1, depth = 1 +let + stride = 12 + time = 1 + depth = 1 + londim = ds.dim["longitude"] latdim = ds.dim["latitude"] @@ -62,49 +63,9 @@ let stride = 12, time = 1, depth = 1 fig end -# ╔═╡ 6d27102f-f355-4383-a0d4-9df314b0176c -function interpolatecell(x, y, x₁, x₂, y₁, y₂, ϕ₁₁, ϕ₂₁, ϕ₁₂, ϕ₂₂) - den = (x₂ - x₁) * (y₂ - y₁) - num = ϕ₁₁ * (x₂ - x) * (y₂ - y) + ϕ₂₁ * (x - x₁) * (y₂ - y) + ϕ₁₂ * (x₂ - x) * (y - y₁) + ϕ₂₂ * (x₁ - x) * (y₁ - y) - num / den -end - -# ╔═╡ 87b0fb0b-a8dc-4edd-804d-139f6ba2eeee -function interpolate(x, y, xs, ys, fs) - i = findfirst(>(x), xs) - j = findfirst(>(y), ys) - fs = - interpolatecell(x, y, xs[i - 1], xs[i], ys[j - 1], ys[j], fs...) -end - -# ╔═╡ f3fb0c2e-bca7-458c-938e-614cb9250a66 -interpolatecell(0.5, 0.5, 0., 1., 0., 1., 5, 10, 20, 40) - -# ╔═╡ bc9d0189-177f-4309-b601-7256d63cb73b -let n = 16 - function getmesh(a, b, n, dim) - zs = range(a, b, length=n) - if dim == 1 - repeat(zs, 1, n) - else - repeat(transpose(zs), n , 1) - end - end - f(x, y) = sin(x * y) - xs_coarse = getmesh(0., 2π, n, 1) - ys_coarse = getmesh(0., 2π, 1, n) - fs_coarse = f.(xs_coarse, ys_coarse) - f_mesh = interpolate.(x_mesh, y_mesh, 0., 0., 1, 1, f) - fig = Figure() - ax = Axis3(fig[1, 1]) - surface!(x_mesh, y_mesh, f_mesh) - fig -end - # ╔═╡ 00000000-0000-0000-0000-000000000001 PLUTO_PROJECT_TOML_CONTENTS = """ [deps] -BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" GeoMakie = "db073c08-6b98-4ee5-b6a4-5efafb3259c6" @@ -112,7 +73,6 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab" [compat] -BenchmarkTools = "~1.3.2" CairoMakie = "~0.10.9" GeoMakie = "~0.5.1" NCDatasets = "~0.12.17" @@ -122,9 +82,9 @@ NCDatasets = "~0.12.17" PLUTO_MANIFEST_TOML_CONTENTS = """ # This file is machine-generated - editing it directly is not advised -julia_version = "1.9.3" +julia_version = "1.10.0" manifest_format = "2.0" -project_hash = "474cb4df1bcb220aa825e43da7e7f4a793ed08da" +project_hash = "a156539a004cf21f0103a9f67dafb6140bb97a0b" [[deps.AbstractFFTs]] deps = ["LinearAlgebra"] @@ -213,12 +173,6 @@ version = "0.4.7" [[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" -[[deps.BenchmarkTools]] -deps = ["JSON", "Logging", "Printf", "Profile", "Statistics", "UUIDs"] -git-tree-sha1 = "d9a9701b899b30332bbcb3e1679c41cce81fb0e8" -uuid = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" -version = "1.3.2" - [[deps.Bzip2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "19a35467a82e236ff51bc17a3a44b69ef35185a2" @@ -341,7 +295,7 @@ weakdeps = ["Dates", "LinearAlgebra"] [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.0.5+0" +version = "1.0.5+1" [[deps.ConstructionBase]] deps = ["LinearAlgebra"] @@ -862,21 +816,26 @@ version = "0.3.1" [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.3" +version = "0.6.4" [[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "7.84.0+0" +version = "8.4.0+0" [[deps.LibGit2]] -deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" +[[deps.LibGit2_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] +uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" +version = "1.6.4+0" + [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.10.2+0" +version = "1.11.0+1" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" @@ -1029,7 +988,7 @@ version = "0.5.6" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.2+0" +version = "2.28.2+1" [[deps.MicrosoftMPI_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -1059,7 +1018,7 @@ version = "0.3.4" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2022.10.11" +version = "2023.1.10" [[deps.Multisets]] git-tree-sha1 = "8d852646862c96e226367ad10c8af56099b4047e" @@ -1120,7 +1079,7 @@ version = "1.3.5+1" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.21+4" +version = "0.3.23+2" [[deps.OpenEXR]] deps = ["Colors", "FileIO", "OpenEXR_jll"] @@ -1137,7 +1096,7 @@ version = "3.1.4+0" [[deps.OpenLibm_jll]] deps = ["Artifacts", "Libdl"] uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+0" +version = "0.8.1+2" [[deps.OpenMPI_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] @@ -1177,7 +1136,7 @@ version = "1.6.2" [[deps.PCRE2_jll]] deps = ["Artifacts", "Libdl"] uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15" -version = "10.42.0+0" +version = "10.42.0+1" [[deps.PDMats]] deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] @@ -1242,7 +1201,7 @@ version = "0.42.2+0" [[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.9.2" +version = "1.10.0" [[deps.PkgVersion]] deps = ["Pkg"] @@ -1307,10 +1266,6 @@ version = "0.5.4" deps = ["Unicode"] uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" -[[deps.Profile]] -deps = ["Printf"] -uuid = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79" - [[deps.ProgressMeter]] deps = ["Distributed", "Printf"] git-tree-sha1 = "00099623ffee15972c16111bcf84c58a0051257c" @@ -1340,7 +1295,7 @@ deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.Random]] -deps = ["SHA", "Serialization"] +deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [[deps.RangeArrays]] @@ -1504,6 +1459,7 @@ version = "1.1.1" [[deps.SparseArrays]] deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +version = "1.10.0" [[deps.SpecialFunctions]] deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] @@ -1545,7 +1501,7 @@ version = "1.4.2" [[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.9.0" +version = "1.10.0" [[deps.StatsAPI]] deps = ["LinearAlgebra"] @@ -1590,9 +1546,9 @@ deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" [[deps.SuiteSparse_jll]] -deps = ["Artifacts", "Libdl", "Pkg", "libblastrampoline_jll"] +deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "5.10.1+6" +version = "7.2.1+1" [[deps.TOML]] deps = ["Dates"] @@ -1741,7 +1697,7 @@ version = "1.5.0+0" [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.13+0" +version = "1.2.13+1" [[deps.Zstd_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1776,7 +1732,7 @@ version = "0.15.1+0" [[deps.libblastrampoline_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.8.0+0" +version = "5.8.0+1" [[deps.libfdk_aac_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -1805,12 +1761,12 @@ version = "1.3.7+1" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.48.0+0" +version = "1.52.0+1" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+0" +version = "17.4.0+2" [[deps.x264_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -1834,10 +1790,5 @@ version = "3.5.0+0" # ╠═e60dde7d-3cf4-462e-b7ba-ebb303ac0cce # ╠═e0ea98a5-3c6a-4fe1-8fae-0d618b1427c5 # ╠═d849dab4-e880-433c-bae5-c7191f9a1803 -# ╠═6d27102f-f355-4383-a0d4-9df314b0176c -# ╠═5e580944-6898-4463-9c04-eb2d23ec5642 -# ╠═87b0fb0b-a8dc-4edd-804d-139f6ba2eeee -# ╠═f3fb0c2e-bca7-458c-938e-614cb9250a66 -# ╠═bc9d0189-177f-4309-b601-7256d63cb73b # ╟─00000000-0000-0000-0000-000000000001 # ╟─00000000-0000-0000-0000-000000000002 diff --git a/track 1/arrays.jl b/track 1/arrays.jl index fa273b6..4253075 100644 --- a/track 1/arrays.jl +++ b/track 1/arrays.jl @@ -39,10 +39,10 @@ Also, in Julia, as in Java, strings are immutable objects, and changing a string # ╔═╡ 947c63a5-dc39-4162-99a2-8b82c6c3fb22 # The Char primitive data type will take 4 bytes, ASCII chars in a string just 1 byte -sizeof('G'), sizeof("GSIC") +sizeof('A'), sizeof("ABBA") # ╔═╡ 2ba93c2a-d45f-4c12-aacc-4069c4d650b6 -codeunits("GSIC") +codeunits("ABBA") # ╔═╡ b93f7062-7ee7-4f36-a8c1-9299aeaaa566 let @@ -171,6 +171,75 @@ slowfunc(rs) ≈ fastfunc(rs) ≈ sum(rs) # ╔═╡ 3f7af6e3-5555-4b20-89ff-bf952a0618d6 @benchmark sum($rs) +# ╔═╡ c9cfa525-37fd-499a-9c3b-ea30e928b816 +md""" +!!! exercise + Conway's game of life evolve a matrix containing only ones (alive cells) and zeros (dead cells) with the following rules. + + * Any live cell with fewer than two live neighbours dies, as if by underpopulation. + * Any live cell with two or three live neighbours lives on to the next generation. + * Any live cell with more than three live neighbours dies, as if by overpopulation. + * Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction. + + Implement the `neighbors` function in the following cell and fix the bug to display the grid evolution. + +!!! hint + A simple implementation might look like the following. + + ```julia + function neighbors(m, i, j) + subm = similar(m, 3, 3) + for k in 1:3 + for l in 1:3 + ip = mod(i - 2 + k, size(m, 1)) + 1 + jp = mod(j - 2 + l, size(m, 2)) + 1 + subm[k, l] = m[ip, jp] + end + end + subm + end + ``` + The bug is in the last line, you should `copy` the grid! +""" + +# ╔═╡ 66bd9ee8-8228-46f8-b140-8863d86fa6fd +let + T = Int + N = 8 + + alive = one(T) + dead = zero(T) + + neighbors(m, i, j) = [1 0 0 # implement me + 0 1 0 + 0 0 0] + + function evolve!(m) + for j in axes(m, 2) + for i in axes(m, 1) + subm = neighbors(m, i, j) + c = count(==(alive), subm) + if m[i, j] == alive + if c < 2 + m[i, j] = dead + elseif c < 4 + m[i, j] = alive + else + m[i, j] = dead + end + else + if c == 3 + m[i, j] = alive + end + end + end + end + end + + m = rand([0, 1], N, N) + [(evolve!(m); m) for _ = 1:3] +end + # ╔═╡ f9a4ab44-3e70-47fd-a5d8-017c573e369f md""" @@ -303,7 +372,7 @@ PlutoUI = "~0.7.49" PLUTO_MANIFEST_TOML_CONTENTS = """ # This file is machine-generated - editing it directly is not advised -julia_version = "1.9.4" +julia_version = "1.10.0" manifest_format = "2.0" project_hash = "2027106876308ea187edd906d8ca120921c67a0d" @@ -391,7 +460,7 @@ version = "4.6.0" [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.0.5+0" +version = "1.0.5+1" [[deps.Contour]] git-tree-sha1 = "d05d9e7b7aedff4e5b51a029dced05cfb6125781" @@ -636,9 +705,14 @@ uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" version = "8.4.0+0" [[deps.LibGit2]] -deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" +[[deps.LibGit2_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] +uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" +version = "1.6.4+0" + [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" @@ -748,7 +822,7 @@ version = "1.1.7" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.2+0" +version = "2.28.2+1" [[deps.Measures]] git-tree-sha1 = "c13304c81eec1ed3af7fc20e75fb6b26092a1102" @@ -766,7 +840,7 @@ uuid = "a63ad114-7e13-5084-954f-fe012c677804" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2022.10.11" +version = "2023.1.10" [[deps.NaNMath]] deps = ["OpenLibm_jll"] @@ -787,12 +861,12 @@ version = "1.3.5+1" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.21+4" +version = "0.3.23+2" [[deps.OpenLibm_jll]] deps = ["Artifacts", "Libdl"] uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+0" +version = "0.8.1+2" [[deps.OpenSSL]] deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"] @@ -826,7 +900,7 @@ version = "1.4.1" [[deps.PCRE2_jll]] deps = ["Artifacts", "Libdl"] uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15" -version = "10.42.0+0" +version = "10.42.0+1" [[deps.Parsers]] deps = ["Dates", "SnoopPrecompile"] @@ -848,7 +922,7 @@ version = "0.40.1+0" [[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.9.2" +version = "1.10.0" [[deps.PlotThemes]] deps = ["PlotUtils", "Statistics"] @@ -899,7 +973,7 @@ deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.Random]] -deps = ["SHA", "Serialization"] +deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [[deps.RecipesBase]] @@ -973,6 +1047,7 @@ version = "1.1.0" [[deps.SparseArrays]] deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +version = "1.10.0" [[deps.SpecialFunctions]] deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] @@ -983,7 +1058,7 @@ version = "2.1.7" [[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.9.0" +version = "1.10.0" [[deps.StatsAPI]] deps = ["LinearAlgebra"] @@ -998,9 +1073,9 @@ uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" version = "0.33.21" [[deps.SuiteSparse_jll]] -deps = ["Artifacts", "Libdl", "Pkg", "libblastrampoline_jll"] +deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "5.10.1+6" +version = "7.2.1+1" [[deps.TOML]] deps = ["Dates"] @@ -1209,7 +1284,7 @@ version = "1.4.0+3" [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.13+0" +version = "1.2.13+1" [[deps.Zstd_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -1238,7 +1313,7 @@ version = "0.15.1+0" [[deps.libblastrampoline_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.8.0+0" +version = "5.8.0+1" [[deps.libfdk_aac_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -1266,7 +1341,7 @@ version = "1.52.0+1" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+0" +version = "17.4.0+2" [[deps.x264_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -1314,6 +1389,8 @@ version = "1.4.1+0" # ╠═67561d62-0a27-43f1-9c0e-e122b1306eec # ╠═9eccdb07-b5c3-4285-a1bd-f90f71237558 # ╠═3f7af6e3-5555-4b20-89ff-bf952a0618d6 +# ╟─c9cfa525-37fd-499a-9c3b-ea30e928b816 +# ╠═66bd9ee8-8228-46f8-b140-8863d86fa6fd # ╟─f9a4ab44-3e70-47fd-a5d8-017c573e369f # ╠═bea6cd29-a39c-4736-8ed0-46579a082fe1 # ╠═cd3ea6c0-9641-4843-a1c9-e39df0d0e024 diff --git a/track 1/built-ins.jl b/track 1/built-ins.jl index 9c20b9e..394bcfe 100644 --- a/track 1/built-ins.jl +++ b/track 1/built-ins.jl @@ -7,6 +7,9 @@ using InteractiveUtils # ╔═╡ b11e6a20-f27f-4b13-94c8-31ec68f2d3ca using Test +# ╔═╡ e40e1d20-397d-4f39-ad5f-0b7db4dfc522 +using BFloat16s + # ╔═╡ f6d8c1ac-3cac-43a3-ac78-f4e525beb191 using PlutoUI @@ -212,6 +215,30 @@ eps(0.1) # ╔═╡ d0a9c61c-d2aa-49b9-b8a8-8aa06dcb1a1b prevfloat(0.1) + eps(prevfloat(0.1)) == 0.1 +# ╔═╡ 91dd20bc-ee45-41be-8eeb-06086b69e0ae +md""" +!!! exercise + The function `sinc_area` computes (rather naively) the area under the curve of the function + ```math + \text{sinc}(x) = + \begin{cases} + 1 & x = 0 \\ + \frac{\sin(\pi x)}{\pi x} & \text{otherwise} + \end{cases} + ``` + for various floating point precisions. Evaluate the function for the built-in floating point data types, and for the [`BFloat16` data type](https://en.wikipedia.org/wiki/Bfloat16_floating-point_format). +""" + +# ╔═╡ d3c4ab8f-bbac-44cb-ab54-c3afeac5e0cd +function sinc_area(T, x₁, x₂, δx; sorted=false) + xs = collect(T, x₁:δx:x₂) + ys :: Vector{T} = sinc.(xs) .* convert(T, δx) + if sorted + ys = sort(ys) + end + sum(ys) +end + # ╔═╡ 18a9b640-eeac-4483-b348-00576ff59671 md""" ## Missing values @@ -284,6 +311,29 @@ sum(xs_nomissings) # And indexing is the same as the parent array findall(>(0), xs_nomissings) +# ╔═╡ b37425be-4d7a-40af-ba67-66d52953a25b +md""" +!!! exercise + In the following cell, fix the indexing of `ys` to compute the mean only of the values for which the corresponding element of `xs` is non missing + +!!! hint + You can negate a function using `!`, hence `findall(!ismissing, xs)` will return the indices for which `xs` has an actual value. +""" + +# ╔═╡ 38c64b27-70c9-477b-8fa3-f09e5d57e8c9 +let + N = 100 + p = 0.2 + xs :: Vector{Union{Missing, Float64}} = rand(N) + ys = rand(N) + for n in eachindex(xs) + if rand() < p + xs[n] = missing + end + end + sum(ys[1:N]) / N # Fix me! +end + # ╔═╡ 2b5ef054-697f-4933-b582-ff22883504ce # However, accessing the array on a missing value index will throw an error xs_nomissings[2] @@ -319,10 +369,12 @@ PlutoUI.TableOfContents() # ╔═╡ 00000000-0000-0000-0000-000000000001 PLUTO_PROJECT_TOML_CONTENTS = """ [deps] +BFloat16s = "ab4f0b2a-ad5b-11e8-123f-65d77653426b" PlutoUI = "7f904dfe-b85e-4ff6-b463-dae2292396a8" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] +BFloat16s = "~0.4.2" PlutoUI = "~0.7.54" """ @@ -330,9 +382,9 @@ PlutoUI = "~0.7.54" PLUTO_MANIFEST_TOML_CONTENTS = """ # This file is machine-generated - editing it directly is not advised -julia_version = "1.9.4" +julia_version = "1.10.0" manifest_format = "2.0" -project_hash = "8a94d76ad0a3722b5d6b17ff49de227fee9b75c7" +project_hash = "335221b6677d2981c7b10c661372924d7fd1bfcd" [[deps.AbstractPlutoDingetjes]] deps = ["Pkg"] @@ -347,6 +399,12 @@ version = "1.1.1" [[deps.Artifacts]] uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" +[[deps.BFloat16s]] +deps = ["LinearAlgebra", "Printf", "Random", "Test"] +git-tree-sha1 = "dbf84058d0a8cbbadee18d25cf606934b22d7c66" +uuid = "ab4f0b2a-ad5b-11e8-123f-65d77653426b" +version = "0.4.2" + [[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" @@ -359,7 +417,7 @@ version = "0.11.4" [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.0.5+0" +version = "1.0.5+1" [[deps.Dates]] deps = ["Printf"] @@ -418,9 +476,14 @@ uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" version = "8.4.0+0" [[deps.LibGit2]] -deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" +[[deps.LibGit2_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] +uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" +version = "1.6.4+0" + [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" @@ -448,14 +511,14 @@ uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.2+0" +version = "2.28.2+1" [[deps.Mmap]] uuid = "a63ad114-7e13-5084-954f-fe012c677804" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2022.10.11" +version = "2023.1.10" [[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" @@ -464,7 +527,7 @@ version = "1.2.0" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.21+4" +version = "0.3.23+2" [[deps.Parsers]] deps = ["Dates", "PrecompileTools", "UUIDs"] @@ -475,7 +538,7 @@ version = "2.8.1" [[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.9.2" +version = "1.10.0" [[deps.PlutoUI]] deps = ["AbstractPlutoDingetjes", "Base64", "ColorTypes", "Dates", "FixedPointNumbers", "Hyperscript", "HypertextLiteral", "IOCapture", "InteractiveUtils", "JSON", "Logging", "MIMEs", "Markdown", "Random", "Reexport", "URIs", "UUIDs"] @@ -504,7 +567,7 @@ deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.Random]] -deps = ["SHA", "Serialization"] +deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [[deps.Reexport]] @@ -525,16 +588,17 @@ uuid = "6462fe0b-24de-5631-8697-dd941f90decc" [[deps.SparseArrays]] deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +version = "1.10.0" [[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.9.0" +version = "1.10.0" [[deps.SuiteSparse_jll]] -deps = ["Artifacts", "Libdl", "Pkg", "libblastrampoline_jll"] +deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "5.10.1+6" +version = "7.2.1+1" [[deps.TOML]] deps = ["Dates"] @@ -570,12 +634,12 @@ uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.13+0" +version = "1.2.13+1" [[deps.libblastrampoline_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.8.0+0" +version = "5.8.0+1" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] @@ -585,7 +649,7 @@ version = "1.52.0+1" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+0" +version = "17.4.0+2" """ # ╔═╡ Cell order: @@ -633,6 +697,9 @@ version = "17.4.0+0" # ╠═cf037e98-caa4-42e4-aa1a-2e2d8ff5b34d # ╠═d5d5313a-7486-4769-b898-271f5fb61710 # ╠═d0a9c61c-d2aa-49b9-b8a8-8aa06dcb1a1b +# ╟─91dd20bc-ee45-41be-8eeb-06086b69e0ae +# ╠═e40e1d20-397d-4f39-ad5f-0b7db4dfc522 +# ╠═d3c4ab8f-bbac-44cb-ab54-c3afeac5e0cd # ╟─18a9b640-eeac-4483-b348-00576ff59671 # ╠═0a022203-e586-43a1-b7ea-56dc6dc25d54 # ╠═7cb1f647-2df5-4790-8986-d04204d5f3f3 @@ -649,6 +716,8 @@ version = "17.4.0+0" # ╠═12b974d2-a94a-463c-b29c-1f1d80d03e82 # ╠═1d670adf-5b7b-4075-9635-b9273eeb28b9 # ╠═f8f3aed6-8332-4651-b4d4-d86e362def99 +# ╟─b37425be-4d7a-40af-ba67-66d52953a25b +# ╠═38c64b27-70c9-477b-8fa3-f09e5d57e8c9 # ╠═2b5ef054-697f-4933-b582-ff22883504ce # ╟─84780473-db82-47c7-97c5-0ea74dda8087 # ╠═0d859212-74b1-4905-9ecb-0634cbcc7bb7 diff --git a/track 1/controlflow.jl b/track 1/controlflow.jl index a5fdf7b..fa22dc7 100644 --- a/track 1/controlflow.jl +++ b/track 1/controlflow.jl @@ -288,7 +288,7 @@ PlutoUI = "~0.7.54" PLUTO_MANIFEST_TOML_CONTENTS = """ # This file is machine-generated - editing it directly is not advised -julia_version = "1.9.4" +julia_version = "1.10.0" manifest_format = "2.0" project_hash = "3c61004d0ad425a97856dfe604920e9ff261614a" @@ -317,7 +317,7 @@ version = "0.11.4" [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.0.5+0" +version = "1.0.5+1" [[deps.Dates]] deps = ["Printf"] @@ -376,9 +376,14 @@ uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" version = "8.4.0+0" [[deps.LibGit2]] -deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" +[[deps.LibGit2_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] +uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" +version = "1.6.4+0" + [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" @@ -406,14 +411,14 @@ uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.2+0" +version = "2.28.2+1" [[deps.Mmap]] uuid = "a63ad114-7e13-5084-954f-fe012c677804" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2022.10.11" +version = "2023.1.10" [[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" @@ -422,7 +427,7 @@ version = "1.2.0" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.21+4" +version = "0.3.23+2" [[deps.Parsers]] deps = ["Dates", "PrecompileTools", "UUIDs"] @@ -433,7 +438,7 @@ version = "2.8.1" [[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.9.2" +version = "1.10.0" [[deps.PlutoUI]] deps = ["AbstractPlutoDingetjes", "Base64", "ColorTypes", "Dates", "FixedPointNumbers", "Hyperscript", "HypertextLiteral", "IOCapture", "InteractiveUtils", "JSON", "Logging", "MIMEs", "Markdown", "Random", "Reexport", "URIs", "UUIDs"] @@ -462,7 +467,7 @@ deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.Random]] -deps = ["SHA", "Serialization"] +deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [[deps.Reexport]] @@ -483,16 +488,17 @@ uuid = "6462fe0b-24de-5631-8697-dd941f90decc" [[deps.SparseArrays]] deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +version = "1.10.0" [[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.9.0" +version = "1.10.0" [[deps.SuiteSparse_jll]] -deps = ["Artifacts", "Libdl", "Pkg", "libblastrampoline_jll"] +deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "5.10.1+6" +version = "7.2.1+1" [[deps.TOML]] deps = ["Dates"] @@ -528,12 +534,12 @@ uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.13+0" +version = "1.2.13+1" [[deps.libblastrampoline_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.8.0+0" +version = "5.8.0+1" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] @@ -543,7 +549,7 @@ version = "1.52.0+1" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+0" +version = "17.4.0+2" """ # ╔═╡ Cell order: diff --git a/track 1/variables.jl b/track 1/variables.jl index 5dc90af..dca4bb6 100644 --- a/track 1/variables.jl +++ b/track 1/variables.jl @@ -94,6 +94,25 @@ let @show x y end +# ╔═╡ 00e00121-70b9-434e-ab2b-2afc5b3a596f +md""" +!!! exercise + The following cell evaluates a random polinomial + ```math + P(x) = c_1 + c_2 x + c_3 x^2 + c_4 x^3 + ``` + in ``x = -0.1``. Rewrite the same expression using the [Horner's method](https://en.wikipedia.org/wiki/Horner%27s_method) and check that the results are the same. + +!!! hint + You can write a more readable expression by using the implied multiplication. +""" + +# ╔═╡ 570395c2-f5b8-45cf-a5e7-b0415049f4a3 +let + cs = rand(4) + cs[1] + cs[2] * (-0.1) + cs[3] * (-0.1)^2 + cs[4] * (-0.1)^3 +end + # ╔═╡ 3a5fa678-85fd-4726-9051-36e53fa88b77 md""" ## Variables scope @@ -219,25 +238,29 @@ end # ╔═╡ 29592c11-9093-468b-9fce-d78e0cb4ecce sum_to_def_closure(10) == sum(1:10) -# ╔═╡ 2b502881-a145-4575-b9b1-1a950fadb545 -code = """ - s = 0 # global - for i = 1:10 - t = s + i # new local `t` - s = t # new local `s` with warning - end - s, # global - @isdefined(t) # global - """ +# ╔═╡ 5212de4f-c337-4ba6-80a8-dc37bc5b514f +md""" +!!! exercise -# ╔═╡ 81420b57-a395-4071-9daf-6526d1509bff -include_string(Main, code) + Evaluate the following code snippet in a file and in the REPL and explain the results. + + ```julia + s = 0 + for i = 1:10 + t = s + i + s = t + end + s, @isdefined(t) + ``` +""" # ╔═╡ 386450e8-322f-4ec9-a22a-6d7a756dd5b9 md""" -The previous example has been taken verbatim from the manual. Notice the following crucial point. ->[...] in a scope, each variable can only have one meaning, and that meaning is determined regardless of the order of expressions. The presence of the expression `s = t` in the loop causes s to be local to the loop, which means that it is also local when it appears on the right hand side of `t = s + i`, even though that expression appears first and is evaluated first. One might imagine that the `s` on the first line of the loop could be global while the s on the second line of the loop is local, but that's not possible since the two lines are in the same scope block and each variable can only mean one thing in a given scope. +!!! hint + The previous example has been taken verbatim from the manual. Notice the following crucial point. + + >[...] in a scope, each variable can only have one meaning, and that meaning is determined regardless of the order of expressions. The presence of the expression `s = t` in the loop causes s to be local to the loop, which means that it is also local when it appears on the right hand side of `t = s + i`, even though that expression appears first and is evaluated first. One might imagine that the `s` on the first line of the loop could be global while the s on the second line of the loop is local, but that's not possible since the two lines are in the same scope block and each variable can only mean one thing in a given scope. """ # ╔═╡ 387521a3-f7c1-48b6-8c90-fcd89a23f146 @@ -292,6 +315,26 @@ theanswer() = x @show Base.return_types(f), Base.return_types(theanswer) end +# ╔═╡ 8e6d8cdd-495a-47d3-bee2-e0936cf560b4 +md""" +!!! exercise + Retype the code within the `RedefiningConstantsUndefinedBehaviour` module in your REPL and inspect the emitted code and intermediate representations for `p` using the `@code_lowered`, `@code_llvm` and `@code_native` macros. What can you deduce from the results? +""" + +# ╔═╡ 12775ef5-bf7d-48d7-b397-ef7f2328635f +module RedefiningConstantsUndefinedBehaviour + +const x = 1 +p() = isodd(x) ? 42 : 24 + +@show p() + +x = 2 + +@show p() + +end + # ╔═╡ 756539c8-61f5-4e3f-8008-a18dde94e0dd md""" ## The `let` block @@ -502,7 +545,7 @@ PlutoUI = "~0.7.54" PLUTO_MANIFEST_TOML_CONTENTS = """ # This file is machine-generated - editing it directly is not advised -julia_version = "1.9.4" +julia_version = "1.10.0" manifest_format = "2.0" project_hash = "3c61004d0ad425a97856dfe604920e9ff261614a" @@ -531,7 +574,7 @@ version = "0.11.4" [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.0.5+0" +version = "1.0.5+1" [[deps.Dates]] deps = ["Printf"] @@ -590,9 +633,14 @@ uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" version = "8.4.0+0" [[deps.LibGit2]] -deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" +[[deps.LibGit2_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] +uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" +version = "1.6.4+0" + [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" @@ -620,14 +668,14 @@ uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.2+0" +version = "2.28.2+1" [[deps.Mmap]] uuid = "a63ad114-7e13-5084-954f-fe012c677804" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2022.10.11" +version = "2023.1.10" [[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" @@ -636,7 +684,7 @@ version = "1.2.0" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.21+4" +version = "0.3.23+2" [[deps.Parsers]] deps = ["Dates", "PrecompileTools", "UUIDs"] @@ -647,7 +695,7 @@ version = "2.8.1" [[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.9.2" +version = "1.10.0" [[deps.PlutoUI]] deps = ["AbstractPlutoDingetjes", "Base64", "ColorTypes", "Dates", "FixedPointNumbers", "Hyperscript", "HypertextLiteral", "IOCapture", "InteractiveUtils", "JSON", "Logging", "MIMEs", "Markdown", "Random", "Reexport", "URIs", "UUIDs"] @@ -676,7 +724,7 @@ deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.Random]] -deps = ["SHA", "Serialization"] +deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [[deps.Reexport]] @@ -697,16 +745,17 @@ uuid = "6462fe0b-24de-5631-8697-dd941f90decc" [[deps.SparseArrays]] deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +version = "1.10.0" [[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.9.0" +version = "1.10.0" [[deps.SuiteSparse_jll]] -deps = ["Artifacts", "Libdl", "Pkg", "libblastrampoline_jll"] +deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "5.10.1+6" +version = "7.2.1+1" [[deps.TOML]] deps = ["Dates"] @@ -742,12 +791,12 @@ uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.13+0" +version = "1.2.13+1" [[deps.libblastrampoline_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.8.0+0" +version = "5.8.0+1" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] @@ -757,7 +806,7 @@ version = "1.52.0+1" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+0" +version = "17.4.0+2" """ # ╔═╡ Cell order: @@ -773,6 +822,8 @@ version = "17.4.0+0" # ╠═f2a24699-2442-4111-a0ec-8e3df55a836a # ╠═12be6882-3c11-4dca-81d2-4cd8e297654c # ╠═612851d7-0e77-4cee-9cac-f795613dd926 +# ╟─00e00121-70b9-434e-ab2b-2afc5b3a596f +# ╠═570395c2-f5b8-45cf-a5e7-b0415049f4a3 # ╟─3a5fa678-85fd-4726-9051-36e53fa88b77 # ╠═64ea16be-71c4-4b25-b560-9e0cebc51e87 # ╟─b64c7042-099f-460c-8546-de72106d2112 @@ -782,8 +833,7 @@ version = "17.4.0+0" # ╠═5d089849-2515-46a3-be31-d73c80f9badc # ╠═6974f0e7-a029-4d72-97a8-78c93903571c # ╠═29592c11-9093-468b-9fce-d78e0cb4ecce -# ╠═2b502881-a145-4575-b9b1-1a950fadb545 -# ╠═81420b57-a395-4071-9daf-6526d1509bff +# ╟─5212de4f-c337-4ba6-80a8-dc37bc5b514f # ╟─386450e8-322f-4ec9-a22a-6d7a756dd5b9 # ╟─387521a3-f7c1-48b6-8c90-fcd89a23f146 # ╠═7b26a226-87ed-49e1-9143-a7fc1c196157 @@ -791,6 +841,8 @@ version = "17.4.0+0" # ╠═15fee563-3574-45f9-9f67-541926586ec8 # ╟─01081ece-fb98-44cd-ab99-c3ad65ef860b # ╠═95ef309c-8fb5-4e6a-9cef-1c6f5f8d6112 +# ╟─8e6d8cdd-495a-47d3-bee2-e0936cf560b4 +# ╠═12775ef5-bf7d-48d7-b397-ef7f2328635f # ╟─756539c8-61f5-4e3f-8008-a18dde94e0dd # ╠═da7c3418-ec3c-4edd-92d1-7225f58097cc # ╟─59275e3d-7390-4c68-b6d3-53abbf7ff14d