Hacker Newsnew | past | comments | ask | show | jobs | submit | butteroverflow's commentslogin

This is totally off topic, but holy crap, first message in 11 years. I would have lost my password about a dozen times by now.


That answer was definitely worth the wait.

(there's a "Forgot Password" link somewhere here).

[do you always look at poster's activity? sounds time consuming.]


Maybe they already have? `youtube-dl` has been breaking a lot for me lately. I've been using the Fedora repo build for many years and don't remember it ever breaking, not once. Now in the last couple of months it had suddenly stopped working 4 or 5 times, which forced me to install the official build from `pip`, which is updated more frequently.


youtube-dl is one of those rare programs that you shouldn't download from a repository. Do this instead:

- Download from the project page and put it anywhere in your path (it's a single file)

- Subsequently do 'youtube-dl -U' whenever you want to update. It updates itself in-place with the latest release (there's usually 2 or 3 released per week)


Yes. That!

I quickly learned the difference. Downloading from YouTube breaks. No distro update. But updating only the script is quick and easy.

Initial installation is also very easy. Two one-line recipies to install it are provided. One using CURL and one using WGET.

https://ytdl-org.github.io/youtube-dl/index.html

I have been using it with ffmpeg on a google pixelbook on cruoton for over a year and love it.


What's the difference to installing 2-3 updates per week over the distro? One should be installing distro updates daily anyway.


Distro repositories can't keep up with the number or timeliness of updates. When youtube deploys an update that breaks the tool (happens on a semi-regular basis), you want access to the fix ASAP.


Greatly depends on the drivers around you. Here it'll definitely shorten your life expectancy if you're lucky, and will leave you with a nice whole-body paralysis, if you're not.

You know how motorists sarcastically refer to cyclists over here? "Crunchies", or something like that.


Also depends on the type of infrastructure available. I lived in the city until about 5 years ago and cycled everywhere. Out in the bush where I am now, with only narrow windy unshouldered roads (& many stoned drivers), I'd be dead in a week.


I don't have to drive on the road.

My work trip is 5 km and all the way is bike roads and pedestrian paths. One of the advantages of living in the nordics, I suppose.

I don't even wear a helmet in the summer - I just pedal intentionally slow.


> I just pedal intentionally slow

Anecdote: I was with a group of tourists and we were about to rent bikes for a guided tour. We were offered helmets, but only some were taken. Before we even departed, a girl managed to fall of her bike and injur herself. A second offer to use helmets was met with much more acceptance.


I cycle through the year. I put on my downhill skiing helmet at the first sign of autumns freeze.

Statistically speaking, dutch don't wear helmets and they don't get much injuries. It's as much about how you cycle and what the routes are like than having or not having a helmet.


We have these old Windows admins now learning to work with Linux. What drives me insane is their habit of randomly rebooting machines if something isn't working right. There is a problem with a Linux box, they ask you to take a look at it, you SSH in, type "uptime"... bam, it's two and a half minutes. A lot of precious diagnostic information has been lost.


This Reboot-to-Fix mindset encroaches on other domains as well. My car had a weird issue when it would't pair to the phone, auto-technician: "reboot!" Someone here say that I'm probably a *nix admin vs a Windows user, and that's true, but every time I try to do adminsy things on a Windows box, the tools are just not there, or the interface to the tool is like controls in an alien spaceship. I find myself completely and hopelessly lost. Trying to find stderr, stdout, logging, grepping, finding, the tool to work with PKI certs, all fearsome in their inscrutability. Are there Windows kernel old-timers who can help me with the learning curve? No. Most Windows admins don't have a habit of digging deep because that's not the culture, because the tools weren't/aren't there. And reboot fixes most things on Windows.


alias reboot='echo "This is not Windows!"'

Real Linux admins know how to invoke the real 'reboot' command.


Make sure to set SSH to log in directory to vim. Unlike Real Linux admins know how to quit vim so it will be no issue for them.


Wouldn't their login session end after quitting vim?


Yes, but you can get to a shell without quitting vim. <esc>:sh


Oh please, they started Gnome and used the shutdown command from the menu.


init 6


With the growing ubiquity of the linux port of svchost.exe(systemd), nested hypervisors, containerization, et al. Rebooting (where feasible) has already become a front line option.


Yeah, you "only" need to avoid undefined behavior. What do we need ASAN/UBSAN for then?

https://github.com/google/sanitizers/

Sure, Google is primarily a C++ shop, you could say that C++ is to blame and it has nothing to do with C.

But why the need for KASAN then? Which has a big track record at this point, by the way.


There are developers at google (most likely in increasing numbers) that would look like a deer caught in the headlights when asked to work on a C++ part of the code base (anecdotally according to a guy working at Google)


The level of comfort also heavily depends on the level of humidity, doesn't it? Seems pointless to compare temperatures only.

Would love to get all the complainers here to spend one month in winter where I live. We frequently have -35 to -45°C outside, and +30-35°C inside. How about a 70°C temperature difference?


That sounds like the city is a power outage away from severe hypothermia or death, depending on the insulation of buildings. How are system failures handled?


> How are system failures handled?

By prayer. It happened a couple times, although not yet on the city scale.

I don't personally know anyone who was affected. What they did, according to the local press, was stuffing every crack and cranny with old rags and sleeping fully clothed (as in fur coats and the like) and under as many blankets as they could get their hands on.


If temperatures frequently get below -30C in the winter, one would think that getting a proper sleeping bag rated for that would be a no brainer.


It's extremely rare for heating to fail. I don't know of anyone who would've prepared specifically for this in Nordic countries.


It's not only for heating to fail. If your car breaks down in the middle of nowhere you could be in for a bad time if you cannot stay warm.

It's standard advice to keep blankets or the like in your car for this specific scenario. Besides, for the majority of people in the Nordic contries, their normal winter comforter is warm enough to keep them warm should the heating fail.


I had to go to one of these cold places once for a couple of weeks. The car I was given was a modified Toyota Land Cruiser with two 100 liter tanks, additional insulation, additional battery inside, Webasto heater for both inside and engine compartment. It was also stocked with some useful stuff in case you do get stuck out in the middle of nowhere.

Those people were ready, when you live your whole life in such environments you quickly get "infused" with a lot of experience that was accumulated over generations.

So I'd be more worried about people in a regular country getting severe low temp weather than a failing heating system in one region used to extreme cold.


That is normal advice for the UK even in the part wear heavy snow is rare.


Why is it so warm inside?


We have city-wide central heating system. If you don't pump (literally) boiling water into the system, it gets pretty cold in apartments furthest from the heating station. I live somewhere in between, so it gets even hotter the closer you live to the station. What do people do to combat this? They open the windows, and it's -40°C outside. This further lowers the efficiency of the whole system, so they get the water temperature even higher. Rinse and repeat.

Of course, instead of opening the windows, you could always install a gate valve (or whatever it is called in English) and close it to make the water go through your apartment's heating elements without actually (mostly) heating them, and that's what they recommend, but why bother? The level of self-entitlement of many people here, you wouldn't believe. I could tell stories all day long.

Like a caricature of a stereotypical American tourist.


Copenhagen has the same system (it's actually steam that is piped around the city; gases are much easier to move than liquids). It's called district heating.

In the basement of my building there's a heat exchange, which uses the steam to heat water. This water is piped around the building.

My fairly new apartment has a meter fitted on that hot water pipe. It measures how much heat I extract from the water, and I'm charged accordingly.

In some older buildings, they have some sort of temperature logging device on each radiator. I assume this is to charge the residents according to their usage.


Minor thing, but Copenhagen is odd with the steam. They're in the process of moving to hot water.

The trend is towards heating the water less, houses are getting better insulation, less energy is needed, and the hotter water is more expensive when heated by a heat pump and also in losses.


That sounds ridiculously ineffeicient. My post-Soviet city has district heating, and similar temperatures, but usually bottoms out at -35c.

In each building there is a system which takes the district heat and uses it to heat the water of the building. Both hot tap water and central heating. But the water is separate from district heat, so in each building the temperatures can be adjusted.

In older buildings you still have the issue you describe on a macro level - apartments on the bottom floor are too hot, and on the top are too cold - but it doesn't matter how close or far your building is from the district heating station.


Yeah, they've been talking about implementing something like that for as long as I can remember. The current system wastes so much heat that it's always 10-15°C warmer in the city than outside its borders.

I mean, how much coal do you have to burn to warm the air outside by 10-15°C?

I am from an ex-Soviet city too, by the way.


I think whoever is responsible for such a waste of resources should be held accountable for severe damage to the environment and the climate system.


By whom? They are given a job to provide heat for the city - and they are doing so. The people telling them to do that job are probably also the same people unwilling to schedule any budget to upgrade the system so make it more efficient.


They are long retired or dead by now


Thermostats have been around for a hundred years or so. Could solve the problem...

What I've heard is that some portion of pension is given as free heating. So it makes no sense for the individual to conserve it. Giving it as money and then billing for the heating could create some other problems too.


I am not sure about pensions, but we pay quite a lot for heating. We do it every month and all year long, actually, because money management is a problem for many, and if you shift all the payments to one season (which is 4-8 months, depending on the weather), each monthly payment would be a problem for many. So they stretch it out across the year.


In which nordic country do you live? Im swedish and we have centralized water heating, and to me it sounds insane that people where you live does not have gate valves. The only time I heard of someone without that was when a friend changed the heating system in his building, and that was like a week of high temp. 30 degrees inside during winter sounds totally insane. Here we discuss that we should lower from 23 in the winter to save resources.


Well, here's what people over here tend to live in:

https://en.wikipedia.org/wiki/Khrushchyovka

These buildings were developed in massive numbers back in post-WW2 years, across the whole Soviet Union. with the task to move people out of barracks in some sort of relatively comfortable housing. Back then there wasn't much money to spare (still isn't). They typically have pretty bad insulation and are built out of, as we say, "cardboard" walls.

When it's cold enough outside (-35°C and lower), you can see the energy losses with a naked eye, as hot air escapes through every crack in the building (and there are a lot of them). No need for thermal cameras.

People over here just don't give a fuck about nature. Now it's the middle of summer, it's +33°C outside. I am sitting in the office with two ACs running at full capacity and with all windows open, because "there isn't enough air". I tried arguing with this, but it's pretty difficult to go against all my coworkers at once. It's a cultural problem, and I have no idea how to fight this.

Thanks for the sanity check, though, at least I know it's not me going crazy.


  > I am sitting in the office with two ACs running at full capacity and with all windows open, because "there isn't enough air". I tried arguing with this, but it's pretty difficult to go against all my coworkers at once.
What is your solution? To close windows and enjoy excess CO2?

When people complain about not having enough air it's almost always mean that ventilation system in building is insufficient and there in fact too much of CO2.


Sure. They don't seem to have any problems in the middle of winter, when windows stay fully closed for at least 3 months each year.

About a half also smokes, and then they "don't have enough air".

By the way, the office faces an arterial road, as they are called, with heavy traffic right outside. When you open a window, it fills very quickly with traffic fumes. This gives me persistent headaches almost every day.

Is it really better than CO2?


  > They don't seem to have any problems in the middle of winter, when windows stay fully closed for at least 3 months each year.
It's very much possible that during the winter ventilation performs better since there is hot air inside and cold outside. Or your office building just have similar hot air loss as your housing and it's helps to remove excessive CO2. Thermodynamics huh.

Also oxygen consumption and overall feel can be affected by temperature of environment.

  > About a half also smokes, and then they "don't have enough air".
No surprise since heavy smoker lungs and hearts often perform worse and they going to be more sensitive to CO2. It's even worse if they're overweight or have other health issues.

  > Is it really better than CO2?
I cannot say without some kind of measurement, but I guess yeah: even if there is massive road outside it's could still be better than staying with constantly high CO2. It's can be worse long-term for your health, but to be productive human brain need oxygen and many people more sensitive to CO2 level than others.

Personally I don't smoke and have healthy lifestyle, but I still extremely sensitive CO0 and without proper ventilation I just can't work efficiently if at all. So any room I stay in will always have open window no matter if there is AC working or not.

So it's great that you don't have same issue, but please keep in mind that people not just imagining things. Yeah they can quit smoking and watch their health, but CO2 is still extremely important. If you don't believe me rent some air quality meter and check it for yourself.


Thanks for the detailed response. I don't deny that it might be difficult for someone to work without ventilation. I simply find the air outside extremely irritating to my throat, nose, and upper airways. This "fresh air" frequently gives me headaches, which rarely happen if it is kept outside. I wasn't prone to headaches at all before I started working here. I rarely open windows at home and feel fine. It seems to be a no-win situation, and the better solution for us is to part our ways, which I am working on.


I mean I live near the ocean so it’s almost always pretty humid.


Where do you live exactly? What is the source of this heat energy?


Sorry, I've spent enough time on the internet to know never to share any specific personal details.

It's cheap low-quality coal with high sulfur content. The level of air pollution it produces is insane. In winter time you can feel the taste of coal on your tongue. The level of visibility is like 150-200 meters, after that it's a solid grey wall. Nobody here cares though, and if you do, you pick up your things and move elsewhere. That's what I am currently preparing to do.


Very curious to know where this is. The most I've seen similar to this is above ground City-wide piped sewage and water in Inuvik.

You'd have to be in a pretty small community, not a City, in maybe NU?


I think it's much more likely to be somewhere in Russia, Kazakhstan etc.


Yes, ex-Soviet [1]

"I am from an ex-Soviet city too, by the way."

https://news.ycombinator.com/item?id=20322435


>The windows are small, and covered in metal bars or thick metal meshing

Shouldn't that be banned by fire hazard regulations?


So? The same script reports 11 lines on my 4 year old Haswell. It should read as "mitigated or not vulnerable" instead of simply "not vulnerable".

Edit: oh wait, it's actually 12 lines, the same as on your system. The reason it reported 11 on the first run is because KPTI has been disabled manually here.


:) I grepped for the wrong thing. Here's a better version:

   $ sudo spectre-meltdown-checker | grep "Not affected" | wc -l


   On Skylake: 0
   On Ryzen  : 10
I don't have an Ivy Bridge CPU to test this on, but AMD has suffered from _significantly_ fewer number of vulnerabilities than Intel, not just "one more" as the top commenter suggested.


I see you're using the default prefix (C-b), with C-a being the 'recommended' alternative. I don't understand why it's so popular, as it breaks emacs-style navigation in readline applications, which is great for fixing typos/changing something in one of the previous commands.

I remapped my prefix to C-q. It's a relatively useless key (who needs flow control these days?) and it's close to the number row — you can press it and then quickly get to a number key.


C-a also breaks Emacs-style navigation in readline applications (jump to beginning of line, a pretty useful function). And of course it breaks navigation in Emacs too (which I frequently use over SSH). C-q is also useful in Emacs, so my tmux is remapped to use C-^ as the prefix key. Nothing useful sits there for other programs, and I personally don't need the tmux prefix often (I do 90% of things straight from Emacs, and it has its own windowing capability).


screen uses ctrl-a, so it was easier for people switching to tmux. Never did figure out why it was chosen for screen back in 1987. Emacs was around for 10 years by then but GNU Readline wouldn't be released for a few years yet.


I use ctrl-_ which is generated by "ctrl 7" or "ctrl /" on the terminal emulators I use (xterm and iTerm.app)


>PHP

Oh no, don't even put them in the same sentence. I am no fan of Go, but its error handling approach is beautiful compared to PHP. Every time I call an internal function I have to go through the docs — does it return a NULL, an int, a boolean, or something else? Does 0 signal an error condition, or is it a valid value? Do I have to perform a strict check for NULL/false then? Or is it -1 (see link below)? The situation is generally better with third-party libraries though — they tend to just throw exceptions (if that matches your definition of "better").

https://www.php.net/manual/en/function.openssl-verify.php


Rightly or wrongly, many PHP functions are thin wrappers around third-party C libraries and they tend to return values without interpretation of the results.

For your example of openssl_verify see https://linux.die.net/man/3/x509_verify_cert

It can certainly be confusing but at least it is documented.


I'm curious who it was who first started implementing those wrappers and thought "Yeah, this is good enough."


The late '90s and early '00s were a strange time. It had plenty of shotguns aimed at feet and no one to suggest a better approach. At least no one with enough reach.

Also [1]:

>> "I don't know how to stop it, there was never any intent to write a programming language [...] I have absolutely no idea how to write a programming language, I just kept adding the next logical step on the way"

I assume he's better at it 16 years later.

[1] https://en.wikipedia.org/wiki/PHP#History


PHP is a bit of hyperbole, but otherwise correct. :) Ruby, Python, Javascript all support exceptions. PHP does support exceptions, but it's core libraries do not use them. Gotta trust PHP to do the worst of both worlds approach. Perl 6 has it but not sure where the world is in the 5 -> 6 migration. I'm not going to count eval(...) as exception handling as a language feature in Perl 5. :)


I'm not going to count eval(...) as exception handling as a language feature in Perl 5. :)

You should. It's a perfectly valid exception handling mechanism. It's unfortunate that the name "eval" is overloaded for two separate behaviors:

  * catch exceptions thrown as strings or objects

  * compile and execute code from a string
Other than the name, they're different behaviors.


I am not a Perl expert. Only worked on some simple install tools written it a couple years ago. Re-reading docs, eval(...) traps exceptions (die), but requires manual inspection of error state, instead of automatically halting. It operates more like Go/C/PHP in that regard.


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

Search: