Textbook implementations of ML algorithms in Julia using Optim.jl