The Official Status Thread
-
@Zerosquare said in The Official Status Thread:
@Benjamin-Hall said in The Official Status Thread:
I write most of my (...) tests (...) in LaTeX
Is the first sentence "fix the syntax errors until the exam compiles, then answer the following questions"?
No. That would be funny though. Especially since LaTeX's error reporting is...fun. Meaningless log statements about random things, and then buried somewhere in there is a cryptic error message that tries to be natural language--"I'm going to assume you meant..." but really points to something completely unrelated to the actual error. I had one where importing a package re-defined a command in a slightly incompatible way and so it would break on totally fine lines because it was expecting something else. Took hours to track down.
-
status
Finally have a few moments. Well, I finally got the latest Unity editor installed, and the Space Shooter tutorial project loaded. It's telling me there's a companion guide to walk through it.
Okay, I think I'll just have a nice cup of something, and leisurely read through that tutorial.
{clicks the tutorial link}
It's a video.
A fucking video.
With sound.
A video that I'd have to watch and pay attention to and make noise and NOT be able to just browse through at my own pace.
There's no PDF of it.
Motherfu
-
@Lorne-Kates Upload it to YouTube (if it's not there already) and read the transcript.
-
@pie_flavor said in The Official Status Thread:
read the transcript.
Is it auto-generated?
Also, you do realize there's a huge difference between a written article meant to be consumed by reading, and the transcription of a visual lesson?
-
@Lorne-Kates said in The Official Status Thread:
@pie_flavor said in The Official Status Thread:
read the transcript.
Is it auto-generated?
It is.
Also, you do realize there's a huge difference between a written article meant to be consumed by reading, and the transcription of a visual lesson?
Would you rather watch the video?
-
@pie_flavor said in The Official Status Thread:
@Lorne-Kates said in The Official Status Thread:
@pie_flavor said in The Official Status Thread:
read the transcript.
Is it auto-generated?
It is.
Also, you do realize there's a huge difference between a written article meant to be consumed by reading, and the transcription of a visual lesson?
Would you rather watch the video?
I think he'd rather have a actual document formatted and prepared for visual consumption at the consumer's pace and ability.
-
@pie_flavor said in The Official Status Thread:
Would you rather watch the video?
I guess so. Transcription of a tutorial video is pretty much useless. What happens to the code samples on screen that you can watch while the narrator talks about it?
-
@stillwater said in The Official Status Thread:
@pie_flavor said in The Official Status Thread:
Would you rather watch the video?
I guess so. Transcription of a tutorial video is pretty much useless. What happens to the code samples on screen that you can watch while the narrator talks about it?
They're ignored. Auto-captions only give spoken words, not on-screen text.
-
@Tsaukpaetra said in The Official Status Thread:
They're ignored. Auto-captions only give spoken words, not on-screen text.
Exactly. Transcription of a tutorial video helps you learn fuckall.
-
@pie_flavor said in The Official Status Thread:
Excerpt from a graded essay revision:
My essay was fairly strong for the most part, which either means ‘very good’ or ‘not easy to change’, and which one it was is left as an exercise for the reader.
It could also mean “can be smelt from 40 yards away downwind” which is probably not desirable.
-
@Benjamin-Hall said in The Official Status Thread:
Especially since LaTeX's error reporting is...fun.
TeX (and hence LaTeX) can be thought of as a scripting language that also does typesetting.
-
@stillwater said in The Official Status Thread:
What happens to the code samples on screen that you can watch while the narrator talks about it?
If you're (un)lucky, the narrator reads through all the code, line by line, to replicate that authentic “incredibly boring lecturer” vibe.
-
Status: Been trying to hunt down why a bunch of tests randomly hang… but just on macOS, and not consistently either. It's not even a problem in code that I wrote. I just want that damn project to run all its tests in a continuous integration build once a day. I've managed to convert some of them into test failures (much better! as the rest of the test suite will then get exercised) but some are just weirdly bust and the rate at which they break is low enough that tracking the problem down even when running on macOS locally is horrid. Damn.
-
@dkf Hang how? Is the code stuck in a loop?
-
@dkf You probably need to buy a special adapter from Apple.
-
@stillwater said in The Official Status Thread:
Hang how? Is the code stuck in a loop?
If I knew that, I'd fix it. It's something to do with asychronously processing socket connections when both IPv4 and IPv6 stacks are enabled and working, but where the user-level code is refusing to use either threads or an event loop. Probably. It's a horrible edge case. But I'm not trying to fix the bug; I'm just trying to make it fail in a way that doesn't make everything else halt dead.
It probably is a race condition. Because it's a complete b*****m of a fault…
-
Status: Hmm, this doesn't look ideal:
-
@dkf said in The Official Status Thread:
something to do with asychronously processing socket connections when both IPv4 and IPv6 stacks are enabled and working, but where the user-level code is refusing to use either threads or an event loop
WOW WHAT THE FUCK.
Get out while you can. No one should have to deal with this
-
@stillwater really? It's current year! Why are programmers still afraid of concurrency?
-
@stillwater said in The Official Status Thread:
Get out while you can. No one should have to deal with this
Someone has to sort out this low level shit so that others don't have to. The code in question works just fine on Windows and Linux; it's just something about OSX that's causing something odd to happen. And then only rarely. If I can nail down what's wrong, I can go back to the author of the code (at SuSE) and get them to unfuck it.
-
@Cursorkeys Looks like you got fbwindows
-
@pie_flavor said in The Official Status Thread:
Holy shit my wrist hurts
Wait at least a couple of hours between wanks to allow your muscles to rest
-
Status: Just got back from the hospital. I was hit from behind by a lorry on the way home from work last night. I was pretty badly concussed so don't remember anything apart from a few snippets like being in the CT scanner, my wife telling me I'd been asking her the same questions every couple of minutes, and being moved from A&E to a ward.
Woke up this morning with a sore head and a bit of tenderness but otherwise OK. This is what my car looked like
I am one lucky motherfucker
-
@Jaloopa Holy shit, that's a picture and a half. Happy you're okay!
-
@Jaloopa said in The Official Status Thread:
I am one lucky motherfucker
Jesus Vishnu-Fisting Christ!
Glad you're okay and that no one was in the back seat.
-
@Lorne-Kates If a trans-hooker was in the trunk, would you call it positive since you don't have to go to the effort, or negative since you don't get to do it yourself?
-
@pie_flavor said in The Official Status Thread:
@Lorne-Kates If a trans-hooker was in the trunk, would you call it positive since you don't have to go to the effort, or negative since you don't get to do it yourself?
Bad. Never leave a body.
-
@Jaloopa said in The Official Status Thread:
I am one lucky motherfucker
I don't know… the colour of that car.
-
@dkf It's probably impossible to recognise now but it was a 12 year old Mazda 2. Probably the ugliest car I've ever owned but it certainly did its job keeping me alive.
I'm just glad my children weren't in the back. It's mostly my commuting car but we have taken them in it before when the family car's been in for work.
-
@Jaloopa By the looks of the roofline you were a couple newtons away from the front passenger cell collapsing and making your day A LOT worse. Used up ALL the safety factor on that one...
-
So... the take-away from this is that you should get a lorry (but not a semi) and always carry a few tons of rocks around to load the rear axles. Because you see - ol' Newton always wins.
Yes, well, there's fuel consumption, insurance, narrow roads and it's generally a large target, maneuverability is shite, rolling over is easy, finding a spot to park may be impossible, and cities have lots of restrictions. But the feeling of smugness by being "up there" must count for something. Finally, you can often see what people are doing in their cars, but nobody can see you doing it in yours, which completely settles the argument
-
@Gąska said in The Official Status Thread:
@stillwater really? It's current year! Why are programmers still afraid of concurrency?
I don't know. Must have missed the memo.
-
@stillwater
Sending the memo was blocked by activity on another thread.
-
@Weng said in The Official Status Thread:
@Jaloopa By the looks of the roofline you were a couple newtons away from the front passenger cell collapsing and making your day A LOT worse. Used up ALL the safety factor on that one...
I'll be interested to see how close the door shape is to the equivalent on the body. Someone was able to open it to help me out so can't have been that out of shape
-
@Jaloopa said in The Official Status Thread:
I am one lucky motherfucker
No kidding! If that was M1 northbound then I passed you in the other carriageway.
Glad you came away mostly OK, my dad had a motorbike accident once and couldn't remember a huge chunk of history for quite a while. Scary stuff!
-
@Gąska said in The Official Status Thread:
@stillwater really? It's current year! Why are programmers still afraid of concurrency?
I still can't tell whether it's more appropriate to
Thread.sleep()
orawait Task.Delay()
most of the time.
-
@Cursorkeys said in The Official Status Thread:
No kidding! If that was M1 northbound then I passed you in the other carriageway.
Mo, M20 near Maidstone. you can find information (and judgemental commenters assuming I cut in front of the lorry) on Kent Online
-
@Tsaukpaetra said in The Official Status Thread:
@Gąska said in The Official Status Thread:
@stillwater really? It's current year! Why are programmers still afraid of concurrency?
I still can't tell whether it's more appropriate to
Thread.sleep()
orawait Task.Delay()
most of the time.Easy: neither is appropriate, ever.
-
@Gąska said in The Official Status Thread:
@Tsaukpaetra said in The Official Status Thread:
@Gąska said in The Official Status Thread:
@stillwater really? It's current year! Why are programmers still afraid of concurrency?
I still can't tell whether it's more appropriate to
Thread.sleep()
orawait Task.Delay()
most of the time.Easy: neither is appropriate, ever.
Then, what is the proper way to wait for an external service to do its thing when that service doesn't have a callback indicate it's done said thing?
-
@Tsaukpaetra how do you know it's done its thing?
-
@Tsaukpaetra said in The Official Status Thread:
@Gąska said in The Official Status Thread:
@stillwater really? It's current year! Why are programmers still afraid of concurrency?
I still can't tell whether it's more appropriate to
Thread.sleep()
orawait Task.Delay()
most of the time.Easy:
Thread.sleep()
because threads are free
-
@Gąska said in The Official Status Thread:
@Tsaukpaetra how do you know it's done its thing?
I don't. But, if I don't wait, the next step (in this case) immediately terminates the connection, which (somehow) may not have sent off the bits through the wire to indicate the thing needs to happen, and from there hell breaks loose.
-
@Tsaukpaetra whatever you're doing, your design is completely fucked up. Depending on how it has come to be, either I hate you with all my heart, or you have my deepest sympathy.
And if terminating outgoing data transfer is the problem that sleep solves... Assuming it's not what you refer to as external service, is it possible to detect when this data transfer is over before proceeding?
-
@Gąska said in The Official Status Thread:
Depending on how it has come to be, either I hate you with all my heart, or you have my deepest sympathy.
Not entirely my design.
In theory this is the chain of events that's supposed to happen:
- Master Server wants to destroy a Game server
- Game Server is told "Send all these players to X instance immediately"
- Game Server relays the "The world is now ending, go to X" command to all connected clients
- Game Server says "Coolio, all the peeps are gone now!"
- Master Server says "Thanks, now go kill yourself"
- Game Server says nothing but solemnly kills itself
- Master Server knows not to expect anything so cuts the connection
- Profit
The code looks like so...
//Mark this instance as deleting State.Status = UE4LevelInstanceStatus.Emptying; State.DestructTime = DateTime.Now.AddSeconds(5); Log("Destroying " + this + (Reason.Length > 0 ? " Because: " + Reason : ""), MainLogVerbosity.Log); DestructReason = Reason; if (State.PlayersCount > 0) if (!await TransplantAllPlayers()) { Log("Any remaining players will now be disconnected.", MainLogVerbosity.Log); } State.Status = UE4LevelInstanceStatus.Deleting; await Task.Delay(600); SendCommand(new UE4Command(UE4CommandType.STC_ForceShutdown, -1, Reason)); //Also, just in case this is a pending instance, go ahead and try to clear that out too.... foreach (UE4PendingInstance pToKill in OwningMachine.PendingInstances.Where(x => x.Name == State.LevelName && x.LiID.Equals(State.LiID)).ToList()) { pToKill.Clear(false); } await Task.Delay(1600); //Finally, kill the connection BreakConnection();
The problem is, if I don't
Task.Delay()
it will get toBreakConnection()
, (which essentially doesSocket.Shutdown(SocketShutdown.Both); Socket.BeginDisconnect(false, new AsyncCallback(CompleteDisconnect), Socket);
) and the latest data (i.e. that of sending the "Go Kill Yourself" command) never gets sent, and since Master Server has faith that it got the message, it does a lot of assuming that ends up making a lot of things happen that break in Fun ways.@Gąska said in The Official Status Thread:
And if terminating outgoing data transfer is the problem that sleep solves... Assuming it's not what you refer to as external service, is it possible to detect when this data transfer is over before proceeding?
I'm working on getting a command response added that says "Yeah I'll go kill myself now" but that breaks the flow for when a game server is not responding at all (but is still magically connected, yay threads) and will never get the signal that the command was received (or will be acted upon).
-
@Tsaukpaetra so it's
SendCommand
that tells it to go kill itself, butBreakConnection
is killing the connection with that command still in the pipeline?There's gotta be some command to flush the pipeline before closing it, right? Because if not... that's just insane.
-
@anotherusername said in The Official Status Thread:
@Tsaukpaetra so it's
SendCommand
that tells it to go kill itself, butBreakConnection
is killing the connection with that command still in the pipeline?There's gotta be some command to flush the pipeline before closing it, right? Because if not... that's just insane.
It's a
System.Net.Sockets.Socket
object. TheSendCommand()
function sends using aSocket.BeginSend()
call (which is asynchronous), and there's currently no code there to do anything when the async call ends that would indicate that the "pipeline" has flushed.I suppose I could make a thread-safe counter for packets in the pipeline, but then I'd still be polling for that counter to become zero (and/or delaying for some timeout) regardless...
-
@Tsaukpaetra Could you change it to use a synchronous version for that one signal?
-
@hungrier said in The Official Status Thread:
@Tsaukpaetra Could you change it to use a synchronous version for that one signal?
Evaluating...
Edit: Introducing: The hack!
byte[] bytes = cmd.ToBytes(); if(cmd.Type == UE4CommandType.STC_ForceShutdown) { //Special case, we want to be sure this command was sent in a timely manner Socket.Send(bytes, 0, bytes.Length, SocketFlags.None); } else { Socket.BeginSend(bytes, 0, bytes.Length, SocketFlags.None, DataSent, Socket); }
We'll see what happens...
-
@Tsaukpaetra the docs seem to indicate that calling
Shutdown
beforeClose
is supposed to avoid exactly this problem...
-
@anotherusername said in The Official Status Thread:
@Tsaukpaetra the docs seem to indicate that calling
Shutdown
beforeClose
is supposed to avoid exactly this problem...Docs and reality usually don't align, I've found.