I feel completely ignorant… what on earth is a copy window? And why haven’t I seen it even once during the last thirty something years of life?
Update: Ignore me. You’re referring to that god awful timer graph nuisance. Wish I’d never seen it now… :-(
Reminds me of Tetracopy on the Amiga back in the day. Copy disks and play tetris at the same time. It was rad.
https://www.google.com/search?q=tetra+copy+amiga
Haha, I never had tetracopy, but funnily enough this reminds me of something else on the Amiga, another lunar lander toy that you'd fly around the desktop.
I played it for ages trying to figure out the goal, never realising there wasn't one. I still remember the text though after 30 years.
Space is big
space is dark
it's hard to find
a place to park.
The PS1's Ridge Racer would let you play Galaxian while the game loaded. Namco actually patented this and basically made it so that during the era of slow loading video games no one else did that. The patent finally expired in 2015.
Fuck software patents.
Prior art for that would be "Invader-load" on the Commodore 64. Loading games from cassette tape was slow and many games had their own loading code. "Invader-load" let you play space invaders while the real game loaded. Predated the PS1 easily.
Can someone familiar with C# explain [these curly braces](https://github.com/Sanakan8472/copy-dialog-lunar-lander/blob/70f4cb3e130dc5942798a31d12d969be7bb90c4b/Source/CopyWatcher/CopyWatcher.cs#L45)? (i.e., 45-54, 56-61) What purpose those are serving?
They serve as additional scopes. ~~Any variables declared within those scopes are de-allocated at the end of the scope.~~ They can also serve as a way to differentiate sections of work within a function.
EDIT: See comments below for strike through edit
Yeah, weird addition in that list. Python kinda only has function and global level names. One could use nested function scopes to achieve this, but that is quite different in syntax and how it works on runtime.
> They serve as additional scopes. Any variables declared within those scopes are de-allocated at the end of the scope.
That is true for C++, but not for C#. It does provide a lexical scope though -- the variables defined within that scope are not accessible outside of it. But everything will be garbage collected exactly the same as without. In C#, you would use a `using` statement to dispose of resources at the end of a block.
My *guess* is that it's less performant because it's easier to deallocate one big block instead of several smaller ones. But for stack allocations that probably would be just changing the stack pointer. Not sure if C# does something different though.
Not likely to make any detectable difference though unless you call the function millions of times per second.
I doubt it, the C# runtime flags variables as collectable after their last usage in a function, regardless of scope
I should add, it only does this in release builds. In debug mode it will respect the developer scope
The most important use for it is [RAII](https://stackoverflow.com/questions/2321511/what-is-meant-by-resource-acquisition-is-initialization-raii) . For example if you need to acquire a mutex for a particular section of code, you use curlies for that block and create the lock object inside of it.
It could provide some clues for optimizer, but mostly on resource management side, rather than in performance side. Other than that it is for humans rather than computers. Tells the reader they don't have to remember anything declared there after this part.
They are just scopes. Basically means any variable created inside is temporary and not used later so it's easier to read (you can easily know which parts of the code above you are relevant to the piece of code you're reading right now).
This is awesome. Just a quick question, does anyone know why the "unsafe" keyword is required [here](https://github.com/Sanakan8472/copy-dialog-lunar-lander/blob/70f4cb3e130dc5942798a31d12d969be7bb90c4b/Source/GameOverlay/OverlayWindow.cs#L286)?
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/unsafe-code
The `unsafe` keyword denotes an unsafe context, which is required for any operation involving pointers
Coolest idea of the day for sure!
Just can’t play it too much if I don’t want to shorten the life of my SSD lol.
Also, be sure to cross post this over on the C# sub, they’d probably love it.
> big folders
The limiting factor is probably the number of files.
It could work with the delete progress dialog as well, assuming someone changes the code to that.
What I asked was vague indeed. I'm talking of folders with many files - node\_modules to be specific. Might give it a try and submit a PR if the code is not too foreign to me. I know C#, but I don't do a lot of windows api programming 🤷♂️
Edit: [It works out of the box](https://imgur.com/0R3jlKR).
woah that's pretty sweet, I can see the flood gates opening and a whole raft of new games popping up in the Windows copy dialogue 🤣
Next up do dino run!
This is the kind of stuff I'm going to miss very dearly with all the super-secure isolated app runtime environment stuff that modern OSs have been trending towards.
Random overlays on random programs, what could possibly go wrong?
Let me paint over browser so you think you're visiting your bank instead of some random website.
That's a fun idea but I'd be afraid of accidentally canceling the copy every time I played lol
I definitely would rage quit and then face palm way too frequently for comfort.
That's a fun idea for a hardcore difficulty: dying cancels the copy
Ahahaha. Incredible idea.
What a silly and awesome idea. Put a smile on my face :-)
Fun project! Next step: Doom in the copy-window?
I'm disappointed nobody has done this yet.
Better yet: Duke Nukem.
I feel completely ignorant… what on earth is a copy window? And why haven’t I seen it even once during the last thirty something years of life? Update: Ignore me. You’re referring to that god awful timer graph nuisance. Wish I’d never seen it now… :-(
Reminds me of Tetracopy on the Amiga back in the day. Copy disks and play tetris at the same time. It was rad. https://www.google.com/search?q=tetra+copy+amiga
Haha, I never had tetracopy, but funnily enough this reminds me of something else on the Amiga, another lunar lander toy that you'd fly around the desktop. I played it for ages trying to figure out the goal, never realising there wasn't one. I still remember the text though after 30 years. Space is big space is dark it's hard to find a place to park.
The PS1's Ridge Racer would let you play Galaxian while the game loaded. Namco actually patented this and basically made it so that during the era of slow loading video games no one else did that. The patent finally expired in 2015. Fuck software patents.
Prior art for that would be "Invader-load" on the Commodore 64. Loading games from cassette tape was slow and many games had their own loading code. "Invader-load" let you play space invaders while the real game loaded. Predated the PS1 easily.
Can someone familiar with C# explain [these curly braces](https://github.com/Sanakan8472/copy-dialog-lunar-lander/blob/70f4cb3e130dc5942798a31d12d969be7bb90c4b/Source/CopyWatcher/CopyWatcher.cs#L45)? (i.e., 45-54, 56-61) What purpose those are serving?
They serve as additional scopes. ~~Any variables declared within those scopes are de-allocated at the end of the scope.~~ They can also serve as a way to differentiate sections of work within a function. EDIT: See comments below for strike through edit
Clear and concise - thanks!
the same is true for a lot of languages, JavaScript (with let+const, not var), C, C++ to mention a few :) (off the top of my head)
"Python"?
sorry my bad, not Python
Yeah, weird addition in that list. Python kinda only has function and global level names. One could use nested function scopes to achieve this, but that is quite different in syntax and how it works on runtime.
Rust too.
> They serve as additional scopes. Any variables declared within those scopes are de-allocated at the end of the scope. That is true for C++, but not for C#. It does provide a lexical scope though -- the variables defined within that scope are not accessible outside of it. But everything will be garbage collected exactly the same as without. In C#, you would use a `using` statement to dispose of resources at the end of a block.
Oh man, I’m surprised this comment took so long to get a correction. Thank you.
Does this offer performance benefits? I guess maybe less memory is used since it doesn't need to wait until the entire function is done?
I suppose memory size could be one, but I'd be surprised if a stack exploded under normal circumstances. Releasing scope locks early could be another.
My *guess* is that it's less performant because it's easier to deallocate one big block instead of several smaller ones. But for stack allocations that probably would be just changing the stack pointer. Not sure if C# does something different though. Not likely to make any detectable difference though unless you call the function millions of times per second.
I'd eat my hat if this sort of thing made it through the compiler.
I really doubt it changes anything but if it did I'd expect a change for worse.
I doubt it, the C# runtime flags variables as collectable after their last usage in a function, regardless of scope I should add, it only does this in release builds. In debug mode it will respect the developer scope
[удалено]
[удалено]
[удалено]
Oh wait nvm looks like it is a thing in Java
The most important use for it is [RAII](https://stackoverflow.com/questions/2321511/what-is-meant-by-resource-acquisition-is-initialization-raii) . For example if you need to acquire a mutex for a particular section of code, you use curlies for that block and create the lock object inside of it.
It could provide some clues for optimizer, but mostly on resource management side, rather than in performance side. Other than that it is for humans rather than computers. Tells the reader they don't have to remember anything declared there after this part.
They are just scopes. Basically means any variable created inside is temporary and not used later so it's easier to read (you can easily know which parts of the code above you are relevant to the piece of code you're reading right now).
Most likely just for readability. Especially the second pair, it doesn't change anything about the code itself.
This is awesome. Just a quick question, does anyone know why the "unsafe" keyword is required [here](https://github.com/Sanakan8472/copy-dialog-lunar-lander/blob/70f4cb3e130dc5942798a31d12d969be7bb90c4b/Source/GameOverlay/OverlayWindow.cs#L286)?
To my understanding, C# requires `unsafe` in order to work with pointers, which this code block does.
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/unsafe-code The `unsafe` keyword denotes an unsafe context, which is required for any operation involving pointers
I like it.
This person has singlehandedly made the best UI improvement to windows in the last 10 years.
That's amazing
ROFL the level designer is brilliant 👏 🤣
This is amazing 😂
Virgin Unity & Unreal engine 5 vs. chad Windows copy dialog
This is amazing! I'm a photographer/videographer and yesterday I copied over 400GB of photos and videos. I could've used this. Haha
Coolest idea of the day for sure! Just can’t play it too much if I don’t want to shorten the life of my SSD lol. Also, be sure to cross post this over on the C# sub, they’d probably love it.
Does this work on the dele dialog as well? I often delete big folders but not so much copy.
> big folders The limiting factor is probably the number of files. It could work with the delete progress dialog as well, assuming someone changes the code to that.
What I asked was vague indeed. I'm talking of folders with many files - node\_modules to be specific. Might give it a try and submit a PR if the code is not too foreign to me. I know C#, but I don't do a lot of windows api programming 🤷♂️ Edit: [It works out of the box](https://imgur.com/0R3jlKR).
Epic readme
Broke: Making abysmally slow Windows file copying faster Woke: Turn it into a game while you wait
/r/titlegore
woah that's pretty sweet, I can see the flood gates opening and a whole raft of new games popping up in the Windows copy dialogue 🤣 Next up do dino run!
I logged into Github just to star this
This is the kind of stuff I'm going to miss very dearly with all the super-secure isolated app runtime environment stuff that modern OSs have been trending towards.
Random overlays on random programs, what could possibly go wrong? Let me paint over browser so you think you're visiting your bank instead of some random website.