Skip to content

Instantly share code, notes, and snippets.

View dawbarton's full-sized avatar

David Barton dawbarton

View GitHub Profile
using SoftGlobalScope
import REPL
const USE_REVISE = false
function replace_active_backend()
backend = Base.active_repl_backend
# Kill the existing REPL backend
put!(backend.repl_channel, (nothing, -1))
# Copied from REPL/src/REPL.jl: start_repl_backend
@dawbarton
dawbarton / cbc.jl
Created July 24, 2018 14:59
Flutter rig code
function predict(prevtarget::Vector{T}, s = 1.0) where T <: AbstractArray
secant = prevtarget[end] - prevtarget[end-1]
(prevtarget[end] + s*secant, secant)
end
function correct!(expt, target::AbstractVector)
correct!(expt, target, zeros(target))
end