<?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>Pistachio Brainstorming</title>
	<atom:link href="http://blog.acamara.es/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.acamara.es</link>
	<description>Ideas about programming and game developing</description>
	<lastBuildDate>Wed, 30 May 2012 22:08:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.acamara.es' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Pistachio Brainstorming</title>
		<link>http://blog.acamara.es</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.acamara.es/osd.xml" title="Pistachio Brainstorming" />
	<atom:link rel='hub' href='http://blog.acamara.es/?pushpress=hub'/>
		<item>
		<title>Donde vamos a llegar con TTs como #hijostrospidos</title>
		<link>http://blog.acamara.es/2012/02/07/donde-vamos-a-llegar-con-tts-como-hijostrospidos/</link>
		<comments>http://blog.acamara.es/2012/02/07/donde-vamos-a-llegar-con-tts-como-hijostrospidos/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 15:06:18 +0000</pubDate>
		<dc:creator>soy_yuma</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[#hijostrospidos]]></category>
		<category><![CDATA[Spanish]]></category>
		<category><![CDATA[TV]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://blog.acamara.es/?p=744</guid>
		<description><![CDATA[#hijostrospidos fue un trending topic de Twitter para criticar el programa de Cuatro &#8220;¿Quién quiere casarse con mi hijo?&#8221;. Con permiso (implícito) de XKCD.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.acamara.es&#038;blog=14377330&#038;post=744&#038;subd=cparcial&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://cparcial.files.wordpress.com/2012/02/twitter-rosa.png"><img class="aligncenter size-full wp-image-745" title="twitter-rosa" src="http://cparcial.files.wordpress.com/2012/02/twitter-rosa.png?w=600&h=480" alt="" width="600" height="480" /></a></p>
<p>#hijostrospidos fue un <em>trending topic</em> de Twitter para criticar el programa de Cuatro &#8220;¿Quién quiere casarse con mi hijo?&#8221;. Con permiso (implícito) de <a href="http://xkcd.com/" target="_blank">XKCD</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cparcial.wordpress.com/744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cparcial.wordpress.com/744/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cparcial.wordpress.com/744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cparcial.wordpress.com/744/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cparcial.wordpress.com/744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cparcial.wordpress.com/744/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cparcial.wordpress.com/744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cparcial.wordpress.com/744/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cparcial.wordpress.com/744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cparcial.wordpress.com/744/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cparcial.wordpress.com/744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cparcial.wordpress.com/744/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cparcial.wordpress.com/744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cparcial.wordpress.com/744/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.acamara.es&#038;blog=14377330&#038;post=744&#038;subd=cparcial&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.acamara.es/2012/02/07/donde-vamos-a-llegar-con-tts-como-hijostrospidos/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9523dc1abeac0168af33bf56c7c3396e?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">es0x279e</media:title>
		</media:content>

		<media:content url="http://cparcial.files.wordpress.com/2012/02/twitter-rosa.png" medium="image">
			<media:title type="html">twitter-rosa</media:title>
		</media:content>
	</item>
		<item>
		<title>Keep screen aspect ratio with different resolutions using libGDX</title>
		<link>http://blog.acamara.es/2012/02/05/keep-screen-aspect-ratio-with-different-resolutions-using-libgdx/</link>
		<comments>http://blog.acamara.es/2012/02/05/keep-screen-aspect-ratio-with-different-resolutions-using-libgdx/#comments</comments>
		<pubDate>Sun, 05 Feb 2012 20:55:19 +0000</pubDate>
		<dc:creator>soy_yuma</dc:creator>
				<category><![CDATA[Gamedev]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[libGDX]]></category>
		<category><![CDATA[LWJGL]]></category>
		<category><![CDATA[screen resolution]]></category>

		<guid isPermaLink="false">http://blog.acamara.es/?p=716</guid>
		<description><![CDATA[There&#8217;s something in that &#8220;Screen Resolution&#8221; game menu that possesses me. I&#8217;ve always fancied making a game with different screen resolutions, but the task is far from trivial. These notes are the result of a weekend spent looking for the solution (with help from the JGO community). You can download the source code from here. Problem [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.acamara.es&#038;blog=14377330&#038;post=716&#038;subd=cparcial&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s something in that &#8220;Screen Resolution&#8221; game menu that possesses me. I&#8217;ve always fancied making a game with different screen resolutions, but the task is far from trivial. These notes are the result of a weekend spent looking for the solution (with help from the <a title="libGDX, BitmapFont, and OrthographicCamera" href="http://www.java-gaming.org/topics/libgdx-bitmapfont-and-orthographiccamera/25682/view.html" target="_blank">JGO community</a>). You can download the source code from <a href="http://www.acamara.es/dl/orthocam-test.zip" target="_blank">here</a>.</p>
<h3>Problem</h3>
<p>Imagine you are developing a game and start supporting the 480&#215;320 resolution because it fits nice in your smartphone. You align the menus, place the sprites, and do some nasty hacks (that we all have done sometimes) to make your game look pretty. In the end, you have a game that has been developed, literally, <strong>for your own phone!</strong> (or phone screen resolution). It will look distorted in other phones with different screen resolutions <img src='http://s0.wp.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>What do you want to is to support multiple screen resolutions without hardcoding all the layout for every single screen resolution that exists (<a href="http://en.wikipedia.org/wiki/Computer_display_standard" target="_blank">there are lots of them</a>).</p>
<h3>(My) Solution</h3>
<p>The solution I&#8217;ve found it&#8217;s not TEH solution, but it works good enough for me.</p>
<p>I&#8217;m working with <a href="http://code.google.com/p/libgdx/" target="_blank">libGDX</a>. This library has a OrthographicCamera class (<a href="http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/OrthographicCamera.html" target="_blank">doc</a>, <a href="http://code.google.com/p/libgdx/source/browse/trunk/gdx/src/com/badlogic/gdx/graphics/OrthographicCamera.java" target="_blank">code</a>) that fits nice for 2D games. This class is responsible to 1) define the volume of the game scene (which in OpenGL argot is called <em>frustum</em>) and 2) to <a href="http://code.google.com/p/libgdx/wiki/GraphicsFundamentalsViewport" target="_blank">project it orthographically</a> into a plane: the scene image. In addition, libGDX also provides a wrapper to the OpenGL function <a href="http://www.opengl.org/sdk/docs/man/xhtml/glViewport.xml" target="_blank">glViewport()</a>, which transforms the scene image obtained with the camera class into the device screen.</p>
<p>The plan is the following:</p>
<ol>
<li>Define a <em>virtual resolution</em> to work with (align menus, place sprites, etc.).</li>
<li>Set the camera to use the virtual resolution.</li>
<li>Use glViewport() to adjust our scene image to the <em>physical resolution</em> of the device screen (keeping the aspect ratio of course).</li>
</ol>
<p>To define the virtual resolution, it is fine to define static final fields in your AplicationListener game class (I&#8217;m using libGDX argot). The camera, a Rectangle defining our viewport, and the SpriteBatch, which all of them we will be using later, are also (non-static) fields of the class.</p>
<pre><span style="color:#993300;">public class</span> MyAwesomeGame <span style="color:#993300;">implements</span> ApplicationListener
{
    <span style="color:#993300;">private static final int</span> <em><span style="color:#3366ff;">VIRTUAL_WIDTH</span></em> = 480;
    <span style="color:#993300;">private static final int</span> <em><span style="color:#3366ff;">VIRTUAL_HEIGHT</span></em> = 320;
    <span style="color:#993300;">private static final float</span> <em><span style="color:#3366ff;">ASPECT_RATIO</span></em> = (<span style="color:#993300;">float</span>)<em><span style="color:#3366ff;">VIRTUAL_WIDTH</span></em>/(<span style="color:#993300;">float</span>)<em><span style="color:#3366ff;">VIRTUAL_HEIGHT</span></em>;

    <span style="color:#993300;">private</span> Camera <span style="color:#3366ff;">camera</span>;
    <span style="color:#993300;">private</span> Rectangle <span style="color:#3366ff;">viewport</span>;
    <span style="color:#993300;">private</span> SpriteBatch <span style="color:#3366ff;">sb</span>;</pre>
<p>When our game starts, it will first execute the method create() and then resize(int, int) with the width and height of the window as input parameters. In create() we should initialize all the fields required further. In particular, we will initialize the camera and the SpriteBatch (<em>canvas</em> of each frame).</p>
<pre>    <span style="color:#999999;">@Override</span>
    <span style="color:#993300;">public void</span> create()
    {
        <span style="color:#3366ff;">sb</span> = <span style="color:#993300;">new</span> SpriteBatch();
        <span style="color:#3366ff;">camera</span> = <span style="color:#993300;">new</span> OrthographicCamera(<em><span style="color:#3366ff;">VIRTUAL_WIDTH</span></em>, <em><span style="color:#3366ff;">VIRTUAL_HEIGHT</span></em>);
    }</pre>
<p>In resize() we should setup the Rectangle that we will be using later to set the viewport. And here it is the trick. Let&#8217;s see this function slowly. First we declare and initialize some local variables.</p>
<pre>    <span style="color:#999999;">@Override</span>
    <span style="color:#993300;">public void</span> resize(<span style="color:#993300;">int</span> width, <span style="color:#993300;">int</span> height)
    {
        <span style="color:#339966;">// calculate new viewport</span>
        <span style="color:#993300;">float</span> aspectRatio = (<span style="color:#993300;">float</span>)width/(<span style="color:#993300;">float</span>)height;
        <span style="color:#993300;">float</span> scale = 1f;
        Vector2 crop = <span style="color:#993300;">new</span> Vector2(0f, 0f);</pre>
<p>They are quite intuitive, for instance, aspectRatio holds the ratio width/height of the device screen (physical resolution), scale is the factor to which scale our scene image, and crop (do not confuse with crap) is the amount of pixels to be cropped from the viewport in order to keep the aspect ratio of the scene image.</p>
<p>Now, if aspectRatio is greater than the virtual aspect ratio it is because the physical resolution is wider (proportionally) than the virtual resolution. Therefore, we should match the height of both resolutions (virtual and physical) and crop in the X direction since our virtual scene image wont fill the whole screen. Conversely, if aspectRatio is lesser than ASPECT_RATIO then we should match the width of both resolutions and crop in the Y direction.</p>
<pre>        <span style="color:#993300;">if</span>(aspectRatio &gt; ASPECT_RATIO)
        {
            scale = (<span style="color:#993300;">float</span>)height/(<span style="color:#993300;">float</span>)<em><span style="color:#3366ff;">VIRTUAL_</span><span style="color:#3366ff;">HEIGHT</span></em>;
            crop.<span style="color:#3366ff;">x</span> = (width - <em><span style="color:#3366ff;">VIRTUAL_WIDTH</span></em>*scale)/2f;
        }
        <span style="color:#993300;">else</span> <span style="color:#993300;">if</span>(aspectRatio &lt; ASPECT_RATIO)
        {
            scale = (<span style="color:#993300;">float</span>)width/(<span style="color:#993300;">float</span>)<em><span style="color:#3366ff;">VIRTUAL_WIDTH</span></em>;
            crop.<span style="color:#3366ff;">y</span> = (height - <em><span style="color:#3366ff;">VIRTUAL_HEIGHT</span></em>*scale)/2f;
        }
        <span style="color:#993300;">else</span>
        {
            scale = (<span style="color:#993300;">float</span>)width/(<span style="color:#993300;">float</span>)<em><span style="color:#3366ff;">VIRTUAL_WIDTH</span></em>;
        }

        <span style="color:#993300;">float</span> w = (<span style="color:#993300;">float</span>)<em><span style="color:#3366ff;">VIRTUAL_WIDTH</span></em>*scale;
        <span style="color:#993300;">float</span> h = (<span style="color:#993300;">float</span>)<em><span style="color:#3366ff;">VIRTUAL_HEIGHT</span></em>*scale;
        <span style="color:#3366ff;">viewport</span> = <span style="color:#993300;">new</span> Rectangle(crop.<span style="color:#3366ff;">x</span>, crop.<span style="color:#3366ff;">y</span>, w, h);
    }</pre>
<p>Finally, we just have to modify the render() method (which is used to render our scene, of course) to update the camera, set the viewport, and draw our objects/entities.</p>
<pre>    <span style="color:#999999;">@Override</span>
    <span style="color:#993300;">public void</span> render()
    {
        <span style="color:#339966;">// update camera</span>
        <span style="color:#3366ff;">camera</span>.update();
        <span style="color:#3366ff;">camera</span>.apply(Gdx.<em><span style="color:#3366ff;">gl10</span></em>);

        <span style="color:#339966;">// set viewport</span>
        Gdx.<span style="color:#3366ff;">gl</span>.glViewport((<span style="color:#993300;">int</span>) <span style="color:#3366ff;">viewport</span>.<span style="color:#3366ff;">x</span>, (<span style="color:#993300;">int</span>) <span style="color:#3366ff;">viewport</span>.<span style="color:#3366ff;">y</span>,
                          (<span style="color:#993300;">int</span>) <span style="color:#3366ff;">viewport</span>.<span style="color:#3366ff;">width</span>, (<span style="color:#993300;">int</span>) <span style="color:#3366ff;">viewport</span>.<span style="color:#3366ff;">height</span>);

        <span style="color:#339966;">// clear previous frame</span>
        Gdx.<span style="color:#3366ff;">gl</span>.glClear(GL10.<em><span style="color:#3366ff;">GL_COLOR_BUFFER_BIT</span></em>);

        <span style="color:#339966;">// DRAW EVERYTHING</span>
    }</pre>
<p>And that&#8217;s it. Let&#8217;s see it in action.</p>
<h3>Some images</h3>
<p>To illustrate this tips I&#8217;m rendering a scene that consists on two rectangles. One <span style="color:#339966;">green</span> that fills all the scene (just to know where exactly our scene image is), and one square <span style="color:#ff0000;">red<span style="color:#000000;"> just to detect visually aspect ratio violations. </span></span>We use 480&#215;320 as our virtual resolution, as our smartphone uses it natively. Therefore, in our phone we should see everything and without distortion, just as this screenshot I just took:</p>
<p><a href="http://cparcial.files.wordpress.com/2012/02/screenresolution-smarphone.png"><img class="aligncenter size-full wp-image-721" title="ScreenResolution-Smarphone" src="http://cparcial.files.wordpress.com/2012/02/screenresolution-smarphone.png?w=600" alt=""   /></a></p>
<p>Now imagine I send this awesome game to my friend @notch (any similarity with real characters/persons is fictional) which is really rich and has a smartphone with greater resolution. He will see this flawed game:</p>
<p><a href="http://cparcial.files.wordpress.com/2012/02/screenresolution-smartphone2.png"><img class="aligncenter size-full wp-image-722" title="ScreenResolution-Smartphone2" src="http://cparcial.files.wordpress.com/2012/02/screenresolution-smartphone2.png?w=600" alt=""   /></a></p>
<p>Notice that the square has been distorted into another rectangle (non-squared). My friend is loosing part of the feeling of my game! And most important, the artist that is making such awesome graphics is really pissed off&#8230;</p>
<p>Using the method of this tutorial he will just get the right game:</p>
<p><a href="http://cparcial.files.wordpress.com/2012/02/screenresolution-smartphone2fixed.png"><img class="aligncenter size-full wp-image-723" title="ScreenResolution-Smartphone2Fixed" src="http://cparcial.files.wordpress.com/2012/02/screenresolution-smartphone2fixed.png?w=600" alt=""   /></a></p>
<p>Ok, it is true. He&#8217;s not using his whole smartphone screen (btw, who told him to spend that much money in a fancy new smartphone in the first place) but at least the aspect ratio is correct and the game graphics artist is happy again.</p>
<h3>Further approximation to perfection</h3>
<p>I have discovered nothing new, but at least I won&#8217;t doubt again how to perform this tedious but mandatory task. You must know that there are, for sure, better approaches to solve the resolution problem. For instance, I just came up with the idea of having two/three versions of the game with different aspects ratios (say 4:3, 16:9, and 16:10). Then, you viewport the layout corresponding to the aspect ratio that is closer to the physical aspect ratio, and hence, minimizing the ugly black bands.</p>
<p>If you have any comment/suggestion/praise/curse, do not hesitate to leave a comment here or say something in Twitter.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cparcial.wordpress.com/716/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cparcial.wordpress.com/716/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cparcial.wordpress.com/716/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cparcial.wordpress.com/716/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cparcial.wordpress.com/716/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cparcial.wordpress.com/716/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cparcial.wordpress.com/716/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cparcial.wordpress.com/716/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cparcial.wordpress.com/716/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cparcial.wordpress.com/716/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cparcial.wordpress.com/716/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cparcial.wordpress.com/716/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cparcial.wordpress.com/716/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cparcial.wordpress.com/716/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.acamara.es&#038;blog=14377330&#038;post=716&#038;subd=cparcial&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.acamara.es/2012/02/05/keep-screen-aspect-ratio-with-different-resolutions-using-libgdx/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9523dc1abeac0168af33bf56c7c3396e?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">es0x279e</media:title>
		</media:content>

		<media:content url="http://cparcial.files.wordpress.com/2012/02/screenresolution-smarphone.png" medium="image">
			<media:title type="html">ScreenResolution-Smarphone</media:title>
		</media:content>

		<media:content url="http://cparcial.files.wordpress.com/2012/02/screenresolution-smartphone2.png" medium="image">
			<media:title type="html">ScreenResolution-Smartphone2</media:title>
		</media:content>

		<media:content url="http://cparcial.files.wordpress.com/2012/02/screenresolution-smartphone2fixed.png" medium="image">
			<media:title type="html">ScreenResolution-Smartphone2Fixed</media:title>
		</media:content>
	</item>
		<item>
		<title>Compilar Assimp 2.0 en VC++ 2010 Express</title>
		<link>http://blog.acamara.es/2011/07/19/compilar-assimp-2-0-en-vc-2010-express/</link>
		<comments>http://blog.acamara.es/2011/07/19/compilar-assimp-2-0-en-vc-2010-express/#comments</comments>
		<pubDate>Tue, 19 Jul 2011 15:22:44 +0000</pubDate>
		<dc:creator>soy_yuma</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[Spanish]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.acamara.es/?p=609</guid>
		<description><![CDATA[Assimp (a.k.a. Open Asset Import Library) son unas librerías multiplataforma y de código abierto para importar modelos 3D de diferentes formatos (MD2, MD5, COLLADA, etc.). Compilar estas librerías usando VC++ 2010 Express puede ser muy complicado si no se siguen unos pasos concretos. Satisfacer las dependencias: Boost y DirectX SDK La compilación de Assimp depende [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.acamara.es&#038;blog=14377330&#038;post=609&#038;subd=cparcial&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a title="Open Asset Import Library" href="http://assimp.sourceforge.net/" target="_blank">Assimp</a> (a.k.a. <em>Open Asset Import Library</em>) son unas librerías multiplataforma y de código abierto para importar modelos 3D de diferentes formatos (MD2, MD5, COLLADA, etc.). Compilar estas librerías usando VC++ 2010 Express puede ser muy complicado si no se siguen unos pasos concretos.</p>
<h3 style="padding-bottom:10px;">Satisfacer las dependencias: Boost y DirectX SDK</h3>
<p>La compilación de Assimp depende de las librerías <a title="Librerías Boost para C++" href="http://www.boost.org/" target="_blank">Boost</a>. Además, el visor de modelos Assimp View necesita las librerías de <a title="DirectX" href="http://msdn.microsoft.com/en-us/library/ee416796%28v=VS.85%29.aspx" target="_blank">DirectX</a> d3d9.lib y d3dx9.lib.</p>
<h4>Boost</h4>
<p>Boost se puede descargar desde su página principal de descargas (<a title="Descargas de Boost" href="http://www.boost.org/users/download/" target="_blank">aquí</a>). Simplemente habrá que descomprimir y desempaquetar la versión más reciente (a día de hoy la versión 1.47.0) en un directorio conocido. En nuestro caso utilizaremos</p>
<pre>C:\dev\boost\1.47.0</pre>
<p>y nos refereriremos a esa ruta en el resto de este tutorial como $(BOOST_PATH).</p>
<h4>DirectX SDK</h4>
<p><a title="DirectX" href="http://msdn.microsoft.com/en-us/library/ee416796%28v=VS.85%29.aspx" target="_blank">DirectX</a> son unas APIs (<em>application programming interface</em>) de Microsoft especialmente preparadas para crear juegos. El visor de Assimp View está construido utilizando dichas librerías, y por tanto, tenemos que tenerlas instaladas en el ordendor para poder compilarlo.</p>
<p>Para ello simplemente hay que descargarse el SDK (<em>software development kit</em>) más moderno de su página de descargas (<a title="Descargas de DirectX" href="http://msdn.microsoft.com/es-es/directx/aa937788.aspx" target="_blank">aquí</a>) e instalarlo haciendo doble clic. En nuestro caso es la versión de Junio 2010 y la instalamos en la ruta</p>
<pre>C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)</pre>
<p>que a partir de ahora llamaremos $(DIRECTX_PATH).</p>
<h3 style="padding-bottom:10px;">Descargar del código fuente</h3>
<p>El código fuente de Assimp se puede descargar de su página principal de descargas (<a title="Descargas de Assimp" href="http://assimp.sourceforge.net/main_downloads.html" target="_blank">aquí</a>). A día de hoy, la que nos interesa es de assimp 2.0 (de noviembre de 2010), el fichero &#8220;Any platform: ZIP archive, full source code&#8221; (no pongo enlace porque no puedo garantizar su persistencia).</p>
<h3 style="padding-bottom:10px;">Descomprimir y desempaquetar el código fuente</h3>
<p>Hay que descomprimir y desempaquetar el fichero descargado en un directorio conocido. En este caso utilizaremos</p>
<pre>C:\dev\assimp\2.0.863</pre>
<p>A partir de ahora nos refereriremos a esta ruta como $(ASSIMP_PATH). Si utilizas una ruta diferente, asegúrate de cambiar todas las demás rutas que dependan de ésta. Como comprobación adicional deberías tener los archivos INSTALL, LICENSE y README en el directorio $(ASSIMP_PATH).</p>
<h3 style="padding-bottom:10px;">Modificar los proyectos de VC9</h3>
<p>De momento Assimp soporta ser compilado por VC9 a través de una solución (.sln) y unos proyectos (.vcproj) incluidos en el directorio $(ASSIMP_PATH)\workspaces\vc9. La forma de compilarlo con VC10 es convertir la solución para VC9.</p>
<p>Sin embargo, cuando se hace esto directamente aparece un problema con la arquitectura x64, concretamente el mensaje de error &#8220;<em>Failed to upgrade platform &#8216;x64&#8242;. Please make sure you have it installed under &#8216;%vctargetspath%\platforms\x64&#8242;</em>&#8220;. Probablemente esto se deba a que la versión de MVC++ 2010 Express, que es gratuita, no permite compilar para la arquitectura x64.</p>
<p>Para solucionarlo hay que modifcar a mano, con un editor externo (por ejemplo el excelente <a title="Notepadd++" href="http://notepad-plus-plus.org/" target="_blank">Notepad++</a>), el archivo de solución y los de proyectos.</p>
<p>Este paso es muy tedioso si no sabes automatizarlo (yo no sé). Así que os dejo los ficheros de la versión VC9 sin los bloques de &#8220;x64&#8243; para que os podáis saltar este paso. Simplemente reeemplaza los archivos de tu ordenador con los descargados.</p>
<ul>
<li><a title="Ficheros de la solución VC9 sin los bloques &quot;x64&quot;" href="http://www.acamara.es/dl/StrippedVC9Files.zip" target="_blank">StrippedVC9Files.zip</a></li>
</ul>
<p>En caso de que seáis valientes, seguid los siguientes pasos:</p>
<h4>Archivo de solución assimp.sln</h4>
<p>Hay que buscar la palabra &#8220;x64&#8243; y eliminar todas las líneas donde aparezcan en el archivo assimp.sln. En total hay 144 ocurrencias. Las hay de dos tipos:</p>
<pre>debug|x64 = debug|x64
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug|x64.ActiveCfg = debug|x64</pre>
<p>Con eso habremos terminado con este fichero.</p>
<h4>Archivos de proyectos</h4>
<p>De forma similar hay que encontrar los bloques que contengan la palabra &#8220;x64&#8243; de los archivos de proyecto (assimp.vcproj, assimp_cmd.vcproj, assimp_view.vcproj y UnitTest.vcproj). Hay un total de 171 ocurrencias. Los hay de varios tipos. En el principio siempre hay un bloque con la forma:</p>
<pre>&lt;Platform
 Name="x64"
 /&gt;</pre>
<p>Otros más largos son de la forma:</p>
<pre>&lt;Configuration
    Name="debug|x64"
    OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
    IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
    ConfigurationType="1"
    InheritedPropertySheets=".\shared\UnitTest.vsprops"
    CharacterSet="1"
    &gt;
    &lt;Tool
        Name="VCPreBuildEventTool"
    /&gt;
    <span style="color:#339966;">// ETC ...</span>
&lt;/Configuration&gt;</pre>
<p>Por último hay otro tipo:</p>
<pre>&lt;FileConfiguration
    Name="debug|x64"
    &gt;
    &lt;Tool
        Name="VCCLCompilerTool"
        UsePrecompiledHeader="0"
    /&gt;
&lt;/FileConfiguration&gt;</pre>
<p>Una vez quitados todos los bloques que incluyan la palabra &#8220;x64&#8243; ya estamos listos para importar el proyecto a VC10.</p>
<h3 style="padding-bottom:10px;">Convertir el proyecto a VC10</h3>
<p>Ahora hay que ejecutar VC++ 2010. Al pinchar en el menú &#8220;Archivo&#8221;-&gt;&#8221;Abrir&#8221;-&gt;&#8221;Proyecto o solución&#8221;, aparecerá un diálogo donde hay que seleccionar la solución (.sln) que se encuentra en $(ASSIMP_PATH)\workspaces\vc9\ (la que acabamos de modificar). Se abrirá un &#8220;Asistente para conversión de Visual Studio&#8221;. Pinchando en siguiente, siguiente y finalizar, abriremos una solución con cuatro proyectos: assimp, assimpcmd, assimpview y unit.</p>
<p>En caso de que este paso no te funcione por alguna razón, dejo colgados los ficheros de la solución y los proyectos para VC10.</p>
<ul>
<li><a title="Ficheros de la solución VC10" href="http://www.acamara.es/dl/VC10Files.zip" target="_blank">VC10Files.zip</a></li>
</ul>
<h3 style="padding-bottom:10px;">Modificar el código (pequeño parche)</h3>
<p>Por alguna razón, VC10 incluye el archivo de cabecera stdint.h desde una cabecera estándar. Este archivo es imcompatible con pstdint.h que se proporciona con Assimp. Por lo tanto hay que asegurarse de que Assimp no incluye pstdint.h o saltarán las alarmas.</p>
<p>Leyendo los foros de Assimp (<a title="Foros de Assimp" href="http://sourceforge.net/projects/assimp/forums/forum/817654/topic/4066239" target="_blank">aquí</a>) se propuso el siguiente parche: en la línea 59 del fichero AssimpPCH.h cambiar</p>
<pre>#ifdef _MSC_VER</pre>
<p>por</p>
<pre>#if defined(_MSC_VER) &amp;&amp; (_MSC_VER &lt; 1600)</pre>
<p>Con eso ya podemos compilar Assimp con la seguridad de que pstdint.h no se incluirá cuando usemos VC10.</p>
<h3 style="padding-bottom:10px;">Configurar los proyectos</h3>
<p>El último paso es configurar los proyectos para que encuentren las rutas de las dependencias (Boost y DirectX) y para solucionar un error con el fichero de salida.</p>
<p>Para incluir las rutas adecuadas hay que abrir las propiedades de cada uno de los cuatro proyectos. Hay que elegir en la parte superior izquierda &#8220;Todas las conf.&#8221; y después, en el árbol de configuraciones, hay que pinchar en el elemento &#8220;Propiedades de configuración&#8221;-&gt;&#8221;Directorios de VC++&#8221;. Ahí hay que cambiar las propiades &#8220;Directorios de archivos de inclusión&#8221; y &#8220;Directorio de archivos de bibliotecas&#8221; para que incluyan las cabeceras y librerías de Boost y DirectX.</p>
<p>Los directorios de inclusión en nuestro caso son:</p>
<pre>$(BOOST_PATH)
$(DIRECTX_PATH)\Include</pre>
<p>Mientras que los de librerías son:</p>
<pre>$(BOOST_PATH)\lib
$(DIRECTX_PATH)\Lib</pre>
<p>Recuerda cambiar cada variable $(*_PATH) por el directorio que corresponda en cada caso.</p>
<p>Esto es suficiente para que encuentre todas las dependencias de Boost y DirectX. Sin embargo, el nombre de los proyectos no coincide con el nombre que el enlazador espera a la salida, por lo que falla al generar las librerías compartidas (los .DLL) y las estáticas (las .LIB).</p>
<p>Para solucionar este problema hay que abrir las propiedades del proyecto assimp y para la configuración &#8220;debug-dll&#8221; (parte superior izquierda) hay que pinchar en la configuración &#8220;Propiedades de configuración&#8221;-&gt;&#8221;General&#8221;. La entrada &#8220;Nombre de destino&#8221; debe cambiarse a &#8220;Assimp32d&#8221; (sin las comillas y ojo con la &#8216;d&#8217; final). La misma entrada para la configuración &#8220;release-dll&#8221; debe cambiarse por &#8220;Assimp32&#8243; (ojo con la &#8216;d&#8217; del final).</p>
<p>Y con eso ya está listo todo para compilarse. Las librerías de &#8220;debug-dll&#8221;, &#8220;release-dll&#8221;, &#8220;debug-st&#8221; y &#8220;release-st&#8221; aparecerán el el directorio $(ASSIMP_PATH)\lib.</p>
<p>Como prueba de que todo ha salido bien puedes intentar compilar Assimp View y cargar un modelo. Por ejemplo, puedes cargar $(ASSIMP_PATH)\test\models\Collada\duck.dae y obtener algo parecido a esto <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a href="http://cparcial.files.wordpress.com/2011/07/assimpduck.png"><img class="aligncenter size-full wp-image-631" title="AssimpDuck" src="http://cparcial.files.wordpress.com/2011/07/assimpduck.png?w=600&h=539" alt="" width="600" height="539" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cparcial.wordpress.com/609/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cparcial.wordpress.com/609/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cparcial.wordpress.com/609/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cparcial.wordpress.com/609/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cparcial.wordpress.com/609/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cparcial.wordpress.com/609/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cparcial.wordpress.com/609/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cparcial.wordpress.com/609/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cparcial.wordpress.com/609/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cparcial.wordpress.com/609/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cparcial.wordpress.com/609/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cparcial.wordpress.com/609/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cparcial.wordpress.com/609/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cparcial.wordpress.com/609/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.acamara.es&#038;blog=14377330&#038;post=609&#038;subd=cparcial&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.acamara.es/2011/07/19/compilar-assimp-2-0-en-vc-2010-express/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9523dc1abeac0168af33bf56c7c3396e?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">es0x279e</media:title>
		</media:content>

		<media:content url="http://cparcial.files.wordpress.com/2011/07/assimpduck.png" medium="image">
			<media:title type="html">AssimpDuck</media:title>
		</media:content>
	</item>
		<item>
		<title>Elecciones mayo 2011: cartas a la basura</title>
		<link>http://blog.acamara.es/2011/05/12/elecciones-mayo-2011-cartas-a-la-basura/</link>
		<comments>http://blog.acamara.es/2011/05/12/elecciones-mayo-2011-cartas-a-la-basura/#comments</comments>
		<pubDate>Wed, 11 May 2011 22:30:22 +0000</pubDate>
		<dc:creator>soy_yuma</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Politics]]></category>
		<category><![CDATA[Spain May'11 General Elections]]></category>
		<category><![CDATA[Spanish]]></category>

		<guid isPermaLink="false">http://blog.acamara.es/?p=595</guid>
		<description><![CDATA[Como vengo haciendo en todas las elecciones que he vivido (que no son muchas), leo toda la propaganda electoral que me llega. Eso sí, con infinita paciencia y con la seguridad que los argumentos para votar a un partido u otro no los voy a encontrar ahí. Esta mañana me ha llegado la carta electoral [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.acamara.es&#038;blog=14377330&#038;post=595&#038;subd=cparcial&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Como vengo haciendo en todas las elecciones que he vivido (que no son muchas), leo toda la propaganda electoral que me llega. Eso sí, con infinita paciencia y con la seguridad que los argumentos para votar a un partido u otro no los voy a encontrar ahí.</p>
<p>Esta mañana me ha llegado la carta electoral de un partido que no voy a desvelar (pista: el color de IU no es el rojo). He leído seis palabras. No más. Ni ahora ni después.</p>
<p style="text-align:center;"><a href="http://cparcial.files.wordpress.com/2011/05/estono-caca.jpg"><img class="aligncenter size-full wp-image-596" style="border:2px solid black;padding:1px;" title="Esto no, ¡caca!" src="http://cparcial.files.wordpress.com/2011/05/estono-caca.jpg?w=600" alt=""   /></a></p>
<p style="text-align:left;">Una cosa es que algunos políticos no sepan hablar inglés (ojo, conozco al menos una que lo habla correctamente), pero español&#8230; ¡Hombre! Que está muy feo no saber esas cosas.</p>
<p style="text-align:left;">Ya, ya, es cosa de un chico o chica de marketing al que se le va a caer el pelo, y lo que el lector quiera. Pero lo que está claro es que un candidato <span style="color:#ff0000;">h</span>a* perdido su oportunidad (virtual y postal) de convencerme para que le vote.</p>
<p style="text-align:left;">* Tanto criticar y luego voy y no le pongo la hache al verbo haber&#8230; Supongo que yo he perdido la oportunidad de convencerte de lo importante que es escribir correctamente. En esta entrada perdemos todos.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cparcial.wordpress.com/595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cparcial.wordpress.com/595/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cparcial.wordpress.com/595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cparcial.wordpress.com/595/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cparcial.wordpress.com/595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cparcial.wordpress.com/595/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cparcial.wordpress.com/595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cparcial.wordpress.com/595/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cparcial.wordpress.com/595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cparcial.wordpress.com/595/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cparcial.wordpress.com/595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cparcial.wordpress.com/595/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cparcial.wordpress.com/595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cparcial.wordpress.com/595/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.acamara.es&#038;blog=14377330&#038;post=595&#038;subd=cparcial&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.acamara.es/2011/05/12/elecciones-mayo-2011-cartas-a-la-basura/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9523dc1abeac0168af33bf56c7c3396e?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">es0x279e</media:title>
		</media:content>

		<media:content url="http://cparcial.files.wordpress.com/2011/05/estono-caca.jpg" medium="image">
			<media:title type="html">Esto no, ¡caca!</media:title>
		</media:content>
	</item>
		<item>
		<title>Ejecutar aplicaciones a través de SSH</title>
		<link>http://blog.acamara.es/2011/03/08/ejecutar-aplicaciones-a-traves-de-ssh/</link>
		<comments>http://blog.acamara.es/2011/03/08/ejecutar-aplicaciones-a-traves-de-ssh/#comments</comments>
		<pubDate>Tue, 08 Mar 2011 14:58:12 +0000</pubDate>
		<dc:creator>soy_yuma</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[Spanish]]></category>
		<category><![CDATA[Terminal]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.acamara.es/?p=557</guid>
		<description><![CDATA[¿Te ha pasado alguna vez el tener que ejecutar una aplicación que se encuentra en el ordenador del trabajo? Con un poco de suerte, te basta con abrir una terminal, hacer una conexión SSH, ejecutar la aplicación y esperar el resultado. Sin embargo, en otras ocasiones necesitas que el programa se siga ejecutando cuando te [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.acamara.es&#038;blog=14377330&#038;post=557&#038;subd=cparcial&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/garrulus/100073069/"><img class="size-full wp-image-566 alignright" style="margin-left:5px;margin-bottom:5px;border:1px solid black;padding:2px;" title="ssh" src="http://cparcial.files.wordpress.com/2011/03/ssh.jpg?w=600" alt="ssh!"   /></a>¿Te ha pasado alguna vez el tener que ejecutar una aplicación que se encuentra en el ordenador del trabajo?</p>
<p>Con un poco de suerte, te basta con abrir una terminal, hacer una conexión SSH, ejecutar la aplicación y esperar el resultado. Sin embargo, en otras ocasiones necesitas que el programa se siga ejecutando cuando te desconectes del ordenador, o, peor aún, que quieras manipular la interfaz gráfica de la aplicación.</p>
<p>Como estoy harto de buscar en Google cómo hacer cada cosa, me voy a hacer una pequeña receta con los tres casos, a ver si te sirve a ti también.</p>
<h3 style="margin-bottom:10px;">Ejecutar aplicación en consola</h3>
<p>En este caso lo que se quiere hacer es:</p>
<ol>
<li>Conectarse al ordenador remoto vía SSH.</li>
<li>Ejecutar una aplicación.</li>
<li>Esperar que finalice la aplicación.</li>
<li>Desconectarse del ordenador remoto.</li>
</ol>
<p>Esto es bastante sencillo y buscando por Internet (y leyendo las páginas del manual del comando &#8220;ssh&#8221;) es fácil encontrar la solución.</p>
<p>Para conectarte al ordenador remoto basta con hacer una llamada del estilo:</p>
<pre>localhost$ <span style="color:#000000;">ssh usuario@servidor.es</span></pre>
<p><span style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;font-size:13px;line-height:19px;white-space:normal;">donde &#8216;usuario&#8217; es el nombre de usuario que quieres utilizar en el ordenador identificado por su nombre de dominio &#8216;servidor.es&#8217;. Después de introducir tu <em>password</em> cuando te lo pida, te mostrará un terminal en el ordenador remoto. Ahí podrás ejecutar la aplicación que desees:</span></p>
<pre><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;font-size:12px;line-height:18px;white-space:pre;">servidor.es$ <span style="color:#000000;">uname -srv
</span></span><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;font-size:12px;line-height:18px;white-space:pre;color:#000000;">Linux 2.6.37-ARCH #1 SMP PREEMPT Fri Feb 25 07:53:43 CET 2011</span></pre>
<p>Una vez terminada la ejecución del programa podemos introducir &#8216;exit&#8217; o pulsar control+D para salir.</p>
<h3 style="margin-bottom:10px;">Ejecutar una aplicación persistente en consola</h3>
<p>Este caso es muy parecido al anterior. Sólo se diferencia en que ahora no existe el paso 3., es decir, queremos que la aplicación se siga ejecutando después de habernos desconectado del ordenador remoto. Para ello utilizamos el <a href="http://en.wikipedia.org/wiki/Nohup" target="_blank">comando POSIX &#8220;nohup&#8221;</a> en el ordenador remoto.</p>
<pre>servidor.es$ <span style="color:#000000;">nohup make &amp;</span>
servidor.es$ <span style="color:#000000;">^D</span></pre>
<p><span style="color:#000000;">Eso nos garantiza que la aplicación se seguirá ejecutando aún cuando le llegue la señal <em>hangup</em> (HUP), que indica que el usuario que ejecutó la orden se ha desconectado de la máquina. Este comando es especialmente útil para compartir ficheros por redes P2P (con un programa torrent por consola) o para hacer grandes actualizaciones remotamente.</span></p>
<h3 style="margin-bottom:10px;">Ejecutar una aplicación X</h3>
<p>El último caso es cuando queremos ejecutar un comando en el ordenador remoto que cree una ventana en nuestro ordenador local. Por tanto, tendremos que iniciar una sesión X en el ordenador local, lo que en la mayoría de casos significa que debes haber iniciado sesión en Gnome, KDE, <a title="PekWM rocks!" href="http://www.pekwm.org/projects/pekwm" target="_blank">PekWM</a> o el entorno de escritorio que utilices.</p>
<p>Los pasos a seguir son muy similares. Primero habrá que conectarse por SSH como en el primer caso, pero añadiendo la opción &#8216;-X&#8217;:</p>
<pre>localhost$ <span style="color:#000000;">ssh -X usuario@servidor.es</span></pre>
<p>El resultado será el mismo, tendremos una terminal remota en el servidor &#8216;servidor.es&#8217;. Todo igual, <strong>salvo</strong> que al ejecutar una aplicación gráfica todas las llamadas al servidor X se hacen a la máquina local (donde estás tú) no a la máquina remota (donde ejecutas la aplicación).</p>
<p>Por ejemplo, si ejecuto la aplicación &#8216;kcalc&#8217; (la calculadora del escritorio KDE) en mi máquina wigner (ordenador del trabajo):</p>
<pre>[alejandro@wigner ~]$ <span style="color:#000000;">kcalc</span></pre>
<p>en maxwell (mi ordenador personal) aparece la siguiente ventanita:</p>
<p><img class="aligncenter size-full wp-image-583" title="Kcalc-remote" src="http://cparcial.files.wordpress.com/2011/03/kcalc-remote.png?w=600" alt="Kcalc @ wigner"   />Las tres recetas las he obtenido de diferentes sitios en Internet que ya no recuerdo. El último caso lo aprendí <a title="X a través de SSH - Van Emery" href="http://www.vanemery.com/Linux/XoverSSH/X-over-SSH2.html" target="_blank">aquí</a>, en un tutorial de Van Emery.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cparcial.wordpress.com/557/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cparcial.wordpress.com/557/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cparcial.wordpress.com/557/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cparcial.wordpress.com/557/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cparcial.wordpress.com/557/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cparcial.wordpress.com/557/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cparcial.wordpress.com/557/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cparcial.wordpress.com/557/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cparcial.wordpress.com/557/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cparcial.wordpress.com/557/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cparcial.wordpress.com/557/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cparcial.wordpress.com/557/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cparcial.wordpress.com/557/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cparcial.wordpress.com/557/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.acamara.es&#038;blog=14377330&#038;post=557&#038;subd=cparcial&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.acamara.es/2011/03/08/ejecutar-aplicaciones-a-traves-de-ssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9523dc1abeac0168af33bf56c7c3396e?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">es0x279e</media:title>
		</media:content>

		<media:content url="http://cparcial.files.wordpress.com/2011/03/ssh.jpg" medium="image">
			<media:title type="html">ssh</media:title>
		</media:content>

		<media:content url="http://cparcial.files.wordpress.com/2011/03/kcalc-remote.png" medium="image">
			<media:title type="html">Kcalc-remote</media:title>
		</media:content>
	</item>
		<item>
		<title>Winter College 2011 en Trieste</title>
		<link>http://blog.acamara.es/2011/02/06/winter-college-2011-en-trieste/</link>
		<comments>http://blog.acamara.es/2011/02/06/winter-college-2011-en-trieste/#comments</comments>
		<pubDate>Sun, 06 Feb 2011 12:34:43 +0000</pubDate>
		<dc:creator>soy_yuma</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Learning is cool]]></category>
		<category><![CDATA[Science]]></category>
		<category><![CDATA[Spanish]]></category>

		<guid isPermaLink="false">http://blog.acamara.es/?p=541</guid>
		<description><![CDATA[Este año he tenido la suerte de poder asistir al Winter College que se celebra en el ICTP (International Centre for Theoretical Physics) de Trieste, Italia. Es realmente una suerte porque ha cambiado la forma en la que veía mi trabajo hasta ahora. Lo primero a tener en cuenta es que el ICTP es un [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.acamara.es&#038;blog=14377330&#038;post=541&#038;subd=cparcial&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:center;"><a href="http://www.ictp.it/homepage.aspx"><img class="aligncenter size-medium wp-image-548" style="border:1px solid black;padding:3px;" title="Vista aérea del ICTP" src="http://cparcial.files.wordpress.com/2011/02/campus-life.jpeg?w=300&h=198" alt="" width="300" height="198" /></a></p>
<p>Este año he tenido la suerte de poder asistir al Winter College que se celebra en el <a href="http://www.ictp.it">ICTP</a> (<em>International Centre for Theoretical Physics</em>) de Trieste, Italia. Es realmente una suerte porque ha cambiado la forma en la que veía mi trabajo hasta ahora.</p>
<p>Lo primero a tener en cuenta es que el ICTP es un centro de investigación financiado por la ONU y el Gobierno de Italia que tiene como propósito principal ayudar a jóvenes investigadores procedentes de países en vías de desarrollo (yo tuve que pagar porque no se creyeron que España es del tercer mundo). Es decir, este lugar es el punto de encuentro de personas de culturas radicamente diferentes. Simplemente por el hecho de comer con ellas ya se aprende más de lo que se puede asimilar en un día.</p>
<p>Por otro lado, un <em>Winter College</em> es un evento académico donde se dan cita expertos en un tema concreto. A lo largo de algunas semanas preparan una serie de <em>lectures</em> (clases magistrales) donde desarrollan su área de experiencia. Nada que ver con un catedrático contándote la quinta lección de ese temario que le tocó por sorteo en consejo de departamento. Esta gente sabe de lo que habla y realmente quiere contarte lo que te cuenta. En resumidas cuentas, es un curso avanzado e intensivo de los temas que a ti te interesan.</p>
<p>Las cosas que estoy aprendiendo, los contactos que estoy haciendo, la inspiración que estoy recibiendo. Nada de eso puede expresarse con palabras. Es una revolución de las ideas.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cparcial.wordpress.com/541/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cparcial.wordpress.com/541/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cparcial.wordpress.com/541/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cparcial.wordpress.com/541/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cparcial.wordpress.com/541/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cparcial.wordpress.com/541/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cparcial.wordpress.com/541/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cparcial.wordpress.com/541/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cparcial.wordpress.com/541/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cparcial.wordpress.com/541/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cparcial.wordpress.com/541/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cparcial.wordpress.com/541/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cparcial.wordpress.com/541/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cparcial.wordpress.com/541/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.acamara.es&#038;blog=14377330&#038;post=541&#038;subd=cparcial&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.acamara.es/2011/02/06/winter-college-2011-en-trieste/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9523dc1abeac0168af33bf56c7c3396e?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">es0x279e</media:title>
		</media:content>

		<media:content url="http://cparcial.files.wordpress.com/2011/02/campus-life.jpeg?w=300" medium="image">
			<media:title type="html">Vista aérea del ICTP</media:title>
		</media:content>
	</item>
		<item>
		<title>Ecuaciones en tus presentaciones</title>
		<link>http://blog.acamara.es/2010/11/14/ecuaciones-en-tus-presentaciones/</link>
		<comments>http://blog.acamara.es/2010/11/14/ecuaciones-en-tus-presentaciones/#comments</comments>
		<pubDate>Sun, 14 Nov 2010 11:47:23 +0000</pubDate>
		<dc:creator>soy_yuma</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Spanish]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.acamara.es/?p=519</guid>
		<description><![CDATA[Foto tomada por tkamenick. A veces es imprescindible incorporar expresiones matemáticas en tus presentaciones hechas con Powerpoint, Keynote, OpenOffice Impress o Google Presentations. Pero no queda claro qué programa usar para hacerlo. Por un lado, el editor de ecuaciones de MathType es muy útil y es una solución a tener en cuenta cuando trabajemos con [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.acamara.es&#038;blog=14377330&#038;post=519&#038;subd=cparcial&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:center;"><a href="http://cparcial.files.wordpress.com/2010/11/maths.jpg"><img class="aligncenter size-medium wp-image-538" style="border:1px solid black;padding:5px;" title="Ecuaciones, ecuaciones" src="http://cparcial.files.wordpress.com/2010/11/maths.jpg?w=300&h=199" alt="" width="300" height="199" /></a>Foto tomada por <a title="Flickr de donde tomé la foto" href="http://www.flickr.com/photos/35064820@N00/3950391591/" target="_blank">tkamenick</a>.</p>
<p>A veces es imprescindible incorporar expresiones matemáticas en tus presentaciones hechas con Powerpoint, Keynote, OpenOffice Impress o Google Presentations. Pero no queda claro qué programa usar para hacerlo.</p>
<p>Por un lado, el editor de ecuaciones de <a title="Página principal de MathType" href="http://www.dessci.com/en/products/mathtype/" target="_blank">MathType</a> es muy útil y es una solución a tener en cuenta cuando trabajemos con Powerpoint. Sin embargo, las ecuaciones generadas con él no pueden ser exportadas a otros programas (al menos que yo sepa).</p>
<p>Por otro lado, para Mac existe un software llamado <a title="Página principal de LaTeXiT" href="http://www.chachatelier.fr/programmation/latexit_en.php" target="_blank">LaTeXiT</a> que usé durante mucho tiempo y que funciona muy bien. Lo que hace (por detrás de la interfaz gráfica) es básicamente dos cosas: 1) crea un archivo TeX mínimo a partir del cual se imprime la ecuación en DVI y 2) exporta este DVI a un formato que sea soportado por el programa de presentaciones (en mi caso me conformo con PNG). Si usas Mac lo tienes hecho. Si usas GNU/Linux no (de nuevo que yo sepa). Así que lo que propongo es un script que hace <em>a manubrio</em> lo que hace LaTeXiT de forma bonita.</p>
<p>Lo primero es tener una plantilla de LaTeX que sea mínima. Como sólo vamos a crear ecuaciones, incluiremos en el los paquete necesarios para algunos símbolos (de la AMS).</p>
<pre>\documentclass{article}
\usepackage{amsmath,amsthm,amssymb}
\pagestyle{empty}

\begin{document}
\begin{equation*}
	<span style="color:#339966;">% Aquí va la ecuación que queremos incorporar a la presentación</span>
\end{equation*}
\end{document}</pre>
<p>Por otro lado, tendremos que tener el siguiente script que convierte a cada ecuación en una imagen PNG:</p>
<pre><em>#!/bin/bash</em>

<span style="color:#339966;">ELATEX</span>=/usr/bin/latex
<span style="color:#339966;">EDVIPS</span>=/usr/bin/dvips
<span style="color:#339966;">ECONVERT</span>=/usr/bin/convert

<span style="color:#339966;">RES</span>=600

<span style="color:#339966;">$ELATEX</span><span style="color:#339966;"><span style="color:#ffffff;"> </span><span style="color:#339966;">$1</span></span>.tex
<span style="color:#339966;">$EDVIPS $1</span> -o
<span style="color:#339966;">$ECONVERT</span> -units PixelsPerInch -density <span style="color:#339966;">$RES</span> -trim -transparent \#000080 \
          -type PaletteMatte +repage <span style="color:#339966;">$1</span>.ps <span style="color:#339966;">$1</span>.png

rm <span style="color:#339966;">$1</span>.dvi <span style="color:#339966;">$1</span>.ps</pre>
<p>Del script, lo único que hay que tocar son las rutas a los ejecutables <em>latex</em>, <em>dvips</em> y <em>convert</em> (latex y dvips suelen venir en tu <a title="Mi distribución de LaTeX preferida" href="http://www.tug.org/texlive/" target="_blank">distribución de LaTeX preferida</a>, y convert es una utilidad de <a title="Página principal de ImageMagick" href="http://www.imagemagick.org/script/index.php" target="_blank">ImageMagick</a>) y la resolución de la imagen generada, RES. Para ejecutarlo hay que guardarlo (yo elegí el nombre latex2png) y para usarlo sobre un archivo llamado prueba.tex hay que usar `<strong>latex2png prueba</strong>` sin las comillas simples.</p>
<p>Con el anterior script la forma de trabajar que a mí me funciona es un editor de texto abierto para cambiar la fórmula, una consola para ejecutar el script y un navegador de archivos (dolphin de KDE) para arrastrar el PNG a la presentación. En caso de que uses <a title="Página principal de Emacs" href="http://www.gnu.org/software/emacs/" target="_blank">Emacs</a> puedes ahorrarte la consola si <a title="Cómo crear un macro en Emacs (en inglés)" href="http://www.emacswiki.org/emacs/KeyboardMacros" target="_blank">defines un macro</a> para ejecutar el script sobre el archivo que estás editando. Y si eres un <em>master-programming</em>, ¿por qué no te curras una interfaz gráfica para el anterior script al estilo LaTeXiT?</p>
<p>Para muestra, un botón. Este es el resultado de la ecuación:</p>
<pre>\mathfrak{F}^\alpha\left[f\right]\left(\mathbf{p}\right)
= \iint_{\mathbb{R}^2}\mathrm{d}\mathbf{r}\ f\left(\mathbf{r}\right)K^\alpha
\left(\mathbf{r},\mathbf{p}\right)</pre>
<p style="text-align:center;"><img class="aligncenter" title="Prueba de que esto funciona" src="http://www.acamara.es/wordpress/prueba.png" alt="" width="454" height="68" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cparcial.wordpress.com/519/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cparcial.wordpress.com/519/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cparcial.wordpress.com/519/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cparcial.wordpress.com/519/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cparcial.wordpress.com/519/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cparcial.wordpress.com/519/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cparcial.wordpress.com/519/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cparcial.wordpress.com/519/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cparcial.wordpress.com/519/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cparcial.wordpress.com/519/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cparcial.wordpress.com/519/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cparcial.wordpress.com/519/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cparcial.wordpress.com/519/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cparcial.wordpress.com/519/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.acamara.es&#038;blog=14377330&#038;post=519&#038;subd=cparcial&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.acamara.es/2010/11/14/ecuaciones-en-tus-presentaciones/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9523dc1abeac0168af33bf56c7c3396e?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">es0x279e</media:title>
		</media:content>

		<media:content url="http://cparcial.files.wordpress.com/2010/11/maths.jpg?w=300" medium="image">
			<media:title type="html">Ecuaciones, ecuaciones</media:title>
		</media:content>

		<media:content url="http://www.acamara.es/wordpress/prueba.png" medium="image">
			<media:title type="html">Prueba de que esto funciona</media:title>
		</media:content>
	</item>
		<item>
		<title>¿Huelga o no huelga?</title>
		<link>http://blog.acamara.es/2010/09/30/huelga-o-no-huelga/</link>
		<comments>http://blog.acamara.es/2010/09/30/huelga-o-no-huelga/#comments</comments>
		<pubDate>Thu, 30 Sep 2010 13:30:25 +0000</pubDate>
		<dc:creator>soy_yuma</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Politics]]></category>
		<category><![CDATA[Protest!]]></category>
		<category><![CDATA[Society]]></category>
		<category><![CDATA[Spanish]]></category>
		<category><![CDATA[Strike]]></category>

		<guid isPermaLink="false">http://blog.acamara.es/?p=504</guid>
		<description><![CDATA[La verdad es que da lo mismo. Esta huelga no tiene vencedores. Los que vamos a salir perdiendo, sí o sí, somos los trabajadores. En mi caso particular apoyar la huelga supone perder un día de sueldo y de trabajo para que luego no te contabilicen como que has hecho huelga (negativo) y no apoyarla supone [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.acamara.es&#038;blog=14377330&#038;post=504&#038;subd=cparcial&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>La verdad es que da lo mismo. Esta huelga no tiene vencedores. Los que vamos a salir perdiendo, sí o sí, somos los trabajadores. En mi caso particular apoyar la huelga supone perder un día de sueldo y de trabajo para que luego no te contabilicen como que has hecho huelga (negativo) y no apoyarla supone que unos sinvergüenzas piensen que tienen mi apoyo frente a la reforma laboral (negativo).</p>
<p>Es de broma: llega tarde y sólo sirve para que los trabajadores nos peleemos entre nosotros sobre si hay que hacerla (y apoyar a los <del datetime="2010-09-30T15:56:34+00:00">vagos y vendidos</del> señores de los sindicatos) o si no hay que hacerla (y apoyar a los <del datetime="2010-09-30T15:56:34+00:00">sinvergüenzas e incopetentes</del> <em>políticos</em> del gobierno). No deja lugar a medias tintas, cuando es una situación que claramente crea polémica por la falta credebilidad de los dos bandos (gobiernos vs. sindicatos).</p>
<p>Otra vez más, este &#8220;niño de la democracia&#8221; (yo) se pregunta si realmente hay futuro en la política de este país. Un sistema que se retroalimenta con corrupción, favoritismo y egoísmo no puede utilizarse para <strong>servir</strong> al pueblo.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cparcial.wordpress.com/504/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cparcial.wordpress.com/504/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cparcial.wordpress.com/504/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cparcial.wordpress.com/504/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cparcial.wordpress.com/504/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cparcial.wordpress.com/504/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cparcial.wordpress.com/504/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cparcial.wordpress.com/504/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cparcial.wordpress.com/504/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cparcial.wordpress.com/504/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cparcial.wordpress.com/504/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cparcial.wordpress.com/504/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cparcial.wordpress.com/504/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cparcial.wordpress.com/504/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.acamara.es&#038;blog=14377330&#038;post=504&#038;subd=cparcial&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.acamara.es/2010/09/30/huelga-o-no-huelga/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9523dc1abeac0168af33bf56c7c3396e?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">es0x279e</media:title>
		</media:content>
	</item>
		<item>
		<title>Final Fantasy XIV</title>
		<link>http://blog.acamara.es/2010/09/21/final-fantasy-xiv/</link>
		<comments>http://blog.acamara.es/2010/09/21/final-fantasy-xiv/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 11:32:40 +0000</pubDate>
		<dc:creator>soy_yuma</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[MMORPG]]></category>
		<category><![CDATA[Spanish]]></category>
		<category><![CDATA[Videogames]]></category>

		<guid isPermaLink="false">http://blog.acamara.es/?p=474</guid>
		<description><![CDATA[Este último mes he tenido la suerte de poder probar el nuevo juego de Square-Enix de la saga Final Fantasy. Se trata del Final Fantasy XIV &#8211; Online. El número parece de broma, y lo peor es que llevan bastantes más de catorce títulos de este estilo. ¡Han superado hasta a En Busca del Valle [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.acamara.es&#038;blog=14377330&#038;post=474&#038;subd=cparcial&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://cparcial.files.wordpress.com/2010/09/ffxiv-logo.jpg"><img class="aligncenter size-medium wp-image-495" title="FFXIV-logo" src="http://cparcial.files.wordpress.com/2010/09/ffxiv-logo.jpg?w=300&h=164" alt="" width="300" height="164" /></a></p>
<p>Este último mes he tenido la suerte de poder probar el nuevo juego de Square-Enix de la saga Final Fantasy. Se trata del <a href="http://www.finalfantasyxiv.com/" target="_blank">Final Fantasy XIV &#8211; Online</a>. El número parece de broma, y lo peor es que llevan bastantes más de catorce títulos de este estilo. ¡Han superado hasta a En Busca del Valle Encantado! Pero esta entrada no trata de su número sino de su calidad.</p>
<p>Durante la semana y media que he jugado no he visto demasiadas cosas que considere novedosas. Si lo comparamos con el <a href="http://www.finalfantasyxi.com/" target="_blank">Final Fantasy XI &#8211; Online</a> (el otro de la saga que es online) tiene bastantes mejoras. Pero si lo comparas con un buen MMORPG se queda corto. Yo creo que incluso el <a href="http://www.worldofwarcraft.com/" target="_blank">World of Warcraft</a> le supera en cuanto a jugabilidad. Sólo por enunciar algunas de las cosas que no gustan mencionaré que las misiones son cortas y para nada gratificantes (de momento han sido del tipo ve-allí-y-mata y ve-allá-y-fabrica), los precios estaban completamente desajustados (10k giles por un tronco, que es lo básico para ser carpintero, es mucho dinero), las líneas de historia no son continuas (los últimos dos días los pasé matando bichos para subir de nivel para poder hacer las siguientes misiones ¡y acababa de empezar a jugar!), necesitas un ordenador muy serio para hacerlo rodar fluidamente, no existe (de momento) una forma sencilla y nativa de crear y administrar hermandades (<em>guilds</em>)<em>, </em>y un largo etcétera.</p>
<p>Tampoco sería justo decir que todo son cosas malas (aunque es casi estrictamente cierto) porque algunos detalles son interesantes. El hecho de que para cambiar de clase o de artesano sólo necesites comprar las armas o herramientas necesarias está bien. Que puedas reasignar parcialmente los puntos de habilidad que consigues al subir de nivel tampoco es mala idea.</p>
<p>En fin, me ha dejado bastante mal sabor de boca, aunque habrá que esperar a la versión definitiva (que <strong>no</strong> me voy a comprar) para poder valorarlo de forma completa. Desde el FFX (que tampoco era tan <em>pasada</em>) no he visto otro Final Fantasy de calidad&#8230; ¿habremos perdido a Square o es que nunca existió? Yo lo tengo claro, antes que jugar a este Final Fantasy me reabro la cuenta del <a href="http://everquest2.com/" target="_blank">Everquest II</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cparcial.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cparcial.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cparcial.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cparcial.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cparcial.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cparcial.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cparcial.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cparcial.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cparcial.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cparcial.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cparcial.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cparcial.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cparcial.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cparcial.wordpress.com/474/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.acamara.es&#038;blog=14377330&#038;post=474&#038;subd=cparcial&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.acamara.es/2010/09/21/final-fantasy-xiv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9523dc1abeac0168af33bf56c7c3396e?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">es0x279e</media:title>
		</media:content>

		<media:content url="http://cparcial.files.wordpress.com/2010/09/ffxiv-logo.jpg?w=300" medium="image">
			<media:title type="html">FFXIV-logo</media:title>
		</media:content>
	</item>
		<item>
		<title>Error típico al cambiar la variable PS1</title>
		<link>http://blog.acamara.es/2010/09/20/error-tipico-al-cambiar-la-variable-ps1/</link>
		<comments>http://blog.acamara.es/2010/09/20/error-tipico-al-cambiar-la-variable-ps1/#comments</comments>
		<pubDate>Mon, 20 Sep 2010 21:22:03 +0000</pubDate>
		<dc:creator>soy_yuma</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[Spanish]]></category>
		<category><![CDATA[Terminal]]></category>
		<category><![CDATA[Trick]]></category>

		<guid isPermaLink="false">http://blog.acamara.es/?p=489</guid>
		<description><![CDATA[Después de un rato buscando por Internet he conseguido arreglar este error bobo que ocurre al cambiar el prompt (¿cómo lo traduces?) de tu terminal de GNU/Linux. Os pongo en situación. En mi archivo ~/.bashrc exporto la variable PS1 para modificar la &#8220;moñiga&#8221; que aparece en la línea de comandos y que indica dónde puedo [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.acamara.es&#038;blog=14377330&#038;post=489&#038;subd=cparcial&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Después de un rato buscando por Internet he conseguido arreglar este error bobo que ocurre al cambiar el <em>prompt</em> (¿cómo lo traduces?) de tu terminal de GNU/Linux.</p>
<p>Os pongo en situación. En mi archivo ~/.bashrc exporto la variable PS1 para modificar la &#8220;moñiga&#8221; que aparece en la línea de comandos y que indica dónde puedo empezar a introducir órdenes. Hasta ahí en muchos tutoriales te explican de forma muy clara lo que hay que hacer y qué diferentes opciones tienes (<a href="http://www.gentoo.org/doc/en/articles/prompt-magic.xml" target="_blank">ejemplo</a>). Lo que se me pasó (por leer en diagonal) es que los caracteres de escape (que no se verán en la terminal) también cuentan en ciertas ocasiones. Por ejemplo, utilizó el PS1:</p>
<pre>export PS1='\e[32;1m\w\e[0m$ '</pre>
<p>que básicamente te indica el directorio actual en verde negrita:</p>
<pre><span style="color:#00ff00;"><span style="color:#339966;"><strong>~/Documentos</strong></span><span style="color:#000000;">$ </span></span></pre>
<p><span style="color:#00ff00;"><span style="color:#000000;">cuando vuelvo para atrás en el historial de bash y escribo un comando que supera los 17 caracteres de la variable PS1, el prompt se va al carajo. Si fuera a ejecutar el comando 'apt-get install power-to-me' y luego el comando 'nano ~/.me' en la terminal vería:</span></span></p>
<pre><span style="color:#00ff00;"><span style="color:#000000;"><span style="color:#339966;"><strong>~</strong></span>$ apt-get install power-to-me
<strong><span style="color:#339966;">~</span></strong>$ apt-get instalnano ~/.me</span></span></pre>
<p><span style="color:#00ff00;"><span style="color:#000000;">Fíjate que los 17 primeros caracteres pertenecen al comando anterior y el resto es el comando de nano.</span></span></p>
<p><span style="color:#00ff00;"><span style="color:#000000;">Esto ocurre porque para calcular la distancia del prompt cuenta todos los caracteres de la variable PS1, incluidos los caracteres de escape de colores. La solución estaba todo el tiempo delante de mis narices, porque en todos los tutoriales sobre la modificación del PS1 te indican cómo hacerlo. Tan simple como utilizar las secuencias de escape especiales '\[<strong>'</strong> y '\]' (que indican que <strong>no</strong> hay que contar los caracteres que encierran) alrededor de los caracteres de cambio de color. Así, el prompt quedaría:</span></span></p>
<pre><span style="color:#00ff00;"><span style="color:#000000;">export PS1='\[\e[32;1m\]\w\[\e[0m\]$ '</span></span></pre>
<p><span style="color:#00ff00;"><span style="color:#000000;">y tan amigos todos.</span></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cparcial.wordpress.com/489/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cparcial.wordpress.com/489/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cparcial.wordpress.com/489/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cparcial.wordpress.com/489/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cparcial.wordpress.com/489/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cparcial.wordpress.com/489/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cparcial.wordpress.com/489/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cparcial.wordpress.com/489/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cparcial.wordpress.com/489/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cparcial.wordpress.com/489/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cparcial.wordpress.com/489/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cparcial.wordpress.com/489/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cparcial.wordpress.com/489/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cparcial.wordpress.com/489/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.acamara.es&#038;blog=14377330&#038;post=489&#038;subd=cparcial&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.acamara.es/2010/09/20/error-tipico-al-cambiar-la-variable-ps1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9523dc1abeac0168af33bf56c7c3396e?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">es0x279e</media:title>
		</media:content>
	</item>
	</channel>
</rss>
