% cat /acme/bin/Man
#!/bin/rc
if(~ $#* 0) {
tags=`{cat /mnt/acme/$winid/tag}
f = $tags(1)
}
if not
f = $1
nroff -man $f
Record of some of the computer tech I deal with so that it's documented at least somewhere.
Wednesday, 9 December 2009
Acme tag for when editing man pages
I've been writing more man pages recently that aren't in the usual Manpath and instead of building a new plumbing rule I made a tag
Tuesday, 8 December 2009
cd with cd - feature
On Lunix cd as an extra feature namely cd -
which takes you to the previous directory
I've got quite into this as I jump about, freebsd had pushcd and popcd which was also fun.
I've got it in lib/profile
EXAMPLE
which takes you to the previous directory
I've got quite into this as I jump about, freebsd had pushcd and popcd which was also fun.
fn cd {
cdnextlastdir = `{pwd}
{
if(~ $#* 0)
builtin cd
if not if(~ $1 -)
builtin cd $cdlastdir
if not
builtin cd $1
} && cdlastdir = $cdnextlastdir
}
I've got it in lib/profile
EXAMPLE
t23% cd
t23% pwd
/usr/maht
t23% cd /
t23% pwd
/
t23% cd -
t23% pwd
/usr/maht
t23% cd ouihouihiuh
Can't cd ouihouihiuh: 'ouihouihiuh' file does not exist
t23% cd -
t23% pwd
/
t23% cd -
t23% pwd
/usr/maht
t23%
Sunday, 6 December 2009
4th-compiler error reporting
Compiling; Word 444: Undefined name
is a bogus error message. The only way to match that word number is to compile the code !!
So I edited the compiler :
so it spits out the duff word
which I suppose is ok for a start but I can do better than that but let's not get sidetracked
as an aside, programming in Lunix code is like going back in time. I mean FILE* !! gimme a break.
is a bogus error message. The only way to match that word number is to compile the code !!
So I edited the compiler :
4th-3.5d3-unix/sources/comp_4th.c:/^Object->ErrNo = M4NONAME;/
s/$/printf("WORD %s", p);/
so it spits out the duff word
Compiling; Word 444: Undefined name
WORD dup4which I suppose is ok for a start but I can do better than that but let's not get sidetracked
as an aside, programming in Lunix code is like going back in time. I mean FILE* !! gimme a break.
Friday, 4 December 2009
4th-compiler opening plan9 devices
This didn't work, no surprise.
Refill introduces an integer.
and USE nuked the stack, so I'm investigating that
First is dial
With minimal comments. I stripped my notes out to see how terse it is without them.
With comments
Dial looks ready to test tomorrow so lets hope this post doesn;t last long.
And I also started draw
Refill introduces an integer.
and USE nuked the stack, so I'm investigating that
First is dial
With minimal comments. I stripped my notes out to see how terse it is without them.
With comments
Dial looks ready to test tomorrow so lets hope this post doesn;t last long.
And I also started draw
Subscribe to:
Posts (Atom)