HNHacker News
TopNewBestAskShowJobs

thisishard

23 karma · joined November 19, 2017

submissionscomments
thisishard··on Malaysia is betting on data centers to boost its economy
Malaysia's commercial electricity prices is about 0.13 USD/kWh, it's moderately cheap but not extremely cheap.

Its advantage is that it has ample sunshine and over the past few years, the government has introduced various incentives for promoting residential and commercial solar energy investments

One can learn more about it from their renewal energy roadmap website https://www.seda.gov.my/reportal/

thisishard··on Avoid exception throwing in performance-sensitive code
Here's another link about the problems with C++ exception that I find very insightful https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p25...

The major issue that stood out to me is that in a multi-threaded environment, exception unwinding is effectively single-threaded. This means that if you have C++ code that throws a lot of exceptions, you are going to see a lot of threads getting blocked by lock contention

thisishard··on A chess robot in Moscow has broken the finger of its human opponent
I watched the video and the robot most certainly did not grab the boy's index finger.

Sequence of events

1. The robot was capturing the boy's queen with a bishop. For that, it first removed the queen from the board.

2a. The robot next moved the bishop onto the square where the queen was previously located.

2b. At the same time, the boy prematurely moved his rook to the same square, he completed the move before the bishop has been placed on the square

3. The robot completed its final downward motion to place the bishop onto the square while the boy's fingers were still on the rook, thus pinning the index finger between the bishop and the rook

The robot didn't do anything it wasn't programmed to do