Developing on Pinephone - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120) +--- Forum: General Discussion on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=127) +--- Thread: Developing on Pinephone (/showthread.php?tid=12918) Pages:
1
2
|
Developing on Pinephone - mandavel - 01-28-2021 (If I need to move this, please let me know where) Hi everyone, brand new here, first post. I've been diving headfirst into the linux world for about a year or two, and I'm not looking back after going the way of everyone else here and realizing how fun and deep the linux world goes. I would like to help develop on the pinephone, at least for expanding my own knowledge. I have an interest in programming, though I wouldn't say I'm well educated yet. I have basic scripting experience, understand a fair bit of the linux ecosystem and command line, and am smart enough to figure out a coding system once I have a project to apply it to. I am experienced in the Debian/ubuntu side of things, and would preferably like to stay in that realm because I just like it. I am extremely interested in helping the linux phone movement progress whether by developing, troubleshooting, cleaning up, or even just getting burritos for the team. So my questions are: how does one get started in this domain? What are some basic things I need to wrap my head around before diving in? What IDEs and languages are best used to program in the Debian-like environment? When developing for mobile/phosh/pinephone specifically, should I be learning a certain discipline, or just learning the desktop environment since it's all just that anyway? I'm doing research for myself and trying to be self-sufficient, but no reason not to ask the experts their advice on getting started. Any help would be great. Thanks RE: Developing on Pinephone - zborgerd - 01-28-2021 If you're using Mobian / Phosh, the Librem 5 development documentation might be a good place to start. That's what I'm using. https://developer.puri.sm/Librem5/Apps/index.html They cover everything from setting up a dev environment to basic app examples and publishing. They also talk about GNOME Builder and there are also good tutorials for that online as well. RE: Developing on Pinephone - mandavel - 01-28-2021 This is beautiful. Thanks a lot bud. Exactly the broad strokes I was looking for. RE: Developing on Pinephone - kern707 - 01-29-2021 Hey guys! I am also interested in application development for the PinePhone (Manjaro-arm) I was thinking about using Glade + libhandy, is there anything else? my development machine is a debian-based linux. Which programming languages could be used in conjunction ? last time I did any significant C development was a decade and a half ago, so I would rather not do it in C. EDIT: just checked out the link provided by zborgerd, lots of valuable information, thanks man! I went on and installed the dev env per the instructions. from what I see on Gnome Builder, it is also possible to use JS ? interesting! RE: Developing on Pinephone - mandavel - 01-30-2021 Apparently, as I found out, linux, and linux kernels are written in C. Not sure if it matters or not, but going forward I've decided to write in C, only because it's close to linux OS, close to the kernel, close to the machine and fast to compile. Maybe someone with more experience can chime in, but I'd rather write in the language that the host OS is written in. Especially if it's fast and efficient (meaning, less operations to execute) I can imagine that translates to less RAM used and less power consumed to operate... Which is what pinephones desperately need. RE: Developing on Pinephone - Mwo87 - 01-31-2021 (01-30-2021, 08:36 PM)mandavel Wrote: Apparently, as I found out, linux, and linux kernels are written in C. Not sure if it matters or not, but going forward I've decided to write in C, only because it's close to linux OS, close to the kernel, close to the machine and fast to compile. A low level language can give you greater efficiencies in speed and memory usage it is true, but it also makes you deal with a lot of low-level details other languages don't. Writing in the same language as the OS is not really necessary. Plenty of applications are written in lots of different languages. If you insist you want to go low-level though, another low-level and fast language on par with C is Rust. However Rust is much newer and takes advantage of a lot knowledge gained during the almost 50 years C has been around. C will also let you (quite easily) make lots of mistakes that can lead to security compromises. Rust makes this harder, but some say it can be somewhat more difficult to learn. Personally, I just think it seems harder because Rust won't let you write certain kinds of bad code that are very easy to accidentally write in C, even for experienced programmers. RE: Developing on Pinephone - kern707 - 01-31-2021 I'd say that if you have enough experience with C then there are some advantages, but it also comes with the burden of having to manually (and painstakingly) manage everything e.g. memory allocation, garbage collection etc.. by your self. I guess that with pure C you also don't have the benefits of 3rd party abstractions, so you pretty much have to write most of the stuff from scratch? let me know if I am wrong. I also thought about this a bit, and I'd rather write code that does not need to be bundled with a ton of bloatware (special dependences) to work, on the other hand my C skills are pretty rusty: then I have red a bit about Vala - from what I understand Vala gives us the benefits of both worlds: in one hand a high level of abstraction, on the other hand your Vala code is basically being translated into C and compiled as such, without the need for dependences like with the very high-level options. I want to write efficient code, but on the other hand have the ability to also focus on the UI/UX aspect, since after all it is about developing an application for a mobile device that has a touch screen :-) What do you guys think? RE: Developing on Pinephone - mandavel - 02-01-2021 I'd be interested in that point too, Kern. I'm ALL about fast, efficient, no bloat, small footprint, "only what you need," so I guess that's why the idea of C appeals to me. RE: Developing on Pinephone - signal9 - 02-02-2021 Developing applications in Rust for Gnome is a big reason I bought the PinePhone. I haven't had a chance to try it yet (just got my phone yesterday, switched from the Plasma release to Mobian this morning), but I've been looking at this starter project: https://github.com/richardanaya/pinephone-gtk-rs-starter I've seen some folks talk about compiling Rust on the phone, which seems unnecessary to me since cross-compiling Rust is pretty straightforward, something I've already done for the RaspberryPi. RE: Developing on Pinephone - kern707 - 02-04-2021 (02-02-2021, 01:57 PM)signal9 Wrote: Developing applications in Rust for Gnome is a big reason I bought the PinePhone. I haven't had a chance to try it yet (just got my phone yesterday, switched from the Plasma release to Mobian this morning), but I've been looking at this starter project: I feel that compiling directly on the phone is really cool as a feature, very cool that it is possible, but as for real software development it is not the most ideal way to go. so cross-compiling if possible, might a good idea |