Skip to content

Commit 992c0cb

Browse files
Add author profile for Krish , updates for week2 (#206)
- updated metadata for both weeks - added week2s blog - image for the new architecture
1 parent 06b0e9c commit 992c0cb

File tree

4 files changed

+321
-8
lines changed

4 files changed

+321
-8
lines changed
66.6 KB
Loading
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: "Krish Pandya"
3+
slug: "krish-pandya"
4+
title: "Maintainer and GSoC'25 Contributor"
5+
organization: "SugarLabs"
6+
description: "GSoC'25 Contributor at SugarLabs working on GTK4 migration"
7+
avatar: "https://avatars.githubusercontent.com/u/135974627?s=400&u=d8834bf3a691f090819069974b42cf936a93b0e7&v=4"
8+
---
9+
10+
<!--markdownlint-disable-->
11+
12+
# About Krish Pandya
13+
14+
I'm Krish, aka MostlyK, a B.Tech student in Electronics and Communication Engineering at IIITH. While my degree might say ECE, I've completely fallen down the open source rabbit hole. I believe in doing things right the first time, even if it takes longer, and I approach problems by understanding the "why" behind changes, not just the "what."
15+
16+
## Experience
17+
18+
- Systems engineering and graphics programming
19+
- Open source development and contribution
20+
- C/Python development
21+
- Linux and System Adminstration
22+
23+
## Current Projects
24+
25+
- **GSoC 2025**: GTK4 migration for Sugar Labs desktop environment
26+
- Modular architecture and newer build system design for Sugar
27+
- Sugar-AI and it's implementation along with other fun stuff.
28+
29+
## Connect with Me
30+
31+
- **GitHub**: [@mostlykiguess](https://github.com/mostlykiguess)
32+
- **Email**: [[email protected]](mailto:[email protected])
33+
- **LinkedIn**: [Krish Pandya](https://www.linkedin.com/in/krish-pandya-020aaa261/)
34+
- **Mastodon**: [@mostlyk](https://mastodon.social/@mostlyk)

src/constants/MarkdownFiles/posts/2025-06-08-gsoc-25-mostlyk-week01.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ excerpt: "A deep dive into the GTK4 migration journey for Sugar Labs - exploring
44
category: "DEVELOPER NEWS"
55
date: "2025-06-04"
66
slug: "2025-06-04-gsoc-25-mostlyk-community-bonding"
7-
author: "Krish Pandya"
7+
author: "@/constants/MarkdownFiles/authors/krish-pandya.md"
88
description: "GSoC'25 Contributor working on GTK4 migration for Sugar Labs"
99
tags: "gsoc25,sugarlabs,gtk4,mostlyk,community-bonding"
1010
image: "assets/Images/GSOC.png"
@@ -145,13 +145,6 @@ Huge thanks to Walter Bender for the guidance during this exploration phase, and
145145

146146
---
147147

148-
## Connect with Me
149-
150-
- GitHub:[@mostlykiguess](https://github.com/mostlykiguess)
151-
152-
- LinkedIn:[Krish Pandya](https://www.linkedin.com/in/krish-pandya-020aaa261/)
153-
- Mastodon:[@mostlyk](https://mastodon.social/@mostlyk)
154-
155148
Looking forward to sharing more updates,
156149

157150

Lines changed: 286 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,286 @@
1+
---
2+
title: "GSoC '25 Week 2 Update by Krish Pandya"
3+
excerpt: "From initial GTK4 porting to building a solid foundation with separate C and Python libraries"
4+
category: "DEVELOPER NEWS"
5+
date: "2025-06-14"
6+
slug: "2025-06-14-gsoc-25-mostlyk-week02"
7+
author: "@/constants/MarkdownFiles/authors/krish-pandya.md"
8+
tags: "gsoc25,sugarlabs,week02,mostlyk"
9+
image: "assets/Images/GSOC.png"
10+
---
11+
12+
<!-- markdownlint-disable -->
13+
14+
# Week 2: Strategic Pivot and Foundation Building
15+
16+
**Project:** [GTK4 Exploration](https://summerofcode.withgoogle.com/programs/2025/projects/rsHsYZKy)
17+
**Mentors:** [Walter Bender](https://github.com/walterbender), [Ibiam Chihurumnaya Ibiam](https://github.com/chimosky), [Juan Pablo Ugarte](https://github.com/xjuan)
18+
**Reporting Period:** June 06, 2025 till June 14, 2025
19+
20+
---
21+
22+
23+
## The Meeting that changed everything
24+
25+
On Friday(06-06-2025), we had a pivotal video call with Juan Pablo Ugarte and Ibiam Chihurumnaya that completely reshaped the porting approach.
26+
What started as a discussion about my initial porting work evolved into something much more strategic and forward-thinking.
27+
28+
> While the time of writing this, another meet that happened on 13-06-2025 , we discussed about the API versioning and updating with pytest, ideas about testing, more porting golden advice, more about this on next week's blog.
29+
30+
### The New Architecture Vision
31+
32+
The mentors introduced a brilliant modular approach that addresses the core challenges of the GTK4 migration:
33+
34+
**1. Two Separate Libraries Strategy**
35+
- C Library 'sugar-ext': Core objects and reusable GTK widgets
36+
- Python Wrapper Library: Python widgets and wrapper functions
37+
38+
![GTK4 Planning](assets/Images/gtk4drawing.png)
39+
40+
> Subject to change
41+
42+
**2. Independent Development & Testing**
43+
Each library will be developed in its own repository with simple Python example scripts. This approach offers several advantages:
44+
- Clear separation of concerns between C and Python components
45+
- Easier debugging and testing
46+
- Better CI/CD pipeline management
47+
- Modular, incremental development that reduces complexity
48+
49+
**3. Meson Build System Foundation**
50+
We'll use Meson's shared library template from GNOME Builder as our base. This gives us:
51+
- Modern build system designed for GTK4
52+
- Better dependency management
53+
- Cleaner project structure
54+
55+
### Why This Approach Made Sense
56+
57+
The more I thought about this strategy, the more I realized how elegant it is. Instead of trying to port everything at once (my initial approach, by changing the orignal toolkit and it's systems), we're building a solid foundation that can support the entire Sugar ecosystem. This modular approach means:
58+
59+
- Maintainability — Each component can be updated independently
60+
- Testing — Smaller, focused libraries are easier to test thoroughly
61+
- Future-proofing — The architecture can adapt as GTK continues to evolve
62+
- Support — Due to the new build system, we would have more support and we can also remove things we find deprecated.
63+
---
64+
65+
## Implementation
66+
67+
Following the meeting – I immediately got to work implementing.
68+
The result that came out was [Pull Request #1](https://github.com/sugarlabs/sugar-ext/pull/1) in the new 'sugar-ext' repository.
69+
70+
### What I Built
71+
72+
**Project Structure:**
73+
- Complete Meson build system setup
74+
- GObject Introspection integration for seamless Python bindings
75+
- Initial API implementation (starting with XO Colors for testing)
76+
- Comprehensive documentation and development tools
77+
78+
**Key Technical Decisions:**
79+
```c
80+
// API versioning strategy
81+
api_version = '1.0' // Maintaining compatibility with existing SugarExt
82+
package_version = '0.122.0' // Following Sugar's versioning convention
83+
84+
// GIR configuration for Python bindings
85+
symbol_prefix: 'sugarext'
86+
identifier_prefix: 'SugarExt'
87+
```
88+
89+
> This was discussed later in the meet and we decided to keep the packages version 2.0 or 4.0 because GTK4. Will be confirmed by the next blog,
90+
91+
- Included comprehensive build and test scripts
92+
93+
### Testing Framework
94+
95+
The project includes a robust testing setup:
96+
```bash
97+
meson test -C builddir
98+
```
99+
100+
This runs the test suite, validating that the C library builds correctly and the test written should pass.
101+
102+
---
103+
104+
### To my Fellow Devs
105+
106+
- I have few files that can help you get your setup right. If you like clangd and use it as your LSP. Here's the .clangd configuration I used for sugar-ext.
107+
108+
```yaml
109+
CompileDatabase: ./builddir
110+
111+
If:
112+
PathMatch: .*\.(c|h)$
113+
CompileFlags:
114+
Add: [
115+
-I./src,
116+
-I./builddir,
117+
-I/usr/include/gtk-4.0,
118+
-I/usr/include/glib-2.0,
119+
-I/usr/lib/glib-2.0/include,
120+
-I/usr/include/pango-1.0,
121+
-I/usr/include/harfbuzz,
122+
-I/usr/include/fribidi,
123+
-I/usr/include/gdk-pixbuf-2.0,
124+
-I/usr/include/cairo,
125+
-I/usr/include/freetype2,
126+
-I/usr/include/libpng16,
127+
-I/usr/include/pixman-1,
128+
-I/usr/include/graphene-1.0,
129+
-I/usr/lib/graphene-1.0/include,
130+
-I/usr/include/libmount,
131+
-I/usr/include/blkid,
132+
-I/usr/include/sysprof-6,
133+
-I/usr/local/include/sugar-ext,
134+
-D_FILE_OFFSET_BITS=64
135+
]
136+
137+
Diagnostics:
138+
ClangTidy:
139+
Add: [
140+
readability-*,
141+
bugprone-*,
142+
performance-*,
143+
misc-*
144+
]
145+
Remove: [
146+
modernize-*,
147+
readability-isolate-declaration,
148+
readability-function-cognitive-complexity
149+
]
150+
UnusedIncludes: Strict
151+
152+
InlayHints:
153+
Enabled: Yes
154+
ParameterNames: Yes
155+
DeducedTypes: Yes
156+
157+
Hover:
158+
ShowAKA: Yes
159+
160+
Index:
161+
Background: Build
162+
163+
Completion:
164+
AllScopes: Yes
165+
166+
Format:
167+
Style: GNU
168+
```
169+
170+
- And if you are using VSCode and the C/C++ extension, here's the c_cpp_properties.json.
171+
```json
172+
{
173+
"configurations": [
174+
{
175+
"name": "Linux",
176+
"includePath": [
177+
"${workspaceFolder}/**",
178+
"${workspaceFolder}/builddir",
179+
"/usr/include/gtk-4.0",
180+
"/usr/include/pango-1.0",
181+
"/usr/include/fribidi",
182+
"/usr/include/harfbuzz",
183+
"/usr/include/gdk-pixbuf-2.0",
184+
"/usr/include/cairo",
185+
"/usr/include/freetype2",
186+
"/usr/include/libpng16",
187+
"/usr/include/pixman-1",
188+
"/usr/include/graphene-1.0",
189+
"/usr/lib/graphene-1.0/include",
190+
"/usr/include/glib-2.0",
191+
"/usr/lib/glib-2.0/include",
192+
"/usr/include/libmount",
193+
"/usr/include/blkid",
194+
"/usr/include/sysprof-6"
195+
],
196+
"defines": [
197+
"_FILE_OFFSET_BITS=64"
198+
],
199+
"cStandard": "gnu11",
200+
"cppStandard": "c++17",
201+
"intelliSenseMode": "linux-gcc-x64",
202+
"compilerPath": "/usr/bin/gcc",
203+
"compileCommands": "${workspaceFolder}/builddir/compile_commands.json"
204+
}
205+
],
206+
"version": 4
207+
}
208+
```
209+
210+
## Lessons from the PR Review Process
211+
212+
- To be added on week 3 as it gets merged!
213+
214+
215+
# Migration List
216+
217+
- Here Use as-is means if we decide to keep it we use it or it's newer version or alternatives. Port meaning we would have to change stuff, and whenever I have mentioned GTK4 we will use the new API directly rather than implementing from scratch.
218+
## C Objects Migration List
219+
220+
| Object | Dependencies | Purpose | Port/Use GTK4 |
221+
|--------|--------------|---------|---------------|
222+
| sugar-grid.c/h | GLib + GDK | Grid-based layout calculations | Port |
223+
| sugar-fatattr.c/h | Pure C, sys headers | FAT filesystem attribute utilities | Use as-is |
224+
| acme-volume.c/h | GLib, ALSA | Audio volume control | Use as-is |
225+
| acme-volume-alsa.c/h | GLib, ALSA | ALSA backend for volume control | Use as-is |
226+
| sugar-wm.c/h | GLib, GDK, X11 | Window manager interaction utilities | Port |
227+
| sugar-clipboard.c/h | GLib, GTK3 | Clipboard helper functions | Port (GdkClipboard) |
228+
| eggdesktopfile.c/h | GLib, GTK3, GDK | Desktop file parsing and launching | Port |
229+
| sugar-key-grabber.c/h | GLib, GDK, X11 | Global key binding system | Port (GTK4 shortcuts) |
230+
| sugar-cursor-tracker.c/h | GLib, GDK, X11, XInput2 | Mouse cursor visibility tracking | Port (GTK4 events) |
231+
| sugar-gesture-grabber.c/h | GLib, GDK, X11, XInput2 | Global gesture capture system | Port (GTK4 gestures) |
232+
| sugar-event-controller.c/h | GLib, GTK4 | Base event controller | Port |
233+
| sugar-long-press-controller.c/h | GLib, GTK4 | Long press gesture detection | Port |
234+
| sugar-swipe-controller.c/h | GLib, GTK4 | Swipe gesture detection | Port |
235+
| sugar-touch-controller.c/h | GLib, GTK4 | Touch event handling | Port |
236+
| sugar-zoom-controller.c | GLib, GTK4 | Zoom gesture detection | Port |
237+
| sugar-rotate-controller.c | GLib, GTK4 | Rotation gesture detection | Port |
238+
| eggaccelerators.c/h | GLib, GTK3, GDK, X11 | Keyboard accelerator handling | Port |
239+
| eggsmclient.c/h | GLib | Session management client | Use as-is |
240+
| eggsmclient-xsmp.c/h | GLib, X11, ICE, SM | XSMP session management backend | Use as-is |
241+
| gsm-app.c/h | GLib | Session management application handling | Use as-is |
242+
| gsm-client.c/h | GLib | Session management client base | Use as-is |
243+
| gsm-client-xsmp.c/h | GLib, X11, ICE, SM | XSMP client implementation | Use as-is |
244+
| gsm-session.c/h | GLib | Session management core | Use as-is |
245+
| gsm-xsmp.c/h | GLib, X11, ICE, SM | XSMP protocol implementation | Use as-is |
246+
247+
248+
249+
## Next Steps: Building the Foundation
250+
251+
### Immediate Priorities (Week 3)
252+
253+
1. Finalize C Library Scaffold
254+
- Address remaining PR feedback
255+
- Implement proper copyright and licensing
256+
- Add core Sugar widgets starting with `sugar-grid`
257+
- Sugar-Grid was added on 14-June-2025 while I am writing this.
258+
259+
2. Begin Python Wrapper Development
260+
- Set up the Python-side repository
261+
- Create example scripts demonstrating usage
262+
263+
264+
265+
---
266+
267+
268+
## Resources & References
269+
270+
- Project Page – [GTK4 Exploration](https://summerofcode.withgoogle.com/programs/2025/projects/rsHsYZKy)
271+
- New C Library - [sugar-ext repository](https://github.com/sugarlabs/sugar-ext)
272+
- Active PR - [Establish C library base template with Meson for GTK4](https://github.com/sugarlabs/sugar-ext/pull/1)
273+
- Sugar Toolkit Repository(original) – [sugar-toolkit-gtk3](https://github.com/sugarlabs/sugar-toolkit-gtk3)
274+
- GTK4 Migration Guide – [docs.gtk.org/gtk4/migrating-3to4.html](https://docs.gtk.org/gtk4/migrating-3to4.html)
275+
276+
277+
---
278+
279+
## Acknowledgments
280+
281+
Huge thanks to Juan Pablo Ugarte first of all for being the official mentor and Ibiam Chihurumnaya for the guidance that that changed this project's direction. Their architectural vision has transformed porting into a comprehensive modernization effort. Thanks also to Walter Bender for mentorship.
282+
283+
---
284+
285+
THe architecture is building itself, and I'm excited to lay down the foundations!
286+

0 commit comments

Comments
 (0)