The old juno finally lost some of it’s voice.. the second wave generator is out. This happened around the time I modified the power plug so I probably did something to it. She’s all beat up already with broken faders and what not from traveling all over with me and enduring plenty of use. I’m using it now as a project platform since it’s pretty easy to work on. I’ll post some pics tomorrow.
To be replaced by something else.. not sure what, tbd
Posted in uncategorized
|
Tagged blog
|
GameDaily compares TR to WoW. We did it for the lulz.
(Thanks wayback machine)
Posted in algorithms, db
|
This is a nice comprehensive guide without the rhetoric you usually get in a C++ style guide. I’m still working through it
Google C++ Style Guide
This simple operation took me longer to figure out than I would like, the answer wasn’t obvious on msdn or in any of the searches I did so I figure I should just put it up here for anyone else who might look for it:
To select an item in a list view create an LVITEM structure, change a few of it’s fields and pass it to LVM_SETITEMSTATE:
// Select current item in the list
LVITEM item = {0};
item.mask = LVIF_STATE;
item.state = item.stateMask = LVIS_SELECTED;
SendMessage(mhProductList, LVM_SETITEMSTATE, mCurrentSettings, (LPARAM)&item);
Oh and if you’re trying to turn on whole line section you’ll need to use the extended styles:
// Set extended styles
SendMessage(hWndListView, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT);
The GNU linker has some trouble when you present it with multiple library archives that depend upon each other. Libraries with symbols resolved in other libraries must be presented earlier on the command line. You can work around this with a command line argument:
"--start-group", "--end-group", aternatively "-(" "-)"
See the man page for LD for more info
Unfortunately this argument comes with the following little warning:
Using this option has a significant performance cost. It is best to use it only when there are unavoidable circular references between two or more archives.
The particular case I was dealing with was the havok version 6 libraries on linux. I was advised that there may be way to link them but hadn’t been worked out. In order to test this theory I hacked together a little bit of ruby to show library dependencies. I feel this may be of some use to someone else so I present it here:
require 'find'
$symbs = {}
$archives = []
class Archive
attr_reader :name, :symbs, :depends, :undef
def initialize name
@name = name
@symbs = {}
@undef = {}
@depends = Hash.new(0)
end
def add_definition loc, name
@symbs[name] = loc
$symbs[name] = self
end
def add_undefined name
@undef[name] = 0
end
def resolve_undefined
@undef.each do |k,v|
archive = $symbs[k]
if not archive or archive == self then
next
end
@undef[k] = archive
@depends[archive] = @depends[archive] + 1
end
end
end
Find.find('.') do |path|
next if not /.a$/.match(path)
io = IO.popen("nm #{path}")
archive = Archive.new(path)
$archives << archive
while (str = io.gets) do
case str
when /\w+\.a/
archive = Archive.new(str)
puts "archive: #{str}"
when /[A-F0-9]+ [A-Za-z] \w+/
parts = str.split
archive.add_definition parts[0], parts[2]
when /\s+U\s+\w+/
archive.add_undefined str.split[1]
end
end
puts "processed #{path}, #{archive.symbs.count} defined, #{archive.undef.count} undefined"
end
$archives.each do |archive|
archive.resolve_undefined
end
$archives.sort! {|a,b| a.depends.count <=> b.depends.count }
puts "dependency list:"
$archives.each do |archive|
puts "#{archive.name}: #{archive.depends.count}"
archive.depends.each do |depend,count|
puts " #{depend.name}: #{count}"
end
end
The final solution was to simply remove the object files from the static libraries and put them into a single combined library:
rm *.o
find . -name \*.a -exec ar x {} \;
ar rcs libHavok.a *.o
ranlib libHavok.a
rm *.o
Here is a good article outlining the Z-machine. This is the machine that runs all of the Infocom text adventures including Zork for which the virtual machine is named. This is some really interesting engineering and you can still see the modern fruits of this online in the Parchment project
I’m sure people are still using it but just tonight I was searching for a CVS command line client for windows and had some trouble finding something usable. If you’re going to use CVS you should probably just use SVN or if you’re feeling adventurous you could try a DVS. Anyways this is all so I can make modifications against trunk cmake and see how well it works for our build environment at work.
I did end up finding a command line windows CVS client
Seems like over the past year or more twitter and facebook have taken over my status updates. This has led to me paying less attention to my blog which is really not a direction I meant to go in. It just sort of happens that it’s often easier to capture a thought on twitter than to go through the effort of writing a blog post. Well.. that has to stop. I actually have a lot of cool things to write about, I just need to sit down and spend some time writing about them.
I think what I would like to do is split my blog into micro-blog/status updates and actual blog posts. It would be ideal if I could use one interface to post to the both and have the micro-blog funnel to twitter/facebook. We’ll see if that makes sense. In the meantime I’ll just use a tag for the status updates.