danpla
Joined 4 years ago
Joined 4 years ago
dpScreenOCR works is like this: you select an area on the screen using a keyboard shortcut, and then text from that area is extracted and, depending on your choice, can be copied to the clipboard, saved to the history, or sent to another application (e.g. dictionary/translator). In most cases, you don't even have to interact with the GUI, and the program can reside in the system tray.
The biggest changes since the program (v1.1.0) was mentioned in HN[1] in 2022 include:
* Added a language manager that allows you to install and remove languages without leaving the application. Previously, you had to manually download the language files and place them in special directories.
* Added a stand-alone GNU/Linux bundle (in a TAR.XZ archive), which should work even on legacy systems released in around mid-2014 or later (tested on Ubuntu 14.04).
* Fixed recognition with vertical variants of Chinese, Japanese, and Korean.
* Added proper selection rectangle scaling according to the screen DPI. The width of the rectangle can now also be configured (as requested by @Lakuma in [1] :).
* Thanks to contributors, the website has been translated into several languages. Some languages are still to be added, so help with translation would be greatly appreciated: https://hosted.weblate.org/engage/dpscreenocr/
The full list of changes since v1.1.0 can be found here: https://raw.githubusercontent.com/danpla/dpscreenocr/v1.4.1/...
The source code (zlib license) is available on GitHub: https://github.com/danpla/dpscreenocr
These are some pretty bold statements.
* "They wouldn't exist in the first place" implies that ImGui was the primary reason and foundation for creating these programs. As if using the traditional retained mode GUI is so unbearable that without ImGui the authors would have abandoned the idea of creating these tools in the first place.
* "Or wouldn't be as full-featured" implies that ImGui is either more full-featured or (if you meant time) is faster to develop with compared to a traditional retained mode GUI.
> I'm surprised this is so hard to comprehend?
Well, I'm surprised that some people keep presenting the immediate mode GUI as the silver-bullet alternative to the traditional GUI. Don't get me wrong: I understand that IMGUI is a great tool if you need to quickly add a throway GUI to a game, but otherwise there is a price to pay, both by the developer and the end user.
Well, if you have a traditional immediate mode API like:
if (button("Start"))
start();
Then it's not just about the API philosophy: at the very least, it ties the event handling to the drawing.So yes, the experience was not good, and I don't see what these tools would lose by using a proper GUI. I don't want every utility to drain my laptop battery like a decent video game.
ImGui is great if you already have a loop where everything is unconditionally redrawn every frame, but otherwise it's a really odd choice for an end-user application.
https://www.reddit.com/r/cpp/comments/o94gvz/what_happened_w...
The author talks about the code bloat, beacause of "an API that encourages custom formatter specification to live in a template". But at the end he mentions the standard solution to this problem:
> A preferable interface (I use, but also others AFAIK) is to check the type in a template (no choice there), and dispatch the formatting routine to somewhere that lives in a single translation unit.
So what prevents you from doing this with <format>? As I understand, the implementations of parse() and format() of std::formatter don't depend on the template parameters and can delegate to non-template functions residing in one CPP file. You can also provide additional wformat_parse_context/wformat_context overloads if you need wchar_t support.
Well, that's not always true; it's better to use a profiler.
In many cases, it's trivial for the compiler to inline objects (e.g., used as predicates for <algorithm> routines), resulting in better performance compared to the equivalent procedural code.
> running constructors and destructors is expensive
If the object is not polymorphic (and sometimes even if it is), the compiler can inline both the constructor and destructor, resulting in exactly the same assembly output as the procedural code.
That's why exceptions are called exceptions, not errors. If a routine called openFile() can't open a file, that's a pretty exceptional situation, and it's up to the caller to decide whether the exact reason is an error in their case.
The exception object is already a value that can have not only a message text, but also any data members, so why reinvent the wheel with sentinel objects, tuples, etc.?
> The examples in post, where you catch exception and re-raise Exception back are terrible - what's the point of them? There is no extra clarity, just verbosity. I would defect them in any code review.
Typically, you re-raise an exception after adding some content to it. This may be less important in Python, which gives you a great stack trace, but in a language like C++, the lack of context information makes the exception basically useless.
Indeed, but it's not an option if you have more than one email account on the same service.
Sony Xperia phones traditionally have a 3.5 jack and a normal screen (without holes and other nonsense for the camera).