do little things count? because i made a little th...
# share-your-work
e
do little things count? because i made a little thing. i'm not a big fan of using repls for messing around because i want to go back and redo things all the damn time. recently i caught myself opening a text editor and doing
watch -n1 some-script
in a separate window. so i went ahead and made a little (vim)script that does just that - it automatically reruns your code as you type. it's been pretty convenient for doing little bits of napkin math. https://mastodon.social/@Ezhik/112830950176229170 https://bsky.app/profile/ezhik.bsky.social/post/3kxv2cusodm27
❤️ 3
🍰 4
also also i'd love to hear about everyone's napkin math type scripts and apps, little fiddles and things like that :)
k
My go-to medium for such things is Emacs and its org-mode. You can put code snippets in org files and run (or re-run) them by typing Ctrl-C Ctrl-C. Perfect for little experiments, and works with dozens of languages.
b
See also entr for watching files & re-running arbitrary commands. P.S. Be a bit mindful of side effects incomplete code can have, may need some defensive habits... (One habit somebody taught me is only type
-rf
at the very end of
rm
commands, just in case I accidentally press Enter before I finished.)
🍰 3
e
definitely not writing any code with side effects in this but actually would be good to have some nicer safeguards beyond "don't do this"