<?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/"
	>

<channel>
	<title>گنجه &#187; نرم‌افزار آزاد</title>
	<atom:link href="http://blog.ebrahim.ir/tag/free-software/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ebrahim.ir</link>
	<description># tail -f /var/log/experience</description>
	<lastBuildDate>Wed, 25 Aug 2010 22:16:39 +0000</lastBuildDate>
	<language>fa</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>اندر کرامات حضرت دبیَن</title>
		<link>http://blog.ebrahim.ir/1387/11/about-magneficence-of-the-great-debian/</link>
		<comments>http://blog.ebrahim.ir/1387/11/about-magneficence-of-the-great-debian/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 06:37:15 +0000</pubDate>
		<dc:creator>ابراهیم</dc:creator>
				<category><![CDATA[رایانه]]></category>
		<category><![CDATA[APT]]></category>
		<category><![CDATA[Darwin]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Hurd]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[NetBSD]]></category>
		<category><![CDATA[Nexenta]]></category>
		<category><![CDATA[OpenSolaris]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[VirtualBox]]></category>
		<category><![CDATA[ZFS]]></category>
		<category><![CDATA[ابزار]]></category>
		<category><![CDATA[تحریم]]></category>
		<category><![CDATA[سامانهٔ عامل]]></category>
		<category><![CDATA[سامانهٔ پرونده]]></category>
		<category><![CDATA[لینوکس]]></category>
		<category><![CDATA[نرم‌افزار آزاد]]></category>

		<guid isPermaLink="false">http://blog.ebrahim.ir/?p=171</guid>
		<description><![CDATA[دبیَن0 سامانهٔ عامل1 محبوب من هست. موج زدن روح آزادی نرم‌افزار رو توی دبین حس می‌کنم. بخش عظیمی از همهٔ نرم‌افزارهای آزاد دنیا رو می‌شه توی مخزن2های دبین، آمادهٔ نصب پیدا کرد؛ الان حدود ۲۰۰۰۰ تا بسته3 در مخازن رسمی4 هست. سامانهٔ مدیریت بسته‌هاش5، به نام APT (مخفف «ابزار بسته‌بندی پیش‌رفته»6)، بسیار تمیز و خوش‌دست [...]]]></description>
			<content:encoded><![CDATA[<p><!--startnum=0--></p>
<p><a href="http://www.debian.org/">دبیَن</a><sup><a href="http://blog.ebrahim.ir/1387/11/about-magneficence-of-the-great-debian/#footnote_0_171" id="identifier_0_171" class="footnote-link footnote-identifier-link" title="Debian">0</a></sup> سامانهٔ عامل<sup><a href="http://blog.ebrahim.ir/1387/11/about-magneficence-of-the-great-debian/#footnote_1_171" id="identifier_1_171" class="footnote-link footnote-identifier-link" title="Operating System">1</a></sup> محبوب من هست.</p>
<p>موج زدن روح آزادی نرم‌افزار رو توی دبین حس می‌کنم.</p>
<p>بخش عظیمی از همهٔ نرم‌افزارهای آزاد دنیا رو می‌شه توی مخزن<sup><a href="http://blog.ebrahim.ir/1387/11/about-magneficence-of-the-great-debian/#footnote_2_171" id="identifier_2_171" class="footnote-link footnote-identifier-link" title="Repository">2</a></sup>های دبین، آمادهٔ نصب پیدا کرد؛ الان حدود ۲۰۰۰۰ تا بسته<sup><a href="http://blog.ebrahim.ir/1387/11/about-magneficence-of-the-great-debian/#footnote_3_171" id="identifier_3_171" class="footnote-link footnote-identifier-link" title="Package">3</a></sup> در مخازن رسمی<sup><a href="http://blog.ebrahim.ir/1387/11/about-magneficence-of-the-great-debian/#footnote_4_171" id="identifier_4_171" class="footnote-link footnote-identifier-link" title="Official">4</a></sup> هست.</p>
<p>سامانهٔ مدیریت بسته‌هاش<sup><a href="http://blog.ebrahim.ir/1387/11/about-magneficence-of-the-great-debian/#footnote_5_171" id="identifier_5_171" class="footnote-link footnote-identifier-link" title="Package Management">5</a></sup>، به نام <a href="http://en.wikipedia.org/wiki/Advanced_Packaging_Tool">APT</a> (مخفف «ابزار بسته‌بندی پیش‌رفته»<sup><a href="http://blog.ebrahim.ir/1387/11/about-magneficence-of-the-great-debian/#footnote_6_171" id="identifier_6_171" class="footnote-link footnote-identifier-link" title="Advanced Packaging Tool">6</a></sup>)، بسیار تمیز و خوش‌دست هست.</p>
<p>اگر سامانه‌ای حقیقتاً پایدار<sup><a href="http://blog.ebrahim.ir/1387/11/about-magneficence-of-the-great-debian/#footnote_7_171" id="identifier_7_171" class="footnote-link footnote-identifier-link" title="Stable">7</a></sup> بخوام، دبین stable رو نصب می‌کنم. اگر پایداری برام کم‌تر از به‌روز<sup><a href="http://blog.ebrahim.ir/1387/11/about-magneficence-of-the-great-debian/#footnote_8_171" id="identifier_8_171" class="footnote-link footnote-identifier-link" title="Up-to-date">8</a></sup> بودن نرم‌افزارها مهم باشه (مثلاً برای رایانهٔ منزل)، دبین unstable + experimental رو نصب می‌کنم. اگر روی سامانهٔ پایدارم آخرین نسخهٔ بسته‌های خاصی رو بخوام هم به سادگی می‌تونم بسته‌های deb رو جدا بگیرم و نصب کنم، یا با تنظیم ‎/etc/apt/preferences کار رو به دست استاد APT بسپارم (به man apt_preferences مراجعه کنید).</p>
<p>قبل از این که خبر انتشار KDE 4.2 توی پایگاه رسمی KDE اعلام بشه، بسته‌های KDE 4.2 توی مخزن دبین experimental بود و داشتم نصبش می‌کردم!</p>
<p>نرم‌افزارهای دوست‌داشتنی‌ای مثل <a href="http://www.virtualbox.org/">VirtualBox</a> رو که هم ویرایش آزاد دارند، و هم ویرایش غیرآزاد، و البته گاهی در پایگاه<sup><a href="http://blog.ebrahim.ir/1387/11/about-magneficence-of-the-great-debian/#footnote_9_171" id="identifier_9_171" class="footnote-link footnote-identifier-link" title="Site">9</a></sup> رسمیشون ایران عزیز رو تحریم کرده‌اند، از مخازن دبین به راحتی نصب می‌کنم بدون این که نگران تحریم و یا آلوده شدن رایانه‌ام به نسخهٔ غیرآزادشون باشم. همهٔ نرم‌افزارهای بخش<sup><a href="http://blog.ebrahim.ir/1387/11/about-magneficence-of-the-great-debian/#footnote_10_171" id="identifier_10_171" class="footnote-link footnote-identifier-link" title="Section">10</a></sup> main، آزاد هستند و به هیچ نرم‌افزار غیرآزادی وابستگی<sup><a href="http://blog.ebrahim.ir/1387/11/about-magneficence-of-the-great-debian/#footnote_11_171" id="identifier_11_171" class="footnote-link footnote-identifier-link" title="Dependency">11</a></sup> ندارند.</p>
<p>بعضی نرم‌افزارهای غیرآزاد مثل افزونهٔ<sup><a href="http://blog.ebrahim.ir/1387/11/about-magneficence-of-the-great-debian/#footnote_12_171" id="identifier_12_171" class="footnote-link footnote-identifier-link" title="Plugin">12</a></sup> Flash، که ناچار از استفاده‌شون هستم رو می‌تونم بدون به هم زدن یک‌پارچگی سامانه‌ام نصب کنم. بخش‌های contrib و non-free حاوی بعضی از نرم‌افزارهای غیرآزاد پراستفاده هستند.</p>
<p>یادم نره بگم که دبین برای تعداد زیادی معماری<sup><a href="http://blog.ebrahim.ir/1387/11/about-magneficence-of-the-great-debian/#footnote_13_171" id="identifier_13_171" class="footnote-link footnote-identifier-link" title="Architecture">13</a></sup> مختلف رایانه وجود داره. از x86 و AMD64 بگیر تا MIPS و ARM و PowerPC و SPARC و Alpha و &#8230; (برای فهرست کاملش http://www.debian.org/ports/‎ رو ببینید)</p>
<p>با دبین به هستهٔ لینوکس<sup><a href="http://blog.ebrahim.ir/1387/11/about-magneficence-of-the-great-debian/#footnote_14_171" id="identifier_14_171" class="footnote-link footnote-identifier-link" title="Linux">14</a></sup> محدود نیستم؛ می‌شه دبین رو با هستهٔ<sup><a href="http://blog.ebrahim.ir/1387/11/about-magneficence-of-the-great-debian/#footnote_15_171" id="identifier_15_171" class="footnote-link footnote-identifier-link" title="Kernel">15</a></sup> FreeBSD<sup><a href="http://blog.ebrahim.ir/1387/11/about-magneficence-of-the-great-debian/#footnote_16_171" id="identifier_16_171" class="footnote-link footnote-identifier-link" title="Debian GNU/kFreeBSD">16</a></sup> یا NetBSD<sup><a href="http://blog.ebrahim.ir/1387/11/about-magneficence-of-the-great-debian/#footnote_17_171" id="identifier_17_171" class="footnote-link footnote-identifier-link" title="Debian GNU/NetBSD">17</a></sup> یا Hurd<sup><a href="http://blog.ebrahim.ir/1387/11/about-magneficence-of-the-great-debian/#footnote_18_171" id="identifier_18_171" class="footnote-link footnote-identifier-link" title="Debian GNU/Hurd">18</a></sup> یا OpenSolaris<sup><a href="http://blog.ebrahim.ir/1387/11/about-magneficence-of-the-great-debian/#footnote_19_171" id="identifier_19_171" class="footnote-link footnote-identifier-link" title="Nexenta">19</a></sup> یا حتی<sup><a href="http://blog.ebrahim.ir/1387/11/about-magneficence-of-the-great-debian/#footnote_20_171" id="identifier_20_171" class="footnote-link footnote-identifier-link" title="GNU-Darwin">20</a></sup> Darwin/XNU (هستهٔ Mac OS X) استفاده کرد! شما رو نمی‌دونم، ولی این برای من خیلی مهم و هم‌چنین خیلی هیجان‌انگیزه! مثلاً به این فکر کنید که می‌تونید توی محیط آشنا و دوست‌داشتنی دبین، به کامل‌ترین پیاده‌سازی سامانهٔ پروندهٔ<sup><a href="http://blog.ebrahim.ir/1387/11/about-magneficence-of-the-great-debian/#footnote_21_171" id="identifier_21_171" class="footnote-link footnote-identifier-link" title="File System">21</a></sup> قدرت‌مند <a href="http://en.wikipedia.org/wiki/ZFS">ZFS</a> که توی OpenSolaris هست دست‌رسی داشته باشید.</p>
<p>راستی یادمون نره که اوبونتو<sup><a href="http://blog.ebrahim.ir/1387/11/about-magneficence-of-the-great-debian/#footnote_22_171" id="identifier_22_171" class="footnote-link footnote-identifier-link" title="Ubuntu">22</a></sup> بچهٔ دبین هست.</p>
<p>این‌جوری‌هاست که بهش می‌گم حضرت دبین!</p>
<ol start="0" class="footnotes"><li id="footnote_0_171" class="footnote">Debian</li><li id="footnote_1_171" class="footnote">Operating System</li><li id="footnote_2_171" class="footnote">Repository</li><li id="footnote_3_171" class="footnote">Package</li><li id="footnote_4_171" class="footnote">Official</li><li id="footnote_5_171" class="footnote">Package Management</li><li id="footnote_6_171" class="footnote">Advanced Packaging Tool</li><li id="footnote_7_171" class="footnote">Stable</li><li id="footnote_8_171" class="footnote">Up-to-date</li><li id="footnote_9_171" class="footnote">Site</li><li id="footnote_10_171" class="footnote">Section</li><li id="footnote_11_171" class="footnote">Dependency</li><li id="footnote_12_171" class="footnote">Plugin</li><li id="footnote_13_171" class="footnote">Architecture</li><li id="footnote_14_171" class="footnote">Linux</li><li id="footnote_15_171" class="footnote">Kernel</li><li id="footnote_16_171" class="footnote"><a href="http://www.debian.org/ports/kfreebsd-gnu/">Debian GNU/kFreeBSD</a></li><li id="footnote_17_171" class="footnote"><a href="http://www.debian.org/ports/netbsd/">Debian GNU/NetBSD</a></li><li id="footnote_18_171" class="footnote"><a href="http://www.debian.org/ports/hurd/">Debian GNU/Hurd</a></li><li id="footnote_19_171" class="footnote"><a href="http://www.nexenta.org/">Nexenta</a></li><li id="footnote_20_171" class="footnote"><a href="http://proclus.gnu-darwin.org/debian.html">GNU-Darwin</a></li><li id="footnote_21_171" class="footnote">File System</li><li id="footnote_22_171" class="footnote">Ubuntu</li></ol>]]></content:encoded>
			<wfw:commentRss>http://blog.ebrahim.ir/1387/11/about-magneficence-of-the-great-debian/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>میمون چرب؛ دوست روباه آتشین</title>
		<link>http://blog.ebrahim.ir/1387/09/grease-monkey-a-friend-of-fire-fox/</link>
		<comments>http://blog.ebrahim.ir/1387/09/grease-monkey-a-friend-of-fire-fox/#comments</comments>
		<pubDate>Sat, 13 Dec 2008 22:50:36 +0000</pubDate>
		<dc:creator>ابراهیم</dc:creator>
				<category><![CDATA[رایانه]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Greasemonkey]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[ابزار]]></category>
		<category><![CDATA[برنامه‌نویسی]]></category>
		<category><![CDATA[تار]]></category>
		<category><![CDATA[دست‌نوشته]]></category>
		<category><![CDATA[فارسی]]></category>
		<category><![CDATA[مرورگر]]></category>
		<category><![CDATA[نرم‌افزار آزاد]]></category>

		<guid isPermaLink="false">http://blog.ebrahim.ir/?p=123</guid>
		<description><![CDATA[از وقتی با Greasemonkey آشنا شده‌ام توقعم از تار1 خیلی بالا رفته. با این افزونهٔ Firefox می‌شه در طرف مخدوم2، به هر صفحه‌ای کدهای JavaScript دل‌خواه رو اضافه کرد. علاوه بر کلی دست‌نوشتهٔ3 آماده که توی http://userscripts.org براش وجود داره، خودمون هم می‌تونیم به راحتی براش دست‌نوشته بنویسیم. حالا اگر قدرت JavaScript رو بیاری تو [...]]]></description>
			<content:encoded><![CDATA[<p>از وقتی با <a href="https://addons.mozilla.org/firefox/748/">Greasemonkey</a> آشنا شده‌ام توقعم از تار<sup><a href="http://blog.ebrahim.ir/1387/09/grease-monkey-a-friend-of-fire-fox/#footnote_0_123" id="identifier_0_123" class="footnote-link footnote-identifier-link" title="Web">1</a></sup> خیلی بالا رفته.</p>
<p>با این افزونهٔ Firefox می‌شه در طرف مخدوم<sup><a href="http://blog.ebrahim.ir/1387/09/grease-monkey-a-friend-of-fire-fox/#footnote_1_123" id="identifier_1_123" class="footnote-link footnote-identifier-link" title="Client Side">2</a></sup>، به هر صفحه‌ای کدهای JavaScript دل‌خواه رو اضافه کرد. علاوه بر کلی دست‌نوشتهٔ<sup><a href="http://blog.ebrahim.ir/1387/09/grease-monkey-a-friend-of-fire-fox/#footnote_2_123" id="identifier_2_123" class="footnote-link footnote-identifier-link" title="Script">3</a></sup> آماده که توی <a href="http://userscripts.org/">http://userscripts.org</a> براش وجود داره، خودمون هم می‌تونیم به راحتی براش دست‌نوشته بنویسیم. حالا اگر قدرت JavaScript رو بیاری تو ذهنت می‌بینی که چه کارها می‌شه به کمک این میمون چرب (!) کرد.</p>
<p>برای شروع ماجراجویی، کمی از <a href="http://diveintogreasemonkey.org/">http://diveintogreasemonkey.org</a> رو خوندم. نقطهٔ شروع بسیار خوبی بود.</p>
<p>یک دست‌نوشته به نام <a href="http://userscripts.org/scripts/show/38610">فارسنده یا Persianizer</a> که به شیوهٔ بِکَن-بچسبون<sup><a href="http://blog.ebrahim.ir/1387/09/grease-monkey-a-friend-of-fire-fox/#footnote_3_123" id="identifier_3_123" class="footnote-link footnote-identifier-link" title="Copy-Paste">4</a></sup> ساخته‌ام، همهٔ رقم‌های انگلیسی و «ي» و «ك»های عربی توی صفحهٔ بارگذاری شده رو به معادل فارسیشون تبدیل می‌کنه. بس که اون صفحه‌های فارسی پر از «ي» حالم رو بد می‌کنه! فقط موقع استفاده حواست باشه پایگاه‌هایی که قراره فارسنده روشون کار بکنه رو خوب انتخاب کنی؛ پیش‌فرض‌هاش خوب نیستند.</p>
<p>البته یکی از شرایط من (و خیلی‌های دیگر) برای استفاده از یک فن‌آوری، انحصاری نبودنش هست که خوش‌بختانه افزونه‌هایی سازگار با Greasemonkey برای مرورگرهای مهم دیگه (از جمله Konqueror) هم وجود داره.</p>
<p>نکتهٔ پایانی این که اگر کاربر Greasemonkey باشی، افزونهٔ <a href="https://addons.mozilla.org/firefox/addon/8352">Greasefire</a> هم احتمالاً برات جالب هست.</p>
<p>این هم فهرست دست‌نوشته‌های محبوب من:<br />
<a href="http://userscripts.org/users/73214/favorites">http://userscripts.org/users/73214/favorites</a></p>
<ol class="footnotes"><li id="footnote_0_123" class="footnote">Web</li><li id="footnote_1_123" class="footnote">Client Side</li><li id="footnote_2_123" class="footnote">Script</li><li id="footnote_3_123" class="footnote">Copy-Paste</li></ol>]]></content:encoded>
			<wfw:commentRss>http://blog.ebrahim.ir/1387/09/grease-monkey-a-friend-of-fire-fox/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>از پیغام‌های خطای STL نجات یافتم</title>
		<link>http://blog.ebrahim.ir/1387/09/got-rid-of-stl-error-messages/</link>
		<comments>http://blog.ebrahim.ir/1387/09/got-rid-of-stl-error-messages/#comments</comments>
		<pubDate>Sat, 22 Nov 2008 21:51:30 +0000</pubDate>
		<dc:creator>ابراهیم</dc:creator>
				<category><![CDATA[رایانه]]></category>
		<category><![CDATA[BASH]]></category>
		<category><![CDATA[C++‎]]></category>
		<category><![CDATA[STL]]></category>
		<category><![CDATA[ابزار]]></category>
		<category><![CDATA[برنامه‌نویسی]]></category>
		<category><![CDATA[دست‌نوشته]]></category>
		<category><![CDATA[نرم‌افزار آزاد]]></category>
		<category><![CDATA[هم‌گردان]]></category>

		<guid isPermaLink="false">http://blog.ebrahim.ir/?p=70</guid>
		<description><![CDATA[اگر برنامه‌نویس C++‎ باشی، حتماً تا حالا مورد آزار و اذیت پیغام‌های خطای سرسام‌آور هم‌گردان0 در مورد STL قرار گرفته‌ای. مثلاً این: testmm2.cpp:31: error: no matching function for call to ‘std::multimap&#60;int*, int, std::less&#60;int*&#62;, std::allocator&#60;std::pair&#60;int* const, int&#62; &#62; &#62;::insert(int)’ /usr/include/c++/4.3/bits/stl_multimap.h:407: note: candidates are: typename std::_Rb_tree&#60;_Key, std::pair&#60;const _Key, _Tp&#62;, std::_Select1st&#60;std::pair&#60;const_Key, _Tp&#62; &#62;, _Compare, typename _Alloc::rebind&#60;std::pair&#60;const _Key, _Tp&#62; [...]]]></description>
			<content:encoded><![CDATA[<p><!--startnum=0--></p>
<p>اگر برنامه‌نویس C++‎ باشی، حتماً تا حالا مورد آزار و اذیت پیغام‌های خطای سرسام‌آور هم‌گردان<sup><a href="http://blog.ebrahim.ir/1387/09/got-rid-of-stl-error-messages/#footnote_0_70" id="identifier_0_70" class="footnote-link footnote-identifier-link" title="Compiler">0</a></sup> در مورد STL قرار گرفته‌ای. مثلاً این:</p>

<div class="wp_syntax" dir="ltr"><div class="code"><pre class="none" style="font-family:monospace;">testmm2.cpp:31: error: no matching function for call to ‘std::multimap&lt;int*, int, std::less&lt;int*&gt;, std::allocator&lt;std::pair&lt;int* const, int&gt; &gt; &gt;::insert(int)’
/usr/include/c++/4.3/bits/stl_multimap.h:407: note: candidates are: typename std::_Rb_tree&lt;_Key, std::pair&lt;const _Key, _Tp&gt;, std::_Select1st&lt;std::pair&lt;const_Key, _Tp&gt; &gt;, _Compare, typename _Alloc::rebind&lt;std::pair&lt;const _Key, _Tp&gt; &gt;::other&gt;::iterator std::multimap&lt;_Key, _Tp, _Compare, _Alloc&gt;::insert(const std::pair&lt;const _Key, _Tp&gt;&amp;) [with _Key = int*, _Tp = int, _Compare = std::less&lt;int*&gt;, _Alloc = std::allocator&lt;std::pair&lt;int* const, int&gt; &gt;]
/usr/include/c++/4.3/bits/stl_multimap.h:431: note:                 typename std::_Rb_tree&lt;_Key, std::pair&lt;const _Key, _Tp&gt;, std::_Select1st&lt;std::pair&lt;const _Key, _Tp&gt; &gt;, _Compare, typename _Alloc::rebind&lt;std::pair&lt;const _Key, _Tp&gt; &gt;::other&gt;::iterator std::multimap&lt;_Key, _Tp, _Compare, _Alloc&gt;::insert(typename std::_Rb_tree&lt;_Key, std::pair&lt;const _Key, _Tp&gt;, std::_Select1st&lt;std::pair&lt;const _Key, _Tp&gt; &gt;, _Compare, typename _Alloc::rebind&lt;std::pair&lt;const _Key, _Tp&gt; &gt;::other&gt;::iterator, const std::pair&lt;const _Key, _Tp&gt;&amp;) [with _Key = int*, _Tp = int, _Compare = std::less&lt;int*&gt;, _Alloc = std::allocator&lt;std::pair&lt;int* const, int&gt; &gt;]</pre></div></div>

<p>‎<br />
حالا این یکی بود. وقتی ده-پونزده تا از این‌ها یک‌جا رخ می‌ده، خیلی افتضاح می‌شه.</p>
<p>مدت‌ها با این مشکل کنار اومده بودم و دردش رو تحمل می‌کردم. اما اخیراً یک راه نجات یافتم: ابزاری  به نام <a href="http://www.bdsoft.com/tools/stlfilt.html">STLFilt</a>. یک نرم‌افزار آزاد هست که خروجی هم‌گردان C++‎ رو می‌گیره و اون پیغام‌های وحشت‌ناک رو مهربون می‌کنه. مثلاً پیغام بالا رو تبدیل می‌کنه به این:</p>

<div class="wp_syntax" dir="ltr"><div class="code"><pre class="none" style="font-family:monospace;">testmm2.cpp:31: error: No match for ‘multimap&lt;int *, int&gt;::insert(int)’
stl_multimap.h:407: candidates are: map&lt;int *, int&gt;::iter multimap&lt;int *, int&gt;
    ::insert(const pair&lt;const int *, int&gt; &amp;)
stl_multimap.h:431: map&lt;
        int *, int
    &gt;::iter multimap&lt;
        int *, int
    &gt;::insert(map&lt;int *, int&gt;::iter, const pair&lt;const int *, int&gt; &amp;)</pre></div></div>

<p>آخش! حالا می‌شه خوندش!</p>
<p>برای استفاده از STLFilt اول باید بستهٔ مربوط به هم‌گردانت رو بگیری. مثلاً gstlfilt.zip برای G++‎. توش کلی پرونده هست که همه رو بی‌خیال می‌شی به جز gSTLFilt.pl که اصل کار رو انجام می‌ده. از stdin می‌خونه و توی stdout می‌نویسه. کاری که من کردم این بود<sup><a href="http://blog.ebrahim.ir/1387/09/got-rid-of-stl-error-messages/#footnote_1_70" id="identifier_1_70" class="footnote-link footnote-identifier-link" title="مثل همیشه نقل به مضمون و آزمایش&zwnj;نشده">1</a></sup>:</p>

<div class="wp_syntax" dir="ltr"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">su</span>
<span style="color: #007800;">F</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>stlfilt.pl
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'#!/usr/bin/perl'</span> <span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #007800;">$F</span>
<span style="color: #c20cb9; font-weight: bold;">cat</span> gSTLFilt.pl <span style="color: #000000; font-weight: bold;">&gt;&gt;</span><span style="color: #007800;">$F</span>
<span style="color: #c20cb9; font-weight: bold;">chmod</span> +x <span style="color: #007800;">$F</span></pre></div></div>

<p>و برای استفاده:</p>

<div class="wp_syntax" dir="ltr"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">|</span> stlfilt.pl</pre></div></div>

<p>برای این که هر بار نخوام stderr دستور ساخت<sup><a href="http://blog.ebrahim.ir/1387/09/got-rid-of-stl-error-messages/#footnote_2_70" id="identifier_2_70" class="footnote-link footnote-identifier-link" title="Build">2</a></sup> (مثلاً make)  رو به stdoutش redirect<sup><a href="http://blog.ebrahim.ir/1387/09/got-rid-of-stl-error-messages/#footnote_3_70" id="identifier_3_70" class="footnote-link footnote-identifier-link" title="معادل خوبی براش داری بگو">3</a></sup> کنم، دست‌نوشتهٔ<sup><a href="http://blog.ebrahim.ir/1387/09/got-rid-of-stl-error-messages/#footnote_4_70" id="identifier_4_70" class="footnote-link footnote-identifier-link" title="Script">4</a></sup> <code>/usr/local/bin/stlfilt</code> رو با این محتوا ساختم:</p>

<div class="wp_syntax" dir="ltr"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #ff0000;">&quot;$@&quot;</span> <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">|</span> stlfilt.pl</pre></div></div>

<p>و <code>chmod +x</code> هم یادم نره. <img src='http://blog.ebrahim.ir/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
حالا این‌جوری استفاده می‌شه:</p>

<div class="wp_syntax" dir="ltr"><div class="code"><pre class="bash" style="font-family:monospace;">stlfilt <span style="color: #c20cb9; font-weight: bold;">make</span></pre></div></div>

<p>با دست‌نوشته‌ها زندگی زیباتره! <img src='http://blog.ebrahim.ir/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>ویرایش: امید آن می‌رود که با معرفی «مفهوم»<sup><a href="http://blog.ebrahim.ir/1387/09/got-rid-of-stl-error-messages/#footnote_5_70" id="identifier_5_70" class="footnote-link footnote-identifier-link" title="Concept">5</a></sup>ها در C++0x (به زودی!) کل مشکل از بیخ حل بشه و دیگه نیازی به ابزار اضافی نباشه.</p>
<ol start="0" class="footnotes"><li id="footnote_0_70" class="footnote">Compiler</li><li id="footnote_1_70" class="footnote">مثل همیشه نقل به مضمون و آزمایش‌نشده</li><li id="footnote_2_70" class="footnote">Build</li><li id="footnote_3_70" class="footnote">معادل خوبی براش داری بگو</li><li id="footnote_4_70" class="footnote">Script</li><li id="footnote_5_70" class="footnote">Concept</li></ol>]]></content:encoded>
			<wfw:commentRss>http://blog.ebrahim.ir/1387/09/got-rid-of-stl-error-messages/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)

Served from: blog.ebrahim.ir @ 2012-02-07 00:30:02 -->
