Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upRewrite to C - enforce standards #501
Comments
ikeydoherty
added
bug
api-change
approved
labels
Jul 17, 2016
ikeydoherty
added this to the
10.3 milestone
Jul 17, 2016
ikeydoherty
self-assigned this
Jul 17, 2016
JoshStrobl
referenced this issue
Jul 30, 2016
Closed
Added select-able menu height to budgie-menu applet #521
referenced
this issue
Aug 5, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rilian-la-te
Aug 5, 2016
I understand the reason to moving to C, but coding in C is inconvenient, AFAIK, because of GObject boilerplate. GObject boilerplate is simply not good to write:( Why not simplier native lang, like Go or Rust?
rilian-la-te
commented
Aug 5, 2016
•
|
I understand the reason to moving to C, but coding in C is inconvenient, AFAIK, because of GObject boilerplate. GObject boilerplate is simply not good to write:( Why not simplier native lang, like Go or Rust? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ikeydoherty
Aug 5, 2016
Member
C isn't the issue really, GObject/GLib is the nastiness.We need a C ABI to allow native extensions/plugins for Budgie. Moving to another language wouldn't enable this.
Doing it in Rust would make it virtually impossible to package Budgie Desktop anywhere, and Solus is one of the few distributions with a working native Rust toolchain.
Go also represents distribution issues, and frankly I'm just not sure how well they'd interact with the eccentric nature of GLib (refcounting vs Go's garbage collection)
|
C isn't the issue really, GObject/GLib is the nastiness.We need a C ABI to allow native extensions/plugins for Budgie. Moving to another language wouldn't enable this. Doing it in Rust would make it virtually impossible to package Budgie Desktop anywhere, and Solus is one of the few distributions with a working native Rust toolchain. Go also represents distribution issues, and frankly I'm just not sure how well they'd interact with the eccentric nature of GLib (refcounting vs Go's garbage collection) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rilian-la-te
Aug 5, 2016
GObject/GLib is the nastiness. - You are telling the truth:)
I like Budgie anyways, but writing C boilerplate makes me boring. Is there any tools to automate its writing? And Vala gives to us many convenient functions like DBus annotation (whole interface without XML), GtkTemplate annotation (very convenient template automation) and some smaller.
Rewriting it in C is painful, very painful. But benefical.
rilian-la-te
commented
Aug 5, 2016
•
|
GObject/GLib is the nastiness. - You are telling the truth:) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ikeydoherty
Aug 5, 2016
Member
So I mean what we could do is add some very simple tooling to generate the boilerplate shite for us, including all the properties accessors, etc.
|
So I mean what we could do is add some very simple tooling to generate the boilerplate shite for us, including all the properties accessors, etc. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rilian-la-te
Aug 5, 2016
It is definetely worth:) Especially when its tools will be available for plugin developers.
What I like in Vala, I wrote above. And code simplicity.
rilian-la-te
commented
Aug 5, 2016
|
It is definetely worth:) Especially when its tools will be available for plugin developers. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
AGhost-7
Aug 20, 2016
Doing it in Rust would make it virtually impossible to package Budgie Desktop anywhere, and Solus is one of the few distributions with a working native Rust toolchain.
Why is that? Just wondering. Only thing that comes to mind is dynamic linking, but Rust does seem to support it fine (TBH I never tried dynamic linking in Rust so I'd be interested in hearing about that).
AGhost-7
commented
Aug 20, 2016
Why is that? Just wondering. Only thing that comes to mind is dynamic linking, but Rust does seem to support it fine (TBH I never tried dynamic linking in Rust so I'd be interested in hearing about that). |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ikeydoherty
Aug 21, 2016
Member
Because Rust applications cannot be packaged properly, and require internet access to do any builds. cargo basically fetches everything from github. That cannot be permitted for distro packages
|
Because Rust applications cannot be packaged properly, and require internet access to do any builds. cargo basically fetches everything from github. That cannot be permitted for distro packages |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
AGhost-7
commented
Aug 21, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ikeydoherty
Aug 23, 2016
Member
Right but we'd have to do this for every single package we used for Rust - they need a proper working solution before we ever consider it.
|
Right but we'd have to do this for every single package we used for Rust - they need a proper working solution before we ever consider it. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rilian-la-te
commented
Sep 5, 2016
|
@ikeydoherty do you allow to use g_autoptr in Budgie? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ikeydoherty
Sep 5, 2016
Member
@rilian-la-te I would far rather use the autofree mechanism from libnica and cve-check-tool, its very robust, extensible, and isn't dependent on the new ptr adds in subsequent glib releases. Plus the style isn't misleading (you still explicitly use *)
|
@rilian-la-te I would far rather use the |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rilian-la-te
Sep 5, 2016
But libnica DEF_AUTOFREE is same as g_autoptr or g_auto or g_autofree. Style only diff, I see, but libnica require linking with it, which is not good. Do you want to release a macro only library with C helpers?
rilian-la-te
commented
Sep 5, 2016
|
But libnica DEF_AUTOFREE is same as g_autoptr or g_auto or g_autofree. Style only diff, I see, but libnica require linking with it, which is not good. Do you want to release a macro only library with C helpers? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ikeydoherty
Sep 5, 2016
Member
Style only diff, I see, but libnica require linking with it, which is not good.
Or yknow, copying the macros into a header file. Far more portable.
Do you want to release a macro only library with C helpers?
Eh. Nica is a shared library and isn't macro-only.
Or yknow, copying the macros into a header file. Far more portable.
Eh. Nica is a shared library and isn't macro-only. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ikeydoherty
Sep 5, 2016
Member
So lets explore this now over @ https://github.com/ikeydoherty/budgie-panel :)
|
So lets explore this now over @ https://github.com/ikeydoherty/budgie-panel :) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rilian-la-te
commented
Sep 8, 2016
|
What minimal version of GLib is for budgie contributing? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Atm 2.44 |
ikeydoherty
added
the
P1
label
Sep 13, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ikeydoherty
Sep 13, 2016
Member
This is now a P1 bug. It holds precedence over all other issues, and is a public blocker for the 10.3 target.
|
This is now a P1 bug. It holds precedence over all other issues, and is a public blocker for the |
ikeydoherty
removed
the
bug
label
Sep 13, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ikeydoherty
Sep 13, 2016
Member
Deleted comments not pertaining to the discussion (i.e. the netsplit thing..)
|
Deleted comments not pertaining to the discussion (i.e. the netsplit thing..) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
pksadiq
Oct 13, 2016
Hi. I just found[0] that several code written in C here, are still using the old long boring boilerplate code.
Glib has recently (since 2.44 release) included a much simple way to do this. Please see the gtk+ examples[1].
Thanks
[0] https://github.com/solus-project/budgie-desktop/blob/master/plugin/plugin.h
[1] https://git.gnome.org/browse/gtk+/commit/?id=22ae9d0884fffb61ee826ec450e8d62ad1cdb957
pksadiq
commented
Oct 13, 2016
•
|
Hi. I just found[0] that several code written in C here, are still using the old long boring boilerplate code. Thanks [0] https://github.com/solus-project/budgie-desktop/blob/master/plugin/plugin.h |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ikeydoherty
Oct 13, 2016
Member
It's written using the old boilerplate for backwards compatibility where the macros don't exist. I'm also not going to rely completely on macros to define my API and not know what it truly looks like.
|
It's written using the old boilerplate for backwards compatibility where the macros don't exist. I'm also not going to rely completely on macros to define my API and not know what it truly looks like. |
solus-project
locked and limited conversation to collaborators
Oct 13, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ikeydoherty
Jan 25, 2017
Member
This issue has now been been deprecated by https://budgie-desktop.org/2017/01/25/kicking-off-budgie-11/
|
This issue has now been been deprecated by https://budgie-desktop.org/2017/01/25/kicking-off-budgie-11/ |
ikeydoherty commentedJul 17, 2016
•
edited
Edited 1 time
-
ikeydoherty
edited Jul 17, 2016 (most recent)
The codebase has begun to grow out of control..
With Vala we find many odd runtime issues, constant issues between new vapi files, an excessively heavy approach to the heap, poor debugging, poor maintainability, and frankly utterly shite C code that is emitted.
Even with those items out of the way, things to consider:
.text.clang-format..)longtransfers viaX atoms(bitwise shift isn't a strength here.).It's been spoken about for a while to do the C rewrite, now lets schedule this as a base requirement for the next major Budgie release, and rip all the shit out of the codebase
Right now we're busting at the seams with non-interoptable crap:
Requirements going forward:
.clang-formatconfiguration, with absolutely no exceptions.CFLAGrequirements and respect distributionCFLAGSfully.10.2branch of Budgie (intentionally)