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

Something you'll see in real codebases is code that cares whether an input value is "empty", but it doesn't matter if it's null or an empty string. It's very easy to go for this:

    if ($input) {}
It'll work through every test case you try, and then someone enters a 0 into the field and it's also unexpectedly considered empty.

You didn't mention private repos in your comment, but I guess that was implied in the $7 thing.

That said: SourceHut has private repos and access control.


> SourceHut has private repos and access control

... but not on the sr.ht link you gave. That's a list of projects like your average open source hosting landing page.

You have to click on the tiny sourcehut link at the top to see the real site.


Right, I always forget that the sr.ht link is to the application itself.

For anybody else who needs it, the page with info about the service is here: https://sourcehut.org/


This is at least partially disingenuous. Zig is working on, and has already shipped for some situations, a faster compiler. Bun runs on an outdated version of Zig that doesn't include it.


Reproducible builds exist to reduce the need for trust, while commercial vendors are in the business of selling trust.


This is because of a deeply annoying default in Apache, where for "security reasons" the underlying script doesn't get to see auth details that might already be handled by Apache. At some point they added the CGIPassAuth directive[1] but all kinds of other workarounds are floating around on the internet.

[1]: https://httpd.apache.org/docs/2.4/en/mod/core.html#cgipassau...


The website uses the feature for its intended purpose. Adding random trash to the query string of another website assuming it'll ignore it is in fact a bad idea, always, even if you can usually get away with it.


The batteries regulation[1] doesn't contain such an exemption. The legal argument that iPhones may be exempt goes like this:

- The batteries regulation is a general regulation and article 11 specifically says the following:

> This paragraph shall be without prejudice to any specific provisions ensuring a higher level of protection of the environment and human health relating to the removability and replaceability of portable batteries by end-users laid down in any Union law on electrical and electronic equipment as defined in Article 3(1), point (a), of Directive 2012/19/EU.

- There is a different regulation, the ecodesign regulation for smartphones and tablets[2], that is more specific and therefore might supersede the batteries regulation on this front, which says:

> (ii) manufacturers, importers or authorised representatives may provide the battery or batteries referred to in point (i)(a) only to professional repairers if manufacturers, importers or authorised representatives ensure that the following requirements are met:

> (a) after 500 full charge cycles the battery has, in a fully charged state, a remaining capacity of at least 83 % of the rated capacity;

> (b) the battery endurance in cycles achieves a minimum of 1 000 full charge cycles and after 1 000 full charge cycles the battery has, in a fully charged state, a remaining capacity of at least 80 % of the rated capacity;

> (c) the device meets IP67 rating.

[1]: https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CEL...

[2]: https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CEL...


But what exactly is a charge cycle? I mean, the effect on a battery being loaded from 0% to 100% and drained to 0% again is vastly different from a battery being charged from 40% to 50% and being used until 40% ten times in a row.


And how many people have the free mental space to manage the charge capacity of their phone?

I plug mine into the charger when I go to bed, and unplug it in the morning when I start my day. I don't have time to think about phone charge levels much beyond that.


The will mange it for you - the iOS setting app has options to do this.


Can’t say I really trust that stuff like “charge only when green energy is available”. It’s a nice idea but whenever I’ve used Android devices my expectation was that sometimes I plug in my device at night but it doesn’t really charge and I am not going to pay top dollar and deal with life in a walled garden to have that experience.


Maybe you can do an 80% charge limit on Android the same way I do on my iPad 10?¹ My charger is plugged into a smart plug, and I have an automation written using Apple Shortcuts that turns that smart plug off via Matter whenever the iPad's charge rises above 80%.

I don't know much about Android but assume there must be some way to do similar automations (because I've never seen in any of the Android vs iPhone arguments someone say go with iPhone because of superior automation support).

I recommend going with Matter for the smart plug because if you use the manufacturer's app to control it those often require that you be logged in. The problem with that (beyond any annoyance you might have at needing to make an account to use your device) is that the login might occasionally expire, then your automation breaks.

¹I can't use Apple's charge limit setting because for some reason I can't even guess at when they finally added it to iPadOS they only added it iPads newer than my iPad 10.


I have latest Android on the Pixel 8. I just checked and found it under Settings > Battery > Battery Health

It specifically has an option for 80% (const) or an "Adaptive Charge" predictive algorithm that charges to 80% and then only fully charges to 100% right before you typically unplug it from the charger.


I also wonder how this is impacted by time. If I have a device that's at 75% capacity at 200 cycles, but it's 7 years old, does that fail to meet these requirements?

Because my experience has been that the cycle count doesn't matter that much as the battery gets old. Old batteries just lose capacity.


That's another valid point: when you just keep a battery around and don't use it, it also loses capacity at a certain point.

So even when you don't use them, you have to babysit lithium-ion batteries. That's why I still love devices with those crappy AA batteries. In general, those have lower capacity, but you can just dump a device into a drawer for 3 years (remember to take the batteries out or use rechargeables) and just put fresh batteries into the device when you need it.

For example, I have those wireless Sennheiser over-ear headphones, which are probably 10+ years old, but they just keep working because they use AAA rechargeables.


Just to be clear: There is an official notice of the EU commission making this legal argument:

https://eur-lex.europa.eu/legal-content/EN/ALL/?uri=CELEX:52...

> Consequently, in the case of portable batteries included in products covered by Regulation (EU) 2023/1670, the removability and replaceability obligations set out in Annex II of that Regulation prevail over those set out in Regulation (EU) 2023/1542.

The ecodesign law (spare part but 1000 cycle exemption) pevails over the batteries law.


I can strongly state that it is 100% possible to do ip67 with removable batteries in the sense people general mean.

That said, I am afraid how one can play with the definition of removable. Everything is removable given enough force.


the galaxy s5 had everything we are told they removed for waterproofing. removable back cover and battery, and a headphone jack


EU courts generally frown on such shenanigans.


Great point. This sections closes that opportunity:

    > No barriers: The use of adhesives that can only be removed with heat or solvents is prohibited.
The whole "removable (but only) with a jackhammer" is negated immediately.


This is solid. I like it.


> I am not allowed to replace it on my own as it would invalidate the five year long guarantee provided by the manufacturer. Why is this stuff not considered as well?

They're the ones paying for repairs, so it doesn't seem that unreasonable? That said: If you can prove the car is being maintained according to the manufacturer's specifications they can't require you to go to a brand dealership. That's just not necessarily easy to prove.


Recalls don’t require you to have had maintained the car at the dealership previousy


A recall means the manufacturer shipped a faulty product. If you can prove you received a faulty product such requirements also don't apply.


TIL. Thanks for letting me know.


> facilities were purchased for between 1 million yen and 5 million yen and resold to Chinese buyers for between 40 million yen and as much as 100 million yen depending on location

Those prices seem weird. They were buying entire care homes and hotels for less than the price of a car? I understand they come with obligations, but these businesses were apparently financially ok before the acquisition.


I'm familiar with Japan and find it quite believable.

You may be familiar with the "akiya" phenomenon, where empty houses in the Japanese countryside are sold for a song. The same applies not just to residential homes, but to other buildings as well, and their price tag is very low for the same reason: the property has serious issues and/or has been vacant for years, and will require far more than the initial investment to make habitable.

Here's a fascinating blog post by someone who went poking around the ruins of one hot spring town (Kinugawa) that went through a particularly dramatic boom and bust cycle: https://spikejapan.wordpress.com/2010/06/14/983/

This particular hotel at least appears to have been open until fairly recently, but Google reviews describe the "Showa-era" furnishings (read: 1980s at best), and it's on the fairly grim slate grey Kujukurihama beach 3.5 hours from Tokyo by train: https://maps.app.goo.gl/G53KWyCsmeUy8JyR9


I get that there is undesirable real estate in Japan that gets sold "for a song".

But then how does it quickly get resold at 40x?


> But then how does it quickly get resold at 40x?

Because the new "owners" are buying the Business Manager visa, not the actual property.


Performing 40 songs in exchange for a property does seem like serious effort...


Suckers who don't realize it's not worth what they're paying.


This really is a great blogpost, I'm really glad you shared it.


We are not taking about akiya here but actual businesses. A thriving business would never sell for one million yen.


What makes you think these businesses are thriving? It's scams upon scams: the Japanese mastermind buys failing businesses on the cheap, pumps up the price and sells them to Chinese people, who then proceed to use them to essentially scam residence visas from the Japanese government.


> these businesses are thriving

Maybe not thriving but they were paying salaries and bills before they were bought. They were not in a bankrupt state.


Not bankrupt doesn’t mean the company is actually worth anything. A large number of tiny business are still in operation because the owner is willing to work at below market rates to keep it operating.


Re the spikejapan blog: The author’s About page includes this line which describes my experience of the article very accurately, having bailed after a couple of minutes:

“It's a species of anti-blog, as there is no way that you'll get through a post if you suffer from any kind of attention-deficit disorder; even then, you may need a strong cup of coffee and an hour to kill.”


Yeesh - interesting blog post, but terribly sophomoric prose, distracting and clumsy. The author is at least 40 and should know better.


I respect the attempt at belletristic writing, even if it falls a bit short. If they had an editor to rein in some of the thesaurus usage it’d be fine. Not everyone appreciates the style, though.


> Those prices seem weird.

I was thinking the same thing. In many parts of the world, even a failing / debt laden business would be worth much more than that.


And yet companies file for bankruptcy and get liquidated all the time versus being bought.


In at least some parts of the world real estate isn't the ridiculous "investment" it is in the US.


Real estate in good location is an investment almost everywhere

Good location being the key here

I doubt a house the price of a new car qualifies as being in a good location.

Tokyo on the other hand… yeah I doubt you would see anything cheaper than couple million dollars there


Your straight up guessing with zero information is ridiculous.

The average apartment cost in Tokyo is a little north of $400k (USD), since the year 2000 or so the value of Tokyo apartments has appreciated somewhere around 3% per year. Apartment prices are ALMOST back to where they were in 1989.


I guess it is a small island after all. Not a great example to extrapolate to more connected economies.

Still, it is twice as expensive per square meter as my European capital city. So looking at it without any historical data it is still much more expensive even with declining population and no immigration.

More like an exception to the rule really as it really has unique conditions as opposed to rest of the world.


> Apartment prices are ALMOST back to where they were in 1989.

You mean when Japan was in an epic price bubble (ie: the imperial palace land alone was worth more than all of California) which was followed by decades of economic stagnation? I'd guess that has impacted their view on real estate to a somewhat unique degree in the world.


And I assume this[1] is the reference to Backblaze? Notably not Hindenburg and more recent, but I believe there is some team overlap and there doesn't seem to be anything else.

[1]: https://www.morpheus-research.com/backblaze/


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

Search: