<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><title>kirit.com (Complete feed)</title><link>http://www.kirit.com/</link><description>Complete feed of all news, announcements and posts</description><generator>FOST.3™ RSS 2.0 Generator (Script/ASP) 0.1</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><ttl>60</ttl><language>en-gb</language>
<item><guid isPermaLink="true">http://www.kirit.com/News:/1723796</guid><link>http://www.kirit.com/News:/1723796</link><pubDate>1 Jul 2008 01:53:17 GMT</pubDate><title>June 2008</title>
<description>&lt;div&gt;There are so many things I would have written about this month if only I'd had the time :(&lt;/div&gt;</description>
</item>

<item><guid isPermaLink="true">http://www.kirit.com/_fslib/_content/thread.asp?id=1722813#post-1723784</guid><link>http://www.kirit.com/_fslib/_content/thread.asp?id=1722813#post-1723784</link><pubDate>28 Jun 2008 13:13:11 GMT</pubDate><title>Post by Kirit Sælensminde in thread This is by far one of the best c++ programming posts I have ever read....</title>
<description>&lt;div&gt;&lt;blockquote&gt;&lt;p class=&quot;Cites&quot;&gt;&lt;a class=&quot;External&quot; href=&quot;http://www.kirit.com/_fslib/_content/thread.asp?id=1722813#post-1723769&quot; title=&quot;Display this post&quot;&gt;Adrian said&lt;/a&gt;&lt;/p&gt;&lt;p&gt;I'm not sure about this… isn't this writing a lot of code just to avoid writing a getter/setter pair?  The containing class is easier to read, but to understand the class as a whole you can no longer read just one file.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;I think that depends on how common the idiom is in the source code. For example, we don't worry about having to look up things like std::map or std::pair — we just use them and expect anybody reading the code to know what they are. The parts of the libraries that get used a lot need to be learned by the developers and when that happens the shorter class definitions are well worth it.&lt;/p&gt;&lt;p&gt;I don't think that the technique has much merit if not used pretty widely.&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;if ( nLat &amp;lt; 180. || nLat &amp;gt;= 180. )&lt;/pre&gt;&lt;/blockquote&gt;&lt;p&gt;I stared at this for many minutes thinking “there's nothing wrong there, what does he mean?” before I spotted the missing minus on the first half of the test. Thanks for spotting that.&lt;/p&gt;&lt;/div&gt;</description>
<category domain="http://www.kirit.com/Site:/Categories">Microsoft Visual C++™</category>
<category domain="http://www.kirit.com/Site:/Categories">Exposition</category>
<category domain="http://www.kirit.com/Site:/Categories">Programming</category>
<comments>http://www.kirit.com/_fslib/_content/thread.asp?id=1722813</comments></item>

<item><guid isPermaLink="true">http://www.kirit.com/_fslib/_content/thread.asp?id=1722813#post-1723769</guid><link>http://www.kirit.com/_fslib/_content/thread.asp?id=1722813#post-1723769</link><pubDate>27 Jun 2008 19:49:56 GMT</pubDate><title>Post by Adrian in thread This is by far one of the best c++ programming posts I have ever read....</title>
<description>&lt;div&gt;I'm not sure about this… isn't this writing a lot of code just to avoid writing a getter/setter pair?  The containing class is easier to read, but to understand the class as a whole you can no longer read just one file.&lt;/div&gt;</description>
<category domain="http://www.kirit.com/Site:/Categories">Microsoft Visual C++™</category>
<category domain="http://www.kirit.com/Site:/Categories">Exposition</category>
<category domain="http://www.kirit.com/Site:/Categories">Programming</category>
<comments>http://www.kirit.com/_fslib/_content/thread.asp?id=1722813</comments></item>

<item><guid isPermaLink="true">http://www.kirit.com/_fslib/_content/thread.asp?id=1722813#post-1723767</guid><link>http://www.kirit.com/_fslib/_content/thread.asp?id=1722813#post-1723767</link><pubDate>27 Jun 2008 19:27:02 GMT</pubDate><title>Post by Adrian in thread This is by far one of the best c++ programming posts I have ever read....</title>
<description>&lt;div&gt;&lt;p&gt;I'm a bit confused by the third code example.  When does this resolve to false:&lt;/p&gt;&lt;p&gt;if ( nLat &amp;lt; 180. || nLat &amp;gt;= 180. )&lt;/p&gt;&lt;/div&gt;</description>
<category domain="http://www.kirit.com/Site:/Categories">Microsoft Visual C++™</category>
<category domain="http://www.kirit.com/Site:/Categories">Exposition</category>
<category domain="http://www.kirit.com/Site:/Categories">Programming</category>
<comments>http://www.kirit.com/_fslib/_content/thread.asp?id=1722813</comments></item>

<item><guid isPermaLink="true">http://www.kirit.com/_fslib/_content/thread.asp?id=1723730#post-1723753</guid><link>http://www.kirit.com/_fslib/_content/thread.asp?id=1723730#post-1723753</link><pubDate>22 Jun 2008 16:36:37 GMT</pubDate><title>Post by Tibbar in thread Hi</title>
<description>&lt;div&gt;&lt;blockquote&gt;&lt;p class=&quot;Cites&quot;&gt;&lt;a class=&quot;External&quot; href=&quot;http://www.kirit.com/_fslib/_content/thread.asp?id=1723730#post-1723732&quot; title=&quot;Display this post&quot;&gt;Vasudha said&lt;/a&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p class=&quot;Cites&quot;&gt;&lt;a class=&quot;External&quot; href=&quot;http://www.kirit.com/_fslib/_content/thread.asp?id=1723730#post-1723729&quot; title=&quot;Display this post&quot;&gt;Vasudha said&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Hi Tai, I am vasudha. Met you in the airoplane. went through your website. wow lots to go through. Hope you are doing fine. Nice snap :) take care Vasudha&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;hey do you remember we talked abt massages and I told you about ayurveda go through the link below :).. hope its interesting for you&lt;/p&gt;&lt;p&gt;http://en.wikipedia.org/wiki/Ayurveda&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Hello Vasudha,&lt;/p&gt;&lt;p&gt;Sorry for the late reply. Cause I was flying all the time. Thank you for the information about Ayurveda. I'll try it next time when I fly to India.&lt;/p&gt;&lt;p&gt;I am glad that you like my husband's website. Hope you might find something useful from it. &lt;/p&gt;&lt;p&gt;Nice to hear from you and keep in touch.&lt;/p&gt;&lt;p&gt;tai&lt;/p&gt;&lt;/div&gt;</description>
<category domain="http://www.kirit.com/Site:/Categories">Photos</category>
<comments>http://www.kirit.com/_fslib/_content/thread.asp?id=1723730</comments></item>

<item><guid isPermaLink="true">http://www.kirit.com/Blog:/2008-06-22/Mahlee%20interactive%20shell%20released</guid><link>http://www.kirit.com/Blog:/2008-06-22/Mahlee%20interactive%20shell%20released</link><pubDate>22 Jun 2008 10:50:29 GMT</pubDate><title>2008-06-22/Mahlee interactive shell released</title>
<description>&lt;div&gt;&lt;p&gt;This new version of &lt;a class=&quot;External&quot; href=&quot;http://www.kirit.com/Introducing%20Mahlee%E2%84%A2&quot; title=&quot;Show the article: Introducing Mahlee™&quot;&gt;Mahlee™&lt;/a&gt; introduces a simple interactive shell. This version of the shell can be used to explore Mahlee and &lt;a class=&quot;External&quot; href=&quot;http://www.kirit.com/Categories:/FOST.3%E2%84%A2&quot; title=&quot;Show the article: « Categories » FOST.3™&quot;&gt;FOST.3™&lt;/a&gt; systems and is also suitable for experimenting with and learning JavaScript.&lt;/p&gt;&lt;p&gt;I'm still not in a position where I can include source code in this distribution, but I should be able to supply it to anybody who wants a copy — just ask.&lt;/p&gt;&lt;p&gt;This release is still &lt;a class=&quot;External&quot; href=&quot;http://www.kirit.com/Categories:/Microsoft%20Windows%E2%84%A2&quot; title=&quot;Show the article: « Categories » Microsoft Windows™&quot;&gt;Windows™&lt;/a&gt; only, but some progress has been made with “Mahlee on Rhino” which will support &lt;a class=&quot;External&quot; href=&quot;http://www.kirit.com/Categories:/Linux%E2%84%A2&quot; title=&quot;Show the article: « Categories » Linux™&quot;&gt;Linux™&lt;/a&gt;. Watch this space!&lt;/p&gt;&lt;h2&gt;Download&lt;/h2&gt;&lt;p&gt;The installer can be downloaded from &lt;a class=&quot;External&quot; href=&quot;http://dl.felspar.com/Mahlee%20setup.0.0.3.32186.exe&quot;&gt;http://dl.felspar.com/Mahlee%20setup.0.0.3.32186.exe&lt;/a&gt;.&lt;/p&gt;&lt;h2&gt;Sample session&lt;/h2&gt;&lt;pre&gt;C:\&amp;gt;&quot;Program Files\Felspar\bin\fhost&quot;
FHost - FOST.3 Scripting Host
Copyright (C) 1995-2008, Felspar.
REPL start up — Press CTRL-z then ENTER to exit
&amp;gt;seq = []

&amp;gt;while ( seq.length &amp;lt; 30 ) seq.push( seq.length )
30
&amp;gt;seq
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29
&amp;gt;Array.prototype.sum = function() { var s = 0; for ( var i = 0; i &amp;lt; this.length; ++i ) s += this[ i ]; return s; }
function() { var s = 0; for ( var i = 0; i &amp;lt; this.length; ++i ) s += this[ i ]; return s; }
&amp;gt;seq.sum()
435
&amp;gt;Array.prototype.sum = function() { return eval( this.join( '+' ) ); }
function() { return eval( this.join( '+' ) ); }
&amp;gt;seq.sum()
435
&amp;gt;REPL.prompt = function() { FOSTLib.Now() + &quot; &amp;gt;&quot;; }
function() { FOSTLib.Now() + &quot; &amp;gt;&quot;; }
&amp;gt;REPL.prompt = function() { return FOSTLib.Now() + &quot; &amp;gt;&quot;; }
function() { return FOSTLib.Now() + &quot; &amp;gt;&quot;; }
2008-06-22 10:43:29.005 &amp;gt;
2008-06-22 10:43:31.343 &amp;gt;REPL.last
function() { return FOSTLib.Now() + &quot; &amp;gt;&quot;; }
2008-06-22 10:46:32.220 &amp;gt;&lt;/pre&gt;&lt;h2&gt;Bugs and issues&lt;/h2&gt;&lt;h3&gt;Use of COM objects&lt;/h3&gt;&lt;p&gt;Creating a &lt;acronym title=&quot;Component Object Model — A standard way of describing and interacting with parts of computer software. Surprisingly not a Microsoft only technology.&quot;&gt;COM&lt;/acronym&gt; error will produce an error when the result is to be printed. For example:&lt;/p&gt;&lt;pre&gt;&amp;gt;fso = FHost.CreateObject( &quot;Scripting.FileSystemObject&quot; );
COM Error
Within VARIANT_to_wstring()
Details:
  Description: Unknown COM error - No error message contained in the exception decription.
  Source: Unknown
  Error Message: 'Type mismatch.'&lt;/pre&gt;&lt;p&gt;The COM object is correctly created however, it just can't be displayed (unless the COM object itself makes special provision for this).&lt;/p&gt;&lt;h3&gt;Single threaded&lt;/h3&gt;&lt;p&gt;The interactive shell makes use of the single threaded Mahlee™ host, not the multi-threaded one. The &lt;acronym title=&quot;Application Program Interface — The way that software links to other software&quot;&gt;API&lt;/acronym&gt; can be explored, but some things of course won't work in exactly the same way.&lt;/p&gt;&lt;/div&gt;</description>
<category domain="http://www.kirit.com/Site:/Categories">Download</category>
<category domain="http://www.kirit.com/Site:/Categories">Microsoft Windows™</category>
<category domain="http://www.kirit.com/Site:/Categories">Mahlee™</category>
<category domain="http://www.kirit.com/Site:/Categories">Linux™</category>
</item>

<item><guid isPermaLink="true">http://www.kirit.com/_fslib/_content/thread.asp?id=1723730#post-1723732</guid><link>http://www.kirit.com/_fslib/_content/thread.asp?id=1723730#post-1723732</link><pubDate>19 Jun 2008 15:34:29 GMT</pubDate><title>Post by Vasudha in thread Hi</title>
<description>&lt;div&gt;&lt;blockquote&gt;&lt;p class=&quot;Cites&quot;&gt;&lt;a class=&quot;External&quot; href=&quot;http://www.kirit.com/_fslib/_content/thread.asp?id=1723730#post-1723729&quot; title=&quot;Display this post&quot;&gt;Vasudha said&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Hi Tai, I am vasudha. Met you in the airoplane. went through your website. wow lots to go through. Hope you are doing fine. Nice snap :) take care Vasudha&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;hey do you remember we talked abt massages and I told you about ayurveda go through the link below :).. hope its interesting for you&lt;/p&gt;&lt;p&gt;http://en.wikipedia.org/wiki/Ayurveda&lt;/p&gt;&lt;/div&gt;</description>
<category domain="http://www.kirit.com/Site:/Categories">Photos</category>
<comments>http://www.kirit.com/_fslib/_content/thread.asp?id=1723730</comments></item>

<item><guid isPermaLink="true">http://www.kirit.com/_fslib/_content/thread.asp?id=1723730#post-1723729</guid><link>http://www.kirit.com/_fslib/_content/thread.asp?id=1723730#post-1723729</link><pubDate>19 Jun 2008 15:11:04 GMT</pubDate><title>Post by Vasudha in thread Hi</title>
<description>&lt;div&gt;Hi Tai, I am vasudha. Met you in the airoplane. went through your website. wow lots to go through. Hope you are doing fine. Nice snap :) take care Vasudha&lt;/div&gt;</description>
<category domain="http://www.kirit.com/Site:/Categories">Photos</category>
<comments>http://www.kirit.com/_fslib/_content/thread.asp?id=1723730</comments></item>

<item><guid isPermaLink="true">http://www.kirit.com/News:/1723432</guid><link>http://www.kirit.com/News:/1723432</link><pubDate>31 May 2008 09:26:04 GMT</pubDate><title>May 2008</title>
<description>&lt;div&gt;&lt;p&gt;Back in around 1995 when I started to write web applications it was already pretty clear that asking a web server something and getting it to process a form were really forms of remote procedure calls (RPC).&lt;/p&gt;&lt;p&gt;I remember on first hearing about &lt;acronym title=&quot;Simple Object Access Protocol or Service Oriented Architecture Protocol — A rather baroque way of calling functions over the web&quot;&gt;SOAP&lt;/acronym&gt; that it would be nice to have a consistent format for this mechanism, but instead of keeping to a simple mechanism it seems to have grown rather baroque over the years.&lt;/p&gt;&lt;p&gt;The basic idea of RPC over &lt;acronym title=&quot;HyperText Transfer Protocol — The language your web browser uses to fetche these pages from the server&quot;&gt;HTTP&lt;/acronym&gt; is pretty straightforward. Where things get complicated is in the myriad ways of actually doing anything useful – how do you handle parameters and pass values for example?&lt;/p&gt;&lt;pre&gt;http://example.com/factorial/6
http://example.com/factorial?n=6&lt;/pre&gt;&lt;p&gt;Both of the above URLs are perfectly reasonable ways of asking for the factorial of 6, so which should you use? The first feels more like a positional calling convention – something used in most programming languages. The second is a named parameter mechanism. From a programming language syntax point of view we might think of it as something like these two:&lt;/p&gt;&lt;pre&gt;factorial(6)
factorial(n = 6)&lt;/pre&gt;&lt;p&gt;I suspect that when looking at &lt;acronym title=&quot;Uniform Resource Locator — The sort of web address you normally see&quot;&gt;URL&lt;/acronym&gt;s we're probably more familiar with the second form even though most of the languages we program in prefer the first. Odd.&lt;span class=&quot;Footnote&quot;&gt;&lt;span class=&quot;Footnote-Number&quot;&gt;¹&lt;/span&gt;&lt;span class=&quot;Footnote-Note&quot;&gt;&lt;span class=&quot;Footnote-Note-In&quot;&gt; [&lt;/span&gt;&lt;span class=&quot;Footnote-Note-Number&quot;&gt;1&lt;/span&gt;A browser given either of the two URLs will cache the result, but they have subtly different  behaviour between the two. The first form will be much more aggressively cached, which of course fits in better with a function like factorial which is pure (in the functional programming sense) – it will always return the same answer for the same input. It's kind of neat that standard HTTP proxies and caching mechanisms will perform a sort of distributed memoization for this type of function call.&lt;span class=&quot;Footnote-Note-Out&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Another thing to think about is what the first part of the URL really is. A binary function might be more illuminating.&lt;/p&gt;&lt;pre&gt;http://example.com/add/2/5
http://example.com/add/1&lt;/pre&gt;&lt;p&gt;These are somewhat analogous to the following:&lt;/p&gt;&lt;pre&gt;add 2 5
add 2&lt;/pre&gt;&lt;p&gt;The first will simply return the answer, but the second is just partial application and it will return a function. Really the URL before we apply the parameters is a form of lambda. Of course if we have lambdas then we should also be thinking of higher order functions.&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;python&quot;&gt;def  ntofirst(f):
    def deco(*args, **kwargs):
         args += (kwargs['n'],)
         del(kwargs['n'])
         return f(args, kwargs)
    return deco&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The above Python decorator &lt;span class=&quot;Footnote&quot;&gt;&lt;span class=&quot;Footnote-Number&quot;&gt;²&lt;/span&gt;&lt;span class=&quot;Footnote-Note&quot;&gt;&lt;span class=&quot;Footnote-Note-In&quot;&gt; [&lt;/span&gt;&lt;span class=&quot;Footnote-Note-Number&quot;&gt;2&lt;/span&gt;Notice how neatly Python's dual notion of positional and keyword arguments fits in to the URL calling convention.&lt;span class=&quot;Footnote-Note-Out&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; is the sort of thing that we might employ to turn the URL http://example.com/factorial?n=6 into http://example.com/factorial/6. Calling this over the web I suppose might look something like this&lt;/p&gt;&lt;pre&gt;http://example.com/ntofirst/example.com%25factorial&lt;/pre&gt;&lt;p&gt;But what is returned? In normal programming terms the thing we get back is a lambda with a closure. Clearly for the web that needs to be a represented by a URL too, and this is where things get harder.&lt;/p&gt;&lt;p&gt;I can see two reasonable types that might be returned here. The first is a version of the function application function. That is the URL returned will apply the parameters to the URL and return the result. That is, when the URL is given a query string of n=6 it will return the answer 120.&lt;/p&gt;&lt;p&gt;The second is that it should be a form of function binding. That is, when given the query string n=6 it will return the URL . This isn't how the Python works, but is the way that this sort of thing works in C++ (all the arguments are bound to the lambda, but the lambda isn't actually invoked).&lt;/p&gt;&lt;p&gt;What I'm really wondering though is whether a good answer to this won't also serve as a self descriptive RPC mechanism whose definition bootstraps from the requirements of the higher order functions we want to be able write. What you might also end up with is an interesting programming language which could be executed by a web browser simply by following links.&lt;/p&gt;&lt;/div&gt;</description>
</item>

<item><guid isPermaLink="true">http://www.kirit.com/Blog:/2008-05-20/Viz%20top%20tip</guid><link>http://www.kirit.com/Blog:/2008-05-20/Viz%20top%20tip</link><pubDate>20 May 2008 14:41:38 GMT</pubDate><title>2008-05-20/Viz top tip</title>
<description>&lt;div&gt;&lt;p&gt;When leaving the bedroom doors to the balcony open to air the room &lt;b&gt;&lt;i&gt;do&lt;/i&gt;&lt;/b&gt; remember to close them if a tropical storm hits.&lt;/p&gt;&lt;p&gt;(It's amazing how much water a mattress can soak up in just a few minutes. I expect I'll be even more amazed to find out how long it takes to dry, and possibly amazed all over again when I find how much trouble that can get me in with the wife… Doh!)&lt;/p&gt;&lt;/div&gt;</description>
<category domain="http://www.kirit.com/Site:/Categories">Thailand</category>
</item>

<item><guid isPermaLink="true">http://www.kirit.com/Blog:/2008-05-15/Security%20is%20hard</guid><link>http://www.kirit.com/Blog:/2008-05-15/Security%20is%20hard</link><pubDate>15 May 2008 17:19:35 GMT</pubDate><title>2008-05-15/Security is hard</title>
<description>&lt;div&gt;&lt;blockquote&gt;&lt;p&gt;Also: just so you're aware. &lt;i&gt;There are no points awarded in security for good intentions.&lt;/i&gt; You either get it right, or you go home. This person had no business editing OpenSSL.&lt;/p&gt;&lt;/blockquote&gt;&lt;p class=&quot;Cites&quot;&gt;&lt;a class=&quot;External&quot; href=&quot;http://www.matasano.com/log/thomas-ptacek/&quot;&gt;Thomas Ptacek&lt;/a&gt; on &lt;a class=&quot;External&quot; href=&quot;http://reddit.com/info/6jclf/comments/c040ecc&quot;&gt;reddit&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;We've been using &lt;a class=&quot;External&quot; href=&quot;http://www.openssl.org/&quot;&gt;OpenSSL&lt;/a&gt; in various versions of &lt;a class=&quot;External&quot; href=&quot;http://fost.3.felspar.com/SDK/Library:/OpenSSL&quot;&gt;FOST&lt;/a&gt; for ten years now. Personally I'm concerned about doing something stupid just compiling it for distribution, never mind the worry about (mis)using it. The thought of &lt;i&gt;altering&lt;/i&gt; any of it… No way!&lt;/p&gt;&lt;/div&gt;</description>
<category domain="http://www.kirit.com/Site:/Categories">FOST.3™</category>
</item>

<item><guid isPermaLink="true">http://www.kirit.com/ForceHTTPS%20Django%20middleware</guid><link>http://www.kirit.com/ForceHTTPS%20Django%20middleware</link><pubDate>13 May 2008 14:03:02 GMT</pubDate><title>ForceHTTPS Django middleware</title>
<description>&lt;div&gt;&lt;p&gt;This is my first Django middleware and is written as much for me to work out how to do it as because I need it. I suspect that there's already several that do the same thing.&lt;/p&gt;&lt;p&gt;The middleware is intended for use where you want to force all page requests on the site to use &lt;acronym title=&quot;HyperText Transfer Protocol Secure — The same language your web browser uses to fetch these pages from the server as HTTP, but run over an encrypted link&quot;&gt;HTTPS&lt;/acronym&gt; rather than &lt;acronym title=&quot;HyperText Transfer Protocol — The language your web browser uses to fetche these pages from the server&quot;&gt;HTTP&lt;/acronym&gt;. We use it for an intranet and extranet site that sits on the same web server as an &lt;acronym title=&quot;The .NET version of Microsoft's popular ASP web development system&quot;&gt;ASP.NET&lt;/acronym&gt; application running the public web site. This means that we're also using PyISAPIe to serve the pages and there is a specific workaround because of that. First though the code.&lt;/p&gt;&lt;div&gt;&lt;pre class=&quot;python&quot;&gt;&lt;code&gt;class ForceHTTPS:
    def process_request(self, request):
        if request.META['SERVER_PORT'] == &quot;443&quot; or request.META['HTTP_HOST'] == &quot;localhost:8000&quot;:
            return None
        return HttpResponsePermanentRedirect(&quot;https://%s%s&quot; % (
                request.META['HTTP_HOST'].split(':')[0],
                request.get_full_path(),
            ))&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;There are two implementation specific things that it's worth noting:&lt;/p&gt;&lt;ol&gt;&lt;li&gt; Under PyISAPe the request method &lt;code&gt;is_secure()&lt;/code&gt; always returns false no matter what. This is why it checks to see if the port number is 443 — standard for HTTPS.&lt;/li&gt;&lt;li&gt; I don't know of a good way to determine if the site is being run using &lt;code&gt;manage.py runserver&lt;/code&gt;. As this defaults to localhost on port 8000 I check for that instead&lt;span class=&quot;Footnote&quot;&gt;&lt;span class=&quot;Footnote-Number&quot;&gt;¹&lt;/span&gt;&lt;span class=&quot;Footnote-Note&quot;&gt;&lt;span class=&quot;Footnote-Note-In&quot;&gt; [&lt;/span&gt;&lt;span class=&quot;Footnote-Note-Number&quot;&gt;1&lt;/span&gt;I think putting the port number on the host header is wrong, but still. It isn't something I've ever noticed before and I know that my HTTP client doesn't do it.&lt;span class=&quot;Footnote-Note-Out&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;And another note:&lt;/p&gt;&lt;ul&gt;&lt;li&gt; The middleware assumes that the initial landing on the site is through a GET request. I think anything other than this would be exceptional, but it isn't checked and no exception is thrown. The request will likely fail in some other interesting way once redirected to use HTTPS if another method is tried.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;We use this as the first middleware so that no effort is wasted trying anything else before the redirect happens.&lt;/p&gt;&lt;/div&gt;&lt;hr /&gt;&lt;div&gt;First announced.&lt;/div&gt;</description>
<category domain="http://www.kirit.com/Site:/Categories">Django</category>
<category domain="http://www.kirit.com/Site:/Categories">Python/PyISAPIe</category>
</item>

<item><guid isPermaLink="true">http://www.kirit.com/Blog:/2008-05-07/VMWare%20on%2064%20bit%20Hardy</guid><link>http://www.kirit.com/Blog:/2008-05-07/VMWare%20on%2064%20bit%20Hardy</link><pubDate>7 May 2008 04:27:40 GMT</pubDate><title>2008-05-07/VMWare on 64 bit Hardy</title>
<description>&lt;div&gt;&lt;p&gt;These are some notes, primarily for myself, but that might be useful to others. I'm using VMWare server 1.0.5.&lt;/p&gt;&lt;ol&gt;&lt;li&gt; Ensure these packages are installed:&lt;ul&gt;&lt;li&gt; libssl-dev and ia32-libs (thanks to &lt;a class=&quot;External&quot; href=&quot;http://www.linuxquestions.org/questions/linux-software-2/vmware-server-install-error-the-vmware-vmperl-scripting-api-was-not-installed.-476129/#post3071229&quot;&gt;Bosk22&lt;/a&gt;)&lt;/li&gt;&lt;li&gt; gcc and g++&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt; If the build stil fails you'll need to grab and use the &quot;any any&quot; patch:&lt;ol&gt;&lt;li&gt; Download the &lt;a class=&quot;External&quot; href=&quot;http://platan.vc.cvut.cz/ftp/pub/vmware/vmware-any-any-update115.tar.gz&quot;&gt;115 &quot;any any&quot; patch&lt;/a&gt; from &lt;a class=&quot;External&quot; href=&quot;http://platan.vc.cvut.cz/ftp/pub/vmware/&quot;&gt;http://platan.vc.cvut.cz/ftp/pub/vmware/&lt;/a&gt; (&lt;b&gt;not&lt;/b&gt; the &lt;a class=&quot;External&quot; href=&quot;http://ftp.cvut.cz/vmware/vmware-any-any-update109.tar.gz&quot;&gt;109 &quot;any any&quot; patch&lt;/a&gt; from &lt;a class=&quot;External&quot; href=&quot;http://ftp.cvut.cz/vmware/&quot;&gt;http://ftp.cvut.cz/vmware/&lt;/a&gt;).&lt;/li&gt;&lt;li&gt; Uncompress it and run &lt;i&gt;runme.pl&lt;/i&gt; — this will patch the configuration file and re-run it. The configuration should now complete&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;li&gt; If you still can't execute VMWare (hint, try running &lt;i&gt;vmware&amp;amp;&lt;/i&gt; from a terminal and look for error messages) then you will need to patch the installed files. Below is a bash shell script that will do this for you (script built from posts on the &lt;a class=&quot;External&quot; href=&quot;http://ubuntuforums.org/index.php&quot;&gt;Ubuntu forums&lt;/a&gt;, can't remember which ones I'm afraid).&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;pre&gt;#!/bin/bash
cd /usr/lib/vmware/lib/
mv libpng12.so.0/libpng12.so.0 libpng12.so.0/libpng12.so.0.disabled
ln -sf /usr/lib/libpng12.so.0 libpng12.so.0/libpng12.so.0
mv libgcc_s.so.1/libgcc_s.so.1 libgcc_s.so.1/libgcc_s.so.1.disabled
ln -sf /lib/libgcc_s.so.1 libgcc_s.so.1/libgcc_s.so.1
ln -s /usr/lib32 /usr/l32
sed -i -e 's/usr\/lib/usr\/l32/g' /usr/lib32/gtk-2.0/2.10.0/loader-files.d/libgtk2.0-0.loaders
sed -i -e 's/usr\/lib/usr\/l32/g' /usr/lib32/libgdk_pixbuf-2.0.so.0.1200.9&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Using this I can run virtual machines normally, but for some reason I don't get most of the icons showing up in the console. I guess this is due to a problem with the PNG patches made by the script above.&lt;/p&gt;&lt;/div&gt;</description>
<category domain="http://www.kirit.com/Site:/Categories">Linux™</category>
<category domain="http://www.kirit.com/Site:/Categories">VMWare</category>
</item>

<item><guid isPermaLink="true">http://www.kirit.com/News:/1723249</guid><link>http://www.kirit.com/News:/1723249</link><pubDate>30 Apr 2008 05:48:22 GMT</pubDate><title>April 2008</title>
<description>&lt;div&gt;&lt;p&gt;This month we made the biggest change to our internal systems that I've ever done. We finally switched from being primarily Windows based to being Linux based. That doesn't mean that we've switched from doing Windows development work to Linux work — what it means is that we've done most of the transition from running Windows with some Linux virtual machines to running Linux with some Windows virtual machines.&lt;/p&gt;&lt;p&gt;Part of the motivation is of course wanting to work on a Linux port of FOST.3™, an effort that will now get a bit more impetus behind it. It does however mean some massive changes to how we work and therein lies the good and bad.&lt;/p&gt;&lt;p&gt;We ended up choosing &lt;a class=&quot;External&quot; href=&quot;http://www.ubuntu.com/&quot;&gt;Ubuntu&lt;/a&gt; as our distribution and we're now using Hardy Heron (which came out last week) on everything but our main server (which will get it when we do a re-install to clean up from the experimental build it's currently running).&lt;/p&gt;&lt;p&gt;The things I really like about it are:&lt;/p&gt;&lt;ol&gt;&lt;li&gt; The font rendering — text looks much better and seems easier to read than on Windows. This is a huge win. When my wife saw the rendering of Thai text she immediately wanted to switch her computer.&lt;/li&gt;&lt;li&gt; The apt-get installation — this really makes getting the machine up, running and useful very simple. We'd build our own repository of installers that we use to build Windows machines, but this is much easier.&lt;/li&gt;&lt;li&gt; Compiz-fusion — ok, it's a gimick, but who cares when it looks that cool?&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;The things I hate:&lt;/p&gt;&lt;ol&gt;&lt;li&gt; Constantly typing passwords — I don't see that the practice of running a non-root user account on Linux is actually much different than running a non-administrator user account on Windows and the constant re-typing of passwords mean that I'm much more inclined to use a weaker password that's easy to type.&lt;/li&gt;&lt;li&gt; Having to use so many user accounts — Windows just seems so much easier to set up with single log in across the network and there aren't problems with laptops, uids and gids and any number of other complications.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;The experimental server installation we started with has certainly taught us a few things. I guess I've been doing all sorts of things wrong, but neither Samba nor &lt;acronym title=&quot;NFS — Network File System&quot;&gt;NFS&lt;/acronym&gt; seem especially reliable or useful for networking. I find this pretty surprising, but I guess it explains why everybody uses rsync instead.&lt;/p&gt;&lt;p&gt;Clearly some of these are problems of expectation and lack of knowledge of Linux compared to Windows, but there are some clear philosophical differences. Windows computers seem to come pre-packaged to work as a team player (I'm thinking especially of domain networking here), whereas on Linux each machine prefers to be its own master. Windows also provides a consistent if unexciting desktop experience. Linux provides a much more exciting desktop which is much better when it's better, but is unfortunately much more frustrating and difficult when it's bad.&lt;/p&gt;&lt;p&gt;As for us, we can live with things as they are for now. The new network configuration isn't ideal and many things work much worse than they did under Windows, but I expect that will improve over time as we learn more about the platform which in any case is a pre-requisite for building reliable software on it.&lt;/p&gt;&lt;/div&gt;</description>
</item>

<item><guid isPermaLink="true">http://www.kirit.com/_fslib/_content/thread.asp?id=1723074#post-1723084</guid><link>http://www.kirit.com/_fslib/_content/thread.asp?id=1723074#post-1723084</link><pubDate>31 Mar 2008 09:03:51 GMT</pubDate><title>Post by Kirit Sælensminde in thread Unicode in TinyJSON</title>
<description>&lt;div&gt;&lt;p&gt;I should have also mentioned that I can give you some Unicode encoding/decoding code to use or to look at if it'll help.&lt;/p&gt;&lt;p&gt;I can't make any g'tees about its portability, at least not until I've been through and ported it at least one other platform anyway. &lt;/p&gt;&lt;/div&gt;</description>
<category domain="http://www.kirit.com/Site:/Categories">FOST.3™</category>
<category domain="http://www.kirit.com/Site:/Categories">Unicode</category>
<category domain="http://www.kirit.com/Site:/Categories">JSON</category>
<comments>http://www.kirit.com/_fslib/_content/thread.asp?id=1723074</comments></item>
</channel></rss>