Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Start every terminal session with a vivid reminder of life's value (github.com/accessd)
105 points by accessd 9 months ago | hide | past | favorite | 70 comments
Hi! I've been using a similar browser extension for a long time. It kept me motivated. I decided to create the same thing for the terminal where I spend a lot of time.



The name is a missed opportunity - instead of "Last Sunday" it could be called the "Terminal Sunday".


Got it!


I did something similar that I hand wrote but it's different verses from the Bible whenever I cd into my main working location. It helps me memorize verses slowly over time and it's not too intrusive though occasionally I'll disable it before pair programming on something with a colleague since it feels inappropriate at work to force someone else to put up with it if they have qualms about it.


For the sibling commenters trying to grief OP, he never said he randomly selects verses. I wish you all a nice day.


Cool. Do you have a list of which verses you use? I'd like to do something similar myself.


Sure, it's a bit of a random list since it's not selected beforehand, but here are them:

- Romans 6:3

- Proverbs 16:9

- Matthew 5:9

- Galatians 5:22

- Galatians 5:6b

- Isaiah 55:9

- Psalm 117

- Psalm 23 (this is the largest one)

- Matthew 9:37,38

I'm pretty sure I've since memorized all of these so it is time to add more verses into the mix!


I had a similar thing, very unsophisticated at the time, to randomize quotes that I’d manually curated into a text file.


You can always just open a new terminal and then quickly hit ctrl-L to clear. Gives an opportunity for them to ask if they care, or to just move on otherwise.


Yesterday I discovered fortune(1) and in turn display-dhammapada(1).

I'm tempted to set up a cron job and receive daily emails.

Were you just doing shuf(1) on a text file of Bible quotes?


Naw, I wanted to memorize certain ones. It's worked though. I'm pretty much there with all of the ones I picked.


Aaaah gotta love me some Corinthians 14:34-35 in the morning


good, do the Quran next


Ah yes, I’d love to start the day reading a fresh “Numbers 31:17” verse. For pair programming I’d just stick to “Leviticus 18:22”


And of course this person or any of us could keel over tomorrow. So maybe add :"Or maybe you have no Sundays left. YMMV.'


"You might die tomorrow. How are you making this day a great last day?


And conversely, you may live so how are you at the same time making tomorrow a good day?

This is the struggle of existence.


Still thinking about this comment 48 hours later.


Love this. Added it to my path under ~/.bin/mori

I simplified the output a bit so it fits on 2 lines. This renderers a single progress bar the width of the terminal: https://gist.github.com/retrohacker/19978af044a080ed5677c0ea...

    Memento mori (Latin for 'remember that you die') is an artistic or symbolic trope acting as a reminder of the inevitability of death.
https://en.wikipedia.org/wiki/Memento_mori


Given the default life expectancy of 65, I am at almost 50%.

Fucking terrifying.

(I moved it up to 80 years)


That's such a sweet idea. If you're looking for a weekend project idea, I recommend flipping it 180: https://days.sonnet.io


This is much nicer! Added to the endless list of weekend projects.


That was beautiful, thanks for sharing.


Thanks but I’d rather curb the anxiety in my life, not inflame it.


I'm using zsh with tmux and it's a bit frustrating to have it appear on every window and every pane. At the same time if it only appears once I might miss it. Does anyone have suggestions on how to make it appear only a handful of times per day?


The problem with the RANDOM approach is that it scales with how many terminals you open on a given day. Compensating for that requires state.

I'm too lazy to write actual code right now, but here's a sketch of a possible solution that allows bursts. This is racy but safely so.

  declare N, the burst size. Say, 5.
  declare T, the time in seconds after which a new burst can start. Say, 3600.
  declare S, the time in seconds after which a new occurrence is allowed within a burst. Say, 10.
  declare P, a unique identifier. Say, the-last-sunday.
  declare D, the directory to store state in. Say, /tmp/bursty-ratelimiter.
  mkdir -p "$D"
  if "$D/$P-central" exists and its timestamp is within the last "$S" seconds, exit the process without doing anything else (hmm, I suppose when opening multiple panes at the same time, this race might actually matter ... I guess you could use a lock if it matters that much)
  touch (create and update the timestamp of) "$D/$P-central"
  for I from 1 to "$N"
    if "$D/$P-$I" exists and its timestamp is within the last "$T" seconds, continue with the next iteration
    touch "$D/$P-$I"
    run the rest of the program under load
  exit the process without doing anything


Maybe just touch a file somewhere in /tmp or /run or somewhere and do if [ -f $file ]; then touch $file ...

If you never reboot could set up a cron job to delete it. Or store a counter in the file and output each time it reaches x % N.

Might be susceptible to race conditions, so could wrap it in a flock or something...


You can run it randomly with: (( RANDOM%2 == 0 )) && $HOME/last_sunday.sh

Or add after the command ;sleep 1;clear

to clear the screen after one second.


Sunday's the worst day of the week. I wouldn't mind if there were zero Sundays left.


Sounds like you should be spending your Sundays on trying to make it so that some future Sundays aren't so bad.


I'm surprised that there's someone out there seeing it that way, and would be interested in hearing your reasons if you don't mind. Unless I'm hungover from a Saturday evening, Sunday is the day where I can be most creative and most free.


I don’t like Sundays either. Reasons:

- I know Monday is coming, so I need to go to sleep early

- The day is shorter since I wake up late because Saturday was a long nice day, and because of previous point

- everything is closed. Not that I care much, but it limits the options of “what to do today”

Favorite day: Saturday and then Friday


I'm surprised someone's surprised, it's a well-known thing: https://en.wiktionary.org/wiki/Sunday_scaries


> Made initially with Bash, I wrote another version with Ruby language because I love Ruby and to show Ruby is not dead! :)

Ruby, only 231 Sundays remain.

How are you gonna spend those Sundays, Ruby?!


Grim, but neat! You might consider leveraging an actuarial table of life expectancy by age[0], rather than hardcoding it at 80, since you're already doing the necessary age calculations.

[0]: https://www.ssa.gov/oact/STATS/table4c6.html


It bears mentioning that if you're in the US, living until 80 is a pretty optimistic expectation - the average for men is 73 and the average for women is 79.


Great execution, great idea, not a fan of the commentary text. I think people can interpret/use a life calendar in many ways, at least some of which are a tad more hopeful! Here’s to hoping that we'll all be laughing about this post on mars in 200 years.


Similar to this, I created an android wallpaper that shows what percentage of your life is already past. This helps me ensure that I'm spending my limited time in the most valuable way possible, and really helps put things in perspective.

App: https://play.google.com/store/apps/details?id=com.machineryc...

Source code: https://github.com/ethanmdavidson/DeathProgress


Changed the life expectancy variable to 90. A bit of optimism but also based on the fact that people on my family usually dies at really old ages.


For those who find this depressing…there are probably five of you to the one who sees limited time as a reason to succeed…FWIW…


Depressing: You will be logging into a terminal on a little monitor to see a little inspirational message in a monospaced font for the rest of your life, while the Sundays slowly count down. Meanwhile, healthy, successful people visit the mountain on your desktop background.

Inspiring: You find a way to escape and never see the Sunday counter again.


Maybe. I love the hiking and the terminal. After long vacations, I'm excited to sit back down and code. I don't find it depressing. I think a varied life is a life well lived.

Real success is finding happiness in whatever it is you are doing at this moment.


Honestly, the thought that looking into a monospaced font for the rest of your life is a horrible way to spend your life and that there's something inherently better to do seems like a deeply flawed thought.

Of course, you can be spending time with your loved ones. Or, you could be jumping out of a plane with a parachute.

But, whether you're doing an extreme sport, being with your family, or just staring into a terminal, your mind is exactly the same.

If you're unhappy, you'll be be just as unhappy spending time with your family as you are spending time staring into a terminal.

If your happiness depends on where your body is or who you talk to, you are bound to spend life suffering (as most people do I suppose).


If you haven't already read it, read A Man's Search for Meaning by Frankl. Even in death/concentration camps, people found meaning in their life and thus happiness.


> If you're unhappy, you'll be be just as unhappy spending time with your family as you are spending time staring into a terminal.

If this is coming from either Buddhist or Stoic traditions, both of those strongly emphasize practice and right action. You achieve a calm flow of happiness through right thought and right deed. Maintaining peace in chaos or pain doesn't mean chaos and pain are indistinguishable from other external circumstances, even to a Ruling Mind.

There are excellent reasons for traditions of monasticism to exist, for instance, and to often prescribe activities and mandate separation from common sources of chaos and distraction. There's such a thing as doing enlightenment on Hard Mode, and practically nobody can manage that. Thought and deed, and circumstances that tend to come about by right deed and by choices made in attempting to bring about a calm state of being, are vital to long-term practice.

Neither tradition is delusional, in this way.


Wait really? “If you're unhappy, you'll be be just as unhappy spending time with your family as you are spending time staring into a terminal.” I mean, you could say this for any two things and it would be equally silly. Happiness is often the consequence of an environment.


Then again, there are people who are uncomfortable being happy, people who are only happy when others are unhappy, people who believe happiness is impossible…the list is endless and all of them are valid, even if we don’t agree…or believe they exist…


Maybe we're just bike-shedding on the Sunday quote itself but I generally don't want to be reminded that I'm staring at a terminal on a Sunday ):


Just change the message to "what the fuck are you doing here on a sunday, go play with your kids/visit some mountains/pet your dog"


Why would someone being reminded that death is inevitable be depressing? Honest question. Death isn't a secret. Life is short, and everyone dies. I'm not saying someone needs to be happy about dying one day, but are they actually depressed?


When I see such burndown chart for life my first thought now is: ffs be done with it already!


This chrome extension that inspired this was probably inspired by this wonderful blog post that is very much worth a read:

https://waitbutwhy.com/2014/05/life-weeks.html


Interested to see what others display when opening a new terminal. I have a personally meaningful but somewhat embarrassing trite platitude followed by 3 random fortunes. A quote from my personal collection, a bit of advice from Kevin Kelly, and a Deep Thought by Jack Handy.


I start every sesh with:

    fortune | cowsay | lolcat


Same, although mine has

    cowsay -f stegosaurus
And I've been meaning to get rid of the lolcat because it's the only thing on my laptop with a Ruby dependency and I'd like to reclaim the disk space that requires.


Wow I've had my terminals open with fortune | cowsay for years but somehow had no idea that there were different cows.

Should anyone also happen to be interested in taking a quick glance at everything installed by default:

    cowsay -l | tail -n +2 | sed 's/ /\n/g' | xargs -i% bash -c 'echo %; fortune -s | cowsay -f %; printf "\n\n\n"'
edit: I like the novelty, I'm going to try out having a random "cow" saying my fortune greeting:

    fortune -s | cowsay -f $(cowsay -l | tail -n +2 | sed 's/ /\n/g' | shuf | head -n 1)


Oh man, I just tried and my first shot was:

     ________________________________________
    < Your ignorance cramps my conversation. >
     ----------------------------------------
     \     ____________
      \    |__________|
          /           /\
         /           /  \
        /___________/___/|
        |          |     |
        |  ==\ /== |     |
        |   O   O  | \ \ |
        |     <    |  \ \|
       /|          |   \ \
      / |  \_____/ |   / /
     / /|          |  / /|
    /||\|          | /||\/
        -------------|
            | |    | |
           <__/    \__>


It's super easy to create your own cows. Just look at any of the files in /usr/share/cowsay. You basically just have to get an ascii picture and add a couple of tags. Mine's a hypnotoad.


Once I left my laptop unlocked at university and a fellow student and friend of mine added something to my .bashrc using a custom cowsay file being piped some text he got from a bash error handling mechanism I don't recall.

He already had the cow art file on his computer for some reason so I think the deed took him only a minute or so. The overall effect was that if you entered a command not recognised by the shell (like typoing dc instead of cd for example) an ascii-art version of a certain microsoft paperclip would respond "I'm sorry I don't know how to dc, would you like help with that?"


Found a demo of what that produces:

https://github.com/busyloop/lolcat#screenshot


similar, only I use dadjoke and the thinking cow to keep things a lighthearted :)

  dadjoke | cowthink -s


for people on a mac, run

  brew install fortune lolcat cowsay


Horrible idea, if we are anxious over the time that we have left we are wasting it in fear.


Was it a weekend project? ;) looks cool!


Is there something like this for learning words of another language?


So a reminder from the terminal that I am also terminal?


Thank you, but this is way too depressing.

Why start it with every terminal session? This could have been a desktop app.


There was a similar project but for new tab of browser. It had a countdown timer with seconds remaining.

The problem with both approaches is our brain gets desensitized to both the approaches after some time and it has no effect on us.


I agree, I don't need an existential crisis every time I open a terminal session


I just don't need a terminal to help me get there; I'm quite good at existential dread without any assistance


Seriously, the point of occupying one's time with most any activity is to avoid ruminating on this stuff.

As expressed in the Internet-famous comic:

https://imgur.com/gallery/d9KdAvH

(It's the "Don't let the existential dread set in" one, to save those familiar a click)

(YMMV, I suppose)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: