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 30 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
using Distributed
225 μs

Hold ctrl+enter:

👀 Reading hidden code
180 μs
Error message

UndefVarError: Pluto not defined

Stacktrace:

[1] eval

@ ./boot.jl:373 [inlined]

[2] #153

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

[3] 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

[4] #remotecall_fetch#158

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

[5] remotecall_fetch

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

[6] #remotecall_fetch#162

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

[7] remotecall_fetch

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

[8] 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

[9] ##function_wrapped_cell#298

@ ~/work/disorganised-mess/disorganised-mess/speedy.jl#==#fc643608-7d06-11ea-3ab7-8d15d24641ce:1 [inlined]

[10] var"##function_wrapped_cell#298"(Distributed::Module, Main::Module)

@ Main ./none:0

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

@ Base ./essentials.jl:716

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

@ Base ./essentials.jl:714

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

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

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

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

[15] 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

[16] (::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

[17] 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

[18] (::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

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

@ Base.CoreLogging ./logging.jl:511

[20] with_logger

@ ./logging.jl:623 [inlined]

[21] #with_logger_and_io_to_logs#125

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

[22] 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

[23] top-level scope

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

[24] eval

@ ./boot.jl:373 [inlined]

[25] macro expansion

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

[26] (::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, :(Main.Pluto.WorkspaceManager.moduleworkspace_count))
Keep calm, you got this!
Distributed.remotecall_eval(Main, 1, :(Main.Pluto.WorkspaceManager.moduleworkspace_count))
👀 Reading hidden code
---
Error message

UndefVarError: current_module not defined

Stack trace

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

  1. getproperty(x::Module, f::Symbol)
    from Base.jl:35
  2. const i = parse(Int64, string(Main.PlutoRunner.current_module)[15:end])
const i = parse(Int64, string(Main.PlutoRunner.current_module)[15:end])
👀 Reading hidden code
---

On 0.6.1: 30.0 new modules per second. Locked on framerate?

md"On `0.6.1`: **$(150/5)** new modules per second. Locked on framerate?"
👀 Reading hidden code
17.6 ms
1.4111883712180104
Distributed.remotecall_eval(Main, 1, :(sum([sin(j) for j in 1:10])))
👀 Reading hidden code
126 ms
1.4111883712180104
sum([sin(j) for j in 1:10])
👀 Reading hidden code
26.9 μs
Main.workspace#4.x
module x end
👀 Reading hidden code
1.2 ms
using Pluto
👀 Reading hidden code
3.7 s
Pluto.run(1235)
👀 Reading hidden code
Oopsie! This is the old command to launch Pluto. The new command is:

        Pluto.run()

    without the port as argument - it will choose one automatically. If you need to specify the port, use:

        Pluto.run(port=1235)
    
301 ms