HNHacker News
TopNewBestAskShowJobs

squaresmile

426 karma · joined May 26, 2017

squaresmile@protonmail.com https://github.com/squaresmile
submissionscomments
squaresmile··on IDN is crazy
> Except your diff tool missed that on that same line "root" was changed to "rοοt"

I feel like many diff tools highlight character changes besides line changes. This is especially helpful when someone makes changes to a long line.

squaresmile··on Ghana plans to buy oil with gold instead of dollars
Yeah, it's pretty disappointing that most comments focus on the ideological aspect and celebrate the move while the picture is pretty bleak for Ghana.

Unfortunately, this story is not unique to Ghana and if the situation does not improve, I fear for how next year will look.

squaresmile··on Matplotlib 3.6
Yep, I think the reference documentation is quite good. I always direct people to the quick start [0] and then look at the examples [1] to see how things are done. All examples have the plots and self-contained scripts so it's intuitive to search for what you want even if it's hard to describe or google.

[0] https://matplotlib.org/stable/tutorials/introductory/quick_s...

[1] https://matplotlib.org/stable/gallery/index.html

squaresmile··on Physical buttons outperform touchscreens in new cars, test finds
Oh my, I also have the same complaint regarding the 360 camera. The 360 camera can be selected in the infotainment but navigating to it takes 2-3 steps which isn't great.

However, I have figured out that I can turn on the turn signal and the 360 cam will turn on and stay on after the turn signal is off.

squaresmile··on Physical buttons outperform touchscreens in new cars, test finds
I agree. I think touch screen is a balance that should be designed thoughtfully rather than an all or nothing thing. My car isn't the best but I think it struck a good balance.

It has a 10" infotainment screen with physical climate control. I much prefer looking at google maps on a bigger compared to using a phone mount. It's easier to glance and get the direction, where I am, next turns with a bigger screen. The steering wheel has change tracks, change mode, volume which is all I ever need while driving and can be navigated by feel without looking at them. A bigger screen also allows for a bigger backup camera view and 360 view. The climate control has knobs to change the temperature which is perfect.

> What about the experience when the car is not in motion, or by the passenger?

Yep, on the right seat, navigating the map with drag, pinch to zoom is intuitive. Using Android Auto/Carplay without a touchscreen or with a poor one is a miserable experience. My friends have always commented on the intuitive infotainment and thought about replacing the ones on their cars or looking at cars with the same infotainment.

squaresmile··on V-22 Osprey
Is that really a good link to prove that the Osprey has a poor safety record though? Many other aircrafts have a really long list. A better link would be a standardized rate based on flight hours or airframes.

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

squaresmile··on The Last Naval Battle of World War 2 (2018)
Yeah I feel like the overwhelming naval victory at Midway and in the overall war kind of masked the flaws and mistakes of the WWII US navy in the public perception. The WWII US navy made many operational and tactical mistakes. For example, even with the major intelligence advantage, the Battle of Midway was pretty dicey and a lot of luck was required to achieve the unthinkable result of sinking 4 carriers. Don't get me wrong, the US probably would have won the naval war regardless due to the materiel advantage.

I think a big part of the "fighting spirit" the OOP mentioned came from the Pearl Harbor attack. It galvanized everyone into action and lessons were learnt and mistakes were fixed very quickly, at all level of the military. For example, after the lost of Lexington, fuel lines were drained and filled with inert gas and that lesson was propagated quickly through the fleet. The fast turnaround between mistakes and lessons learnt probably also came hand in hand with how individuals were empowered to make decisions and took responsibility.

On other side of the coin, I think the IJN incompetence got highlighted and not enough credits were given. Their carrier divisions were very very highly trained and operated at a much higher tempo than the US at the start of war. The IJN night battle tactics were also very deadly. Even after Midway, they still went toe to toe with the USN during the attritional Guadalcanal campaigns. Despite their doctrine and culture giving them plenty of weaknesses and blind spots, it also gave them many strengths. I dare say during the preparation for the war, the "fighting spirit" and the effectiveness of the IJN was just as high.

In my opinion, the myths surrounding the Pacific naval war obscure very interesting stories from both sides with plenty of lessons that are still applicable today.

squaresmile··on New in Calibre 6.0
6.0 scales correctly for me on win 11.
squaresmile··on Taking action against scraping for hire
Yeah, I think this is more like the Cambridge Analytica situation.
squaresmile··on The Great Decentralization? Geographic shifts and where tech talent is moving
Like Swizec said, the pie is unfathomably large in the US compared to developing countries. There are many nooks and crannies you can slot yourself into. Sometimes I feel like on HN people can't fathom how to live in the US if you make less than double the median salary lol. It's not a walk in the park but it's manageable.

It should also be noted that very few people immigrate even among people who have "plausible" paths to it. I don't think it's fair to draw much conclusion about the whole society from immigration flows.

squaresmile··on Beautiful Soup
Or the data is stored in js objects within script tags in the html and can be extracted programmatically. It's getting common with SSG sites using SPA frameworks.

For example, the new Google Play Store website stores the data in AF_initDataCallback calls and can be extracted with re.findall(r"<script nonce=\"\S+\">AF_initDataCallback\((.*?)\);", html_string).

squaresmile··on System Font Stack
> the language of the OS

I'm pretty sure the font choosing algorithm takes into account the "lang" attribute as well. lang attribute and the system language are probably used to determine the fallback order. For example, on Windows 10+ with system font stack without system-ui: [0], [1]

For Han characters:

- lang="en" + system lang en -> "Chinese" font

- lang="en" + system lang ja -> "Japanese" font

- lang="ja" + system lang en -> "Japanese" font

For Hiragana, Katakana:

- lang="en" + system lang en -> "Japanese" font

which is reasonable enough but can be surprising I think. This can be confusing when you care enough about how the Han unified characters look but can't control the lang attribute (for example in Discord messages).

[0] https://jsfiddle.net/6gfyrpv0/

[1] https://momdo.hatenablog.jp/entry/20200802/1596376257

Side note, if the system lang is en and on Windows 10+, Japanese Github markdown text will be shown in two fonts with different "weights" [3]. It looks fine if your system lang is Japanese. I wonder if it's possible to set/guess a custom lang attribute for user/repo/markdown document.

[3] https://i.imgur.com/vgwDtZt.png

squaresmile··on Riot Games: Artificial Latency for Remote Competitors
RNG already have an advantage when they are allowed to play remotely from the comfort of their home. Yes it's not the team's fault they can't travel but it is what it is. There's another tournament in 6 months.

There's a reason this Frankenstein ping is unheard of in bigger esports.

squaresmile··on Riot Games: Artificial Latency for Remote Competitors
Yeah, the technical details are cool and all but it's unreal how this option was even on the table. It sidesteps one of the biggest reasons for a LAN. What's the point of gathering everyone together if 35ms is going to be added to the ping.

Funnily enough, all this hoohaa was for nothing as the Asian Games got postponed anyway.

squaresmile··on Reinstating our SAT/ACT requirement for future admissions cycles
I would say the questions by themselves don't test memorization but all the circumstances around the test push it towards memorization.

Given decent fundamentals you can solve all these problems from first principles but you would take way too much time (unless you are a genius, of course). To solve these problems within the allotted time would require grinding a ton of problems so you can get familiar with a part of or the full question beforehand. Don't get me wrong, practicing problems is a good way to study math and I don't have any issue with this in a vacuum.

However, this is before bringing other people into the equation. The floor is raised every year and the competition is intense. You also need to study for other subjects, not just math. All in all, "memorization" became the only strategy. It's fair to debate whether it's "rote memorization" or actually "learning the material" but with how much the students study the line between the two blurs. It feels too "overfitting" if I would borrow a statistics word.

squaresmile··on Upcoming changes to user limits on Free tier of Gitlab SaaS
Yeah, I have been finding these internal justifications kinda odd in a public announcement. As a user, ether I'm affected or I'm not. 99% or 1% doesn't concern me. I don't think I would react differently if the number is 5% or 25%.

I agree the implication feels a bit like don't bother complaining since you guys are an insignificant portion of the userbase. Cool, good to know I guess.

squaresmile··on Migrating from Netlify to Cloudflare Workers Sites for 2x Performance (2020)
Using Github Actions, Worker Sites and the CF worker, I think the level of customization is quite high without too much work.

For example, our hobby React SPA deploys on merge using Actions. It also has dynamic opengraph tags for pretty Discord embeds using CF worker.

squaresmile··on Ask HN: Any piece of hardware that was more of game changer than you expected?
The Logitech G305 mouse for $40 (or any current gen wireless gaming mouse). I don't play game competitively but I have always felt latency with previous gen wireless mice. The recent wireless mice feel like wired to me.

It's quite nice to use a wireless mouse with a large mousepad. A large desk is also a must imo.

squaresmile··on An Ode to Ruby
OpenCV has wheels built for all common platforms so it should be fine now. If your platform or python version is too new/old/unsupported then yeah, you can forget about building it and use another platform/python version.

To be honest, it's always this dice roll with most things on pypi. If there are wheels for you, golden. If not, you better hope it's a pure python package or it doesn't pull any outside libs. Things are getting better though with solutions like cibuildwheel.

squaresmile··on Django 4.0
I'm thinking about using Starlette directly. It doesn't look that much more verbose than FastAPI and I already disagreed and bypassed a few FastAPI features. I wonder how much work would it take to hook the Pydantic models with their SchemaGenerator.
squaresmile··on Cloudflare Pages goes full stack
We are using GitHub Actions with wrangler and it works fine. Git push and the site is deployed to worker kv site.

It didn't do the one commit one subdomain though but maybe they are adding it with this announcement.

squaresmile··on Your code displays Japanese wrong
This can also be a problem in chat app. I used en-US on windows (which defaulted to the zh variant) and someone else used ja-JP and I was wondering why the character was different. Took a while to notice that we were seeing two different things on our screens.

We also have a website about a Japanese game using a Japanese font except for 0x9bd6. The font's 0x9bd6 is the CN variant and its 0xe001 is the JP variant of 0x9bd6. Fun times.

Like others said, on the web, you pretty much have to manually assign lang to every single thing. We just added support for CN/TW/KR text. I should come back and check 0x9bd6 in the other versions ...

squaresmile··on Miniflare – Simulator for developing and testing Cloudflare Workers
> dev/preview

Ah sorry, I was confusing stuffs. It wasn't even wrangler preview, it was the web editor on the worker website.

> cloudflared

Yep, I noticed that update. I couldn't have updated wrangler faster.

> Promise.then

I'm sorry again. False alarm. It's me not understanding when things get executed.

> URL.createObjectURL

I don't really have a use case for it. It was mostly me seeing the example code being reasonable, copied it and was surprised it didn't work.

squaresmile··on Miniflare – Simulator for developing and testing Cloudflare Workers
- [Not relevant] There's this limitation about fetching host+port [0] in the worker. It works fine in wrangler dev but doesn't work on Cloudflare worker. I don't mind that it's a limitation of the platform but there should be documentation and wranlger dev should be consistent with the actual worker.

- It's not relevant now but I couldn't figure out how to connect cloudflared with wrangler tail on windows. Wrangler tail points to the cloudflared docs but the cloudflared docs doesn't mention wrangler at all. I was pretty lost for what to do.

- [Not relevant] I haven't investigated this properly but Promise.then.catch doesn't seem to work? async/await works though.

- I'm pretty sure URL.createObjectURL in this example [1] doesn't work on the worker.

- Wrangler dev doesn't have the request.cf object. I see why but a dummy one would be cool.

None is deal-breaker but they wear you down when you walk through the documentation.

[0] https://community.cloudflare.com/t/fetch-in-worker-strips-po...

[1] https://developers.cloudflare.com/workers/examples/read-post

squaresmile··on Picturing Git: Conceptions and Misconceptions
Fwiw, I'm not sure if it's recent or not but git CLI has pretty good suggestion of what commands to run next. git status gives a decent amount of info. It also suggests the newer commands like switch or restore.
squaresmile··on Chrome abandons 'simplified domain experiment' in omnibar
> Never noticed that there

I'm quite sure this option wasn't there when this "experiment" was added.

squaresmile··on Using GDPR to obtain one’s data as JSON
I mean the company should automate this if this is wasting too much time.
squaresmile··on Open letter from researchers involved in the “hypocrite commit” debacle
What's your suggestions on how oss maintainers can fend off state actor attacks? Always need two people to sign off on a patch?

I strongly agree that supply chain attack is a huge deal and worse attacks will come to light eventually but what should be done at the level of oss maintainers?

Like you said, I feel like Open source projects by random solo maintainers that the security of almost everyone on the internet relies on... can't do a lot of things.

squaresmile··on Chrome’s address bar will use https:// by default
One thing that was quite annoying to me is the URL changing under my cursor on double-click if the protocol is hidden. However, I can see that editing the URL is a niche use case. Fair enough.
squaresmile··on Chrome’s address bar will use https:// by default
Thanks, I can finally uninstall this extension [1] as a workaround for that. Fun times with Chrome.

[1] https://chrome.google.com/webstore/detail/suspicious-site-re...

← PreviousPage 2 of 5Next →