OK, turing.

<- leave blank

Thu Sep 20 16:43:28 EDT 2018

20CM-CTO1WW

Thu Sep 20 12:36:47 EDT 2018
dd -if /dev/sdE1/fscache -count 1
service cwfs
filsys main c(/dev/sdE0/fscache)(/dev/sdE0/fsworm)
filsys dump o
filsys other (/dev/sdE0/other)
noauth
newcache
blocksize 16384
daddrbits 64
indirblks 4
dirblks 6
namelen 144
1+0 records in
1+0 records out

Thu Sep 20 01:09:58 EDT 2018
emcc -pthread -s USE_PTHREADS=1 -O2 -o drawterm.html main.o cpu.o aan.o secstore.o
latin1.o js-factotum.o kern/libkern.a exportfs/libexportfs.a libauth/libauth.a
libauthsrv/libauthsrv.a libsec/libsec.a libmp/libmp.a libmemdraw/libmemdraw.a
libmemlayer/libmemlayer.a libdraw/libdraw.a gui-js/libgui.a libc/libc.a
libip/libip.a kern/libkern.a exportfs/libexportfs.a libauth/libauth.a
libauthsrv/libauthsrv.a libsec/libsec.a libmp/libmp.a libmemdraw/libmemdraw.a
libmemlayer/libmemlayer.a libdraw/libdraw.a gui-js/libgui.a libc/libc.a
libip/libip.a kern/libkern.a exportfs/libexportfs.a libauth/libauth.a
libauthsrv/libauthsrv.a libsec/libsec.a libmp/libmp.a libmemdraw/libmemdraw.a
libmemlayer/libmemlayer.a libdraw/libdraw.a gui-js/libgui.a libc/libc.a
libip/libip.a libmachdep.a -lSDL
Traceback (most recent call last):
  File "/home/eli/emsdk/emscripten/1.38.12/emcc.py", line 3062, in <module>
    sys.exit(run())
  File "/home/eli/emsdk/emscripten/1.38.12/emcc.py", line 1630, in run
    extra_files_to_link += system_libs.calculate([f for _, f in
    sorted(temp_files)] + extra_files_to_link, in_temp, stdout_=None,
    stderr_=None, forced=forced_stdlibs)
  File "/home/eli/emsdk/emscripten/1.38.12/tools/system_libs.py", line 526, in
  calculate
    symbolses = shared.Building.parallel_llvm_nm(list(map(os.path.abspath,
    temp_files)))
  File "/home/eli/emsdk/emscripten/1.38.12/tools/shared.py", line 1834, in
  parallel_llvm_nm
    pool = Building.get_multiprocessing_pool()
  File "/home/eli/emsdk/emscripten/1.38.12/tools/shared.py", line 1479, in
  get_multiprocessing_pool
    Building.multiprocessing_pool = multiprocessing.Pool(processes=cores,
    initializer=g_multiprocessing_initializer, initargs=child_env)
  File "/usr/lib/python2.7/multiprocessing/__init__.py", line 232, in Pool
    return Pool(processes, initializer, initargs, maxtasksperchild)
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 138, in __init__
    self._setup_queues()
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 234, in _setup_queues
    self._inqueue = SimpleQueue()
  File "/usr/lib/python2.7/multiprocessing/queues.py", line 354, in __init__
    self._rlock = Lock()
  File "/usr/lib/python2.7/multiprocessing/synchronize.py", line 147, in __init__
    SemLock.__init__(self, SEMAPHORE, 1, 1)
  File "/usr/lib/python2.7/multiprocessing/synchronize.py", line 75, in __init__
    sl = self._semlock = _multiprocessing.SemLock(kind, value, maxvalue)
OSError: [Errno 38] Function not implemented
Makefile:33: recipe for target 'drawterm.html' failed
make: *** [drawterm.html] Error 1


Thu Sep 20 00:05:12 EDT 2018
diff --git a/Mk/mkfile b/Mk/mkfile
--- a/Mk/mkfile
+++ b/Mk/mkfile
@@ -10,9 +10,6 @@ files=`{pwd}/files

 # for ease of use
 BUILDPATH=`{ if(~ $#BUILDPATH 0){ echo 'work/' }; if not { echo $BUILDPATH }}
-BUILDCOMMAND=`{ if(~ $#BUILDCOMMAND 0){ echo 'mk' }; if not { echo $BUILDCOMMAND
}}
-INSTALLCOMMAND=`{ if(~ $#INSTALLCOMMAND 0){ echo 'mk install' }; if not { echo
$INSTALLCOMMAND }}
-CLEANCOMMAND=`{ if(~ $#CLEANCOMMAND 0){ echo 'mk clean' }; if not { echo
$CLEANCOMMAND }}
 archmask=`{ if(!  ~ $#ARCHMASK 0) { echo $ARCHMASK } }

 <|$PORTS/Mk/mk.rc
@@ -232,15 +229,12 @@ build:QE: patch
	@{
		rfork ne
		cd $BUILDPATH
- if(!  ~ $BUILDCOMMAND ''){
- $BUILDCOMMAND
- }
- if not {
- status=''
- }
+ if(~ $#BUILDCOMMAND 0)
+ BUILDCOMMAND=mk
+ eval $BUILDCOMMAND || exit $status
		if(!  ~ $#POSTBUILD 0){
			echo 'Running post-build hooks...'
- $POSTBUILD
+ eval $POSTBUILD
		}
	}
	touch build
@@ -258,7 +252,7 @@ test:VQE: build
		rfork ne
		cd $BUILDPATH
		if(!  ~ $#TESTCOMMAND 0){
- $TESTCOMMAND
+ eval $TESTCOMMAND
			if(!  ~ $status ''){
				echo 'Tests failed.  Please notify '^$OWNER
				status='tests failed'
@@ -284,8 +278,10 @@ install:QE: build
			}
		}
	}
+ if(~ $#INSTALLCOMMAND 0)
+ INSTALLCOMMAND=mk install
	if(!  checkport $PORTNAME){
- @{ rfork ne; cd $BUILDPATH && $INSTALLCOMMAND } || exit $status
+ @{ rfork ne; cd $BUILDPATH && eval $INSTALLCOMMAND } || exit $status
		if(!  ~ $#VERSION 0){
			register $PORTNAME $VERSION
		}
@@ -312,7 +308,7 @@ reinstall:VQE: build
	cd $BUILDPATH
	@{
		rfork ne
- $INSTALLCOMMAND
+ eval $INSTALLCOMMAND
	}
	if(!  ~ $*MESSAGE 0){
		for(i in $MESSAGE){
@@ -325,7 +321,9 @@ testinstall:VQE:
	cd $BUILDPATH
	@{
		rfork ne
- $INSTALLCOMMAND
+ if(~ $#INSTALLCOMMAND 0)
+ INSTALLCOMMAND=mk install
+ eval $INSTALLCOMMAND
	}
	if(!  ~ $*MESSAGE 0){
		for(i in $MESSAGE){
@@ -341,9 +339,9 @@ clean:VQE: $BUILDPATH
		if(!  ~ $#NOCLEAN 0) {
			exit
		}
- if(!  ~ $#CLEANCOMMAND 0){
- $CLEANCOMMAND || exit $status
- }
+ if(~ $#CLEANCOMMAND 0)
+ CLEANCOMAND=mk clean
+ eval $CLEANCOMMAND || exit $status
	}
	rm -f build
	status=''
@@ -381,7 +379,7 @@ uninstall:VQE:
		@{
			rfork ne
			cd $BUILDPATH
- $UNINSTALLCOMMAND
+ eval $UNINSTALLCOMMAND
		} || exit $status
	}
	deregister $PORTNAME
diff --git a/dev-lang/go-19/mkfile b/dev-lang/go-19/mkfile
--- a/dev-lang/go-19/mkfile
+++ b/dev-lang/go-19/mkfile
@@ -10,7 +10,7 @@ DEPS=app-misc/ca-certificates
 WEBSOURCE=http://9legacy.org/download/go/go$VERSION-plan9-$objtype-bootstrap.tbz
 BUILDPATH=work/go-plan9-$objtype-bootstrap
 BUILDCOMMAND=fortune /lib/rob
-INSTALLCOMMAND=/bin/rc -c '''mkdir -p /sys/lib/go/$objtype-$VERSION && dircp .
/sys/lib/go/$objtype-$VERSION'''
+INSTALLCOMMAND=mkdir -p /sys/lib/go/$objtype-$VERSION && dircp .
/sys/lib/go/$objtype-$VERSION
 CLEANCOMMAND=fortune /lib/ken
 UNINSTALLCOMMAND=rm -rf /sys/lib/go/$objtype-$VERSION
 MESSAGE='To use go, add this to your profile:' \
diff --git a/net-misc/netscan/mkfile b/net-misc/netscan/mkfile
--- a/net-misc/netscan/mkfile
+++ b/net-misc/netscan/mkfile
@@ -7,9 +7,9 @@ VERSION=0
 9PSERVER=9front
 9PFILE=/n/extra/netscan.c
 BUILDPATH=work/
-BUILDCOMMAND=/bin/rc -c '''s=netscan; $CC $s.c && $LD -o $O.$s $s.$O'''
-CLEANCOMMNAD=/bin/rc -c '''s=netscan; rm -f $O.$s $s.$O'''
-INSTALLCOMMAND=/bin/rc -c '''s=netscan; cp $O.$s /$objtype/bin/$s'''
+BUILDCOMMAND='s=netscan; $CC $s.c && $LD -o $O.$s $s.$O'
+CLEANCOMMAND='s=netscan; rm -f $O.$s $s.$O'
+INSTALLCOMMAND='s=netscan; cp $O.$s /$objtype/bin/$s'
 UNINSTALL=/$objtype/bin/netscan

 </sys/ports/Mk/mkfile
diff --git a/net-misc/vultr/mkfile b/net-misc/vultr/mkfile
--- a/net-misc/vultr/mkfile
+++ b/net-misc/vultr/mkfile
@@ -7,10 +7,10 @@ DEPS=dev-lang/go-19

 WEBSOURCE=https://github.com/JamesClonk/vultr/archive/$VERSION.tar.gz
 BUILDPATH=work/vultr-$VERSION
-BUILDCOMMAND=/bin/rc -c '''rfork ne; \
+BUILDCOMMAND='rfork ne; \
	mkdir -p gopath/src/github.com/JamesClonk/vultr; \
	bind . gopath/src/github.com/JamesClonk/vultr; \
- GOPATH=`{pwd}^/gopath /bin/go build;'''
+ GOPATH=`{pwd}^/gopath /bin/go build;'
 CLEANCOMMAND=rm -r gopath
 INSTALLCOMMAND=cp vultr-$VERSION /$objtype/bin/vultr
 UNINSTALLCOMMAND=rm -f /$objtype/bin/vultr


Wed Sep 19 22:10:26 EDT 2018
diff --git a/Mk/mkfile b/Mk/mkfile
--- a/Mk/mkfile
+++ b/Mk/mkfile
@@ -10,9 +10,6 @@ files=`{pwd}/files

 # for ease of use
 BUILDPATH=`{ if(~ $#BUILDPATH 0){ echo 'work/' }; if not { echo $BUILDPATH }}
-BUILDCOMMAND=`{ if(~ $#BUILDCOMMAND 0){ echo 'mk' }; if not { echo $BUILDCOMMAND
}}
-INSTALLCOMMAND=`{ if(~ $#INSTALLCOMMAND 0){ echo 'mk install' }; if not { echo
$INSTALLCOMMAND }}
-CLEANCOMMAND=`{ if(~ $#CLEANCOMMAND 0){ echo 'mk clean' }; if not { echo
$CLEANCOMMAND }}
 archmask=`{ if(!  ~ $#ARCHMASK 0) { echo $ARCHMASK } }

 <|$PORTS/Mk/mk.rc
@@ -232,15 +229,12 @@ build:QE: patch
	@{
		rfork ne
		cd $BUILDPATH
- if(!  ~ $BUILDCOMMAND ''){
- $BUILDCOMMAND
- }
- if not {
- status=''
- }
+ if(~ $#BUILDCOMMAND 0)
+ BUILDCOMMAND=mk
+ eval $BUILDCOMMAND || exit $status
		if(!  ~ $#POSTBUILD 0){
			echo 'Running post-build hooks...'
- $POSTBUILD
+ eval $POSTBUILD
		}
	}
	touch build
@@ -258,7 +252,7 @@ test:VQE: build
		rfork ne
		cd $BUILDPATH
		if(!  ~ $#TESTCOMMAND 0){
- $TESTCOMMAND
+ eval $TESTCOMMAND
			if(!  ~ $status ''){
				echo 'Tests failed.  Please notify '^$OWNER
				status='tests failed'
@@ -284,8 +278,10 @@ install:QE: build
			}
		}
	}
+ if(~ $#INSTALLCOMMAND 0)
+ INSTALLCOMMAND=mk install
	if(!  checkport $PORTNAME){
- @{ rfork ne; cd $BUILDPATH && $INSTALLCOMMAND } || exit $status
+ @{ rfork ne; cd $BUILDPATH && eval $INSTALLCOMMAND } || exit $status
		if(!  ~ $#VERSION 0){
			register $PORTNAME $VERSION
		}
@@ -312,7 +308,7 @@ reinstall:VQE: build
	cd $BUILDPATH
	@{
		rfork ne
- $INSTALLCOMMAND
+ eval $INSTALLCOMMAND
	}
	if(!  ~ $*MESSAGE 0){
		for(i in $MESSAGE){
@@ -325,7 +321,9 @@ testinstall:VQE:
	cd $BUILDPATH
	@{
		rfork ne
- $INSTALLCOMMAND
+ if(~ $#INSTALLCOMMAND 0)
+ INSTALLCOMMAND=mk install
+ eval $INSTALLCOMMAND
	}
	if(!  ~ $*MESSAGE 0){
		for(i in $MESSAGE){
@@ -341,9 +339,9 @@ clean:VQE: $BUILDPATH
		if(!  ~ $#NOCLEAN 0) {
			exit
		}
- if(!  ~ $#CLEANCOMMAND 0){
- $CLEANCOMMAND || exit $status
- }
+ if(~ $#CLEANCOMMAND 0)
+ CLEANCOMAND=mk clean
+ eval $CLEANCOMMAND || exit $status
	}
	rm -f build
	status=''
@@ -381,7 +379,7 @@ uninstall:VQE:
		@{
			rfork ne
			cd $BUILDPATH
- $UNINSTALLCOMMAND
+ eval $UNINSTALLCOMMAND
		} || exit $status
	}
	deregister $PORTNAME


Wed Sep 19 21:07:33 EDT 2018
diff --git a/Mk/mkfile b/Mk/mkfile
--- a/Mk/mkfile
+++ b/Mk/mkfile
@@ -233,14 +233,14 @@ build:QE: patch
		rfork ne
		cd $BUILDPATH
		if(!  ~ $BUILDCOMMAND ''){
- $BUILDCOMMAND
+ eval $BUILDCOMMAND
		}
		if not {
			status=''
		}
		if(!  ~ $#POSTBUILD 0){
			echo 'Running post-build hooks...'
- $POSTBUILD
+ eval $POSTBUILD
		}
	}
	touch build
@@ -258,7 +258,7 @@ test:VQE: build
		rfork ne
		cd $BUILDPATH
		if(!  ~ $#TESTCOMMAND 0){
- $TESTCOMMAND
+ eval $TESTCOMMAND
			if(!  ~ $status ''){
				echo 'Tests failed.  Please notify '^$OWNER
				status='tests failed'
@@ -285,7 +285,7 @@ install:QE: build
		}
	}
	if(!  checkport $PORTNAME){
- @{ rfork ne; cd $BUILDPATH && $INSTALLCOMMAND } || exit $status
+ @{ rfork ne; cd $BUILDPATH && eval $INSTALLCOMMAND } || exit $status
		if(!  ~ $#VERSION 0){
			register $PORTNAME $VERSION
		}
@@ -312,7 +312,7 @@ reinstall:VQE: build
	cd $BUILDPATH
	@{
		rfork ne
- $INSTALLCOMMAND
+ eval $INSTALLCOMMAND
	}
	if(!  ~ $*MESSAGE 0){
		for(i in $MESSAGE){
@@ -325,7 +325,7 @@ testinstall:VQE:
	cd $BUILDPATH
	@{
		rfork ne
- $INSTALLCOMMAND
+ eval $INSTALLCOMMAND
	}
	if(!  ~ $*MESSAGE 0){
		for(i in $MESSAGE){
@@ -342,7 +342,7 @@ clean:VQE: $BUILDPATH
			exit
		}
		if(!  ~ $#CLEANCOMMAND 0){
- $CLEANCOMMAND || exit $status
+ eval $CLEANCOMMAND || exit $status
		}
	}
	rm -f build
@@ -381,7 +381,7 @@ uninstall:VQE:
		@{
			rfork ne
			cd $BUILDPATH
- $UNINSTALLCOMMAND
+ eval $UNINSTALLCOMMAND
		} || exit $status
	}
	deregister $PORTNAME
diff --git a/dev-lang/go-19/mkfile b/dev-lang/go-19/mkfile
--- a/dev-lang/go-19/mkfile
+++ b/dev-lang/go-19/mkfile
@@ -10,7 +10,7 @@ DEPS=app-misc/ca-certificates
 WEBSOURCE=http://9legacy.org/download/go/go$VERSION-plan9-$objtype-bootstrap.tbz
 BUILDPATH=work/go-plan9-$objtype-bootstrap
 BUILDCOMMAND=fortune /lib/rob
-INSTALLCOMMAND=/bin/rc -c '''mkdir -p /sys/lib/go/$objtype-$VERSION && dircp .
/sys/lib/go/$objtype-$VERSION'''
+INSTALLCOMMAND=mkdir -p /sys/lib/go/$objtype-$VERSION && dircp .
/sys/lib/go/$objtype-$VERSION
 CLEANCOMMAND=fortune /lib/ken
 UNINSTALLCOMMAND=rm -rf /sys/lib/go/$objtype-$VERSION
 MESSAGE='To use go, add this to your profile:' \
diff --git a/net-misc/vultr/mkfile b/net-misc/vultr/mkfile
--- a/net-misc/vultr/mkfile
+++ b/net-misc/vultr/mkfile
@@ -7,10 +7,10 @@ DEPS=dev-lang/go-19

 WEBSOURCE=https://github.com/JamesClonk/vultr/archive/$VERSION.tar.gz
 BUILDPATH=work/vultr-$VERSION
-BUILDCOMMAND=/bin/rc -c '''rfork ne; \
+BUILDCOMMAND='rfork ne; \
	mkdir -p gopath/src/github.com/JamesClonk/vultr; \
	bind . gopath/src/github.com/JamesClonk/vultr; \
- GOPATH=`{pwd}^/gopath /bin/go build;'''
+ GOPATH=`{pwd}^/gopath /bin/go build;'
 CLEANCOMMAND=rm -r gopath
 INSTALLCOMMAND=cp vultr-$VERSION /$objtype/bin/vultr
 UNINSTALLCOMMAND=rm -f /$objtype/bin/vultr


Wed Sep 19 21:00:34 EDT 2018
diff --git a/Mk/mkfile b/Mk/mkfile
--- a/Mk/mkfile
+++ b/Mk/mkfile
@@ -233,14 +233,14 @@ build:QE: patch
		rfork ne
		cd $BUILDPATH
		if(!  ~ $BUILDCOMMAND ''){
- $BUILDCOMMAND
+ eval $BUILDCOMMAND
		}
		if not {
			status=''
		}
		if(!  ~ $#POSTBUILD 0){
			echo 'Running post-build hooks...'
- $POSTBUILD
+ eval $POSTBUILD
		}
	}
	touch build
@@ -258,7 +258,7 @@ test:VQE: build
		rfork ne
		cd $BUILDPATH
		if(!  ~ $#TESTCOMMAND 0){
- $TESTCOMMAND
+ eval $TESTCOMMAND
			if(!  ~ $status ''){
				echo 'Tests failed.  Please notify '^$OWNER
				status='tests failed'
@@ -285,7 +285,7 @@ install:QE: build
		}
	}
	if(!  checkport $PORTNAME){
- @{ rfork ne; cd $BUILDPATH && $INSTALLCOMMAND } || exit $status
+ @{ rfork ne; cd $BUILDPATH && eval $INSTALLCOMMAND } || exit $status
		if(!  ~ $#VERSION 0){
			register $PORTNAME $VERSION
		}
@@ -312,7 +312,7 @@ reinstall:VQE: build
	cd $BUILDPATH
	@{
		rfork ne
- $INSTALLCOMMAND
+ eval $INSTALLCOMMAND
	}
	if(!  ~ $*MESSAGE 0){
		for(i in $MESSAGE){
@@ -325,7 +325,7 @@ testinstall:VQE:
	cd $BUILDPATH
	@{
		rfork ne
- $INSTALLCOMMAND
+ eval $INSTALLCOMMAND
	}
	if(!  ~ $*MESSAGE 0){
		for(i in $MESSAGE){
@@ -342,7 +342,7 @@ clean:VQE: $BUILDPATH
			exit
		}
		if(!  ~ $#CLEANCOMMAND 0){
- $CLEANCOMMAND || exit $status
+ eval $CLEANCOMMAND || exit $status
		}
	}
	rm -f build
@@ -381,7 +381,7 @@ uninstall:VQE:
		@{
			rfork ne
			cd $BUILDPATH
- $UNINSTALLCOMMAND
+ eval $UNINSTALLCOMMAND
		} || exit $status
	}
	deregister $PORTNAME
diff --git a/dev-lang/go-19/mkfile b/dev-lang/go-19/mkfile
--- a/dev-lang/go-19/mkfile
+++ b/dev-lang/go-19/mkfile
@@ -10,7 +10,7 @@ DEPS=app-misc/ca-certificates
 WEBSOURCE=http://9legacy.org/download/go/go$VERSION-plan9-$objtype-bootstrap.tbz
 BUILDPATH=work/go-plan9-$objtype-bootstrap
 BUILDCOMMAND=fortune /lib/rob
-INSTALLCOMMAND=/bin/rc -c '''mkdir -p /sys/lib/go/$objtype-$VERSION && dircp .
/sys/lib/go/$objtype-$VERSION'''
+INSTALLCOMMAND=mkdir -p /sys/lib/go/$objtype-$VERSION && dircp .
/sys/lib/go/$objtype-$VERSION
 CLEANCOMMAND=fortune /lib/ken
 UNINSTALLCOMMAND=rm -rf /sys/lib/go/$objtype-$VERSION
 MESSAGE='To use go, add this to your profile:' \


Wed Sep 19 20:11:33 EDT 2018
diff --git a/app-emulation/simh/mkfile b/app-emulation/simh/mkfile
--- a/app-emulation/simh/mkfile
+++ b/app-emulation/simh/mkfile
@@ -8,8 +8,8 @@ 9PSERVER=9front.org
 9PFILE=/n/9front.org/extra/simh.tgz
 BUILDPATH=work/simh
 BUILDCOMMAND=plan9/build
-INSTALLCOMMAND=cp simh/BIN/* /$objtype/bin/
-CLEANCOMMAND=rm *.$O
-UNINSTALLCOMMAND=rm '/'^$objtype^'/bin/'^('pdp8' 'pdp10' 'pdp11' 'vax' 'vax780')
+INSTALLCOMMAND=eval cp BIN/* /$objtype/bin
+CLEANCOMMAND=eval rm *.$O
+UNINSTALLCOMMAND=eval rm /$objtype/bin/^(pdp8 pdp11 vax vax780)

 </sys/ports/Mk/mkfile


Wed Sep 19 17:42:54 EDT 2018
#!/bin/rc
# minimal chat client for hubfs: chat [-n NICK] [-j CHANNEL] [chatsrv]

fn helpmessage{
	echo -------------------------
	echo '/q to quit | /c to list channels | /h for help message'
	echo '/n NICK to change nick | /j CHANNEL to change channels'
	echo -------------------------
}

rfork enf
channel=chat
chatsrv=chat
while (~ $1 -*){
	switch($1){
	case -n
		name = $2
		shift
		shift
	case -j
		channel = $2
		shift
		shift
	case *
		echo bad flag $1 '-n NICK -j CHANNEL'
		shift
	}
}
if(!  ~ $1 '')
	chatsrv=$1
if(!  test -e /n/$chatsrv/chat)
	mount /srv/$chatsrv /n/$chatsrv
if(!  test -e /n/$chatsrv/chat){
	echo 'no chat service named $chatsrv found' >[1=2]
	exit no.chat
}

echo ' -- hubchat 0.2 --'
helpmessage
sleep 2
while(~ $#name 0){
	echo 'please enter a chat name:'
	name=`{read}
}
echo JOIN $name to $channel >>/n/$chatsrv/$channel
cat /n/$chatsrv/$channel &
catkill=$apid

while(talk=`{read}){
	if(~ $talk /*){
		switch($talk){
		case /q*
			echo PART $name from $channel >>/n/$chatsrv/$channel
			@{echo kill>/proc/$catkill/ctl}
			exit
		case /n*
			if(!  ~ $talk(2) ''){
				echo nick $name ' -> ' $talk(2)
				>>/n/$chatsrv/$channel
				name=$talk(2)
			}
			if not
				echo 'you need to provide a nick for /n NICK'
			command=yes
		case /j*
			if (~ $talk(2) '')
				echo must specify a channel to join
			if not if(test -e /n/chat/$talk(2)){
				echo PART $name from $channel
				>>/n/$chatsrv/$channel
				@{echo kill>/proc/$catkill/ctl}
				channel=$talk(2)
				cat /n/chat/$channel &
				catkill=$apid
				echo JOIN $name to $channel
				>>/n/$chatsrv/$channel
			}
			if not
				echo channel does not exist
			command=yes
		case /h*
			helpmessage
			echo currently in $channel
			echo
			command=yes
		case /c
			echo Available channels:
			lc /n/$chatsrv
			echo -------------------
			echo currently in $channel
			echo
			command=yes
		case *
			echo unknown command
			command=yes
		}
	}
	if(~ $talk '')
		command=yes
	if(!  ~ $command yes){
# ts=`{date -u}
# ts=`{echo '('^$ts(4)^')'}
		line=`{echo $name ': ' $talk}
		echo $line >>/n/chat/$channel
	}
	command=no
}


Wed Sep 19 17:35:57 EDT 2018
#!/bin/rc
# connects to 9gridchan grid services and starts a new subrio
# options -t tls -m mountonly
# awk '/exportfs/{print "srv -c", $1, $3, $5}' /mnt/registry/index

fn cpl{
	cp $1 /n/gridftp
	ptarg=`{basename $1}
	plumb http://wiki.9gridchan.org/incoming/$ptarg
}

while (~ $1 -*){
	switch($1){
	case -t
		tls = yes
		shift
	case -m
		mountonly = yes
		shift
	case -s
		scriptonly = yes
		shift
	case *
		echo bad flag $1 >>[1=2]
		shift
	}
}

if(~ $tls yes){
	auth/factotum
	echo 'key proto=dp9ik user=glenda dom=grid !password=9gridchan'
	>/mnt/factotum/ctl
	srvtls tcp!registry.9gridchan.org!16675 gridregistry /mnt/registry
	awk '/tlssrv/{print "srvtls -c", $1, $3, $5}' /mnt/registry/index
	>/tmp/gridscript
# cat /mnt/registry/index |grep tlssrv |sed 's/^/srvtls -c /g' |sed 's/is //g'
|sed 's/mountpoint //g' |sed 's/service.*$//g' >/tmp/gridscript
}
if(!  ~ $tls yes){
	srv tcp!registry.9gridchan.org!6675 gridregistry /mnt/registry
	awk '/exportfs/{print "srv -c", $1, $3, $5}' /mnt/registry/index
	>/tmp/gridscript
# cat /mnt/registry/index |grep exportfs |sed 's/^/srv -c /g' |sed 's/is //g' |sed
's/mountpoint //g' |sed 's/service.*$//g' >/tmp/gridscript
}
ftpservice=`{awk '/lftpd/{print "ftpfs -/", $1}' /mnt/registry/index}
echo none >/tmp/ftplogin
echo none >>/tmp/ftplogin
echo 'cat /tmp/ftplogin |' $ftpservice >>/tmp/gridscript
echo 'bind -c /n/ftp/incoming /n/gridftp' >>/tmp/gridscript
#echo 'srvfs gridftp /n/ftp/incoming' >>/tmp/gridscript
#echo 'mount -c /srv/gridftp /n/gridftp' >>/tmp/gridscript

if(~ $scriptonly yes){
	echo 'script saved in /tmp/gridscript'
	cat /tmp/gridscript
	exit
}

. /tmp/gridscript

if(~ $mountonly yes){
	echo 'grid services mounted'
	exit
}

if(test -e /bin/grio)
	srio=(grio -s -c 0x99009900)
if not
	srio=(rio -s)

echo '#!/bin/rc
window -r 0 0 700 400 chat
window -r 700 0 1300 400 acme -l/tmp/gridacme
window -r 0 400 700 750 mothra -a http://wiki.9gridchan.org/message_board
window -r 700 400 1300 750 page /n/gridroot/lib/musicant.png
' >/tmp/gridrio

chmod +x /tmp/gridrio
if(!  test -e /mnt/web/ctl)
	webfs

echo '/usr/glenda
/lib/font/bit/vga/unicode.font
/lib/font/bit/vga/unicode.font
	  0 66
f 1 1 36 36 3
	  1 33 36 1 0 /n/gridftp/ Del Snarf Get | Look
F 1 1 15 15 28 15
	  2 23 15 0 1 Del Snarf Undo | Look
Wiki /mnt/wiki' >/tmp/gridacme

window -m -r 0 0 1350 750 $srio -i /tmp/gridrio


Tue Sep 18 23:51:57 EDT 2018
#!/bin/rc

fn list{
	l = `{ls -F $*}
	for(i in $l){
		if(~ $i */)
			list $i
		if not
			echo $i
	}
}

list $*


prev | next