HNHacker News
TopNewBestAskShowJobs

shric

1,489 karma · joined November 6, 2012

submissionscomments
shric··on One Job, One Pay – Globally
If only accurate assessment of abilities before start was the slightest bit feasible.
shric··on Everything you ever wanted to know about terminals
This will be obvious to any C programmer, but the macro[1] used throughout the article only "works" on string literals and arrays, not pointers.

Also, it will include the null terminator. Probably won't do any harm but quite silly if you're redirecting to a file for example. I'd subtract one, or use strlen which would cover the pointer case above and I'd hope a modern compiler would elide the call on a string literal anyway.

[1] #define szstr(str) str,sizeof(str)

shric··on Ask HN: Free and open source distributed database written in C++ or C
PostgreSQL with Patroni and Citus
shric··on What happens to TLDs when their country stops existing?
There have been plenty of attempts: https://en.wikipedia.org/wiki/Alternative_DNS_root
shric··on Software Engineering at Google (2020) [pdf]
The nice thing about books about how Google does X (SRE, SWE, etc.) is you can adopt the good/relevant parts however you see fit and ignore the stuff that either only applies to Google scale or makes no sense.
shric··on Software Engineering at Google (2020) [pdf]
The review part is the pain point far rather than the mirroring.
shric··on Show HN: I'm building the “chess.com” of speed cubing
Andrew Tang would probably disagree
shric··on Show HN: I'm building the “chess.com” of speed cubing
Yeah, in an ideal world lichess would get so many donations they'd buy chess.com, make it free, and sponsor the same content creators :)
shric··on Show HN: I'm building the “chess.com” of speed cubing
Each to their own. I find lichess.org's UI and UX vastly superior.

And I'm not the GP, but I agree. To expand my thoughts:

- The free version is vastly inferior to lichess.org, and it nags you to upgrade at every opportunity.

- They are anti-competitive to the point of censoring the mention of lichess on their forums (for e.g. feature requests) [1]

- I guess it's subjective how paid chess.com compares to lichess.org but I much prefer lichess.

- Minor UX/UI annoyances (you can't give your opponent time or allow takeback requests in a rated game, etc.)

- The price of diamond membership is quite steep for a chess website, but I guess compared to lichess.org anything is quite steep.

Thinking about it further, I guess chess.com seems extra bad because of the existence of lichess.org which is just amazing (100% open source including the apps, zero ads, open API, can download the database of all games, etc.)

Full disclosure, I'm a diamond chess.com member (signed up in January for a year) because I'm quite a chess enthusiast and really wanted to see if it was worth it. It's not, in my opinion.

[1] https://www.reddit.com/r/chess/comments/qudyuq/why_streams_w...

shric··on Freshii’s new ‘virtual cashier’–who works from Nicaragua for $3.75 an hour
It looks like you misread the parent. They said most customers prefer the self-order kiosks. This has been my experience too.
shric··on Things I can’t do on macOS which I can do on Ubuntu (2020)
It's probably because many people have no use for caps lock so want an escape key on the home row. Not many people want another caps lock key in a hard to reach position.
shric··on Things I can’t do on macOS which I can do on Ubuntu (2020)
It's vastly improved on the M1 machines, I shared the same frustrations on the Intel 16".
shric··on Things I can’t do on macOS which I can do on Ubuntu (2020)
Windows 10 also, last time I checked, doesn't understand the concept of DPI properly. No idea if it's been fixed in 11.

That is, if you have for example a 27" 4K monitor next to a 27" 1080p monitor then the 1080p version is treated as though it's 25% of the size and the mouse gets "stuck" in the 4K monitor unless you're within the 50% of the screen that Windows thinks your 1080p monitor is adjacent to. This works sanely in macOS as it rightly treats each monitor as having the same size.

It's even more comical if you have a very high dpi laptop next to a 1080p or 1440p large desktop monitor.

shric··on Things I can’t do on macOS which I can do on Ubuntu (2020)
For those who don't mind "full screen" still including the top bar, I find https://www.hammerspoon.org/ to be a good compromise. I set up option+shift+f to full screen my window instantly.
shric··on Fig now supports JetBrains IDEs
> The idea is that you can configure your developer environment in Fig and then we'll sync it across all of your devices.

What's Fig's target audience? Developers.

Developers have been using a tried and tested way to keep configurations for decades -- dotfiles. We sync them across all our devices using git (or any of a thousand other ways). This is a solved problem and doesn't require email addresses or logins.

shric··on C72: A port of the earliest C compiler to x86 (2021)
As this compiler is written in modern C, I guess the next logical step is to write a version that can compile itself?
shric··on Google will soon ask Australian users to show ID to view some content
Yes, but parents have better reasons to stop their kids from seeing their credit card details than age verification...
shric··on What's my place in the world population?
Haha, thanks, I should read. My gut was it was off by a factor of about 10.
shric··on What's my place in the world population?
"If you have a household income of $33,000 (in a household of 2 adults) You are in the richest 9.9% of the global population"

Really, almost 1 in 10 households with 2 people in the world make more than $33,000 USD/month after tax?

Not convinced, this isn't even close.

Edit: yes, I see now this is monthly. Leaving it as-is so the replies make sense.

shric··on TUIs
How about some libraries that help with building TUIs?

I'll start with https://github.com/rivo/tview/ and https://github.com/gdamore/tcell

shric··on Who Says C is Simple?
At file scope:

int this_is_a_fairly_long_variable_name_1;

int this_is_a_fairly_long_variable_name_2;

Why? Because section 5.2.4.1 requires implementations to support at least 32 significant characters in external identifiers and section 6.4.2.1 says "If two identifiers differ only in nonsignificant characters, the behavior is undefined."

These ones may be more "obvious", but:

Given e.g. int a[4][5] then accessing a[1][7] is undefined even though one might assume it's like accessing a[2][2]

x << -3 is undefined behaviour though logically one might assume it should be equivalent to x >> 3

And the classic, very common newbie use of "fflush(stdin);" is also undefined.

shric··on Who Says C is Simple?
No need to imagine, it's around 203 things. They're listed in Annex B, Annex J in earlier standrads.
shric··on Google Sets Its Return to Office Plans for April 4
March 1 here in Sydney, Australia
shric··on Google Users Locked Out After 15 Years' Use (2020)
I don't think it matters who's at fault, I think Google should allow the user to extract all their data even after account termination, would be fine if they charged a reasonable fee even.
shric··on On Leaving Facebook
There are some people, especially say 10+ years ago, who thought e.g. Google wasn't evil.
shric··on On Leaving Facebook
I'd like to hear more about the 10% that are not broken :)
shric··on The Silent, Vacinated, Impatient Majority
It's a very half baked paywall, The Atlantic limits you to one or two articles a month before they want you to subscribe or use some other trivial workaround such as incognito
shric··on Kakoune Code Editor
There's a few reasons I can think of (some superficial, some significant):

- Github and git will highlight a missing newline in a diff by default.

- POSIX defines a line as having a newline at the end, so if you don't have a terminating new line you may have one fewer lines than you think you have [1]

- If you ever want to append to a text file/source file programmatically with something like echo "something at the end" >> yourfile.txt then you'll be grateful you had the habit of ending everything with a newline.

- If you use a shell that doesn't automatically add one when you do cat filename you'll end up with your prompt sitting awkwardly at the end of the file.

vim, iirc, defaults to automatically adding a newline to any file without you explicitly asking for it, unless you do set noeol and set binary or, in versions newer than 7.4, set nofixendofline

[1] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1...

shric··on Customs confiscated and scanned our mobile phones in Sydney
You forgot the time we literally weren't allowed to leave during most of 2020 and 2021.

https://www.reuters.com/business/healthcare-pharmaceuticals/...

shric··on It takes $420k per year to run Lichess
You don't need to be a patron, you just need an account. One of the many amazing things about lichess is it's 100% free and donators get no extra privileges except a little logo next to their user
← PreviousPage 13 of 19Next →