!HTbWttsFkPYtUEqIvs:matrix.org

Vala (lang)

28 Members
Casual help and talk about the Vala language.2 Servers

Load older messages


SenderMessageTime
1 May 2020
@nahuelwexd:matrix.orgNahuel wexdDepending on what you need, you can just simply create a wrapper for Gee.HashMap, that inherits from the Gee.AbstractMap class22:13:01
@nahuelwexd:matrix.orgNahuel wexdThen just add the elements_changed signal and emit it every time that the set or unset methods are called22:14:23
@nahuelwexd:matrix.orgNahuel wexd gavr 22:14:29
@nahuelwexd:matrix.orgNahuel wexd * Depending on what you need, you can just simply create a wrapper for Gee.HashMap, that inherits from the Gee.AbstractMap class22:17:40
@gavr:matrix.orggavrYes, this is also what I thought, or create a wrapper function that will change the collection and emitting a signal.23:08:12
2 May 2020
@desiderantes:matrix.orgdesideranteshttps://gitlab.gnome.org/GNOME/libgee/-/issues/3502:02:39
@desiderantes:matrix.orgdesiderantes I reported the issue gavr 02:03:27
7 May 2020
@nahuelwexd:matrix.orgNahuel wexd gavr: Sorry if I bother you but... https://github.com/nahuelwexd/UTLib that's the library that I'm working on. I use vul just cuz json-glib does not work well with Gee 01:21:20
@nahuelwexd:matrix.orgNahuel wexd Also, I finally solved my problem with just a simple chmod +x 01:22:17
@gavr:matrix.orggavrNice to hear11:07:50
10 May 2020
@nahuelwexd:matrix.orgNahuel wexd gavr: r u still a trusted gnome editor? 21:41:05
@nahuelwexd:matrix.orgNahuel wexdBased on ricotz words, I think exposing generics on libraries aimed to be fully GI-compatible is a thing that we need to avoid21:42:42
@nahuelwexd:matrix.orgNahuel wexdCan you update https://wiki.gnome.org/Projects/Vala/LibraryWritingAPIABI in order to reflect that? 🤔21:44:01
12 May 2020
@gavr:matrix.orggavrYes. I'm not sure what to change? Do you want me to create a new paragraph Avoid Using Generics?00:23:43
@gavr:matrix.orggavr
In reply to @nahuelwexd:matrix.org
Can you update https://wiki.gnome.org/Projects/Vala/LibraryWritingAPIABI in order to reflect that? 🤔
If so, you'd better write the text you want to add, and I'll post it there.
00:24:13
@nahuelwexd:matrix.orgNahuel wexd
In reply to @gavr:matrix.org
Yes. I'm not sure what to change? Do you want me to create a new paragraph Avoid Using Generics?
Well, maybe not using, but rather exposing generics. Internally they can be useful, but when trying to use them in languages like Python seems very complicated
00:56:00
@gavr:matrix.orggavr Nahuel wexd: So you want me to add a line like " Also don't use generics in functions that you want to be available from GI bindings" 01:03:42
@nahuelwexd:matrix.orgNahuel wexd

gavr: It should say something like this:

Avoid Using Generics

Since GObject Introspection does not handle generics, using them in APIs is harmful, since GI will generate 3 new parameters in the constructors of each generic class: one for the GType function, one for the duplication function and another for the destruction. These parameters are quite complicated to handle in languages like Python or Javascript.

In addition to this, the properties that expose the generic type parameter will be exposed as gpointers, which makes it even more complicated. Even generic methods like Gee's add () will expect a gpointer in GI, so doing something like this in Python will result in an error, contrary to what you expect.

list = get_a_list_of_strings ()
list.add ('Hi')
01:12:20
@gavr:matrix.orggavrOkey01:18:27
@gavr:matrix.orggavrAlso GNOME has ultra-old editing system 01:21:38
@gavr:matrix.orggavrimage.png
Download image.png
01:21:39
@gavr:matrix.orggavr Nahuel wexd: Done https://wiki.gnome.org/Projects/Vala/LibraryWritingAPIABI#Avoid_Using_Generics 01:24:14
@gavr:matrix.orggavrThank you for your contribution. Vala really needs more documentation.01:24:49
@nahuelwexd:matrix.orgNahuel wexd
In reply to @gavr:matrix.org
sent an image.
A simple text box and CommonMark compatibility should enough for any mortal, but complicate it like this...
01:30:53
24 May 2020
@migmatite:matrix.org@migmatite:matrix.org left the room.19:06:18
29 May 2020
@vanadiae:matrix.org@vanadiae:matrix.org left the room.21:38:51
31 May 2020
@Prince781:matrix.orgPrince781For Vala programmers, the first production release of the Vala Language Server has been made: https://github.com/benwaffle/vala-language-server/releases/tag/0.4812:54:53
3 Jul 2020
@aeldemery.de:matrix.orgaeldemery.de joined the room.03:19:22
@aeldemery.de:matrix.orgaeldemery.deGood morning. Had anybody a chance to play with gtk4 in vala?03:58:55
6 Jul 2020
@alexcleac:matrix.orgalexcleac joined the room.06:45:57

There are no newer messages yet.


Back to Room List