Life Is Short (2016) - <AUTHOR> http://paulgraham.com/vb.html <comment><USER4> _It is not that we have a short space of time, but that we waste much of it. Life is long enough, and it has been given in sufficiently generous measure to allow the accomplishment of the very greatest things if the whole of it is well invested._

 _But when it is squandered in luxury and carelessness, when it is devoted to no good end, forced at last by the ultimate necessity we perceive that it has passed away before we were aware that it was passing. So it is—the life we receive is not short, but we make it so, nor do we have any lack of it, but are wasteful of it._

 _Just as great and princely wealth is scattered in a moment when it comes into the hands of a bad owner, while wealth however limited, if it is entrusted to a good guardian, increases by use, so our life is amply long for him who orders it properly._

\- Seneca, _On the Shortness of Life,_ 49 AD

[https://en.wikipedia.org/wiki/De_Brevitate_Vitae_(Seneca)](https://en.wikipedia.org/wiki/De_Brevitate_Vitae_\(Seneca\))

[http://www.crtpesaro.it/Materiali/Latino/On%20the%20Shortnes...](http://www.crtpesaro.it/Materiali/Latino/On%20the%20Shortness%20of%20Life.php)

<comment><USER5> Seneca lived in different times. By the time you get "proper education" and then secure yourself financially you are quite old in today's world. So better enjoy the process treating it as the thing rather than the means.

Longer lifespan helps but not that much. Biologically we just tend to peak pretty early.

One thing I may disagree with PG is that if you enjoyed doing something while doing it, then I think the time wasn't wasted, even if later in life you think you may have spent that time better. Otherwise logical conclusion is that you should live with a mind of a very old man.

<comment><USER6> Maybe that is the point? We are all brainwashed to think we need to secure ourselves financially. Most of us (on HN at least) could probably do barely any work now, and not die. But you'd have to sacrifice a lot of stuff we think we need. Me included, it's a hard trap to escape when everyone is in it.

<comment><USER7> There's this big "Aha" moment I had while reading a book this vacation; I realised that I wanted to be financially secure since it was the only means available in today's society to be "set" \- secure.

If I was to live in a small community where I'd know my neighbours, everyone did the things most valuable to the community - farm, smith, care, socialise, guard - and I knew everyone had each other's back, this would give the same feeling.

Alas, we live in a disconnected society, not even close to having local ties, so we feel we have to earn a ton of money in order to survive by buying our security.

<comment><USER8> Yeah but those small communities also had rich and poor. You miss one season of rain, and a significant number are now indebted or lose their livelihood.

<comment><USER6> But what if you had community ways of living but in the modern world with luxuries like irrigation?

<comment><USER9> Like a homeless shelter? We have that now.

</comment></comment></comment></comment></comment></comment></comment><comment><USER10> Routines.

Routines speed up your life. Time will blow by quicker if you are covered in routines. What is worse, your days will become blurred - each day - <USER2> similar to the next - for you brain to hold on to distinct memories. Example: if you drive to work the same way each day - you will often not even remember the drive by 10am. That hour will be gone forever. However, if you were to take BART instead for the first time, that one particular day will last a lifetime. Try moving. Move to a different town, force yourself to get new friends, take three saxophone lessons. Your days will last.

alternative: Alarm beeps, Wake up, drive your kid to school the same way, drive your commute the same way, work with the same people, tell the same jokes, work on similar problems all day, watch netflix all weekend. You will wake up at 45 when someone in your family passes.

Change things up.

<comment><USER11> I disagree.

Routines help to ensure that the more mundane aspects of life take less time and leave room for more interesting pursuits. Routines support living a life of integrity - I show up on time and I can keep my commitments easier when I have a steady routine. Routines help to reduce decision fatigue so that I have room for more important decisions.

It seems that you are arguing that following routines makes you a zombie, but my experience is quite the opposite. I find it easier to savor the mundane things in life when they follow a routine. I think that it may be a personality difference where some people thrive on routine and some thrive on extreme novelty. vive la differance?

<comment><USER12> Maybe, but I think it's important to distinguish what your routine covers and what it doesn't. I agree with gp when whole days are all the same and optimized to death for more productive time.

But I'd agree with you if you optimize the necessary errands, and fill the rest of your time with more interesting/meaningful activities.

</comment></comment></comment><comment><USER13> On this level of thinking I think we should consider the possibility that the notion of time is highly subjective. Indeed I think we should consider the possibility that time is an illusion.

That illusion is created by the mind, which habitually simulates the past and the future. The thinking mind is a simulator.

This is why the past can be changed, because the past is a thought. It is also possible to suspend this simulating, and you can experience timelessness. You might have experienced something similar in "flow states".

A practical mnemonic I use is to consider not filling time with your actions, but rather filling your actions with time. This means slowing down, observing in as much detail as possible, and appreciating every possible moment within each action.

Hope someone finds this useful!

<comment><USER14> This is wonderful.

I feel like there is more here however. If our perception of time is manipulable (e.g. flow states, psychedelics, confabulation), how do we use that knowledge to perceive having lived a more enjoyable life?

Is it mastery over self-delusion? Does undivided attention on the passage of time contribute to well-being? What resources would you recommend to learn more (e.g. science? Eastern philosophy? etc.)

<comment><USER13> > how do we use that knowledge to perceive having lived a more enjoyable life?

I think this is also a construct of the simulating mind. It is simply a thought (or series of thoughts) that leads you to "perceive" that your past was enjoyable. This thought passes and once it has, there is no concept of your past. Of course this thought might come back again.

I would suggest rather than hoping you can live a life in which you regularly perceive your past as enjoyable, simply observe the fact that you are thinking this thought.

> Is it mastery over self-delusion?

I am not sure what you mean by this.

> Does undivided attention on the passage of time contribute to well-being?

In my experience, definitely yes.

> What resources would you recommend to learn more (e.g. science? Eastern > philosophy? etc.)

This is a hard one to answer I think. (Good) Science I think won't lead you astray. Eastern philosophy has so much to offer I think, but there is also a lot of nonsense that you probably should be careful to avoid. I think you have to use your common sense when judging. Does it make sense to you? Does it correspond with your experience, or is someone simply asking you to believe something? (This of course is the scientific process.) BTW, these ideas are not confined to Eastern philosophy, similar ideas were philosophised in the West.

There is so much written about these ideas so I couldn't give you the canonical source of it all. One thing that I probably should mention is meditation. It seems to be the one common denominator. The way I see it, is it's the exercise that _practically_ helps change the way you see, think and act.

If you want some concrete recommendations I am happy to suggest some, but I find it's often more helpful for people to discover what resonates with them.

</comment></comment></comment><comment><USER15> > One heuristic for distinguishing stuff that matters is to ask yourself > whether you'll care about it in the future. Fake stuff that matters usually > has a sharp peak of seeming to matter. That's how it tricks you. The area > under the curve is small, but its shape jabs into your consciousness like a > pin.

This is so concisely and beautifully put. It's a good mental model and test for me to apply to things in my life to see whether or not I should spend time on them.

<comment><USER16> "Oh my god he's just shitting all over my code with his different linting settings"

I started too many fights caring about the dumbest stuff.

It absolutely was a sudden spike of mattering. But ultimately matters almost not at all: the area under the spike is nada.

Another thing I do is rubber duck it with my wife. I explain what's bothering me in terms she (A non coder) understands. And usually by the end I already have my answer.

</comment></comment><comment><USER17> One trick I learned to slow down time is to keep a journal and write both about the future (either as a narrative or plan a schedule) and about the past (either as a journal entry or an audit).

This could be about anything, any minute detail you encountered throughout the day or goal you are planning - the number of clouds outside or an application to graduate school you're thinking about or seeing someone interesting on the street.

Do this regularly, each day for 30 minutes, for 2-3 months and you will find that your memory improves by 10x and your days feel much more fulfilling and purpose driven.

The reason I think this works, is that by both explicitly planning and examining, your brain will create its own BS filter and guide you to things that are naturally fulfilling and worth your time.

<comment><USER18> Tell us more. I went on and off with journaling for most of my life, but I wouldn't consider the effort successful.

Just right now, and for the next two weeks, I am trying to journal every day, as a little experiment.

Again, tell us more. Keen to hear.

<comment><USER17> Of course. Just expanding on the idea behind journaling is that it is a scaffolding for your mind. For me, without journaling, my mind will wander and probably resemble a random walk. Instead, I found that by organizing my days into "packets" which have a forward-looking journaling session in the beginning and a backward-looking journaling session at the end was a tremendous boost to how structured my thinking is and how I spend my time.

For me, each "packet" is 2-3 day period and each journaling session is about 30 minutes. So two journaling sessions is a 1 hour investment to get better results over 48 hours (~2%) doesn't seem too bad.

More practically, I just keep two composition notebooks for these journals, and try to keep to a zettelkasten style[1] in Evernote.

[1] [https://www.lesswrong.com/posts/NfdHG6oHBJ8Qxc26s/the- zettel...](https://www.lesswrong.com/posts/NfdHG6oHBJ8Qxc26s/the-zettelkasten- method-1)

<comment><USER18> Thanks a lot for the extra details!

</comment></comment></comment></comment><comment><USER19> This is one of those things that everyone "knows" but no one really gets until they experience it. In my case it's the realization that the deadline to establish the relationships for this chapter of life passed in March. The social network may open up again in a few years, but my peer group is going to be a bunch of newlyweds and new parents by then.

<comment><USER20> I am 27 with a lot of people around me already married or getting closer to getting married. Whereas I am probably not going to be at that place for maybe the next 5-7 years. I fear the next 5-7 years are going to be very lonely, maybe I will get another chance to socialize once I am married myself. But till then, maybe I'll have to contend myself with my own company.

The sad bit is that its only now that I have finally started to grasp social interactions. Lived a majority of my life in a very depressive state and only been able to get out of all that recently.

<comment><USER21> You'll be good - you've done the hard part :). Just reach out if you fall back into it!

Also, every interaction Is social - keep up the new skill when you shop, chat online, get gas, etc.

Most people like people (I know, I don't get it either a lot of the time) so just keep putting yourself out there!

</comment></comment></comment><comment><USER22> > When I was a kid I used to wonder about this. Is life actually short, or are > we really complaining about its finiteness? Would we be just as likely to > feel life was short if we lived 10 times as long.

This reminds me of Parkinson's Law: "work expands so as to fill the time available for its completion". So if we know we will be travelling in three days, we need tree days to pack our stuff. And if we get a message from our boss telling us we need to travel this noon, we'll quickly pack a few things and get a toothbrush at the airport.

If we had 10 times more time to live, we wouldn't necessarily be getting ten times more out of it. We would just - my hypothesis - need that much more time to accomplish our milestones.

I read somewhere about putting Parkinson's Law in reverse: Committing to return the assignment in a week. That way we have a limited time budget, a boundary. That pushes us to move quickly.

<comment><USER23> > If we had 10 times more time to live, we wouldn't necessarily be getting ten > times more out of it.

We would probably need to work 10 times longer, because everything would be more expensive. We compete for scarce resources with other people, and if we have more time and they have too, the extra time will be burned in the zero- sum competitions.

<comment><USER24> That and the human population would rapidly saturate the planet within this century. That of course may happen anyway, however as is we at least have a fighting shot at managing it. Life expectancy expansion has to be gradual so we can adjust to it (in numerous ways), otherwise it'd likely prompt a cataclysmic humanity crash (bubble then crash). Beyond things getting more expensive, we'd probably just have a plain resource-driven civilization crash in much of the world.

Annual births more or less peaked in 1988 at around 139/140 million, which is close to the level we're still at today [1]. Annual deaths however keep climbing, from roughly 48m in 1988 to 60m or so today. Births are set to decline while deaths keep climbing throughout the century.

Clear most of the natural deaths for just the next 80 years, and it's the difference between then having 18-20 billion (or more) people in the year 2100 versus the present common projections of around 11'ish billion. Would have to resolve in the fantasy age extension scenario whether people can keep having children for hundreds of years, as that would change projections radically. Governments would likely aggressively regulate population expansion if so, rather than hoping for self-restriction (eg if it took a natural form of tapering via per capita births dropping to match the changes). Does raising a child become a 100 year responsibility? Does our pre-adult immaturity / adolescence time expand to fill the allotted life expectancy? Lots of questions in the fantasy premise.

[1] [https://i.imgur.com/8buRWJS.png](https://i.imgur.com/8buRWJS.png)

</comment></comment></comment><comment><USER25> If curious see also

2018 [https://news.ycombinator.com/item?id=16729555](https://news.ycombinator.com/item?id=16729555)

Discussed at the time: [https://news.ycombinator.com/item?id=10917446](https://news.ycombinator.com/item?id=10917446)

<comment><USER26> I read this essay in 2016, and was fortunate to have a child in late 2018.

This essay had a profound impact on me, and by extension a profound impact on our son's upbringing. There are very few weekends that go by that I don't think of it.

I am sure PG isn't wasting his time on HN anymore, but if he does happen to read this, I just want to say thanks.

</comment></comment><comment><USER27> When ever this subject comes up I think of the song Time from Pink Floyd. I included the lyrics below.

If a typical person has 72 years of life that is:

* 26,298 days (includes 18 leap days)

* 631,152 hours, 37,869,120 minutes, 2,272,147,200 seconds (not counting leap seconds)

That sounds like an enormous amount of time. Time is like money. For some people it always seems to slip away. For other people its a multiplicative empowering factor that builds on itself like a compound interest. For others still there is plenty of time meaningfully spent performing intentional tasks.

\</comment><comment></comment><comment>

Ticking away the moments that make up a dull day

Fritter and waste the hours in an offhand way.

Kicking around on a piece of ground in your home town

Waiting for someone or something to show you the way.

\---

Tired of lying in the sunshine staying home to watch the rain.

You are young and life is long and there is time to kill today.

And then one day you find ten years have got behind you.

No one told you when to run, you missed the starting gun.

\---

So you run and you run to catch up with the sun but it's sinking

Racing around to come up behind you again.

The sun is the same in a relative way but you're older,

Shorter of breath and one day closer to death.

\---

Every year is getting shorter never seem to find the time.

Plans that either come to naught or half a page of scribbled lines

Hanging on in quiet desperation is the English way

The time is gone, the song is over,

Thought I'd something more to say.

\---

Home

Home again

I like to be here

When I can

\---

When I come home

Cold and tired

It's good to warm my bones

Beside the fire

\---

Far away

Across the field

Tolling on the iron bell

Calls the faithful to their knees

To hear the softly spoken magic spell

</comment><comment><USER28> Some people seem to be able to shrug off bullshit at work, just go home and think about things that "matter". If I see bullshit, things that are wrong, or just legitimately hard problems I have a very hard time not working hard to fix it even though I would not really care about the outcome in 10 years.

The dilemma is the balance between doing work that matters, maybe finding something where I care more about the outcome, or learn to brush things off and focus on other things in life that matters.

</comment><comment><USER29> Life is short when you want more than what is available around you. I just chill, tend to the nature around me, do my best, and try to make people around me happy. Simple life, just the right amount of time.

<comment><USER30> Sometime I need to read _The View from 80_ , but an excerpt my father sent me was to the effect that, being in his eighties, the author can now view with amusement all the young people around him so busy white-rabbitly _striving_.

<comment><USER31> Ok, but we have to remember that not all 80-year-olds have the same outlook on life.

Some people remain very active and ambitious well in to advanced age, as long as their body and mind can hold out, which is something that will differ from person to person.

Here's a telling example: [1] In his 60's, Robert Owens was running marathons and undergoing Navy SEAL tests that would regularly crush 18-year-olds, and everyone he knew was trying to dissuade him from because they thought it would kill him. He still did it, and though he wasn't quite 80 at the time of the video and his body was starting to give out, he was insanely ambitious and accomplished at an advanced age, well past the point where most people would have thrown in the towel.

I've seen artists who are very active in to their 90's, and have heard of people running marathons in their 90's. On the other end of the spectrum, the rate of suicide, depression, and loneliness among the elderly is very high. That's not to mention the devastation of dementia and other mental and physical afflictions.

People deal with aging very differently depending on their body, mind, socio- economic circumstances, support networks, how they were brought up and their outlook on life, all of which vary greatly.

[1] - [https://www.youtube.com/watch?v=Yg9kJeule7Q](https://www.youtube.com/watch?v=Yg9kJeule7Q)

</comment></comment></comment><comment><USER32> > And while it's impossible to say what is a lot or a little of a continuous > quantity like time, 8 is not a lot of something. If you had a handful of 8 > peanuts, or a shelf of 8 books to choose from, the quantity would definitely > seem limited, no matter what your lifespan was.

If you had 8 cars to choose from, it wouldn't seem so limited, would it? The idea that you can take a number, and in absolute sense say that it's "not a lot" is bizarre. Even 8 books might seem like a lot in a different situation, like if someone packed that many books in his suitcase for a weekend trip.

<comment><USER6> Plus only 8 christmas but with 2 kids you'd have 16 birthdays, plus maybe 100 or so friends birhdays, 2 first days at school, etc. etc. lots of moments.

</comment></comment><comment><USER33> I'm simultaneously in a married relationship where children are off the table (by our choosing), and am hopelessly bored most of the time. It's interesting to contrast these two facts.

I think life is too long, because I don't believe in any afterlife and if I die today or 40 years from now, what's the difference? Just a bunch of pain and boredom all the way down from now until then.

<comment><USER34> Nietzsche's writing on "eternal return" helped me with similar thoughts. It gives life heaviness, as Kundera says in The Unbearable Lightness of Being.

[https://en.wikipedia.org/wiki/Eternal_return](https://en.wikipedia.org/wiki/Eternal_return)

Also, learning to "imagine Sisyphus happy." Easier said than done, of course.

[https://en.wikipedia.org/wiki/The_Myth_of_Sisyphus](https://en.wikipedia.org/wiki/The_Myth_of_Sisyphus)

<comment><USER33> Thanks for the links.

I actually read the whole Sisyphus essay, but it didn't really inspire me. I think I'm probably an Existentialist to some degree, I believe that life has no inherent meaning or value and that we have to create for ourselves such meaning. But most days I'm just going through the motions and I'd rather tune out, or "drop out" as it were. Or as Weezer says "Why bother? It's gonna hurt me."

<comment><USER4> The "opposite" of Existentialism, if there is such a thing, might be the Japanese idea of _shokunin_ or pure mastery of one's profession. In the West we'd probably call this _craftsmanship:_ taking pride in the fundamentals of one's chosen profession and aiming to master it, not simply earn a living. It's an ideal that I've always found inspiring.

 _Once you decide on your profession, you must immerse yourself in your work._

\- Jiro Ono

[https://medium.com/@alyjuma/shokunin-and-sushi-what-jiro- can...](https://medium.com/@alyjuma/shokunin-and-sushi-what-jiro-can-teach-us- about-mastery-1a886f129df4)

Phrased another way, the craftsmanship model narrows the boundaries of meaning, whereas the Existentialist one expands them to the infinite, or destroys them entirely.

 _I have always been fascinated by all types of monomania, by persons wrapped up in a single idea; for the stricter the limits a man sets for himself, the more clearly he approaches the eternal._

\- Stefan Zweig

<comment><USER31> _Cook Ting was cutting up an ox for Lord Wen-hui. At every touch of his hand, every heave of his shoulder, every move of his feet, every thrust of his knee -- zip! zoop! He slithered the knife along with a zing, and all was in perfect rhythm, as though he were performing the dance of the Mulberry Grove or keeping time to the Ching-shou music._

 _" Ah, this is marvelous!" said Lord Wen-hui. "Imagine skill reaching such heights!"_

 _Cook Ting laid down his knife and replied, "What I care about is the Way, which goes beyond skill. When I first began cutting up oxen, all I could see was the ox itself. After three years I no longer saw the whole ox. And now -- now I go at it by spirit and don't look with my eyes. Perception and understanding have come to a stop and spirit moves where it wants. I go along with the natural makeup, strike in the big hollows, guide the knife through the big openings, and following things as they are. So I never touch the smallest ligament or tendon, much less a main joint._

 _" A good cook changes his knife once a year -- because he cuts. A mediocre cook changes his knife once a month -- because he hacks. I've had this knife of mine for nineteen years and I've cut up thousands of oxen with it, and yet the blade is as good as though it had just come from the grindstone. There are spaces between the joints, and the blade of the knife has really no thickness. If you insert what has no thickness into such spaces, then there's plenty of room -- more than enough for the blade to play about it. That's why after nineteen years the blade of my knife is still as good as when it first came from the grindstone._

 _" However, whenever I come to a complicated place, I size up the difficulties, tell myself to watch out and be careful, keep my eyes on what I'm doing, work very slowly, and move the knife with the greatest subtlety, until -- flop! the whole thing comes apart like a clod of earth crumbling to the ground. I stand there holding the knife and look all around me, completely satisfied and reluctant to move on, and then I wipe off the knife and put it away."_

 _" Excellent!" said Lord Wen-hui. "I have heard the words of Cook Ting and learned how to care for life!"_

[http://www.bopsecrets.org/gateway/passages/chuang- tzu.htm](http://www.bopsecrets.org/gateway/passages/chuang-tzu.htm)

<comment><USER4> Thanks for the share. I was just listening to an audiobook Zhuang-zi a few weeks ago (while biking by a farm, ironically) and remember this exact story.

</comment></comment></comment></comment></comment></comment><comment><USER35> I once had a dream that felt like it lasted a lifetime. In this dream, I had a whole new life, a different wife, kids, and I lived it through to the end. Then I woke up. It was the weirdest thing ever and I often think about it.

<comment><USER36> There's absolutely no way of knowing that you're not living in a dream as we speak right now.

<comment><USER35> That's the scary part! I woke up very disoriented, full of all sorts of emotions - disappointment, sadness, total confusion. I couldn't make sense of what just happened. It was scary. I also missed my "dream family". I couldn't believe they were gone and it was all a dream.

I've told this to people, and they did not believe me.

It took a good 3 days to shake off all of the emotions I was feeling over a dream. I did a fair bit of research on this and found that many people report the same happening to them.

</comment></comment></comment><comment><USER37> I have a different take on this. Not everyone is Paul Graham. Paul Graham would not have written this before founding his company. He'd not have thought "there are only 52 weekends when I'm 25 so let me just party".

Most people, especially those who have not made it in life, are worried about survival. Especially people with kids. They sacrifice their time with kids so that their kids can have a better life than them. So that they can move them from <insert class here> to upper <insert class here>. They work hard, attend pointless meetings so that they can get ahead in their career, not upset anyone and make sure they have health insurance. They do insane commutes for the same reason. Most people do not have the luxury to choose.

People are more unsure of their survival despite greater wealth. A single medical incident could bankrupt them. There are people on Blind wondering if $2 million is enough to retire. A friend of mine was worried that he'd not be able to hit his goal of a net worth of $5 million at his current company (he makes around $600k). Everyone is trying to get ahead and there's serious FOMO if one is not ambitious. This is prevalent especially in Silicon Valley companies.

The only solution to live life the way PG envisions is to guarantee basic income, shelter and healthcare.

</comment><comment><USER38> Not for the one in pain.

Be it from illness, inequality or just mere existence and yet one endures the pain due to primordial urge to live.

</comment><comment><USER39> It's actually the longest thing you will ever experience.

<comment><USER40> ...according to some schools of belief. Truth is, there is no way to prove or disprove that, it's a debate for the ages between atheism and religion.

<comment><USER41> Sufficiently for my own decision-making at least, I have proven it and it helps me much.... (My simple-tech web site I hope provides more info in a skimmable way; it is mentioned in my HN user profile, for what that may be worth, or more specific links if requested.)

(With any downvotes, a thoughtful comment is appreciated. thanks.)

</comment></comment></comment><comment><USER42> "Bullshit is the junk food of experience." Well put!

</comment><comment><USER43> Jordan Petersen once said "working means sacrificing the present for the future", which is an amazing statement. Its incredible how much our society believes working is a must, especially fulltime. I once did a sabatical and people giving me a weird look, after finding out that I don't do a regular job. Quite sad, imho.

<comment> swagasaurus-rex It's especially cruel to be living paycheck to paycheck.

At that point, you're not sacrificing the present for the future. You're sacrificing the present for survival.

</comment></comment><comment><USER44> If you're dealing with a lot of bullshit, remember that the game should be worth the candle.

Hopefully that motivates you to change things up if it's been shitty too long.

</comment><comment><USER18> > One great thing about having small children is that they make you spend time > on things that matter: them. They grab your sleeve as you're staring at your > phone and say "will you play with me?" And odds are that is in fact the > bullshit-minimizing option.

Love this passage. Don't have kids, but I can totally see this happening to parents I know.

</comment><comment><USER7> "It is possible to slow time somewhat"

I've discovered how during a holiday in a camper 2 years ago. Do a -lot- of new things on a single day. We had a 6 day trip and it felt like 3 weeks. It was magic. While routine and habits have their place, if you want to slow down or bend the flow of time - do new things every day.

</comment><comment><USER45> > Arguing - Your instinct when attacked is to defend yourself. But like a lot > of instincts, this one wasn't designed for the world we now live in. > Counterintuitive as it feels, it's better most of the time not to defend > yourself.

I love this one, certainly something I need to practice.

</comment><comment><USER46> It's not that life is short, it's that we waste to much of it - <USER3>

</comment><comment><USER47> Amit Gupta's "you don't get forever" talk is a good complement to this:

[https://www.youtube.com/watch?v=9AP1hoNJkMk](https://www.youtube.com/watch?v=9AP1hoNJkMk)

</comment><comment><USER48> Everything is short when viewed that way.

A climber said: on a wall, a second is a century.

Maybe our culture should reinstate sublime difficulties, preferably in groups, to make the limited space denser :)

</comment><comment><USER49> For me the most important take-away of that article is this:

Do you know "life is short" merely intelectually or do you feel it in your bones as if your body is on fire?

</comment><comment><USER50> Beautifully written.

</comment><comment><USER51> Is it just me or is SSL completely broken on this site?

First I get this:

Websites prove their identity via certificates. Firefox does not trust this site because it uses a certificate that is not valid for paulgraham.com. The certificate is only valid for the following names: _.store.yahoo.com,_.store.yahoo.net, store.yahoo.com, store.yahoo.net, _.stores.yahoo.net, stores.yahoo.net,_.csell.store.yahoo.net, _.us- dc1-edit.store.yahoo.net,_.us-dc2-edit.store.yahoo.net, _.us- dc1.csell.store.yahoo.net,_.us-dc2.csell.store.yahoo.net

OK, I guess that's close enough, but when I "Accept the risk and continue," I get this, which can't be bypassed:

An error occurred during a connection to paulgraham.com. Cannot communicate securely with peer: no common encryption algorithm(s). Error code: SSL_ERROR_NO_CYPHER_OVERLAP

<comment><USER52> Fixed by changing the URL to http, thanks.

</comment></comment><comment><USER53> Fyi, submitted link is HTTPS but PG's site isn't. The link fails to open in some browsers.

</comment><comment><USER54> hackernews.txt</comment>


Going faster doesn't make you happier; you just drive farther - <AUTHOR> http://cityobservatory.org/going-faster-doesnt-make-you-happier-you-just-drive-farther/ <comment><USER2> This would seem to contradict the finding that lower commute times are associated with overall happiness [0, not the best link but there are many].

Slowing down a metro area by, say, forcing a modal shift towards bicycles will not make conveniently located housing any cheaper. If anything, it'll be more desirable and therefore more expensive. Absent a change in housing spend, commute times will rise and free time will sink.

EDIT: I'll add that while I don't live far from work for a bigger yard, I _do_ live far from work so I can have my own apartment, instead of roommates. Having lived both with roommates and without, I'm confident I really am happier this way.

[0] [http://www.huffingtonpost.com/kirsten-dirksen/happiness- rese...](http://www.huffingtonpost.com/kirsten-dirksen/happiness-research- ranks-_b_829591.html)

<comment><USER3> > This would seem to contradict the finding that lower commute times are > associated with overall happiness

Not at all! Happiness _is_ correlated to shorter door-to-door time, but higher speed does not equate to shorter times if the distance grows as well. From the article:

> We have a strong hunch as to why traveling faster might not generate more > satisfaction with the transportation system. Faster travel is often > correlated with lower density, and longer travel distances to common > destinations, such as workplaces, schools and stores.

<comment><USER4> > Not at all! Happiness _is_ correlated to shorter door-to-door time, but > higher speed does not equate to shorter times if the distance grows as well.

Exactly! This is also related to the The Fundamental Law of Road Congestion: building new roads just allows people drive more. (See Duranton and Turner.)

You can view this as an equilibrium. People will prefer uncongested roads until they become congested.

Surprising, yet simple when it's pointed out.

<comment><USER5> Different regions have dramatically different average commute times which don't directly correlate with population. Thus disproving your point.

Insufficient roads, poor zoning, etc all add up into a complex whole. But, roads reduce the value of some peoples property which is why you get such strong opposition.

PS: Importantly, congestion has a cost not just for the average commute but the number of hours in the day that are congested.

<comment><USER4> > Different regions have dramatically different average commute times which > don't directly correlate with population. Thus disproving your point.

Average commute time is not the desired metric here, see Duranton and Turner[1].

[1]: [http://www.brown.edu/Departments/Economics/Faculty/Matthew_T...](http://www.brown.edu/Departments/Economics/Faculty/Matthew_Turner/papers/published/Duranton_Turner_AER_2011.pdf)

<comment><USER5> Road miles driven has utility, but there feedback effects which make it a poor long term measure. Duranton and Turner have a biased view of the situation as which does not map to economic, social, or even environmental utility.

</comment></comment></comment></comment></comment></comment><comment><USER6> I've always been under the impression that commute satisfaction is related to various levels of consistency. Constant speed, constant commute times.

I drive 3x as far at my new home to my job as I did at my previous home but since my workplace is on the edge of the city and I moved to a rural home I drive 90% of the way on highway. Set cruise, set podcast, arrive at work in 20 minutes (+/\- 5 minutes). Old home? 15 minutes but through a dozen intersections and several road merges and lane changes.

Much happier now.

EDIT: I should say that my first career job was about 2km from my home. I could choose to drive and battle 10 intersections and then the hell that was parking, or I walked. It took 15 minutes longer but it was consistent and smooth any day of the week, regardless of construction. Highly satisfied.

<comment><USER7> I feel like this is part of the story behind Lyft and Uber. They traded inconsistent timing and consistent pricing for consistent timing and inconsistent pricing. Certain people seem to like the better (I do).

I can always get a Lyft in a minute or two in a major city. I might pay slightly more for that at certain times of the day.

<comment><USER8> It's also about a third of the price of a cab when using UberX or Pool.

</comment></comment></comment><comment><USER9> Speak for yourself. When I'm out on the road, top down, if I'm going over 70 I can drive for days. Ideally light traffic, roads with curves, and clear bright visibility. Figuring out how to pass the car in front of me is a puzzle that gives satisfaction when accomplished. Cut my speed down to under 35 in heavy traffic where I just have to trudge along with everyone else, where I have to shift between low gears a lot, or where I'm staring at headlights... man it just isn't fun.

(Side note, what's with all the super bright headlights in the last 2-3 years? I see about 20% of new cars with these ridiculously bright lights that just shred my eyes at night -- is it a change in the law or a change in the tech that's allowing these to become so prevalent? Feels like these people are driving cars with their high-beams on... and I can't help but think that the drivers are assholes for doing it.)

<comment><USER10> I really want to make a giant LED sign to put in my rear view window that says "adjust your headlights: they are blinding me :/" with a switch I can use to turn it on :(.

<comment><USER11> Auto-dimming rear view mirrors are awesome. There're aftermarket options too. They're not cheap but may be worth it if you spend a lot of time driving in the dark in heavy traffic.

<comment><USER12> I can't stand my autodim mirror. It is always dimming too much and/or at the wrong time.

<comment><USER13> For a brief shining period I had an autodimming mirror which was right on, and I didn't even realize it at first. The car that replaced that car does not have this, and just the mirror itself is a ton of money so I'm bearing life without. Y'all are using your high beams on your lifted SUV's too much (I don't mean, YOU, you know what I mean).

</comment></comment></comment></comment></comment><comment><USER14> See that blip for Rochester,NY with the top satisfaction and a high speed index? That's where I live and I can say it's the best driving city I've ever experienced.

An excellent balance of bandwidth and saturation and average distance, makes most drivers here really easy going and happy.

...unless your trying to get to East Ave Wegmans at 5:30 pm on a Friday :)

<comment><USER15> A game I used to play back in the day when I had to drive on the interstates was to maintain sufficient distance to the car in front of me so that anyone could trivially make lane changes, etc. The amazing side effect was that typically the cars behind me would start doing the same thing. It was mildly pleasurable.

<comment><USER16> I've entertained the idea on multiple occasions that there might be a way to introduce good actors which use traffic calming driving techniques onto the road with the purpose of helping to regulate the flow of traffic. This assumes that there is a way to influence traffic on a large scale by way of a few good drivers.

</comment></comment></comment><comment><USER17> This is a completely unsurprising result.

My happiness is strongly correlated with my commute time NOT the speed at which I'm driving.

We keep establishing the second part of human nature, for instance better insulation resulted in bigger homes, not energy savings[1]

[1] [http://www.pewresearch.org/fact-tank/2015/11/09/as- american-...](http://www.pewresearch.org/fact-tank/2015/11/09/as-american- homes-get-bigger-energy-efficiency-gains-are-wiped-out/)

</comment><comment><USER18> Speed alone is a useless factor if you don't take in consideration the conditions of the drive.

Taking hours in a comfortable train, with my laptop, a power socket and 4G is not the same as in the sub suck standing between to a fat sweating smelling dude and a crying baby.

It's not the same if I have an appointment or if I'm going to my holiday.

It's not the same if it's cold and raining or sunny with birds singing.

People don't just go fast for the sake of speed. It has a purpose.

So yeah, slowing down in life is a good advice. Chew and taste the food, exercice, take the time to read, stop to talk to your kids, etc.

But all lifes happen in a context.

The context is not the same when you have a shitty underpaid job with heavy commute in terrible conditions and 2 kids to drive to school, or, if you are like me, in the sunny south of france driving your cool-ass motorbike. Yeah I take my time, there. But I guaranty you, when I'm in the US traffic, I really don't want to take my time.

</comment><comment><USER19> I'm definitely of the Mr. Money Mustache school of thought on commuting- there should be a fairly strong reason that you aren't dwelling in place from which you can bike to work.

[http://www.mrmoneymustache.com/2011/10/06/the-true-cost- of-c...](http://www.mrmoneymustache.com/2011/10/06/the-true-cost-of- commuting/)

<comment><USER20> I love biking to work, but being able to do that consistently depends as much on the amenities at your office as it does on the distance from your work. Unless you live in Sacramento, or some other place with nearly perfect weather, you are either going to need a locker room and shower at work, or you will need to drive whenever it is snowing or raining.

That being said, my commute time has gone from 30 minutes a day to an hour a day as the areas in between where I work and where I live have become more popular. It's a large part of why I'm considering a new job. The commute to work isn't bad, about 20 minutes or so, but the commute home can be more than twice that. The added commute has definitely made me a less happy person in general, due to things like added stress, less free time, etc.

Edit: I live in Chicago, and looking at the data the only place that has a slower average speed is Miami. I think the higher than expected satisfaction is from the reasonably good public transit. I'd be much happier if my commute allowed me to easily take the L to work. I'd be interested in seeing individual results from within the city though. I wouldn't be surprised if there was a binomial distribution of some kind.

<comment><USER21> > or you will need to drive whenever it is snowing or raining.

I think you could bike every day, if you wanted to.

Fenders would keep dirty road water off you and a rain shell with rain pants would keep you dry. Or if it's warm you can wear shorts and change once you get to work.

If it's too snowy to safely bike, should you really be driving? And how much does it really snow anymore? This year Chicago had the first January without measurable snowfall in recorded history :(.

<comment><USER20> It's not about safety, it's about getting to work and being presentable. Riding a bike in snow takes an incredible amount of effort. Even if dressed in a manner which allowed me to stay dry and warm, I will arrive at work completely drenched with sweat.

Even if I have a change of clothes with me, I still need to wash myself, and find a place to stash my wet and smelly clothes I rode in on. Giving myself a sponge bath in the handicapped stall and hanging my sweaty clothes up to dry in the basement is not a winning idea.

Also, my car has winter tires, AWD, enough gas to run for 8 hours at idle, food, water, blankets, etc. I think that's a far safer thing to be in a snowstorm in. Not to mention the fact that cars are inherently stable, unlike bikes, so I can go as slow as I need to be safe without falling over. Plus, if someone else who is less patient hits me, I'm far more likely to be safe in a car.

Regardless, the biggest issue is the fact that physical exertion makes me sweat, doubly so when I am wearing weather-appropriate gear, and I don't have a shower at work.

<comment><USER21> You say

> It's not about safety

but then you present several arguments about how the car is safer.

I bike all year in a similar climate. Take a hot shower before you leave. It kills surface bacteria that produce odor. Change clothes when you get to work if you're really sweaty.

> the biggest issue is the fact that physical exertion makes me sweat

You specifically mentioned rain and snow before so that's what I addressed.

As you acclimate to the heat you'll sweat less. Also on a bike you naturally produce a breeze. With experience you can balance your effort and the cooling affect of the air to minimize how sweaty you get.

Most people drive to work and think that's fine and normal. I'm just saying what's stopping you from biking to work is not the weather but what you've decided to value.

<comment><USER20> This isn't an ideological argument. Cars are safer than bicycles in almost all circumstances. I sweat to the point where I need to shower after getting to work. If I don't shower after I sweat, my hair is a mess and I will have breakouts, despite being a grown man.

I ride my bike to and from work almost every day from April to October, 8 miles each way. I think I have enough experience to say the barriers to cycling more. Perhaps if my ride was 2 or 3 miles I'd probably be able to ride my bike at a leisurely pace, but at that point I could also walk.

I think the argument that you acclimate to the heat is baloney. I play pickup basketball in a gym without AC 5 days a week, and despite that and the bike riding I still sweat a lot. Some people sweat more than others. It is just a thing. There is one guy I play with who literally looks like he stood in the shower ten minutes after we start playing. Other people can play for an hour and look like they just stepped on the court.

Either way, it's still a bit ridiculous to claim that if I really cared I'd ride my bike to work come hell or high water. There have been days when I've been able to drive to work where winds have been high enough to shut down the train lines, and when I'd almost certainly be blown off my bike.

</comment></comment></comment></comment></comment></comment><comment><USER22> I disagree with the premise. Happiness with a transportation system does not correlate with the absolute speed you can go. Instead, I think it would correlate with "how many interesting/useful places can I reach with x effort". Most of the regions listed with fast transportation have things spread out much more.

If the grocery store is a mile away, and it takes 5 minutes to drive there it is equivalent to being a couple of blocks away and it taking 5 minutes to walk there. (This assumes walking and driving are equally as easy). Or likewise if I had to commute to work every day by car for 1 hour, it doesn't matter how fast the car moves. I lost 1 hour of my time and that hour is traded for transportation happiness.

I would argue that the faster regions have things spread out so far that it doesn't make up for the faster travel. I lived in both the Southern U.S. and now in San Francisco and I easily see this as being true. Travel by car in the south is MUCH faster than in SF, but it doesn't make up for way things are spread out.

<comment><USER23> That is the premise, and you agree with it?

"We have a strong hunch as to why traveling faster might not generate more satisfaction with the transportation system. Faster travel is often correlated with lower density, and longer travel distances to common destinations, such as workplaces, schools and stores."

<comment><USER24> I think the real issue is that it seems pretty obvious that people don't drive fast because it makes them happy to go fast. People drive fast because if they don't, it takes them longer to get where they're going.

Also, there's another reason I think people like to go fast. If you're stuck behind someone that's going slower than you've been going, you feel trapped and frustrated. It seems like this happens even if the person in front of you is only going a few MPH slower than you were.

</comment></comment></comment><comment><USER3> > We have a strong hunch as to why traveling faster might not generate more > satisfaction with the transportation system. Faster travel is often > correlated with lower density, and longer travel distances to common > destinations,

Indeed, who ever thought that speed alone could matter? Time is the key. 2 km at 30 km/h is much better than 60 km at 120 km/h.

</comment><comment><USER25> I don't know. I've been on slow systems (SJ VTA, for example) and they are irksome. Also bus lines in SF which take circuitous routes to get you somewhere --they are very frustrating and are reasons I've driven instead of ridden public transit many an occasion. The most frustrating part is you feel like you have no control over the situation. You know you are at the whim of the system and there is no wishing for skipping a stop or overtaking a slow motorist or cyclist.

<comment><USER26> I took the bus to work for several years. And I totally get what you are saying about not having control and getting frustrated. But to me the whole point of taking the public transport is to not have to worry about those things in the first place. Don't look at the traffic or how the driver is driving. Read a book, listen to an audio book, learn a new language, put on noise canceling head phones and do meditation - don't worry about how the traffic is or if the bus driver is slow. I did my entire Master's degree on the bus. Two hours of study time every day! After I got done with my Master's I studied tensor calculus on the bus because I wanted to understand general relativity. Nobody to disturb - no kids, no spouse. I don't take the bus anymore because I changed jobs and there is no public transportation available to the new destination. But I would happily take it again if there was one. Also walking to and from the bus/train stop is some physical exercise that otherwise I would not get.

<comment><USER2> I wish I could do all those things while standing. I _do_ have to look at how the driver is driving to anticipate jerky movements if I want to keep my balance.

</comment></comment></comment><comment><USER27> Ivan Illich told us this in the 70's, in "Energy and Equity"

[http://www.preservenet.com/theory/Illich/EnergyEquity/Energy...](http://www.preservenet.com/theory/Illich/EnergyEquity/Energy%20and%20Equity.htm)

<comment><USER28> Thanks for this link. Not done yet, but it's outstanding so far.

</comment></comment><comment><USER29> Transport speed increases the feasible size of a city. That size could be to fit more people in, or it could be bigger houses, or whatever; but it effectively creates room for some form of growth, just like a big tree needs a thick trunk.

<comment><USER11> This. My city is currently in sprawling mode (thanks to commie blocks occupying good spots). Most of the new development happens along the major highways. New quality roads increase development in said direction a lot.

</comment></comment><comment><USER30> Seems a bit interesting to just ignore the whole s=d/t relationship and go for the 2D graphs. Adding the extra variable and doing some nice 3D charts can only create more meaningful data and conclusions.

</comment><comment><USER31> I disagree. I'm much happier on my R1. I get to 75mph much quicker too :D

<comment><USER32> Unfortunately, not everyone can ride a motorcycle or lives where the other motorists are friendly (or at least not-hostile) to motorcyclists. Many also consider it beyond their tolerance for risk.

I am really lucky to live where people are happy to accommodate motorcycles (cars make room for motorcycles to split lanes when we have slow moving traffic) and I use one to commute to work everyday. I do sincerely wish more people could share in the joy of riding a motorcycle :-)

However, I am aware that there are places where people are hostile to motorcycles. I just hope that some day things get better.

<comment><USER33> The noise of motorcycles is a problem when you live in cities. I'm afraid most city-dwellers would not be faborable of more motorcycle-friendly cities because of that.

<comment><USER34> Not all motorcycles are that loud, especially the smaller ones more suitable for getting around IN the city. In proper urban areas, scooters are more convenient anyway -- smaller, more maneuverable, automatic transmissions, and more storage.

</comment></comment></comment></comment><comment><USER35> This is pretty obvious stuff. People have a limited tolerance for daily work commute of a max one hour each way, whether they're driving 70mph from one suburb to another, or walking from their village to the fields, or hunting and gathering in the woods.

</comment><comment><USER36> Its not about average speed, its about absence of frusturation events, many just so happening to be backup of traffic, or delay in transport.

</comment><comment><USER37> There's a metaphor for life in there somewhere

<comment><USER38> One trip in which it's the journey, not the destination.

</comment></comment><comment><USER39> it's depends how loud the engine is and if it's supposed to make that noise.

</comment><comment><USER40> The daily HN dose of anti-car hysteria is here right on schedule. I can't help but think there's some deep-pocketed companies making sure that "autonomous cars are our only future!" and "there's no point in trying to get the government to spend money on roads!" are the standard refrains on this and other sites frequented by millenials.

<comment><USER41> What companies do you have in mind? I'm not aware of any organization that spends heavily on lobbyists and would stand to profit from more trains; train manufacturing is generally a small part of big conglomerates, like Siemens and GE. (This is the product of long, frustrated research on exactly that point.)

If it's self-driving cars you're thinking of instead of trains (and self- driving cars are a ludicrous solution, with all the drawbacks and none of the advantages of both cars and trains), they're a fad, and they sort of market themselves. When they fail to deliver in 5-10 years, we'll be free of that crap.

The majority of this sentiment is the millenial preference for living in cities like traditional civilized peoples, instead of out in plastic suburbs with no commerce except retail chains and no social activities except TV, Evangelical megachurches, and sportsball. Kunstler's _Geography of Nowhere_ might be worth reading on this subject.</comment></comment>


The History of a Security Hole - <AUTHOR> http://www.os2museum.com/wp/the-history-of-a-security-hole/ <comment><USER2> [https://news.ycombinator.com/item?id=17891591](https://news.ycombinator.com/item?id=17891591)</comment>


Show HN: Web-based self-development book on psychological software optimization - <AUTHOR> https://designingthemind.org/book-vip/ <comment><AUTHOR> Not your typical submission, but hopefully it still belongs here. This is a book called Designing the Mind: The Principles of Psychitecture that I spent a year and a half writing and building into a web-based reader.

You might be into it if you like books on psychology, practical philosophy like Buddhism and Stoicism, rationalist groups like LessWrong, or just general self-development. But I thought this crowd in particular might appreciate the pervasive tech metaphor and mindset. It offers a new framework for self- improvement based on the idea that our minds can be compared to software and our issues are algorithms which can be reprogrammed with the right principles and methods. You can read a longer description through the link.

It will be for sale later this year, but it's free now because I'm looking to get feedback and make improvements before the hard launch.

<comment><AUTHOR> If anyone has questions about the book/platform, I will be hanging around for the next few hours to answer anything!

</comment></comment><comment><USER2> Can I bookmark for when I actually have time to read a book?

<comment><AUTHOR> Yeah, just make sure you get to the first page of the book and bookmark that - not just the landing page.</comment></comment>


Australia's temperature record broken again. National average 41.9C - <AUTHOR> https://www.bbc.com/news/world-australia-50837025 <comment><USER2> This is staggering. The average national temperature was broken on consecutive days, by a total of 3°F. I am a pessimist regarding the climate and I'm shocked by this.

</comment><comment><USER3> To give a sense of the scale of this, I've spent the last few days coughing because of the smoke from a wildfire that's burning 500 miles upwind of me. And summer has only just started.

</comment><comment><USER4> Here in Adelaide, South Australia, we could have had a record high minimum temperature (Actually we kind of did, West Terrace vs Kent Town), however a short burst of slightly cooler air at about 10:30pm of around 33C has masked the fact that the morning low temperature was 35C. This is probably more typical of the desert, but we're on the coast.

</comment><comment><USER5> Now more than ever a change in the way large-scale agriculture is done in Australia needs to be rethought, as this, in large part, is responsible for the inability of the land to respond to climate change. cf Charles Massy

</comment><comment><USER6> Conservatives believe that nature is designed such that it is impossible for unregulated modern industry to impact it in ways that would be harmful to the human race.</comment>


Samsung Patent Describes Holographic TV Technology - <AUTHOR> https://consumerist.com/2016/11/14/samsung-patent-describes-holographic-tv-technology/ <comment><USER2> It is not like princess Leah. The diagram shows the image projected into the fustrum between the screen and the viewer rather than hanging in space and viewed perpendicular to the light beam. To do that you'd need to make the photons turn sideways in the air or originate new photons by sparking the air to draw videos.</comment>


4 ways to avoid a Rick Perry meltdown during a presentation - <AUTHOR> http://www.inc.com/articles/201111/4-ways-to-avoid-rick-perry-presentation-meltdown.html

<comment><USER2> Maybe they forgot step 0 in Perry's case: have an actual plan that you're actually working on, rather than speaking from memorized bullet points.</comment>


Corecursion - <AUTHOR> https://en.wikipedia.org/wiki/Corecursion <comment><USER3> This is the missing piece from my mental toolbox. I wish I'd known about it years ago.

Co-recursion is a principled way to turn a top-down algorithm into a bottom-up one. For instance, in Haskell, it's easy to write the fibonacci series from its definition:

        fibonacci 0 = 1
        fibonacci 1 = 1
        fibonacci n = fibonacci (n - 1) + fibonacci (n - 2)

But this is ridiculously inefficient. Until now, the only "principled" way I knew of to transform this into something sensible was through memoization, but that's still very wasteful.

With co-recursion in my toolkit, I can transform this into a form that generates the whole series as a stream:

        fibonacci_series = 0: 1: more fibonacci_series
          where
            more f1: rest@(f2: _) = f1 + f2: more(rest)

And thanks to Haskell's lazy, garbage collected semantics, taking the nth element of the series (remembering to drop data I don't need) turns out to be equivalent to:

        fibonacci n = fib n 0 1
          where
            fib 0 a b = a
            fib n a b = fib (n-1) b (a+b)

Which is what we wanted. :-)

<comment><USER4> > But this is ridiculously inefficient.

I'm sorry, but I don't understand this. How is that inefficient?

<comment><USER5> Here is the call stack for 1, 3, and 5

        fib 1
          1

        fib 3
          fib 2
            fib 1
              1
            fib 0
              1
          2
          fib 1
            1
          3

        fib 5
          fib 4
            fib 3
              fib 2
                fib 1
                  1
                fib 0
                  1
                2
              fib 1
                1
              3
            fib 2
              fib 1
                1
              fib 0
                1
              2
            5
          fib 3
            fib 2
              fib 1
                1
              fib 0
                1
              2
            fib 1
              1
            3
          8

The number of calls grows exponentially. Roughly 1.618^n, to be specific.

<comment><USER6> Haskell is lazy and pure, why can't it auto memoize for us so we can code it like we would in math?

<comment><USER7> A while ago, I asked exactly that question:

[http://stackoverflow.com/questions/5749039/automatic- memoizi...](http://stackoverflow.com/questions/5749039/automatic-memoizing-in- functional-programming-languages)

I think the answer is basically that there is no good heuristic about what to store, how much and how long.

<comment><USER8> > I think the answer is basically that there is no good heuristic about what > to store, how much and how long.

In Python you can just put a @memoize decorator before a function you want memoized; would it be possible to have something similar in Haskell?

<comment><USER7> Yes, see here: [http://www.haskell.org/haskellwiki/Memoization](http://www.haskell.org/haskellwiki/Memoization)

Note that in Python, you also have the issue that you still need to specify some cleverness about how long something is stored and what is stored. Many example memoize implementations just store everything (e.g.: [https://wiki.python.org/moin/PythonDecoratorLibrary#Memoize](https://wiki.python.org/moin/PythonDecoratorLibrary#Memoize)) but of course that is not a solution in practice.

<comment><USER9> I don't think the methods mentioned in the haskell wiki are quite equivelent to the python decorator, as they require you to modify the data structure itself to support memoization.

It should be possible to use UnsafePerformIO to create a generic function memoize function (at least for inputs that implelemt Eq or Ord), but that is almost definantly overkill and asking for space leaks.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER5> Some places I find myself using corecursion:

Minimax algorithm: [https://en.wikipedia.org/wiki/Minimax](https://en.wikipedia.org/wiki/Minimax) (I actually generally use negamax, the non-corecursive version, but you should understand minimax first)

"Tying the knot" in Haskell

That is, it's possible to create circular lists in Haskell like so:

        let x = 1:y    -- x = 1 cons y
            y = 0:x    -- y = 0 cons x
        in x           -- return x

Which will return an infinite list of alternating 1's and 0's which only take up 2 ints (and pointers) worth of memory. Calling the millionth index merely runs in circles around the list until it's followed a million pointers.

EDIT: Minimax is mutual recursion, not corecursion, whoops.

<comment><USER10> > Minimax algorithm: > [https://en.wikipedia.org/wiki/Minimax](https://en.wikipedia.org/wiki/Minimax) > (I actually generally use negamax, the non-corecursive version, but you > should understand minimax first)

That's _mutual_ recursion, not corecursion. Check the article out, corecursion has a much more... "mathematical" definition, relating to the types of initial data and final data.

By my quick reading, your second example might be considered corecursion (but I think is also just regular recursion). It might not be considered recursion at all, in this particular sense, as it's only one piece of infinite data, not a function that takes an input. I'm not the best algebraist though.

<comment><USER5> You're correct about the minimax.

The second example is corecursion, I believe. The article specifically mentions

> Corecursion can produce both finite and infinite data structures as result, > and may employ self-referential data structures. Corecursion is often used > in conjunction with lazy evaluation

</comment></comment></comment><comment><USER11> Analogies are lossy but one way to think of corecursion/recursion is that corecursion turns the seed into a maple tree and recursion eats the tree's branches and spits out a table leg or something. Corecursion is generative and (structural) recursion aggregates/builds. You corecursively generate a possibly infinite stream while you recursively turn a finite list of numbers into their sum.

Other places you've probably already seen corecursiveness: Power Series in calculus, automatons in computer science and in the close cousin that is the so called map in MapReduce TM.

Programming with just (primitive but on higher order functions) recursion and corecursion is the basis of Total Functional Programming which, while not Turing complete is still very surprisingly powerful.

<comment><USER12> What are the restrictions on combining primitive recursive and co-recursive functions in total functional programming? Clearly, "repeat" is primitively co-recursive, and "length" is primitively recursive, but "length . repeat" is non-terminating.

<comment><USER13> length . repeat won't type either. Briefly, recursion and corecursion have the following types

        cata : (f a -> a) -> mu f -> a
        ana  : (a -> f a) -> a -> nu f

where `mu` is the "least fixed point" of a base functor f and `nu` the "greatest fixed point". In non-terminal, non-strict languages `mu f == nu f`, but in total languages they don't. We call types of the form `mu f` data and types of the form `nu f` codata. Data is guaranteed to be finite while codata is not.

<comment><USER12> Thanks. Is there a way to type something like take 5 . repeat? Or more generally, how do you make use of codata in these languages?

<comment><USER14> My understanding is that there's nothing wrong with _using_ codata - <USER2> problem is with _recursing on_ codata ("problem" in that you're stuck generating codata). Something like "take n" can produce data when reading codata because the recursion happens partly on data (in this case, n).

I'm sure tel will let me know if I've made a misunderstood something.

<comment><USER13> That's pretty much exactly it! The other thing to note is that the reduction semantics of codata are to... just sit there until it's consumed.

If you use Haskell you get the idea that codata just expands and expands because of the behavior of the repl and laziness. Sometimes, a better intuition is that it's more like a Python generator which must be yielded explicitly (by a recursive algorithm recurring on some data).

</comment></comment></comment></comment></comment></comment><comment><USER15> Am I misunderstanding this? reading all the examples, the difference between recursion and corecursion seems to be equivalent to the difference between tail recursion and stack recursion. Is that right?

can anyone post an example of corecursion that is stack recursion? or is there something else that needs to happen to qualify something as corecursion?

<comment><USER13> Those are just at different levels of meaning. I don't think there's a direct relationship between stack/tail recursion and recursion/corecursion.

To get a brief feel for the difference consider the "type function":

        T x = 1 + x

where 1 is the type with only one value and the type (X + Y) is the tagged union of types X and Y. We might decide to talk about the type "iterated T" as the type

        IT = T (T (T (T (T (T ...))))))
           = 1 + (1 + (1 + (1 + (1 + ...))))))

If we tag "left" values with Inl and "right" values with Inr and take * to be the only value of type 1, then values of IT look like

        Inl *
        Inr (Inl *)
        Inr (Inr (Inr (Inr (Inl *))))

which looks a lot like the Peano Naturals. Now, a recursive definition on IT looks like

        cata : forall x . (T x -> x) -> IT -> x

and a corecursive definition looks like

        ana : forall x . (x -> T x) -> x -> IT

In other words, recursion occurs by constantly pulling "layers" of type T off of values of IT while corecursion occurs by adding "layers" of type T on to seed values to build an IT.

We can convert IT to natural numbers by using cata

        cata (\tx -> case tx of { Inr * -> 0; Inl n -> 1 + n })

and we can invert that conversion with ana

        ana (\x -> case (x > 0) of { True -> Inl x; False -> Inr * })

and we can build the "infinite" structure omega with ana

        omega = ana (\x -> Inl x)

<comment><USER15> Wow, thank you so much for your answer. it definitely helped me understand better!

</comment></comment></comment><comment><AUTHOR> I posted this since I didn't know it had a name.

<comment><USER16> You might consider taking a look at the recursion schemes section of my guide here: [https://gist.github.com/bitemyapp/8739525](https://gist.github.com/bitemyapp/8739525)

</comment></comment><comment><USER17> Can anyone help me understand how this is different from calculating something iteratively ?

I was reading SICP the other day where they introduced the idea that a process is fundamentally iterative if you just need a few variables to always keep track of the state of the computation.

So tail recursion is iterative and this looks the same. So then why is it called recursion ?

Im a bit confused about this.

<comment><USER18> With recursion, we can define something in terms of itself. For example, this is recursive:

        f(n) = f(n - 1) ++ f(n - 1)

Here I'm using "++" to denote list concatenation. Unfortunately this 'diverges', ie. trying to calculate f(x) for any x will keep going forever. There are two ways around this; the first is generally just called "recursion", and it involves fixing a particular "base case", which cuts off the calculation before it becomes infinite, hence causing our function to terminate.

We can do this as follows:

        f(0) = [NULL]

Where "[NULL]" is a list containing NULL. Now we can calculate f(x) for any positive x:

        f(1) = f(0) ++ f(0)
             = [NULL] ++ [NULL]
             = [NULL, NULL]

        f(2) = f(1) ++ f(1)
             = [NULL, NULL] ++ [NULL, NULL]
             = [NULL, NULL, NULL, NULL]

And so on. This kind of code can consume a hell of a lot of resources though, so we may prefer to only write a special kind of recursive function called tail-recursive. Here's a tail-recursive function:

        g(n) = g(n-1)
        g(0) = [0]

This "g" function uses recursion in the same way as "f", but notice that we can switch from calculating g(n) straight to g(n-1), ie. we only transform "n", not g(...). This means we can calculate g in constant space, since we just transform n again and again. Compare this to "f", where we need to calculate f(n-1) separately, then combine the results. Also notice that we don't know anything about the value of "g(x)" until we've finished going down the chain and hit "g(0)".

The other way of preventing divergence is corecursion, which the linked article describes. Here, we must generate a little bit of output before we're allowed to recurse. For example:

        h(n) = cons(n, h(n+1))

This will not terminate, but it _will_ give us some output; specifically:

        h(0) = cons(0, cons(1, cons(2, cons(3, ...))))

We can't "finish" calculating this list, but we don't need to in order to use its elements. We say this function "coterminates", and that it generates "codata".

One interesting fact about co-recursion is that we can turn any diverging function into a coterminating one:

        i(n) = Later(i(n + 1))

This will give an infinite codata structure "Later(Later(Later(Later(...))))". We're effectively breaking down our calculation into steps; after each step, if we're finished we can just give back the result. If we're not finished, we give back a "Later" containing the result of the rest of the calculation.

This forms a really nice structure called the Partial Monad :)

<comment><USER17> Thanks for the explanation.

</comment></comment></comment><comment><USER19> Can anyone say if the difference between recursion and corecursion is the same as the difference between recursive process and iterative process as described in SICP? They seem the same to me. It also seems to be related to the bottom up solving method of dynamic programming.

<comment><USER20> To me, it seems the same as the distinction made in SICP.

As for DP, I think it also comes very close to being the same as the above two. The one difference I can think of is that with DP you often have access to the entire build-up data structure you are creating, rather than only the latest (previous) level you have with an iterative process.

</comment></comment><comment><USER21> In Clojure you can generate the Fibonacci sequence with

(def fibs (lazy-cat [0N 1N] (map + fibs (rest fibs))))

which is an example of (memory consuming) corecursion that I managed to sneak into _two_ recent articles:

[http://arstechnica.com/science/2014/05/scientific- computings...](http://arstechnica.com/science/2014/05/scientific-computings- future-can-any-coding-language-top-a-1950s-behemoth/)

and

[http://lee-phillips.org/lispmath/](http://lee-phillips.org/lispmath/)

(I did not come up with this.)

<comment><USER5> Similarly in Haskell:

      fibs = 1:1:zipWith (+) fibs (tail fibs)

</comment></comment><comment><USER22> Corecursive factorial in javascript: [https://gist.github.com/i/f75f21f6c56eb55c414c](https://gist.github.com/i/f75f21f6c56eb55c414c)

</comment><comment><USER23> Isn't this just bottom up DP?

</comment><comment><USER24> This is usually how you codify a dynamic programming algorithm. Good to know that there's a name.

</comment><comment><USER25> Isn't this just the same as Dynamic Programming?

<comment><USER26> > Isn't this just the same as Dynamic Programming?

The two concepts are very related. I would say that corecursion is more low- level and more general. It's also true that DP is not really a computing term. DP is an optimization technique which, when performed using a computer, is often coded using corecursion.

See the comment by chriswarbo[1] for both an excellent explanation and some examples that I don't think we would call DP.

[1] [https://news.ycombinator.com/item?id=7721390](https://news.ycombinator.com/item?id=7721390)

</comment></comment><comment><USER27> This sounds like the algorithmic counterpart to proof by induction.

<comment><USER18> Actually proof by induction is equivalent to recursion. Corecursion is equivalent to, believe it or not, proof by coinduction ;)

</comment></comment><comment><USER28> so, generating fractals would be co-recursive then ? :)</comment>


Introduction to Learning Rates in Machine Learning - <AUTHOR> https://heartbeat.fritz.ai/introduction-to-learning-rates-in-machine-learning-6ed685c16506 <comment><USER2> This is an extremely poor article. I appreciate the efforts towards democratizing machine learning... But without sounding like a gatekeepr, there's a limit to this. Reading an introductory material on convex optimization will give you a better understanding of what a learning rate is than all these hyped "AI for noobs without math" blog posts.

<comment><USER3> I'm totally in agreement with you here. The issue is that many of the people writing these posts are in the process of learning themselves and don't know what they don't know (Dunning-Kruger effect) and because they skip over a lot of the theoretical details it is very easy to have missteps. Having a decent theoretical basis is absolutely necessary to be anything beyond a hobbyist in ML.

</comment></comment><comment><USER4> Is there any particular reason why we have conversations on learning rates and not simply use a line-search that finds a point that satisfies the strong Wolfe conditions?

[https://en.wikipedia.org/wiki/Wolfe_conditions](https://en.wikipedia.org/wiki/Wolfe_conditions)

Unless I'm missing something, optimization theory and practice tells us concretely how to guarantee convergence.

<comment><USER2> Line search is expensive. It costs you 1 pass over the data just for function evaluation. Also, there's only theoretical guarantees in convex cases (and even in these cases, details get murky if you look at L-BFGS and its treatment in Nocedal optimization book for example). Most modern neural networks are optimized over non-convex loss functions and through SGD optimizers which prove to be extremely effective because they make quick progress for super cheap (mandatory plug to this classic NIPS paper: [https://papers.nips.cc/paper/3323-the-tradeoffs-of-large- sca...](https://papers.nips.cc/paper/3323-the-tradeoffs-of-large-scale- learning.pdf)).

<comment><USER4> I suppose I don't follow. Strong Wolfe conditions do not require convexity in order to guarantee convergence. If I recall correctly, the requirement for convergence is that the gradient be Lipschitz continuous, not convexity, which should be Theorem 3.2 in Nocedal and Wright's book that you referenced.

As far as expense, yes, there is a cost for a line-search. However, machine learning algorithms typically use automatic differentiation (back-propogation) in order to calculus the derivative. This is far more expensive than a function evaluation. As such, in optimization, we generally try to use cheaper computations such as a function evaluation to better capitalize on expensive calculations like the gradient. Essentially, it seems like using a learning rate rather than doing a line search means we're wasting a huge amount of information and doing something that's not guaranteed to converge even if the underlying functions were convex, which they're not.

<comment><USER5> There are a few inaccuracies here: using automatic differentiation basically makes computing the gradient of the objective function as efficient as computing the function itself. But the main goal of algorithms being used in machine learning nowadays (stochastic gradient descent and variants thereof) is to avoid having to compute the objective function or its gradient altogether: instead, the gradient is computed at a single data point (example) which provides an approximation of the true gradient.

The important thing is that what is considered expensive is not to compute the objective function or its gradient, but to compute it _over the entire dataset_. Line-search would require evaluating the function (and its gradient) over the entire dataset several times, which completely defeats the purpose of stochastic gradient descent.

One could imagine doing a line search using the approximate function or its gradient (coming from the evaluation at a single data point) as the basis for a line-search, but intuitively it does not make much sense to fine-tune the step size to a single example, and this would in any case destroy the guarantees provided by the Strong Wolfe conditions.

Finally, there are convergence guarantees for stochastic gradient descent with fixed learning rate when the objective functions are convex.

<comment><USER4> I don't believe this to be entirely accurate:

1\. Reverse mode in automatic differentiation is not as efficient at the function evaluation. Even discounting certain costs, and depending on how you count, the theoretic cost is 4-5 times a function evaluation. Practically speaking, operator overloading approaches run somewhere between 20-40 times function evaluation whereas source code transformation tools run at 10-20 times. This is fantastic, but the function evaluation is cheaper.

2\. I also don't believe that stochastic gradient descent requires the entire function and gradient to be revaluated in the manner that you describe. One way to view stochastic gradient descent in the context of least squares fitting is through the use of Johnson-Lindenstrauss, which means that the data set can be randomly projected once per iteration. This means that the gradient and line-search parameters can be consistently evaluated at the per iterations level. Practically speaking, this means we randomly add our data together and then proceed as normal changing the randomization each iteration. As such, there should not be an increase in cost by doing a line-search over the already discounted cost.

3\. As far as if the Wolfe conditions are destroyed, kind of sort of. In order to guarantee convergence, the amount of reduction that we use must also be reduced. Meaning, we can't project down the data quite as much if we really want to achieve convergence. However, practically speaking, I believe it to matter, a lot.</comment></comment></comment></comment></comment>


Ask HN: Inheritance? - <AUTHOR>

Inheritance is just an implicit form of delegation that comes with a bunch of default behaviors that can totally screw you.
Of course I use it constantly and spend a ton of time "designing" everything "properly" to have a sweet class hierarchy with all kinds of unnecessary power and flexibility to solve the problem at hand.
Does anyone else find themselves sucked into that trap? It seems like when using straight C, I can still think and program in an OO style, but I don't so readily waste as much effort trying to come up with a "perfect" tree of objects. Is this simply an issue of discipline or is there a drug-like effect when using inheritance? <comment><USER2> It seems natural to overdo a new tool until you've found its best uses.

But I think the only drug is perfectionism, and it applies to anything reasonably complicated. The cure is brutal honesty. How much will you _really_ be able to reuse in a sophisticated design? (Not much.) How likely is it to change? ( _Very_ likely.) Will an unanticipated new feature completely destroy your formerly-perfect object design? (Often, yes.)

One of the original thoughts behind inheritance was to manage complexity. But since code is read much more than it is written, I think of my eyes and not my fingers. Sure, I may have saved some time writing the code, and even had fun coming up with its unique design. But the next 40 or 50 times I have to go back and understand the code, and read 4 or 5 other files just to figure out what a function _does_ , I see the error of my ways.

That doesn't mean I avoid inheritance, but I strictly limit it to things where it has immediate and obvious value. I may have one parent class, and the class isn't very big. It's also not something I'm likely to share in a public header; I'll inherit from it myself, and not ask others to do the same, which avoids a whole category of hurt. :)

</comment><comment><USER3> The effect is this: it looks like real work but doesn't require you to hit compile and run the app and find that it doesn't work. It's the same with refactoring. People love doing it because you seem busy but don't have to take the risk of revealing (if only to yourself) that your code doesn't do what you think it ought.

It's one reason for the success of Java in the marketplace, there's so much scaffolding to be done that it keeps loads of people busy-looking.

</comment><comment><USER4> Yeah, I hear ya. I think everyone has that to a certain degree. Once I heard of YAGNI (<http://en.wikipedia.org/wiki/You_Ain%27t_Gonna_Need_It>), I was able to let go and just code more efficiently.

</comment><comment><USER5> <http://en.wikipedia.org/wiki/Is-a> versus <http://en.wikipedia.org/wiki/Has-a>. Usually the "perfect" tree isn't really all that perfect.

</comment><comment><USER6> You should almost never use implementation inheritance. In fact, until you have mastered designing with composition, the 'extends' keyword should be banned from your vocabulary.</comment>


San Francisco Values - <AUTHOR> http://powazek.com/posts/2686

<comment><USER2> What the hell is this article? Who is this guy, and what gives him the right to generalize about how I believe just because he happens to live in the same city as me?

Also, has he heard of the term "motherhood statement"? Because I'm pretty sure that boldly proclaiming:

 _We value love_

is one of them.

</comment><comment><USER3> > We value opportunity. San Francisco's first boom was when gold was > discovered. Its next was the web. We find new opportunities and embrace them > with gusto. That's why most of the sites you visit every day started within > 100 miles of here.

No booms between the 1850s and the 1990s? Bullshit.</comment>


Buy unwanted produce, and sell and trade your unused produce - <AUTHOR> Hey guys! We're a group of college students, and we created a design of an app that allows you to buy, sell and trade produce. Thanks for taking the time to look at our design, and providing any possible feedback!
Have you ever watched the food in your fridge go to waste? Needed graham crackers for your s'mores, but the closest grocery store ran out of graham crackers? Received a care package with food you can not eat? Fear not! Lettuce Share is here!
Lettuce Share was created with the purpose of creating an efficient sharing platform for users who want to buy, sell, or trade their food. It solves the problem of unused food going to waste. The designed app allows users to optimize their food preferences and prevents daily wastage of food.
The app was created with a simple, easy to use design. It was designed to be visually appealing and created in such a way that a first time user would have no trouble learning how to use the app! Go to http://share-1148.appspot.com/ to view the design. Thanks again for all your comments! <comment><USER2> Pretty decent app so far, but I wouldn't see much use to this app if not in a college environment. People would simply be too busy in the real world to set up a time and location to swap food. I'd rather throw away two lemons than go five blocks to swap them for something else.

If this app were to be implemented, it would be nice to be able to use my credit card to purchase new food. You should include a secure online payment system, which would make the app a ton more useful.

</comment><comment><USER3> I don't know why this app needs to exist, it's another example of how gentrified the tech community is. Food shopping is not a problem that needs to be solved. I'm sure most people are smart enough to budget how much food they should buy at the supermarket.

Your design looks amateur and it doesn't seem like you spent very much time on it at all. I think you might want to spend more time improving the design and color choice before you come back for comments.

</comment><comment><USER4> There's already an app for doing this, LeftOverSwap.

[http://www.forbes.com/sites/federicoguerrini/2014/07/28/this...](http://www.forbes.com/sites/federicoguerrini/2014/07/28/this- app-wants-you-to-share-your-leftovers-to-fight-food-waste/)

</comment><comment><USER5> As a college student, I always find myself either buying too much or buying too little when I go grocery shopping. This app would be great within a college community where people are trusted and it is easy to transport these goods around

</comment><comment><USER6> i really like the location aware function of the app! as a college student, the most important thing is convenience. I think this app would be very useful for desperate times when you're just missing an ingredient for something. the design is simple and intuitive-- I would definitely use it if it were real!</comment>


Andrew Motion wonders whether Philip Larkin had an unexpected afterlife - <AUTHOR> https://www.the-tls.co.uk/articles/public/friendly-shade-larkin-afterlife/ <comment><USER2> This is a pretty hilarious headline. But maybe we could change it to say, "an unexpected _literary_ afterlife"?</comment>


Low-Code Tool for Managing SaaS Pricing - <AUTHOR> https://manifold.co/blog/announcing-plan-builder-developer-preview <comment><USER2> Nice! I really wish I had known about this on my last project. Would have saved a lot of time and money.</comment>