Created
February 12, 2019 19:32
-
-
Save pfitzseb/3ce6151d0507c3061ce164838c6577ab to your computer and use it in GitHub Desktop.
Juno Demo
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
# Juno | |
# http://junolab.org/ | |
# http://docs.junolab.org/latest/man/installation.html | |
## Inline Evaluation | |
1+1 | |
println(2+2) | |
rand(3) | |
structure(:(f(x,y))) | |
# important: Evaluation is module-aware (see lower right corner for currently active module) | |
## Cell Evaluation | |
println("Cell 1") | |
x = 1+1 | |
x^2 | |
## Smart backtraces | |
f(x, y) = g(x, y) | |
g(x, y) = x//y | |
f(0, 0) | |
## (Reasonably) smart autocompletions (IntelliSense-like) | |
""" | |
method 1 | |
""" | |
foo(x::Int) = x | |
""" | |
method 2 | |
""" | |
foo(x::Int, y::Float64) = x*y | |
foo() # return type, method completions etc: | |
show() | |
## Documentation, Go To Definition | |
show # Ctrl-J Ctrl-D, Ctrl-J Ctrl-G | |
## Profiling | |
function myfunc() | |
A = rand(200, 200, 400) | |
maximum(A) | |
end | |
myfunc() | |
@profiler myfunc() | |
## Stepping into functions (with https://github.com/JuliaDebug/ASTInterpreter2.jl): | |
@enter gcd(2, 3) | |
## Performance linting with Traceur.jl (https://github.com/JunoLab/Traceur.jl) | |
function naive_sum(xs) | |
s = 0.0 | |
for x in xs | |
s += x | |
end | |
return s | |
end | |
Atom.@trace naive_sum(rand(3)) | |
## Integrated Plot Pane | |
using Plots | |
plot(rand(300)) | |
# Other goodies: | |
# - Completly functiousing Atom; using Juno; Juno.connect(43239)nal REPL | |
# - Can open arbitrary terminals in Juno (with search) | |
# - Remote Connection built in | |
# - Loads of settings for customization | |
# - REPLTreeViews.jl | |
# - Weave integration | |
## Questions? | |
# Why not LSP-backed? | |
# Multi-Monitor setups? | |
# Autoformatter/code beautifier? | |
using JSON | |
json"{a:1}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment