ChanServ changed the topic of #wayland to: https://wayland.freedesktop.org | Discussion about the Wayland protocol and its implementations, plus libinput
RAOF has quit [Remote host closed the connection]
RAOF has joined #wayland
lsd|2 has quit [Quit: KVIrc 5.2.2 Quasar http://www.kvirc.net/]
<DemiMarie> wl_shm is an (extremely) special case
Company has quit [Ping timeout: 480 seconds]
Company has joined #wayland
garnacho has quit [Ping timeout: 480 seconds]
nerdopolis has quit [Remote host closed the connection]
nerdopolis has joined #wayland
sally is now known as Guest2326
sally has joined #wayland
Guest2326 has quit [Ping timeout: 480 seconds]
nerdopolis has quit [Remote host closed the connection]
remanifest has quit []
mxz_ has joined #wayland
mxz has quit [Ping timeout: 480 seconds]
mxz__ has quit [Ping timeout: 480 seconds]
mxz_ is now known as mxz
feaneron has quit [Ping timeout: 480 seconds]
azerov has joined #wayland
naemi44915 has quit []
naemi44915 has joined #wayland
Company has quit [Remote host closed the connection]
mxz_ has joined #wayland
sima has joined #wayland
rasterman has joined #wayland
tzimmermann has joined #wayland
coldfeet has joined #wayland
rv1sr has joined #wayland
glennk has joined #wayland
coldfeet has quit [Remote host closed the connection]
mripard has joined #wayland
garnacho has joined #wayland
kts has joined #wayland
kts has quit [Quit: Konversation terminated!]
leon-anavi has joined #wayland
<daniels> dmabuf is extremely the same
kts has joined #wayland
gryffus has quit [Ping timeout: 480 seconds]
<emersion> dmabuf doesn't have an enum
<emersion> but tehre are more weird cases
<emersion> e.g. when an external enum is referenced
<emersion> (doesn't make sure to use the object version to check for validity there)
<emersion> sense*
kts has quit [Quit: Konversation terminated!]
crazybyte has joined #wayland
garnacho has quit [Ping timeout: 480 seconds]
kts has joined #wayland
coldfeet has joined #wayland
garnacho has joined #wayland
kts has quit [Quit: Konversation terminated!]
<wlb> wayland-protocols/main: Simon Ser * xdg-decoration: add invalid_mode error https://gitlab.freedesktop.org/wayland/wayland-protocols/commit/df2b5e5e7b50 unstable/xdg-decoration/xdg-decoration-unstable-v1.xml
<wlb> wayland-protocols Merge request !265 merged \o/ (xdg-decoration: add invalid_mode error https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/265)
garnacho has quit [Ping timeout: 480 seconds]
fmuellner has joined #wayland
nerdopolis has joined #wayland
feaneron has joined #wayland
rv1sr has quit []
kts has joined #wayland
mripard has quit [Quit: mripard]
mripard has joined #wayland
<kennylevinsen> mclasen: my point was to abstract away from both rust and glib
OrkooffSep2[m] is now known as Orko[m]
<kennylevinsen> changed the wording to help in that regard
<mclasen> its fine, just a tangent to avoid
<kennylevinsen> I agree
Moprius has joined #wayland
dottedmag has quit [Remote host closed the connection]
dottedmag has joined #wayland
alatiera6 has joined #wayland
rv1sr has joined #wayland
Brainium has joined #wayland
kts has quit [Quit: Konversation terminated!]
<emersion> yeah, i don't think it was kenny's intention to compare rust and glib - on the contrary, the conmment explained how these are somewhat similar (provide unsafe funcs taking already-validated strings)
<mclasen> ftr, the functions aren't unsafe, they simply need to be used according to their documentation
<emersion> right, "unsafe" is rust terminology
<emersion> (for "might blow up")
<DemiMarie> Exactly
<mclasen> I know
<DemiMarie> I’d like to add enough information to the protocol XML so that libraries can validate enum values automatically.
<DemiMarie> Right now I have code that automatically validates enum values, but it emits a wl_display.invalid_method error.
<mclasen> does this work come with tests ?
<mclasen> better tests would be a most useful outcome
<DemiMarie> Not yet, and it is for ocaml-wayland, not libwayland.
<DemiMarie> ocaml-wayland uses generated code for unmarshaling so this kind of change is much simpler
<DemiMarie> If I add this to libwayland it will also generate an invalid_method error, unless the XML is changed to provide more information.
<DemiMarie> There ought to be integration tests in the form of a standalone binary that can be used with any server.
<vyivel> way-assay might be that
<mclasen> that would be ideal
<DemiMarie> mclasen: what do you think about automatic enum validation in and of itself?
<DemiMarie> For tests, I think the best approach is to generate the tests from the protocol XML, but that is likely out of scope for my current project.
balrog_ has joined #wayland
balrog has quit [Ping timeout: 480 seconds]
<emersion> DemiMarie: the wayland XML semantics is that values can live outside of the enum
<emersion> that could be seen as a defect of the original design
<DemiMarie> Fixable one, though: add a new attribute that specifies an error for out of range enums.
<kennylevinsen> if the issue is that the range is not defined by the spec, how would you know if an enum is out of range?
<DemiMarie> The presence of the new attribute would imply that the range is defined by the spec.
<kennylevinsen> Okay, that at least does seem possible
<emersion> yes, that would be one way to do it
<emersion> (still unclear how that would work for foreign enums)
<kennylevinsen> although note that some enums are bitmasks (e.g., `zwlr_layer_surface_v1::anchor`), so that's at least two different validation types
<emersion> the auto-generated libwayland validators handle this
<kennylevinsen> oh yeah, we have a flag for that already - nice
rasterman has quit [Quit: Gettin' stinky!]
<wlb> weston Merge request !1608 opened by () Add support for LED_COMPOSE and LED_KANA USB HID LEDs https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/1608
Brainium has quit [Quit: Konversation terminated!]
Moprius has quit [Ping timeout: 480 seconds]
Moprius has joined #wayland
bjorkint0sh has quit [Quit: "Every day, computers are making people easier to use." David Temkin]
bjorkintosh has joined #wayland
coldfeet has quit [Remote host closed the connection]
<DemiMarie> emersion: for foreign enums my plan is to include the generated headers for the other protocols if possible
<DemiMarie> If that is not possible, I can use extern symbols.
<emersion> that doesn't help trying to validate them
<emersion> foo has version 1, and an enum with entries "a", "b
<emersion> bar references such enum
<emersion> foo introduces v2 with a new entry "c" for the enum
<emersion> from bar, how to validate the foo enum?
Company has joined #wayland
<DemiMarie> Call foo's validation function?
<emersion> with v1? or accept v2 values?
<emersion> what if the new enum entry requires special considerations in bar?
<DemiMarie> How is a compositor supposed to know what to do?
<emersion> right now it's up to the protocol docs
<emersion> and most of it is 🤷
<DemiMarie> Any specific protocols with this problem?
<emersion> in the most complicated instance, we'd need to define a mapping between bar's versions and accepted foo enum versions
<emersion> or pass a version number in the bar request
<emersion> hm, latter would not work, nvm
<emersion> worst case, foo could have an enum entry saying "from version 2, behavior changes"
<emersion> (wl_data_* has some of these iirc)
<emersion> the other direction (foreign enum in an event) is also interesting
<DemiMarie> Could this be made an error condition, with the resolution being to copy and paste the enum definition?
<emersion> popular foreign enums are: wl_output.transform, wl_pointer.button_state, wl_pointer.axis_source, wl_pointer.axis
<emersion> well, i think it's a bit late for that
<emersion> since it's a pretty widely used feature
<DemiMarie> Could the existing ones be special-cased in the scanner?
<DemiMarie> More generally, is the XML meant to include semantics or just the wire format?
<kennylevinsen> Hmm? The XML specs define high-level messages and their semantics, not wire format
<DemiMarie> I'm wondering if I am trying to do too much.
<soreau> less is the new more
<kennylevinsen> as `man 1 more` states, "Users should realize that less provides more"
<DemiMarie> soreau kennylevinsen: are you joking or being serious?
<kennylevinsen> I’m just quoting the man page
<kennylevinsen> But it might seem like you’re trying to fight an uphill battle - adding the foreign enum flag and then skipping all validation of that, checking just the range of “normal” enums could be a simplification
<kennylevinsen> Foreign enums are special regardless
<emersion> Kenny follows man pages for all important life decisions
___nick___ has joined #wayland
<kennylevinsen> When I have a kid, I’ll hand them the command-line “man man” and consider my job raising them done
kts has joined #wayland
<emersion> rtfm education
<soreau> I'll teach mine to rtfs :P
<kennylevinsen> DemiMarie: you can also consider if invalid enums is enough of an issue to bother with at all of course - the problem is much smaller than the utf8 validity thing, yet more annoying to implement
coldfeet has joined #wayland
<kennylevinsen> Your time has value, so spend it wisely
coldfeet has quit [Remote host closed the connection]
___nick___ has quit []
___nick___ has joined #wayland
___nick___ has quit []
leon-anavi has quit [Remote host closed the connection]
Moprius has quit [Quit: bye]
tzimmermann has quit [Quit: Leaving]
___nick___ has joined #wayland
mclasen is now known as mclasen_afk
mohit8158226353 has quit [Remote host closed the connection]
rasterman has joined #wayland
kts has quit [Quit: Konversation terminated!]
mohit8158226353 has joined #wayland
mohit81582263530 has joined #wayland
paulk-bis has quit []
paulk has joined #wayland
mohit8158226353 has quit [Ping timeout: 480 seconds]
mohit81582263530 has quit [Ping timeout: 480 seconds]
mohit81582263530 has joined #wayland
mohit81582263530 has quit []
gryffus has joined #wayland
mohit81582263530 has joined #wayland
mohit81582263530 has quit []
mohit81582263530 has joined #wayland
gryffus_ has joined #wayland
gryffus has quit [Ping timeout: 480 seconds]
lyudess has quit []
Lyude has joined #wayland
feaneron has quit [Ping timeout: 480 seconds]
coldfeet has joined #wayland
rasterman has quit [Quit: Gettin' stinky!]
Moprius has joined #wayland
Brainium has joined #wayland
coldfeet has quit [Remote host closed the connection]
naemi44915 has quit []
naemi44915 has joined #wayland
___nick___ has quit [Remote host closed the connection]
Brainium has quit [Remote host closed the connection]
iconoclasthero has joined #wayland
Moprius has quit [Quit: bye]
ity has joined #wayland
<daniels> DemiMarie: the XML doesn't try to encode every possible error condition - for instance, trying to make a toplevel from a surface that's also a subsurface is described as being erroneous in text, but not in XML
rv1sr has quit []
rasterman has joined #wayland
gryffus has joined #wayland
bjorkintosh has quit [Ping timeout: 480 seconds]
gryffus_ has quit [Ping timeout: 480 seconds]
bjorkintosh has joined #wayland
glennk has quit [Ping timeout: 480 seconds]
sima has quit [Ping timeout: 480 seconds]
feaneron has joined #wayland
lsd|2 has joined #wayland
Brainium has joined #wayland
dos1 has joined #wayland
mclasen_afk has quit [Ping timeout: 480 seconds]
mclasen_afk has joined #wayland
rasterman has quit [Quit: Gettin' stinky!]
lsd|2 has quit [Quit: KVIrc 5.2.2 Quasar http://www.kvirc.net/]
iconoclasthero has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
Brainium_ has joined #wayland
Brainium has quit [Ping timeout: 480 seconds]
ehmry has quit [Ping timeout: 480 seconds]