OK, turing.

<- leave blank

Thu Aug 11 22:35:24 EDT 2022

Will Lee:

nobody.

Thu Aug 11 22:34:44 EDT 2022
; wc -l bin/rc/mother
    504 bin/rc/mother
; cd /sys/src/cmd/upas/ned
; wc -l /sys/src/cmd/upas/ned/nedmail.c
   2823 /sys/src/cmd/upas/ned/nedmail.c

Thu Aug 11 17:34:24 EDT 2022
Hey - can I ask who designed your site?
Thank you!
-Will Lee

Wed Aug 10 07:01:27 EDT 2022
#!/bin/rc
rfork ne

. /sys/lib/git/common.rc
gitup

fn dodiff {
	while(t=`{read}){
		h=$t(1)
		o=.git/fs/object/`{git/query $h~}
		c=.git/fs/object/$h
		echo 'Hash:' $h
		echo -n 'Date: '; date `{walk -em $c/msg}
		echo -n 'Author: '; cat $c/author
		echo -n 'Message: '; cat $c/msg
		echo
		for(f in $files){
			curr=$c/tree/$f
			prev=$o/tree/$f
			if(!  test -e $curr)
				curr=/dev/null
			if(!  test -e $prev)
				prev=/dev/null
			diff -u $prev $curr
		}
		echo
	}
}

if(~ $#* 0)
	die usage: $0 files...

files=`{cleanname $gitrel/$*}
git/log -s $files | dodiff


Wed Aug 10 05:22:12 EDT 2022
diff 01e6f4d436fa3c03eb768268b4d90cfbd2af71ad uncommitted
--- a/sys/src/9/pc64/main.c
+++ b/sys/src/9/pc64/main.c
@@ -41,10 +41,10 @@
		conf.npage += conf.mem[i].npage;

	conf.nproc = 100 + ((conf.npage*BY2PG)/MB)*5;
- if(cpuserver)
- conf.nproc *= 3;
- if(conf.nproc > 2000)
- conf.nproc = 2000;
+ if(conf.nproc > 50000)
+ conf.nproc = 50000;
+ if(p = getconf("*nproc"))
+ conf.nproc = strtol(p, nil, 0);
	conf.nimage = 200;
	conf.nswap = conf.nproc*80;
	conf.nswppo = 4096;
--- a/sys/src/9/port/devproc.c
+++ b/sys/src/9/port/devproc.c
@@ -149,7 +149,8 @@
 #define QSHIFT 5 /* location in qid of proc slot # */

 #define QID(q) ((((ulong)(q).path)&0x0000001F)>>0)
-#define SLOT(q) (((((ulong)(q).path)&0x07FFFFFE0)>>QSHIFT)-1)
+#define SLOTMAX 0x4000000
+#define SLOT(q) (((((ulong)(q).path)>>QSHIFT)&(SLOTMAX-1))-1)
 #define PID(q) ((q).vers)
 #define NOTEID(q) ((q).vers)

@@ -202,6 +203,8 @@
			return -1;

		p = proctab(s);
+ if(p == nil)
+ return 0;
		pid = p->pid;
		if(pid == 0)
			return 0;
@@ -227,10 +230,12 @@
		panic("procgen");

	tab = &procdir[s];
- path = c->qid.path&~(((1<<QSHIFT)-1)); /* slot component */
+ path = c->qid.path&~((1<<QSHIFT)-1); /* slot component */

	/* p->procmode determines default mode for files in /proc */
	p = proctab(SLOT(c->qid));
+ if(p == nil)
+ panic("procgen slot");
	perm = tab->perm;
	if(perm == 0)
		perm = p->procmode;
@@ -281,8 +286,9 @@
 static void
 procinit(void)
 {
- if(conf.nproc >= (1<<(16-QSHIFT))-1)
- print("warning: too many procs for devproc\n");
+ /* slot masks: lets see how big we can go */
+ if(conf.nproc > SLOTMAX)
+ panic("warning: too many procs for devproc\n");
 }

 static Chan*
@@ -335,8 +341,7 @@
		setnoteid(p, noteid);
		return;
	}
- for(i = 0; i < conf.nproc; i++){
- pp = proctab(i);
+ for(i = 0; (pp = proctab(i)) != nil; i++){
		if(pp->noteid != noteid || pp->kp)
			continue;
		if(strcmp(pp->user, p->user) == 0){
@@ -354,11 +359,10 @@
	Proc *p;
	int i;

- for(i = 0; i < conf.nproc; i++){
- p = proctab(i);
+ for(i = 0; (p = proctab(i)) != nil; i++){
		if(p == up)
			continue;
- if(p->noteid != noteid || p->kp)
+ if(p == nil || p->noteid != noteid || p->kp)
			continue;
		qlock(&p->debug);
		if(p->noteid == noteid)
@@ -414,7 +418,7 @@
		nexterror();
	}
	pid = PID(c->qid);
- if(p->pid != pid)
+ if(p == nil || p->pid != pid)
		error(Eprocdied);

	omode = openmode(omode0);
@@ -525,6 +529,8 @@
		error(Eshortstat);

	p = proctab(SLOT(c->qid));
+ if(p == nil)
+ panic("wstat walk");
	eqlock(&p->debug);
	if(waserror()){
		qunlock(&p->debug);
@@ -620,6 +626,7 @@

	c = (Chan *)x;
	p = proctab(SLOT(c->qid));
+ if(p == nil) panic("haswaitq");
	return p->pid != PID(c->qid) || p->waitq != nil;
 }

@@ -913,6 +920,8 @@
	}

	p = proctab(SLOT(c->qid));
+ if(p == nil)
+ panic("procread");
	if(p->pid != PID(c->qid))
		error(Eprocdied);

@@ -1179,6 +1188,8 @@
	}

	p = proctab(SLOT(c->qid));
+ if(p == nil)
+ panic("procwrite");
	eqlock(&p->debug);
	if(waserror()){
		qunlock(&p->debug);
--- a/sys/src/9/port/devswap.c
+++ b/sys/src/9/port/devswap.c
@@ -189,7 +189,7 @@
				x = 0;
			}
			p = proctab(x);
- } while(p->state == Dead || p->noswap || !canqlock(&p->seglock));
+ } while(p == nil || p->state == Dead || p->noswap ||
!canqlock(&p->seglock));
		up->psstate = "Pageout";
		for(i = 0; i < NSEG; i++) {
			if((s = p->seg[i]) != nil) {
@@ -274,8 +274,7 @@
	 * Now we must do hardwork to ensure all processes which have tlb
	 * entries for this segment will be flushed if we succeed in paging it out
	 */
- for(x = 0; x < conf.nproc; x++){
- p = proctab(x);
+ for(x = 0; (p = proctab(x)) != nil; x++){
		if(p->state == Dead)
			continue;
		for(i = 0; i < NSEG; i++){
--- a/sys/src/9/port/edf.c
+++ b/sys/src/9/port/edf.c
@@ -373,17 +373,15 @@
		pt(p, SAdmit, 0);

	/* Look for another proc with the same period to synchronize to */
- SET(r);
- for(i=0; i<conf.nproc; i++) {
- r = proctab(i);
+ for(i=0; (r = proctab(i)) != nil; i++) {
		if(r->state == Dead || r == p)
			continue;
- if (r->edf == nil || (r->edf->flags & Admitted) == 0)
+ if(r->edf == nil || (r->edf->flags & Admitted) == 0)
			continue;
- if (r->edf->T == e->T)
- break;
+ if(r->edf->T == e->T)
+ break;
	}
- if (i == conf.nproc){
+ if(p == nil){
		/* Can't synchronize to another proc, release now */
		e->t = now;
		e->d = 0;
@@ -627,11 +625,10 @@
	/* initialize */
	DPRINT("schedulability test %lud\n", theproc->pid);
	qschedulability = nil;
- for(i=0; i<conf.nproc; i++) {
- p = proctab(i);
+ for(i=0; (p = proctab(i)) != nil; i++) {
		if(p->state == Dead)
			continue;
- if ((p->edf == nil || (p->edf->flags & Admitted) == 0) && p != theproc)
+ if((p->edf == nil || (p->edf->flags & Admitted) == 0) && p != theproc)
			continue;
		p->edf->testtype = Rl;
		p->edf->testtime = 0;
--- a/sys/src/9/port/pgrp.c
+++ b/sys/src/9/port/pgrp.c
@@ -9,19 +9,8 @@
	Whinesecs = 10, /* frequency of out-of-resources printing */
 };

-uvlong
-nextmount(void)
-{
- static uvlong next = 0;
- static Lock lk;
- uvlong n;
+static Ref mountid;

- lock(&lk);
- n = ++next;
- unlock(&lk);
- return n;
-}
-
 Pgrp*
 newpgrp(void)
 {
@@ -130,7 +119,7 @@
	 * Allocate mount ids in the same sequence as the parent group
	 */
	for(m = order; m != nil; m = m->order)
- m->mountid = nextmount();
+ m->mountid = incref(&mountid);
	runlock(&from->ns);
	wunlock(&to->ns);
 }
@@ -250,7 +239,7 @@
	m = smalloc(sizeof(Mount));
	m->to = to;
	incref(to);
- m->mountid = nextmount();
+ m->mountid = incref(&mountid);
	m->mflag = flag;
	if(spec != nil)
		kstrdup(&m->spec, spec);
--- a/sys/src/9/port/portdat.h
+++ b/sys/src/9/port/portdat.h
@@ -247,7 +247,7 @@

 struct Mount
 {
- uvlong mountid;
+ ulong mountid;
	int mflag;
	Mount* next;
	Mount* order;
@@ -671,6 +671,7 @@
	ulong pid;
	ulong noteid; /* Equivalent of note group */
	ulong parentpid;
+ ulong index;

	Proc *parent; /* Process to send wait record on exit */
	Lock exl; /* Lock count and waitq */
@@ -784,6 +785,7 @@

	Watchpt *watchpt; /* watchpoints */
	int nwatchpt;
+ char kstackbuf[KSTACK];
 };

 enum
--- a/sys/src/9/port/proc.c
+++ b/sys/src/9/port/proc.c
@@ -23,8 +23,9 @@
 static struct Procalloc
 {
	Lock;
- Proc* arena;
- Proc* free;
+ Proc **tab;
+ Proc *free;
+ int nextindex;
 } procalloc;

 enum
@@ -634,9 +635,15 @@

	lock(&procalloc);
	p = procalloc.free;
- if(p == nil || (p->kstack == nil && (p->kstack = malloc(KSTACK)) == nil)){
- unlock(&procalloc);
- return nil;
+ if(p == nil){
+ p = mallocz(sizeof(Proc), 1);
+ if(p == nil){
+ unlock(&procalloc);
+ return nil;
+ }
+ p->index = procalloc.nextindex++;
+ p->kstack = p->kstackbuf;
+ procalloc.tab[p->index] = p;
	}
	procalloc.free = p->qnext;
	p->qnext = nil;
@@ -682,8 +689,7 @@
		/* pick a machine to wire to */
		memset(nwired, 0, sizeof(nwired));
		p->wired = nil;
- for(i=0; i<conf.nproc; i++){
- pp = proctab(i);
+ for(i=0; (pp = proctab(i)) != nil; i++){
			wm = pp->wired;
			if(wm != nil && pp->pid)
				nwired[wm->machno]++;
@@ -720,20 +726,14 @@
 void
 procinit0(void) /* bad planning - clashes with devproc.c */
 {
- Proc *p;
- int i;
-
- p = xalloc(conf.nproc*sizeof(Proc));
- if(p == nil){
+ procalloc.free = nil;
+ /* allocate 1 extra for a nil terminator */
+ procalloc.tab = xalloc((conf.nproc+1)*sizeof(Proc*));
+ if(procalloc.tab == nil){
		xsummary();
		panic("cannot allocate %lud procs (%ludMB)", conf.nproc,
		conf.nproc*sizeof(Proc)/(1024*1024));
	}
- procalloc.arena = p;
- procalloc.free = p;
- for(i=0; i<conf.nproc-1; i++, p++)
- p->qnext = p+1;
- p->qnext = nil;
-
+ memset(procalloc.tab, 0, (conf.nproc+1)*sizeof(Proc*));
	pidinit();
 }

@@ -1263,7 +1263,7 @@
 Proc*
 proctab(int i)
 {
-#define proctab(x) (&procalloc.arena[(x)])
+#define proctab(x) (procalloc.tab[(x)])
	return proctab(i);
 }

@@ -1304,8 +1304,7 @@
	 */
	memset(await, 0, conf.nmach*sizeof(await[0]));
	nwait = 0;
- for(i = 0; i < conf.nproc; i++){
- p = proctab(i);
+ for(i = 0; (p = proctab(i)) != nil; i++){
		if(p->state != Dead && (*match)(p, a)){
			p->newtlb = 1;
			for(nm = 0; nm < conf.nmach; nm++){
@@ -1572,8 +1571,7 @@

	max = 0;
	kp = nil;
- for(i = 0; i < conf.nproc; i++) {
- p = proctab(i);
+ for(i = 0; (p = proctab(i)) != nil; i++) {
		if(p->state == Dead || p->kp || p->parentpid == 0)
			continue;
		if((p->noswap || (p->procmode & 0222) == 0) && strcmp(eve,
		p->user) == 0)
@@ -1588,8 +1586,7 @@
		return;
	print("%lud: %s killed: %s\n", kp->pid, kp->text, why);
	qlock(&kp->seglock);
- for(i = 0; i < conf.nproc; i++) {
- p = proctab(i);
+ for(i = 0; (p = proctab(i)) != nil; i++) {
		if(p->state == Dead || p->kp)
			continue;
		if(p != kp && p->seg[BSEG] != nil && p->seg[BSEG] ==
		kp->seg[BSEG])
@@ -1624,8 +1621,7 @@
	Proc *p;
	int i;

- for(i = 0; i < conf.nproc; i++){
- p = proctab(i);
+ for(i = 0; (p = proctab(i)) != nil; i++){
		qlock(&p->debug);
		if(p->user != nil && strcmp(old, p->user) == 0)
			kstrdup(&p->user, new);
@@ -1809,12 +1805,15 @@
 int
 procindex(ulong pid)
 {
+ Proc *p;
	Pid *i;
+ int x;

	i = pidlookup(pid);
	if(i != nil){
- int x = i->procindex;
- if(proctab(x)->pid == pid)
+ x = i->procindex;
+ p = proctab(x);
+ if(p != nil && p->pid == pid)
			return x;
	}
	return -1;
@@ -1869,7 +1868,7 @@
		p->parentpid = 0;

	i = pidadd(0);
- i->procindex = (int)(p - procalloc.arena);
+ i->procindex = p->index;

	if(p->noteid == 0){
		incref(i);


Tue Aug 9 21:42:32 EDT 2022
From: hiro <23hiro@gmail.com>
Date: Mon, 8 Aug 2022 12:15:59 +0200
To: 9front@9front.org
Subject: Re: [9front] hack-a-thon daily proceedings summaries
Reply-To: 9front@9front.org

done or fixed:
1) kubernetes/docker (worker's unions should not allow this shit.
stand up and fight for your rights please)
2) raid5hole (/dev/fs could be a library used by storage fileservers
for redundancy layer)
3) barbecue
4) qwx fixed brightness on x250 (igfx)
5) qwx fixed hardware cursors on x250 and x61t (igfx)
6) qwx fixed external monitors on x250

ongoing brainstorming:
-mountable namespace-file or /srv namespaces or exportfs in kernel
-aap wants programs to read/interact with the text that is in
hold-mode, moody also needs tentative input into rio into ktrans
-k0ga is rewriting history in rc!
-procs are going on a diet so that ori can fork a ton of them.


cooling fluid levels:
-1 pool, mostly still filled
-90/150liters of beer

other improvements:
-hotfix: bamboo roof for thinkpad-station has been built
-walls are being painted rio-grey by contractors
-mostly homeopathy and good intentions




Tue Aug 9 21:42:18 EDT 2022
From: Douglas McIlroy <douglas.mcilroy@dartmouth.edu>
Date: Tue, 9 Aug 2022 18:18:52 -0400
To: TUHS main list <tuhs@tuhs.org>
Message-ID-Hash: 2EBUDPXOQUVGKQLUADLH3IZJNF7EUR56
Subject: [TUHS] Re: SNOBOL and RATSNO
Archived-At:
<https://www.tuhs.org/mailman3/hyperkitty/list/tuhs@tuhs.org/message/2EBUDPXOQUVGKQLUADLH3IZJNF7EUR56/>

> I've always believed that pic was so well designed
> because it took a day to get the print out (back then),

I'm afraid this belief is urban legend.  Credit for pic is due 100% to
Kernighan, not to the contemporary pace of computing practice.

Even in the 1950s, we had one-hour turnaround at Bell Labs.  And the
leap from batch processing had happened well before pic.  Turnaround on
modest Unix source files and tests has changed little in the past
fifty years.

Doug




Tue Aug 9 21:42:09 EDT 2022
From: Andrew Hume <andrew@humeweb.com>
Date: Tue, 9 Aug 2022 08:15:38 -0700
To: Clem Cole <clemc@ccc.com>
Message-ID-Hash: KEHAEEQUEWSQYN2NJ5CHF733V2IPAZ6Y
CC: The Eunuchs Hysterical Society <tuhs@tuhs.org>
Subject: [TUHS] Re: SNOBOL and RATSNO
Archived-At:
<https://www.tuhs.org/mailman3/hyperkitty/list/tuhs@tuhs.org/message/KEHAEEQUEWSQYN2NJ5CHF733V2IPAZ6Y/>

rob, clem:

	has there been a shift in ability?  or is this more likely a sampling bias
(because there were so many fewer programmers then)?


> On Aug 9, 2022, at 6:34 AM, Clem Cole <clemc@ccc.com> wrote:
>
>
>
> On Tue, Aug 9, 2022 at 2:12 AM Rob Pike <robpike@gmail.com
<mailto:robpike@gmail.com>> wrote:
>
> I still marvel at the productivity and precision of his generation of
programmers.
> Amen.





Tue Aug 9 21:41:57 EDT 2022
From tuhs.org!tuhs-bounces Tue Aug 9 02:12:58 -0400 2022
From: Rob Pike <robpike@gmail.com>
Date: Tue, 9 Aug 2022 16:11:38 +1000
To: Jonathan Gevaryahu <jgevaryahu@hotmail.com>
Message-ID-Hash: KWRNOUQ6YTZFXQACOS7HMICUQ3KDJQBC
CC: The Eunuchs Hysterical Society <tuhs@tuhs.org>
Subject: [TUHS] Re: SNOBOL and RATSNO
Archived-At:
<https://www.tuhs.org/mailman3/hyperkitty/list/tuhs@tuhs.org/message/KWRNOUQ6YTZFXQACOS7HMICUQ3KDJQBC/>

We're probably well off topic now but...

Many years ago I ran into Bob Dewar on a visit to Cambridge University and
we got to talking.  He said that the original implementation of SPITBOL, for
the System/360, was in assembler (of course), and written by him and
Belcher (?).  The story he told was that they wrote it all down first, put
it on punch cards, and sent it to the IBM machine.  The next day they got
back a listing with a bunch of errors.  They iterated.  By the fourth
round—fifth day—they had a working SPITBOL.

I still marvel at the productivity and precision of his generation of
programmers.

-rob


On Tue, Aug 9, 2022 at 3:13 PM Jonathan Gevaryahu <jgevaryahu@hotmail.com>
wrote:

> On 7/29/2022 1:07 AM, Tomasz Rola wrote:
> > On Wed, Jul 27, 2022 at 10:13:04PM -0600, William H. Mitchell wrote:
> > [...]
> >> Phil Budne: Thanks for your CSNOBOL4 implementation!  I’ve used it
to
> show students SNOBOL4 in a comparative languages class at the U of
> Arizona.  (I was thinking your name sounded familiar!)
> >>
> >>> On Jul 27, 2022, at 7:03 PM, Phil Budne
<phil@ultimate.com> wrote:
> >>>
> >>>> Anyway, I have got Phil Budne's implementation
> >>> C'est moi!  SNOBOL came out of Bell Labs in Holmdel NJ.
> >>> There was a SNOBOL3 implementation in Unix 6th Edition days
called
> "sno".
> > [...]
> >
> > Yes, I have had a look and it seems to be very nicely written
> > project.  Oh, and there is plenty of Snobol4 code to look at, too...
> >
> > Thank you.
> >
> Speaking of SNOBOL4, I typed up the SNOBOL code from the NRL Report 7948
> (1975) titled "Automatic Translation of English Text to Phonetics by
> Means of Letter-to-Sound Rules" by Honey Sue Elovitz, Rodney W. Johnson,
> Astrid McHugh and John E. Shore, and made some minor modifications to
> make it work properly with the windows/catspaw version of snobol/spitbol.
>
> It might not be necessary to make those changes at all, with Phil's
> version, I'll need to try that!
>
> I have both the patched and unpatched versions at
> https://github.com/Lord-Nightmare/NRL_TextToPhonemes and it does behave
> correctly/matches the paper (at least the patched version does).
>
> I recently (within the past month) discovered another later port of the
> NRL ruleset from 1978 as part of Peter B. Maggs' ANGLOPHONE package for
> S-100 systems, intended for use with the Computalker CT-1 speech
> synthesis S-100 card.  Apparently Rodney W. Johnson had continued
> developing the rules even after the 1975/1976 publications of the NRL
> report and the IEEE ITASSP version of said report, and I haven't updated
> the bibliography on the github readme yet.
>
>
> Jonathan G.
>
> --
> Jonathan Gevaryahu AKA Lord Nightmare
> jgevaryahu@gmail.com
> jgevaryahu@hotmail.com
>
>




Mon Aug 8 21:51:39 EDT 2022
Totally getting bookmarked, I love you all and it's time for bed.

Mon Aug 8 17:46:39 EDT 2022
I was here today.
~moonsheep

next