I'd like to believe this too, but given that medieval peasants and antique slaves worked more or less the same hours as we do I'm quite pessimistic. Whenever we automate something they just come up with a new bullshit job that adds nothing to the standards of living, instead of reducing the workload for everyone.
When people didn't have ipad pros but could afford rent/mortgage and 3 kids on a single paycheck ?
We're flooded in useless shit but can't afford the basics. So yes, underfloor heating, smart light bulbs and google maps are great but is it really all there is to life
The real cost of food has steadily decreased for the last 200 years. (Much of the decrease was before 1980, though.) Here in Canada, one hour of labour at minimum wage, will buy you a 10 kilogram bag of flour, or 4 litres of cooking oil. That's enough calories for days. That is insane buying power compared to the historical norm, right into the 20th century.
My grandfather was born in western Europe, in what is today one of the wealthiest countries in the world. He was one of 14 children (of whom 8 survived), born to an illiterate peasant on a rural farm. This was pretty normal. You may have a retroactively gentrified image of what America was like in the 1940s - nearly half of homes didn't have an indoor toilet or electricity at the start of that decade.
I'm 200% positive that both my grandparents and great grandparents had it better in pretty much every aspect (job security, housing, future perspectives) than we currently do. We have unlimited bread and circuses but scratch the surface and we're worse in every other aspects: I couldn't afford 14 kids even if 10 died instantly.
Housing is insanely expensive. in US, healthcare costs are through the roof as well.
The only way I see long term housing becoming affordable is heavy taxes on single family homes as investment properties. Also open up zoning and allow builders to build.
Also naturally less kids, means less humans, means less demand.
Unless your great grandparents were born after world war 2, they had it worse in every aspect. People starved in the Great Depression. The only people who starve today are those who refuse to ask for help.
Infant mortality back then was atrocious, my grandpa had two (out of 13) siblings die at birth. He grew up working on the small family farm that was the family’s primary food source with the little excess produced sold to buy supplies for it. A bad harvest meant the whole family starving for months. Healthcare was essentially non-existent.
Step into the 50s during the baby boom and the huge economic boon that came from the post war rebuild and things started to look up, but they were still crap compared to today.
The houses they could so easily afford looked quaint but were absolutely trash quality on average. The ones left today are the nicest from that era. The average ones were gone by the 70s. That’s available today too, go get a manufactured home and it will be roughly the same quality but with better insulation, plumbing and electrical.
>I couldn't afford 14 kids even if 10 died instantly.
You absolutely could if you fed, housed, treated, and schooled them the way they were back when this was common.
Job security was also terrible back then. There was a reason unions were more popular.
You’re really getting a rose colored view of the past and I’m not sure where it’s from.
There are people starving now in my community in Canada and it's not a problem of pride or asking for help... It is due to multiple issues interacting and compounding. Limited pools of volunteers for the food bank to be open, lack of funding for non profits that help with food security, increased costs of food due to remoteness, lack of appropriate housing and transport esp. for elders who end up isolated, kids bullying each other when accepting free meals at school (that was solved by making meals free for all at least) etc. I myself only started scratching the surface of the problem really.
Just need to finally tax the rich, all major human affecting industries made publicly owned or heavily regulated; water, food, housing, internet, healthcare, etc.
I couldn't afford my great grandparents house on either side of the family, I'm in tech and don't have kids (they had 5 and 2). I can't even qualify for a mortgage for an equivalent house today in the same city
Get off your fucking ass and move like everyone back then did. They didn’t all sit around and cry that they couldn’t afford to live in Manhattan where their great grandparents lived.
Imagine if the standards of living goes up even more, we have x50 better medicine, huge houses for everybody, fine silken clothes, wall-sized TVs, and gourmet truffle soup every day of the week. But everybody is still working long hours, and only get to see their kids in the morning and a few hours before bedtime.
But no worries, even more improvements are on the horizon. Within 20 years, you'll get all that, but it's gold plated, and encrusted with diamonds too. People live until they are 200, houses rotate to always face the sun, and TVs are now so big they wrap 360 degrees around the entire room's walls. But you still gotta spend most of your waking hours in an office, copying numbers from one excel to another.
Is that really that good of an improvement? Do we measure quality of living purely in material wealth, and not in the time we get to spend with loved ones, or our passions?
In the distant past, a huge proportion of our lives was spent just making sure you had food to survive on. The part where we "spend a huge portion of our lives" seems to stick, even though food is no longer scarce.
I don’t disagree with your statements, but anyone at anytime can choose to opt for more time and less gold plating. There are lots of people making these choices - check out the r/FIRE, r/LeanFIRE, r/FatFIRE communities on Reddit.
> I don’t disagree with your statements, but anyone at anytime can choose to opt for more time and less gold plating.
"Anyone" unless you're part of the bottom 80% earners, unless FIRE means being homeless you'll need more money than what most people can attain if they saved 100% of their paycheck for 30 years
You can live on half the space as average people and eat half as expensive food, that lets you FIRE on an average wage. Doing that puts you much closer to typical living standards 60 years ago where people ate home cooked food and lived in much smaller homes.
> You can live on half the space as average people and eat half as expensive food, that lets you FIRE on an average wage
Not even close, unless your version FIRE is retiring at 63 instead of 67 and still get 80% of your pension
Average salary in germany: 42k gross, 23k net
Renting a small place : 500 euros (let's say it includes heating, electricity/gas)
Let's say you only eat potatoe and drink rain water: 3 * 1kg * 2 euros/kilos = 180 euros
Good job, after 15 years you have 210k euros you can retire at ~35 years old. This money will allow you to buy a flat in a ghost town and to continue your potatoe fuelled life until you die of old age at ~90
Now remember you have to pay water/electricity/gas, health insurance, property tax, &c.
I don't know about Europe, but in the US, there are various social safety nets that work perfectly with early retirement with some planning (a topic which comes up in "povertyFIRE" circles). There's been a shift (especially in Democrat-run states) over the last decade or two toward getting rid of asset tests for subsidies, so with planning you can get things like free healthcare, reduced electricity bills, free internet, subsidized home renovations for energy efficiency, etc. while having your assets grow in tax-shielded retirement accounts. Universities for your kids generally have asset tests for subsidies, but many of them exclude your home+retirement accounts.
You can also switch to part-time in a low-stress role rather than retire completely ("baristaFIRE" or "coastFIRE"). The trick is that you don't want health benefits from your employer so that you can get much better ones from the state instead. Usually part-time doesn't qualify for benefits so that works well.
"free" health care and other benefits aren't free though, they're paid by taxes on working people, if everyone (or even 10%) retires early and ask for them it doesn't work
I'm not saying it's impossible but it certainly isn't "anyone at anytime". In France for example 48% of people earn bellow 2000 euros per months. If you play the game you have an OK life with health care, a good flat, a car, whatever... but if you want to retire before the legal age it's next to impossible, you just can't build enough savings. If you work in a big city you'll never be able to afford a flat there, if you buy cheap property far away you'll need to pay rent in the city + mortgage.
Best case scenario you'll need a 20 years mortgage, most likely 30. You cannot be in debt to more than 30% of your net income, meaning 2k net per month gives you a 600 euros mortgage, assuming 0% mortgage you can't even afford a 150k euros property over 20 years
> And defining a function that will only accept particular variant is nice
This is possible to achieve (or hack your way through, if you will) by parameterizing the type and using a nullary type (a type which is impossible to have) to exclude specific cases of a sum type. In Haskell this would look like this:
data Weather a b c = Sunny a | Rainy b | Snowy c
-- can't snow in the summer!
onlySummerWeather :: forall a b. Weather a b Void -> String
onlySummerWeather weather = case weather of
Sunny _ -> "Got sunny weather"
Rainy _ -> "Got rainy weather"
Snowy v -> absurd v
where `absurd :: forall a. Void -> a` "if you give me something you can't ever have, I will give you anything in return".
The completions don't work sometimes (for instance you don't get completion for some commands when running them with sudo) and it doesn't fall back on providing file completions if it doesn't know what other completions to provide, which is a bit annoying, but it generally works and I'm sure there are ways to fix that too.
Edit: I read the note in your dotfiles repo. Yes calling `compinit` on each shell invocation is going to be really slow. That's not how you're supposed to do it, you could at least add the `-C` flag to cache the completions. Ideally you'd also use `zcompile` to compile the cache to ZSH word code. This puts my completions initializing time at ~20ms on a lower/mid-end laptop. Additionally you can do the trick `fish` does and defer the initialization of completions until the first hit of Tab key, so the impact on shell startup time is exactly 0.
autoload -U compinit && compinit
{
# Compile the completion dump to increase startup speed. Run in background.
zcompdump="${ZDOTDIR:-$HOME}/.zcompdump"
if [[ -s "$zcompdump" && (! -s "${zcompdump}.zwc" || "$zcompdump" -nt "${zcompdump}.zwc") ]]; then
# if zcompdump file exists, and we don't have a compiled version or the
# dump file is newer than the compiled file
zcompile "$zcompdump"
fi
} &!
Using `zmodload zsh/zprof`, I can see about 50% (16ms) of my start up is compinit (its about 28ms without the `zcompile`).
Do you have any pointers for the "load on tab" idea? I didn't turn up any good results in DDG and LLMs were just hallucinating.
BTW I believe `-C` will disable some cache checking, caching is enabled by default
> To speed up the running of compinit, it can be made to produce a dumped configuration that will be read in on future invocations; this is the default, but can be turned off by calling compinit with the option -D.
> ...
> ... The check performed to see if there are new functions can be omitted by giving the option -C. In this case the dump file will only be created if there isn't one already.
Unable to edit, but this is how I handled lazy loading the completions
{
# load compinit and rebind ^I (tab) to expand-or-complete, then compile
# completions as bytecode if needed.
lazyload-compinit() {
autoload -Uz compinit
# compinit will automatically cache completions to ~/.zcompdump
compinit
bindkey "^I" expand-or-complete
{
zcompdump="${ZDOTDIR:-$HOME}/.zcompdump"
# if zcompdump file exists, and we don't have a compiled version or the
# dump file is newer than the compiled file, update the bytecode.
if [[ -s "$zcompdump" && (! -s "${zcompdump}.zwc" || "$zcompdump" -nt "${zcompdump}.zwc") ]]; then
zcompile "$zcompdump"
fi
} &!
# pretend we called this directly, instead of the lazy loader
zle expand-or-complete
}
# mark the function as a zle widget
zle -N lazyload-compinit
bindkey "^I" lazyload-compinit
}
I just want to say - thank you! I've been using ZSH since it became the default on macOS and one thing that started annoying me recently is the slow startup time. Your snippet tangibly improved that.
Do you by chance have any good resources on optimising my config further?
Beyond zprof (https://www.bigbinary.com/blog/zsh-profiling) not really I'm afraid. I did the majority of my zsh-prompt hacking 10 years ago and haven't thought about it since. That snippet could be from anywhere.
Fetching git/hg/... info is always slow, so try and speed that up where you can (as to how to do that, uhh... I know my prompt has a dirty-state check nicked from pure for speed reasons). You can also cache any `asdf init zsh` or similar to a file and do the same "run in background" trick so the next shell will have any changes.
The biggest improvement I can remember was dropping zprezto for my own much smaller config, I really did not need much comparatively. Mostly some git info and "good default" options. I use zgenom for a plugin manager but only have 3 plugins, probably I should just dump it and inline the plugins to avoid getting owned one day.
I'm shifting towards simply "not having" a home directory. Actual data is stored on other partitions, eg `~/git/project1` => `/git/project1`, `~/Pictures/Wallpapers` => `/data/Pictures/Wallpapers`, etc. The shell can be set up to spawn in some custom directory, $CDPATH can be altered for quicker navigation or completions, configurations are managed by Nix so I simply don't have a reason to look at my $HOME that often.
Programs can pollute it all they want, since I don't use it myself I also don't have to care about that.
Not fast at all in my experience. Just running (for the first time) what would take seconds with something like `asdf` could take up to half an hour with Nix.
I don't really understand the distinction between "multi-arity" and "unary" functions. In my mental model, all functions are unary, it's just that in "traditional", non-FP languages it's more common to pack arguments into tuples. That is `(a, b, c) => ...` in JS is a unary function which takes a tuple of 3 items. But the thing is, FP has tuples too (and in Haskell, with pretty much the same syntax), it's just that most of the time arguments aren't packed into tuples.
So could you elaborate to me where the distinction lies here and why is there a need to "simulate" things?
Say you are dealing with a callback mechanism that takes a function and (only) one value to pass:
function c(f, v) { ... f(v) ... }
But what you actually need this callback mechanism to call is a function that takes two arguments. No default values.
function f2(a, b) { ... }
There's no way in js that c is going to call f2 and set its b parameter to something. You can't set v to be a tuple so b will be filled:
c(f2, "value") => b will be undefined.
c(f2, [1, 2]) => a will be set to [1, 2].
you need to wrap f2 for this when calling c:
function wrapf2(b) { return f2("fixed a", b) }
Or you can make c deconstruct v, or use apply:
function c(f, v) { ... f(...v) ... }
function c(f, v) { ... f.apply(null, v) ... }
but then v always needs to be an array:
c(f, [1])
c(f, [1, 2])
c(f, 1) // fails
This is why in Javascript, multi-arity is different from unary with tuples. JS doesn't have tuples as a primitive / first-class type anyway. In some math notations we don't make the difference, but in most programming languages there's a distinction. Your model where functions are always unary but can take tuples, and (v) is the same as v, is correct (and useful when the distinction doesn't matter and is just annoying to deal with), but doesn't match the way many programming languages actually work. I believe even in most functional programming languages, (v) is different from v, you also said it.
In assembly, different parameters are in fully separate registers or stack entries. Interestingly, you could imagine representing tuples as C structs (that can have only one member) and always pass structs, and passing a one-member struct will actually have the exact same effect as passing a value of a primitive type.