Nonstandard Standard Libraries (and the Web)

Web technology fascinates me, even though I’m far too lazy to put the knowledge I accumulate to any use. And I do accumuate, like a magpie accumulates shiny objects, rather than synthesize that knowledge. Not actually applying this stuff limits one’s ability to learn. It used to amaze me that these technology pundits and analysts spent years covering computer topics yet still seemed to miss all the essentials — now I know why — it is amazingly seductive to read and read and read and never actually learn a thing. If my ego was as great as my appetite for this kind of material, I could be one of those analysts.

As it is I am trying to work my way into the edges of this stuff, scratch just a tiny little bit below the surface. Administering a few small drupal sites, but not yet learning how the code works, or bothering to learn yet another little language. PHP looks to be a simple scripting language with no particular distinguishing features — making it easy to learn — but then of course there is a whole new standard library — I’m tired of standard libraries — they are all just so very different. Unless there is a compelling reason I can’t see myself learning how drupal really works. I have been rebuilding a database front-end with Ruby on Rails. This is a very nice environment, and I am learning Ruby’s libraries. I really wish there were some good language independent standard libraries. It has been done before many times but they always seem to fall by the wayside. IBM had a nice system a dozen or so years ago that they were pushing on OS2. It was one of those system ORB based things and it looked quite promising; RPCs are awful but it looked like IBM had managed hide the worst aspects of the underlying linkage mechanisms.

There is a zone of repugnance that keeps me from grazing around that MS CLR thing. It’s one of those things I can’t explain but I’m sure it’s good for my health. Microsoft even managed to sour me to BASIC; fortunately Python is a excellent replacement for BASIC.

I keep saying I’m going to learn C and C++ properly from an actual text — K&R and Stroustrup — but they cost a fortune. And I’ve managed to write quite complex programmes without having ever actually formally learning any of the syntax, or mastering the obscure semantics. C++ for me is really just a vehicle for the well documented template library. Too bad about the ABI. I really wish I knew how to write C++ code using the template library and only linking in code using the C style linking. C style linking on Linux is almost understandable. If you can get past the hideous assembly language of 80386 style processors you can link in your own hand written code without too much effort. C++ linking is just too painful to be useful. Fortran and COBOL are starting to look more attractive all the time.

I used to know a brace of Nicklaus Wirth’s language’s (and their offspring) but have forgotten them all.

Perl’s libraries are something to behold. A bit like the language itself — vast in scope and anything but standard. For one-offs Perl and CPAN (ably assisted by POD) simply can’t be beat. You need never invest much time in learning the library, you can afford to throw away what you’ve just learned, and there is always a better way.

Python has a very nice mix of language and library. It is a disciplined language: small, contained, nice. This is my favourite language and my language of choice for anything that is too big for Perl. I really will have to learn how to interface it with C.

Ruby is almost as well behaved as Python, and has those cool Smalltalk style iterators. A lot of languages have first class functions but none feel quite as right as in Ruby. I’ll not bother with Smalltalk — I’m too wedded to text files, executables and the shell.

Scheme is a great demonstration language. I really wish that it had good nonblocking IO — continuations are the preferred way to write multitasking code. Having to write select loops in C is painful — I suppose it would be possible to write coroutines in C using some stack juggling code, put I have never tried.

Eiffel is one of those languages I feel I should learn. I should. I really should.

Prolog is a language I love — and never use (Icon is in that cool but unused category too). Strangely I find Forth has a peculiar affinty to Prolog and I miss my old 6809 computer which I turned into a great Forth machine. They both have dictionaries (rulebases in P-speak) rather than libraries and the separation between library code and your code doesn’t really exist — writing libraries is easier than writing application code.

Haskell is a language I have yet to master. Monads! They are mind warping. I understand the idea, like IO args in Prolog, they are used to create an explicit dependency chain from input to output to model procedural code (parsers, state machines algorithms and such — interfacing to external data storage). But the actual implementation seems to slip and slide away from me given the slightest inattention. I wish there was a good book — I haven’t even got to the library learning phase.

I seem to have wandered a bit off topic. I’ll get back to web stuff in another post.