Gajim - 2025-02-23


  1. hau

    y does gajim add \uFE0F after every emoji?

  2. jjj333_p (any pronouns)

    https://downloadable.pain.agency/file_share/2N7U7KjfC-gHalj0rY_ksmB-/6d087055-de66-4c96-88fa-dcc730e1b119.png

  3. jjj333_p (any pronouns)

    whered the button go 🤔

  4. jjj333_p (any pronouns)

    it works if i click the empty space there, but theres no button displaying

  5. lovetox

    hau: it's called a emoji variant selector, what's the problem with it?

  6. hau

    lovetox, it was causing an issue with reactions for my bot, cause it wouldn't recognize the emoji as valid when the message came from gajim. ``` reaction.set_value(reaction_txt, all_chars=all_chars) File "/usr/lib/python3/dist-packages/slixmpp/plugins/xep_0444/stanza.py", line 55, in set_value raise ValueError("%s is not a valid emoji" % value) ValueError: 🍫️ is not a valid emoji ``` I fixed it now by just filtering the character out, but just wondering if there's any purpose to it since other clients don't do it.

  7. lovetox

    depends there are emojis where it is valid, if you use gtk3 they added the variant to all emojis which is technically not valid for all emojis

  8. lovetox

    but you are talking about reactions or?

  9. lovetox

    i thought we filtered out all variant selectors

  10. lovetox

    we remove all variant selectors

  11. lovetox

    https://dev.gajim.org/gajim/gajim/-/blob/master/gajim/common/modules/reactions.py#L176

  12. lovetox

    and im sure this is also in the stable release

  13. lovetox

    so i would doubt that you received this from a current Gajim release

  14. lovetox

    either way, you need to be prepared to receive them, they are only invalid for some emojis not for all, this is defined in the emoji standard

  15. hau

    no not from reactions, from messages (where the bot gets the emoji to send as reaction from)

  16. hau

    > depends there are emojis where it is valid, if you use gtk3 they added the variant to all emojis which is technically not valid for all emojis do u have any examples of emojis where it is valid?

  17. lovetox

    but that makes not much sense, i can send in a message what i want, not just valid emojis :D

  18. lovetox

    https://www.unicode.org/reports/tr51/#Emoji_Variation_Selector_Notes

  19. lovetox

    and here examples

  20. lovetox

    https://www.unicode.org/reports/tr51/#Emoji_vs_Text_Display

  21. hau

    > but that makes not much sense, i can send in a message what i want, not just valid emojis :D well sure, and when an invalid emoji is sent it won't do anything, it's just weird that gajim sends invalid emojis when picked

  22. voker57

    Gajim still crashes if the funny unicode string is present in, for example, MUC topic

  23. lovetox

    voker57: in nightly?

  24. voker57

    in Debian Experimental, at least

  25. lovetox

    No idea what version they ship

  26. voker57

    1.9.5+git20250208.1b5501f8-1

  27. cal0pteryx

    This fix is included since Jan 9th https://dev.gajim.org/gajim/gajim/-/commit/1cece0fc0ee1e5eaaa7ba936a72046d89d0967ce

  28. lovetox

    voker57, where does it crash? when you join the room, or when you open the chat details dialog?

  29. voker57

    when I open the chat details

  30. voker57

    chat itself does not crash after updating to experimental

  31. lovetox

    yes seems we forgot to add the fix there

  32. bot

    lovetox pushed 1 commits to branch gajim/master cfix: Add pango word break workaround in more places - https://dev.gajim.org/gajim/gajim/-/commit/e5dc6e72cdf221967e96114781850ed13fb420d4

  33. lovetox

    thanks for reporting

  34. bot

    lovetox pushed 1 commits to branch gajim/master change: Require Python 3.11 - https://dev.gajim.org/gajim/gajim/-/commit/60f3cc5c984107941723bd382442fb0f4931e730

  35. bot

    lovetox pushed 1 commits to branch gajim/master cfix: Multiprocessing: Limit max tasks - https://dev.gajim.org/gajim/gajim/-/commit/6bceac5eb8913b45a53e96d07a646b207204de83

  36. bot

    wurstsalat pushed 1 commits to branch gajim/master cq: Iq module: Remove strong type assertion - https://dev.gajim.org/gajim/gajim/-/commit/710d772e777ad20c3d98940422d45215e036bf24

  37. bot

    lovetox pushed 1 commits to branch gajim/master refactor: Use shorter version for UTC timezone - https://dev.gajim.org/gajim/gajim/-/commit/5ad6b44e5e58e5da33dc96a25fbbab0bac039350

  38. mesonium

    https://superfastpython.com/processpoolexecutor-max-tasks-per-process/ > Unexpected Behavior With Maximum Tasks Per Child Process I wonder if this could be an issue also affecting us, can check it later.

  39. lovetox

    hm yes seems i can reproduce what that blog is saying

  40. lovetox

    seems like a bug, i found no bug report in python about it

  41. lovetox

    https://github.com/python/cpython/issues/115634

    đź‘Ť 2
  42. lovetox

    nice that you found this

  43. mesonium

    3 days ago > I think we should try to make some progress on this PR, it solves a real issue which is reported by multiple users. Hopefully the fix will land soon https://github.com/python/cpython/pull/115642#issuecomment-2673024916

  44. bot

    lovetox pushed 3 commits to branch gajim/master cfix: Mutliprocessing: Disable max limit of tasks - https://dev.gajim.org/gajim/gajim/-/commit/8ba034a19563775be179bbd89300f4016e1eaa22 cq: Update ruff config and fix errors - https://dev.gajim.org/gajim/gajim/-/commit/6686f97ac6fb7f2b62c49463b69cec1cb9bbc8c4 ci: Update ruff to 0.9.7 - https://dev.gajim.org/gajim/gajim/-/commit/42413fbcb2cd0f91a3cff4560f30b97791e0970c

  45. lovetox

    i dont think this is a big problem

  46. lovetox

    this just means that on long running Gajim instances we probably have more memory consumption

  47. lovetox

    but as long as we just use it for now for thumbnails, i dont think this will be noticable

  48. lovetox

    and to fix that Gajim just has to be restarted

  49. mesonium

    Maybe some naive question: Where would we expect to accumulate memory over time which can't be freed but require a restart and why can't it be freed without a restart respectively when is getting ref count to zero and gc not possible?

  50. lovetox

    in the worker process

  51. lovetox

    no application is free from memory leaks

    đź‘Ť 1
  52. black_mamba

    > no application is free from memory leaks unless you write it in rust! /s

  53. r00tobo

    this explains why i was getting huge memory consumption on my long running gajim client for weeks

  54. cal0pteryx

    r00tobo: if you're referring to leaks, yes. The change being discussed is only some days old

  55. dwd

    > unless you write it in rust! /s No, Rust protects from other kinds of memory errors. It'll help with untracked leaks (at least some some degree), but tracked leaks are still a problem.

  56. black_mamba

    > /s

  57. Link Mauve

    mesonium, lovetox, instead of doing your own thumbnailer, are you aware of Glycin which is used by GNOME’s Loupe to decode images in a sandbox, as to avoid exploits as much as possible?

  58. betarays wonders why we don’t have memory safe image tools yet

  59. Link Mauve

    betarays, glycin does both sandboxing (using bwrap) and uses the memory safe image crate, for security in depth.

  60. betarays

    oh, nice

  61. betarays

    maybe it’s not the same image crate as the one I stumbled upon some time ago (I think it’s the one used by servo), but it was still using other libraries to do the decoding

  62. Link Mauve

    There are some memory-unsafe libraries being used optionally, for instance if you want AVIF support it will use dav1d (which is written in C and assembly).

  63. Link Mauve

    But there is no other option for this format, if you want it to be performant you kind of have to use assembly.

  64. betarays

    oh, AV1 is that hard to decode that you _need_ extreme optimization or hardware decoding?

  65. Link Mauve

    I wouldn’t call that extreme, but yes you generally want optimizations to decode image data.

  66. betarays

    sure, but compilers already apply some level of optimizations

  67. Link Mauve

    Hardware acceleration is one area which glycin currently can’t do, due to the sandbox it won’t be able to access the required /dev/video* and /dev/media* devices.

  68. betarays

    I guess that makes sense

  69. Link Mauve

    betarays, for image data, you generally want to use the SIMD units in your CPU, which let you handle 16, 32 or even 64 times as many data as with scalar code.

  70. betarays

    Yes, I’m not sure whether compilers are any good at outputting SIMD instructions

  71. Link Mauve

    Compilers try, but unless they recognize the exact pattern being used they generally give up at auto-vectorization and end up producing scalar code.

  72. Link Mauve

    They are good at what they have been written for, simple arithmetic loops.

  73. betarays

    though presumably you could reduce your inline assembly enough to be trustworthy enough

  74. Link Mauve

    You could technically write an auto-vectorizer able to generate the same code as dav1d’s and ffmpeg’s asm decoders, but that would basically amount to pattern matching their exact functions, at which point you’re generally better off writing the assembly yourself.

  75. Link Mauve

    betarays, that’s what dav1d did.

  76. betarays

    but the rest of dav1d is C, right?

  77. Link Mauve

    The C code contains the generic functions it needs on every platform, and the assembly is for equivalent functions, which are generally self-contained algorithms.

  78. betarays

    I mean, I opened their repo and it seems the C code is extremely small compared to the assembly

  79. Link Mauve

    You also have https://github.com/memorysafety/rav1d which rewrites the C parts into Rust.

  80. betarays

    cool, I only knew of rav1e

  81. Link Mauve

    I wouldn’t say extremely small, it’s enough to get a fully functional AV1 decoder on any platform, the assembly parts are specific to each platform.

  82. Link Mauve

    rav1e is a completely different project, it is an encoder instead of a decoder, but it includes a few of the dav1d functions to optimise the decoding parts of the encoder.

  83. betarays

    I meant that gitlab says it’s 20% and most of the rest is assembly

  84. betarays

    (but of course the assembly has to be written for all platforms so…)

  85. Link Mauve

    (Modern codecs rely on decoding during encoding, in order to estimate the error rate you got and do a bunch of other targeted encoding decisions.)

  86. Link Mauve

    betarays, also most assembly languages are much more verbose than the equivalent C code, so if GitLab is counting per line it’s likely to inflate its weight.

  87. betarays

    right

  88. lovetox

    Works only on linux

  89. lovetox

    I see no python bindings

  90. Link Mauve

    Making Python bindings sounds easy enough.

  91. lovetox

    This just loads images it has no functionality to make a thumbnail

  92. lovetox

    Pillow can load all files formats under the sun and provides extensive image utilities and tools

  93. lovetox

    What is the benefit here? That you can exploit it less because it's sandboxed and in rust?

  94. Link Mauve

    Yes.

  95. bot

    lovetox pushed 2 commits to branch gajim/master refactor: Replace deprecated getdefaultlocale() - https://dev.gajim.org/gajim/gajim/-/commit/0cfc21afbc37db8058aed8492a88af01fa0c1965 refactor: Replace deprecated Widget hide() and show() - https://dev.gajim.org/gajim/gajim/-/commit/d8ef58f4f641d5ea44fdd52b2fcb8a321435358a

  96. bot

    lovetox pushed 1 commits to branch gajim/master refactor: Dialogs: Simplify showing dialogs - https://dev.gajim.org/gajim/gajim/-/commit/93c1ea1d7381b59bd835a4cb57c80242cc9b86fb

  97. bot

    wurstsalat pushed 1 commits to branch gajim/master cfix: ServerInfo: Fix checking for SM; improve type annotations - https://dev.gajim.org/gajim/gajim/-/commit/a8e22ed906333a5516c262ba6afbe1d796ee585a

  98. bot

    lovetox pushed 1 commits to branch gajim/master cfix: MUC: Fix assertion - https://dev.gajim.org/gajim/gajim/-/commit/f78ad7c421519172dde100b82e68693012e13f3b

  99. hyol

    had to restart gajim because it froze out on me

  100. bot

    wurstsalat pushed 1 commits to branch gajim/master cq: StartChat: Remove GTK4 TODO - https://dev.gajim.org/gajim/gajim/-/commit/8e9d8f49be2fcd4762fe216e20b345471e62d787