Featured Post

Linkedin

 These days, I mostly post my tech musings on Linkedin.  https://www.linkedin.com/in/seanmcgrath/

Saturday, June 12, 2004

How to spot an pushing-forty Emacs user like moi

Simple. They have something like this:
    (set-default-font "-outline-Courier New-normal-r-normal-normal-*-*-96-96-c-*-*-#163")

in their .emacs file.

Why is it that default font sizes in applications keep getting smaller year on year :-)

Thursday, June 10, 2004

One of the best kept secrets in computer graphics

It is not well known that the truly wonderful and keenly priced Paintshop Pro V8 contains a fully blown Python engine as its scripting language.

Getting started with scripting PSP is simplicity itself as you can just save a macro and then edit it to do funky stuff with all the power of Python behind you.

Also, it appears that big chunks of PSP seem to be written in Python. I counted about 1500 scripts in there...Lots of sources to crib from.

Anyway, I'm very fond of the Kaleidoscope effect in PSP. You specify a bunch of parameters angles, offsets rotations and the like and off it goes. Sometimes the results are dull. Most times they are interesting. Sometimes they are amazing.

For fun, I wrote a PSP Python script to generate 100 Kaleidoscoped images with ramdomized parameters and save them off to disk. I ran it. Got a bunch of duds but some really beautiful effects.

Like this one for example:



What does that look like to you? Bees converging for a conversation? Now be honest, would you have guessed that this came from an innocuous picture of wife and child on front lawn? Yup. I kid you not.

For the geeks amongst you. The script is
Kaleidoscopes.PspScript">here

I think I'll generate a 1000 overnight and examine my crop in the morning.

My fun with eq?

In scheme eq? compares for equality in the sense of if both args point to the same object, then #t. In Python the number 1 is an object. There is one such object. If x and y both = 1, then both x and y point to the same object.

Scheme R5RS does not require that numbers be implemented this way and thus (eq? 1 1) can return false in one implementation (e.g. SISC) and true in another (e.g. MZScheme).

Thanks to Matthias Radestock for pointing this out.

Sean

Wednesday, June 09, 2004

Jython app dev in Eclipse

Being an insufferable Emacs bigot I personally would have no use for this but its great to see Jython support appear in these IDEs.

XML and objects - the ultimate permathread continues

Ted Neward responds to Dare Obsanjo on the whole XML serialized objects thing.

I'm with Dare on this one. Ted says

    "Dare, please, be serious for a moment--do you sincerely believe developers in Java and/or .NET are going to give up their favorite programming model (objects) in order to do Web services? When we put rubber to road, if interoperability is going to work (and I fail to see why we're doing Web services if that isn't the goal), then we have to have BOTH ends of the pipe under consideration when we do this. That in turn means I have to ensure that stuff being returned from the Web service is easily consumable in platforms beyond XML. "


1. I believe developers not only should but must look passed the object-centric model to realise any benefit from Web Services.

2. Interoperabilty is not achieved through shared objects. Interoperability is documents. Interoperability is syntax. Interoperability is bits on the wire.

Objects are not the answer to distributed computing. Objects are the question. Documents are the answer.

Tuesday, June 08, 2004

Scheme woes - too tired now. Will be obvious in the morning.

insertR is a function that adds its first parameter into a list (its third parameter) directly after the first occurence of its second parameter.
I have MZScheme. I execute:
    (insertR 3 2 '(1 2))

I get
    (1 2 3)

That floats my boat. Now I fire up SISC 1.8.8. Again, I execute:
    (insertR 3 2 '(1 2))

This time I get:
    (1 2)

What gives?

(define insertR
(lambda (new old lat)
(cond
((null? lat) '())
(else
(cond
((eq? (car lat) old) (cons old (cons new (cdr lat))))
(else
(cons (car lat) (insertR new old (cdr lat)))))))))

Some thoughts about e-mail and the weird feeling created by sending mail from one URI to another

This weeks ITWorld article: e-mail - the end of a metaphor.

Monday, June 07, 2004

ISO Schematron

Congrats to Rick Jelliffe on producing the final draft of ISO Schematron - part 3 of DSDL (ISO 19757-3).

You can get the PDF here [30 pages].