HNHacker News
TopNewBestAskShowJobs

rnallandigal

26 karma · joined January 13, 2023

submissionscomments
rnallandigal··on What's new in C++26 (part 1)
The std::to_chars function returns an object of type std::to_chars_result, which defines an operator bool() checking if ec == std::errc[0].

The if statement determines which branch to take based on the value of the condition. This value is contextually converted to a bool and evaluated[1].

[0] https://en.cppreference.com/w/cpp/utility/to_chars_result

[1] https://en.cppreference.com/w/cpp/language/if#Condition

rnallandigal··on Ask HN: What resources do you recommend for learning Haskell?
"What I wish I knew when learning Haskell" by Stephen Diehl[0][1]. It has commentary on a great deal of topics in Haskell and is very approachable. Also, learning to use Hoogle[2] will serve you well.

[0] https://smunix.github.io/dev.stephendiehl.com/hask/index.htm...

[1] https://github.com/sdiehl/wiwinwlh

[2] https://hoogle.haskell.org/

rnallandigal··on A long list of (advanced) JavaScript questions, and their explanations
https://cppquiz.org contains a list of similar questions in C++.
rnallandigal··on IKV: embedded key-value store, 100x faster than Redis
Why not benchmark against redis running locally? Also fyi the dns for inlined.io seems to not be working.
rnallandigal··on Show HN: Genji – AI browser ninja that can complete any task on Chrome
Hey, I also built Genji. Would love to discuss any technical aspects as well.
rnallandigal··on Qalculate – A multi-purpose cross-platform desktop calculator
I have it bound to `$mod+c` and launched as a floating window in i3. It integrates very well into my workflow as I can just quickly launch, perform a one-off calc, and close it whether I'm in a terminal or elsewhere. Since it saves history, I can always relaunch it and continue where I left off as well.
rnallandigal··on Show HN: Build a discord/Slack bot to answer questions with your docs and GPT4
I'm building https://seeker.so. It's mainly to index and search through your data, but you can get chatgpt to answer your question based on your data as well.
rnallandigal··on Major Linux Problems on the Desktop, 2023 edition
One of the biggest issues for me is DPI scaling. It is increasingly common for newer laptops to be released with with 2K or 4K screens. However, native resolution is unusable on the comparatively smaller screen size (vs desktop monitors).

Currently, the solution is to render at 1080p and upscale to monitor resolution, but this has several problems: 1. Autodetection of current / optimal dpi is not reliable. 2. Text is scaled, but not icons. 3. Some applications ignore the system wide dpi scaling setting and must be configured individually (--force-device-scale-factor for chromium apps). 4. Upscaling is not intelligent: Ex. in chrome, since the entire UI and content is upscaled, watching youtube videos in 1440p first downscales to 1080p then upscales to 1440p. This degrades the quality and negates the benefit of a HiDPI display. 5. External monitor setups are very difficult to get right: Each display can be scaled differently, but apps must also be configured to match the scaling.

Despite this, I still enjoy the experience in linux and workaround these issues rather than abandon the OS.