Hacker Newsnew | past | comments | ask | show | jobs | submit | L-four's commentslogin

Can we get "HTTP 402 Payment Required" working now?


I think it's software is made with the American market in mind. And local businesses use it as is and profit.


Yeah that was my assumption as well.

There's no custom of tipping that much at any of these places, but I feel cheap just clicking the lowest (no tip) of 4 options. Maybe all the time I've lived in the US plays a role here but it seems like it might just be the decoy effect [1] applied to tipping. It will be interesting to see if consumers see this as a dark pattern and push back.

[1]: https://en.wikipedia.org/wiki/Decoy_effect


In Sweden a lot of the software with tipping option is made by Swedish companies who only operate on the Nordic markets.


It's malware it does something malicious.


Parse this JSON correctly ```json { "data": "XXX", "sig": "BAD", "sig": "GOOD" } ```


In a security sensitive context, a parser should return an error on a duplicate key regardless what common parsers do and what the RFC fails to specify.

Implicitly, that means no security software dealing with json should be written in Go, Javascript, ruby, python, etc (where practically everyone uses json parsers that silently ignore duplicate keys)

Plenty of languages do have common json libraries w/ duplicate key errors, like haskell (aeson), rust (serde_json), java (gson, org.json, probably others), so there's plenty of good choices.

So yeah, correct parse result is '400 bad request'


For Java, I think you mean Jackson, not gson, unless something has changed recently. Goes to show that even the behemoths can get this wrong.

https://github.com/protocolbuffers/protobuf/blob/6aefdde9736...


I overwrite with the last one.

Strictly not a parser problem.

Csv is also available.

And binary protocols, with index based implicit keys are and byte length prepended to variable length fields. Those are the gold standard (see ip and tcp headers.)


Dictatorships don't care if things are practical.


That is a harsh characterisation of the work done by Tesla.


Battery swapping isn't some top-down authoritarian decision made by the CCP and forced into the Chinese society.

Nio is just a company that's providing a much needed solution to this problem.


They also have 2% ev marketshare in China, because its still an expensive and complex feature that has downsides that the previous comment mentioned. Like these high energy batteries are dangerous as the can burn quite spectacularly, so I personally would not want to take and remove one from my car every charge hen I can wait a few minutes at a regular charging station that is much more common than a replacing station.


I don't think a battery swap is more dangerous than the current fuel stations where you can just use your lighter and set everything on fire


I think swappable batteries may be a more practical solution for heavy trucks rather than cars. They have the advantage that they are already built to carry heavy things loaded by forklift, unlike cars.

There's an Australian company https://www.januselectric.com.au/ doing them. They do electric conversions on existing trucks.


I agree, but there are aggressive subsidies around electric vehicles and general graft. Similar things happen in most countries but in dictatorships things can go to absurd levels when it aligns with the current policy.


Those subsidies can be more easily justified by climate change. Also I don't think they approach the historic, multi-decade subsidies to fossil fuels


America is now also a dictatorship according to many foreigners (all but russia maybe ).


Working on it but there are still elections scheduled.


Russia, China, Iran and North Korea all have elections too. I don’t know if there’s a single contemporary dictatorship which doesn’t have elections.


Writing transaction code wrapping a user provided function which can error or panic is a real pain to get right. If the user code panics there is no error if the user code succeeded there is no error. So you have to call recover on success.


The trick to coding with LLMs is not caring if the code is correct.


Call me cynical but coding at some companies has such perverse incentives that I kind of get it:

- "Solve" the issue assigned to me with a bunch of code that looks about right. Passes review and probably not covered by tests anyway.

- Once QA or customers notice it's not working, I can get credit for "solving" the bug as well.

- Repeat for 0 value delivered but infinite productivity points in my next performance review.


I suppose that you are using a dynamic language? Static typed languages have less of this problem.


This is a hypothetical "I". Personally I am deeply passionate about delivering shareholder value, producing high-quality code, enthusing stakeholders, tabs vs spaces, and so forth...


+1 this has been my life experience.


The great thing about Azure is not the security it's the reports about how you are secure. The later is legally required the former is only visible experts.


An unscrupulous individual might even send malware.


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

Search: