I got fed up with waiting/pestering Richard Mitton (aka Kayamon / @grumpygiant) to integrate the Very Sleepy patches I’ve sent him last year or putting the code on a software forge, so I’m publishing my patches on GitHub myself.
Very Sleepy is a polling Windows profiler with a wxWidgets-based GUI. This is a fork of the latest released version at the time of writing (0.82).
My improvements over the official version:
- Fix several issues with the /r command-line option
- Lower profiler thread priority when sampling ends (greatly improves UI responsiveness during analysis of collected data)
- Add cancelable symbol query progress (existing dialog was always at 0% and was not cancelable)
- Don’t go through symbol lookup if sampling was aborted (abort means abort)
- More minor UI improvements
- Don’t completely abort due to one failed GetThreadContext call (fixes “Error: ProfilerExcep: GetThreadContext failed.” errors by ignoring the occasional seemingly-harmless error condition)
SysInternals CacheSet has a limitation: it is unable to set a cache size larger than 4GB. This is due to the fact that it is a 32-bit application, and the respective API (NtSetSystemInformation) accepts new settings as a 32-bit byte count.
The solution: use the 64-bit API, which uses 64-bit integers. I’ve written a very simple 64-bit CacheSet-alike – just enter the desired cache size (in bytes). You can use the original CacheSet to check the new settings (just don’t hit “Apply”, or your settings might get clobbered).
- The limit for text entry in certain combo boxes has been removed
- Basic XML graph saving support has been added (only filters and connections at the moment)
- Pins are now referred by their indexes in XML rather than by ambiguous names
- Added command-line /render parameter, which loads a graph, plays it and exits
XML support and /render allow scripted generation and rendering of XML graph files.
Update: Check out GraphStudioNext. Some or all of my patches have been merged into that project, and presumably will be in the next release (the one after 0.5.0.1).
Once in a while you’ll stumble upon a combo box which doesn’t allow you to type past the right edge of the control. When normally typing more text would just scroll the contents, you’ll just get back an annoying beep. The amount of text you can enter is actually bound by the on-screen width of the text – thus, you may be able to enter 125 “i” characters, but only 25 “W” characters.
The cause of the problem is that the combo box was not created with the CBS_AUTOHSCROLL style:
- Automatically scrolls the text in the edit control to the right when the user types a character at the end of the line. If this style is not set, only text that fits within the rectangular boundary is allowed.
Visual Studio’s resource editor has a different name and description for this property:
- Automatically scrolls text to the left when the user types a character at the end of the line.
I was recently tasked to create a required-experience-per-level table for a game – that is, create a table which indicates how many experience points the player must earn to progress to a certain experience level. The requirement to reach the next level must continuously increase (the “double derivate” must be non-negative). Of course, it is easy to come up with a function to satisfy that requirement alone, but what about generating a level curve that’s also aesthetic? I mean, it’s much nicer to look forward to reaching 15000 points than, say, 16384.
So, I wrote a small program to attempt to generate experience ranks with the following properties:
- Continuous acceleration
- Smoothness (calculated as “roughness”, using the sum of squares of the “triple-derivate”)
- Roundness (100 is more round than 150, 150 is more round than 160, 160 is more round than 165 etc.)
- Emphasis on the roundness of the last level
The qualifying factor here is smoothness vs. roundness. (continue reading…)
Starting with a new hourly-paid freelancing job, I needed some software to track the amount of time I spend working. I tried a few time tracking programs out there, but they all turned out to be bloated and clumsy (not to mention not open-source), so I decided to roll my own. (continue reading…)