Live data from Hacker News

Journaling using Nix, Vim and coreutils

tangled.sh

31–40 of 65 posts

Re: Journaling using Nix, Vim and coreutils

#31
post #17

Earlier quoted context omitted.

I was somewhat expecting that the flake would include nvim bundled with the vimrc in the folder. You could then just open nvim in the `nix develop` environment (or even use something like direnv to activate it when you cd in) and have a minimal journaling environment

Yeah, if it included ex. nvim plugins then it would make more sense to me. It's just this particular combination is for installing tools that I struggle to imagine aren't default-installed everywhere, and version-locking some of the most stable programs I've ever used (though I guess neo vim might make breaking changes?). Honestly it strikes me as most useful as a 'hello world 2.0' flake demo.

Bundling a little script into your path like that is pretty cool, just overkill to use a flake + nix for _just_ that

Re: Journaling using Nix, Vim and coreutils

#32
post #19

If you want week numbers in the calendar, you can use `ncal -w` and they'll be the last row. Add a `-3` and you get: $ ncal -w3 July 2025 August 2025 September 2025 Mo 7 14 21 28 4 11 18 25 1 8 15 22 29 Tu 1 8 15 22 29 5 12 19 26 2 9 16 23 30 We 2 9 16 23 30 6 13 20 27 3 10 17 24 Th 3 10 17 24 31 7 14 21 28 4 11 18 25 Fr 4 11 18 25 1 8 15 22 29 5 12 19 26 Sa 5 12 19 26 2 9 16 23 30 6 13 20 27 Su 6 13 20 27 3 10 17 24…

There is also a `-b` flag to get it back in to the shape you'd expect from cal. I find the week column easier to read in that form:

   w| Mo Tu We Th Fr Sa Su
  31|              1  2  3
  32|  4  5  6  7  8  9 10
Perhaps worth noting that ncal's -w is ISO-8601 compliant¹, which may surprise some people around new year as week numbers can reset in December or January.

[Said as someone who aliases cal to "ncal -wb" mostly just to get the correct first day of the week for their locale.]

¹ https://en.wikipedia.org/wiki/ISO_week_date

Re: Journaling using Nix, Vim and coreutils

#33

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…

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

Re: Journaling using Nix, Vim and coreutils

#34

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…

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

No. But editing a handwritten journal would hardly be any easier. It's a matter of what features you care about, I guess. I have never needed to edit past entries - that would be historical revisionism. It's not a feature I personally need for my journal. If I cared about that for some reason, I suppose I might use a different method.

If I realize I forgot something from yesterday, I just add it the next day.

Re: Journaling using Nix, Vim and coreutils

#35

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…

WTF wish I thought of this 17 years ago

Re: Journaling using Nix, Vim and coreutils

#36
This is a great intro to in both Vim and general unix text processing.

When I first started reading I thought, why not use Vimwiki or org?

I’ve use vimwiki for years but I really like the approach taken here. It’s simple and robust.

Making use of Vim’s built in abbreviations and syntax highlighting is a neat touch.

Re: Journaling using Nix, Vim and coreutils

#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 way to define dev environments though? Incredible, would recommend it in a heartbeat. Opening a project and knowing you are going to have the exact versions of all dependencies you need is so refreshing, or seeing that a public git repo has a `flake.nix` and being able to `nix run ` and download/build the project in one command is truly magic.

Re: Journaling using Nix, Vim and coreutils

#38

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…

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.

Re: Journaling using Nix, Vim and coreutils

#39
post #6

what is this nix religion I keep hearing about

Nix is a form of computing that's simultaneously 20 years in the past and 20 years in the future. I love it. Honest answer though, it's a deterministic way of building up a computer/environment. Think pip/uv/packages.lock but for everything.

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