Live data from Hacker News

Show HN: Universal Pause Button

github.com

111–120 of 174 posts

Re: Show HN: Universal Pause Button

#111
post #91
post #44

Earlier quoted context omitted.

On debian the program is cpulimit.

I think using nice or renice is better practice. Hard throttling is way more inefficient.

It may be, but it doesn't solve some of the problems that cputhrottle does. My main use for cputhrottle is to limit the CPU usage of Flash. It's not that I want to use the CPU for something else, at least not at the moment, but I don't want my laptop's fans to turn on, the whole thing to heat up and it to kill my battery life. [re]nice will only allow another process to get CPU priority, it won't keep the CPU utilization low.

The bizarre part, when it comes to Flash, is that I've yet to see an actual difference in the application behavior when I throttle down it's CPU usage. I would think that if it normally maxes out 7 of my 8 logical cores, being limited to 40% of one core would make introduce slowness. But I guess that's just an indication of how poorly written the OS X flash client it.

Re: Show HN: Universal Pause Button

#112
post #69

Earlier quoted context omitted.

"This is nice! On OSX, processes can be paused and continued too" Every once in a while I am reminded how wonderful, and perhaps unlikely, it is that I have a nice, slick, mass market consumer device (apple computer running OS X) that is honest to god UNIX underneath. And then sad, knowing that this is a brief golden age that will probably pass.

Don't worry. Linux is slicker.

As someone who just switched to Linux from OS X, it is really hard to migrate. I miss the subtleties of the apple ecosystem. Sure Linux is awesome, but I have been battling trackpad support issues, keymapping the super_key to CMD, and just general battling the UX.

tl;dr a more powerful operating system with worse UI, which is the obvious trade. A less powerful system with a fantastic UI.

Re: Show HN: Universal Pause Button

#113

This is nice! On OSX, processes can be paused and continued too (by name via killall, and by PID via kill): kill -STOP 1234 kill -CONT 1234 killall -STOP -c "Pandora" killall -CONT -c "Pandora" A more nuanced control is to throttle down the CPU, via cputhrottle[1]. If I'm running a CPU-intensive calculation and don't want to bog down the rest of my system I will use it to give me enough cycles for Sublime Text to wor…

OK, PowerShell magic time:

  calc
  $a = Get-Process calc
  $a.ProcessorAffinity = 1
  $a.PriorityClass = "Idle"
  $b = [Diagnostics.Process]::Start("PowerShell", "-c while (1) {}")
  $b.ProcessorAffinity = 1
Ta-da!

Re: Show HN: Universal Pause Button

#114

Earlier quoted context omitted.

Don't worry. Linux is slicker.

As someone who just switched to Linux from OS X, it is really hard to migrate. I miss the subtleties of the apple ecosystem. Sure Linux is awesome, but I have been battling trackpad support issues, keymapping the super_key to CMD, and just general battling the UX. tl;dr a more powerful operating system with worse UI, which is the obvious trade. A less powerful system with a fantastic UI.

It's a phase. I run into similar issues when using OSX while being used to Linux.

Re: Show HN: Universal Pause Button

#115
post #91

Earlier quoted context omitted.

I think using nice or renice is better practice. Hard throttling is way more inefficient.

It may be, but it doesn't solve some of the problems that cputhrottle does. My main use for cputhrottle is to limit the CPU usage of Flash. It's not that I want to use the CPU for something else, at least not at the moment, but I don't want my laptop's fans to turn on, the whole thing to heat up and it to kill my battery life. [re]nice will only allow another process to get CPU priority, it won't keep the CPU utiliza…

You might not notice the difference, but that guy at Apple who's only getting 5% of his usual haul of bitcoins this month sure will!

Re: Show HN: Universal Pause Button

#116

But what if the process uses a timer to update an animation? (I.e., the state of the timer determines the frame in the animation). In that case, after unpausing, the animation would just skip ahead. As a remedy, the pause button could also stop the system clock as seen by the process.

Yep, different applications are guaranteed to react differently to this, depending on how they were written. And a lot of games use the _rdtsc intrinsic straight from the CPU... I can't pause that. :)

Re: Show HN: Universal Pause Button

#117

But what if the process uses a timer to update an animation? (I.e., the state of the timer determines the frame in the animation). In that case, after unpausing, the animation would just skip ahead. As a remedy, the pause button could also stop the system clock as seen by the process.

Yep, different applications are guaranteed to react differently to this, depending on how they were written. And a lot of games use the _rdtsc intrinsic straight from the CPU... I can't pause that. :)

You could write a virtual machine that compiles all code into essentially the same code except for the rdtsc instruction (basic-block analysis).

That is a lot of work, but I wonder if there are no debugging or reverse-engineering tools that work in that way.

Re: Show HN: Universal Pause Button

#118
post #36
post #21

Earlier quoted context omitted.

He wrote it's useful for singleplay games that have an intro. If you use it in multiplayer games you certainly will simply drop out of the game as you will loose the connection or what you described depending on the server implementation.

A popular multiplayer cheat is to suspend the network stack somehow for a split second while their team gets into place and resume causing the game's network code to resync and players will teleport into advantageous positions or become extremely difficult to target or hit during key moments. It's very hard to detect especially if the program doing the suspending is on the router and not the system running the actual…

Example of this in action: https://youtu.be/I5QyNA6H6rY

Re: Show HN: Universal Pause Button

#119

Earlier quoted context omitted.

As someone who just switched to Linux from OS X, it is really hard to migrate. I miss the subtleties of the apple ecosystem. Sure Linux is awesome, but I have been battling trackpad support issues, keymapping the super_key to CMD, and just general battling the UX. tl;dr a more powerful operating system with worse UI, which is the obvious trade. A less powerful system with a fantastic UI.

It's a phase. I run into similar issues when using OSX while being used to Linux.

I went through a similar struggle when switching to a Mac about a year ago for work. I still miss the ability to drag windows around from anywhere by holding the alt key, and dragging any part of the window.

Never found a good replacement in OSX.

Re: Show HN: Universal Pause Button

#120
post #2

You can also download the executable (if you don't want to compile it) from https://www.myotherpcisacloud.com/post/universal-pause-butto...

You should consider uploading that file to the Github repo in the "Releases" section so people can find it easier.
Post reply on HN