Older blog entries for lkcl (starting at number 675)

great old hat

Django Piston

I found a great django framework extension, by virtue of accidentally searching for "django oauth":

http://bitbucket.org/jespern/django-piston/wiki/Documentation#oauth

If i didn't know pyjamas, I would be terribly excited by this extension. as it is, it's pretty good anyway (because of the json emitter for example, and the bandwidth throttling decorators).

but i find myself feeling… terribly sad, and strangely looking in pity on these excellent pieces of work, because they just look like so much damn hard work to make use of. generating pages server-side that mix data with the display mechanism is so… old! no matter how exciting and fresh the framework and the ideas and thought that goes into the framework, the technique is still "old" and inconvenient.

i feel very strange for having to point this out.

Syndicated 2010-07-04 10:46:33 from blog/lkcl

pyjamas lamson replacement for google groups

Pyjamas and Lamson Mailing list viewer and poster

as part of the "eat dogfood" mantra, and the lovely lamson mailing list software having been chosen, i did an archive viewer a couple of days ago, which used the json-formatted archive created by lamson, because that's far easier to pick up (and less cpu-intensive) and turn into python than a Maildir.

what was missing was the means to post messages.

so, in order to do that, i've had to add openid support to the pyjamas app. then, having got that to work, it was no good on its own so i had to add a way for lamson to send out "is this person who they claim to be" messages, by which the openid could be associated with the email address.

haven't added that into the GUI yet - have to add a "preferences" box. hmm…

anyway: that was quite a lot of fun, working out how to create a state machine in lamson. it took me hours to work out what was going on, but i now should also be able to turn lamson into a "proper" email service, by supporting simple relaying of postmaster@pyjs.org and so on to me, which lamson *doesn't* do on its own.

but then, the next step is to allow posting of messages. that proved also challenging: in the end i chose to use the lamson.server.Relay, connecting over 127.0.0.1 and faking up the "From" and "To".

there's still quite a bit to do, but once it gets to the "useable" state i'm simply going to chop pyjamas-dev googlegroups.com off at the knees. i'll add a reply button, i'll make sure there's a "compose" button… and… errr… attachments? nope. viewing attachments? nope. showing message "reply" threads? nnnope. well, ok, maybe. might have to see how that goes, see if it's easy to do.

about the only thing i migggght see if i can do is to add support for google oauth / openid, because most of the users duh being on googlegroups use google for authentication duh.

but - again, have to see how it goes: once a certain aaabsolute minimum threshold of functionality is achieved, it's bye bye google groups, and one less web site being used which is _not_ a pyjamas application goes out the window.

Syndicated 2010-07-03 22:46:46 from blog/lkcl

diary syndicated to advogato

The lovely Advogato

I like the fact that people can reply / discuss using ikiwiki, if they want to, whereas advogato has a single-stream of consciousness / diarrhoea. so i'm syndicating the pyjamas diary to there, let's see if it works…

Syndicated 2010-07-03 09:34:07 from blog/lkcl

testing

Permissions are not set restrictively for the blog section of the wiki; Luke did not write this. Thank you for sharing, dave :) ikiwiki, we love you, we do. TODO: replace ikiwiki front-end with a pyjamas one and write some authentication in the process.

Syndicated 2010-07-02 17:09:28 from blog/lkcl

why convert everything to pyjamas

Why the heck convert the Pyjamas project management to Pyjamas?

i'm already getting questions about why i'm doing this. why not use github.com, why not use sourceforget, why not use ready-made, proven, tried-and-tested project management and development tools, designed for free software development? the answer is simple: when those sites convert their entire infrastructure to have a pyjamas front-end, and release the source code as free software so that people can either manage their projects via a desktop application or via the web front-end, i'll happily convert http://pyjs.org to use their facilities.

if, like 99.9% of the projects hosted on the above-mentioned free software hosting sites, pyjamas was not a web/desktop development platform, this would be a non-issue.

the purpose of pyjamas is to make life easier for both web and desktop development. i get a number of people telling me "but it would be great if you used {insert javascript toolkit}!" to which i have to again gently remind them that the toolkit they are recommending is javascript, not python, and so will work neither for "Eat Dogfood" reasons nor work with pyjamas-desktop (not interactively at the python level, anyway).

so in short: anything that's not using pyjamas is effectively a showcase for that other web technology, not for pyjamas. therefore, simple: to promote pyjamas, use it for everything!

Syndicated 2010-07-02 12:06:27 from blog/lkcl

lamson list archive viewer started

Eating Dogfood, one Web app at a time: Pyjamas List Archive

well, i took the Mail example and finally did something with it that i've been meaning to do for a while: actually got it to really read real email messages. the other application which does that is http://beammail.org which thomas did, a year ago, and i must update it. thomas actually did send, login and even read contacts and TODO information, so it's a worthwhile exercise to update it.

but the List Archive reader is slightly different. firstly, i decided to read the pre-processed json data, not the Maildir stuff. this will reduce the load on my happy server. if lamson has already gone to the trouble of splitting out the headers, splitting out the attachments and so on, why do it again?!

http://pyjs.org/lists

and the code is at:

    git clone gitolite@pyjs.org:pyjamaslamson

Syndicated 2010-07-02 12:01:39 from blog/lkcl

working pyjamas git jsonrpc service

Up and Running!

http://pyjs.org/pygit

amazing - a JSONRPC-based git web service, along with a happily bare but functional front-end. it's… wow! i kinda love it. it doesn't look like much, but it's actually one of the first real functional development tools i've done with pyjamas, other than "demos".

a mailing list archive viewer is next, then i can drop groups.google.com.

if anyone wants the source code, it's at

   git clone gitolite@pyjs.org:pyjamasgitweb

Syndicated 2010-06-29 22:27:41 from blog/lkcl

jsonrpc and pyjamas git web service

New Project: Pyjamas Git Web Server

git clone gitolite@pyjs.org:pyjamasgitweb

of course, it has to be a jsonrpc service: i'm going for a service based on the python XMLRPCServer at the moment, just for kicks, but will be setting it up as a WSGI service soon enough.

the pyjamas front-end of course had to be done - there's really no point in having a web site http://pyjs.org and then installing perl (except for joey's ikiwiki) or php or even a wickedly-fast cgit web service, because they all serve HTML. and the point of the pyjamas project is to duh make every application used in the development of pyjamas work as both a desktop and a web app. so, it could be the best, the most lovely, the most fastest most stonkingly brilliant development tool on the planet, loved by everyone from linus to redmond: if it ain't a pyjamas app, it ain't gonna get onto http://pyjs.org. except joey's ikiwiki :)

ultimately the plan is to put in place a text editor (even if it's a TextArea for now) so that the developers themselves can entirely use pyjamas tools - editing *in* the web browser (or desktop app). that'll be fun, because personally i'll need to recreate vim, including syntax colour highlighting, in python, before i'll use it. deep joy.

and the neat thing about this is that it's not just useful for pyjamas: it could be used by anyone, on any project.

Syndicated 2010-06-28 17:35:30 from blog/lkcl

website

redoing the pyjamas website

i want the pyjamas web site to be a practical showcase, managing a project using its own technology. i don't want pyjamas hosted on sourceforge, groups.google.com and code.google.com or anywhere which doesn't actually use pyjamas and python. so, what do i do? install ikiwiki :)

but seriously: the plan is to create a pyjamas mailing list archive reader and run python-only mailing list software; create a pyjamas wiki editor and (if convenient!) run off the back of ikiwiki even if it means just using the git repository and the ikiwiki commit hooks; write a bugtracker etc. maybe even a git web tree and code browser in pyjamas, that would be truly horrendous.

Syndicated 2010-06-28 01:18:16 from blog/lkcl

FontForge and Python

well, i've been asked to create some demonstrations of the use of python with fontforge - not just "little scripts" but entire dialog boxes which will do the same job as the existing menu options. ultimately, the goal is to replace every single menu option with an equivalent. ok - the goal is for me to prove that even one dialog can be replaced, such that other people can realise it's possible. and, importantly, whilst replacements for the menu options are being developed, font developers can continue to use either the replacements or the existing code.

why do this at all?

well, fontforge's widget set was developed from scratch at a time when widget sets didn't handle unicode (which fontforge has to) and many more things which are listed on the fontforge FAQ. however, as time has progressed, _some_ features of widget sets - not all - have caught up. for example, the FF FAQ states that GTK can only do one type of RGB bitmap but FF requires several, and so on.

but, some of the fontforge input boxes are... archaic: for example there is no mouse-wheel-driven input widget, so font developers are forced to type in numbers (which often involves them looking down at the keyboard, not at the screen).

to replace such widgets and to generally make any kind of UI changes is... tiresome, as the code - including its widget set - is entirely written in c.

so, to make the job easier, the experiment is to implement an example menu option in several different python-based widget sets, and see which one flies. personally, i like pyjamas, not least because - believe it or not - its use means that fontforge could turn into a client-server application (!) using JSONRPC to get at the data, and the front-end GUI could be run in a modern web browser.

but, to be a proper experiment, several widget sets will be tried. so far i have a pygtk / cairo experiment up and running, and also a pyjamas (gwtcanvas) one. all really quite exciting. ultimately, it is hoped that it will be possible to use fontforge-nox with python bindings, and drop the main fontforge window, replace it with pygtk / pyjamas / pyqt4 / pyclutter and... done!

666 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!