Thursday 22 November 2007

GPL3 Questions and Implications

It has been suggested by Shane Martin Coughlan following a gently heated discussion on the discussion@fsfeurope.org mailing list, that a collection of questions relating to the GPL3 be collated and put to the FSF authors.

* Shane Martin Coughlan wrote, On 21/11/07 20:14:
Suggestion:

How about we make a list of concerns that people have and I email BrettSmith with them? That way we consolidate the concerns into onesubmission and potentially speed up the process of obtaining answers.MJ, Sam, perhaps you could coordinate the list of questions.

This page is setup for that purpose.

Readers: feel free to add comments or questions relating to GPL3 or AGPL, a compilation of which will be sent to Brett Smith by Shane.

My personal proposal is the creation of a list of implications of choosing a specific license to help prospective licensors choose (or avoid) a license according to their requirements.

My proposed implication is:

The GPL is widely considered a share-alike license where licensors have understood that the same terms will propagate throughout the distribution chain.

With the GPL3 this is not true: at some time in the distribution chain, derived works may have certain additional restrictions added, thus licensing the combined work under the AGPL such that when an original contributor receives the derived work with enhancements to his own work, he may not distribute any combination of his work with any of those enhancements unless he does so with the additional restrictions of the AGPL.
If the licensor finds this disparity objectionable then he may prefer to use the GPL2.

I believe that this implication is not widely understood and because ealier versions of the GPL are widely known to prohibit the addition of extra restrictions, this implication is also unexpected.

Wednesday 14 November 2007

Derek Cooper Special Award 2007

Here’s my nomination for the Food and Farming Awards 2007 Derek Cooper Special Award

Ray Gunge
Hardtack Hall, Hardtack Lane, Noshleigh
(no phone number, sorry)

With long service to the nation as chairman of the British Catering Council and other industry associations, and awarded the Confrerie des Snacquevins, few can have done more to make a healthy diet more important to the nation, or a varied diet more interesting.

Rather than continuously trotting out last years healthy but but unwelcome fad, Ray has always been at the forefront of culinary development and research, but so as to keep it relevant to the changing fashions and demands of the consumer.

Unlike many academic experts Ray has practiced this philosophy across the entire range of food establishments, un-abashed by ill-informed criticism, and without pandering to the artificial requirements of many so-called food awards, he has worked tirelessly to bring his vision of making quality food available to the paying masses in a way that they can appreciate.

His story is well known to Mr Cooper and it it is hoped that jealous parties have been prevented from infiltrating the selection committee this year, where they have so often prevented Mr Gunge from receiving deserved and much over-due recognition.

His story should be dramatized and re-told on BBC radio.

Think about it, and God bless!

Published selected episodes from the life of Ray Gunge sold out, but discerning and appreciative readers will no doubt manage to get a copy of this well written account.

Wednesday 19 September 2007

Can Black Rod Prevent Tasered Students?

International websites, and American TV news have all covered the incident where a student was tasered by American police while resisting officers who tried to prevent him asking a long rambling political question, even after John Kerry being asked the question said he would answer.

Whatever your take on this particular situation, this is the continuation of bad trend that started before designation "safe protest zones" well away from the political figuring being protested to.

So how can Black Rod save the day? The answer lies in the power of political ritual and ceremony to keep certain ideas alive.
Purloining freely from Wikipedia:

State Opening of Parliament


Black Rod is best known for his part in the ceremonies surrounding the State Opening of Parliament and the Throne speech. He summons the Commons to attend the speech and leads them to the Lords. As part of the ritual, as Black Rod approaches the doors to the chamber of the House of Commons to make his summons, they are slammed in his face. This is to symbolise the Commons’ independence of the Sovereign. Black Rod then strikes the door three times with his staff, and in reply to the challenge "Who is there?" answers "Black Rod". He is then admitted and issues the summons of the monarch to attend. This ritual is derived from the attempt by Charles I of England to arrest five members in 1642, in what was seen as a breach of privilege, though strictly the King was entitled to enter the chamber. After that incident, the House of Commons has maintained its right to question the right of the monarch’s representative to enter their chamber, though they can not bar him from entering with lawful authority.

The ceremony maintains the right.

From this day forth, a new tradition (like the famous Slashdot "first post") must begin.

The first question asked at any political rally, or convention must be a ceremonial question:"The police aren’t going to arrest or taser us if we ask unpopular questions, are they?"

Let the asking of this ceremonial question be offered to distinguished guests as a token of politeness, or to student body presidents, or the rotary club president, or the mayor.

And then the police, or the host will give the ceremonial answer: "No, not even if you are courteous or impolite, but we respectfully ask you to be courteous and polite to our guests and others present".

Maybe the questions need improvement, but the main thing is that it happens.

Make it happen, have the suggestion posted in every student handbook and newspaper, have it asked every time.

The maintenance of your liberty depends on the regular performance of this new ceremony.

New Lyrics


Lyrics to "He’s not Heavy. He’s my brother", anyone want to make a recording?

To the tune of "He ain’t heavy"

I may be wrong
with many a foolish thought
that leads me to who
  knows where
who knows where
If I’m wrong
show me that you care
please don’t taze me, please my brother

I hope you know
I welcome your point of view
don’t have to agree
to hear
or to share

for I know
the law preserves our liberty
please don’t taze me, please me brother

If I’m learning
  at all
I’m learning
  with sadness
that every tyrants heart
is-a filled with the badness
and hate
for free opinion

it’s a long long road
I fear there is no return
and we’re on the way
to hell
were nearly there

and the law
shouldn’t weigh us down at all
please don’t taze me, please me brother

( please my brother

  please don’t taze me

  please my brother
)

Wednesday 18 July 2007

UPDATE: Fix status timeout: status=0xd0 { Busy }

I got a nice Acer laptop for not much from PC World, but it has a sucky TSSTcorpCD/DVDW TS-L632D, ATAPI  CD/DVD-ROM drive. The manufacturers have released a firmware update, but not for my OEM. Bah!

Gareth and Gareth have explained how to do a firmware update which (as it works for me) is a better solution:

See https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/75295

My own solution below is buggy and prone to calling the atapi reset TWICE (hanging the machine). I have a fix (not with me as I edit this now) which prevents the atapi reset being called twice in one minute, but I think the better solution is the firmware update.

As a consequence if the moon shakes a bit too much or one of the electrons gets a bit too hot, the CDROM drive stops responding. For windows users it disappears from My Computer altogether and they have to reboot.

Linux users are both better and worse off. Worse because the system hangs 4 seconds out of 5 and the syslog fills up with messages like "/dev/hdc: status timeout: status=0xd0 { Busy }"

If you can bear to slowly get a command window, a bit of "sudo hdparm -w /dev/hdc" will fix it, but thats too painful.

So, this script will fix it. You need to modify /etc/syslog.conf to add this line "kern.* /var/log/kern.fifo" to log kernel messages to a named pipe from which the script will read.

Install the script in /usr/local/sbin/fixhdc, and run it from /etc/rc.local with: "setsid /usr/local/sbin/fixhdc &"

#! /bin/bash
# /usr/local/sbin/fixhdc
# by Sam Liddicott
# Monitor kernel messages to see if the cdrom is jiggered
# If so do an atapi reset
# First add this line to /etc/syslog.conf
# kern.* /var/log/kern.fifo
# Then run this script from /etc/rc.local with:
# setsid /usr/local/sbin/fixhdc &

KERNFIFO=/var/log/kern.fifo
CDROM=hdc

CDROM_NODE="/dev/$CDROM"

daemon() {
  while read logline
  do
    case "$logline" in
      *"$CDROM: status timeout: status=0xd0 { Busy }"*)
        hdparm -w "$CDROM_NODE"
        logger -t ‘kern.crit’ — "$0 reset $CDROM"
      ;;
      *) echo "Ignore $logline";;
    esac
  done
}

while :
do
  if test -p "$KERNFIFO" || mkfifo "$KERNFIFO"
  then daemon < "$KERNFIFO" &
       # restart syslog now we have the pipe open
       /etc/init.d/sysklogd reload
       # it probably won’t finish till syslog does
       wait
       logger — "Restarting $0"
  else echo "Can’t make fifo $KERNFIFO"
       exit 1
  fi
done

Thursday 12 July 2007

Windows-only IP camera on linux

I got a nice panning VGA camera for £69.00, but it’s one of those cameras from hell that only supports internet explorer on windows and crashes windows a lot.

As far as I can tell generically it is an SQ IP Cam or a GP-280 IP Camera.

I want to use it on linux, so out comes ethereal to do some packet sniffing and here is what I get:

I can get a video stream (special header and concatenated JPEG’s) with this URL:

http://192.168.1.69/cgi-bin/Stream?Video?Acc=USERNAME?Pwd=PASSWORD?webcamPWD=RookCookies00000

Possibly the RootCookies bit is important, perhaps related to a login that occurred earlier.

I can move the camera wth:
http://192.168.1.69/motor_control_right?webcamPWD=RootCookie00000

http://192.168.1.69/motor_control_left?webcamPWD=RootCookie00000

http://192.168.1.69/motor_control_up?webcamPWD=RootCookie00000

http://192.168.1.69/motor_control_down?webcamPWD=RootCookie00000

For horizontal and vertical centre

http://192.168.1.69/motor_control_auto_h?webcamPWD=RootCookie00000

http://192.168.1.69/motor_control_auto_v?webcamPWD=RootCookie00000

Full centre

http://192.168.1.69/motor_control_center?webcamPWD=RootCookie00000

To stop

http://192.168.1.69/motor_control_stop?webcamPWD=RootCookie00000

The special header on the video stream is a 40 byte header. I’m expecting certain values so they were easy to find:

Stream Header
Offset Format Data
0×16-0×17 16 bit integer LSB size of jpeg in bytes, or in other words, the number of bytes to read after this header before the start of the next header
0×1a-0×1b 16 bit integer LSB jpeg width in pixels
0×1c-0×1d 16 bit integer LSB jpeg height in pixels
0×28- Start of JPEG header

So stripping off the first 40 byte with
dd if=stream of=1.jpeg bs=1 skip=40

leaves me a jpeg (with loads more jpegs on the end, ech prefixed by the same 28 byte header).

So I can control the camera and rip video from it, now to make it like zoneminder.

UPDATE:

I can watch a video stream with VLC using:

wget -O /dev/stdout http://192.168.1.69/cgi-bin/Stream?Video?Acc=USERNAME?Pwd=PASSWORD?webcamPWD=RookCookies00000 |dd  skip=40 bs=1 | vlc -

I modified axmjpeg so it can split images from my camera too.

Update: 20 Sept 2007
This patch has been reworked applied to the standard axmjpeg project. (a while ago!)

This script can be used to control the camera from zoneminder:

#! /bin/bash
preset=home
presets="nothing motor_control_auto_h motor_control_auto_v motor_control_stop motor_control_center"

while test -n "$1"
do
  case "$1" in
    --address=*) address="${1##--address=}";;
    --address)   address="$2"; shift;;
    --command=*) command="${1##--command=}";;
    --command)   command="$2"; shift;;
    --preset=*)  preset="${1##--command=}";;
    --preset)    preset="$2"; shift;;
  esac
  shift;
done

url_base="http://$address/"
url_tail="?webcamPWD=RootCookie00000"

case "$command" in
  # home goto
  preset_home) url_command="motor_control_center";;
  preset_goto) set $presets; shift "$preset"; url_command="$1";;
  # right left down up
  move_rel_*) url_command="motor_control_${command##move_rel_}" ;;
esac

url="$url_base$url_command$url_tail"
wget -O /dev/null "$url" 2>/dev/null


UPDATE snapshot

I found a URL that can be used for a single snapshot (based on this http://ultradigital.freshdesk.com/support/solutions/articles/77478-comment-acc-der-au-flux-vid-o-d-une-cam-ra-ip-9060-i-9060-o-ou-9060a-mp):

http://192.168.1.69/snapshot.jpg?account=admin&password=password

Also related source code here: http://read.pudn.com/downloads65/sourcecode/internet/webserver/235705/Net_apps/httpd/api/HttpFileSystem.c__.htm

UPDATE streaming

I can play the stream like this:

ffplay -f mjpeg -probesize 40 -i 'http://192.168.1.69/cgi-bin/Stream?Video?Acc=admin?Pwd=password?webcamPWD=RookCookies00000&f=file.mjpg'

tip from http://www.lavrsen.dk/foswiki/bin/view/Motion/MplayerMjpegStreamViewing

but it seems more reliable to use axmjpeg to remove the extra data and output just a concatenation of jpegs:

axmjpeg -N -o /dev/stdout  'http://192.168.1.69/cgi-bin/Stream?Video?Acc=admin?Pwd=password?webcamPWD=RookCookies00000' | ffplay -f mjpeg /dev/stdin

Wednesday 27 June 2007

$150 Bounty: 0402:5602 m560x webcam driver

I bought a fancy refurbished Acer laptop at a nice price. Ubuntu Feisty Fawn likes it all except the webcam, which is identified as 0402:5602, also known as m560x.

Well, I want it to work. I also want to improve the linux kernel, but I won’t be the one writing the driver, so instead I’ll use some of what I saved on this laptop to offer a bounty to the chap who does it.

I’ll pay by paypal $150 when Greg Kroah-Hartman of the usb-devel mailing list, or one of his deputies (e.g. Jiri Kosina) accepts working patches for this webcam and commits them for the upstream kernel; and where with the said patches I can get xawtv, ekiga and the like to enjoy the video source. like any other standard video source. The patches must be licensed under the GPL2, or GPL2 or later. The author retains copyright (naturally) or assigns it to the FSF.

To qualify, the patch, and earlier patch candidates (yes, they will make you tweak it and re-submit) must be submitted on the usb-devel mailing list, and excepting complications, the paypal payment will be to the email address comprising the Signed-off line in the patch submitted on said mailing list. I’ll split the bounty as joint contributors can agree or failing that, at my discretion. I expect one developer will leave a clear trail on the mailing list, terminating with the accepted patch, making recognition of the deserving author and subsequent payment easy.

The bounty offer will end after a valid claim has been made.

In any case it’s my intent to pay up to $150 to encourage development of such a driver and to pay it to those who write it and release it for kernel.

(It’s been suggested that this may involve working on sane-devel as well as usb-devel, in which case patches may need to be accepted for upstream submission by maintainers of both projects to qualify).

Information for starters:

Of course I’ll post the bounty notice in some of these places too.

UPDATE
I’m advised by one of the developers that more likely two drivers, m5602 and m5603 will hit the kernel; unknown timescales.
As long as the 5602 is supported I don’t mind splitting the bounty fairly between contributors of both drivers; in my view it is a common work that is now more conveniently expressed as two modules instead of one.
I expect other contributors will feel the same was as long as their device is supported.

Wednesday 20 June 2007

Terminal Servers

I recently bought a Chase IOLAN RACK+ on ebay, only to find the built in switched mode PSU was clicking away like a broken thing.

The vendor generously offered a refund and let me keep it to repair or dipose of.

I then bought what I thought was another Chase IOLAN RACK+, but it fact it was the non-rack DB25 version with external PSU.

I decided they probably had the same voltages, so I could swap the PSU around, and with a bit of metal bending get things working for the RACK model.

While prodding the RACK+ PSU with my voltmeter to work out how to splice in the new PSU it suddenly started working; I guess the problem is most likely dry joints.

Next I find that my RJ45-DB9 cisco console cables don’t work. I find the Cisco pinout at http://www.technick.net/public/code/cp_dpage.php?aiocp_dp=pincabser_cisco_9 and by conferring with the Chase manual, come up with this  colour mapping.

IOLAN / Cisco Cable mappings
IOLAN CISCO RJ45 Names RJ45 DB9 DB9 Names
2 Black RTS 1 8 CST
8 Brown DTR 2 6 DSR
4 Red TXD 3 2 RXD
6 Orange GND 4 5 GND
  Yellow GND 5 5 GND
5 Green RXD 6 3 TXD
3 Blue DSR 7 4 DTR
7 White/Grey CTS 8 7 RTS

I cut off the RJ45 from the Cisco cables and make my own, which work fine!

So, as I crimp on a new RJ45, my colour mapping is:
NONE, BLACK, BLUE RED GREEN ORANGE WHITE BROWN
with yellow dangling/

Hurrah! I can now control 16 devices at once using debian’s cylcades-serial-client; all much more satisfactory that USB com ports which have given me no end of trouble.

Monday 14 May 2007

Signing Jars with pvk

I had a little fun signing Jar files recently. I was using Comodo for my code signing certificate, which generates the CSR and private key using MSIE and xenroll - which suits me, (I once briefly ran a CA before, based on ssleay and xenroll). I exported the private key as a pvk file during the generation process.

The difficulty was getting the java keytool  to import a private key. The other difficulty was getting the secret proprietary microsoft .pvk format into a form that anything else knew about.

I got it working using pvktool to convert from pvk to pem format:

wine pvk.exe -in mykey.pvk -nocrypt -out mykey.pem 

I then used openssl to combine the key pem file with the cer file I had exported from MSIE to make a pkcs12 file:

openssl pkcs12 -export -chain -name FRIENDLYNAME -inkey mykey.pem -in mycert.cer -out all.pkcs12


The final clue was to give up using keytool to import the pkcs12 into the java keystore, but just use the pkcs12 file directly:

jarsigner -storetype pkcs12 -keystore all.pkcs12 JARFILE.JAR "FRIENDLYNAME"

For completeness I note that a pfx export from MS Windows is close enough a PKCS12 file, as is an export from Mozilla Firefox; however I wasn’t able to import the openssl generated pkcs12 file into MS IE, unless I imported it and exported through Firefox first. It may be something else I had done wrong at the same time that stopped it working otherwise/

And I’m not sure where the certificate chain came from, openssl’s root CA’s no doubt.

Sunday 1 April 2007

BYU-TV on linux

This weekend I was watching the General Conference of the Church of Jesus Christ of Latter-day Saints (the Mormons).

The church itself no longer provides windows media streams of the video during the event, but audio only. This allows them to use their resources to provide audio streams to a wider range of users and in more languages.

Users wanting video are instead directed to www.byu.tv. Alas, whereas before I was able to use my linux video player of favour (totem or mplayer) to watch video, BYU TV streams video using a proprietary video format and requires a proprietary video player which seems to require the purchase and licensed use of certain proprietary operating systems. (Windows or MacOS). I may have mentioned that I’m using Ubuntu Linux.

Fortunately, as I have an x86 platform, I was able to watch all of conference on Linux by using windows firefox running under WINE with the Move Networks plugin. It was a simpel matter of making sure I had WINE installed and then installing Firefox for windows and then browsing to www.byu.tv where I was prompted to load the Move Networks plugin.

Sadly the move-networks plugin thought it was running in 256 colour mode, and so rendered the 24 bit colour into 8 bit hatching. (I took a screen-grab I can send to demonstrate this if you like). This required the combined processing power of 2 3GHz CPU’s to show video at full screen.

Fortunately move networks plugin WOULD play even when it thought it was in 256 colour mode, and fortunately I did have 2 3GHz CPU so I COULD watch in full screen.

Implications are that move networks could do an x86 linux plugin without too much hard work, if they would link with winelib.

It would still be a horrible proprietary video format and player, btu at least i would be able to choose my operating system.

Thursday 22 March 2007

Friday 9 March 2007

The SPAM solution -Demand Good Manners

About a year ago I recognized the SPAM problem for what it really is; how it really works; and what it really does. There is nothing new about SPAM, it pre-dates the printing press, it pre-dates common literacy, SPAM as we know it is just a special form of an old problem.

What problem?

Bad Manners

It’s rude to talk to someone you’ve not been introduced to. In Pride and Prejudice, Mr Collins tries to introduce himself to Mr Darcy by way of knowing his relative, but is scorned and ignored.

Why don’t well-mannered cultured people speak with those to whom they are not introduced? Simply because they would be mistaken for bad mannered hangers-on, butters-in or favour-grabbers.

Why do we have a problem with spam? Because we authorize our mail servers to accept mail from any ne’er-do-well without the slightest introduction.

Don’t talk to strangers

In the human world (body snatchers and manchurian candidates aside) the humans body and social knowledge is a good substitute for the persons own identity, and thus it is possible to recognize respectability (as we deem it) and trust (as we value it) in whatever circumstance we find ourselves.

In the electronic world of the internet the email From: address is a poor substitute identity, and often spoofed. SYN-spoofing was solved with SYN-cookies; but what is the email equivalent? SYN-cookies don’t avoid depleting resources when the claimed sending node really is the sending node. A higher level email equivalent would merely prove that there was such a valid email identity for the moment.

SPF is an attempt to filter out messages sent from a bogus location. If I know my mother is in Brighton, and I receive a letter asking me to remit 100 pounds to her sister, but the senders postmark is Liverpool, I could guess that the letter was a forgery. SPF is a way for domain administrators to allow mail spoofed from their domain to be recognized. As a consequence most SPAM spoofers will not spoof From: addresses using domains that have SPF records.

However my problem is how to stop hangers-on and cold-callers offering me the latest in pills or potions or job offers in the Belle Vue, California (instead of Belle Vue, Wakefield) from troubling me with their wares.  I want them to obtain an introduction, I want to assess how I trust them, and not be troubled by the quantity of callers jostling for attention.

The solution is to resurrect the habit of requiring introductions as we again live in a world inhabited by those who are anxious to push their message upon us as if it were the only thing we longed to hear.

Trusted Identity

If your friends get them selves an SSL certificate for email; or use PGP, establish a web-of-trust, it will be easily possible to recognize email from those friends as such howsoever sent. If the said friends can competently manage this electronic identity and associated cryptographic keys, you will be able to trust their identity,and their mail need never go astray - wrongly filtered as spam.

Those without such SSL or PGP signatures will be strangers, albeit recognizable stangers if they use SPF records.

Have an Identity, be trusted

Whats the solution? Have an identity, use it, be trusted.

Sadly some jurisdictions recognize such signed emails as legally binding, use of signing keys is not recommended to the incompetent in such jurisdictions.

Get your signing keys certified by http://www.thawte.com/

Why haven’t I done this? Because it’s too complicated, I’m too busy, and I don’t trust my computer with my keys (!!), so I’ll have to get a smart-card from FSFE-UK.

Wednesday 7 March 2007

Collapsing on clusters

I’ve seen use of preceding-sibling to collapse on unique attributes, but how about collapsing clusters on unique attributes? For example:
a,a,a,b,a,b,b,c should collapse to a,b,a,b,c

Here’s some XSLT I came up with to detect which position a node is in it’s cluster, and what cluster number it is. NODE repesents the nodes being collapsed, and VALUE/@value a child node/attribute that is being collapsed upon.

Here we look for the number of nodes that are not preceded by a node having the same value - this will be the number of clusters.


<xsl:variable name="cluster-no" select="count(preceding-sibling::NODE[
  not(VALUE/@value = preceding-sibling::NODE[1]/VALUE/@value) ]
 |current()[not(VALUE/@value = preceding-sibling::NODE[1]/VALUE/@value)]
)"/>


He we count the number of nodes that precede the current node and have the same value, but there is no intervening node with a different value, this will be the position in the current cluster.


<xsl:variable name="position-in-cluster" select="count(preceding-sibling::NODE[VALUE/@value = current()/VALUE/@value
and not( VALUE/@value!=following-sibling::NODE[ count(following-sibling::NODE[ generate-id()=generate-id(current())]) &gt; 0 ]/VALUE/@value)])"/>

Tuesday 27 February 2007

Abortion is Legal, Pictures are Not

Interesting story in The Register, Veronica Connelly’s guilty conviction was upheld. It appears that she had sent pictures of aborted foetus’s to pharmacists that sell the morning-after pill (which technically induces an immediate abortion).

Without discussing whether or not Veronica was intending to be malicious, or how closely the action of the morning-after pill resembles that of a surgical abortion we have an interesting case:

Jewish Holocaust pictures from Nazi Germany (begone, Goodwin!) were not considered more offensive than the actions they documented, although they are acknowledged to be "disturbing." Does this mean that it is or would be illegal to send these pictures or show these pictures to the perpetrators, knowing that it would - and in order to - cause offense? How else should one convict the perpetrators with a sense of their own guilt?

Now consider Veronica’s intentions; was it merely to distress or cause anxiety to the recipient, or to convict them of their "guilt"? - which indirectly but very connectedly leads to distress!

How will Oxfam stimulate my guilt over my greed without decidedly distressing me with imagery of poverty and dispair? Will their mailshots be replaced with advertising billboards instead, thus becoming legal?

I see animal-rights display stands in the streets at times, showing disturbing pictures of the results of shocking treatment of animals. Are the animal-rights activists forbidden from sending these pictures to the perpetrators but permitted to display them in public?

Will I be unable to disuade jihadists under criminal law because my arguments distress them? Or will I have to send only open letters generally published?

I guess the law is to save us from personally communicated harassment when others who are offended by some aspect of our legal activity try and convey that offense to us.

At the moment some forms of abortion are legal, but some ways of talking about it are not, and this puzzles my morals; perhaps Veronica was harassing those who were not directly involved in abortions - though this was not relevant to the judgement; BUT it seems it would still have been illegal for Veronica to have sent those pictures to anyone who had been practicing illegal abortion, even if they were photo’s of the very same aborted foetuses - would this lead to "Yes, I broke the law, but now I’m offended by pictures of it"

I can see this as a good defense for speeding camera tickets.

Friday 9 February 2007

Don’t confuse the message



Design should not obscure the message.

Here’s a web page whose purpose is to help parents and carers in Yorkshire know if their children’s school has been closed due to bad weather.

How many parents or carers do you think will suppose that the school is closed?

In fact the "closed" message is just fancy artwork and conveys no particular information about any school. There are no schools closed at all.

The actual URL was: http://www.ridingsfm.co.uk/pages/home.asp?pageid=275&servername=www.ridingsfm.co.uk

You have to wonder why servername is part of the url… maybe it is to support vhosting for no-cookie http 0.9 clients?

Wednesday 31 January 2007

HP48 Skin for M3100 / Hermes

Here is horizontal (landscape) skin for Christoph Gießelink’s PPC HP48 emulator.
See: http://privat.swol.de/ChristophGiesselink/emu48.htm

The skin is for the HTC Hermes model phone running WM5 in keyboard-open mode, to support use without the need to touch the screen at all.

Installation

Just download the zipfile and unzip in your emu48 directory and start a new emulator session with HP48-m3100-horizontal.kml

The bitmap and layout is based on the PPC skin done by Dave / Murray.

This is landscape but not in the same sense as Dave / Murray landscape which is landscape on a portrait screen. Hermes keyboard-open mode is a landscape screen.  When the keyboard is closed and the Hermes resizes the screen to be portrait, it all goes skewy. Really we need to be able to switch between two different skins when they keyboard is opened or closed.

I had to take a few pixel rows out of their layout to make it fit.

Anyway….

I also fixed up the scan-code conversions to deal with the Hermes keyboard, so some Hermes specific keystrokes work as expected, like ! and - and _.

Some new mappings

The TAB key is mapped as the ALPHA key.
The SYMBOL-UP is mapped as SHIFT-R
The SYMBOL-DOWN is mapped as SHIFT-L
(Symbol is the key with a round DOT).

Sadly I could not map SYMBOL-LEFT or RIGHT, because the emulator does not intercept these and probably can’t unless it is signed as a privileged application.

BONUS

Included is an XML based build system to make skin building easier.

I used kimagemapeditor to add hotspot rectangles to my bitmap and then my build-system created the button and annunciator layout file for me. This greatly speeds up the process when modifying or designing new skins.

Note that the kml file Includes a a kmp file which includes all the button positional information, and also a kmi file containing scan-code mappings and fixups.

I generated the kml file like this:

xsltproc HP48-generate.xslt HP48-m3100-horizontal.htm > HP48-m3100-horizontal.kmp

xsltproc comes with gnome on my Ubuntu linux. Maybe there is a windows xslt processor that could do this too??

Of course that htm file has to be valid xml too, I had to make the img tag self-closing.

The xslt relies on HP48-attributes.xml, that defines the annunciators and keys that the emulator expects.

The id attributes refer to the numbers in the Annunciator or Button statements, and the name attributes refer to the anchors in the html.

Annunciator anchoes begin with #~- to show where the annunciator should be displayed, and #~+ to show where they should be copied from.

Buttons, of course have only one imagemap entry.

TO-DO

Add scan-code conversions for a lot of the accented characters.

I intend to make this fun by having an HP48 specific xml which defines HP48 button sequences needed to generate each ascii character. I then intend to have a host-specific xml which specifies the scan-codes generated during the entry of each ascii character.  I shall spot multi-scan-code sequences, and automatically allocate flags and generate IfFlag code.

Thus, with a fixed calculator specific button-code-map, a per-skin bitmap and imagemap, and a per-platform scan-code specification, I can generate any skin for any calculator emulator on any platform. Hurrah!

Find out or write IfAnnunciator for the kml scripts.