-
-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Fons van der Plas <[email protected]>
- Loading branch information
1 parent
9f560b1
commit 61951fa
Showing
7 changed files
with
97 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,6 @@ frontend/dist | |
.net | ||
net | ||
frontend/package-lock.json | ||
|
||
# PProf | ||
profile.pb.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
using SnoopPrecompile: SnoopPrecompile | ||
|
||
const __TEST_NOTEBOOK_ID = uuid1() | ||
|
||
SnoopPrecompile.@precompile_all_calls begin | ||
let | ||
channel = Channel{Any}(10) | ||
Pluto.PlutoRunner.setup_plutologger( | ||
__TEST_NOTEBOOK_ID, | ||
channel, | ||
) | ||
end | ||
expr = Expr(:toplevel, :(1 + 1)) | ||
Pluto.PlutoRunner.run_expression(Module(), expr, __TEST_NOTEBOOK_ID, uuid1(), nothing); | ||
|
||
nb = Pluto.Notebook([ | ||
Pluto.Cell("""md"Hello *world*" """) | ||
Pluto.Cell("""[f(x)]""") | ||
Pluto.Cell("""x = 1""") | ||
Pluto.Cell( | ||
""" | ||
function f(z::Integer) | ||
z / 123 | ||
end | ||
""") | ||
Pluto.Cell( | ||
""" | ||
"asdf" | ||
begin | ||
while false | ||
local p = 123 | ||
try | ||
[(x,a...) for x in (a for a in b)] | ||
A.B.hello() do z | ||
@gensym z | ||
(z) -> z/:(z / z) | ||
end | ||
catch | ||
end | ||
end | ||
end | ||
""" | ||
) | ||
]) | ||
let | ||
topology = Pluto.updated_topology(nb.topology, nb, nb.cells) | ||
# Our reactive sorting algorithm. | ||
Pluto.topological_order(topology, topology.cell_order) | ||
end | ||
|
||
let | ||
io = IOBuffer() | ||
# Notebook file format. | ||
Pluto.save_notebook(io, nb) | ||
seekstart(io) | ||
Pluto.load_notebook_nobackup(io, "whatever.jl") | ||
end | ||
|
||
let | ||
state1 = Pluto.notebook_to_js(nb) | ||
state2 = Pluto.notebook_to_js(nb) | ||
# MsgPack | ||
Pluto.unpack(Pluto.pack(state1)) | ||
# State diffing | ||
Pluto.Firebasey.diff(state1, state2) | ||
end | ||
|
||
s = Pluto.ServerSession(; | ||
options=Pluto.Configuration.from_flat_kwargs( | ||
disable_writing_notebook_files=true, | ||
workspace_use_distributed=false, | ||
auto_reload_from_file=false, | ||
run_notebook_on_load=false, | ||
lazy_workspace_creation=true, | ||
capture_stdout=false, | ||
) | ||
) | ||
end | ||
|
||
using PrecompileSignatures: @precompile_signatures | ||
@precompile_signatures(Pluto) |