I've been dinking around learning Julia, and by way of procrastination I have begun the usual process of setting up an environment in which to do it. Who says men aren't nestbuilders?
I want something to combine notes and code in a literate programming style. There is comment lines, of course, but what if I want to include something with more heft, such as
For that, there's an IDE like RStudio or VSCode plus RMarkdown or Quarto. Or just settle for lightly formatted text and code with jupyter or pluto. But I was having trouble finding the sweet spot. For one thing, CLI and REPL work helps avoid the sin of Premature PrettyPrinting where it's hard to resist seeing how the output is going to look. Back when we passed paper back and forth instead of texts whole forests were felled in aid of printing out documents with each new paragraph just to check if the page breaks have changed. We never do get over kindergarden.
Enter Franklin.jl a Julia static web site generator toolchain that allows interpersing code blocks with markdown text to produce HTML that will display and execute the code blocks, including plots. Just like
using LinearAlgebra, Random
Random.seed!(555)
a = randn(5)
round(norm(a), sigdigits=4)
And the following text line
\show{snippet1}
will cause the return from the code block to be printed.
So, with lvim
(nvim
with a lot of scruff hidden out of sight) on half the screen and a Julia REPL on the other half, I can go type, type julia >
.
If I get the DTs, I can always regenerate the page and fire up the server or maybe it has a watch()
daemon I haven't discovered yet.
Think I'll like it.