<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Miklós Fazekas&#039;s blog</title>
	<atom:link href="http://boga.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://boga.wordpress.com</link>
	<description>Technology blog about Mac, Ruby</description>
	<lastBuildDate>Tue, 31 Mar 2009 17:52:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='boga.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Miklós Fazekas&#039;s blog</title>
		<link>http://boga.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://boga.wordpress.com/osd.xml" title="Miklós Fazekas&#039;s blog" />
	<atom:link rel='hub' href='http://boga.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Blog moving</title>
		<link>http://boga.wordpress.com/2009/03/31/blog-moving/</link>
		<comments>http://boga.wordpress.com/2009/03/31/blog-moving/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 17:52:28 +0000</pubDate>
		<dc:creator>boga</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://boga.wordpress.com/2009/03/31/blog-moving/</guid>
		<description><![CDATA[This blog is moving to: http://www.unittested.com/blog<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boga.wordpress.com&amp;blog=69553&amp;post=39&amp;subd=boga&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This blog is moving to: <a href="http://www.unittested.com/blog">http://www.unittested.com/blog</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/boga.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/boga.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/boga.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/boga.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/boga.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/boga.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/boga.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/boga.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/boga.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/boga.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/boga.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/boga.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/boga.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/boga.wordpress.com/39/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boga.wordpress.com&amp;blog=69553&amp;post=39&amp;subd=boga&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://boga.wordpress.com/2009/03/31/blog-moving/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62f96fb3975d866250b6a7b8f00264d4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">boga</media:title>
		</media:content>
	</item>
		<item>
		<title>Debugging iPhone provision profiles/certificates</title>
		<link>http://boga.wordpress.com/2008/07/16/debugging-ipod-provision-profilescertificates/</link>
		<comments>http://boga.wordpress.com/2008/07/16/debugging-ipod-provision-profilescertificates/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 13:16:01 +0000</pubDate>
		<dc:creator>boga</dc:creator>
				<category><![CDATA[iPhone development]]></category>
		<category><![CDATA[Mac development]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://boga.wordpress.com/?p=21</guid>
		<description><![CDATA[If you&#8217;re in the iPhone Developer Program, you&#8217;ll be able to run you code in a phisical device, with the following process: - Create a Certificate Signing Request (CSR) and submit to the developer portal Download and install the code singing certificate (Development/Distribution certificate) to your Keychain Download and install the WWDR certificate Create/Download a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boga.wordpress.com&amp;blog=69553&amp;post=21&amp;subd=boga&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re in the iPhone Developer Program, you&#8217;ll be able to run you code in a phisical device, with the following process:</p>
<ul>-</p>
<li>Create a Certificate Signing Request (CSR) and submit to the developer portal</li>
<li>Download and install the code singing certificate (Development/Distribution certificate) to your Keychain</li>
<li>Download and install the WWDR certificate</li>
<li>Create/Download a Provisioning profile listing the devices you intend to run the program on</li>
<li>Install the provisioning profile to your development machine by dropping it into iTunes</li>
<li>Set the Certificate/Provision profile in your XCode project</li>
</ul>
<h2>Throubleshooting/things to verify:</h2>
<p>First re-read  iPhone Developer Portal Program Guide PDF to make sure you&#8217;ve followed every step correctly.<br />
The two basic types of issues you can have:</p>
<ul>
<li>The app is not signed</li>
<li>The app is signed, but you cannot run/load it into the device</li>
</ul>
<h3>Verifying if your app is signed</h3>
<p>You can check if you app is signed by verifying the followin 2 things:</p>
<ul>
<li>There was a CodeSign step during the build</li>
<li>The built package contains a <code>CodeResource</code> and <code>embedded.mobileprovision</code></li>
</ul>
<p>If it&#8217;s not signed double check the followings:</p>
<ul>
<li>XCode project is set up correctly <code>Code Sigining Identity</code> is: <code>iPhone Development: yourname</code> or <code>iPhone Distribution: yourname</code> and the Code signing provisioning profile is set to a porfile you&#8217;ve downloaded. It shouldn&#8217;t be <code>Default provisioning profile for code signing identity</code></li>
<li>If you set these things at project level make sure they aren&#8217;t overriden in target level</li>
<li>Voodoo: Quit XCode, clean, rebuild</li>
</ul>
<p>If you can&#8217;t even select the provisioning profile in XCode check the followings:</p>
<ul>
<li>Is the active target in XCode the same as the settings you&#8217;re editing? Here is the thing: it seems that the provision profile popup contains profiles matching the active target&#8217;s certificate (and no the one you&#8217;re editing). So make sure that you select the current configuration in Project/Set Active Build Configuration</li>
<li>Do you have the WWDR certificate installed? Check <code>Apple Wordwide Developer Relations Certification</code> in Keychain</li>
<li>Do you have my Distribution Certificate in keychain? Check for <code>'iPhone Developer: name'</code> and/or <code>'iPhone Distribution: name'</code> in Keychain. There should be a gray trinangle to the left of if, and on open it should show your private key.</li>
<li>Do you have the provisioning profile installed in <code>~/Library/MobileDevice/Provisioning Profiles/</code>. Drag and drop the profile to iTunes to fix this.</li>
</ul>
<h3>The app is signed, but you cannot run/load it into the device</h3>
<p>First get <a href="http://www.apple.com/support/downloads/iphoneconfigurationutility10formacosx.html">iPhone Configuration Utility</a>, it&#8217;s a great app to get more information, you can check your console log, install single application and check installed provisioning profiles.</p>
<ul>
<li>Do you have the provisioning profile installed to your iPhone? Use <code>iPhone Configuration Utility</code> to verify</li>
</ul>
<p>There can be also issues with App-ID that will prevent from application to run.</p>
<ul>
<li>In my experiecnce you should just use <code>*</code> as app id.</li>
<li>If you have a <code> entitlement 'application-identifier' has value not permitted by provisioning profile</code> in your iPhone console log, then try using a wildcard (<code>*</code>) App ID</li>
</ul>
<h3>Ad Hoc profiles:</h3>
<p>I just couldn&#8217;t get Ad Hoc profiles to work. I always have this error in my iPhone console log:<br />
<code>entitlement 'get-task-allow' has value not permitted by provisioning profile</code><br />
I&#8217;ve tried following every step of the iPhone Developer Portal Program Guide PDF, and i still get this.<br />
In iTunes i either get a <code>0xE8000001</code> or <code>0xE8000013</code> when trying to install an application with an AdHoc provisioning profile.</p>
<p><strong>Update:</strong> Apple has just updated the instructions in iPhone Developer Portal Program Guide PDF. They now tell to add &#8216;Entitlements.plist&#8217; with &#8216;get-task-allow&#8217; set to false to the Entitlements.<br />
You should also verify your provision profile with a text editor. The plist embedded should contain these lines:<br />
<code><br />
&lt;key&gt;Entitlements&lt;/key&gt;<br />
&lt;false&gt;<br />
</code><br />
You should also remove old provision profiles without the iPhone (Use iPhone Configuration Utility). As having a bad provisioning profile will prevent your app from installing.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/boga.wordpress.com/21/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/boga.wordpress.com/21/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/boga.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/boga.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/boga.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/boga.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/boga.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/boga.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/boga.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/boga.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/boga.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/boga.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/boga.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/boga.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/boga.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/boga.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boga.wordpress.com&amp;blog=69553&amp;post=21&amp;subd=boga&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://boga.wordpress.com/2008/07/16/debugging-ipod-provision-profilescertificates/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62f96fb3975d866250b6a7b8f00264d4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">boga</media:title>
		</media:content>
	</item>
		<item>
		<title>OSX 10.5.3: enable Gmail Contact Sync without iPhone</title>
		<link>http://boga.wordpress.com/2008/06/07/osx-1053-enable-gmail-contact-sync-without-iphone/</link>
		<comments>http://boga.wordpress.com/2008/06/07/osx-1053-enable-gmail-contact-sync-without-iphone/#comments</comments>
		<pubDate>Sat, 07 Jun 2008 10:34:11 +0000</pubDate>
		<dc:creator>boga</dc:creator>
				<category><![CDATA[Mac development]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://boga.wordpress.com/?p=20</guid>
		<description><![CDATA[10.5.3 adds ability to sync your address book with gmail contact list. Unfortunately it only enabled if you&#8217;ve ever connected iPhone/iPod touch to your mac. You can use the following terminal command, to enable the syncing option, if your mac have never seend an iPhone. defaults write com.apple.iPod Devices -dict-add 000A27001A56740D '{ "Family ID" = [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boga.wordpress.com&amp;blog=69553&amp;post=20&amp;subd=boga&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>10.5.3 <a href="http://googlemac.blogspot.com/2008/05/mac-os-x-1053-sync-google-contacts.html">adds</a> ability to sync your address book with gmail contact list.</p>
<p>Unfortunately it only enabled if you&#8217;ve ever connected iPhone/iPod touch to your mac.<br />
You can use the following terminal command, to enable the syncing option, if your mac have never seend an iPhone.<br />
<code><br />
defaults write com.apple.iPod Devices -dict-add 000A27001A56740D  '{ "Family ID" = 10001; }'<br />
</code><br />
<b>note</b> this is a single line, and not a two line command.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/boga.wordpress.com/20/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/boga.wordpress.com/20/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/boga.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/boga.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/boga.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/boga.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/boga.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/boga.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/boga.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/boga.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/boga.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/boga.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/boga.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/boga.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/boga.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/boga.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boga.wordpress.com&amp;blog=69553&amp;post=20&amp;subd=boga&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://boga.wordpress.com/2008/06/07/osx-1053-enable-gmail-contact-sync-without-iphone/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62f96fb3975d866250b6a7b8f00264d4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">boga</media:title>
		</media:content>
	</item>
		<item>
		<title>Ruby 1.9 porting tips/notes</title>
		<link>http://boga.wordpress.com/2008/04/15/ruby-19-porting-notes/</link>
		<comments>http://boga.wordpress.com/2008/04/15/ruby-19-porting-notes/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 05:42:38 +0000</pubDate>
		<dc:creator>boga</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby1.9]]></category>
		<category><![CDATA[yarv]]></category>

		<guid isPermaLink="false">http://boga.wordpress.com/?p=18</guid>
		<description><![CDATA[formal argument cannot be an instance variable: In ruby1.8 it&#8217;s possible to use an instance variable as a block argument: This no longer works in ruby1.9, you as it always creates a new local variable block argument. The equivalent in ruby1.9: warning: shadowing outer local variable: In ruby1.9 the block arguments are always local to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boga.wordpress.com&amp;blog=69553&amp;post=18&amp;subd=boga&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<ol>
<li><strong>formal argument cannot be an instance variable</strong>:<br />
In ruby1.8 it&#8217;s possible to use an instance variable as a block argument:<br />
<pre class="brush: ruby;">
class Foo
  attr_accessor :bar
  def test
     [1,2,3].each {|@bar| }
     # @bar will be 3 here
  end
end
</pre><br />
This no longer works in ruby1.9, you as it always creates a new local variable block argument. The equivalent in ruby1.9:<br />
<pre class="brush: ruby;">
class Foo
  attr_accessor :bar
  def test
     [1,2,3].each {|bar| @bar=bar }
     # @bar will be 3 here
  end
end
</pre></p>
</li>
<li><strong>warning: shadowing outer local variable</strong>:<br />
In ruby1.9 the block arguments are always local to block, in ruby1.8 if there&#8217;s an existing variable with the same name, the block parameter will use that one:  </p>
<p><pre class="brush: ruby;">
i = 0
[1,2,3].each {|i| }
puts i
</pre></p>
<p>This will print <code>0</code> in ruby1.9, as the variables named <code>i</code> inside/outside the block are different, and <code>3</code> in ruby1.8, as here the block reuses the outside variable <code>i</code>.</p>
<p>As with most warning, this warning doesn&#8217;t means that your code is incorrect, only that it <em>might</em> be incorrect.<br />
For example the code bellow works the same in ruby1.9 and 1.8:</p>
<p><pre class="brush: ruby;">
options = options.inject({}) do |options,pair|
  options[pair.first.to_sym] = pair.last.to_sym; options
end
</pre></p>
<p>It still makes sense to rewrite the above code just to <a href="http://eigenclass.org/hiki/ruby-warnings-SEX-and-stds">supress warnings</a>.</p>
<p><strong>Note:</strong> You should set <code>RUBYOPT</code> to <code>-w</code>, or start your program with <code>ruby -w</code>, for this warning to show up</li>
<li><strong>syntax error, unexpected &#8216;,&#8217;, expecting tASSOC</strong><br />
ruby1.8 supports <code>,</code> in hash definition, in 1.9 you have to use <code>=&gt;</code>.  </p>
<p>So the following valid ruby1.8:</p>
<p><pre class="brush: ruby;">
{&quot;a&quot;,&quot;b&quot;}
</pre></p>
<p>has to be rewritten in ruby1.9:</p>
<p><pre class="brush: ruby;">
{&quot;a&quot; =&gt; &quot;b&quot;}
</pre></li>
<li><strong>invalid multibyte char</strong>:<br />
the default encoding in ruby 1.9 for files is <code>US-ASCII</code>, if you have a non ASCII character in your text file you have to specify the encoding of the source code. You can do it by adding the following line to your ruby file:  </p>
<p><pre class="brush: ruby;">
# coding:utf-8
</pre></li>
<li><strong>NoMethodError: undefined method `to_a&#8217; for &#8220;&#8230;&#8221;:String:</strong><br />
In Ruby1.8 the String class has a <code>to_a</code> method, so in ruby1.8 you can write:<br />
<pre class="brush: ruby;">
lines = string.to_a
</pre></p>
<p>The equivalent in ruby1.9 is:<br />
<pre class="brush: ruby;">
lines = string.lines.to_a
# chars = string.chars.to_a # to get array of chars
# bytes = string.bytes.to_a # to get array of bytes
</pre></p>
<p>The issue with this solution, is that the ruby1.9 solution is not compatible with ruby1.8.</p>
<p>Some ideas for a ruby1.9 and ruby1.8 compatible solution:</p>
<p>The first one is to add a <code>lines</code> method to the <code>String</code>, so you can use the ruby1.9 syntax:</p>
<p><pre class="brush: ruby;">
unless String.method_defined?(:lines) then
  class String
    def lines
      to_a
    end
  end
endif
</pre></p>
<p>The downside is that this <code>lines</code> method is not 100% compatible with <a href="http://www.ruby-doc.org/core-1.9/classes/String.html#M000879">ruby1.9 String#lines</a> &#8211; for example string.lines(&#8220;\n\r&#8221;) won&#8217;t work. </p>
<p>The second one is to check at each call whether it has the <code>lines</code> method:</p>
<p><pre class="brush: ruby;">
if str.respond_to?(:lines) then
  lines = string.lines.to_a
else
  lines = string.to_a
end
</pre></li>
<li><strong>unexpected &#8216;:&#8217;, expecting keyword_then or &#8216;,&#8217; or &#8216;;&#8217; or &#8216;\n&#8217;</strong>:<br />
<code>case</code> or <code>if</code> with <code><strong>:</strong></code> instead of <code>then</code>  </p>
<p>Ruby1.8 allows the use of <strong>:</strong> shortcut instead of <strong>then</strong> in <code>if</code> and <code>case</code> expressions. In Ruby1.9 this is no more allowed.</p>
<p><pre class="brush: ruby;">
case 'test'
  when 'test': print 'OK'
end
</pre></p>
<p>In ruby1.9 you&#8217;ll get a syntax error,  so you have to replace the &#8216;:&#8217; with &#8216;then&#8217;</p>
<p><pre class="brush: ruby;">
case 'test'
  when 'test' then print 'OK'
end
</pre></li>
<li><strong>no such file to load &#8212; base64</strong>:<br />
<code>require "base64"</code>: ruby 1.9 ships without base64. You should use Array#pack, unpack  </p>
<p><pre class="brush: ruby;">
 require 'base64'
 enc = Base64.encode64('Send reinforcements')
 plain = Base64.decode64(enc)
</pre></p>
<p>In ruby1.9 you can write:</p>
<p><pre class="brush: ruby;">
enc = ['Send reinforcements'].pack( 'm' )
plain = enc.unpack( 'm' )[0]
</pre></li>
<li><strong>&#8216;struct RString&#8217; has no member named &#8216;ptr&#8217;</strong><br />
<strong>&#8216;struct RString&#8217; has no member named &#8216;len&#8217;</strong>:<br />
In ruby1.9 for the RString in C extensions was changed because of optimization, you should use the <code> RSTRING_LEN</code>, <code>RSTRING_PTR</code> macros  instead of directly accessing the <code>len</code>, <code>ptr</code> members.  </p>
<p><pre class="brush: cpp;">
len = RSTRING(foo)-&gt;len
ptr = RSTRING(foo)-&gt;ptr
</pre></p>
<p>Should be changed to</p>
<p><pre class="brush: cpp;">
len = RSTRING_LEN(foo);
ptr = RSTRING_PTR(foo);
</pre></li>
<li><strong>.methods changed from Strings to Symbols</strong><br />
The contents of the methods array was changed from String to Symbol, so if you were doing something like this in ruby1.8:<br />
<pre class="brush: ruby;">
Object.methods.include?(&quot;to_s&quot;)
</pre></p>
<p>The ruby1.9 version is:<br />
<pre class="brush: ruby;">
Object.methods.include?(:to_s)
</pre></p>
<p>And the following works in ruby1.8 and 1.9:<br />
<pre class="brush: ruby;">
object.respond_to?(:some_method)
</pre></p>
</li>
<li>
<strong>TypeError: cannot assign nil; use Hash#delete instead</strong><br />
In ruby1.8 you can remove an environment variable by setting it to <code>nil</code>.<br />
In ruby1.9 use the <code>delete</code> method instead:<br />
<pre class="brush: ruby;">
ENV.delete('MY_ENV_VARIABLE')
</pre>
</li>
</ol>
<p><strong></p>
<h3>Related link:</h3>
<ul>
<li><a href="http://intertwingly.net/blog/2007/12/31/Porting-REXML-to-Ruby-1-9">Porting REXML to ruby 1.9</a></li>
<li><a href="http://filipe.icewall.org/index.php/2008/01/09/mongrel-ruby19kind_of-trueclass/">Mongrel on ruby1.9</a></li>
<li><a href="http://learnruby.com/ruby-1.9.html">Matz on ruby1.9 &#8211; RubyConf 2007</a></li>
<li><a href="http://www.avc-cvut.cz/avc.php?id=6830&amp;language=en_US">Matz on ruby1.9 &#8211; EURUKO2008</a></li>
<li><a href="http://www.youtube.com/watch?v=oEkJvvGEtB4">Matz on ruby1.9 Google tech talks</a></li>
<li><a href="http://codefluency.com/articles/2008/04/13/migrating-to-ruby-1-9/">Migrating to ruby 1.9 by Bruce Williams</a></li>
<li><a href="http://blog.grayproductions.net/articles/getting_code_ready_for_ruby_19">Getting Code Ready for Ruby 1.9</a></li>
<li><a href="http://ruby.tie-rack.org/28/installing-19/">Installing ruby 1.9 on MacOSX</a></li>
<li><a href="http://www.ruby-forum.com/topic/136659">Purpose of Ruby 1.9? &#8211; what is/isn&#8217;t 1.9.0, 1.9.1, and 2.0.x</a></li>
<li><a href="http://pragdave.blogs.pragprog.com/pragdave/2007/12/ruby-19right-fo.html">Ruby 1.9 &#8211; Right for you?</a></li>
</ul>
<p></strong></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/boga.wordpress.com/18/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/boga.wordpress.com/18/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/boga.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/boga.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/boga.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/boga.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/boga.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/boga.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/boga.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/boga.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/boga.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/boga.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/boga.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/boga.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/boga.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/boga.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boga.wordpress.com&amp;blog=69553&amp;post=18&amp;subd=boga&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://boga.wordpress.com/2008/04/15/ruby-19-porting-notes/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62f96fb3975d866250b6a7b8f00264d4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">boga</media:title>
		</media:content>
	</item>
		<item>
		<title>AuthorizationExecuteWithPrivileges + StdErr + PID</title>
		<link>http://boga.wordpress.com/2006/02/07/authorizationexecutewithprivileges-stderr-pid/</link>
		<comments>http://boga.wordpress.com/2006/02/07/authorizationexecutewithprivileges-stderr-pid/#comments</comments>
		<pubDate>Tue, 07 Feb 2006 19:10:55 +0000</pubDate>
		<dc:creator>boga</dc:creator>
				<category><![CDATA[Mac development]]></category>

		<guid isPermaLink="false">http://boga.wordpress.com/2006/02/07/authorizationexecutewithprivileges-stderr-pid/</guid>
		<description><![CDATA[AuthorizationExecuteWithPrivileges is a MacOSX function can be used to programmatically execute a command as root. (It presents a dialog asking for administrator password).There&#8217;s 2 information that this function doesn&#8217;t give you back: executed process&#8217;s pid &#8211; so that you can wait for it, and get the exitCode of it file handle to stderr Please note [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boga.wordpress.com&amp;blog=69553&amp;post=13&amp;subd=boga&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://developer.apple.com/documentation/Security/Reference/authorization_ref/Reference/reference.html#//apple_ref/doc/uid/TP30000826-CH1g-F17554">AuthorizationExecuteWithPrivileges</a> is a MacOSX function can be used to programmatically execute a command as root. (It presents a dialog asking for administrator password).There&#8217;s 2 information that this function doesn&#8217;t give you back:
<ul>
<li>executed process&#8217;s pid &#8211; so that you can wait for it, and get the exitCode of it</li>
<li>file handle to stderr</li>
</ul>
<div>Please note that this function is probably not secure enough. (But probably not much worse than most uses of AEWP). See the <a href="http://developer.apple.com/samplecode/BetterAuthorizationSample">BetterAuthorizationSample</a> code for truly secure solution.</div>
<p>My AuthorizationExecuteWithPrivilegesStdErrAndPID tries to overcome both limitation. Here&#8217;s the <a href="http://www.pastie.org/180907">code.
<pre></pre>
<p></a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/boga.wordpress.com/13/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/boga.wordpress.com/13/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/boga.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/boga.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/boga.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/boga.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/boga.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/boga.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/boga.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/boga.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/boga.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/boga.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/boga.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/boga.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/boga.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/boga.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boga.wordpress.com&amp;blog=69553&amp;post=13&amp;subd=boga&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://boga.wordpress.com/2006/02/07/authorizationexecutewithprivileges-stderr-pid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62f96fb3975d866250b6a7b8f00264d4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">boga</media:title>
		</media:content>
	</item>
		<item>
		<title>Eclipse launcher</title>
		<link>http://boga.wordpress.com/2006/01/22/eclipse-launcher/</link>
		<comments>http://boga.wordpress.com/2006/01/22/eclipse-launcher/#comments</comments>
		<pubDate>Sun, 22 Jan 2006 12:22:01 +0000</pubDate>
		<dc:creator>boga</dc:creator>
				<category><![CDATA[Mac development]]></category>

		<guid isPermaLink="false">http://boga.wordpress.com/2006/01/22/eclipse-launcher/</guid>
		<description><![CDATA[The eclipse laucnher on MacOSX has the following problem: If you store it in dock it creates a second icon. Current architecure of the Eclipse launcher: Eclipse.app: an LSUIElement=1 application, =&#62; won&#8217;t have a Dock icon. It just shows a startup screen while launching the eclipse. java: will have an eclipse icon, but the location [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boga.wordpress.com&amp;blog=69553&amp;post=12&amp;subd=boga&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The eclipse laucnher on MacOSX has the following problem:</p>
<p>If you store it in dock it creates a second icon.</p>
<p>Current architecure of the Eclipse launcher:</p>
<ul>
<li>Eclipse.app: an <a href="http://www.oreillynet.com/cs/user/view/cs_msg/30104">LSUIElement=1</a> application, =&gt; won&#8217;t have a Dock icon. It just shows a startup screen while launching the eclipse.</li>
<li>java: will have an eclipse icon, but the location is /usr/bin/java, so will be a diffrent item in the dock.</li>
</ul>
<p>Fixes:</p>
<ol>
<li>Eclipse.app shall not be an LSUIElement 1 application, so that it will appear in the dock when running.</li>
<li>The application that shows the startupscreen shall be an LSUIElement 1 application. Packaged inside Eclipse.app</li>
<li>OSX shall be fooled when launching /usr/bin/java to think that is has launched from the Eclipse.app location.</li>
</ol>
<p><strong>Fooling the system about the location of the laucnhed(/usr/bin/java) application:</strong></p>
<p>We have 3 solutions:</p>
<ol>
<li>Before laucnhing set CFProcessPath, to the bundle executable. It works, but someone has to kill the CFProcessPath variable after eclipse started otherwise all programs started from eclipse will be behaving like it has the Eclipse.app location. Unfortunatedly this doesn&#8217;t seems to work. Event tough the CFGetMainBundle will return the correct thing. (Eclipse package instead of Java) It won&#8217;t have the correct location displayed in the dock for Show Original. It&#8217;ll also create a different icon if the Eclipse.app icon is in the dock.</li>
<li>Launch with  a command like this:<br />
exec(&#8220;/usr/bin/java&#8221;,&#8221;&#8230;Eclipse.app/Contents/MacOS/eclipse&#8221;,argv[1]..);<br />
This causes java to be started but when CFBundleGetMainBundle called it will return the Eclipse bundle.</li>
<li>Write a custom java launcher app.</li>
</ol>
<p><strong>Runtime behaviour with (2):</strong></p>
<ol>
<li>User clicks tha Eclipse.app</li>
<li>OSX starts executing Eclipse.app and bounches the icon</li>
<li>Eclipse app forks, and starts EclipseLaucnher. The Eclipse.app quits bouncing stops.</li>
<li>EclipseLaucnher starts /usr/bin/java, and fakes Eclipse.app as the process location, this causes the icon to appear.</li>
</ol>
<p>See <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=53260">Eclipse Bug 53260</a>, cannot keep eclipse app in the Dock.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/boga.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/boga.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/boga.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/boga.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/boga.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/boga.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/boga.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/boga.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/boga.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/boga.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/boga.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/boga.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/boga.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/boga.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/boga.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/boga.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boga.wordpress.com&amp;blog=69553&amp;post=12&amp;subd=boga&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://boga.wordpress.com/2006/01/22/eclipse-launcher/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62f96fb3975d866250b6a7b8f00264d4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">boga</media:title>
		</media:content>
	</item>
		<item>
		<title>GCC dynamic_cast and type_info and symbols visibility</title>
		<link>http://boga.wordpress.com/2006/01/17/gcc-dynamic_cast-and-type_info-and-symbols-visibility/</link>
		<comments>http://boga.wordpress.com/2006/01/17/gcc-dynamic_cast-and-type_info-and-symbols-visibility/#comments</comments>
		<pubDate>Tue, 17 Jan 2006 17:04:06 +0000</pubDate>
		<dc:creator>boga</dc:creator>
				<category><![CDATA[C++ development]]></category>
		<category><![CDATA[Mac development]]></category>
		<category><![CDATA[Software development]]></category>

		<guid isPermaLink="false">http://boga.wordpress.com/2006/01/17/gcc-dynamic_cast-and-type_info-and-symbols-visibility/</guid>
		<description><![CDATA[In one ouf our framework i have a code like this: XMLParser.dylib: DOMElement.hpp: class DLLEXPORT DOMElement : DOMNode { &#8230; virtual ~ DOMElement() {}; &#8230; } In the application we have code like: XMLTest.cpp: #include &#8220;DOMElement.hpp&#8221; &#8230; if(node-&#62;getNodeType()== DOMNode::ELEMENT_NODE ) DOMElement* element = dynamic_cast(node); The DLLEXPORT expands to __attrbiute((visibility(&#8220;default&#8221;)) in XMLParser.framework The DLLEXPORT expands to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boga.wordpress.com&amp;blog=69553&amp;post=11&amp;subd=boga&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In one ouf our framework i have a code like this:</p>
<p>XMLParser.dylib:<br />
DOMElement.hpp:</p>
<blockquote><p>class DLLEXPORT DOMElement : DOMNode<br />
{<br />
&#8230;<br />
virtual ~ DOMElement() {};<br />
&#8230;<br />
}</p></blockquote>
<p>In the application we have code like:</p>
<p>XMLTest.cpp:</p>
<blockquote><p>#include &#8220;DOMElement.hpp&#8221;<br />
&#8230;<br />
if(node-&gt;getNodeType()== DOMNode::ELEMENT_NODE )</p>
<blockquote><p>DOMElement*     element = dynamic_cast(node);</p></blockquote>
</blockquote>
<p>The DLLEXPORT expands to __attrbiute((visibility(&#8220;default&#8221;)) in XMLParser.framework<br />
The DLLEXPORT expands to __attrbiute((visibility(&#8220;hidden&#8221;)) in XMLTest</p>
<p>The issue is that the dynamic_cast fails by returning 0.</p>
<p>I see the followings:</p>
<ol>
<li>the DOMElement class has two type_info entries:</li>
<ul>
<li>one inside the XMLParser.dylib with default visibility</li>
<li>one inside the XMLTest application with hidden visibiliy</li>
</ul>
<li>the linker looks for the type_info entry of DOMElement: __ZTIN10DOMElementE<br />
It sees a __ZTIN10DOMElementE entry marked with hidden in XMLTest.cpp.o, it also sees a the same entry marked as default in XMLParser.dyld</li>
<li>From runtime it seems that the linker selects the hidden one. And this causes issue with dynamic_cast, as there&#8217;s two entries with the same symbol.</li>
</ol>
<p><strong>Questions:</strong></p>
<ul>
<li>It seems that linker prefers the hidden symbol the same DSO to the visible in the different DSO?! Is this a rule?!</li>
</ul>
<blockquote>
<blockquote><p>It seems to make sense: You have a DSO with NewWindow, then you have an internal function called NewWindow (&#8220;hidden&#8221;). If the linker should choose, it should prefer the &#8220;hidden&#8221; one to the one in different framework.</p></blockquote>
</blockquote>
<ul>
<li>If so wouldn&#8217;t it be logical to have an &#8220;imported&#8221; visibility, where the visible symbol in the different DSO would be preferred over the &#8220;imported&#8221; symbol in the same DSO.</li>
<li>Setting the type_info visible in both modules seems to solve the problem. Why? What happens if the linker sees 2 visible entries, one in the actual module the other in a different DSO?!</li>
</ul>
<p><strong>References:</strong></p>
<ul>
<li><a href="http://gcc.gnu.org/wiki/Visibility">GCC Visibility documentation</a></li>
<li><a href="http://gcc.gnu.org/faq.html#dso">GCC FAQ/DSO</a></li>
<li><a></li>
</ul>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/boga.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/boga.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/boga.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/boga.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/boga.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/boga.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/boga.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/boga.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/boga.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/boga.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/boga.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/boga.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/boga.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/boga.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/boga.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/boga.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boga.wordpress.com&amp;blog=69553&amp;post=11&amp;subd=boga&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://boga.wordpress.com/2006/01/17/gcc-dynamic_cast-and-type_info-and-symbols-visibility/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62f96fb3975d866250b6a7b8f00264d4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">boga</media:title>
		</media:content>
	</item>
		<item>
		<title>First MachOViewer release 1.0a0</title>
		<link>http://boga.wordpress.com/2006/01/15/first-machoviewer-release-10a0/</link>
		<comments>http://boga.wordpress.com/2006/01/15/first-machoviewer-release-10a0/#comments</comments>
		<pubDate>Sun, 15 Jan 2006 22:10:35 +0000</pubDate>
		<dc:creator>boga</dc:creator>
				<category><![CDATA[Mac development]]></category>
		<category><![CDATA[MachOViewer]]></category>
		<category><![CDATA[Python development]]></category>

		<guid isPermaLink="false">http://boga.wordpress.com/2006/01/15/first-machoviewer-release-10a0/</guid>
		<description><![CDATA[I&#8217;ve just relased the first MachOViewer alpha. Features: Opens Frameworks, Bundles, Applications Displays used libraries, can open used library by double clicking it&#8217;s name Universal Binary aware (you can select the architecture you&#8217;re interested in in the top left corner) Displays imported exported symbols filter for library name or imported symbol name.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boga.wordpress.com&amp;blog=69553&amp;post=10&amp;subd=boga&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just <a href="http://prdownloads.sourceforge.net/machoviewer/MachOViewer-1.0.a0.dmg?download">relased</a> the first MachOViewer alpha.</p>
<p>Features:</p>
<ol>
<li>Opens Frameworks, Bundles, Applications</li>
<li>Displays used libraries, can open used library by double clicking it&#8217;s name</li>
<li>Universal Binary aware (you can select the architecture you&#8217;re interested in in the top left corner)</li>
<li>Displays imported exported symbols filter for library name or imported symbol name.</li>
</ol>
<p><a title="machoviewer_10a0" href="http://boga.files.wordpress.com/machoviewer_10a0.png"><img alt="machoviewer_10a0" src="http://boga.files.wordpress.com/machoviewer_10a0.thumbnail.png?w=450" /></a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/boga.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/boga.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/boga.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/boga.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/boga.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/boga.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/boga.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/boga.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/boga.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/boga.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/boga.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/boga.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/boga.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/boga.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/boga.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/boga.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boga.wordpress.com&amp;blog=69553&amp;post=10&amp;subd=boga&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://boga.wordpress.com/2006/01/15/first-machoviewer-release-10a0/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62f96fb3975d866250b6a7b8f00264d4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">boga</media:title>
		</media:content>

		<media:content url="http://boga.files.wordpress.com/machoviewer_10a0.thumbnail.png" medium="image">
			<media:title type="html">machoviewer_10a0</media:title>
		</media:content>
	</item>
		<item>
		<title>OSX: dumping LaunchServices database</title>
		<link>http://boga.wordpress.com/2006/01/15/osx-dumping-launchservices-database/</link>
		<comments>http://boga.wordpress.com/2006/01/15/osx-dumping-launchservices-database/#comments</comments>
		<pubDate>Sun, 15 Jan 2006 11:11:49 +0000</pubDate>
		<dc:creator>boga</dc:creator>
				<category><![CDATA[Mac development]]></category>

		<guid isPermaLink="false">http://boga.wordpress.com/2006/01/15/osx-dumping-launchservices-database/</guid>
		<description><![CDATA[How to dump &#38; interpret the contents of the LaunchServices database You shall use the lsregister command:/System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServices.framework/Versions/Current/Support/lsregister Examples: cd /System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServices.framework/Versions/Current/Support/ lsregister local -dump Related links http://www.kernelthread.com/mac/apme/security/url.html http://www.macosxhints.com/article.php?story=20031215144430486<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boga.wordpress.com&amp;blog=69553&amp;post=5&amp;subd=boga&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div><font face="Helvetica">How to dump &amp; interpret the contents of the LaunchServices database</font></div>
<div><font face="Helvetica">You shall use the lsregister command:</font><font face="Helvetica">/System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServices.framework/Versions/Current/Support/lsregister</font></p>
<p><font face="Helvetica">Examples:</font><br />
<font face="Helvetica">cd /System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServices.framework/Versions/Current/Support/</font><br />
<font face="Helvetica">lsregister local -dump</font></p>
<p><font face="Helvetica">Related links</font><br />
<a href="http://www.kernelthread.com/mac/apme/security/url.html"><font face="Helvetica">http://www.kernelthread.com/mac/apme/security/url.html</font></a><br />
<a href="http://www.macosxhints.com/article.php?story=20031215144430486"><font face="Helvetica">http://www.macosxhints.com/article.php?story=20031215144430486</font></a></div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/boga.wordpress.com/5/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/boga.wordpress.com/5/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/boga.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/boga.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/boga.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/boga.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/boga.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/boga.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/boga.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/boga.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/boga.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/boga.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/boga.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/boga.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/boga.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/boga.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boga.wordpress.com&amp;blog=69553&amp;post=5&amp;subd=boga&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://boga.wordpress.com/2006/01/15/osx-dumping-launchservices-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62f96fb3975d866250b6a7b8f00264d4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">boga</media:title>
		</media:content>
	</item>
		<item>
		<title>operator::new[] overflow bug and Mac compilers</title>
		<link>http://boga.wordpress.com/2006/01/15/operatornew-overflow-bug-and-mac-compilers/</link>
		<comments>http://boga.wordpress.com/2006/01/15/operatornew-overflow-bug-and-mac-compilers/#comments</comments>
		<pubDate>Sun, 15 Jan 2006 09:49:28 +0000</pubDate>
		<dc:creator>boga</dc:creator>
				<category><![CDATA[C++ development]]></category>
		<category><![CDATA[Software development]]></category>

		<guid isPermaLink="false">http://boga.wordpress.com/2006/01/15/operatornew-overflow-bug-and-mac-compilers/</guid>
		<description><![CDATA[There’s a bug in the code generated operator new[] which causes potential overflow in VS C++ 2003 or previous versions. This seems to be fixed in VS C++ 2005. What about CodeWarrior and XCode (GCC 4.0): Testcode: struct Large { public: char data[256*256]; }; void testlargeallloc(long num) { try { Large* large = new Large[num] [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boga.wordpress.com&amp;blog=69553&amp;post=4&amp;subd=boga&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There’s a bug in the code generated operator new[] which causes potential overflow in <a href="http://blogs.msdn.com/oldnewthing/archive/2004/01/29/64389.aspx">VS C++ 2003 or previous versions</a>. This seems to be <a href="http://blogs.msdn.com/michael_howard/archive/2005/12/06/500629.aspx">fixed</a> in VS C++ 2005. What about CodeWarrior and XCode (GCC 4.0):</p>
<p>Testcode:<br />
struct Large {<br />
public:<br />
char data[256*256];<br />
};</p>
<p>void testlargeallloc(long num)<br />
{<br />
try {<br />
Large* large = new Large[num] ();<br />
for (int i = 0; i   rlwinm    r0,r0,16,0,15<br />
0x0000daac    mr    r3,r0<br />
0x0000dab0    bl    0xde80</p>
<p>The effect is a bit different from pre 2005 VisualC++ where the code crashes in new. Here the program crashes when trying to access the elements.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/boga.wordpress.com/4/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/boga.wordpress.com/4/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/boga.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/boga.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/boga.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/boga.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/boga.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/boga.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/boga.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/boga.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/boga.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/boga.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/boga.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/boga.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/boga.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/boga.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boga.wordpress.com&amp;blog=69553&amp;post=4&amp;subd=boga&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://boga.wordpress.com/2006/01/15/operatornew-overflow-bug-and-mac-compilers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62f96fb3975d866250b6a7b8f00264d4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">boga</media:title>
		</media:content>
	</item>
	</channel>
</rss>
