lkcl is currently certified at Master level.

Name: Luke Kenneth Casson Leighton
Member since: 2005-01-11 23:48:31
Last Login: 2011-08-04 17:49:14

FOAF RDF Share This

Homepage: http://lkcl.net

Notes:

Hmm... my account information and Certs appear to have been truncated. waah!

Projects

Articles Posted by lkcl

Complete list of articles by lkcl

Recent blog entries by lkcl

Syndication: RSS 2.0

pyjamas output in my own html file with jquery

Hi,

I want to reuse my python modules on html/jquery web pages.

Therefore I need to call the generated js fucntions genrated with pyjamas from my own html file.

Which .js files should I link?
How can I call the functions?

Thanks,
Frank
Example python file functions.py:
def rmsToPeak( x ):
return x*1.41
def peakToRms( x ):
return x/1.41

Pyjamas output file functions.js:

/* start module: functions */Force
linebreak $pyjs.loaded_modules['functions'] = function (mod_name) {
if($pyjs.loaded_modules['functions'].was_initialized) return $pyjs.loaded_modules['functions'];
var $m = $pyjs.loaded_modules["functions"];
$m.repr = function() { return ""; };
$m.was_initialized = true;
if ((mod_name === null) || (typeof mod_name == 'undefined')) mod_name = 'functions';
$m.name = mod_name;

$m['rmsToPeak'] = function(x) {
var $mul2,$mul1;
return (typeof ($mul1=x)==typeof ($mul2=1.41) && typeof $mul1=='number'?
$mul1*$mul2:
$p['op_mul']($mul1,$mul2));
};
$m['rmsToPeak'].name = 'rmsToPeak';

$m['rmsToPeak'].bind_type = 0;
$m['rmsToPeak'].args = [null,null,['x']];
$m['peakToRms'] = function(x) {
var $div2,$div1;
return (typeof ($div1=x)==typeof ($div2=1.41) && typeof $div1=='number' && $div2 !== 0?
$div1/$div2:
$p['op_div']($div1,$div2));
};
$m['peakToRms'].name = 'peakToRms';

$m['peakToRms'].bind_type = 0;
$m['peakToRms'].args = [null,null,['x']];
return this;
}; /* end functions */

/* end module: functions */

Syndicated 2011-08-15 17:58:35 from blog/lkcl

PowerVR

i'm looking up information about the PowerVR 3D SGX Engine in order to assist tomasz with his reverse-engineering project, http://code.google.com/p/gles6410.

there is... a great deal of shit and misinformation out there. one of the down-sides of google android is that the number of forums has exploded, with the number of misinformed opinions and the sheer number of AOL-esque "metooings" just completely overwhelming the actually useful contributions - such as tomasz' work.

it took forever to find the GLES6410 project. and no, tomasz' work is NOT restricted to just the S3C6410 - it is very very relevant for absolutely all of the PowerVR SGX Series, due to the architecture of PowerVR. all that the CPU manufacturers do is provide a subtly different "shim" to access the PowerVR's registers and interrupts - that's it. beyond that: once you have a GPL Linux Kernel "shim" driver which makes the access to those registers identical right across all hardware - be it OMAP, Samsung, iMX series from FreeScale or even Intel PPA (Poulsbo, whatever, i don't actually care) from that point on it's pretty much all the same.

i say "all the same" but there do exist subtle bugs in the hardware implementations, and also variations such as the number of parallel engines and various upgrades / versions but effectively yes, it's all the same.

that makes tomasz' work um... incredibly valuable, and i would very much appreciate it if people could spread the word, pitch in and help him out. PowerVR has a hell of a lot of momentum and a very large amount of market share: it's too important to leave it to imgtec to maybe release a Free Software Library in Q3 2011.

GUI Builder Panel

Pyjamas Equivalent of Glade goes recursive…

well, i decided that just having a dynamic GUI-instatiator based on a text file wasn't enough, but that what was needed was both a widget (single dynamic instance instantiator) and a panel (subclass of that but then with an "add" method that can take the name of the widget-group to be created).

so, the UI text file contains a widget-group with a panel type in it (e.g. a Grid) called "builderpanel", and it also contains a widget-group with a… something - a row, for example, named "builderrow" in the UI text file. also in the widget-group with the panel is a button, named "add".

then, the button has the name of a callback in the UI text file, called "onAddClicked", and this function has to occur in the app, and is linked to the button. surprise-surprise, the action associated with this button is to create an instance of builderrow and to add it to the panel:

    def onAddClicked(self, sender):
        grid = self.app.bp.getPanel()
        row = grid.getRowCount() + 1
        grid.resize(row, 1)
        self.app.bp.add("builderrow", row, 0)

the weird thing is that at no time, in any code written, do you actually get to see what "the panel" is, because its layout is specified in the UI text file. also, nor do you see, in "python code", any of the widgets that are added as a row: there could be 50 widgets in that "row" being added, but you don't manually create them.

i think that's just wicked, and although i was originally deeply unimpressed with the idea of writing widget layouts using an application editor, i'm now completely converted to the dark side and will pretty much be doing nothing _but_ writing pyjamas applications with this method from now on.

Syndicated 2010-08-23 20:57:46 from blog/lkcl

pyjamas dynamic in-app GUI builder

dynamic creation of pyjamas GUI apps

kees bos a few months ago developed PyJsGlade which is an identical concept to wxwidgets "wxg"; glade with GtkBuilder for pygtk and qtGui for pyqt4. the basic principle is that you have a GUI-based "widget editor" tool, you edit a nice pretty app, you save it (usually as XML) and then you either auto-generate the entire app as a stub starting-point or you pass the file into a "builder" at run-time and it creates the GUI there-and-then

in python-wxwidgets there is as i understand it a bit of a problem: there is no runtime builder, but other than that, everything's hunky-dory. pyjamas, being the newcomer here, didn't have PyJsGlade until a few months ago, and kees didn't quite grok the run-time builder concept. for various reasons, i added it yesterday. ok, this morning, to be precise.

for various other reasons i'm going to make some enhancements to the concept, to effectively turn the builder class into the beginnings of an editor front-end. in other words, if you have an existing instance (which you'd like to keep), and you modify the GUI file, you can *reapply* the builder process on the existing instance and have it update properties, change positions etc. etc. instead of throwing it away.

neat, huh?

Syndicated 2010-08-15 11:38:58 from blog/lkcl

HL7

just announced an HL7 python importer, which is going to be used in gnumed. HL7 is a data exchange format for the medical profession. typically used to transfer information about patients, treatments, clinical lab reports and so on, it's _very_ comprehensive and has been through five revisions on the XML HL7 v3 specification, already.

HL7 basically stores typed hierarchical information in a flat file. it was created before XML came around, and now someone's added an XML wrapper on top of it.

there's an application called Mirth and unfortunately it's implemented in java. it's _big_ and therefore painful. for example, if you want to do something other than what mirth can cope with by default, you have to create a java extension or, even worse, a javascript one! connect the dots, with python and gnumed (which uses postgresql) and if you want to use mirth to transfer clinical lab data into gnumed, you have to know _eight_ separate programming technologies.

so i decided to look for some existing code in python, and adapt it. seems to be going well.

680 older entries...

 

lkcl certified others as follows:

  • lkcl certified joolean as Apprentice
  • lkcl certified DeepNorth as Apprentice
  • lkcl certified StevenRainwater as Master
  • lkcl certified chema as Journeyer
  • lkcl certified lukeh as Master
  • lkcl certified wez as Master
  • lkcl certified fen as Journeyer
  • lkcl certified striker as Master
  • lkcl certified DV as Master
  • lkcl certified huiyuan as Apprentice
  • lkcl certified anton as Master
  • lkcl certified mbp as Master
  • lkcl certified craig as Apprentice
  • lkcl certified elrond as Master
  • lkcl certified kelly as Journeyer
  • lkcl certified stuart as Journeyer
  • lkcl certified sarum as Journeyer
  • lkcl certified larsk as Journeyer
  • lkcl certified tpot as Journeyer
  • lkcl certified mwh as Journeyer
  • lkcl certified BrucePerens as Master
  • lkcl certified dinsdale as Apprentice
  • lkcl certified aaronsw as Journeyer
  • lkcl certified Trakker as Journeyer
  • lkcl certified dsifry as Journeyer
  • lkcl certified jds as Journeyer
  • lkcl certified Sam as Apprentice
  • lkcl certified btenison as Apprentice
  • lkcl certified lilo as Master
  • lkcl certified hands as Master
  • lkcl certified crackmonkey as Master
  • lkcl certified wichert as Master
  • lkcl certified federico as Master
  • lkcl certified elise as Journeyer
  • lkcl certified nmw as Journeyer
  • lkcl certified rsp as Apprentice
  • lkcl certified rsharpe as Master
  • lkcl certified thom as Apprentice
  • lkcl certified jht as Master
  • lkcl certified grog as Master
  • lkcl certified mglauche as Apprentice
  • lkcl certified Malx as Apprentice
  • lkcl certified sneakums as Apprentice
  • lkcl certified burtonator as Master
  • lkcl certified aoliva as Master
  • lkcl certified hugh as Journeyer
  • lkcl certified company as Master
  • lkcl certified halcy0n as Apprentice
  • lkcl certified kjetilk as Journeyer
  • lkcl certified shlomif as Master
  • lkcl certified AndreyGolub as Apprentice
  • lkcl certified etbe as Master
  • lkcl certified Zaitcev as Master
  • lkcl certified mentifex as Master
  • lkcl certified sehe as Apprentice
  • lkcl certified jbaker as Apprentice
  • lkcl certified robla as Master
  • lkcl certified the9ull as Apprentice
  • lkcl certified cliffhall as Master
  • lkcl certified moschel as Journeyer
  • lkcl certified Bram as Master
  • lkcl certified dmarti as Master
  • lkcl certified cdfrey as Journeyer
  • lkcl certified nikolay as Apprentice
  • lkcl certified joey as Master
  • lkcl certified vedge as Journeyer
  • lkcl certified Khen1950fx as Apprentice
  • lkcl certified mdz as Master

Others have certified lkcl as follows:

  • badvogato certified lkcl as Apprentice
  • chalst certified lkcl as Master
  • wez certified lkcl as Master
  • nayyar certified lkcl as Master
  • hereticmessiah certified lkcl as Master
  • wlach certified lkcl as Master
  • dfenwick certified lkcl as Master
  • jakov certified lkcl as Master
  • e8johan certified lkcl as Master
  • mazurek certified lkcl as Master
  • Astinus certified lkcl as Master
  • halcy0n certified lkcl as Master
  • nixnut certified lkcl as Master
  • nayyares certified lkcl as Master
  • andrewmuck certified lkcl as Master
  • chbm certified lkcl as Apprentice
  • lukeh certified lkcl as Master
  • chuckd certified lkcl as Master
  • fen certified lkcl as Master
  • Air certified lkcl as Master
  • striker certified lkcl as Master
  • whytheluckystiff certified lkcl as Master
  • dtucker certified lkcl as Master
  • jbowman certified lkcl as Master
  • sulaiman certified lkcl as Master
  • ekashp certified lkcl as Master
  • jao certified lkcl as Master
  • alexr certified lkcl as Master
  • mstarch certified lkcl as Master
  • Chicago certified lkcl as Master
  • pelleb certified lkcl as Master
  • pencechp certified lkcl as Master
  • mbp certified lkcl as Master
  • iamsure certified lkcl as Journeyer
  • craig certified lkcl as Master
  • DaSyonic certified lkcl as Master
  • Guillaume certified lkcl as Apprentice
  • wardv certified lkcl as Master
  • elrond certified lkcl as Master
  • jrf certified lkcl as Master
  • RyanHeise certified lkcl as Master
  • stuart certified lkcl as Journeyer
  • sarum certified lkcl as Master
  • apgarcia certified lkcl as Master
  • MUD certified lkcl as Journeyer
  • ariya certified lkcl as Master
  • grant certified lkcl as Master
  • cord certified lkcl as Master
  • JB318 certified lkcl as Journeyer
  • tpot certified lkcl as Journeyer
  • garym certified lkcl as Master
  • technik certified lkcl as Master
  • aaronsw certified lkcl as Master
  • nikole certified lkcl as Master
  • robk certified lkcl as Journeyer
  • Trakker certified lkcl as Master
  • stevegt certified lkcl as Master
  • MikeGTN certified lkcl as Journeyer
  • Qbert certified lkcl as Master
  • ajv certified lkcl as Master
  • sohodojo certified lkcl as Master
  • Sam certified lkcl as Master
  • ctrlsoft certified lkcl as Journeyer
  • Denny certified lkcl as Journeyer
  • TheCorruptor certified lkcl as Master
  • ricardo certified lkcl as Master
  • domi certified lkcl as Master
  • sethcohn certified lkcl as Master
  • blm certified lkcl as Master
  • AntonA certified lkcl as Master
  • btenison certified lkcl as Master
  • hands certified lkcl as Master
  • splork certified lkcl as Journeyer
  • acme certified lkcl as Master
  • lsdrocha certified lkcl as Master
  • khazad certified lkcl as Apprentice
  • walken certified lkcl as Master
  • crackmonkey certified lkcl as Master
  • alexm certified lkcl as Journeyer
  • wichert certified lkcl as Master
  • mattr certified lkcl as Master
  • richdawe certified lkcl as Master
  • ishmukler certified lkcl as Apprentice
  • ths certified lkcl as Master
  • billgr certified lkcl as Master
  • lerdsuwa certified lkcl as Master
  • nmw certified lkcl as Master
  • bytesplit certified lkcl as Apprentice
  • pvanhoof certified lkcl as Master
  • mikem certified lkcl as Master
  • samj certified lkcl as Master
  • sascha certified lkcl as Master
  • thom certified lkcl as Master
  • roundeye certified lkcl as Master
  • eglass1 certified lkcl as Master
  • jdub certified lkcl as Master
  • fxn certified lkcl as Master
  • mglauche certified lkcl as Master
  • dyork certified lkcl as Master
  • Malx certified lkcl as Master
  • adulau certified lkcl as Master
  • gleblanc certified lkcl as Journeyer
  • dugsong certified lkcl as Master
  • burtonator certified lkcl as Master
  • aoliva certified lkcl as Master
  • hugh certified lkcl as Master
  • shlomif certified lkcl as Master
  • AndreyGolub certified lkcl as Master
  • dgh certified lkcl as Apprentice
  • nconway certified lkcl as Apprentice
  • guaka certified lkcl as Master
  • sydbarrett74 certified lkcl as Master
  • liam certified lkcl as Master
  • laburu certified lkcl as Master
  • mentifex certified lkcl as Master
  • henrique certified lkcl as Master
  • ta0kira certified lkcl as Master
  • aicra certified lkcl as Master
  • audriusa certified lkcl as Apprentice
  • ittner certified lkcl as Master
  • phplev certified lkcl as Master
  • Funklord certified lkcl as Master

[ Certification disabled because you're not logged in. ]

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!

X
Share this page