News for hackers. Stuff that matters.

rnallandigal

Re:What's new in C++26 (part 1) on Saturday September 07, 2024 @02:39AM (#41471955)
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

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

https://cppquiz.org contains a list of similar questions in C++.
Re:IKV: embedded key-value store, 100x faster than Redis on Friday February 23, 2024 @05:53PM (#39487187)
Why not benchmark against redis running locally? Also fyi the dns for inlined.io seems to not be working.
Hey, I also built Genji. Would love to discuss any technical aspects as well.

Show HN: Genji – Automate the browser with an AI assistant

https://www.genji.app/

I’ve always wanted to be able to control my computer hands-free. Whether it’s when my hands are tied like when I’m eating, or when I’m away and want to run a routine task.There are existing tools that can execute predefined tasks on the browser, but they have several disadvantages:* They work by matching css selectors, so they are brittle -> increases the cost of maintenance.* Every task...

( Read More... | 1 comment | 3 points | on HN )
Re:Qalculate – The Ultimate Desktop Calculator on Wednesday August 09, 2023 @08:44AM (#37061800)
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.
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.
Re:Major Linux Problems on the Desktop, 2023 edition on Thursday March 30, 2023 @03:32AM (#35369329)
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.