My approach to engineering involves an engineers notebook and pen at my side almost all the time. My ADHD is so bad that without writing things down I would very much not remember what I did.
Working at large companies can have a silencing effect on engineers in the community because all our communication energy is burnt on weekly status reports. You see this all the time, and it was famously expected behavior when FOSS people joined Google.
But it is not unique to Google and I certainly suffer from it myself. So I’m going to try to experiment for a while dropping my status reports here too, at least for the things that aren’t extremely specific to my employer.
Open Questions
-
What is the state-of-the-art right now for “I want to provide a completely artisan file-system to a container”. For example, say I wanted to have a FUSE file-system for that build pipeline or other tooling accessed.
At least when it comes to project sources. Everything else should be read-only anyway.
It would be nice to allow tooling some read/write access but gate the writes so they are limited to the tools running and not persistent when the tool returns.
Foundry
-
A bit more testing of Foundry’s replacement for Jsonrpc-GLib, which is a new libdex based
FoundryJsonrpcDriver
. It knows how to talk a few different types (HTTP-style, \0 or \n delimited, etc).LSP backend has been ported to this now along with all the JSON node creating helpers so try to put those through their paces.
-
Add pre-load/post-load to
FoundryTextDocumentAddin
so that we can add hooks for addins early in the loading process. We actually want this more for avoiding things during buffer loading. -
Found a nasty issue where creating addins was causing long running leaks do to the
GParameter
arrays getting saved for future addin creation. Need to be a bit more clever about initial property setup so that we don’t create this reference cycle. -
New word-completion plugin for Foundry that takes a different approach from what we did in GtkSourceView. Instead, this runs on demand with a copy of the document buffer on a fiber on a thread. This allows using regex for word boundaries (
\w
) with JIT, no synchronization with GTK, and just generally _a lot_ faster. It also allowed for following referenced files from#include
style style headers in C/C++/Obj-C which is something VIM does (at least with plugins) that I very much wanted.It is nice knowing when a symbol comes from the local file vs an included file as well (again, VIM does this) so I implemented that as well for completeness.
Make sure it does word de-duplication while I’m at it.
-
Preserve completion activation (user initialized, automatic, etc) to propagate to the completion providers.
-
Live diagnostics tracking is much easier now. You can just create a
FoundryOnTypeDiagnostics(document)
and it will manage updating things as you go. It is also smart enough to do this withGWeakRef
so that we don’t keep underlying buffers/documents/etc alive past the point they should be unloaded (as the worker runs on a fiber).You can share a single instance of the live diagnostics using
foundry_text_document_watch_diagnostics()
to avoid extra work. -
Add a Git-specific clone API in
FoundryGitClone
which handles all the annoying things like SSH authentication/etc via the use of our prompt abstraction (TTY, app dialog, etc). This also means there is a newfoundry clone ...
CLI command to test that infrastructure outside of the IDE. Should help for tracking down weird integration issues. -
To make the Git cloner API work well I had to remove the context requirement from
FoundryAuthPrompt
. You’ll never have a loaded context when you want to clone (as there is not yet a project) so that requirement was nonsensical. -
Add new
foundry_vcs_list_commits_with_file()
API to get the commit history on a single file. This gives you a list model ofFoundryCommit
which should make it very easy for applications to browse through file history. One call, bridge the model to a listview and wire up some labels. -
Add
FoundryVcsTree
,FoundryVcsDiff
,FoundryVcsDelta
types and git implementations of them. Like the rest of the new Git abstractions, this all runs threaded using libdex and futures which complete when the thread returns. Still need to iterate on this a bit before the 1.0 API is finalized. -
New API to generate diffs from trees or find trees by identifiers.
-
Found out that
libgit2
does not support the bitmap index of the command line git command. That means that you have to do a lot of diffing to determine what commits contain a specific file. Maybe that will change in the future though. We could always shell out to the git command for this specific operation if it ends up too slow. -
New CTags parser that allows for read-only memory. Instead of doing the optimization in the past (insert
\0
and use strings in place) the new index keeps string offset/run for a few important parts.Then the open-coded binary search to find the nearest partial match against (then walking backward to get first potential match) can keep that in mind for
memcmp()
.We can also send all this work off to the thread pools easily now with libdex/futures.
Some work still remains if we want to use CTags for symbol resolution but I highly doubt we do.
Anyway, having CTags is really more just about having an easy test case for the completion engine than “people will actually use this”.
-
Also write a new CTags miner which can build CTags files using whatever ctags engine is installed (universal-ctags, etc). The goal here is, again, to test the infrastructure in a super easy way rather than have people actually use this.
-
A new
FoundrySymbolProvider
andFoundrySymbol
API which allows for some nice ergonomics when bridging to tooling like LSPs.It also makes it a lot easier to implement features like pathbars since you can
foundry_symbol_list_to_root()
and get a future-populatedGListModel
of the symbol hierarchy. Attach that to a pathbar widget and you’re done.
Foundry-GTK
-
Make
FoundrySourceView
final so that we can be a lot more careful about life-cycle tracking of related documents, buffers, and addins. -
Use
FoundryTextDocumentAddin
to implement spellchecking with libspelling as it vastly improves life-cycle tracking. We no longer rely on UB in GLib weak reference notifications to do cleanup in the right order. -
Improve the completion bridge from
FoundryCompletionProvider
toGtkSourceCompletionProvider
. Particularly start onafter
/comment
fields. We still need to getbefore
fields setup for return types.Still extremely annoyed at how LSP works in this regards. I mean really, my rage that LSP is what we have has no bounds. It’s terrible in almost every way imaginable.
Builder
-
Make my Builder rewrite use new
FoundrySourceView
-
Rewrite search dialog to use
FoundrySearchEngine
so that we can use the much faster VCS-backed file-listing + fuzzy search.
GtkSourceView
-
Got a nice patch for porting space drawing to GskPath, merged it.
-
Make Ctrl+n/Ctrl+p work in VIM emulation mode.
Sysprof
-
Add support for building introspection/docs. Don’t care about the introspection too much, because I doubt anyone would even use it. But it is nice to have documentation for potential contributors to look at how the APIs work from a higher level.
GUADEC
-
Couldn’t attend GUADEC this year, so wrote up a talk on Foundry to share with those that are interested in where things are going. Given the number of downloads of the PDF, decided that maybe sharing my weekly status round-up is useful.
-
Watched a number of videos streamed from GUADEC. While watching Felipe demo his new boxes work, I fired up the repository with foundry and things seem to work on aarch64 (Asahi Fedora here).
That was the first time ever I’ve had an easy experience running a virtual machine on aarch64 Linux. Really pleasing!
foundry clone https://gitlab.gnome.org/felipeborges/boxes/ cd boxes/ foundry init foundry run
LibMKS
-
While testing Boxes on aarch64 I noticed it is using the Cairo framebuffer fallback paintable. That would be fine except I’m running on 150% here and when I wrote that code we didn’t even have real fractional scaling in the Wayland protocol defined.
That means there are stitch marks showing up for this non-accelerated path. We probably want to choose a tile-size based on the scale- factor and be done with it.
The accelerated path shouldn’t have this problem since it uses one DMABUF paintable and sets the damage regions for the GSK renderer to do proper damage calculation.