HNHacker News
TopNewBestAskShowJobs

lsc36

127 karma · joined April 20, 2017

submissionscomments
lsc36··on IPinside: Korea’s Mandatory Spyware
Exactly the same in Japan; moreover, many e-commerce sites reject foreign credit cards, even those of international brands (Visa/MasterCard).

What I heard was that payment providers charge higher fees for allowing foreign cards, so website owners (who focus on domestic business anyways) just won't bother.

lsc36··on Regarding the eSIM-only iPhone 14 models in the U.S.
In Japan, eSIMs are exclusive to Japanese citizen and permanent residents. Not sure about the reason behind this but I don't think they're going to change policies just because Apple is pushing.
lsc36··on Can the Visa-Mastercard duopoly be broken?
Card companies _do_ charge interest if you pay in (usually) 3 or more installments, unless explicitly mentioned being interest-free.
lsc36··on Hidden Networks in TP-Link Routers
I once bought a TP-Link Wifi router as it was pretty high-speced at the time and people recommended it. I was happy with it until it hijacked my HTTP connection to tell me there's a firmware update. Will never consider their products again.
lsc36··on Chrome is faster in M91
Current/past release schedule can be found here: https://chromiumdash.appspot.com/schedule
lsc36··on HN “Why Not Simply”
This reminds me of the Dropbox HN submission back in 2007: https://news.ycombinator.com/item?id=8863
lsc36··on How Do Computers Generate Random Numbers?
That depends on the modulus being divisible by 8, which is not always the case. A common example is modulus = 2^31 - 1 [0] which is prime.

[0] https://en.wikipedia.org/wiki/Linear_congruential_generator#...

lsc36··on How Do Computers Generate Random Numbers?
The article claims that "it is indeed a uniform distribution" so I wanted to point it out.
lsc36··on How Do Computers Generate Random Numbers?
1. You don't turn PRNG into "true" RNGs simply by picking seeds from environmental randomness. The seed is just the initial state, as long as the output is generated by a deterministic algorithm, by definition it's a PRNG. At the very best you can make a CSPRNG, but not a "true" RNG.

2. The dice roll example is not uniform distribution, I think this is a common pitfall when generating random integers of a range. `randomNumber % 6` results in a slight bias towards 0 and 1, since 2^31 % 6 == 2, there are more numbers in the range [0, 2^31-1] that map to 0 and 1 than those that map to 2...5. To make it uniform, for example, you should always discard if `randomNumber < 2` and regenerate another number for use.

lsc36··on Huawei staff CVs reveal alleged links to Chinese intelligence agencies
But you're not forbidden from talking about what you mentioned, that's why you're posting here, no? Try to post anything about Tiananmen on any forum based in China. To me this is the key that makes CCP strictly worse than the US govt.
lsc36··on Hong Kong Protesters Keep Up the Pressure
This was only active until 1979; the US currently has no military presence in Taiwan.
lsc36··on Chrome 68 will mark all HTTP sites as “not secure”
Firefox will eventually follow up as well:

"To continue to promote the use of HTTPS and properly convey the risks to users, Firefox will eventually display the struck-through lock icon for all pages that don’t use HTTPS, to make clear that they are not secure." [1]

[1] https://blog.mozilla.org/security/2017/01/20/communicating-t...

lsc36··on A FactoryFactoryFactory in Production
I guess design patterns should never be applied. Those are simply optimal solutions to common design problems in OOP. When you encounter your own problem, derive your own optimal solution, and you call it some "pattern" if it happens to resemble one.

IMO pattern names are merely for communication purposes, like saying "abstract factory" instead of having to say "I have an interface F for creating instances of interface A, where different implementations of F can be chosen at runtime to create different instances of implementation of A". And also you are not required to call your factory "Factory".

lsc36··on Microsoft Adds an OpenSSH Client to Windows 10
I've been using WSL + wsltty [1] + Xming [2] for months and didn't encounter major issues. wsltty also added support to the Microsoft Store version recently.

For Xming, simply set DISPLAY in shell and local GUI programs just work, as well as SSH X forwarding.

[1] https://github.com/mintty/wsltty

[2] https://sourceforge.net/projects/xming/

(EDIT: typo)

lsc36··on Some problems of URLs
Can't agree more that URL syntax is overcomplicated. Even existing URL parsing libraries behave inconsistently and lead to security vulnerabilities [0].

[0] https://www.blackhat.com/docs/us-17/thursday/us-17-Tsai-A-Ne...