What’s the best way to play with F# that feels natural for a Python programmer?
I really like having my screen split down the middle (tmux), with code on the left (“vim code/“) and program output on the right (“watch-exec code/ — python -mcode”).
Every time I change a file in code/, watch-exec runs the program again.
Doing this with dotnet run seems to take a full 2 to 4 seconds to run though, which seems pretty heavyweight. It’s obviously not the best way to interactively edit a file of code. What is?
Yes! Those couple of seconds wait-time are a big bummer for that style of fast-feedback coding (for which there is the built-in `dotnet watch run` by the way).
Made me sad when I was playing around with generative art, where you would really want to see the result of your changes in a split-second.
You can check out ".NET Interactive Notebooks" in VSCode, that executes much faster, but it doesn't do this live watch.
Yeah I think 'dotnet fsi {fileName}' with a script file works. Also Ionide with VS Code using Alt+Enter (similar to other language VS Code repl's) inside a *.fsx script file to run the highlighted code in a F# REPL. F# Interactive has doco online as well that isn't that long but covers most things (single commands, script files, loading packages, etc).
I really like having my screen split down the middle (tmux), with code on the left (“vim code/“) and program output on the right (“watch-exec code/ — python -mcode”).
Every time I change a file in code/, watch-exec runs the program again.
Doing this with dotnet run seems to take a full 2 to 4 seconds to run though, which seems pretty heavyweight. It’s obviously not the best way to interactively edit a file of code. What is?