Categories
Uncategorized

Dinosaur comics

Are clearly not a waste of time. Thanks to my brother Conor for the link to qwantz.com
utahraptor, people living for revenge get to walk slow-motion in front of more explosions than heartless plutocrats do. i can't just ignore that

Categories
Uncategorized

stack based languages

The May issue of Dr Dobbs had a neat article on the cat stack based language. Pity that I’m only getting around to reading it now but I’ve been busy 🙂 In many ways, stack based languages are very elegant and remind those learning to program of the processing underlying higher level languages such as Java, which is actually implemented as stack based instructions in an abstract VM.
The cat language is essentially a statically typed version of Joy which is a reasonbly well known lambda-less functional language. Joy is useful in that you can write useful applications with it having the functionality of ISO C. It’s also straightforward to understand once you free yourself of some of the conventions of imperative languages. This is helped by homomorphism or as the Joy wikipedia page suggests:

“That is, the syntactic relation of concatenation of symbols maps directly onto the semantic relation of composition of functions”

As Joy defines functional compositions without typing their parameters it has the potential for unpredictability in its results. Whereas, every function in Cat will always produce the same number and type of results, given the same number and type of arguments.
E.g. consider an implementation of the fibonacci function in cat

define fib { dup 1 <= [] [dup 1 - fib swap 2 - fib +] if }

dup just pushes a copy of the top element (duplicates) to the stack. swap interchanges the top two elements. So calculating the fibonacci number for e.g. 5 can be thought of in terms of pushing 5 to the stack, then pushing fib which operates on 5, does the necessary comparisong and sets up the expected recursive addition defining Fib(N) = Fib(N-1) + FIb(N-2) through swapping the top two of the stack. We then push the if to the stack which operates on the 3 elements which are boolean and the true/false values.
Neat, tidy and fantastically terse if you remove the unnecessary formatting. The bracketting is obviously important however as it is used to define the variables being pushed to the stack. Cat is neat by Joy is, ironically enough, more fun!

Categories
humour

Hallelujah for Leonard

Those who think Leonard Cohen is depressing know little of his wry humour. During the septagenarian’s recent gig in the Manchester Opera house he apologised for his long absense by saying he was last there when he was “just a 60-year-old kid with a crazy dream”
Brilliant!

Categories
technology

annoying piece of software intelligence

I was messing around with CounterPath’s Eyebeam client to try and get it to register against an XCAP Servlet I’m hacking up using the org.openxdm libraries.
The servlet was hosted on port 7001 (BEA’s Weblogic).
I’d tetherealed the output and noticed that while my command line tests with CURL were working a treat, eyebeam was sending nothing at the friggin XCAPServlet. I found a few posts on the mobicents lists about this issue but no response. Well, for some reason the great folks at counterpath decided that the Mac OSX implementation of Eyebeam should use the web proxy be default. The proxy was duly 404’ing my localhost test. DOH!
The software works but I didn’t half feel like a complete muppet 🙂
Sometimes I wish that programmers would think hard before they introduced any kind of intelligence into a software application.