@vancha The world needs more GTK programming tutorials in general! If I don't understand the documentation it is a lot of trail and error until I know how things work... And this is very often the case...
I'm torn between these for L5 development:
1) GTK/Libhandy/Builder/Glade (hard to figure out with Rust but most native to L5 and continuous improvements for mobile usecase)
2) Druid - Rust with well though out reactive UI architecture that fits Rustlang nicely (but no Libhandy and not ready for prod yet afaict):
https://github.com/linebender/druid
3) Flutter Desktop Linux (getting close to working on aarch64, but not yet)
https://github.com/flutter/engine/pull/20254#issuecomment-694546839
@tomek @ITwrx @zwerg12 I'm not stopping to learn gtk-rs with builder, libhandy and glade until i can write a useful application. I really think that stack is going to be really useful for mobile applications in terms of being low overhead (and thus power efficient) and expressive.
If I was a better programmer it might not have taken so long, but it can't hurt to just keep at it ^^
I can't say anything about any of these 3 programming tools because I am using GTK/Libhandy/Builder in combination with C.
I had four main goals for my project:
1) Using only basic libraries to reduce the amount of dependencies and keep the app size small
2) Use C to learn the language because I want to do some kernel stuff in the future
3) Fast speed to be energy efficient: I use heavy calculations in my app
4) Designed perfectly for the L5
Multiplatform development is certainly more challenging than single-platform. Flutter is probably the best tool out there right now for that, but you still have differences between platforms, need to develop platform specific plugins, etc. If you don't HAVE TO support multiple platforms it is obviously unnecessary. If you DO however than it is still *much faster and less expensive* than developing three separate native apps for each platform.
@vancha
Haha difficult question.
I don't use Glade I write the UI files manually and I like this much more.
Writing the C code is a bit tricky but some gnome projects are written in C and I often look how they solved some problems. Purism has some examples written in C which helped using libhandy correctly. But at the moment I have not much time for programming so I will give an update once I have more experience.
But until now I am really pleased. I haven't had unsolvable problems until now.
@zwerg12 well not having unsolveable problems yet says a lot I guess :p everything I've tried thus far seemed unsolveable ^^
The issue is always thinking in terms of objects and passing them around. I always run into some kind of mutability related error sooner or later. I'll check out a couple of those examples then ^^ thanks!
@vancha I didn't knew that rust is that difficult in combination with GTK. In C everything is a pointer and you just have to pass them over and every thing works fine :D
@zwerg12 I don't think it's that difficult. It has it's quirks, like having to clone every widget before you can connect to a signal (which under the hood only copies a single pointer it seems), but it gets tougher when the application has multiple views/screens. Which is more an effect of the way rust deals with memory. There's probably a couple design patterns already figured out by other rust/gtk developers that make it eas(y/ier) to develop a full application. I'll read more code.
I have also been thinking about just going pure C with GTK. For that, Kevin O'Kane has a nice set of tutorials to learn from on Youtube:
https://www.youtube.com/watch?v=g-KDOH_uqPk&t=3s
@tomek
Oh thanks a lot! I have seen that he has also a Cairo tutorial. That could be quite useful for my app :D
@zwerg12 Curious, what app are you working on?
@tomek
https://gitlab.com/Zwarf/picplanner
It's an app for photographers who want to know when and where the sunrise and sunset is, where to find the milky way at night and so on. There are apps for Android and iOS but not for Linux and I need this app to use the L5 as daily driver. I am not that far at the moment but I want the basic functions to work until end of the year :D
@zwerg12 @tomek You' ve probably already seen it, but since you haven't crossed off the "Calculate sunrise and sunset at a specific day", is this pdf in any way useful to you?
https://www.esrl.noaa.gov/gmd/grad/solcalc/solareqns.PDF
Oh thanks! No I haven't seen this pdf yet. Looks interesting because it is a different approach like the ones I have seen until now. I have some books which I use for calculations furthermore I am a physics student which helps. However, the calculations are often numeric fits to measured data which makes it hard to follow where some formulas come from. This pdf is a good example that different people sometimes receive different values. I must check which formula is the most precise :D
@zwerg12 ah good :D I remembered you did your own calculations from when I went over your code ^^ I hope it helps!
@tomek @vancha @ITwrx
I have heard a lot good things about Flutter but I personally hate multi platform development... I once tried it with an app. It always works kind of but never perfect. Once it worked on windows phones and android it failed on iOS and the other way round.
I will never ever program for anything else then linux again :D
However, Druid sounds really interesting!
But in the near future I will stick to C...