Record of some of the computer tech I deal with so that it's documented at least somewhere.

Monday, 30 November 2009

4th isatty

Just encountered my first isatty annoyance.


% cat t
6 string buff
buff 5 accept . buff count type cr
buff 5 accept . buff count type cr
% echo ABCDEFabcdef | 4th cqx t
5 ABCDEF
-1
% # wtf?
% cat s
s" /fd/0" input open error? abort" no stdin!"
to fd0
fd0 use
6 string buff
buff 5 accept . buff count type cr
buff 5 accept . buff count type cr
% echo ABCDEFabcdef | 4th cqx s
5 ABCDEF
5 abcdef
% # more like it

Acme helpers

4t, C, Limbo

Tags for compiling the current window in the appropriate language

4t is 4th, capital 4 was a bit tricky

Wednesday, 25 November 2009

FreeBSD Qemu Apache 1.3

I need to keep a legacy web server running. Got to Linux and there's no Apache 1.3.x in the Debian package manager. I want to replicate what I have on FreeBSD so .....

FreeBSD with ports installed on Qemu [x] easy. - backup your qimage as you go :)

in root's .cshrc
# setenv PACKAGESITE ftp://ftp.uk.freebsd.org/pub/FreeBSD/ports/packages/All/
# pkg_add -r apache-1.3.41_1
# cat >> /etc/rc.conf
apache_enable="YES"
^D
# echo 127.0.0.1 `hostname` >> /etc/hosts

This doesn't work :
# cd /usr/ports/lang/php4; make install
because strstr is checked using SIGALARM and that locks up QEMU!
# pkg_add -r php4-4.4.9
Doesn't add mod_php4 or these modules :
# pkg_add -r php4-pcre-4.4.9
# pkg_add -r php4-pgsql-4.4.9_1

So a bit of bodging is required
# cd /usr/local/libexec/apache
# scp maht@steponnopets.net:/usr/local/libexec/apache/libphp4.so .

and the other Apache modules I need

# pkg_add -r mod_gzip-1.3.26.1a
# pkg_add -r mod_auth_pgsql-0.9.12_4


et viola, index.php is excecuted

I copied the confs from steponnopets

Friday, 20 November 2009

AVR assembler

I've been working on some rc code to spit out the mnemonics used in AVR Studio. My intention was to use RC as a smarter pre-processor than the #define and .macro directives included therein.

http://www.maht0x0r.net/library/computing/avr/til/ is where I'm at.

I've not included a way to map names onto registers yet, which I'll have to do next.