<?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>Michael Goffin &#187; Varnish</title>
	<atom:link href="http://www.mgoff.in/tag/varnish/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mgoff.in</link>
	<description>geek</description>
	<lastBuildDate>Tue, 16 Aug 2011 18:27:10 +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>VIM Syntax Highlighting For Varnish VCL Files</title>
		<link>http://www.mgoff.in/2010/05/28/vim-syntax-highlighting-for-varnish-vcl-files/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=vim-syntax-highlighting-for-varnish-vcl-files</link>
		<comments>http://www.mgoff.in/2010/05/28/vim-syntax-highlighting-for-varnish-vcl-files/#comments</comments>
		<pubDate>Fri, 28 May 2010 04:25:35 +0000</pubDate>
		<dc:creator>Michael Goffin</dc:creator>
				<category><![CDATA[Varnish]]></category>
		<category><![CDATA[VIM]]></category>

		<guid isPermaLink="false">http://www.mgoff.in/?p=104</guid>
		<description><![CDATA[Varnish has become a popular topic of conversation lately, and rightly so. It is amazing. The Varnish-cache project describes it as simply a high-performance HTTP Accelerator. Outside of its use as a caching layer, it is also an excellent load balancer and proxy. One of the great things about Varnish is the Varnish Configuration Language. [...]]]></description>
			<content:encoded><![CDATA[<p>
<a href="http://varnish-cache.org/">Varnish</a> has become a popular topic of conversation lately, and rightly so. It is amazing. The Varnish-cache project describes it as simply a high-performance HTTP Accelerator. Outside of its use as a caching layer, it is also an excellent load balancer and proxy.
</p>
<p>
One of the great things about Varnish is the <a href="http://varnish-cache.org/wiki/VCL">Varnish Configuration Language</a>. VCL files define the policies for Varnish when handling requests and for caching and are written in a syntax similar to C and Perl. What makes this so amazing is the following:</p>
<blockquote><p>
When a new configuration is loaded, the varnishd management process translates the VCL code to C and compiles it to a shared object which is then dynamically linked into the server process.
</p></blockquote>
<p>This just blows my mind. Talk about going the extra mile to squeeze out as much performance as you can from your application. It makes the VCL syntax much easier to understand when you can think about it in these terms and know what the application is going to do with it.
</p>
<p>
I&#8217;ve been sifting through VCL files in my free time to accumulate a list of nifty tricks that I might be interesting in using in the future. <a href="http://www.vim.org/">VIM</a> being my editor of choice, I hunted for a syntax file that would help when reading VCL files. I ran across <a href="http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/vim-syntax-vcl/vcl.vim">one</a> written by Elan Ruusamäe and it was exactly what I needed. Download the latest version and put it in your ~/.vim/syntax directory. Then make the following additions to your .vimrc:</p>
<pre>
au BufRead,BufNewFile *.vcl :set ft=vcl
au! Syntax vcl source ~/.vim/syntax/vcl.vim
</pre>
<p>Now I can enjoy syntax highlighting when ripping through example code like I would most other things I edit with VIM.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mgoff.in/2010/05/28/vim-syntax-highlighting-for-varnish-vcl-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

