!HTbWttsFkPYtUEqIvs:matrix.org

Vala (lang)

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

Load older messages


SenderMessageTime
10 May 2020
@nahuelwexd:matrix.org@nahuelwexd:matrix.orgBased 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.org@nahuelwexd:matrix.orgCan 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.org@nahuelwexd:matrix.org
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.org@nahuelwexd:matrix.org

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.org@nahuelwexd:matrix.org
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.org@aeldemery.de:matrix.org joined the room.03:19:22
@aeldemery.de:matrix.org@aeldemery.de:matrix.orgGood 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
12 Jul 2020
@gavr:matrix.orggavrnope, but I planning this13:34:10
3 Aug 2020
@nahuelwexd:matrix.org@nahuelwexd:matrix.org changed their profile picture.16:16:39
30 Aug 2020
@aligalal:matrix.orgaligalal joined the room.17:59:01
1 Sep 2020
@hellonomad:matrix.org@hellonomad:matrix.org joined the room.16:14:14
11 Sep 2020
@lucycole:matrix.org@lucycole:matrix.org joined the room.20:53:47
20 Sep 2020
@aeldemery.de:matrix.org@aeldemery.de:matrix.org left the room.14:32:33
24 Sep 2020
@ambuyat:matrix.orgambuyat joined the room.03:54:50
27 Sep 2020
@danlin:matrix.orgdanlin joined the room.00:49:24
7 Oct 2020
@nahuelwexd:matrix.org@nahuelwexd:matrix.org changed their display name from Nahuel wexd to Nahuel Gomez Castro.19:30:16
16 Oct 2020
@tintou:matrix.org@tintou:matrix.org set a profile picture.16:54:31
@hellonomad:matrix.org@hellonomad:matrix.org changed their profile picture.17:24:28

Show newer messages


Back to Room List