Pluto noobie questions

How does one hide cell output of the cell in Pluto? Putting ; at the end of the line does not seem to work.
Also, when I have created a notebook for the first time and a ran a cell with using, Pluto initiated system-wide package update. Is it going to happen for every notebook I create. How do I suppress it?

Could you show how ; isnā€™t working? This is what I see:

(first cell without ; produces an output, second line with ; doesnā€™t)

Also what do you mean by ā€œsystem-wide package updateā€? Pluto by default uses its own package management system, which creates a notebook-specific environment that packages get added to when you do using. You can read more about it here:

It also discusses how you ā€œsuppressā€ this feature, if thatā€™s what youā€™re after:

Any notebook that calls Pkg.activate will not use Plutoā€™s package management, and run in ā€˜backwards compatibility modeā€™. The Pkg.activate call should be placed directly in your notebook code: it is detecting using the same syntax analysis used for reactivity.

Thanks for quick response. I did load some data from a file:

begin
sdata14 = load("scors14.jld2");
Jvals14, Ī³vals14, Ī”Īµs14, szcorss14 = sdata14["Jvals"], sdata14["Ī³vals"], sdata14["Ī”Īµs"], sdata14["szcorss"];
end

And then it has shown the tuple in the last line. (It is very large, so I donā€™t show it here). Should I put ā€œ;ā€ after end?

I am also trying to use Interact together with Plots inside the pluto notebook, however I get

Failed to show value:
Invalid dependency (must be a url, file, or AssetRegistry path): /home/grigorii/.julia/packages/InteractBase/h8Fwe/src/ā€¦/assets/all.js

Looks like putting ā€œ;ā€ after the hole begin end block worked. I still have a problem with Interact and Plots though.

1 Like

Why do you need Interact in Pluto? Pluto contains its own set of primitives and it is interactive out of the box.

Yes the ; has to always be on the last line:

This isnā€™t Pluto specific though:

image

I donā€™t know. Iā€™ve run into some problems with the jupyter installed on my working computer and decided to give Pluto a try. Thought it should work similar to jupyter.

If you say I donā€™t need to use Interact, could you send me the link to the place in the docs where Pluto-s counterpart of Interact is discussed?

Now I have the following problem: I load some file with the code using using Revise and includet("name_of_file.jl"). The file contains its own using Pkgs line, and I have a problem with one of the packages used by the file:

ERROR: ArgumentError: Package StaticArrays not found in current path:

  • Run import Pkg; Pkg.add("StaticArrays") to install the StaticArrays package.

If I try to run this line, Pluto says it will disable the internal package management.
So, Iā€™ve opened a new REPL instance and ran

import Pluto
Pluto.activate_notebook_environment("pluto_notebook.jl")
] add StaticArrays

where ā€œpluto_notebook.jlā€ is the name of my pluto notebook I am playing around with.
Nothing happened. I even tried to stop Pluto and start it again, however I still get an error that StaticArrays are not installed. (Although it is installed in my global environment.)

1 Like

If you have a larger project where you use pluto as a frontend, consider setting up an environment outside of the Pluto notebook which you activate in the first Pluto cell.

I wrote up some ideas on this here.

1 Like

Check out PlutoUI.jl.