The Official Status Thread


  • Discourse touched me in a no-no place



  • @dkf said in The Official Status Thread:

    @Arantor Other than for demo purposes (and a few unlikely things such as screen capture with mouse), what would you use that for? Most of the time, you only need the info when you have a pointer grab going (that's used in drag-and-drop).

    Screen ruler.


  • Discourse touched me in a no-no place

    @Arantor Ah. I never think of those. 😅


  • Considered Harmful

    @Arantor egui doesn't expose this for mostly the same reason it doesn't expose sound effects: it's not part of making a GUI and there's already a library for it. Rust libraries are very much Unix-philosophy-lite on this front - e.g. instead of something like OpenSSL, each algorithm has its own library.



  • @pie_flavor said in The Official Status Thread:

    @Arantor egui doesn't expose this for mostly the same reason it doesn't expose sound effects: it's not part of making a GUI and there's already a library for it. Rust libraries are very much Unix-philosophy-lite on this front - e.g. instead of something like OpenSSL, each algorithm has its own library.

    And yet it gives me a variety of other related pieces of information. Not least screen resolution, window position relative to the screen and the mouse position relative to the canvas.

    And it indirectly knows about this because it internally actively keeps track of whether the mouse is over an egui context or not, because it uses that to work out if it should do certain kinds of processing.

    Edit: I did figure it out using the mouse_position crate but that feels like a huge extra insanity (the debug app goes from 6MB to 8MB and it’s doing little more than drawing a window on the screen and writing the co-ords on it)

    I also realised that egui is not entirely performant for this use case, but this is why I tried it out, to get a feel for what it was good at and what it wasn’t. I shouldn’t really be able to max out a CPU core if I just wiggle a mouse on a canvas that literally does nothing other than have a toggle for light/dark.


  • Notification Spam Recipient

    @Zecc said in The Official Status Thread:

    I mean the bird who announces the coming of spring, guys. :rolleyes:

    What the fuck is that even?


  • Notification Spam Recipient

    @Arantor said in The Official Status Thread:

    . I shouldn’t really be able to max out a CPU core if I just wiggle a mouse on a canvas that literally does nothing other than have a toggle for light/dark.

    Modern computing, folks.

    But hey, good news! We can retrain the guy who need cpu temperature to control things!


  • Discourse touched me in a no-no place

    @Arantor said in The Official Status Thread:

    I shouldn’t really be able to max out a CPU core if I just wiggle a mouse on a canvas that literally does nothing other than have a toggle for light/dark.

    The problem is probably due to updating the window too frequently. Redraws are expensive (especially with fancy modern fonts and complex window styles) so processing them too often adds a great deal of cost, despite not altering the speed of our perceptions.



  • @dkf said in The Official Status Thread:

    @Arantor said in The Official Status Thread:

    I shouldn’t really be able to max out a CPU core if I just wiggle a mouse on a canvas that literally does nothing other than have a toggle for light/dark.

    The problem is probably due to updating the window too frequently. Redraws are expensive (especially with fancy modern fonts and complex window styles) so processing them too often adds a great deal of cost, despite not altering the speed of our perceptions.

    That is exactly the problem but I haven’t yet worked out how to turn that down. When my mouse isn’t over the window, it refreshes by default at approximately once a second (though I manually change it to 50 Hz which is more than fast enough), but refreshes much more frequently on mouse over.

    But I’m getting there and I’m not being overly bothered by Rust, mostly because all the hard stuff is abstracted away.


  • Discourse touched me in a no-no place

    @Arantor said in The Official Status Thread:

    @dkf said in The Official Status Thread:

    @Arantor said in The Official Status Thread:

    I shouldn’t really be able to max out a CPU core if I just wiggle a mouse on a canvas that literally does nothing other than have a toggle for light/dark.

    The problem is probably due to updating the window too frequently. Redraws are expensive (especially with fancy modern fonts and complex window styles) so processing them too often adds a great deal of cost, despite not altering the speed of our perceptions.

    That is exactly the problem but I haven’t yet worked out how to turn that down. When my mouse isn’t over the window, it refreshes by default at approximately once a second (though I manually change it to 50 Hz which is more than fast enough), but refreshes much more frequently on mouse over.

    When the mouse is over the window, you get XMotion events (or their almost exact equivalents in other windowing systems) delivered at sometimes crazy speeds. Sounds like you shouldn't update the display in response to those; just note the position and update the UI on a timer (20Hz would likely be an excessive rate for that).



  • @dkf said in The Official Status Thread:

    @Arantor said in The Official Status Thread:

    @dkf said in The Official Status Thread:

    @Arantor said in The Official Status Thread:

    I shouldn’t really be able to max out a CPU core if I just wiggle a mouse on a canvas that literally does nothing other than have a toggle for light/dark.

    The problem is probably due to updating the window too frequently. Redraws are expensive (especially with fancy modern fonts and complex window styles) so processing them too often adds a great deal of cost, despite not altering the speed of our perceptions.

    That is exactly the problem but I haven’t yet worked out how to turn that down. When my mouse isn’t over the window, it refreshes by default at approximately once a second (though I manually change it to 50 Hz which is more than fast enough), but refreshes much more frequently on mouse over.

    When the mouse is over the window, you get XMotion events (or their almost exact equivalents in other windowing systems) delivered at sometimes crazy speeds. Sounds like you shouldn't update the display in response to those; just note the position and update the UI on a timer (20Hz would likely be an excessive rate for that).

    I will once I figure out how to convince egui/eframe to do that, 50 Hz for now but I will try tuning it down once I have it behaving sensibly.

    But yes, ultimately, that is what is going on.



  • Status: Stupid neighbor, barking at me about a box the wind blew onto his property. Don't act like I don't know I pay for garbage pickup and I won't act like you're too retarded to see me breaking down boxes and putting them on the curb every damned week.



  • @dkf said in The Official Status Thread:

    When the mouse is over the window, you get XMotion events (or their almost exact equivalents in other windowing systems) delivered at sometimes crazy speeds. Sounds like you shouldn't update the display in response to those; just note the position and update the UI on a timer (20Hz would likely be an excessive rate for that).

    Or, you know, use the ancient dark magic known as "don't redraw things that haven't changed".


  • 🚽 Regular

    @Tsaukpaetra said in The Official Status Thread:

    @Zecc said in The Official Status Thread:

    I mean the bird who announces the coming of spring, guys. :rolleyes:

    What the fuck is that even?

    One of the four seasons of the year some people get.

    It's usually more temperate than its preceding season, winter, and some species of migratory birds return to regions where it becomes warmer.



  • @Zerosquare said in The Official Status Thread:

    @dkf said in The Official Status Thread:

    When the mouse is over the window, you get XMotion events (or their almost exact equivalents in other windowing systems) delivered at sometimes crazy speeds. Sounds like you shouldn't update the display in response to those; just note the position and update the UI on a timer (20Hz would likely be an excessive rate for that).

    Or, you know, use the ancient dark magic known as "don't redraw things that haven't changed".

    Problem A: screen ruler is the kind of thing that will typically have a redraw somewhere very often.

    Problem B: egui is immediate mode, it wants to redraw early, redraw often. I’m just inhabiting a space where it’s possibly not the right tool for the job but I’m just experimenting because I have other apps where it would potentially be a better fit.



  • @Zecc said in The Official Status Thread:

    I saw the first swallow of the year today.

    Was it an African or a European swallow?



  • @nerd4sale said in The Official Status Thread:

    @Zecc said in The Official Status Thread:

    I saw the first swallow of the year today.

    Was it an African or a European swallow?

    One presumes unladen.


  • Notification Spam Recipient

    STATUS Nothing to do so going down youtube rabbit holes between... nothing?

    Anyway, how many analog horror series is there on youtube and how many people are investigating them? Where are people getting time to do all this shit? Vita Carnis definitely touched me in a no-no space. Thought I was immune to this shit by now. 🙀


  • Discourse touched me in a no-no place

    @Arantor said in The Official Status Thread:

    Problem A: screen ruler is the kind of thing that will typically have a redraw somewhere very often.

    Very often in human terms is hardly ever for computers...

    Problem B: egui is immediate mode, it wants to redraw early, redraw often. I’m just inhabiting a space where it’s possibly not the right tool for the job but I’m just experimenting because I have other apps where it would potentially be a better fit.

    Ugh. Immediate updates are the problem, when combined with the fact that GUI redraws are expensive. (Especially with modern fonts.) The best way to deal with this is (usually) to postpone the actual redraw until you have drained the event queue; when an event catches up with another, it doesn't result in an overload.

    Technically, if you can get a message that the imcoming event queue is empty, then on a model change you schedule a redraw to happen the next time the queue empties; the queue handles the rest. (Got an event already scheduled? Don't need another. The logic is very easy to implement.) If you don't have such an event, a timer is needed instead, and you have to do more trickery to determine the right timeouts...


  • BINNED

    @Arantor said in The Official Status Thread:

    @Zerosquare said in The Official Status Thread:

    @dkf said in The Official Status Thread:

    When the mouse is over the window, you get XMotion events (or their almost exact equivalents in other windowing systems) delivered at sometimes crazy speeds. Sounds like you shouldn't update the display in response to those; just note the position and update the UI on a timer (20Hz would likely be an excessive rate for that).

    Or, you know, use the ancient dark magic known as "don't redraw things that haven't changed".

    Problem A: screen ruler is the kind of thing that will typically have a redraw somewhere very often.

    Problem B: egui is immediate mode, it wants to redraw early, redraw often. I’m just inhabiting a space where it’s possibly not the right tool for the job but I’m just experimenting because I have other apps where it would potentially be a better fit.

    I’m sure this would’ve run at 3% CPU utilization on Windows 3.11 on an 386SX.
    You XOR a horizontal and a vertical line over the screen buffer, then on moving you do the same for the old and new positions. Of course, you can’t do that easily with actual compositing window managers. But then, computers are 749274 times more powerful now, so it still shouldn’t be more than a blip.



  • @topspin lemme show you what I mean.

    image.png

    This is my window. It runs always on top. There is no XORing, no line etc, there is my rectangle window with lines drawn on it.

    When the mouse is not over it, it redraws at about 50Hz (but that can probably be reduced), where the mouse is over it, it will redraw many many more times.

    I might make the numbers and edge lines a bitmap to draw on so it’s one blit operation rather than each line being drawn separately etc especially when I get numbers in there on the edge markers.


  • BINNED

    @Arantor ❓

    You don’t need to redraw the ruler lines at all. Only redraw that line of text that shows the mouse coordinates. There’s no way this thing should be able to cause any load.



  • @topspin said in The Official Status Thread:

    @Arantor ❓

    You don’t need to redraw the ruler lines at all. Only redraw that line of text that shows the mouse coordinates. There’s no way this thing should be able to cause any load.

    egui is immediate mode. It only supports redraw everything.

    Wrong tool for task, but useful to understand what it is bad at as well as understanding what it is good at.


  • BINNED

    @Arantor sure, but that doesn’t answer the question why this causes any load at all, even at 60Hz or whatever refresh rate you’re running.

    But then, my suspicion is immediate mode is the wrong tool for any job that’s not in-game debug UIs.



  • @topspin the load at 50Hz is as negligible as you’d expect. The load when the mouse is over it is measurable and the load if actively scrubbing the mouse is “consumes a physical core”.

    They do say it’s designed more for visualisations and high interactivity applications where rapid redraws are desirable, and yes it can be slotted into another app as a component.

    I was mostly just getting a feel for a) some less trivial Rust and b) for some ideas I do have, where this is more useful to have this functionality, how much arse is it to work with and what are its gotchas. Like the update frequency is definitely a gotcha.


  • Notification Spam Recipient

    @DogsB said in The Official Status Thread:

    STATUS Nothing to do so going down youtube rabbit holes between... nothing?

    Anyway, how many analog horror series is there on youtube and how many people are investigating them? Where are people getting time to do all this shit? Vita Carnis definitely touched me in a no-no space. Thought I was immune to this shit by now. 🙀

    I have to concede. Game Theory is probably a great example of how to hand over a brand. I hope it works out.

    STATUS 30 emails since last night! Hopefully I won't have to do anything. 🙀


  • Discourse touched me in a no-no place

    @Arantor said in The Official Status Thread:

    @topspin said in The Official Status Thread:

    @Arantor ❓

    You don’t need to redraw the ruler lines at all. Only redraw that line of text that shows the mouse coordinates. There’s no way this thing should be able to cause any load.

    egui is immediate mode. It only supports redraw everything.

    Wrong tool for task, but useful to understand what it is bad at as well as understanding what it is good at.

    Quite. It sounds like it lacks the event processing layer that sits on top of that foundation in most GUI toolkits. That sort of thing is why most toolkits work with callbacks; the toolkit is working out how to reduce the amount of work spent on redraws to the actual minimum. Drawing to backing store and then blitting that across is the first stage of making things better, but the real key always was event combining.

    If it is a window instead of a transparent layer, you can drop the update frequency a lot; 10 Hz is likely enough to track any mouse movement you care about. (That still counts if it is a composited window; you draw the uncomposited version and something else handles merging that with the rest of the screen contents.)



  • @dkf on the other hand the code is super simple because it has no callbacks, there’s no stored state as such.

    It was also just the first hit I had for searches for Rust GUI toolkits, ideally without touching things like rust-GTK…


  • Discourse touched me in a no-no place

    @Arantor Well, you've now fucked around and found out some of why GUI toolkits are usually more complicated. 👍

    Two observations:

    • Your problem sounds like updates should be purely on a timer fixed at somewhere in the region of 10 to 20 Hz. That's definitely fast enough for human perception to be outpaced for a ruler app.
    • The egui library sounds very on message for the Rust way of doing things in many ways.


  • @dkf said in The Official Status Thread:

    @Arantor Well, you've now fucked around and found out some of why GUI toolkits are usually more complicated. 👍

    Two observations:

    • Your problem sounds like updates should be purely on a timer fixed at somewhere in the region of 10 to 20 Hz. That's definitely fast enough for human perception to be outpaced for a ruler app.
    • The egui library sounds very on message for the Rust way of doing things in many ways.

    Science had to be done.


  • Notification Spam Recipient

    STATUS 😠

    Went to have my hair cut. Asked for a mullet but the baber refused and told me to use product instead.

    c213efe9-cbfb-4ba0-9f8d-db82c0165228-image.png


  • Notification Spam Recipient

    STATUS Finally beat Bleak Sword. Potential to be great but there is some awful bullshit in that game at times. Not sure what to play next. :sadface:

    Gonna try turning it into a linux handheld first.

    You'll be back. You always come back.


  • BINNED

    Status: Just tasted durian for the first time. It didn’t really smell all that awful. It’s forbidden in hotel rooms because of its supposed putrid smell, but maybe that sets in later if you keep it a while.
    Its taste was also best described as meh. Not awful, certainly not great, would not eat again.


  • Notification Spam Recipient

    @topspin said in The Official Status Thread:

    Status: Just tasted durian for the first time. It didn’t really smell all that awful. It’s forbidden in hotel rooms because of its supposed putrid smell, but maybe that sets in later if you keep it a while.
    Its taste was also best described as meh. Not awful, certainly not great, would not eat again.

    Well damn, that lowers my expectations I am under the understanding it's fantastic for both measures.... Maybe yours just wasn't ripe?


  • BINNED

    @Tsaukpaetra maybe. It was fresh, no idea how ripe it was or how ripe it’s supposed to be eaten at. Do you have to wait until it’s stinky af before you eat it?


  • Notification Spam Recipient

    @topspin said in The Official Status Thread:

    @Tsaukpaetra maybe. It was fresh, no idea how ripe it was or how ripe it’s supposed to be eaten at. Do you have to wait until it’s stinky af before you eat it?

    No idea! 😅


  • Notification Spam Recipient

    @Tsaukpaetra said in The Official Status Thread:

    Goddamnit I'm peeved!

    They asked me to give my opinion on my stay. Sure.

    ❓ What do you think would make your next stay better?

    The frickin A/C unit to stop having opinions on the desired temperature when I'm in the room that differ from the temperature set on the unit. For example, I set the the temperature to a moderate 74F, which the unit obliged and dutifully warmed the room appropriately. Later though (approximately 20 minutes), since I do not move around very much, the thermostat decided the room was unoccupied and lo 74F is way too hot, and TURNS ON THE AIR CONDITIONER TO COOL THE ROOM DOWN. This could not be resolved by telling the unit to remain on, or by turning it off, regardless of the actual control status, the automation takes over simply because it overzealously decides I'm not present.

    Here is a hint to the programmer: If an occupant appears, DO NOT override their preferences for a minimum of 8 hours, preferably 12, and especially not while the unit is specifically set to a target temperature and "On". To do otherwise is user hostile and I do not approve of the asinine assumptions displayed.


  • BINNED

    @Tsaukpaetra you think anybody is reading this besides /dev/null. Cute.



  • @topspin said in The Official Status Thread:

    @Tsaukpaetra you think anybody is reading this besides /dev/null. Cute.

    Telling their suppliers’ devs to fix something that will materially cost them more: $$$
    Telling the customer to move more: free


  • Notification Spam Recipient

    @topspin said in The Official Status Thread:

    @Tsaukpaetra you think anybody is reading this besides /dev/null. Cute.

    Hey if they want to assume I'm feeding back, I will assume they consume my feed.



  • @Tsaukpaetra said in The Official Status Thread:

    @topspin said in The Official Status Thread:

    @Tsaukpaetra you think anybody is reading this besides /dev/null. Cute.

    Hey if they want to assume I'm feeding back, I will assume they consume my feed.

    They put that on there to let people vent their spleen and so they can say “we received your feedback” without any obligation to actually do anything (like read it).

    The odds of it going anywhere other than /dev/null are very very low. The odds of it going to someone who gives a shit are microscopic, and the odds of it going to someone who gives and a shit and has any ability to do anything about it at all are in the range of Planck’s constant to 1.

    Especially for what they will consider user error.


  • Notification Spam Recipient

    @Arantor said in The Official Status Thread:

    The odds

    I don't really care about the odds.



  • @Tsaukpaetra obviously.



  • Status: :doing_it_wrong: Drinking my morning caffeine, which I prepared about 09:45, three hours later at 12:45, because I got distracted and forgot I hadn't drunk it yet. Tea, not Earl Grey, room temperature. Bleh.



  • Further science was done. Rust + Tauri.

    ab9f367f-003a-4250-a028-fd8433203a95-image.png

    No crazy CPU consumption, but I have Chredge on me.


  • Discourse touched me in a no-no place

    @Arantor said in The Official Status Thread:

    but I have Chredge on me.

    Rust too!



  • @loopback0 yes, but that part feels less bad. Without wishing to invoke the sign of the goose, I don't find myself hating Rust. I'm not sure it's going to be my new bestie but I don't hate it.


  • I survived the hour long Uno hand

    @Tsaukpaetra said in The Official Status Thread:

    @Arantor said in The Official Status Thread:

    The odds

    I don't really care about the odds.

    TIL that @Tsaukpaetra is descended from Han Solo.



  • @izzion said in The Official Status Thread:

    TIL that @Tsaukpaetra is descended from Han Solo.

    With the self-damage he's causing, you'd think he was a Stormtrooper instead 🐠


  • I survived the hour long Uno hand

    @Zerosquare said in The Official Status Thread:

    @izzion said in The Official Status Thread:

    TIL that @Tsaukpaetra is descended from Han Solo.

    With the self-damage he's causing, you'd think he was a Stormtrooper instead 🐠

    If he was descended from a Stormtrooper, the only thing he'd be damaging would be thin air

    And don't think I didn't see the pre-edit version of the post just because you're hiding your edit history 🍹


Log in to reply