I recently bought a 17″ MacBook Pro to use a primary workstation for audio, programming etc. Soon after I completely abandoned any plans for releasing iPhone or iPad software because of Apple’s completely unacceptable TOS for iPhone developers. A few months later the shiny new Mac completely stopped functioning.
So there I was with a completely busted laptop. I wasn’t too worried, I had bought an Apple Care plan and figured the repair would be covered. I made my first appointment with their “Geniuses” (another example of Apple totally over-selling themselves) over the phone and took my machine in a few days later. According to online reviews not all Apple stores are good for repairs, some such as the Irvine Spectrum look down on broken machines and don’t provide good service. I took mine to South Coast Plaza in Costa Mesa. After waiting in line for fifteen minutes for an appointment I booked days in advance they prepare the bad news for me. After touching the power button to no avail my friendly “Genius” tells me that it’s being shipped off for repair, that my data is probably not going to make it. Fortunately I can get my data off the machine but it will be “VERY” expensive and Apple wont’ do it. Thanks dude, I tell him to screw it, I’m prepared to lose 6 months of music, my code is backed up in source control – I’m an idiot for not taking better backups.
So a week later my laptop is back in the Apple store good as new, or so they tell me. Guy hands me my laptop and prepares to send me off but I insist on testing it first. Sure enough the bottom part of the screen is covered in a tiger stripe pattern. Lovely quality control guys. “Oh you can fix that by resetting the PRAM” says the Genius. Mmmhmm. No that’s not going to work, at all. “Well you’re going to have to make another appointment to get a repair” he tells me. I’m certainly not happy by this point. I have two small children with me and am not looking forward to spending 3 hours in a mall just to talk to another Genius so they can take back the laptop that they couldn’t fix right the first time.
Next meeting with a Genius 3 hours later. I’m told that the laptop will be on rush that I should get it back in days because they are fixing it in-house. That promise came and went a few times as the rush repair stretched out to another 5 days. I drive back in to get my laptop and everything looks good. So I take it home. Big mistake, I really should have learned the first time that Apple repair has little to no quality control. The optical drive is not functioning and I have one functioning speaker.
So here I am finally mad enough to write a post about it. I used to be a fan, I spent a lot of time as a kid cutting my programming teeth on the Apple Classic, IIgs and IIci but I think Apple has really lost it. Not only have they lost my heart as a developer they’ve now lost my confidence as a consumer.
Apple I’m over you.
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