<?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>Alex Batsuev&#039;s blog</title>
	<atom:link href="http://batsuev.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://batsuev.com</link>
	<description></description>
	<lastBuildDate>Mon, 10 Oct 2011 14:01:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Building Google Dart on Mac OS X Lion with XCode 4</title>
		<link>http://batsuev.com/2011/10/building-google-dart-on-os-x-lion-with-xcode-4/</link>
		<comments>http://batsuev.com/2011/10/building-google-dart-on-os-x-lion-with-xcode-4/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 14:01:17 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[google dart]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[lion]]></category>
		<category><![CDATA[xcode 4]]></category>

		<guid isPermaLink="false">http://batsuev.com/?p=71</guid>
		<description><![CDATA[I have spent about 30 mins trying to build Google Dart. The problem is in macosx sdk version. Google Dart needs 10.5 for building, but there is no 10.5 sdk in XCode 4 in Lion. Error message: === BUILD NATIVE &#8230; <a href="http://batsuev.com/2011/10/building-google-dart-on-os-x-lion-with-xcode-4/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have spent about 30 mins trying to build Google Dart. The problem is in macosx sdk version. Google Dart needs 10.5 for building, but there is no 10.5 sdk in XCode 4 in Lion. </p>
<p>Error message:</p>
<pre>
=== BUILD NATIVE TARGET v8_base OF PROJECT v8 WITH CONFIGURATION Debug_x64 ===
** BUILD FAILED **
</pre>
<p>Full instruction how to build Google Dart and fix this issue:</p>
<p><strong>0. Install depot_tools</strong><br />
First of all, we need depot_tools from google:<br />
<a href='http://dev.chromium.org/developers/how-tos/install-depot-tools'>http://dev.chromium.org/developers/how-tos/install-depot-tools</a></p>
<pre>
svn co http://src.chromium.org/svn/trunk/tools/depot_tools
export PATH="$PATH":`pwd`/depot_tools
</pre>
<p><strong>1. Getting the source</strong><br />
How to get the source: <a href='http://code.google.com/p/dart/wiki/GettingTheSource'>http://code.google.com/p/dart/wiki/GettingTheSource</a></p>
<pre>
gclient config http://dart.googlecode.com/svn/trunk/deps/all.deps
gclient sync
</pre>
<p><strong>2. Change Mac OS X SDK to 10.6</strong><br />
Open tools/build.py and add the following lines after line 108:</p>
<pre>
'-sdk',
'macosx10.6',
</pre>
<p>Now build.py 108-119 lines should look like:</p>
<pre>
args = ['xcodebuild',
                '-sdk',
                'macosx10.6',
                '-project',
                project_file,
                '-target',
                target,
                '-parallelizeTargets',
                '-configuration',
                build_config,
                'SYMROOT=%s' % os.path.abspath('xcodebuild')
         ]
</pre>
<p>Diff:</p>
<pre>
Index: tools/build.py
===================================================================
--- tools/build.py	(revision 296)
+++ tools/build.py	(working copy)
@@ -106,6 +106,8 @@
         if os.path.exists('dart-%s.gyp' % CurrentDirectoryBaseName()):
           project_file = 'dart-%s.xcodeproj' % CurrentDirectoryBaseName()
         args = ['xcodebuild',
+                '-sdk',
+                'macosx10.6',
                 '-project',
                 project_file,
                 '-target',
</pre>
<p><strong>3. Building everything</strong><br />
Next step is described in Google guide:<br />
<a href="http://code.google.com/p/dart/wiki/Building#Building_everything">http://code.google.com/p/dart/wiki/Building#Building_everything</a></p>
<p>Just run</p>
<pre>
./tools/build.py --arch=ia32
</pre>
<p>or</p>
<pre>
./tools/build.py --arch=x64
</pre>
<p>That&#8217;s all.</p>
]]></content:encoded>
			<wfw:commentRss>http://batsuev.com/2011/10/building-google-dart-on-os-x-lion-with-xcode-4/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>JavaScript ctags</title>
		<link>http://batsuev.com/2011/09/javascript-ctags/</link>
		<comments>http://batsuev.com/2011/09/javascript-ctags/#comments</comments>
		<pubDate>Mon, 12 Sep 2011 13:13:48 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[google closure]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[ctags]]></category>

		<guid isPermaLink="false">http://batsuev.com/?p=66</guid>
		<description><![CDATA[I&#8217;ve just published gjstags: ctags based on Google Closure Compiler. https://github.com/AnyChart/gjstags This tool supports classes, enums, interfaces and so on. Enjoy!]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just published gjstags: ctags based on Google Closure Compiler.<br />
<a href="https://github.com/AnyChart/gjstags" target="_blank">https://github.com/AnyChart/gjstags</a><br />
This tool supports classes, enums, interfaces and so on.<br />
Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://batsuev.com/2011/09/javascript-ctags/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fork of vim-javascript</title>
		<link>http://batsuev.com/2011/09/fork-of-vim-javascript/</link>
		<comments>http://batsuev.com/2011/09/fork-of-vim-javascript/#comments</comments>
		<pubDate>Sat, 03 Sep 2011 03:58:22 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[google closure]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://batsuev.com/?p=63</guid>
		<description><![CDATA[My fork of vim-javascript: https://github.com/batsuev/vim-javascript. Modifications: jsdoc syntax highlight according to Google JavaScript styleguide]]></description>
			<content:encoded><![CDATA[<p>My fork of vim-javascript:<br />
<a href="https://github.com/batsuev/vim-javascript" target="_blank">https://github.com/batsuev/vim-javascript</a>.</p>
<p>Modifications: jsdoc syntax highlight according to <a href="http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml">Google JavaScript styleguide</a></p>
]]></content:encoded>
			<wfw:commentRss>http://batsuev.com/2011/09/fork-of-vim-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working with java subprocess from vim</title>
		<link>http://batsuev.com/2011/09/working-with-java-subprocess-from-vim/</link>
		<comments>http://batsuev.com/2011/09/working-with-java-subprocess-from-vim/#comments</comments>
		<pubDate>Sat, 03 Sep 2011 02:18:17 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[vim]]></category>
		<category><![CDATA[conque]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://batsuev.com/?p=49</guid>
		<description><![CDATA[First of all, we need Conque vim plugin: http://code.google.com/p/conque/ (If you are using git, github and Pathogen: https://github.com/rygwdn/vim-conque). This plugin allows us to create subprocesses and communicate with them. Let&#8217;s write simple Java program: import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; &#8230; <a href="http://batsuev.com/2011/09/working-with-java-subprocess-from-vim/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>First of all, we need <strong>Conque</strong> vim plugin: <a href="http://code.google.com/p/conque/" target="_blank">http://code.google.com/p/conque/</a> (If you are using git, github and Pathogen: <a href="https://github.com/rygwdn/vim-conque" target="_blank">https://github.com/rygwdn/vim-conque</a>).</p>
<p>This plugin allows us to create subprocesses and communicate with them.</p>
<p>Let&#8217;s write simple Java program:</p>
<pre>

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class VIMIOTest {

    public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        while (true) {

            String command = br.readLine();
            if (command.equalsIgnoreCase("exit")) {
                break;
            }else if (command.equalsIgnoreCase("test")) {
                System.out.println("test answer");
            }
        }
    }
}
</pre>
<p>And vim script for working with it:</p>
<pre>
let g:jp = conque_term#subprocess('java VIMIOTest')

function! SendTest()
    call g:jp.writeln('test')
    let output = g:jp.read()
    echo 'output:'.output
endfunction

function! CloseTest()
    call g:jp.writeln('close')
    call g:jp.close()
endfunction
</pre>
<p>Thats all!<br />
More docs about conque: <a href="http://code.google.com/p/conque/wiki/Usage" target="_blank">http://code.google.com/p/conque/wiki/Usage</a></p>
]]></content:encoded>
			<wfw:commentRss>http://batsuev.com/2011/09/working-with-java-subprocess-from-vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Refresh html page from vim on mac</title>
		<link>http://batsuev.com/2011/08/refresh-html-page-from-vim-on-mac/</link>
		<comments>http://batsuev.com/2011/08/refresh-html-page-from-vim-on-mac/#comments</comments>
		<pubDate>Wed, 17 Aug 2011 05:39:39 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://batsuev.com/?p=38</guid>
		<description><![CDATA[For doing this just add these lines to project .vimrc or global .vimrc: function! s:OpenHTML(path) exec(&#039;silent !open -a Safari &#039;.a:path) exec(&#34;silent !osascript -e &#039;tell application &#34;iTerm&#34; to activate&#039;&#34;) exec(&#039;redraw!&#039;) endfunction command! OpenHTML call s:OpenHTML(expand(&#039;%&#039;)) nmap &#60;silent&#62; &#60;F5&#62; :OpenHTML&#60;CR&#62; You can &#8230; <a href="http://batsuev.com/2011/08/refresh-html-page-from-vim-on-mac/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For doing this just add these lines to project .vimrc or global .vimrc:</p>
<pre>
function! s:OpenHTML(path)
    exec(&#039;silent !open -a Safari &#039;.a:path)
    exec(&quot;silent !osascript -e &#039;tell application &quot;iTerm&quot; to activate&#039;&quot;)
    exec(&#039;redraw!&#039;)
endfunction                                                                      

command! OpenHTML call s:OpenHTML(expand(&#039;%&#039;))
nmap &lt;silent&gt; &lt;F5&gt; :OpenHTML&lt;CR&gt;
</pre>
<p>You can replace <strong>expand(&#8216;%&#8217;)</strong> to custom path for refreshing project html file.<br />
For example:</p>
<pre>
command! OpenHTML call s:OpenHTML(s:projectPath.'/html-tests/chartView.html')
</pre>
<p>Also you need to replace <strong>iTerm</strong> to terminal you are using.</p>
<p>Key binding for refresh &#8211; F5.</p>
]]></content:encoded>
			<wfw:commentRss>http://batsuev.com/2011/08/refresh-html-page-from-vim-on-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Closure Linter: Simple TextMate integration</title>
		<link>http://batsuev.com/2011/07/google-closure-linter-textmate-integration/</link>
		<comments>http://batsuev.com/2011/07/google-closure-linter-textmate-integration/#comments</comments>
		<pubDate>Tue, 19 Jul 2011 17:45:35 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[google closure]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[textmate]]></category>
		<category><![CDATA[linter]]></category>

		<guid isPermaLink="false">http://batsuev.com/?p=24</guid>
		<description><![CDATA[The simplest way to integrate google closure linter into TextMate: 1. Bundles -> Bundle Editor -> Show Bundle Editor 2. Show Commands only 3. Select JavaScript 4. Add New Command: 5. Set name to &#8220;Google Closure Linter&#8221; 6. Set Command(s) &#8230; <a href="http://batsuev.com/2011/07/google-closure-linter-textmate-integration/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://batsuev.com/wp-content/uploads/2011/07/screen.png" alt="" title="screen" width="685" height="185" class="alignnone size-full wp-image-25" /></p>
<p>The simplest way to integrate google closure linter into TextMate:<br />
1. Bundles -> Bundle Editor -> Show Bundle Editor<br />
2. Show Commands only<br />
3. Select JavaScript<br />
<span id="more-24"></span><br />
4. Add New Command:<br />
<img src="http://batsuev.com/wp-content/uploads/2011/07/new-command.png" alt="" title="new-command" width="460" height="554" class="alignnone size-full wp-image-26" /><br />
5. Set name to &#8220;Google Closure Linter&#8221;<br />
6. Set Command(s) to /usr/local/bin/gjslint &#8220;$TM_FILEPATH&#8221;<br />
7. Set Input to None<br />
8. Set Output to &#8220;Show as Tooltip&#8221;<br />
9. Set Key Equivalent to Cmd+B<br />
<img src="http://batsuev.com/wp-content/uploads/2011/07/opts1.png" alt="" title="opts" width="802" height="565" class="alignnone size-full wp-image-36" /><br />
Thats all. Now you can open any js file and press Cmd+B for running gjslinter.</p>
]]></content:encoded>
			<wfw:commentRss>http://batsuev.com/2011/07/google-closure-linter-textmate-integration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Closure Linter: vim integration</title>
		<link>http://batsuev.com/2011/07/google-closure-linter-vim-integration/</link>
		<comments>http://batsuev.com/2011/07/google-closure-linter-vim-integration/#comments</comments>
		<pubDate>Tue, 19 Jul 2011 12:15:33 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[google closure]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://batsuev.com/?p=6</guid>
		<description><![CDATA[0. Install google closure linter (http://code.google.com/closure/utilities/ 1. Install google-closure-linter-for-vim vim plugin: https://github.com/batsuev/google-closure-linter-for-vim Using pathogen: git clone git@github.com:batsuev/google-closure-linter-for-vim.git ~/.vim/bundle/google-closure-linter Or manual: cd ~/.vim/ftplugin wget https://raw.github.com/batsuev/google-closure-linter-for-vim/master/ftplugin/javascript.vim 2. Now you can call :make in normal mode and use general error navigation (e.g. :cprev &#8230; <a href="http://batsuev.com/2011/07/google-closure-linter-vim-integration/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://batsuev.com/wp-content/uploads/2011/07/Screen-shot-2011-07-19-at-9.11.50-PM.png" alt="" title="google closure linter in vim" width="583" height="89" class="alignnone size-full wp-image-14" /><br />
0. Install google closure linter (<a href="http://code.google.com/closure/utilities/" target="_blank">http://code.google.com/closure/utilities/</a><br />
1. Install google-closure-linter-for-vim vim plugin:<br />
<a href="https://github.com/batsuev/google-closure-linter-for-vim" target="_blank">https://github.com/batsuev/google-closure-linter-for-vim</a><br />
Using pathogen:<br />
<code><br />
git clone git@github.com:batsuev/google-closure-linter-for-vim.git ~/.vim/bundle/google-closure-linter<br />
</code><br />
Or manual:<br />
<code><br />
cd ~/.vim/ftplugin<br />
wget https://raw.github.com/batsuev/google-closure-linter-for-vim/master/ftplugin/javascript.vim<br />
</code><br />
2. Now you can call <strong>:make</strong> in normal mode and use general error navigation (e.g. <strong>:cprev :cnext :clist</strong>)</p>
]]></content:encoded>
			<wfw:commentRss>http://batsuev.com/2011/07/google-closure-linter-vim-integration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

