This file contains hidden or 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
| call plug#begin('~/.config/nvim/plugged') | |
| Plug 'JuliaEditorSupport/julia-vim' | |
| Plug 'autozimu/LanguageClient-neovim', {'branch': 'next', 'do': 'bash install.sh'} | |
| Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } | |
| call plug#end() | |
| let g:deoplete#enable_at_startup = 1 | |
| " julia | |
| let g:default_julia_version = '1.0' |
This file contains hidden or 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
| [deps] | |
| CSTParser = "00ebfdb7-1f24-5e51-bd34-a7502290713f" | |
| DocumentFormat = "ffa9a821-9c82-50df-894e-fbcef3ed31cd" | |
| LanguageServer = "2b0e0bc5-e4fd-59b4-8912-456d1b03d8d7" | |
| StaticLint = "b3cc710f-9c33-5bdb-a03d-a94903873e97" | |
| SymbolServer = "4cc854a7-cf14-540f-aa0e-47853c5fab2f" |
This file contains hidden or 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
| # adapted from https://github.com/ArchieCall/AccurateSleep/blob/master/src/hybrid_sleep.jl | |
| function sleep_ns(sleep_time::Float64, threshold::Float64 = 0.001) | |
| tics_per_sec = 1_000_000_000.0 | |
| nano1 = time_ns() | |
| nano2 = nano1 + (sleep_time * tics_per_sec) | |
| min_true_sleep = 0.001 | |
| # normal sleep | |
| if sleep_time > threshold | |
| actual_sleep_time = max(min_true_sleep, sleep_time - threshold) |
This file contains hidden or 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
| module TraceCalls | |
| using Cassette | |
| mutable struct Trace | |
| level::Int | |
| cutoff::Int | |
| end | |
| Cassette.@context TraceCtx |
This file contains hidden or 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) |
This file contains hidden or 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
| # put this in your startup.jl | |
| using InteractiveUtils | |
| let | |
| tmuxsession = nothing | |
| sessions = split(String(read(`tmux list-panes -a -F '#{pane_tty} #{session_name}'`)), '\n') | |
| io = IOBuffer() | |
| run(pipeline(`tty`, stdout=io)) | |
| tty = chomp(String(take!(io))) | |
| for session in sessions | |
| if occursin(tty, session) |
This file contains hidden or 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
| julia> using Revise, JuliaInterpreter, CodeTracking | |
| julia> bps=breakpoint(min); | |
| ^[[B | |
| julia> bps[1].framecode.scope | |
| min(x::BigFloat, y::BigFloat) in Base.MPFR at mpfr.jl:693 | |
| julia> whereis(bps[1].framecode.scope) | |
| [ Info: tracking Base | |
| ┌ Warning: error evaluating in module Base.MPFR: for (fJ, fC) = ((:si, :Clong), (:ui, :Culong)) |
This file contains hidden or 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
| using REPL | |
| using REPL.LineEdit | |
| macro keyboard() | |
| quote | |
| debugprompt(@__MODULE__, Base.@locals) | |
| println() | |
| end | |
| end |
This file contains hidden or 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
| MbedTLS on jq/1.2 | |
| λ rm -rf ./deps/usr | |
| MbedTLS on jq/1.2 | |
| λ julia -e 'using Pkg; Pkg.build("MbedTLS")' | |
| Building MbedTLS → `~/.julia/dev/MbedTLS/deps/build.log` | |
| Resolving package versions... | |
| MbedTLS on jq/1.2 | |
| λ ls -l ./deps/usr/lib |
This file contains hidden or 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
| PackageCompiler on pathfix [?] | |
| λ j1 juliac.jl -vasji `pwd`/hello.jl | |
| Julia program file: | |
| "/home/pfitzseb/.julia/dev/PackageCompiler/hello.jl" | |
| Build directory: | |
| "/home/pfitzseb/.julia/dev/PackageCompiler/builddir" | |
| Build static library "hello.a": | |
| atexit_hook_copy = copy(Base.atexit_hooks) # make backup | |
| # clean state so that any package we use can carelessly call atexit |