OK, turing.

<- leave blank

Thu Jul 22 15:08:03 EDT 2021

: 9ferno.git9 ; git/import
../9ferno.clean/0001-git-ignore-generated-directories.patch # patch created by git
format-patch
applying git ignore generated directories
/rc/lib/rcmain: patch failed
/bin/git/import: rc 7046813: patch failed
: 9ferno.git9 ; git/import ../9ferno.clean/1.patch # patch created by git/export
in a non-git9 repo
applying git ignore generated directories
/rc/lib/rcmain: patch failed
/bin/git/import: rc 7046864: patch failed
: 9ferno.git9 ;

Thu Jul 22 13:51:30 EDT 2021
truegit# git/clone /mnt/term/mnt/term/home/j/local/plan9/custom/9ferno
fetching...
deltifying 11517 objects: 0%

Thu Jul 22 11:54:07 EDT 2021
https://pastebin.com/cSrQX6vm

Thu Jul 22 10:54:49 EDT 2021
// boop.c
// 6c -FTVw boop.c && 6l -o boop boop.6 && ./boop | audio/pcmconv -i f32c1r44100
>/dev/audio

#include <u.h>
#include <libc.h>

#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))
#define RATE 44100.0
#define SZ(x) (int)(x*RATE)
#define S(n,d) float n[SZ(d)]
#define FS(n) for(i = 0; i < nelem(n); i++)
#define NS(n) nelem(n)
#define TRW(f,i) (PI*2*(f)/RATE*(i))
#define LF(n) ((double)(NS(n) - i) / NS(n))
#define CF(n) cos(PI*(1.0-LF(n))/2.0)
#define SA(x,n) (((x) & (n)) ? -1 : 1)

void
main(int, char **)
{
	int i, j, k;
	S(s₀, 0.09);
	S(s₁, 0.04);
	S(s₂, 0.03);

	for(k = 0; k < 1024; k++){
		for(j = 0; j < 4; j++){
			FS(s₁) s₁[i] = 0.7 * fabs(sin(TRW(800+20*j + 200*SA(k,3) +
			120*SA(k,8) - 160*SA(k,16), i))*CF(s₁))*CF(s₁);
			FS(s₀) s₀[i] = sin(TRW(60+20*j + 10*(k % 4), i))*CF(s₀);
			FS(s₁) s₀[i] += s₁[i];
			FS(s₂) s₂[i] = 0.2 * cos(TRW(100+500*sin(TRW(1 + (k %
			8)*((k % 16)+j), i)), i));
			FS(s₂) s₀[i] += s₂[i];
			FS(s₀) s₀[i] /= 3.0;

			write(1, s₀, sizeof(s₀));
		}
	}

	exits(nil);
}


Thu Jul 22 10:52:01 EDT 2021
user@debian:~$ _=`uname -r`; cat `find /boot |grep -e "/boot/config-$_"` |grep
CPUACC
CONFIG_CGROUP_CPUACCT=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_CGROUP_CPUACCT=y
user@debian:~$ uname -a
Linux debian 5.12.0-18.1-liquorix-amd64 #1 ZEN SMP PREEMPT liquorix
5.12-26.1~bullseye (2021-07-19) x86_64 GNU/Linux
user@debian:~$ _=`uname -r`; cat `find /boot |grep -e "/boot/config-$_"` |grep MUQ
CONFIG_SCHED_MUQSS=y


Thu Jul 22 10:44:37 EDT 2021
_=`uname -r`; cat `find /boot |grep -e "/boot/config-$_"` |grep

Thu Jul 22 09:49:03 EDT 2021
user@debian:~$ cat /proc/pressure/memory
cat: /proc/pressure/memory: No such file or directory
user@debian:~$ uname -a
Linux debian 5.12.0-18.1-liquorix-amd64 #1 ZEN SMP PREEMPT liquorix
5.12-26.1~bullseye (2021-07-19) x86_64 GNU/Linux

Thu Jul 22 05:20:31 EDT 2021
 OK, turing.

Wed Jul 21 23:31:09 EDT 2021
From
9fans.bounce.topicbox.com!bounce.mMcecc24b77fbe2df7b744e4f9.r9e00e022-a139-11eb-b835-09bb272d11b0
Wed Jul 21 05:27:19 -0400 2021
ARC-Authentication-Results: i=2; topicbox.com; arc=pass; dkim=pass (2048-bit rsa
key
 sha256) header.d=gmail.com header.i=@gmail.com header.b=kAG79hEZ
 header.a=rsa-sha256 header.s=20161025 x-bits=2048; dmarc=pass
 policy.published-domain-policy=none
 policy.published-subdomain-policy=quarantine policy.applied-disposition=none
 policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none)
 policy.policy-from=p header.from=gmail.com; spf=pass
 smtp.mailfrom=robpike@gmail.com smtp.helo=mail-pg1-f178.google.com;
 x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (body
 has been altered)) (Message modified while forwarding at Topicbox)
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=
	topicbox.com; h=mime-version:references:in-reply-to:from:date
	:message-id:subject:to:content-type:list-help:list-id:list-post
	:list-subscribe:reply-to:content-transfer-encoding
	:list-unsubscribe; s=sysmsg-1; t=1626859632; bh=kDgYA6OXwvyKv7BP
	tP+Fy7VsH4LodcCcXK7F9IjtH1w=; b=bFLQD4QUH29qqQcVTay054Bqec0kAwZT
	BQtj8jP6EEnpjrMaEkMgp2Bi3QhIemzRJdCwWIAIogQXadRmwAvsdfxmrZvSPBUI
	bEREx4/lTwTTWWtjP8QSYcxjdzj5CoBLVWAgWROTN2kZRTdCnWDci65MNJ+BMfJR
	/Lc9808pXkw=
ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t=
	1626859632; b=TPLLDpYz0b4G/WEqK2pA+flxasrCKBcW5A6VVbrG54VPmPX7I7
	xxCM+jqelcyuOjt80vrJRl5o0yxrgNcksrX2qp905Ujd3F+ttvCjMbbgEqVvU/vr
	cP+1hx6yatKyB0a/tRw9aeG02Zron792Gl67lowbTITQ8DL861sqqbfFQ=
Authentication-Results: topicbox.com; arc=pass; dkim=pass (2048-bit rsa key
 sha256) header.d=gmail.com header.i=@gmail.com header.b=kAG79hEZ
 header.a=rsa-sha256 header.s=20161025 x-bits=2048; dmarc=pass
 policy.published-domain-policy=none
 policy.published-subdomain-policy=quarantine policy.applied-disposition=none
 policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none)
 policy.policy-from=p header.from=gmail.com; spf=pass
 smtp.mailfrom=robpike@gmail.com smtp.helo=mail-pg1-f178.google.com;
 x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (body
 has been altered)) (Message modified while forwarding at Topicbox)
ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t=
    1626859507; b=IGAoC/7z737X/s5Q41hv9z1K33RmK9eIxbpwI3UcPzCm07VBun
    7mkSS4CfMnKgoTKTCryrjXRGaZmK+kBrSf+R+rSH2QfbR+l/wFHG3Cmh+hbHIU0f
    p163SfhbYIiLyC+mU3PRYTb2zb8ZlMxQahUdvVGfQgSK2LPTZSHmyuoCjykJhhpE
    Cs1RcKreXfHsF3Qd900b5oyzK5AerPNma3iBbFLz3SUIMYhVkEVyxKmrlaatx0YD
    i3Q3daAThXExBH9/uFQbygJ1qVsQMUUYgC4pznbRhF0XYOwXETq/ZoQTV5Nkidyn
    dfBzj6iDH0l5dj16KuCFJCuyuXzHk0KlV2Xw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=
    topicbox.com; h=mime-version:references:in-reply-to:from:date
    :message-id:subject:to:content-type; s=arcseal; t=1626859507;
    bh=SiIL7pn7m+bAl9dRUyVPw9VSpuBZEvBle4JAYT3sy94=; b=USjwrvfgt0j7
    Q1S9Lz5YKoDx5REaHUmG/8jf9NBGdk6XC9JgQ1uImvQW59LTsUbTGH+JO9qolkwU
    kdsTcxE7KftQWzGpchzGRBL+E8V1lkAkNG4ZwYH7shQBNITthh8tJ2VAOgox4ZlA
    Wnvn6P/stGF912n44IpnGHWql987AGgegdnjraSFOJkafV1aHJVznd9HXPblt3iF
    4EIsT977nvVBcDifOgkEHd//WhH2NIjdjoXcI/HvuYp2tEQa5BCakY7WzpDYV8uT
    h4YMHSOLFPj4GZTpDNuMFERSk5f7rJbSy3lP7zcJ+FOkaQ0tMBkvZbpphvaTiNBx
    FJ3e31mKnw==
ARC-Authentication-Results: i=1; tb-mx1.topicbox.com;
    arc=none (no signatures found);
    bimi=skipped (DMARC Policy is not at enforcement);
    dkim=pass (2048-bit rsa key sha256) header.d=gmail.com
    header.i=@gmail.com header.b=kAG79hEZ header.a=rsa-sha256
    header.s=20161025 x-bits=2048;
    dmarc=pass policy.published-domain-policy=none
    policy.published-subdomain-policy=quarantine
    policy.applied-disposition=none policy.evaluated-disposition=none
    (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p
    header.from=gmail.com;
    iprev=pass smtp.remote-ip=209.85.215.178 (mail-pg1-f178.google.com);
    spf=pass smtp.mailfrom=robpike@gmail.com
    smtp.helo=mail-pg1-f178.google.com;
    x-aligned-from=pass (Address match);
    x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net
    header.i=@1e100.net header.b=nHqNJs4Y;
    x-me-sender=none;
    x-ptr=pass smtp.helo=mail-pg1-f178.google.com
    policy.ptr=mail-pg1-f178.google.com;
    x-return-mx=pass header.domain=gmail.com policy.is_org=yes
    (MX Records found:
    alt1.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com);
    x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes
    (MX Records found:
    alt1.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com);
    x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384
    smtp.bits=256/256;
    x-vs=clean score=0 state=0
Received-SPF: pass
    (gmail.com ...  _spf.google.com: Sender is authorized to use
    'robpike@gmail.com' in 'mfrom' identity (mechanism
    'include:_netblocks.google.com' matched))
    receiver=tb-mx1.topicbox.com;
    identity=mailfrom;
    envelope-from="robpike@gmail.com";
    helo=mail-pg1-f178.google.com;
    client-ip=209.85.215.178
From: Rob Pike <robpike@gmail.com>
Date: Wed, 21 Jul 2021 19:24:55 +1000
Subject: Re: [9fans] Help with a sam cleanup script
To: 9fans <9fans@9fans.net>
Topicbox-Policy-Reasoning: allow: sender is a member
Topicbox-Message-UUID: 8d7e8e56-ea05-11eb-91cc-f7a26a9b87b9
Archived-At:
<https://9fans.topicbox.com/groups/9fans/T10b1d559ae7d981e-Mcecc24b77fbe2df7b744e4f9>
Reply-To: 9fans <9fans@9fans.net>
Topicbox-Delivery-ID:
 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:9e00e022-a139-11eb-b835-09bb272d11b0:Mcecc24b77fbe2df7b744e4f9:1:X19j8_ngxvW5ycMEPMaw0sQdOTsN-O8Iqb64bqYI6qA

There are many things here that feel wrong or at least inelegant, starting
with the first character.  Surely you mean a comma not a period.  You are
also inconsistent: sometimes you use x to find the pattern and then change
it, sometimes you use a substitute.  It's more efficient in both time and
keystrokes to use c or d when you can:

,x/‘‘|’’/c/"/

,x/\*/d


for example.

But overall: If you show us either the ed script you use, or a precise
definition of the problem, people could offer solutions.  I assure you sam
can do this; it's far more powerful than ed.

But then: Why not use ed if you have a working script?  Or are you just
trying to understand sam better?  The docs for sam are complete.  Lose your
line orientation and think of the file as a single string.  That's how sam
works.

-rob




On Wed, Jul 21, 2021 at 7:18 PM <revcomninos@gmail.com> wrote:

> In ed I have a cleanup script which I can apply to several files at once.
> The script removes things like blank lines and spaces between words.  To run
> it on a file or multiple files, I type this command:
> ed [name of file(s)] < cleanup-script
> I converted all the regular expressions in the file into sam regex format
> and tried the same, but to no avail.  Here is a list of some of the
> commands:
>
> .x s/\*//g
> ,x/^ +/s///
> ,x/ +$/s///
> ,x/ +/s// /
> ,x/^$\n/d
> ,x/‘‘|’’/s//"/
> ,x/“|”/s//"/
> ,x/‘|’/s//"/
> ,x/^ +/s///
> ,x/ +$/s///
> ,x/ +/s// /
> ,x/^$\n/d
> ,x/‘‘|’’/s//"/
> ,x/“|”/s//"/
> ,x/‘|’/s//"/
> ,x/teh/c/the/
> wq
>
> I am not even sure sam can do this, but if it can, I would appreciate
> some guidance on how to do it.
>
>
> *9fans <https://9fans.topicbox.com/latest>* / 9fans / see discussions
> <https://9fans.topicbox.com/groups/9fans> + participants
> <https://9fans.topicbox.com/groups/9fans/members> + delivery options
> <https://9fans.topicbox.com/groups/9fans/subscription> Permalink
>
<https://9fans.topicbox.com/groups/9fans/T10b1d559ae7d981e-M81420cb8a514930c24cd6ad6>
>

------------------------------------------
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/T10b1d559ae7d981e-Mcecc24b77fbe2df7b744e4f9
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription




Wed Jul 21 18:52:18 EDT 2021
/* bits in Dir.mode */
#define DMDIR 0x80 00 00 00 /* mode bit for directories */
#define DMAPPEND 0x40000000 /* mode bit for append only files */
#define DMEXCL 0x20000000 /* mode bit for exclusive use files */
#define DMMOUNT 0x10000000 /* mode bit for mounted channel */
#define DMAUTH 0x08000000 /* mode bit for authentication file */
#define DMREAD 0x4 /* mode bit for read permission */
#define DMWRITE 0x2 /* mode bit for write permission */
#define DMEXEC 0x1 /* mode bit for execute permission */


Wed Jul 21 18:50:22 EDT 2021
# this is the disk structure:
# char name[NAMELEN];
# short uid;
# short gid; [2*2]
# ushort mode;
# #define DALLOC 0x8000
# #define DDIR 0x4000
# #define DAPND 0x2000
# #define DLOCK 0x1000
# #define DREAD 0x4
# #define DWRITE 0x2
# #define DEXEC 0x1
# [ushort muid] [2*2]
# Qid.path; [4]
# Qid.version; [4]
# long size; [4]
# long dblock[NDBLOCK];
# long iblock;
# long diblock;
# long atime;
# long mtime;


prev | next