Better HN
topnewbestaskshowjobs
Log inSign up

rnallandigal

26 karma · joined Jan 13, 2023 (3y ago) · 9 submissions

Submissions

comment 2y ago · link · parent

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

comment 2y ago · link · parent

"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/

comment 2y ago · link · parent

https://cppquiz.org contains a list of similar questions in C++.

comment 2y ago · link · parent

Why not benchmark against redis running locally? Also fyi the dns for inlined.io seems to not be working.

comment 2y ago · link · parent

Hey, I also built Genji. Would love to discuss any technical aspects as well.

6.

Show HN: Automate the browser with an AI assistant

3 points · by rnallandigal · 2y ago · 1 comment

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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.