<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Code on Thoughts and Ramblings</title>
    <link>http://www.cod3r.com/tags/code/</link>
    <description>Recent content in Code on Thoughts and Ramblings</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 16 Dec 2024 12:45:28 +0000</lastBuildDate>
    <atom:link href="http://www.cod3r.com/tags/code/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Nix on Mac</title>
      <link>http://www.cod3r.com/2024/12/nix-on-mac/</link>
      <pubDate>Mon, 16 Dec 2024 12:45:28 +0000</pubDate>
      <guid>http://www.cod3r.com/2024/12/nix-on-mac/</guid>
      <description>&lt;p&gt;A couple of months ago, I started using &lt;a href=&#34;https://nixos.org/download/&#34;&gt;Nix&lt;/a&gt; on the Mac instead of homebrew.  This included setting up &lt;a href=&#34;https://github.com/nix-community/home-manager&#34;&gt;home-manager&lt;/a&gt; and &lt;a href=&#34;https://github.com/LnL7/nix-darwin/tree/master&#34;&gt;nix-darwin&lt;/a&gt;.  There are a lot of setup guides on these and I&amp;rsquo;m not going to repeat that work.  I will mention some pieces that I found particularly annoying and their solutions.&lt;/p&gt;&#xA;&lt;h2 id=&#34;multiple-repositories&#34;&gt;Multiple Repositories&lt;/h2&gt;&#xA;&lt;p&gt;Nix allows you to specify multiple repositories where it can fetch code.  However, getting this to work with home-manager can be annoyingly difficult to figure out, especially if you use a flake with multiple files like myself.  This is how I got it to work:&lt;/p&gt;</description>
    </item>
    <item>
      <title>A Month with AppCode</title>
      <link>http://www.cod3r.com/2013/04/a-month-with-appcode/</link>
      <pubDate>Mon, 29 Apr 2013 14:45:43 +0000</pubDate>
      <guid>http://www.cod3r.com/2013/04/a-month-with-appcode/</guid>
      <description>&lt;p&gt;Anyone who uses multiple IDEs along with Xcode recognizes just how far behind Xcode is compared to others. I would even go as far as to argue it is at least half a decade behind Eclipse. Features which I have long grown use to having are completely absent in Xcode. Then, about a month ago, I discovered &lt;a href=&#34;http://www.jetbrains.com/objc/&#34; title=&#34;AppCode&#34;&gt;AppCode&lt;/a&gt; and started using it for my Obj-C development at work. I could repeat the &lt;a href=&#34;http://www.jetbrains.com/objc/features/index.html&#34;&gt;feature set mentioned on their website&lt;/a&gt;, but instead I&amp;rsquo;ll assume you&amp;rsquo;ve read that and outline the crucial parts.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Trac.fcgi Memory Usage</title>
      <link>http://www.cod3r.com/2010/10/trac-fcgi-memory-usage/</link>
      <pubDate>Sat, 16 Oct 2010 18:06:28 +0000</pubDate>
      <guid>http://www.cod3r.com/2010/10/trac-fcgi-memory-usage/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve been slowly transitioning to using nginx as the web front-end in an effort to reduce Apache&amp;rsquo;s memory usage. In keeping with this task, I&amp;rsquo;m moving more and more off of Apache. One piece I recently moved was trac, transitioning to using it directly by nginx by running it in fast-cgi mode where as previously it was running as cgi though Apache.&lt;/p&gt;&#xA;&lt;p&gt;While fast-cgi is faster, it has inherent issues, such as any memory leak can result in ever growing memory usage, which is exactly why Apache has a setting for each child to serve a limited number of requests before exiting. Trac.fcgi has no such directive, and has the equivalent of a large memory leak, a non-expiring cache. While it&amp;rsquo;s not as bad as a memory leak, which will indefinitely grow instead of reaching a limit, if the cache size is larger than the available memory for trac to use, it&amp;rsquo;s just as serious. The only solution, without fixing trac&amp;rsquo;s caching mechanisms, is to restart trac periodically, but during the time trac is restarting, all requests are lost, causing bad gateway errors to the user. Additionally, the restart needs to be done manually. Clearly not an ideal solution.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Google Link Redirection (cont.)</title>
      <link>http://www.cod3r.com/2010/10/google-link-redirection-cont/</link>
      <pubDate>Sat, 09 Oct 2010 14:04:21 +0000</pubDate>
      <guid>http://www.cod3r.com/2010/10/google-link-redirection-cont/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://www.cod3r.com/2010/08/googles-link-redirection/&#34;&gt;Earlier&lt;/a&gt; I wrote about google&amp;rsquo;s link redirection. I have finally finished my testing of a Safari extension which kills this behavior. I didn&amp;rsquo;t want to release this extension until the updating mechanism worked and that is what took me so long. Anyway, here is the &lt;a href=&#34;http://www.cod3r.com/downloads/BlockGoogleRwt.safariextz&#34;&gt;the extension&lt;/a&gt;. Enjoy, and let me know what you think.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Googleâ€™s Link Redirection</title>
      <link>http://www.cod3r.com/2010/08/googles-link-redirection/</link>
      <pubDate>Tue, 31 Aug 2010 02:42:50 +0000</pubDate>
      <guid>http://www.cod3r.com/2010/08/googles-link-redirection/</guid>
      <description>&lt;p&gt;Google, for quite some time, has been redirected clicks on links in their search results to &lt;a href=&#34;https://www.google.com/url&#34;&gt;www.google.com/url&lt;/a&gt;?&amp;hellip;. While I don&amp;rsquo;t approve of such practices, I didn&amp;rsquo;t mind it so much since this is presumably an effort to improve their search results. That changed recently, when I noticed that my history in Safari was filled with entries containing that URL as the title. Considering the fact that I often use the history to re-find a page with pertinent information, this is bordering on making my browser usage useless. Note: I tend to cmd-click links so they show up in new tabs. If you just click the link, the title in the history is correct.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Text Compression Code Released</title>
      <link>http://www.cod3r.com/2010/07/text-compression-code-released/</link>
      <pubDate>Sat, 17 Jul 2010 20:36:22 +0000</pubDate>
      <guid>http://www.cod3r.com/2010/07/text-compression-code-released/</guid>
      <description>&lt;p&gt;After it&amp;rsquo;s &lt;a href=&#34;http://www.cod3r.com/2009/07/text-compression-techniques/&#34;&gt;original post&lt;/a&gt;, I got a request for the code I used in my text compression technique. I&amp;rsquo;ve not gotten around to cleaning up the code and separating it from it&amp;rsquo;s test environment so it can be distributed separately. You can read more about it in its own &lt;a href=&#34;http://www.cod3r.com/programming/text-compression/&#34;&gt;page&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Sometime soon, I&amp;rsquo;ll get around to releasing my code for fetching old Escape Pod episodes that I &lt;a href=&#34;http://www.cod3r.com/2009/09/incorrect-podcast-order-on-my-ipod/&#34;&gt;hinted at earlier&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Text Compression Techniques</title>
      <link>http://www.cod3r.com/2009/07/text-compression-techniques/</link>
      <pubDate>Wed, 29 Jul 2009 22:17:20 +0000</pubDate>
      <guid>http://www.cod3r.com/2009/07/text-compression-techniques/</guid>
      <description>&lt;p&gt;A friend of mine develops on an Bible application for the iPhone, BibleXpress. Since his application includes several translations with the app, he once mentioned to me the possibility of compressing them to save space. Any compression that is done must achieve a good ratio, but more importantly, decompression must be fast. I took it upon myself to find a compression algorithm that could fit the bill.&lt;/p&gt;&#xA;&lt;p&gt;In my test case, I worked with the NASB translation of the Bible. The raw text of this translation, minus formatting and book/chapter/verse identifiers is 3.965MB. Since the iPhone already has zlib, using gzip compression is an obvious choice. When compressed with gzip, the file size becomes 1.189MB, a significant savings. Even though bzip2 is not readily available on the iPhone (at least not that I could find), I tested its compression which produced a file size of 0.8548MB. While these mechanisms provide a significantly smaller file, when one desires a certain portion of the file, one must first decompress the entire file up to that point. This is an expensive operation on a small device such as the iPhone.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
