MacOS X 10.7 compilers

Compile window

As part of a little project to make detecting memory/pointer errors easier for beginning C/C++ programmers, I’ve installed a number of different compilers on my system.  I wanted to make sure that my approach was widely applicable.

At this point, there are 4 (3.5 really) major C/C++ compilers available for MacOS X 10.7.  What follows is a brief description of each, and some background as to how we got here.

Continue reading

Building gcc on MacOS X

Apple has never included a stock version of GCC with their development tools, but now with the current version of Xcode, they don’t even include a modified version.  Seeing as their plan going forward is to move entirely to Clang/LLVM, if you intend to use GCC on OS X, you’ll have to build it yourself.  It’s not a terribly difficult process, but it can be a bit tricky the first few times around, particularly when it comes to configuring the build.

Instructions follow.

Continue reading

Finally some site updates!

Last weekend, I found an archive of a lot of my old postings, and after some chicanery to get around WordPress limitations, I managed to import all the old content into the new blog.

That discovery spurred me to begin updating this place more regularly, and add some things that I’d been meaning to post but never quite got around to.

The Hiking section includes all of the trip reports I’ve written from the last 4 years.  I’ll try to add in brief reports for some of the missing trips as well.

The Miscellaneous section from the old site has been restored.  There’s a lot to update there.

Finally, I’ve created a Programming section, where I’ll be posting the projects I am or have been working on.

Notes on Building a C/C++ Leak Detector

Building a simple C memory leak detector is not too difficult.  I did it in a previous post in less than 200 lines.  But once you add features, it becomes a lot more complicated.

What features am I talking about?

1) Allow use in programs with more than 1 source file.
2) Make fast enough to use in reasonably large programs.
3) C++ support (track allocations made with new and delete).
4) Detect use of mismatched allocation/deallocation (e.g. new and free).
5) Detect simple buffer overflows (writing off the end of an array). 
6) Be generally helpful (errors should be handled gracefully). 
7) Test everything well.

And of course it goes without saying that I wanted to keep it portable, and as simple as possible.

Continue reading

Chance Encounters

Low Memorial - Concert

 

I went down to campus this morning to do some work at the library.  On my way out, I was pleasantly surprised to discover a concert in progress on the Low Steps.  Quite a talented group, particularly the lead singer Bri Arden.  Chalk that up as another good reason not to stay indoors on a pleasant Saturday afternoon.

Mobile phone annoyances

Cell carriers

Thanks to (previously mentioned) problems with AT&T at my new apartment, I’m in the market for a new cell phone carrier.

Unfortunately, this being the US, that means I also am in the market for a new phone.  Mind you, I’m perfectly happy with my current phone.  if I could use it on someone else’s network (i.e. not AT&T), I’d be happy to.  But I can’t.

Continue reading

Revisiting Old Haunts

Rainbow over Reservoir

We are all creatures of habit, but some of us more than others.  When I was living in NYC in spring 2008, I would frequently take the 1 subway line up to 59th street, walk a few blocks across to Central Park, and make my way northward to the reservoir.  I almost always passed by the children’s zoo, the sailboat pond, the Belvedere ‘castle’, and the great lawn on the way to the reservoir.  It was always a nice way to spend the afternoon, and clear my head of whatever funk I was in.  I made the trip more than a dozen times from March through May of that year.

Today I needed to catch the train to visit my grandparents, so I replicated the route I used to take, in reverse order.  As usual the fountain was running in the reservoir, and I was lucky enough to catch a rainbow.  Even in the middle of the densest part of New York, you can still find a little tranquillity, if you look.

The iPhone 4S announcement

Iphone 4

Well, Apple made their iPhone 4S announcement today, and apparently a good many people are less than impressed.

The main complaints I’ve seen so far are:

Same design as the iPhone 4.  This seems to be a form of misplaced status anxiety.  I’ve seen no specific complaints about the iPhone 4 design.  Only a desire for something ‘new’ and ‘shiny’.

Screen is still ‘only’ 3.5″. The assumption seems to be that a bigger screen is automatically a better screen.  From the perspective of pocketability and battery life, that’s not true.  A larger screen would make some things easier, but there would clearly be tradeoffs.

Continue reading