Runtime ChoiceField filtering in Django’s admin

Django 1.x brought with it much finer grained control over the admin application with admin forms and inline form sets. However, I still keep running into the same problem that I have since I started using Django – you cannot provide a limited queryset for a select field that depends on other instance variables. Read more…

Jul 31st, 2009 | Filed under Programming
Tags: ,

Pointers, arrays, and string literals

A recently posted question on Stack Overflow highlighted a common misconception about the role of pointers and arrays held by many programmers learning C.
Read more…

Jun 19th, 2009 | Filed under Programming
Tags:

Custom session storage with newLISP Web

The Web module’s default session storage engine uses serialized contexts in the /tmp directory. The advantage of this method is that, apart from the directory (which is customizable), it is reasonably platform independent and has low overhead. The disadvantages of this are numerous. Files are stored unencrypted, so anyone with access to the server may view them. It is therefor advantageous to design a custom storage module for sessions. Read more…

May 29th, 2009 | Filed under Programming
Tags: , ,

A better newLISP web library

One problem from which newLISP suffers is the lack of a really useful library for web-based applications. The official CGI module has serious enough problems to justify an entirely new library. After some thought, I decided moreover that the request and response modules that I designed were neither practical nor sufficient. To that end, I have designed a new, monolithic library to provide the essential functionality required for web programming. Read more…

May 29th, 2009 | Filed under Programming, Software
Tags: ,

Updated Json module for newLISP

Thanks to Andrew Pennebaker for pointing out where the decoder was broken. This update includes a complete rewrite of the JSON decoder. It is now slightly more forgiving and much more accurate. You can download it here or upgrade using nl-install.

May 22nd, 2009 | Filed under Programming, Software