To be able to edit code and run cells, you need to run the notebook yourself. Where would you like to run the notebook?

This notebook takes about 20 seconds to run.

In the cloud (experimental)

Binder is a free, open source service that runs scientific notebooks in the cloud! It will take a while, usually 2-7 minutes to get a session.

On your computer

(Recommended if you want to store your changes.)

  1. Copy the notebook URL:
  2. Run Pluto

    (Also see: How to install Julia and Pluto)

  3. Paste URL in the Open box

Frontmatter

If you are publishing this notebook on the web, you can set the parameters below to provide HTML metadata. This is useful for search engines and social media.

Author 1
👀 Reading hidden code
10.7 μs
👀 Reading hidden code
struct Wow
x
y
end
1.3 ms
show(io::IO, ::MIME{Symbol("text/plain")}, w::Main.workspace#3.Wow) in Main.workspace#3 at /home/runner/work/disorganised-mess/disorganised-mess/arraytree.jl#==#d6bb60b0-8fc4-11ea-1a96-6dffb769ac8d:1
👀 Reading hidden code
which(show, (IO, MIME"text/plain", Wow))
2.7 ms
👀 Reading hidden code
Base.show(io::IO, ::MIME"text/plain", w::Wow) = print(io, "wowie")
483 μs
👀 Reading hidden code
ww = md"";
163 μs
3×3 Matrix{Float64}:
 0.145364   0.0652707  -1.73132
 0.607512   1.23345     0.973357
 0.178725  -0.0363524  -0.220488
👀 Reading hidden code
16.9 μs
wowie
👀 Reading hidden code
w = Wow(1,2)
17.1 μs

a

👀 Reading hidden code
md"a"
173 μs
wowie
👀 Reading hidden code
10.1 μs
false
👀 Reading hidden code
w isa Base.AbstractDict
17.8 μs
using Distributed
👀 Reading hidden code
191 μs
include_dependency("potato")
👀 Reading hidden code
37.3 μs
Error message

UndefVarError: Pluto not defined

Stacktrace:

[1] top-level scope

@ none:1

[2] eval

@ ./boot.jl:373 [inlined]

[3] #153

@ /opt/hostedtoolcache/julia/1.7.3/x64/share/julia/stdlib/v1.7/Distributed/src/remotecall.jl:429 [inlined]

[4] run_work_thunk(thunk::Distributed.var"#153#154"{typeof(Core.eval), Tuple{Module, Expr}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}, print_error::Bool)

@ Distributed /opt/hostedtoolcache/julia/1.7.3/x64/share/julia/stdlib/v1.7/Distributed/src/process_messages.jl:63

[5] #remotecall_fetch#158

@ /opt/hostedtoolcache/julia/1.7.3/x64/share/julia/stdlib/v1.7/Distributed/src/remotecall.jl:454 [inlined]

[6] remotecall_fetch

@ /opt/hostedtoolcache/julia/1.7.3/x64/share/julia/stdlib/v1.7/Distributed/src/remotecall.jl:454 [inlined]

[7] #remotecall_fetch#162

@ /opt/hostedtoolcache/julia/1.7.3/x64/share/julia/stdlib/v1.7/Distributed/src/remotecall.jl:496 [inlined]

[8] remotecall_fetch

@ /opt/hostedtoolcache/julia/1.7.3/x64/share/julia/stdlib/v1.7/Distributed/src/remotecall.jl:496 [inlined]

[9] remotecall_eval(m::Module, pid::Int64, ex::Expr)

@ Distributed /opt/hostedtoolcache/julia/1.7.3/x64/share/julia/stdlib/v1.7/Distributed/src/macros.jl:242

[10] ##function_wrapped_cell#326

@ ~/work/disorganised-mess/disorganised-mess/arraytree.jl#==#9749bdd8-93c0-11ea-218e-bb3c8aca84a6:1 [inlined]

[11] var"##function_wrapped_cell#326"(Distributed::Module, Main::Module)

@ Main ./none:0

[12] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})

@ Base ./essentials.jl:716

[13] invokelatest(::Any, ::Any, ::Vararg{Any})

@ Base ./essentials.jl:714

[14] compute(m::Module, computer::PlutoRunner.Computer)

@ PlutoRunner ~/.julia/packages/Pluto/6smog/src/runner/PlutoRunner/src/evaluation/run_expression.jl:85

[15] (::PlutoRunner.var"#34#37"{Module})()

@ PlutoRunner ~/.julia/packages/Pluto/6smog/src/runner/PlutoRunner/src/evaluation/run_expression.jl:261

[16] run_inside_trycatch(m::Module, f::PlutoRunner.var"#34#37"{Module})

@ PlutoRunner ~/.julia/packages/Pluto/6smog/src/runner/PlutoRunner/src/evaluation/run_expression.jl:125

[17] (::PlutoRunner.var"#32#35"{Bool, Module, Expr, Base.UUID, Base.UUID, Tuple{Set{Symbol}, Set{Symbol}}, Nothing, UInt64, Expr})()

@ PlutoRunner ~/.julia/packages/Pluto/6smog/src/runner/PlutoRunner/src/evaluation/run_expression.jl:261

[18] with_io_to_logs(f::PlutoRunner.var"#32#35"{Bool, Module, Expr, Base.UUID, Base.UUID, Tuple{Set{Symbol}, Set{Symbol}}, Nothing, UInt64, Expr}; enabled::Bool, loglevel::Base.CoreLogging.LogLevel)

@ PlutoRunner ~/.julia/packages/Pluto/6smog/src/runner/PlutoRunner/src/io/stdout.jl:64

[19] (::PlutoRunner.var"#126#127"{Bool, Base.CoreLogging.LogLevel, PlutoRunner.var"#32#35"{Bool, Module, Expr, Base.UUID, Base.UUID, Tuple{Set{Symbol}, Set{Symbol}}, Nothing, UInt64, Expr}})()

@ PlutoRunner ~/.julia/packages/Pluto/6smog/src/runner/PlutoRunner/src/io/logging.jl:129

[20] with_logstate(f::Function, logstate::Any)

@ Base.CoreLogging ./logging.jl:511

[21] with_logger

@ ./logging.jl:623 [inlined]

[22] #with_logger_and_io_to_logs#125

@ ~/.julia/packages/Pluto/6smog/src/runner/PlutoRunner/src/io/logging.jl:128 [inlined]

[23] run_expression(m::Module, expr::Expr, notebook_id::Base.UUID, cell_id::Base.UUID, function_wrapped_info::Union{Nothing, Tuple{Set{Symbol}, Set{Symbol}}}, forced_expr_id::Union{Nothing, UInt64}; user_requested_run::Bool, capture_stdout::Bool)

@ PlutoRunner ~/.julia/packages/Pluto/6smog/src/runner/PlutoRunner/src/evaluation/run_expression.jl:236

[24] top-level scope

@ ~/.julia/packages/Pluto/6smog/src/evaluation/WorkspaceManager.jl:439

[25] eval

@ ./boot.jl:373 [inlined]

[26] macro expansion

@ ~/.julia/packages/Malt/YJ2Ml/src/worker.jl:120 [inlined]

[27] (::var"#1#2"{Sockets.TCPSocket, UInt64, Bool, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, Tuple{Module, Expr}, typeof(Core.eval)})()

@ Main ./task.jl:429

Stack trace

Here is what happened, the most recent locations are first:

  1. #remotecall_fetch#158
  2. remotecall_fetch
  3. #remotecall_fetch#162
  4. remotecall_fetch
  5. remotecall_eval(m::Module, pid::Int64, ex::Expr)
  6. Distributed.remotecall_eval(Main, 1, :(VersionNumber(Pluto.Pkg.TOML.parsefile(joinpath(Pluto.PKG_ROOT_DIR, "Project.toml"))["version"])))
Try asking on Julia Discourse!
Distributed.remotecall_eval(Main, 1, :(VersionNumber(Pluto.Pkg.TOML.parsefile(joinpath(Pluto.PKG_ROOT_DIR, "Project.toml"))["version"])))
👀 Reading hidden code
---
Error message

UndefVarError: Pluto not defined

Stacktrace:

[1] top-level scope

@ :0

[2] eval

@ ./boot.jl:373 [inlined]

[3] #153

@ /opt/hostedtoolcache/julia/1.7.3/x64/share/julia/stdlib/v1.7/Distributed/src/remotecall.jl:429 [inlined]

[4] run_work_thunk(thunk::Distributed.var"#153#154"{typeof(Core.eval), Tuple{Module, Expr}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}, print_error::Bool)

@ Distributed /opt/hostedtoolcache/julia/1.7.3/x64/share/julia/stdlib/v1.7/Distributed/src/process_messages.jl:63

[5] #remotecall_fetch#158

@ /opt/hostedtoolcache/julia/1.7.3/x64/share/julia/stdlib/v1.7/Distributed/src/remotecall.jl:454 [inlined]

[6] remotecall_fetch

@ /opt/hostedtoolcache/julia/1.7.3/x64/share/julia/stdlib/v1.7/Distributed/src/remotecall.jl:454 [inlined]

[7] #remotecall_fetch#162

@ /opt/hostedtoolcache/julia/1.7.3/x64/share/julia/stdlib/v1.7/Distributed/src/remotecall.jl:496 [inlined]

[8] remotecall_fetch

@ /opt/hostedtoolcache/julia/1.7.3/x64/share/julia/stdlib/v1.7/Distributed/src/remotecall.jl:496 [inlined]

[9] remotecall_eval(m::Module, pid::Int64, ex::Expr)

@ Distributed /opt/hostedtoolcache/julia/1.7.3/x64/share/julia/stdlib/v1.7/Distributed/src/macros.jl:242

[10] ##function_wrapped_cell#330

@ ~/work/disorganised-mess/disorganised-mess/arraytree.jl#==#e46bc5fe-93c0-11ea-3a28-a57866436552:1 [inlined]

[11] var"##function_wrapped_cell#330"(Distributed::Module, Main::Module)

@ Main ./none:0

[12] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})

@ Base ./essentials.jl:716

[13] invokelatest(::Any, ::Any, ::Vararg{Any})

@ Base ./essentials.jl:714

[14] compute(m::Module, computer::PlutoRunner.Computer)

@ PlutoRunner ~/.julia/packages/Pluto/6smog/src/runner/PlutoRunner/src/evaluation/run_expression.jl:85

[15] (::PlutoRunner.var"#34#37"{Module})()

@ PlutoRunner ~/.julia/packages/Pluto/6smog/src/runner/PlutoRunner/src/evaluation/run_expression.jl:261

[16] run_inside_trycatch(m::Module, f::PlutoRunner.var"#34#37"{Module})

@ PlutoRunner ~/.julia/packages/Pluto/6smog/src/runner/PlutoRunner/src/evaluation/run_expression.jl:125

[17] (::PlutoRunner.var"#32#35"{Bool, Module, Expr, Base.UUID, Base.UUID, Tuple{Set{Symbol}, Set{Symbol}}, Nothing, UInt64, Expr})()

@ PlutoRunner ~/.julia/packages/Pluto/6smog/src/runner/PlutoRunner/src/evaluation/run_expression.jl:261

[18] with_io_to_logs(f::PlutoRunner.var"#32#35"{Bool, Module, Expr, Base.UUID, Base.UUID, Tuple{Set{Symbol}, Set{Symbol}}, Nothing, UInt64, Expr}; enabled::Bool, loglevel::Base.CoreLogging.LogLevel)

@ PlutoRunner ~/.julia/packages/Pluto/6smog/src/runner/PlutoRunner/src/io/stdout.jl:64

[19] (::PlutoRunner.var"#126#127"{Bool, Base.CoreLogging.LogLevel, PlutoRunner.var"#32#35"{Bool, Module, Expr, Base.UUID, Base.UUID, Tuple{Set{Symbol}, Set{Symbol}}, Nothing, UInt64, Expr}})()

@ PlutoRunner ~/.julia/packages/Pluto/6smog/src/runner/PlutoRunner/src/io/logging.jl:129

[20] with_logstate(f::Function, logstate::Any)

@ Base.CoreLogging ./logging.jl:511

[21] with_logger

@ ./logging.jl:623 [inlined]

[22] #with_logger_and_io_to_logs#125

@ ~/.julia/packages/Pluto/6smog/src/runner/PlutoRunner/src/io/logging.jl:128 [inlined]

[23] run_expression(m::Module, expr::Expr, notebook_id::Base.UUID, cell_id::Base.UUID, function_wrapped_info::Union{Nothing, Tuple{Set{Symbol}, Set{Symbol}}}, forced_expr_id::Union{Nothing, UInt64}; user_requested_run::Bool, capture_stdout::Bool)

@ PlutoRunner ~/.julia/packages/Pluto/6smog/src/runner/PlutoRunner/src/evaluation/run_expression.jl:236

[24] top-level scope

@ ~/.julia/packages/Pluto/6smog/src/evaluation/WorkspaceManager.jl:439

[25] eval

@ ./boot.jl:373 [inlined]

[26] macro expansion

@ ~/.julia/packages/Malt/YJ2Ml/src/worker.jl:120 [inlined]

[27] (::var"#1#2"{Sockets.TCPSocket, UInt64, Bool, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, Tuple{Module, Expr}, typeof(Core.eval)})()

@ Main ./task.jl:429

Stack trace

Here is what happened, the most recent locations are first:

  1. #remotecall_fetch#158
  2. remotecall_fetch
  3. #remotecall_fetch#162
  4. remotecall_fetch
  5. remotecall_eval(m::Module, pid::Int64, ex::Expr)
  6. Distributed.remotecall_eval(Main, 1, :(Pluto.PLUTO_VERSION))
Distributed.remotecall_eval(Main, 1, :(Pluto.PLUTO_VERSION))
👀 Reading hidden code
---
[1] |> Base.nfields, w|> Base.sizeof
👀 Reading hidden code
154 μs
👀 Reading hidden code
31.8 ms
👀 Reading hidden code
158 ms
missing
p
👀 Reading hidden code
10.4 μs
Dict(:a => 1, :b => ["hoi", "merlino"])
👀 Reading hidden code
31.4 μs
good_boys = Dict(:title => md"# Hello world", :img => i) #:names => ["Hannes", "Floep"]
👀 Reading hidden code
97.2 ms
m=md"asasdf $x+1$ asdfasdf".content
👀 Reading hidden code
3.3 ms
"183-element Vector{Any}:\n   1\n    [2, 3, 4]\n 620\n 621\n 622\n 623\n 624\n 625\n 626\n 627\n 628\n 629\n 630\n 631\n 632\n 633\n 634\n 635\n 636\n 637\n 638\n 639\n 640\n 641\n 642\n 643\n 644\n 645\n 646\n 647\n 648\n 649\n 650\n 651\n 652\n 653\n 654\n 655\n 656\n 657\n 658\n 659\n 660\n 661\n 662\n 663\n 664\n 665\n 666\n 6" ⋯ 369 bytes ⋯ "741\n 742\n 743\n 744\n 745\n 746\n 747\n 748\n 749\n 750\n 751\n 752\n 753\n 754\n 755\n 756\n 757\n 758\n 759\n 760\n 761\n 762\n 763\n 764\n 765\n 766\n 767\n 768\n 769\n 770\n 771\n 772\n 773\n 774\n 775\n 776\n 777\n 778\n 779\n 780\n 781\n 782\n 783\n 784\n 785\n 786\n 787\n 788\n 789\n 790\n 791\n 792\n 793\n 794\n 795\n 796\n 797\n 798\n 799\n 800"
sprint(Markdown.tohtml, x)
👀 Reading hidden code
328 ms

A 123 D

md"A $([1,2,3]) D"
👀 Reading hidden code
268 μs
#=begin
import Markdown: html, htmlinline, Paragraph, withtag, tohtml
function html(io::IO, md::Paragraph)
withtag(io, :p) do
for x in md.content
htmlinline(io, x)
end
end
end
htmlinline(io::IO, content::Vector) = tohtml(io, content)
end=#
👀 Reading hidden code
8.9 μs
2
begin
1
2
end
👀 Reading hidden code
14.6 μs

asdf Dict{Symbol, Markdown.MD} with 2 entries: :title => # Hello world :img => ![asdf](https://fonsp.com/img/doggoSmall.jpg?raw=true) asd

md"asdf $(good_boys) asd"
👀 Reading hidden code
269 μs
"<div class=\"markdown\"><p>asdf Dict&#123;Symbol, Markdown.MD&#125; with 2 entries:\n  :title &#61;&gt; # Hello world\n\n  :img &#61;&gt; &#33;&#91;asdf&#93;&#40;https://fonsp.com/img/doggoSmall.jpg?raw&#61;true&#41;\n asd</p>\n</div>"
repr(MIME"text/html"(), md"asdf $(good_boys) asd")
👀 Reading hidden code
40.5 ms
#=begin
import Markdown: html, tohtml, withtag
function tohtml(io::IO, m::MIME"text/html", x)
withtag(io, :DIV) do
show(io, m, x)
end
end
end=#
👀 Reading hidden code
10.2 μs
occursin.(["a"], ["aa", "bb"])
👀 Reading hidden code
97.9 ms
1.0
sqrt(1...)
👀 Reading hidden code
6.4 ms

asdf

md"asdf "
👀 Reading hidden code
200 μs
x
👀 Reading hidden code
8.8 μs
Dict([i =>i for i in 1:100])
👀 Reading hidden code
71.7 ms
false
Vector{UInt8}() isa String
👀 Reading hidden code
1.4 ms
Base.OneTo(9)
👀 Reading hidden code
3.9 ms

asdf

i = md"![asdf](https://fonsp.com/img/doggoSmall.jpg?raw=true)"
👀 Reading hidden code
29.6 ms

asdf 1234620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800 asdf

md"asdf $(x) asdf"
👀 Reading hidden code
256 μs

asdf Main.workspace#3.Derp(1, 2) asdf

md"asdf $(d) asdf"
👀 Reading hidden code
257 μs
md"I like [_dogs_](dogs.org) **and** cats!".content
👀 Reading hidden code
346 μs





















👀 Reading hidden code
137 μs
ENV
👀 Reading hidden code
10.6 μs
zip([1,2],[3,4]) |> collect
👀 Reading hidden code
60.3 ms
#=begin
import Base: show
function show_richest_textmime(io::IO, x::Any)
if showable(MIME("text/html"), x)
show(io, MIME("text/html"), x)
else
show(io, MIME("text/plain"), x)
end
end
function show_array_row(io::IO, pair::Tuple)
i, el = pair
print(io, "<r><i>", i, "</i><e>")
show_richest_textmime(io, el)
print(io, "</e></r>")
end
function show_dict_row(io::IO, pair::Pair)
k, el = pair
print(io, "<r><k>")
show_richest_textmime(io, k)
print(io, "</k><e>")
show_richest_textmime(io, el)
print(io, "</e></r>")
end
function show(io::IO, ::MIME"text/html", x::Array{<:Any, 1})
print(io, """<jltree class="collapsed" onclick="onjltreeclick(this, event)">""")
print(io, eltype(x))
print(io, "<jlarray>")
if length(x) <= tree_display_limit
show_array_row.([io], enumerate(x))
else
show_array_row.([io], enumerate(x[1:tree_display_limit]))
print(io, "<r><more></more></r>")
from_end = tree_display_limit > 20 ? 10 : 1
indices = 1+length(x)-from_end:length(x)
show_array_row.([io], zip(indices, x[indices]))
end
print(io, "</jlarray>")
print(io, "</jltree>")
end
function show(io::IO, ::MIME"text/html", x::Dict{<:Any, <:Any})
print(io, """<jltree class="collapsed" onclick="onjltreeclick(this, event)">""")
print(io, "Dict")
print(io, "<jldict>")
row_index = 1
for pair in x
show_dict_row(io, pair)
if row_index == tree_display_limit
print(io, "<r><more></more></r>")
break
end
row_index += 1
end
print(io, "</jldict>")
print(io, "</jltree>")
end
end=#
👀 Reading hidden code
10.4 μs
Error message

MethodError: no method matching lastindex(::Dict{Symbol, Markdown.MD})

Closest candidates are:

lastindex(::Any, ::Any) at /opt/hostedtoolcache/julia/1.7.3/x64/share/julia/base/abstractarray.jl:373

lastindex(::Tuple) at /opt/hostedtoolcache/julia/1.7.3/x64/share/julia/base/tuple.jl:26

lastindex(::Pair) at /opt/hostedtoolcache/julia/1.7.3/x64/share/julia/base/pair.jl:51

...

Stack trace

Here is what happened, the most recent locations are first:

  1. good_boys[1:end]
good_boys[1:end]
👀 Reading hidden code
---

a

👀 Reading hidden code
188 μs
3×3 Matrix{Float64}:
 0.810425  0.782914  0.812908
 0.522199  0.458255  0.366877
 0.264788  0.872928  0.94607
rand(Float64, (3,3))
👀 Reading hidden code
43.8 ms

The Basel problem

Leonard Euler proved in 1741 that the series

11+14+19+

converges to

π26

md"# The Basel problem

_Leonard Euler_ proved in 1741 that the series

$$\frac{1}{1} + \frac{1}{4} + \frac{1}{9} + \cdots$$

converges to

$$\frac{\pi^2}{6}$$"
👀 Reading hidden code
319 μs

The Basel problem

Leonard Euler proved in 1741 that the series

11+14+19+

converges to

π26

md"# The Basel problem

_Leonard Euler_ proved in 1741 that the series

$$\frac{1}{1} + \frac{1}{4} + \frac{1}{9} + \cdots$$

converges to

$$\frac{\pi^2}{6}$$"
👀 Reading hidden code
297 μs
3.04936163598207
sqrt(sum(seq) * 6.0)
👀 Reading hidden code
21.1 μs
IOContext(Base.PipeEndpoint(RawFD(4294967295) closed, 0 bytes waiting))
ctx = IOContext(stdout)
👀 Reading hidden code
16.7 μs
Error message

UndefVarError: iocontext not defined

Stack trace

Here is what happened, the most recent locations are first:

  1. getproperty
    from Base.jl:35
  2. get(PlutoRunner.iocontext, :module, @__MODULE__)
get(PlutoRunner.iocontext, :module, @__MODULE__)
👀 Reading hidden code
---
mutable struct Derp
left
right
end
👀 Reading hidden code
847 μs
ENV
👀 Reading hidden code
9.5 μs
(a=12,b=:a)
👀 Reading hidden code
14.0 μs
Error message

UndefVarError: sprint_withreturned not defined

Stack trace

Here is what happened, the most recent locations are first:

  1. getproperty
    from Base.jl:35
  2. PlutoRunner.sprint_withreturned(PlutoRunner.show_richest, "a")
uhmmmmmm??!
PlutoRunner.sprint_withreturned(PlutoRunner.show_richest, "a")
👀 Reading hidden code
---
Error message

UndefVarError: sprint_withreturned not defined

Stack trace

Here is what happened, the most recent locations are first:

  1. getproperty
    from Base.jl:35
  2. PlutoRunner.sprint_withreturned(PlutoRunner.show_richest, "a")
C'est la vie !
PlutoRunner.sprint_withreturned(PlutoRunner.show_richest, "a")
👀 Reading hidden code
---
"\"a\""
sprint(PlutoRunner.show_richest, "a")
👀 Reading hidden code
54.2 ms
"\"a\""
sprint(PlutoRunner.show_richest, "a")
👀 Reading hidden code
120 μs
Error message

UndefVarError: sprint_withreturned not defined

Stack trace

Here is what happened, the most recent locations are first:

  1. getproperty
    from Base.jl:35
  2. PlutoRunner.sprint_withreturned(show, MIME"text/plain"(), "a")
Silly computer!
PlutoRunner.sprint_withreturned(show, MIME"text/plain"(), "a")
👀 Reading hidden code
---
Error message

UndefVarError: sprint_withreturned not defined

Stack trace

Here is what happened, the most recent locations are first:

  1. getproperty
    from Base.jl:35
  2. PlutoRunner.sprint_withreturned(show, MIME"text/plain"(), "a")
PlutoRunner.sprint_withreturned(show, MIME"text/plain"(), "a")
👀 Reading hidden code
---
"\"a\""
sprint(show, MIME"text/plain"(), "a")
👀 Reading hidden code
55.8 μs
true
istextmime(MIME"text/plain"())
👀 Reading hidden code
36.3 μs
"a"
"a"
👀 Reading hidden code
8.9 μs
MIME type text/plain
mime = MIME"text/plain"()
👀 Reading hidden code
61.0 μs
String
t = String
👀 Reading hidden code
14.1 μs
false
mime isa MIME"text/plain" &&
t isa DataType &&
which(show, (IO, MIME"text/plain", t)) === PlutoRunner.struct_showmethod_mime &&
which(show, (IO, t)) === PlutoRunner.struct_showmethod
👀 Reading hidden code
119 μs
show(io::IO, mime::MIME{Symbol("text/plain")}, str::AbstractString; limit) in Base at strings/io.jl:196
which(show, (IO, MIME"text/plain", String))
👀 Reading hidden code
73.3 μs
show_richest (generic function with 1 method)
f = PlutoRunner.show_richest
👀 Reading hidden code
16.1 μs
args = ["a"]
👀 Reading hidden code
16.4 μs
MIME type text/plain
first(filter(m->Base.invokelatest(showable, m, x), PlutoRunner.allmimes))
👀 Reading hidden code
76.0 ms
MIME type text/plain
first(filter(m->showable(m, x), PlutoRunner.allmimes))
👀 Reading hidden code
81.1 ms
12
findfirst(m->showable(m, x), PlutoRunner.allmimes)
👀 Reading hidden code
52.2 ms
xshowable (generic function with 1 method)
xshowable(m) = showable(m,x)
👀 Reading hidden code
374 μs
fr (generic function with 1 method)
function fr()
PlutoRunner.allmimes[findfirst(m->showable(m, x), PlutoRunner.allmimes)]
end
👀 Reading hidden code
832 μs
12
findnext(m->showable(m, x), PlutoRunner.allmimes, 1)
👀 Reading hidden code
46.4 ms
MIME type text/plain
fr()
👀 Reading hidden code
50.7 ms
[1 for i in 1:3]
👀 Reading hidden code
24.6 μs
collect(1:3)
👀 Reading hidden code
13.8 μs
12
let
x = [1,2,3]
findfirst(m->showable(m, x), PlutoRunner.allmimes)
end
👀 Reading hidden code
77.8 ms
MIME type text/plain
let
x = [1,2,3]
local mime
for m in PlutoRunner.allmimes
if showable(m,x)
mime = m
end
end
mime
end
👀 Reading hidden code
8.6 ms
Error message

UndefVarError: mmmm not defined

Stack trace

Here is what happened, the most recent locations are first:

  1. mmmm
mmmm
👀 Reading hidden code
---
# 15 methods for generic function findnext:
methods(findnext)
👀 Reading hidden code
64.6 μs
[showable(m,x) for m in PlutoRunner.allmimes]
👀 Reading hidden code
67.6 ms
[false for m in PlutoRunner.allmimes];
👀 Reading hidden code
16.4 ms
map(m -> m, PlutoRunner.allmimes);
👀 Reading hidden code
92.8 ms
true
showable(MIME"text/plain"(),x)
👀 Reading hidden code
76.7 μs
false
showable(MIME"image/gif"(),x)
👀 Reading hidden code
42.4 μs
false
showable(MIME"image/bmp"(),x)
👀 Reading hidden code
43.5 μs
false
showable(MIME"image/jpg"(),x)
👀 Reading hidden code
42.0 μs
false
showable(MIME"image/png"(),x)
👀 Reading hidden code
42.1 μs
false
showable(MIME"image/svg+xml"(),x)
👀 Reading hidden code
45.1 μs
false
showable(MIME"text/html"(),x)
👀 Reading hidden code
49.7 μs
false
showable(MIME"application/vnd.pluto.tree+xml"(),x)
👀 Reading hidden code
44.0 μs
if false
afsddfsadfsadfs
end
👀 Reading hidden code
139 μs
d = Derp(1,2)
👀 Reading hidden code
12.6 μs
x |> Tuple
👀 Reading hidden code
1.9 ms
typename(Derp)
tn = ((d |> typeof).name)
👀 Reading hidden code
92.5 μs
# 270 methods for generic function show:
methods(show)
👀 Reading hidden code
3.3 ms
let
a = Derp(nothing, nothing)
b = Derp(a, nothing)
a.left = b
a,b
end
👀 Reading hidden code
32.2 μs
1:10
👀 Reading hidden code
15.8 μs
seq = n .^ -2
👀 Reading hidden code
48.4 ms