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
julia> tryprint.(f[1].kwargs[:oldexprs]) | |
call | |
Base.Docs.doc! | |
Libdl | |
call | |
Base.Docs.Binding | |
Libdl | |
:RTLD_NODELETE | |
call |
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
julia> f = filter(r->r.message=="Diff" && (!isempty(r.kwargs[:newexprs]) || !isempty(r.kwargs[:oldexprs])), rlogger.logs); | |
julia> for i in f | |
println(f) | |
end | |
Test.LogRecord[LogRecord(Debug, "Diff", Revise, "Parsing", :Revise_67b60225, "C:\\Users\\Basti\\.julia\\dev\\Revise\\src\\Revise.jl", 212, Base.Iterators.Pairs{Symbol,Any,Tuple{Symbol,Symbol,Symbol},NamedTuple{(:activemodule, :newexprs, :oldexprs),Tuple{Module,Set{Revise.RelocatableExpr},Set{Revise.RelocatableExpr}}}}(:activemodule=>LibGit2,:newexprs=>Set(Revise.RelocatableExpr[:(function clone(repo_url::AbstractString, repo_path::AbstractString; branch::AbstractString="", isbare::Bool=false, remote_cb::Ptr{Cvoid}=C_NULL, credentials::Creds=nothing, callbacks::Callbacks=Callbacks()) | |
cred_payload = reset!(CredentialPayload(credentials)) | |
if !(haskey(callbacks, :credentials)) | |
callbacks[:credentials] = (credentials_cb(), cred_payload) | |
elseif haskey(callbacks, :credentials) && credentials !== nothing |
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
julia> filter(r->r.level==Base.CoreLogging.Debug && r._module==Revise, rlogger.logs) | |
522-element Array{Test.LogRecord,1}: | |
Test.LogRecord(Debug, "Recipe for Base", Revise, "Watching", :Revise_61343d83, "C:\\Users\\Basti\\.julia\\dev\\Revise\\src\\recipes.jl", 25, Base.Iterators.Pairs{Symbol,Any,Tuple{Symbol,Symbol,Symbol},NamedTuple{(:filename, :mtime, :mtimeref),Tuple{String,Float64,Float64}}}(:filename=>"D:\\Programme\\Julia-1.0.0\\share\\julia\\base\\traits.jl",:mtime=>1.53377e9,:mtimeref=>1.53377e9)) | |
Test.LogRecord(Debug, "Recipe for Base", Revise, "Watching", :Revise_61343d84, "C:\\Users\\Basti\\.julia\\dev\\Revise\\src\\recipes.jl", 25, Base.Iterators.Pairs{Symbol,Any,Tuple{Symbol,Symbol,Symbol},NamedTuple{(:filename, :mtime, :mtimeref),Tuple{String,Float64,Float64}}}(:filename=>"D:\\Programme\\Julia-1.0.0\\share\\julia\\base\\array.jl",:mtime=>1.53469e9,:mtimeref=>1.53377e9)) | |
Test.LogRecord(Debug, "Recipe for Base", Revise, "Watching", :Revise_61343d85, "C:\\Users\\Basti\\.julia\\dev\\Revise\\src\\re |
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
julia> logs = filter(r->r.level==Debug && r._module==Revise, rlogger.logs); | |
julia> logs | |
1357-element Array{Test.LogRecord,1}: | |
Test.LogRecord(Debug, "Recipe for Base", Revise, "Watching", :Revise_61343d83, "C:\\Users\\Basti\\.julia\\dev\\Revise\\src\\recipes.jl", 25, Base.Iterators.Pairs{Symbol,Any,Tuple{Symbol,Symbol,Symbol},NamedTuple{(:filename, :mtime, :mtimeref),Tuple{String,Float64,Float64}}}(:filename=>"D:\\Programme\\Julia-1.0.0\\share\\julia\\base\\traits.jl",:mtime=>1.53377e9,:mtimeref=>1.53377e9)) | |
Test.LogRecord(Debug, "Recipe for Base", Revise, "Watching", :Revise_61343d84, "C:\\Users\\Basti\\.julia\\dev\\Revise\\src\\recipes.jl", 25, Base.Iterators.Pairs{Symbol,Any,Tuple{Symbol,Symbol,Symbol},NamedTuple{(:filename, :mtime, :mtimeref),Tuple{String,Float64,Float64}}}(:filename=>"D:\\Programme\\Julia-1.0.0\\share\\julia\\base\\array.jl",:mtime=>1.53469e9,:mtimeref=>1.53377e9)) | |
Test.LogRecord(Debug, "Recipe for Base", Revise, "Watching", :Revise_61343d85, "C:\\Users\\Basti\\.julia\\dev\\Revise\\sr |
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
Revise.Diff('+', (Markdown, :(#5#f = begin | |
function hashheader(stream::IO, md::MD) | |
withstream(stream) do | |
eatindent(stream) || return false | |
level = 0 | |
while startswith(stream, '#') | |
level += 1 | |
end | |
(level < 1 || level > 6) && return false | |
c = ' ' |
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
module MockPlotting | |
struct SimplePlot end | |
struct InteractivePlot end | |
const img = """ | |
/9j/2wCEAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDIBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAY8BkAMBIgACEQEDEQH/xAGiAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgsQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+gEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoLEQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2gAMAwEAAhEDEQA/AOuBpQeaYDTs1BY8GlzTAaXNAxwPvS5pgNOzQA+jNMz70v40CuOFITg0ZphPNMBwb86cDUY5NPHSkAuaKSlpjsKBSEYpaCKBDT0ptPNNNIY09KaadSGgBppppSKaaBid6UGm0tADwaBTRS5oAcDzSi |
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
# paste into your coffee.init | |
atom.commands.add 'atom-text-editor', 'Toggle #\'', (e) => | |
ed = atom.workspace.getActiveTextEditor() | |
sels = ed.getSelections() | |
buffer = ed.getBuffer() | |
lines = buffer.getLines() | |
for sel in sels | |
isOn = true | |
preIndents = [] |
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
julia> function async_eval(code) | |
sleep(2) | |
# hide prompt | |
print(stdout, "\e[1K\r") | |
# write code | |
printstyled(stdout, "julia> ", bold = true, color=:green) | |
print(stdout, code) | |
# eval code | |
println(stdout) |
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
function didWriteToREPL(f) | |
origout = STDOUT | |
rout, wout = redirect_stdout() | |
didWrite = false | |
t = @async begin | |
r = "" | |
didWriteLinebreak = false | |
while isopen(rout) |
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
~/Documents/julia master j6 ✓ 19:55:43 | |
_ | |
_ _ _(_)_ | A fresh approach to technical computing | |
(_) | (_) (_) | Documentation: https://docs.julialang.org | |
_ _ _| |_ __ _ | Type "?help" for help. | |
| | | | | | |/ _` | | | |
| | |_| | | | (_| | | Version 0.6.1-pre.unknown (2017-10-07 01:18 UTC) | |
_/ |\__'_|_|_|\__'_| | Commit 389b23c* (3 days old release-0.6) | |
|__/ | x86_64-redhat-linux |