6
7
illucidmind

@programming.dev

illucidmind 11 points a year ago

First, what do you mean by "C is just so old"? That seems like a language problem, not a GTK problem. Tbh, when it comes to documentation, you're likely better off with C as the official GTK docs targets the C API (https://docs.gtk.org/gtk4/).

Also, what do you mean by "it doesn't translate well to Rust"? Because, Rust, like other supported langs like Python, have bindings that are equally well-documented to an extent. I haven't used the Rust binding but I've used the Python binding extensively and there are references to all the APIs (https://lazka.github.io/pgi-docs/)—same with Rust (https://gtk-rs.org/gtk4-rs/).

Lastly, I can understand not using GTK for cross-platform apps, but not for the reasons you mentioned. While GTK's primary target is Linux, you can technically still make it cross-platform.

path: 0 18448442 18448799, hotness: undefined, score: 11, children: 4
illucidmind 7 points a year ago

Your statement about C is still mostly wrong. First, linting isn't typically a built-in feature for many languages; you mostly depend on external tools or IDEs (for C/C++, CLion and VSCode with specific extensions solve this). A similar occurrence is seen in formatting, where, except for a few languages like Rust and Go (with officially maintained formatters), you still have to depend on external tools or IDEs. For dependency management, it is well-known that C/C++ lacks an official package manager, but there are well-tested third-party package managers such as conan (https://conan.io/) and vcpkg (https://vcpkg.io/). Another benefit is the project-local support in both package managers (although it is more robust in Conan), which effectively addresses both the version management and virtual environment issues you raised. You don't always need virtual environments anyway (Rust doesn't use one either).

I haven't used the Rust binding, so I don't have direct experience with this and may not fully understand the pain points. However, a glance at the docs shows the Rust binding and trait-based pattern still does the job effectively. I don't understand what you mean by "weird structures split into multiple modules", as you're just reusing built-in structs like you would use a class in the Python binding, for instance. So I don't see the problem.

Well, mobile support for GTK is currently experimental, so there's that.

path: 0 18448442 18448799 18450760 18457929, hotness: undefined, score: 7, children: 2
illucidmind 2 points a year ago

Well, for a modern approach to development in C, you may have to be creative and not rely on ready examples, but it's still doable. A lot of the C issues are at the "conventional" level and can be solved if you just do things a little bit differently (e.g. nothing stops you from modularising source/headers files even though C doesn’t enforce this at the language level).

I can understand the "ergonomics" you speak of in Rust but it's not very surprising in that aspect especially given that C faces same challenge (and is even more verbose). The GObject system seems to map well with languages that favour the OOP style (built-in classes, inheritance etc) like Python. So yeah, on that, I understand ;)

path: 0 18448442 18448799 18450760 18457929 18464559 18467847, hotness: undefined, score: 2, children: 0
illucidmind 1 point a year ago path: 0 18384927 18385089 18385700 18385765, hotness: undefined, score: 1, children: 0
illucidmind 1 point a year ago

It's about handling the CRUD operations using the respective data access objects (DAOs). Abstracts the database operations for entities (https://github.com/...), hides details of the underlying database and unifies the API (https://github.com/...).

Since an admin panel ultimately needs to manage database entities, it's a vital part of the development process.

path: 0 18384927 18385089, hotness: undefined, score: 1, children: 2
illucidmind 1 point a year ago

Thanks! I'd appreciate a GitHub star too if you're feeling generous :)

path: 0 20230848 20232028, hotness: undefined, score: 1, children: 2
illucidmind 1 point a year ago

Thanks for the kind gesture :)

path: 0 20230848 20232028 20236114 20236428, hotness: undefined, score: 1, children: 0

thanks for using Leebra!

go to feed...