<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>

  var _gaq = _gaq || [];
  _gaq.push([‘_setAccount’, ‘UA-17675490-2’]);
  _gaq.push([‘_trackPageview’]);

  (function() {
    var ga = document.createElement(‘script’); ga.type = ‘text/javascript’; ga.async = true;
    ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘.google-analytics.com/ga.js’;
    var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(ga, s);
  })();</description><title>Just in Time</title><generator>Tumblr (3.0; @pavelz)</generator><link>http://journal.arslogic.ca/</link><item><title>Compass &amp; Asset Pipeline Rant</title><description>&lt;p&gt;&lt;rant&gt;&lt;/p&gt;
&lt;p&gt;Compass has moved into the area of asset management, stylesheet generation a long time ago. Yet asset pipeline is sort of interfering  with Goodness that compass is. New compass 0.12 promises to integrate more fully into asset pipeline engine, but it isn’t fair for many of the compass crowd to be writing suboptimal code for older versions of rails while they evolve at ever increasing rate. &lt;/p&gt;
&lt;p&gt;Releases of rails app come out faster and faster and it seems that many of the plugins and libraries fail to catch up at an acceptable rate. Perhaps moving forward DHH &amp; Co, can put forth plans of what they will do instead of doing whole cowboy thing and whipping out versions of rails that behave quite differently from their earlier cousins in respect to plugins and extension gems.&lt;/p&gt;
&lt;p&gt;&lt;/rant&gt;&lt;/p&gt;</description><link>http://journal.arslogic.ca/post/16697610505</link><guid>http://journal.arslogic.ca/post/16697610505</guid><pubDate>Sun, 29 Jan 2012 10:26:55 -0500</pubDate></item><item><title>Integrate nginx with upload , mogilefs and passenger module in MacPorts</title><description>&lt;p&gt;At the end of the post there is Portfile bit that you find on your system like so:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;find /opt -iname ‘Portfile’|grep nginx&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This allows to install 3 modules at once via variants option in macports. Install command would be:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;sudo port install nginx +passenger +mogilefs +upload&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You may place this file however in your home directory: /Users/jondoe/&lt;strong&gt;macports/www/nginx/Portfile&lt;/strong&gt; and it will take precedence over one that is placed in &lt;strong&gt;/opt/local/var/macports&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Portfile bit:&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;br/&gt;variant passenger description {Passenger Hack} {&lt;br/&gt;    configure.args-append   —add-module=/usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.4/ext/nginx&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;variant mogilefs description {Enable mogilefs module\&lt;br/&gt;        (&lt;a href="http://www.grid.net.ru/nginx/mogilefs.ru.html"&gt;http://www.grid.net.ru/nginx/mogilefs.ru.html&lt;/a&gt;)} {&lt;br/&gt;    set mogilefs_filename nginx_mogilefs_module&lt;br/&gt;    set mogilefs_version  1.0.4&lt;br/&gt;    set mogilefs_distname ${mogilefs_filename}-${mogilefs_version}&lt;br/&gt;    distfiles-append    ${mogilefs_distname}.tar.gz:mogilefs_module&lt;br/&gt;    checksums-append    ${mogilefs_distname}.tar.gz \&lt;br/&gt;                        md5   2466aa02b225ad2aa1af22e6e50a9d2f&lt;br/&gt;    configure.args-append   —add-module=${workpath}/${mogilefs_distname}&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;variant upload description {Enable Valery Kholodkov’s upload module\&lt;br/&gt;        (&lt;a href="http://grid.net.ru/nginx/upload.en.html"&gt;http://grid.net.ru/nginx/upload.en.html&lt;/a&gt;)} {&lt;br/&gt;    set upload_filename nginx_upload_module&lt;br/&gt;    set upload_version  2.2.0&lt;br/&gt;    set upload_distname ${upload_filename}-${upload_version}&lt;br/&gt;    distfiles-append    ${upload_distname}.tar.gz:upload_module&lt;br/&gt;    checksums-append    ${upload_distname}.tar.gz \&lt;br/&gt;                        md5     2681a6167551830a23336fa41bc539a1 \&lt;br/&gt;                        sha1    93d6e83e613a0ce2ed057a434b344fa1b6609b47 \&lt;br/&gt;                        rmd160  5734af837be3fe8ec444a7e5e7f6707118594098&lt;br/&gt;    configure.args-append   —add-module=${workpath}/${upload_distname}&lt;br/&gt;}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;There is a helpful post for installing nginx with modules from &lt;a href="http://openmymind.net/2010/7/1/Installing-Nginx-with-Passenger-on-Linux"&gt;OpenMyMind.&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;&lt;/blockquote&gt;</description><link>http://journal.arslogic.ca/post/5603433970</link><guid>http://journal.arslogic.ca/post/5603433970</guid><pubDate>Wed, 18 May 2011 06:17:00 -0400</pubDate></item><item><title>C2Go @ stanford</title><description>&lt;p&gt;C has been the workhorse language for writing native code for projects likes of scripted language extensions, binding those to various libraries or just plain writing simple high performance systems utilities.&lt;/p&gt;
&lt;p&gt;Go is the new kid on the block and I did come across &lt;a title="Stanford: C to Go" href="http://www-cs-students.stanford.edu/~blynn/c2go/"&gt;an article&lt;/a&gt; that sort of makes clear how to transition (at least for me) from C to Go programming.&lt;/p&gt;
&lt;p&gt;A quick skim might give you an idea wether you might use this language or not, thought Google being where it is, this language may well be the next step beyond C.&lt;/p&gt;</description><link>http://journal.arslogic.ca/post/5388093197</link><guid>http://journal.arslogic.ca/post/5388093197</guid><pubDate>Wed, 11 May 2011 06:49:54 -0400</pubDate></item><item><title>Not great error messages</title><description>&lt;p&gt;Sometimes developers need to be a bit kinder to other developers. Such as telling them more about what is going on, if behaviour deviates from generally intended path of execution. Such as, when I have installed &lt;strong&gt;thinking-sphinx&lt;/strong&gt;  in rails 3 app, i have gotten a message:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;found version:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;and that was it. Having this plugin used in the past and knowing that I had done fresh system reinstall I’ve gone to check wether I have the binaries of the sphinx server - which I didn’t have. All was fixed in a few minutes, yet somehow I think this error should’ve been a bit more descriptive.&lt;/p&gt;
&lt;p&gt;I think I’ve got to submit a patch.&lt;/p&gt;</description><link>http://journal.arslogic.ca/post/5300702532</link><guid>http://journal.arslogic.ca/post/5300702532</guid><pubDate>Sun, 08 May 2011 06:30:01 -0400</pubDate></item><item><title>Great weather</title><description>&lt;p&gt;The spring finally came, and the summer seems to step on springs toes. People are out, and the office is empty.some went to usa some tuo europe. Traffic volume has dropped three fold…&lt;/p&gt;</description><link>http://journal.arslogic.ca/post/4980536626</link><guid>http://journal.arslogic.ca/post/4980536626</guid><pubDate>Wed, 27 Apr 2011 04:40:43 -0400</pubDate></item><item><title>nginx + upload + paperclip</title><description>&lt;p&gt;Just recently I have tasked myself with supplementing image uploading mechanism with nginx’s upload module.&lt;/p&gt;
&lt;p&gt;Rails is written in pure ruby, so naturally uploading which implies decoding hundreds if not thousands kilobytes from a multi-part text stream into binary form on the disk. As if image manipulation wasn’t taxing enough - so decision was made to accelerate it with a well known third party nginx&lt;a href="http://www.grid.net.ru/nginx/upload.en.html"&gt; &lt;/a&gt;&lt;em&gt;&lt;a href="http://www.grid.net.ru/nginx/upload.en.html"&gt;upload module.&lt;/a&gt;&lt;br/&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;First thing you need to load and install nginx, preferably latest stable version. If you use MacOS X you can install it as easily as launching ports install comand like so:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;port install nginx +upload&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For from source install you would need to install nginx with specifying path the source of the upload module like so:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;./configure —prefix=/usr/local —add-module=../nginx_upload-*.tar.gz&lt;br/&gt;make &amp;&amp; make install&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Then you need to configure a location which will be responsible for receiving paths to decoded files. As it happens decoding gives you content-type for each of the file that has been decoded. It can be done like so:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;br/&gt;server {&lt;br/&gt;    client_max_body_size 100m;&lt;br/&gt;    listen       80;&lt;br/&gt;&lt;br/&gt;    # Upload form should be submitted to this location&lt;br/&gt;    location /upload {&lt;br/&gt;        # Pass altered request body to this location&lt;br/&gt;        upload_pass   @test;&lt;br/&gt;&lt;br/&gt;        # Store files to this directory&lt;br/&gt;        # The directory is hashed, subdirectories 0 1 2 3 4 5 6 7 8 9 should exist&lt;br/&gt;        upload_store /tmp 1;&lt;br/&gt;        &lt;br/&gt;        # Allow uploaded files to be read only by user&lt;br/&gt;        upload_store_access user:r;&lt;br/&gt;&lt;br/&gt;        # Set specified fields in request body&lt;br/&gt;        upload_set_form_field $upload_field_name.name “$upload_file_name”;&lt;br/&gt;        upload_set_form_field $upload_field_name.content_type “$upload_content_type”;&lt;br/&gt;        upload_set_form_field $upload_field_name.path “$upload_tmp_path”;&lt;br/&gt;&lt;br/&gt;        # Inform backend about hash and size of a file&lt;br/&gt;        upload_aggregate_form_field “$upload_field_name.md5” “$upload_file_md5”;&lt;br/&gt;        upload_aggregate_form_field “$upload_field_name.size” “$upload_file_size”;&lt;br/&gt;&lt;br/&gt;        upload_pass_form_field “^submit$|^description$”;&lt;br/&gt;&lt;br/&gt;        upload_cleanup 400 404 499 500-505;&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    # Pass altered request body to a backend&lt;br/&gt;    location @test {&lt;br/&gt;        proxy_pass   http://localhost:8080;&lt;br/&gt;    }&lt;br/&gt;}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This excerpt is taken from upload pugin doc page. I know this works like this: the plugin monitors incoming requests for them to have multipart encoded data. Once it has found such a connection that contains a  file - it decodes the file on the the disk into a temporary location. It allows you to set one of the variables to contain a path to the decoded file. It passes then ‘compressed’ version of the request - sans data representing file data through to the proxy location specified.&lt;/p&gt;
&lt;p&gt;If you application server is running on http://localhost:8080, you need to have it accept modified forms and paths to the files saved to the disk.&lt;/p&gt;
&lt;p&gt;Upload module can conveniently remove tmp files for you, if you app generates some sort of errors via upload_cleanup directive, which specifies upon return of what HTTP status code it should remove the file from the disk, before letting nginx process next request.&lt;/p&gt;
&lt;p&gt;Then you can add Rails Rack MiddleWare to open files, paths to which are passed in the form, replacing the form variable with a handle to an open file. You must delete uploaded files though.&lt;/p&gt;</description><link>http://journal.arslogic.ca/post/3599866758</link><guid>http://journal.arslogic.ca/post/3599866758</guid><pubDate>Tue, 12 Apr 2011 08:00:00 -0400</pubDate></item><item><title>Rails 3 &amp; Railties</title><description>&lt;p&gt;Rails 3 introduced a new package and a set of new conventions for plugin integration.&lt;/p&gt;
&lt;p&gt;You will need to be familiar with writing a GEM and Api that Railtie GEM provides.&lt;/p&gt;
&lt;p&gt;There is a number of excellent articles out there, I can recommend two of them one is &lt;a href="http://railscasts.com/episodes/135-making-a-gem"&gt;GEM railscast&lt;/a&gt; and other is explaining &lt;a href="http://www.engineyard.com/blog/2010/extending-rails-3-with-railties/"&gt;Railties by example&lt;/a&gt;.&lt;/p&gt;</description><link>http://journal.arslogic.ca/post/1282598963</link><guid>http://journal.arslogic.ca/post/1282598963</guid><pubDate>Sun, 10 Oct 2010 06:04:00 -0400</pubDate></item><item><title>Django vs Rails Shootout</title><description>&lt;p&gt;It is being delayed by one week, as real work takes precedence over software tomfoolery :)&lt;/p&gt;</description><link>http://journal.arslogic.ca/post/767291587</link><guid>http://journal.arslogic.ca/post/767291587</guid><pubDate>Sat, 03 Jul 2010 21:29:26 -0400</pubDate></item><item><title>scrollWidth &amp; jQuery missing it</title><description>&lt;p&gt;With animating certain parts UI, one comes to appreciate el.getScrollSize() in mooTools pretty fast.&lt;/p&gt;
&lt;p&gt;jQuery is missing this function. How it looks in mooTools.&lt;/p&gt;

&lt;p&gt;2432     getScrollSize: function(){&lt;/p&gt;
&lt;p&gt;2433         var doc = getCompatElement(this), min = this.getSize();&lt;/p&gt;
&lt;p&gt;2434         return {x: Math.max(doc.scrollWidth, min.x), y: Math.max(doc.scrollHeight, min.y)};&lt;/p&gt;
&lt;p&gt;2435     },&lt;/p&gt;

&lt;p&gt;There is a plugin for jQuery that does enable different sizing patterns. I would think it to be essential since javascript is enabling transition active web apps from Flash to HTML5.&lt;/p&gt;</description><link>http://journal.arslogic.ca/post/735773617</link><guid>http://journal.arslogic.ca/post/735773617</guid><pubDate>Fri, 25 Jun 2010 17:12:37 -0400</pubDate></item><item><title>Rails &amp; Django</title><description>&lt;p&gt;Over next week I will be picking up bits of Django. And writing comparing ORM, Template Engine, Url routing and other components of two of these popular frameworks.&lt;/p&gt;</description><link>http://journal.arslogic.ca/post/735468492</link><guid>http://journal.arslogic.ca/post/735468492</guid><pubDate>Fri, 25 Jun 2010 15:13:07 -0400</pubDate></item><item><title>node.js is pure awesome</title><description>&lt;p&gt;node.js is catching attention of many web developers. It seems that it will primetime sometime this summer when market demand for Web 3.0 apps will materialize. Key selling point of node.js is brutal efficency in terms of small bits of data, short requests.&lt;/p&gt;
&lt;p&gt;Alot of people seem to have varying ways of defining Web 3.0, node.js I think will be the kind of backing technology for such a beast. Plurk sort of showed us how it will all be, even though its a bit quirky. 3.0 with be defined by javascript heavy client side apps (utilizing HTML5 when it comes) or using crutches like JQuery &amp; MooTools to provide crossbrowser platform. node.js couples wonderfully to with Javascript on client side, and can provide realtime data, by the time WebSockets will come around.&lt;/p&gt;
&lt;p&gt;Because node.js is javascript and much of active pseudo-application like content (AJAX &amp; more) is backed by javascript, it will allow to reduce costs &amp; complexities as Java promised and JavaScript (dare I say ECMA Script ? ) has delivered. JSON is already the most popular format for many people, as XML is highly complex. Most just hate it. JSON format is essentially Javascript.&lt;/p&gt;
&lt;p&gt;Node.js follows a paradigm change in web request processing, initiated with nginx a project written to replace Apache. Node.js uses event driven processing and non-blocking IO/Database access to achieve efficency that we could only dream of. V8 JIT technology boosts performance quite a bit as well. And performance is improved by an order of magnitude. Yes, that it is around 10 times faster then comparable solutions with Ruby or Java.&lt;/p&gt;
&lt;p&gt;Check out &lt;a href="http://nodejs.org/"&gt;http://nodejs.org/&lt;/a&gt;&lt;/p&gt;</description><link>http://journal.arslogic.ca/post/394941439</link><guid>http://journal.arslogic.ca/post/394941439</guid><pubDate>Wed, 17 Feb 2010 12:22:11 -0500</pubDate></item></channel></rss>

