The Official Status Thread
-
Status: Microsoft wants to know if I'd recommend this PC (not just Windows itself, I guess?) to others.
-
@Tsaukpaetra wait... your own PC? I would not recommend mine to others. It is mine.
-
@Gribnit said in The Official Status Thread:
@Tsaukpaetra You were about to test on Linux after developing on Windows
Ah. Well, I was also half an hour late to leave for the day, so I ended up not doing that.
-
@Gribnit said in The Official Status Thread:
@Tsaukpaetra wait... your own PC? I would not recommend mine to others. It is mine.
"You wouldn't download a PC, would you?"
-
@Tsaukpaetra That makes almost sense. Not too much.
Also, obligatoryfor using inline templates instead of reusing the instances.
-
@pie_flavor said in The Official Status Thread:
@Tsaukpaetra That makes almost sense. Not too much.
Also, obligatoryfor using inline templates instead of reusing the instances.
I have no fuckin' clue what I'm doing. Didn't want to figure out how to string build when I'm already templating.
What's fun, is, in normal practice, most of that won't actually be used at all whatsoever, as the Master Server Client isn't meant to be accessed by typical browsers except as a debugging measure.
The main point of return is writing out the JSON responses, and that's basically three lines.
-
@Tsaukpaetra what I've got based on what you sent: master_server_client.zip
Also, what JSON responses?
-
@pie_flavor said in The Official Status Thread:
Also, what JSON responses?
Ah, I implemented that shortly after I uploaded the work-in-progress you have. Essentially, if it's the /list endpoint, it's supposed to return an array of the Games in the GameList, otherwise, a JSON object with a single string property named Result.
-
Status: Ugh. Why does it take two whole minutes to:
- Start talking to Perforce
- Get no new files (because it's a rebuild)
- Set the build name (i.e. update status)
- call the actual build script to start
Pic
-
Status: Making PWAs the hard way. JavaScript is everyone's friend, right? It certainly Promises to be my friend...at some point...maybe.
-
@Parody well yeah. Unless you get Rejected.
It's ok, I'm
.done()
-
@sloosecannon I don't approve.
-
@Tsaukpaetra said in The Official Status Thread:
In theory I should be able to start a process and check if it's still running, regardless of platform.
The technique I use is to open a pipe from that process to mine and to watch for the other end closing the pipe, which can be done on all (conventional) platforms. This depends on the other side behaving itself and not closing the pipe before exiting, but that's actually very easy: watching the subprocess's stdout pipe is actually pretty reliable for those processes where you want this sort of thing.
There are cases where it doesn't work, of course. System services should be monitored in different ways (and are where you'd likely put the monitor layer, with real work done in subprocesses which can be managed normally).
-
@dkf said in The Official Status Thread:
The technique I use is to open a pipe from that process to mine
Oh yeah! I gotta figure out how to stop Go from doing that. Unreal detects that and wants to send the logs back at the client, but since I don't actually attach to it it just goes into the abyss, and I'm left with a blank console window.
Fun as well, normally I'm able to Ctrl-C individual server processes to kill it off piecemeal, but Go pays attention to that too and will dutifully close itself (but not the other servers it has started) when I close any one. So, I gotta see how to intercept that...
-
@Gąska said in The Official Status Thread:
not in conjunction with some of the other type system features Rust has. I can't remember right now what it was exactly, but there's something about inheritance that makes the current method resolution algorithm screw up in some corner cases. Or something. Might also be related to how self-referential structures (objects that have members that are/contain references to other members) are impossible to express in safe Rust right now. IIRC both these issues are being worked on right now.
I'd heard about the reference problem, which stems from the fundamental observation that GUIs both can and will pull the rug out from underneath the feet of your objects occasionally. There are ways around this, but either those haven't occurred to the people working in Rust or Qt makes them obscenely difficult. I don't know which.
Basically, you work around most of the problems by making GUI operations only be done from one thread, and only when the incoming event queue is drained. Since the event queue drains extremely quickly with modern CPUs — or even with CPUs twenty years old — this doesn't impose a lot of constraints, but requires an insane level of callbackery under the covers. I know that at least some GUI toolkits work this way, and others explicitly recommend that you do this but don't force it. And this sort of thing is one of the reasons why writing a multithreaded GUI application is even more brain-bending than usual. Also, I've no idea if Qt makes this worse than usual; I'd need to know a _lot_ more about it than I do to work that out.This isn't really a Rust problem, but their reference semantics inflate the problem from “just a bit horrible” to “catastrophic disaster”.
I've not heard what the type system problem was.
-
@dkf said in The Official Status Thread:
@Tsaukpaetra said in The Official Status Thread:
In theory I should be able to start a process and check if it's still running, regardless of platform.
The technique I use is to open a pipe from that process to mine and to watch for the other end closing the pipe, which can be done on all (conventional) platforms. This depends on the other side behaving itself and not closing the pipe before exiting, but that's actually very easy: watching the subprocess's stdout pipe is actually pretty reliable for those processes where you want this sort of thing.
There are cases where it doesn't work, of course. System services should be monitored in different ways (and are where you'd likely put the monitor layer, with real work done in subprocesses which can be managed normally).
Why does there need to be a technique? Do other languages not have an analog to
proc.try_wait().is_some()
?
-
@pie_flavor It's the
try_wait
analogue that has variable availability.
-
@dkf said in The Official Status Thread:
@pie_flavor It's the
try_wait
analogue that has variable availability.This.
For example, I can't do the equivalent of sending a SIGTERM on Windows, even though there's a perfectly cromulent analogue of injecting a thread into the target process and calling os.Exit() with it to do the same thing (this is, as far as Google leads me to believe, what End Task does in Task Manager).
-
@Tsaukpaetra said in The Official Status Thread:
For example, I can't do the equivalent of sending a SIGTERM on Windows, even though there's a perfectly cromulent analogue of injecting a thread into the target process and calling os.Exit() with it to do the same thing (this is, as far as Google leads me to believe, what End Task does in Task Manager).
There's an easier way:
-
@Zerosquare said in The Official Status Thread:
@Tsaukpaetra said in The Official Status Thread:
For example, I can't do the equivalent of sending a SIGTERM on Windows, even though there's a perfectly cromulent analogue of injecting a thread into the target process and calling os.Exit() with it to do the same thing (this is, as far as Google leads me to believe, what End Task does in Task Manager).
There's an easier way:
Well, technically I think the actual equivalent is to send a message to the main window, but that only works if there is a window to receive it. But that works too as a SIGTERM.
-
@dkf said in The Official Status Thread:
@pie_flavor It's the
try_wait
analogue that has variable availability.That's dumb. It compiles cross-platform on Rust, so clearly there's a way.
-
@pie_flavor said in The Official Status Thread:
@dkf said in The Official Status Thread:
@pie_flavor It's the
try_wait
analogue that has variable availability.That's dumb. It compiles cross-platform on Rust, so clearly there's a way.
Telling Go to send signals compiles on Windows. Clearly there's a way.
-
@Tsaukpaetra Yeah, but Go doesn't have an equivalent of
#[cfg(windows)]
. Windows- and Lunix-specific functions are only available if you're compiling for that platform in Rust. It should be impossible to write Rust code that calls an OS function that isn't there unless you're specifically trying to do it.
-
@pie_flavor said in The Official Status Thread:
@Tsaukpaetra Yeah, but Go doesn't have an equivalent of
#[cfg(windows)]
.I'm pretty sure you just make your file be named
*_windows.go
or*_linux.go
if I'm interpreting what you mean.@pie_flavor said in The Official Status Thread:
It should be impossible to write Rust code that calls an OS function that isn't there unless you're specifically trying to do it.
Which results in greatest-common-denominator, where the generic functions end up missing functionality specific to certain platforms by necessity, as mentioned above.
Edit: To clarify: Yes, I can specifically make a Go file that gets compiled on Windows that has the Windows-specific function to do what I want. And the same for Linux.
But I don't want to have to do that, and because of that my choices are limited because not all features are always available equally on all platforms.
-
@Tsaukpaetra said in The Official Status Thread:
@pie_flavor said in The Official Status Thread:
@Tsaukpaetra Yeah, but Go doesn't have an equivalent of
#[cfg(windows)]
.I'm pretty sure you just make your file be named
*_windows.go
or*_linux.go
if I'm interpreting what you mean.That's their conditional compilation mechanism? File naming? Christ. How would you do
#[cfg(any(all(windows, target_arch="i686"), target_os="android"))]
without duplicating files then?@pie_flavor said in The Official Status Thread:
It should be impossible to write Rust code that calls an OS function that isn't there unless you're specifically trying to do it.
Which results in greatest-common-denominator, where the generic functions end up missing functionality specific to certain platforms by necessity, as mentioned above.
But you were knocking me talking about something compiling cross-platform. I'm saying that there's an option to check if a process is running in a cross-platform manner, clearly, because the function isn't cfg-gated.
-
@pie_flavor said in The Official Status Thread:
@Tsaukpaetra said in The Official Status Thread:
@pie_flavor said in The Official Status Thread:
@Tsaukpaetra Yeah, but Go doesn't have an equivalent of
#[cfg(windows)]
.I'm pretty sure you just make your file be named
*_windows.go
or*_linux.go
if I'm interpreting what you mean.That's their conditional compilation mechanism? File naming? Christ. How would you do
#[cfg(or(and(windows, target_arch="i686"), not(android)))]
without duplicating files then?I don't know, and I might be wrong on the file name thing (I'm not an expert you see). That's just what I encountered when Googling and found some Windows-specific packages.
@pie_flavor said in The Official Status Thread:
It should be impossible to write Rust code that calls an OS function that isn't there unless you're specifically trying to do it.
Which results in greatest-common-denominator, where the generic functions end up missing functionality specific to certain platforms by necessity, as mentioned above.
But you were knocking me talking about something compiling cross-platform. I'm saying that there's an option to check if a process is running in a cross-platform manner, clearly, because the function isn't cfg-gated.
Yes, and in Go it seems to work fine, so long as you're willing to Wait() for it. What are you even talking about?
-
@Tsaukpaetra But that's not checking if it's running. That's waiting until it's done running. Difference being whether you can do anything until it's done running if it is still running. Compare to
try_wait()
, which returns immediately whether it's still running or done running and tells you which.
-
@pie_flavor said in The Official Status Thread:
@Tsaukpaetra But that's not checking if it's running. That's waiting until it's done running. Difference being whether you can do anything until it's done running if it is still running. Compare to
try_wait()
, which returns immediately whether it's still running or done running and tells you which.Yes, on Windows this is the equivalent of waiting for single with a low timeout period. No idea what the equivalent is on Linux.
Your point?
-
@Tsaukpaetra My point is that it Just Works
.
And it's this.
https://github.com/rust-lang/rust/blob/master/src/libstd/sys/unix/process/process_unix.rs#L420-L435
-
Status: because I don't have the money for the relevant professional licences and it's currently too dark to take proper measurements, I'm enjoying trying to construct a 3D model of my house using an existing rough sketch, weirdly-distorted data from OpenStreetMap, and a low-res screenshot of Google Maps satellite view without a useful scale.
-
@kazitor It's not truly 'fuck you licensing' until you're using Paint 3D, though.
-
Status: Looks like someone has been catching up with old threads.
-
@topspin said in The Official Status Thread:
Status: Looks like someone has been catching up with old thread
s.Just one.
-
Status: apparently I didn't sleep so well.
-
Status: Navigating the forums using only keyboard is not all that great.
I almost want to turn on a screen reader to see what it says....
-
-
Status: Bored of female-presenting-nipples.
-
@pie_flavor said in The Official Funny Stuff Thread™:
Universim is looking to be interesting.
Added to wishlist.
-
Status: Y'all are slacking off:
-
@HardwareGeek said in The Official Status Thread:
Y'all are slacking off:
Not me!
But I agree, it's gotten extremely quiet....
-
@Tsaukpaetra said in The Official Status Thread:
Yes, on Windows this is the equivalent of waiting for single with a low timeout period. No idea what the equivalent is on Linux.
Windows:
WaitForSingleObject(handle, 0)
(I didn't look up how to interpret the result, e.g., for what the state of the object is).
Linux and macOS:waitpid(p_id, &status_var, WNOHANG)
(second argument can be NULL if you don't care about how the process exited).
-
@Tsaukpaetra said in The Official Status Thread:
But I agree, it's gotten extremely quiet....
I was busy undecorating the house yesterday…
-
@dkf said in The Official Status Thread:
@Tsaukpaetra said in The Official Status Thread:
But I agree, it's gotten extremely quiet....
I was busy undecorating the house yesterday…
The Christmas decorations have indeed stayed up much longer than typical.
-
@HardwareGeek said in The Official Status Thread:
Status: Y'all are slacking off:
Is that supposed to be a novel occurrence?
-
@kazitor said in The Official Status Thread:
@HardwareGeek said in The Official Status Thread:
Status: Y'all are slacking off:
Is that supposed to be a novel occurrence?
Most people see a 99+ in /unread.
Well, used to.
-
@Tsaukpaetra said in The Official Status Thread:
The Christmas decorations have indeed stayed up much longer than typical.
Well, yesterday was Twelfth Night, so it was time to take them down.
-
@dkf said in The Official Status Thread:
@Tsaukpaetra said in The Official Status Thread:
The Christmas decorations have indeed stayed up much longer than typical.
Well, yesterday was Twelfth Night, so it was time to take them down.
huh. I always thought the 12 days of Christmas had the 12th day be Christmas proper. TIL.
-
@Tsaukpaetra said in The Official Status Thread:
huh. I always thought the 12 days of Christmas had the 12th day be Christmas proper. TIL.
Yes. The first day of Christmas is actually Christmas Day. Everything before that is Advent.
-
@Tsaukpaetra said in The Official Status Thread:
@kazitor said in The Official Status Thread:
@HardwareGeek said in The Official Status Thread:
Status: Y'all are slacking off:
Is that supposed to be a novel occurrence?
Most people see a 99+ in /unread.
Well, used to.
-
@pie_flavor said in The Official Status Thread:
@Tsaukpaetra said in The Official Status Thread:
@kazitor said in The Official Status Thread:
@HardwareGeek said in The Official Status Thread:
Status: Y'all are slacking off:
Is that supposed to be a novel occurrence?
Most people see a 99+ in /unread.
Well, used to.
@Tsaukpaetra said in The Official Status Thread:
Well, used to.