<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7355159829090468531</id><updated>2024-03-12T16:10:33.155-07:00</updated><category term="OS X Lion"/><category term="gcc"/><category term="C++"/><category term="Terminal"/><category term="ViM"/><category term="Xcode"/><category term="list"/><category term="vector"/><title type='text'>staticimport</title><subtitle type='html'>C++ developer discoveries, questions, and other ramblings</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://staticimport.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7355159829090468531/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://staticimport.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Craig</name><uri>http://www.blogger.com/profile/10746659684386338581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7355159829090468531.post-556424188722509901</id><published>2012-03-01T18:59:00.000-08:00</published><updated>2012-03-01T18:59:14.715-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C++"/><category scheme="http://www.blogger.com/atom/ns#" term="list"/><category scheme="http://www.blogger.com/atom/ns#" term="vector"/><title type='text'>Please Don&#39;t Use Linked Lists</title><content type='html'>They&#39;re terrible.  Awful. An abomination to standard libraries for languages around the world.&lt;br /&gt;
&lt;br /&gt;
Okay, maybe they&#39;re not all that bad.  But that still doesn&#39;t mean you should use ever use them.  They&#39;re really simple (one blob with some data and a pointer to the next blob, maybe a pointer to the blob before it), so they&#39;re fantastic as a first data structure you learn in college.  They&#39;re also pretty good in theory; if you need to add an item, just create a node, throw your data in there, and pop it on the back of the list, which is a lot simpler than a dynamic array (i.e. std::vector, java.util.ArrayList) which must periodically expand (usually double) an array and copy all of the previously inserted items into the new, larger array.&lt;br /&gt;
&lt;br /&gt;
One issue here is that dynamic memory allocation (new for you C++/Java folks, malloc for C) scales much better than linearly in terms of how many bytes or items one is requesting.  In other words, a new int[100] might take longer than a new int[1], but it&#39;s nowhere near 100x.  When you insert into a list 100 times, you&#39;re doing 100 new Node() calls, which is a lot more expensive than doing a single allocation (more or less) to hold all 100 items.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://s1098.photobucket.com/albums/g372/staticimport/?action=view&amp;amp;current=ScreenShot2012-03-01at82648PM.png&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://i1098.photobucket.com/albums/g372/staticimport/ScreenShot2012-03-01at82648PM.png&quot; border=&quot;0&quot; alt=&quot;Photobucket&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
One more issue, which is a bit more subtle, is cache coherence.  Relative to fetching data from disk, accessing data in main memory is orders of magnitude faster, but it&#39;s still not fast enough.  Modern CPUs have at least two caches, L1 and L2, between the CPU and main memory which are much faster but also much smaller than main memory, so the OS has to be selective in how data is cached.  When your code needs an int saved in memory, the OS won&#39;t just save the int in the cache but also several more bytes near the int in main memory.  If your linked list nodes are from different locations in memory, you&#39;ll get a lot of cache misses and your L1/L2 caches will be worthless.  With a vector, however, your data is saved in a single, contiguous chunk of memory, so after the first int request, iterating through the next few will already be in your cache and thus quickly accessed.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://s1098.photobucket.com/albums/g372/staticimport/?action=view&amp;amp;current=ScreenShot2012-03-01at82921PM.png&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://i1098.photobucket.com/albums/g372/staticimport/ScreenShot2012-03-01at82921PM.png&quot; border=&quot;0&quot; alt=&quot;Photobucket&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The only possible case where you might prefer, say, a std::list to a std::vector in C++, is if you&#39;re doing inserts in the middle, provided you already have an iterator to that location.  The vector will need shift everything in the vector after that location down a spot, which can be expensive if the vector is large, whereas the list simply creates a new node like it always does and just pops it in.  The thing is, this use case is so rare; in fact, I&#39;ve never encountered it, and so I&#39;ve never needed to use a std::list.  It&#39;s rare enough that you&#39;re inserting into the middle of a sequential container, but even more rare that you already happen to have an iterator to that very location.  Even still, a vector that isn&#39;t huge can still hold its own versus the list.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://s1098.photobucket.com/albums/g372/staticimport/?action=view&amp;amp;current=ScreenShot2012-03-01at85808PM.png&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://i1098.photobucket.com/albums/g372/staticimport/ScreenShot2012-03-01at85808PM.png&quot; border=&quot;0&quot; alt=&quot;Photobucket&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Now, I must say that I&#39;m ranting not against the linked list as a data structure, but more those given to you in standard libraries, such as the C++ standard library (sometimes referred to STL).  It&#39;s not that they aren&#39;t performance or are poorly designed.  It&#39;s just that whenever I need a linked list data structure, it&#39;s because I already have my own blobs of memory that I want to chain together, such as a free list of pre-allocated nodes in a pooling allocator (future post, I promise!).  If I used a std::list or java.util.LinkedList, each insert would allocate a new node to hold my data, whereas I&#39;d rather just have the link as part of my data and thus not need any further allocations.&lt;br /&gt;
&lt;br /&gt;
Rant over.  I never use a std::list or java.util.LinkedList, and probably never will.</content><link rel='replies' type='application/atom+xml' href='http://staticimport.blogspot.com/feeds/556424188722509901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://staticimport.blogspot.com/2012/03/please-dont-use-linked-lists.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7355159829090468531/posts/default/556424188722509901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7355159829090468531/posts/default/556424188722509901'/><link rel='alternate' type='text/html' href='http://staticimport.blogspot.com/2012/03/please-dont-use-linked-lists.html' title='Please Don&#39;t Use Linked Lists'/><author><name>Craig</name><uri>http://www.blogger.com/profile/10746659684386338581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7355159829090468531.post-3289760671184759071</id><published>2012-02-23T19:00:00.001-08:00</published><updated>2012-02-23T20:18:18.612-08:00</updated><title type='text'>Performance Timing C++ Code</title><content type='html'>I like &lt;a href=&quot;http://code.google.com/p/googletest/&quot;&gt;googletest&lt;/a&gt; and &lt;a href=&quot;http://code.google.com/p/googlemock/&quot;&gt;googlemock&lt;/a&gt; for C++ unit testing, though I&#39;ve only been using them for a couple of weeks at my new job.  They don&#39;t seem geared to support performance testing (in any sense of the word) though, so I&#39;d be interested in hearing if people have any recommended frameworks.&lt;br /&gt;
&lt;br /&gt;
In lieu of that though, I&#39;m satisfied just doing some simple timing.  Typically I&#39;ve just rolled my own custom solution (e.g. &lt;a href=&quot;https://github.com/staticimport/promotelib/blob/master/cpp/src/time/TimeVal.cpp&quot;&gt;this&lt;/a&gt; with &lt;a href=&quot;https://github.com/staticimport/promotelib/blob/master/cpp/src/time/StopWatch.cpp&quot;&gt;this&lt;/a&gt;), but usually it&#39;s either a little hacky or at least not the most performant for any given platform.  I&#39;m finally embracing &lt;a href=&quot;http://www.boost.org/&quot;&gt;boost&lt;/a&gt; though which comes with a simple enough &lt;a href=&quot;http://www.boost.org/doc/libs/1_48_0/libs/timer/doc/cpu_timers.html&quot;&gt;timers&lt;/a&gt; library.&lt;br /&gt;
&lt;br /&gt;
If you&#39;re running Mac OS X I recommend using &lt;a href=&quot;http://mxcl.github.com/homebrew/&quot;&gt;homebrew&lt;/a&gt; to install boost as simply as&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;brew install boost&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
It should also be available via the standard package manager on any mainstream distro, such as &lt;code&gt;sudo apt-get install libboost-dev libboost-doc&lt;/code&gt; on Ubuntu or &lt;code&gt;sudo pacman -S boost&lt;/code&gt; on Arch Linux.&lt;br /&gt;
&lt;br /&gt;
As far as using the timers, you can read more in the boost documentation, but basically there are two main ways to use them.  The simplest is the &lt;code&gt;boost::timer::auto_cpu_timer&lt;/code&gt; which begins timing at its initialization and prints various timing information to &lt;code&gt;stdout&lt;/code&gt; in its destructor, e.g &lt;br /&gt;
&lt;br /&gt;
&lt;code&gt; 2.180714s wall, 2.180000s user + 0.000000s system = 2.180000s CPU (100.0%)&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
This printout can be customized via a few &lt;code&gt;printf&lt;/code&gt;-like options, but there&#39;s not much more to it than that.  It&#39;s handy and mighty convenient when indeed all you want is to time a piece of code and dump it to &lt;code&gt;stdout&lt;/code&gt;.&lt;br /&gt;
&lt;br /&gt;
For a more standard and flexible timing utility, use the &lt;code&gt;boost::timer::cpu_timer&lt;/code&gt; which has &lt;code&gt;start()&lt;/code&gt;, &lt;code&gt;stop()&lt;/code&gt;, and &lt;code&gt;elapsed()&lt;/code&gt; methods (among a few others).  The &lt;code&gt;elapsed()&lt;/code&gt; returns an instance of the following struct&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
struct cpu_times&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp;nanosecond_type wall;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;nanosecond_type user;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;nanosecond_type system;&lt;br /&gt;
};&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
Pretty simple stuff, but useful. &amp;nbsp;I wonder though if there is (significant) overhead to it providing the three separate times instead of just the one you might want. &amp;nbsp;Either way, due to whatever overhead there may be as well as the limited resolution of the timers, it&#39;s best to use them by executing the relevant section of code, if relatively quick, in a tight loop and then take the average time. &amp;nbsp;For example, if a section of code takes 100 nanoseconds, if the start() and stop() routines take roughly 500ns each, the 100ns is going to be lost in noise. &amp;nbsp;Instead, execute that piece of code 10000 times for a total time of roughly 1 millisecond and then divide by the 10000. &amp;nbsp;The 2x500=1000ns to do the timing is likewise being marginalized to an irrelevant 0.1ns by the divide.&lt;br /&gt;
&lt;br /&gt;
And that&#39;s all I had to share. &amp;nbsp;Like I said before, it&#39;s pretty simple stuff, but that&#39;s the point. &amp;nbsp;Don&#39;t go roll your own timing logic (as I have repeatedly done) when a well-tested one is already conveniently available.</content><link rel='replies' type='application/atom+xml' href='http://staticimport.blogspot.com/feeds/3289760671184759071/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://staticimport.blogspot.com/2012/02/performance-timing-c-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7355159829090468531/posts/default/3289760671184759071'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7355159829090468531/posts/default/3289760671184759071'/><link rel='alternate' type='text/html' href='http://staticimport.blogspot.com/2012/02/performance-timing-c-code.html' title='Performance Timing C++ Code'/><author><name>Craig</name><uri>http://www.blogger.com/profile/10746659684386338581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7355159829090468531.post-6864449988926584951</id><published>2012-02-21T20:16:00.000-08:00</published><updated>2012-02-21T20:59:35.516-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="gcc"/><category scheme="http://www.blogger.com/atom/ns#" term="OS X Lion"/><title type='text'>Building GCC 4.6.2 on OS X Lion</title><content type='html'>&lt;span style=&quot;color: #6fa8dc; font-size: large;&quot;&gt;Background&lt;/span&gt;&lt;br /&gt;
In my last post we talked about how to get command line developer tools in Lion. &amp;nbsp;You&#39;ll still need these both for building the newer gcc as well as for the other tools, libraries, and documentation that were included. &amp;nbsp;Unfortunately the gcc we get from Apple (a) is wicked old at 4.2.1 and (b) isn&#39;t really gcc anymore, but rather a gcc frontend to their llvm-based compiler. &amp;nbsp;I know very little about this llvm compiler (is it related to clang at all other than the llvm?), but being mainly a C++ developer myself, I mainly want the C++11 features with the newer gcc. &amp;nbsp;I&#39;d also expect C++ optimizations over time in an Apple-maintained compiler to be minimal if any.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #e06666; font-size: large;&quot;&gt;Download GCC and its Prerequisites&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://gcc.gnu.org/mirrors.html&quot;&gt;GCC&lt;/a&gt;&amp;nbsp;-- pick a nearby mirror and grab releases/gcc-4.6.2/gcc-4.6.2.tar.bz2&lt;br /&gt;
&lt;a href=&quot;http://gmplib.org/&quot;&gt;GMP&lt;/a&gt;&amp;nbsp;-- arbitrary precision arithmetic library&lt;br /&gt;
&lt;a href=&quot;http://www.mpfr.org/&quot;&gt;MPFR&lt;/a&gt;&amp;nbsp;-- floating-point computation library&lt;br /&gt;
&lt;a href=&quot;http://www.multiprecision.org/index.php?prog=mpc&amp;amp;page=home&quot;&gt;MPC&lt;/a&gt;&amp;nbsp;-- complex arithmetic library&lt;br /&gt;
At the time of this writing, the latest versions were GMP 5.0.4, MPFR 3.1.0, and MPC 0.9. &amp;nbsp;Obviously adjust the rest of this post if you get different version numbers.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-size: large;&quot;&gt;Building the Prerequisites&lt;/span&gt;&lt;br /&gt;
First create a directory where you want to install gcc and its dependencies. &amp;nbsp;I personally chose /opt/gcc-4.6.2 just to have it nicely compartmentalized in case it breaks or for when I want to try newer versions as they are released.  You may want to create some other directory in your home directory.&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
sudo mkdir -p /opt/gcc-4.6.2&lt;br /&gt;
sudo chmod -R a+rw /opt/gcc-4.6.2&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Now create a directory to do all our building in. &amp;nbsp;The name and location of this directory don&#39;t matter because you can delete it after the build is done.&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
mkdir ~/my-gcc-build&lt;br /&gt;
cd ~/my-gcc-build&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Now extract those files you just downloaded.&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
tar xjf gcc-4.6.2.tar.bz2&lt;br /&gt;
tar xjf gmp-5.0.4.tar.bz2&lt;br /&gt;
tar xjf mpfr-3.1.0.tar.bz2&lt;br /&gt;
tar xf mpc-0.9.tar&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Let&#39;s build GMP first since it doesn&#39;t require any of the other projects.  You&#39;ll notice a common pattern of creating a build directory in each project and running the configure, make, and make install commands from there.  The reason is that, if anything goes wrong or you want to change any options later, you can just nuke the build dir and try again.&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
cd gmp-5.0.4&lt;br /&gt;
mkdir build&lt;br /&gt;
cd build&lt;br /&gt;
../configure --prefix=/opt/gcc-4.6.2&lt;br /&gt;
make -j4&lt;br /&gt;
make install&lt;br /&gt;
cd ../..&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Now for MPFR which requires GMP.&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
cd mpfr-3.1.0&lt;br /&gt;
mkdir build&lt;br /&gt;
cd build&lt;br /&gt;
../configure --prefix=/opt/gcc-4.6.2 --with-gmp=/opt/gcc-4.6.2&lt;br /&gt;
make -j4&lt;br /&gt;
make install&lt;br /&gt;
cd ../..&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Next we have MPC which requires GMP and MPFR.&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
cd mpc-0.9&lt;br /&gt;
mkdir build&lt;br /&gt;
cd build&lt;br /&gt;
../configure --prefix=/opt/gcc-4.6.2 --with-gmp=/opt/gcc-4.6.2 --with-mpfr=/opt/gcc-4.6.2&lt;br /&gt;
make -j4&lt;br /&gt;
make install&lt;br /&gt;
cd ../..&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #93c47d; font-size: large;&quot;&gt;Build GCC&lt;/span&gt;&lt;br /&gt;
Finally, we build gcc itself!  Use the --enable-languages flag to specify which languages you&#39;d like to install.&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
cd gcc-4.6.2&lt;br /&gt;
mkdir build&lt;br /&gt;
cd build&lt;br /&gt;
../configure --enable-languages=c,c++,objc --prefix=/opt/gcc-4.6.2 --with-gmp=/opt/gcc-4.6.2 --with-mpfr=/opt/gcc-4.6.2 --with-mpc=/opt/gcc-4.6.2&lt;br /&gt;
make -j4&lt;br /&gt;
make install&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
After a (probably) long wait, if all goes well, you&#39;ll have a new gcc to enjoy in /opt/gcc-4.6.2/bin or wherever else you chose.  You should update your PATH as follows&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
export PATH=/opt/gcc-4.6.2/bin:$PATH&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
so that the new gcc is the first one found.  You should also save this to your .bashrc or .bash_profile so that it is persisted for the future.</content><link rel='replies' type='application/atom+xml' href='http://staticimport.blogspot.com/feeds/6864449988926584951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://staticimport.blogspot.com/2012/02/building-gcc-462-on-os-x-lion.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7355159829090468531/posts/default/6864449988926584951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7355159829090468531/posts/default/6864449988926584951'/><link rel='alternate' type='text/html' href='http://staticimport.blogspot.com/2012/02/building-gcc-462-on-os-x-lion.html' title='Building GCC 4.6.2 on OS X Lion'/><author><name>Craig</name><uri>http://www.blogger.com/profile/10746659684386338581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7355159829090468531.post-7631082006548733308</id><published>2012-02-20T21:09:00.000-08:00</published><updated>2012-02-20T21:30:44.506-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="gcc"/><category scheme="http://www.blogger.com/atom/ns#" term="OS X Lion"/><category scheme="http://www.blogger.com/atom/ns#" term="Terminal"/><category scheme="http://www.blogger.com/atom/ns#" term="ViM"/><category scheme="http://www.blogger.com/atom/ns#" term="Xcode"/><title type='text'>Mac OS X Lion Command Line Developer Tools</title><content type='html'>&lt;span style=&quot;color: #9fc5e8; font-size: large;&quot;&gt;Background&lt;/span&gt;&lt;br /&gt;
Between my nasty habit of buying and selling (typically) new Macs too often and my enjoyment cleaning out old cruft, I setup fresh OS X installs relatively frequently. &amp;nbsp;Usually there is nothing too involved in this: erase the hard drive, wait a half hour during install, and then download a few things. &amp;nbsp;10.7 Lion has made the process even simpler, for better or worse, now that there is no need to find install discs or customize away unwanted fonts or languages.&lt;br /&gt;
&lt;br /&gt;
One of the first things I do with a fresh system is setup my simple development environment -- downloading some Terminal themes (&lt;a href=&quot;http://noahfrederick.com/blog/2011/lion-terminal-theme-peppermint/&quot;&gt;recommended&lt;/a&gt;), ViM colorschemes (&lt;a href=&quot;http://noahfrederick.com/blog/2011/vim-color-scheme-hemisu/&quot;&gt;also recommended&lt;/a&gt;), and grab my .vimrc from DropBox. &amp;nbsp;Part of the process is downloading Xcode via the App Store, which has historically been the needed install for getting developer tools like gcc and make. &amp;nbsp;(Note that, while the App Store tells you Xcode has been installed, it actually has only installed an installer, which can be found easily via Launchpad or Spotlight).&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #ea9999; font-size: large;&quot;&gt;Problem&lt;/span&gt;&lt;br /&gt;
Unfortunately, at least as of OS X 10.7.3, this is no longer giving me what I want. &amp;nbsp;After installing Xcode and even restarting I still didn&#39;t find gcc in my PATH or even any POSIX manpages. &amp;nbsp;I did manage to find gcc et al. in&amp;nbsp;/Applications/Xcode.app/Contents/Developer/usr/bin/, but that didn&#39;t solve my manpages issue.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #b6d7a8; font-size: large;&quot;&gt;Solution&lt;/span&gt;&lt;br /&gt;
Apple has released a new developer download at&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;a href=&quot;https://developer.apple.com/downloads/index.action&quot;&gt;https://developer.apple.com/downloads/index.action&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
named &lt;b&gt;&lt;span style=&quot;color: #b6d7a8;&quot;&gt;Command Line Tools for Xcode&lt;/span&gt;&lt;/b&gt;. &amp;nbsp;I installed this and it has solved my problems. &amp;nbsp;I haven&#39;t verified that this can be done without having installed Xcode first, but I imagine it can; if so it&#39;s great because it&#39;s a much smaller (and thus faster) download and install and is all I wanted in the first place.</content><link rel='replies' type='application/atom+xml' href='http://staticimport.blogspot.com/feeds/7631082006548733308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://staticimport.blogspot.com/2012/02/mac-os-x-lion-command-line-developer.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7355159829090468531/posts/default/7631082006548733308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7355159829090468531/posts/default/7631082006548733308'/><link rel='alternate' type='text/html' href='http://staticimport.blogspot.com/2012/02/mac-os-x-lion-command-line-developer.html' title='Mac OS X Lion Command Line Developer Tools'/><author><name>Craig</name><uri>http://www.blogger.com/profile/10746659684386338581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7355159829090468531.post-238272313092139856</id><published>2012-02-20T20:31:00.000-08:00</published><updated>2012-02-20T20:31:09.230-08:00</updated><title type='text'>Complete Newb</title><content type='html'>So yeah, this is my first blog post on my first ever blog. &amp;nbsp;I don&#39;t really read any blogs consistently so I&#39;ll probably be breaking a lot of blogger rules or something, like talking about the fact that this is a blog and I don&#39;t know what I&#39;m doing. &amp;nbsp;Oops.&lt;br /&gt;
&lt;br /&gt;
I&#39;m a software developer in Chicago, IL living with my beautiful wife, precious baby girl, and my easy going dog. &amp;nbsp;I&#39;ve had plenty of experience with Java, Scala, and Ruby, but C and C++ are where my heart is. &amp;nbsp;I&#39;m relatively young though, both in terms of C/C++ development years as well as over all lifetime years, so I have a ton to learn. &amp;nbsp;My hope is that I can be both thoughtful and diligent enough to share here what I come across as I grow, both for my own thoroughness and preservation as well as sharing with others for their and mine benefit.</content><link rel='replies' type='application/atom+xml' href='http://staticimport.blogspot.com/feeds/238272313092139856/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://staticimport.blogspot.com/2012/02/complete-newb.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7355159829090468531/posts/default/238272313092139856'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7355159829090468531/posts/default/238272313092139856'/><link rel='alternate' type='text/html' href='http://staticimport.blogspot.com/2012/02/complete-newb.html' title='Complete Newb'/><author><name>Craig</name><uri>http://www.blogger.com/profile/10746659684386338581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>