Live data from Hacker News

Journaling using Nix, Vim and coreutils

tangled.sh

51–60 of 65 posts

Re: Journaling using Nix, Vim and coreutils

#51
post #42

Earlier quoted context omitted.

Deterministic but when the next gcc (or %insert_big_dependency%) update happens all your more obscure packages are broken for a couple of weeks.

Don't update immediately? Update immediately, but selectively? Nix offers many options here.

simply staying on stable channel makes this a non-problem :)

Besides, Nix is even better for such breakages. If GCC breaks you packages, the system does not build and never gets into broken state, all the while old system remains available and kicking.

Re: Journaling using Nix, Vim and coreutils

#52

I've been doing similar in org-mode for several years at this point, though I have returned to pen and paper now.

Org-mode gets immensely underrated, even though it's easily deserves the title of the best possible medium for note-taking. The degree it allows so much flexibility is astonishing, especially with Org-roam and similar alternatives - I no longer even need think how to organize my notes - I write something down, knowing that it never gets lost.

I've never found organizing notes purely by calendar dates to be ideal - I rarely think "didn't we discuss load testing with Bob sometime last October?" Instead, when I tag Bob and add a 'Load Testing' tag to my note, which automatically gets filed in Org-mode's date-tree outline, I can always find it - whether through Bob, 'Load Testing', or the date itself..

And because just like in the article - the notes are in plain text, it opens possibilities for easy syncing, version control & backup, and any other automations. Add to that a tons of other features like having executable source blocks where you can pipe data through, or pdf annotations, LaTeX embeddings, incredible LLM integration, spreadsheet-like calculations, publishing machinery, etc.. There's simply no better alternative - for me, if it ain't the pen&paper - it has to be in Org-mode. And I too, tried tons of different approaches before finding Org-mode.

If getting into Emacs and Org-mode feels too much for you right now, still, do yourself a favor, read this book - "How to take smart notes", ISBN-10: 1542866502.

Re: Journaling using Nix, Vim and coreutils

#53

So, I've been keeping a journal for 17 years, off and on. I don't know anyone else who does it my way, so here's my method. I made a dedicated email account just for the journal. I personally chose gmail but if you distrust google you could use any other provider including self-hosted. At the end of the day, or when I feel like it, I log in and email the account from itself with a message about whatever happened that…

I do a similar thing when I walk my dog. I have this primitive audio recorder app on my Android phone - the only requirement I had years ago when I found it was to be able to record directly into mp3 files, but that is no longer relevant. Anyway, I would just walk and talk into my phone. It records. I have collected numerous such recordings over the years, but they were pretty much useless. Until relatively recently. These days I have Resilio (for a stupid reason, not Syncthing, which is also a viable and perhaps better alternative) to sync my audio notes, and then I have a script with whisper.cpp hooked up. The script simply turns that into text - technically, it creates a subs file. Why subs file? With the .srt file I can not only grep through those notes, I can play them karaoke style in my editor - Emacs has subed mode that allows you do that. I can also easily hide timestamps and other metadata to focus purely on the text. I can correct wrong text recognitions, add my own comments, etc.

Re: Journaling using Nix, Vim and coreutils

#55
post #15

Earlier quoted context omitted.

Haven't tried in a while and haven't checked the documentation now but back then the method for installing packages in the docs was commented on like "yeah you're not supposed to do that". Features were in a perpetual "experimental" but not really state.

Regarding "not supposed to do that": the docs mention you can install packages with commands like "nix-env -iA ", using nix approximately the same way as apt or pacman. -- Trouble is, this is kindof a footgun. (e.g. it's a bad idea to run this command with sudo, even though you'd use sudo for equivalent commands). So, it's easier to just say "you're not supposed to do that".

Right . But it's a bunch of this. Another example is flakes. It was behind an experimental flag and was apparently what everybody was using already. There was only 3rd party documentation if I remember correctly. Twice I tried to use Nix and twice it kicked my ass. I never had this experience with any other unixy end-user software.

Re: Journaling using Nix, Vim and coreutils

#56
post #37

Nix always felt like an OS on the blockchain. It's fine if you value verifiability above everything, but becomes very burdensome if you find yourself tweaking your dev environment often. Still, I think it probably teaches good discipline.

I've gone full NixOS on my laptop and my gaming/homeserver desktop. I love it (even if there are parts I hate) and will never move to anything "less declarative". 100% no regrets. However, I only recommend it with the caveat that the practical benefits are not worth the time invested and it's only worth it as a fun hobby. I think an immutable desktop like Silverblue/Bazzite is really the sweet spot. Nix (non-OS) as a…

Gonna sound like a lunatic, but I have used AI agents to set up flake.nix for the following things:

- My basic nix-darwin and home-manager setup for my laptop

- Declarative tooling install for my clone of an open source Rust project

- LaTeX setup for my notes for a book club, including creating a nix package inside the flake to install the version of Garamond I wanted. Traditionally, installing LaTeX and non-free-fonts involves running a bunch of commands as root and praying. This is way better.

It took a lot of prodding and telling it things like "you'll know you did it right when `make all` works", but they all ended up working exactly how I wanted them to.

Re: Journaling using Nix, Vim and coreutils

#57

Earlier quoted context omitted.

Do you do any edits for previous days? Seems like it would be difficult with email.

You could theoretically reply to a previously sent letter from either your main or "journal" email to "update" an entry.

Yes, I have done that on occasion! No idea why this comment is flagged.

Re: Journaling using Nix, Vim and coreutils

#58

So, I've been keeping a journal for 17 years, off and on. I don't know anyone else who does it my way, so here's my method. I made a dedicated email account just for the journal. I personally chose gmail but if you distrust google you could use any other provider including self-hosted. At the end of the day, or when I feel like it, I log in and email the account from itself with a message about whatever happened that…

I’ve been journaling on and off since the early 2000s — but never for long. A few weeks in, I’d usually stop. Often because what I wrote felt too trivial to be worth it.

Then, while reading some productivity book, I stumbled on a trick: set the bar for success absurdly low. So low that even on my worst days I could still clear it.

Enter The One-Line Journal: the goal is to write just one single line each day. And, as it turns out, most days that first sentence is quickly followed by a few more — sometimes a lot more. I’ve been doing it almost every single day for 2.5 years now.

In the spirit of keeping the barrier low, I deliberately start with a blank slate each morning by creating a new file for that day. The fresh page lowers the threshold even further. Everything is done in Vim with this little alias:

oneline='printf "## $(date +"%Y") \n \n#" >> /path/to/folder/year/$( date +"%Y-%j-%b-%d" )_ol-jrnl.md && vim +$ /path/to/folder/year/$( date +"%Y-%j-%b-%d")_ol-jrnl.md'

Nothing fancy. Just works for me.

Re: Journaling using Nix, Vim and coreutils

#59

So, I've been keeping a journal for 17 years, off and on. I don't know anyone else who does it my way, so here's my method. I made a dedicated email account just for the journal. I personally chose gmail but if you distrust google you could use any other provider including self-hosted. At the end of the day, or when I feel like it, I log in and email the account from itself with a message about whatever happened that…

I’ve been journaling on and off since the early 2000s — but never for long. A few weeks in, I’d usually stop. Often because what I wrote felt too trivial to be worth it. Then, while reading some productivity book, I stumbled on a trick: set the bar for success absurdly low. So low that even on my worst days I could still clear it. Enter The One-Line Journal: the goal is to write just one single line each day. And, as…

I should do that more, the one-line thing. I figured out the "absurdly low bar" trick myself for a lot of other stuff in my life but I hadn't thought to apply it to this. Good suggestion!

Re: Journaling using Nix, Vim and coreutils

#60

Earlier quoted context omitted.

I’ve been journaling on and off since the early 2000s — but never for long. A few weeks in, I’d usually stop. Often because what I wrote felt too trivial to be worth it. Then, while reading some productivity book, I stumbled on a trick: set the bar for success absurdly low. So low that even on my worst days I could still clear it. Enter The One-Line Journal: the goal is to write just one single line each day. And, as…

I should do that more, the one-line thing. I figured out the "absurdly low bar" trick myself for a lot of other stuff in my life but I hadn't thought to apply it to this. Good suggestion!

Would you mind sharing where else in your life you have applied that trick? I always find it quite fascinating to hear about practical use cases because, while the idea of "Start simple, start small" is so simple conceptually, it's hard to get out of your head sometimes, so hearing actual real-world examples can be quite inspiring.

In my case I wanted to get back into working out more but the pandemic had completely messed up my existing workout routines, plus I travel a lot, so it's not easy to build new habits, either. So I decided I would just do one single exercise every day – doesn't matter when or what, as long as I do something.

I ended up doing the exercise usually right after getting up in the morning to build as strong a habit as possible. Also, I usually do 4 minutes instead of a fixed number of reps because 1) this way I can fully focus on perfecting the movement, 2) when it's early in the morning I often forget to count anyway, 3) this way I always know how long it's gonna take, so even on busy days I can make time.

Then once I had mastered that habit, I decided hey, why not try to do two exercises per day whenever possible? It's only 5 minutes more (including a 1 min break) but 100% more impact!

Now, recently, I've started doing 3-4 exercises because why not, it's only 5-10 minutes more for another 50-100% increase in gains! I think this – (up to) 20 min every morning – is probably my sweet spot. I get a decent workout, yet I can still squeeze it even into the busiest of days with relative ease, as long as I've made it a habit and don't waste time thinking about & hesitating to do it and instead just do it.

Post reply on HN