<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>leafo.net</title>
<link>http://leafo.net</link>
<description>New posts and guides on leafo.net</description>
<item><title>Testing Lua projects with GitHub Actions</title>
<link>http://leafo.net/guides/testing-lua-modules-with-github-actions.html</link>
<pubDate>Sun 26 Apr 2020 11:06:30 AM PDT</pubDate>
<description><![CDATA[<p>Before getting started Configuring the Actions workflow Installing dependencies with LuaRocks Testing multiple versions of Lua with a matrix Running the action/workflow Add a status badge to your repository GitHub Actions is a free tool provided by G...</p>
<p><a href="http://leafo.net/guides/testing-lua-modules-with-github-actions.html">Read more...</a></p>]]></description></item>
<item><title>Calculating Percentile (and Median) in PostgreSQL</title>
<link>http://leafo.net/guides/postgresql-calculating-percentile.html</link>
<pubDate>Thu Aug  9 12:28:03 PDT 2018</pubDate>
<description><![CDATA[<p>Calculating The Median Calculating A Perentile Calculating All Percentiles Modern versions of PostgreSQL (≥ 9.4) make it easy to calculate the percentile for a list of values at any percentage using the percentile_cont and percentile_disc ordered-s...</p>
<p><a href="http://leafo.net/guides/postgresql-calculating-percentile.html">Read more...</a></p>]]></description></item>
<item><title>NGINX reverse proxy to self</title>
<link>http://leafo.net/guides/nginx-reverse-proxy-to-self.html</link>
<pubDate>2017-9-7</pubDate>
<description><![CDATA[<p>NGINX is known for its reverse proxy functionality: NGINX acts as a gateway server that can forward requests to a backend, while managing a large number of connections and ensuring clients are behaving correctly. Typically the server you proxy too is...</p>
<p><a href="http://leafo.net/guides/nginx-reverse-proxy-to-self.html">Read more...</a></p>]]></description></item>
<item><title>PostgreSQL Preloading</title>
<link>http://leafo.net/guides/postgresql-preloading.html</link>
<pubDate>2017-8-7</pubDate>
<description><![CDATA[<p>Avoiding n+1 queries Using a join Using a second query More preloading strategies Composite types Using JSON as a join alternative Selecting a subset of columns Getting a subset of a one to many relationship Subquery and row_to_json Querying hierarch...</p>
<p><a href="http://leafo.net/guides/postgresql-preloading.html">Read more...</a></p>]]></description></item>
<item><title>Building OpenResty with OpenSSL 1.0</title>
<link>http://leafo.net/guides/building-openresty-with-openssl-1-0.html</link>
<pubDate>Mon Jul 17 16:20:09 PDT 2017</pubDate>
<description><![CDATA[<p>OpenResty is the platform I use to build all of my web applications. At the moment, OpenResty only builds with OpenSSL 1.0 , but my distribution (Arch Linux), and maybe yours, has moved to OpenSSL 1.1. With a plain ./configure this means that OpenRes...</p>
<p><a href="http://leafo.net/guides/building-openresty-with-openssl-1-0.html">Read more...</a></p>]]></description></item>
<item><title>How itch.io uses Coroutines for non-blocking IO</title>
<link>http://leafo.net/posts/itchio-and-coroutines.html</link>
<pubDate>Thu Jun 09 2016 09:24:37</pubDate>
<description><![CDATA[<p>itch.io is a website for hosting indie games, its implementation is unique because it&rsquo;s written entirely in Lua ( MoonScript ). It runs inside of an nginx distribution called OpenResty . It uses coroutines for all asynchronous operations like d...</p>
<p><a href="http://leafo.net/posts/itchio-and-coroutines.html">Read more...</a></p>]]></description></item>
<item><title>Using LuaRocks to install packages in the current directory</title>
<link>http://leafo.net/guides/customizing-the-luarocks-tree.html</link>
<pubDate>Thu Jan 28 01:45:11 PST 2016</pubDate>
<description><![CDATA[<p>How Lua finds packages Setting the path with LuaRocks The install locations Using a custom directory Quick guide Installing a package Running scripts with packages Local install Global install LuaRocks is the package manager for Lua. When you decide ...</p>
<p><a href="http://leafo.net/guides/customizing-the-luarocks-tree.html">Read more...</a></p>]]></description></item>
<item><title>Dynamic scoping in Lua</title>
<link>http://leafo.net/guides/dynamic-scoping-in-lua.html</link>
<pubDate>Sun Jan 24 00:53:45 PST 2016</pubDate>
<description><![CDATA[<p>What is dynamic scoping An example Implementing dynamic scoping When to use dynamic scoping What is dynamic scoping Dynamic scoping is a programming language paradigm that you don&rsquo;t typically see. The scoping that most programmers are used to i...</p>
<p><a href="http://leafo.net/guides/dynamic-scoping-in-lua.html">Read more...</a></p>]]></description></item>
<item><title>Writing a DSL in Lua</title>
<link>http://leafo.net/guides/dsl-in-lua.html</link>
<pubDate>Sat Aug  8 12:20:12 PDT 2015</pubDate>
<description><![CDATA[<p>DSLs, or domain specific languages, are programming languages that are designed to implement a set of features specific to a particular problem or field. An example could be Make , the build tool, which is a specially designed language for combining ...</p>
<p><a href="http://leafo.net/guides/dsl-in-lua.html">Read more...</a></p>]]></description></item>
<item><title>Cloning a function in Lua</title>
<link>http://leafo.net/guides/function-cloning-in-lua.html</link>
<pubDate>Wed Jul  8 13:04:58 PDT 2015</pubDate>
<description><![CDATA[<p>Have you ever considered whether functions in Lua are mutable or not. In Lua, objects are mutable because properties and metatables can be changed. Strings and numbers are examples of types that aren&rsquo;t mutable: string library functions return n...</p>
<p><a href="http://leafo.net/guides/function-cloning-in-lua.html">Read more...</a></p>]]></description></item>
<item><title>Implementing setfenv in Lua 5.2, 5.3, and above</title>
<link>http://leafo.net/guides/setfenv-in-lua52-and-above.html</link>
<pubDate>Tue Jul 7 19:46:23 2015 -0700</pubDate>
<description><![CDATA[<p>If you&#x27;ve programmed in Lua 5.1 you&#x27;ve probably come across the function setfenv (and the associated getfenv ). Lua 5.2 removed those functions favor of the _ENV variable. The _ENV variable is an interesting change, and can accomplish many ...</p>
<p><a href="http://leafo.net/guides/setfenv-in-lua52-and-above.html">Read more...</a></p>]]></description></item>
<item><title>An in-depth look into the MoonScript class implementation</title>
<link>http://leafo.net/guides/moonscript-classes.html</link>
<pubDate>Sun Jul 5 01:19:19 2015 -0700</pubDate>
<description><![CDATA[<p>MoonScript&rsquo;s class system is great balance of functionality and brevity. It&rsquo;s simple to get started with, doesn&rsquo;t impose many restrictions, and is incredibly flexible when you need to do advanced things or bend the rules. Even if yo...</p>
<p><a href="http://leafo.net/guides/moonscript-classes.html">Read more...</a></p>]]></description></item>
<item><title>A new leafo.net</title>
<link>http://leafo.net/posts/a-new-leafonet.html</link>
<pubDate>Sat Jul  4 20:24:51 PDT 2015</pubDate>
<description><![CDATA[<p>I registered leafo.net over 11 years ago, on April 25th 2004, with nothing in mind. By December I had managed to turn it into a complete CMS with message board, blog posts, tutorials, news aggregator, and a flash arcade. My internet friends registere...</p>
<p><a href="http://leafo.net/posts/a-new-leafonet.html">Read more...</a></p>]]></description></item>
<item><title>An introduction to Parsing Expression Grammars with LPeg</title>
<link>http://leafo.net/guides/parsing-expression-grammars.html</link>
<pubDate>Sat Jul  4 00:35:09 PDT 2015</pubDate>
<description><![CDATA[<p>What is a PEG What is LPeg Installing LPeg Some simple grammars String equality Combining patterns Parsing numbers A calculator expression parser Closing What is a PEG A PEG, or Parsing Expression Grammar, is a way of describing a language (or patter...</p>
<p><a href="http://leafo.net/guides/parsing-expression-grammars.html">Read more...</a></p>]]></description></item>
<item><title>Using PostgreSQL with OpenResty</title>
<link>http://leafo.net/guides/using-postgres-with-openresty.html</link>
<pubDate>Fri Jul  3 21:28:18 PDT 2015</pubDate>
<description><![CDATA[<p>The modules pgmoon Installation Connecting Queries Preventing SQL injection Connection pooling Reference manual Issues I had with other modules The modules OpenResty is a special distribution on Nginx designed for building web applications in Lua. In...</p>
<p><a href="http://leafo.net/guides/using-postgres-with-openresty.html">Read more...</a></p>]]></description></item>
<item><title>Introducing Streak Club and draw with me for a year</title>
<link>http://leafo.net/posts/introducing_streakclub.html</link>
<pubDate>Sun Jan 25 2015 21:10:01</pubDate>
<description><![CDATA[<p>Today I&#x27;m launching a new website called Streak Club. It&rsquo;s a site for anyone to host creative streaks (I&#x27;ll explain below). Check it out at http://streak.club Why What&rsquo;s a streak Let&rsquo;s draw for a year Technology Why Over t...</p>
<p><a href="http://leafo.net/posts/introducing_streakclub.html">Read more...</a></p>]]></description></item>
<item><title>Nginx image processing server with OpenResty and Lua</title>
<link>http://leafo.net/posts/creating_an_image_server.html</link>
<pubDate>Fri Sep 20 2013 09:40:00</pubDate>
<description><![CDATA[<p>Today I&#x27;ll be showing you how to create a fast on the fly image processing server. The whole system can be created in less than 100 lines of code. We&#x27;ll be using OpenResty , an enhanced distribution of Nginx. We&#x27;ll also need to write a...</p>
<p><a href="http://leafo.net/posts/creating_an_image_server.html">Read more...</a></p>]]></description></item>
<item><title>MoonScript v0.2.4</title>
<link>http://leafo.net/posts/moonscript_v024.html</link>
<pubDate>Mon Jul 01 2013 08:38:38</pubDate>
<description><![CDATA[<p>I&#x27;m happy to announce MoonScript version 0.2.4, the CoffeeScript inspired language that compiles to Lua. It&rsquo;s been about 5 months since the last release. MoonScript 0.2.4 &mdash; moonscript.org Changes New Things Bug Fixes Code Generation ...</p>
<p><a href="http://leafo.net/posts/moonscript_v024.html">Read more...</a></p>]]></description></item>
<item><title>Introducing itch.io</title>
<link>http://leafo.net/posts/introducing_itchio.html</link>
<pubDate>Sun Mar 03 2013 20:25:05</pubDate>
<description><![CDATA[<p>Today I&#x27;m launching a new website called itch.io . It&rsquo;s a marketplace for hosting indie games with a &lsquo;pay what you want&rsquo; pricing model. Anyone can quickly upload their game and then customize the game&rsquo;s page. Check it out...</p>
<p><a href="http://leafo.net/posts/introducing_itchio.html">Read more...</a></p>]]></description></item>
<item><title>MoonScript v0.2.3</title>
<link>http://leafo.net/posts/moonscript_v023.html</link>
<pubDate>Thu Jan 24 2013 17:43:27</pubDate>
<description><![CDATA[<p>Today marks MoonScript version 0.2.3, the CoffeeScript inspired language that compiles to Lua. It&rsquo;s been about 3 months since last release. I&#x27;ve got a couple new features, fixes, Lua 5.2 support and a backwards incompatible change. MoonScr...</p>
<p><a href="http://leafo.net/posts/moonscript_v023.html">Read more...</a></p>]]></description></item>
<item><title>MoonScript v0.2.2</title>
<link>http://leafo.net/posts/moonscript_v022.html</link>
<pubDate>Sun Nov 04 2012 13:11:49</pubDate>
<description><![CDATA[<p>&mdash; Today marks MoonScript version 0.2.2, the CoffeeScript inspired language that compiles to Lua. It&rsquo;s been approximately 11 months since the last release, and I&#x27;d like to apologize for the long gap. Hopefully we&#x27;ll see more freq...</p>
<p><a href="http://leafo.net/posts/moonscript_v022.html">Read more...</a></p>]]></description></item>
<item><title>Using dmenu to open files quickly in Vim</title>
<link>http://leafo.net/posts/using_dmenu_to_open_quickly.html</link>
<pubDate>Mon May 21 2012 22:07:06</pubDate>
<description><![CDATA[<p>I&#x27;ve been using the FuzzyFinder plugin for Vim for quite some time. It&rsquo;s an invaluable part of my development toolbox. I&#x27;ve tried a handful other fuzzy style file finders, but FuzzyFinder always has been the most reliable. There&rsquo...</p>
<p><a href="http://leafo.net/posts/using_dmenu_to_open_quickly.html">Read more...</a></p>]]></description></item>
<item><title>Getting started with MoonScript</title>
<link>http://leafo.net/posts/getting_started_with_moonscript.html</link>
<pubDate>Sun Feb 19 2012 21:06:27</pubDate>
<description><![CDATA[<p>Last updated Fri May 2 2014 MoonScript is an open source prgramming language which compiles into Lua . Lua is a very powerful dynamically typed language. It supports features like functions as first class objects, closures, tail-recursion and a high ...</p>
<p><a href="http://leafo.net/posts/getting_started_with_moonscript.html">Read more...</a></p>]]></description></item>
<item><title>Running Lua on Heroku</title>
<link>http://leafo.net/posts/lua_on_heroku.html</link>
<pubDate>Sun Feb 05 2012 10:48:29</pubDate>
<description><![CDATA[<p>Since the release of Heroku &rsquo;s Cedar platform they&#x27;ve opened up the opportunity for users to run web applications on any stack. Using something called a buildpack we can describe a template for deploying any kind of application. I saw this...</p>
<p><a href="http://leafo.net/posts/lua_on_heroku.html">Read more...</a></p>]]></description></item>
<item><title>MoonScript v0.2.0</title>
<link>http://leafo.net/posts/moonscript_v020.html</link>
<pubDate>Sun Dec 11 2011 18:22:02</pubDate>
<description><![CDATA[<p>Exactly 3 months ago I released MoonScript . The CoffeeScript inspired language that compiles to Lua. Since then I&#x27;ve both written a lot of MoonScript and enhanced the MoonScript compiler. Today I&#x27;m proud to release v0.2.0. I&#x27;ve got a ...</p>
<p><a href="http://leafo.net/posts/moonscript_v020.html">Read more...</a></p>]]></description></item></channel></rss>