Re:OCaml's Wings for Machine Learning
by nathan_compton on Wednesday April 30, 2025 @01:16PM
(#43848183)
I hate em. They make people write bad code and using them for interactive development is much worse than using a REPL. I cannot understand what people see in them.
[ Parent
| on HN ]
My workflow is to keep the notebook as thin as possible, and concise enough to fit in my brain. I explore the problem space and write some functions and data structures directly in the notebook, but as soon as I can, I refactor them into separate modules that I then import.
If I don’t, the notebook quickly becomes bloated, I start getting paranoid about stale cells and lose track of what I'm actually trying to do.
Ideally the notebook’s sole purpose is interactivity, as kind of a quick-and-dirty frontend when it's not worth it to write an actual frontend, everything infrastructural gets moved out.
I use my IDE when I care about the production code, but I prefer notebooks when I’m just using code to understand data through visualization and statistics.
It drives me nuts that some people see this as «either or».
Linqpad is another and different take on data-driven environments. As is various «SQL admin» alternatives.
Re:OCaml's Wings for Machine Learning
by nathan_compton on Wednesday April 30, 2025 @06:22PM
(#43851365)
I love my fellow humans and do not begrudge you the workflow that you feel works for you.
Re:OCaml's Wings for Machine Learning
by patagurbon on Wednesday April 30, 2025 @01:26PM
(#43848306)
They’re great for teaching. But I agree for actual work.
You can write great code in notebooks; it all depends on you. Eg if you use vscode and not the browser for jupyter notebooks, you will have the same type checking and formatting as in the editor itself if you have it enabled.
For interactive development, repl is a joke. Sketching out a fully working prototype of a few hundred lines of code (possibly depending on some data and context you don't want to reload) is impossible in repl.