This is very exciting. Here is the APK I downloaded. And the associated discussion.

It even already seems to support stylus input which is very exciting seeing as there has been talk of porting RNote to Android.

  • illucidmind@programming.dev
    link
    fedilink
    arrow-up
    7
    arrow-down
    1
    ·
    edit-2
    17 hours 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.

    • ExLisper@lemmy.curiana.net
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      3 hours ago

      Of course linting and formatting is not part of the language. Of course you can install extensions in some IDE that will handle it. Conan looks great but I never saw a project using it and when I was asking C devs about dependency management no one mentioned it. I checked dozens of GTK projects looking for some decent template to copy and didn’t find anything remotely “modern”. All projects I see simply use meson/ninja, install deps on system level, don’t provide any code formatting or linting guidelines. Most don’t bother with any modules and just dump all source code into 100 files in src. And I’m talking about actively developed tools for Gnome, not some long forgotten ones. For me the big difference between languages like C and Rust is that every Rust project uses the same formatting, linting tools, uses modules and proper dependency management while most C projects don’t. Because it’s old. Because a lot of C devs learned programming when it wasn’t a thing. Because a lot of C project started when those tools didn’t exist. You can probably start a new C project in ‘modern’ way but when I was trying to do it there were no examples, no documentation and when I asked C devs I was told that “you just do it like always”. In modern languages the default way is the “modern” way.

      This is how you declare a new component in gtk-rs:

      glib::wrapper! {
          pub struct MainMenu(ObjectSubclass<imp::MainMenu>)
              @extends gtk::PopoverMenu, gtk::Popover, gtk::Window, gtk::Widget,
              @implements gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget, gtk::Native, gtk::ShortcutManager;
      }
      
      impl MainMenu {
          pub fn new() -> Self {
              Object::new(&[]).expect("Failed to create `MainMenu`.")
          }
      }
      
      
      #[glib::object_subclass]
      impl ObjectSubclass for MainMenu {
          const NAME: &'static str = "MainMenu";
          type Type = super::MainMenu;
          type ParentType = gtk::PopoverMenu;
      
          fn class_init(klass: &mut Self::Class) {
              klass.bind_template();
          }
      
          fn instance_init(obj: &glib::subclass::InitializingObject<Self>) {
              obj.init_template();
          }
      }
      

      This is how you declare a new component in Leptos:

      #[component]
      fn App() -> impl IntoView {
      
          view! {
         <div>test</div>
          }
      }
      

      That’s what I mean by “it’s not ergonomic”.

      • illucidmind@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        22 minutes 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 ;)