OK, turing.

<- leave blank

Sun Jan 19 10:42:01 EST 2020

#!/usr/bin/env python3

import os
import select

path = '/proc/pressure/memory'
some_or_full = 'some'
stall_amount_in_us = '500'
time_window_in_us = '1000000'

s = '{} {} {}\n'.format(some_or_full, stall_amount_in_us, time_window_in_us)

try:
    fd = os.open(path, os.O_RDWR | os.O_NONBLOCK, mode=0o777)
    os.write(fd, s.encode())
    epoll = select.epoll()
    epoll.register(fd, select.POLLPRI)
    print('waiting for events...')
    while True:
	events = epoll.poll(1)
	if len(events) != 0:
	    print('event triggered!')
except Exception as e:
    print(e)
finally:
    try:
	os.close(fd)
    except NameError:
	pass


Sun Jan 19 02:35:19 EST 2020
cpu% pwd
/usr/glenda/src
cpu% git/init testgit3
cpu% cd testgit3
cpu% ls
.git
cpu% git/push -u git+ssh://git@github.com/jamoson/testgit3.git
exec ssh git@github.com git-receive-pack /jamoson/testgit3.git
git/send: broken branch refs/heads/master
cpu% git/commit
no changes to commit
cpu% echo 'initial content' > firstfile.txt
cpu% git/add firstfile.txt
cpu% git/commit
cpu% git/push -u git+ssh://git@github.com/jamoson/testgit3.git
exec ssh git@github.com git-receive-pack /jamoson/testgit3.git
readpkt: 009b: 0000000000000000000000000000000000000000 capabilities^{}
readpkt: 0000
writepkt: 0076: 0000000000000000000000000000000000000000
c1f63a2507522de5ce3adfed5ac6899e8b152f17 refs/heads/master report-status
send 2692: suicide: sys: trap: fault read addr=0x0 pc=0x00006c65
cpu%

Sun Jan 19 01:01:04 EST 2020
===== ref discovery ====
** Server: GitHub Babel 2.0
** Content-Type: application/x-git-upload-pack-advertisement
** Transfer-Encoding: chunked
** Expires: Fri, 01 Jan 1980 00:00:00 GMT
** Pragma: no-cache
** Cache-Control: no-cache, max-age=0, must-revalidate
** Vary: Accept-Encoding
** X-GitHub-Request-Id: 9FDD:40EA:B0F8E:154F51:5E23F040
** X-Frame-Options: DENY
001e# service=git-upload-pack
0000010807c9924973e33141f6775856a8b85d03c13ba2aa HEADmulti_ack thin-pack side-band
side-band-64k ofs-delta shallow deepen-since deepen-not deepen-relative
no-progress include-tag multi_ack_detailed no-done symref=HEAD:refs/heads/master
agent=git/github-g6cf8a45ecdfb
003f07c9924973e33141f6775856a8b85d03c13ba2aa refs/heads/master
003ecf76e73b5d364e90aa17f5e02a87e4778dd6f7d7 refs/pull/3/head
0000
===== expect ack/nak ====
** Server: GitHub Babel 2.0
** Content-Type: application/x-git-upload-pack-result
** Transfer-Encoding: chunked
** Expires: Fri, 01 Jan 1980 00:00:00 GMT
** Pragma: no-cache
** Cache-Control: no-cache, max-age=0, must-revalidate
** Vary: Accept-Encoding
** X-GitHub-Request-Id: D94A:3868:AD283:14FC32:5E23F040
** X-Frame-Options: DENY



Sun Jan 19 00:59:49 EST 2020
#!/usr/bin/env python3
import requests

r =
requests.get("https://github.com/oridb/git9.git/info/refs?service=git-upload-pack",
	headers={
	    'Pragma': 'no-cache'
	})
print('===== ref discovery ====')
print('\n'.join(['** {}: {}'.format(h, v) for (h, v) in r.headers.items()]))
print(r.content.decode())


r = requests.post("https://github.com/oridb/git9.git/git-upload-pack",
    data=(
	    b'0032want 07c9924973e33141f6775856a8b85d03c13ba2aa\n' +
	    b'0000'
    ),
    headers={
	'Content-Type': 'application/x-git-upload-pack-request',
	'Accept': 'application/x-git-upload-pack-result'
    })
print('===== expect ack/nak ====')
print('\n'.join(['** {}: {}'.format(h, v) for (h, v) in r.headers.items()]))
print(r.content.decode())

Sun Jan 19 00:43:53 EST 2020
01 2189 120.23 3021
02 2175 119.47 3008
03 2162 118.7 2994
04 2149 117.93 2981
05 2135 117.16 2968
06 2122 116.4 2954
07 2109 115.63 2941
08 2096 114.86 2928
09 2082 114.1 2915
10 2069 113.33 2901
11 2056 112.56 2888
12 2042 111.79 2875
13 2029 111.03 2861
14 2016 110.26 2848
15 2003 109.49 2835
16 1989 108.73 2822
17 1976 107.96 2808
18 1963 107.19 2795
19 1949 106.42 2782
20 1936 105.66 2768
21 1923 104.89 2755
22 1909 104.12 2742
23 1896 103.36 2728
24 1883 102.59 2715
25 1870 101.82 2702
26 1856 101.05 2689
27 1843 100.29 2675
28 1830 99.52 2662
29 1816 98.75 2649
30 1803 97.99 2635
31 1790 97.22 2622
32 1777 96.45 2609
33 1763 95.68 2596
34 1750 94.92 2582
35 1737 94.15 2569
36 1723 93.38 2556
37 1710 92.62 2542
38 1697 91.85 2529
39 1683 91.08 2516
40 1670 90.32 2503
41 1657 89.55 2489
42 1644 88.78 2476
43 1630 88.01 2463
44 1617 87.25 2449
45 1604 86.48 2436
46 1590 85.71 2423
47 1577 84.95 2409
48 1564 84.18 2396
49 1551 83.41 2383
50 1537 82.64 2370
51 1524 81.88 2356
52 1511 81.11 2343

Sat Jan 18 19:43:12 EST 2020
Put all the blocks of the program into a list Q.
while Q is not empty {
Start a new (empty) trace, call it T.
Remove the head element b from Q.
while b is not markedMark b {
append b to the end of the current trace T.
Examine the successors of b (the blocks to which b branches);
if there is any unmarked successor
b <- c
}
End the current trace T.
}

Sat Jan 18 19:42:16 EST 2020
let rec successors block =
	match block with
	| [] -> raise CanonError
	| T.JUMP(_, s)::_ -> s
	| T.CJUMP(_, _, _, t, f)::_ -> [f;t]
	| _::t -> successors t

let traceSchedule (blocks, ldone) =
	let blocks = Array.of_list blocks in
	let marks = Array.make (Array.length blocks) false in
	let lbl = Hashtbl.create (Array.length blocks) in
	Array.iteri (fun i b -> match b with
		| T.LABEL((_, id))::_ -> Hashtbl.add lbl id i
		| _ -> ()) blocks;
	let rec outer_loop i =
		if i = Array.length blocks then
			[]
		else if marks.(i) then
			outer_loop (i+1)
		else let rec inner_loop j =
			marks.(j) <- true;
			let b = blocks.(j) in
			let succ = List.find_opt (fun i->match i with | Some j
			-> not marks.(j) | None -> false)
				(List.map (fun (_, id) -> Hashtbl.find_opt lbl
				id) (successors b)) in
			b::(match succ with
			| Some (Some k) -> inner_loop k
			| _ -> outer_loop (i+1))
		in inner_loop i
	in outer_loop 0


Sat Jan 18 11:17:00 EST 2020
ok turing?  more like ok boomer

Sat Jan 18 11:08:06 EST 2020
diff -r 287d82efe5f2 sys/src/9/boot/bootrc
--- a/sys/src/9/boot/bootrc Mon Jan 13 23:22:35 2020 +0000
+++ b/sys/src/9/boot/bootrc Sat Jan 18 17:00:51 2020 +0100
@@ -43,6 +43,21 @@
	$* || fatal $"*^': '^$status
 }

+fn wait_timeout {
+ @{
+ echo waiting $1 seconds for $*(2-)
+ seconds=$1
+ shift
+ while (test $seconds -gt 0) {
+ if ($*)
+ exit ''
+ seconds=`{echo $seconds | awk '{print($1-1)}'}
+ sleep 1
+ }
+ exit timeout
+ }
+}
+
 fn ask {
	echo -n $1
	echo -n $2
@@ -65,6 +80,11 @@
 mt=()

 fn main{
+ echo nobootprompt is $"nobootprompt
+ waitfor=(300 test -d /dev/sdUc420e/)
+ if (!  ~ $#waitfor 0) {
+ wait_timeout $waitfor || echo $status
+ }
	mp=()
	while(~ $#mp 0){
		if(~ $#nobootprompt 0){
@@ -185,7 +205,7 @@

 # add partitions and binds
 configlocal
-
+nobootprompt='local!/dev/sdUc420e/fs'
 while(){
	@{main}



Sat Jan 18 05:47:27 EST 2020
$ sudo psi2log
[sudo] пароль для user:
Starting psi2log
target: SYSTEM_WIDE
period: 2
------------------------------------------------------------------------------------------------------------------
 some cpu pressure || some memory pressure | full memory pressure || some io
 pressure | full io pressure
---------------------||----------------------|----------------------||----------------------|---------------------
 avg10 avg60 avg300 || avg10 avg60 avg300 | avg10 avg60 avg300 || avg10 avg60
 avg300 | avg10 avg60 avg300
------ ------ ------ || ------ ------ ------ | ------ ------ ------ || ------
------ ------ | ------ ------ ------
 13.36 9.21 4.81 || 57.72 44.67 18.68 | 11.69 6.60 2.41 || 4.02 2.56 1.95 | 0.00
 0.29 0.99
 12.75 9.24 4.85 || 59.58 45.43 19.02 | 11.38 6.72 2.46 || 3.66 2.54 1.95 | 0.00
 0.28 0.98
 11.35 9.10 4.85 || 60.56 46.07 19.33 | 9.86 6.59 2.46 || 3.17 2.49 1.95 | 0.00
 0.27 0.97
 10.38 9.00 4.86 || 61.36 46.69 19.65 | 8.62 6.47 2.47 || 2.60 2.41 1.93 | 0.00
 0.26 0.97
 11.21 9.19 4.93 || 57.85 46.54 19.80 | 11.04 6.98 2.60 || 2.85 2.46 1.95 | 0.00
 0.25 0.96
 10.63 9.15 4.95 || 57.52 46.85 20.05 | 9.94 6.92 2.62 || 2.51 2.41 1.94 | 0.00
 0.24 0.95
  9.79 9.05 4.96 || 59.23 47.50 20.37 | 8.69 6.79 2.62 || 2.96 2.50 1.96 | 0.00
  0.23 0.95
  9.28 8.98 4.97 || 60.28 48.08 20.67 | 7.65 6.66 2.62 || 4.24 2.74 2.02 | 0.00
  0.23 0.94
 10.14 9.14 5.03 || 57.51 47.98 20.84 | 8.62 6.87 2.69 || 4.19 2.78 2.03 | 0.00
 0.22 0.93
 13.37 9.76 5.19 || 55.06 47.85 21.00 | 11.41 7.43 2.84 || 3.61 2.72 2.02 | 0.00
 0.21 0.92
 12.94 9.80 5.23 || 57.59 48.54 21.33 | 11.15 7.52 2.89 || 2.96 2.64 2.01 | 0.00
 0.20 0.92
 11.68 9.68 5.23 || 59.11 49.11 21.63 | 9.85 7.40 2.90 || 2.42 2.55 2.00 | 0.00
 0.20 0.91
 10.83 9.59 5.25 || 60.54 49.69 21.94 | 8.97 7.32 2.91 || 1.98 2.46 1.98 | 0.00
 0.19 0.91
 10.14 9.50 5.26 || 60.98 50.13 22.22 | 8.43 7.28 2.93 || 1.62 2.38 1.97 | 0.00
 0.18 0.90
 10.66 9.62 5.31 || 49.93 48.49 22.07 | 6.91 7.04 2.91 || 2.05 2.44 1.98 | 0.00
 0.18 0.89
 11.62 9.83 5.39 || 45.42 47.72 22.09 | 6.20 6.91 2.91 || 2.77 2.55 2.01 | 0.00
 0.17 0.89
 11.15 9.80 5.41 || 48.96 48.29 22.39 | 5.98 6.84 2.93 || 2.63 2.53 2.01 | 0.00
 0.16 0.88
 10.94 9.81 5.44 || 52.05 48.87 22.68 | 5.80 6.78 2.94 || 2.15 2.45 2.00 | 0.00
 0.16 0.87
 10.59 9.78 5.47 || 54.58 49.43 22.98 | 5.84 6.76 2.96 || 2.66 2.53 2.02 | 0.00
 0.15 0.87
 10.30 9.75 5.49 || 56.64 49.97 23.27 | 5.68 6.70 2.98 || 2.18 2.45 2.00 | 0.00
 0.15 0.86
 11.15 9.93 5.56 || 58.16 50.46 23.56 | 5.56 6.64 2.99 || 2.15 2.44 2.00 | 0.00
 0.14 0.85
 10.76 9.90 5.58 || 48.89 49.04 23.45 | 4.73 6.46 2.98 || 3.39 2.65 2.05 | 0.00
 0.14 0.85
  9.89 9.77 5.58 || 40.03 47.43 23.29 | 3.87 6.25 2.96 || 2.77 2.56 2.04 | 0.00
  0.13 0.84
  9.19 9.64 5.59 || 42.56 47.65 23.50 | 4.80 6.34 3.00 || 2.99 2.61 2.05 | 0.00
  0.13 0.84
  8.97 9.59 5.60 || 46.81 48.25 23.79 | 4.84 6.29 3.01 || 3.00 2.62 2.06 | 0.00
  0.12 0.83
  8.43 9.47 5.61 || 50.46 48.86 24.08 | 4.87 6.25 3.03 || 2.81 2.60 2.06 | 0.00
  0.12 0.82
  8.53 9.46 5.63 || 53.10 49.39 24.36 | 4.89 6.21 3.04 || 3.93 2.81 2.10 | 0.00
  0.11 0.82
  8.98 9.51 5.67 || 55.25 49.90 24.64 | 5.09 6.20 3.06 || 3.40 2.75 2.10 | 0.00
  0.11 0.81
  8.98 9.49 5.69 || 55.93 50.20 24.87 | 5.43 6.23 3.09 || 3.69 2.83 2.12 | 0.00
  0.11 0.81
  8.99 9.47 5.71 || 55.04 50.22 25.05 | 5.17 6.15 3.09 || 3.20 2.77 2.11 | 0.00
  0.10 0.80
 10.44 9.72 5.79 || 45.43 48.65 24.90 | 4.24 5.95 3.07 || 2.98 2.74 2.11 | 0.00
 0.10 0.80
 10.72 9.79 5.83 || 45.17 48.49 25.03 | 4.19 5.89 3.08 || 3.35 2.81 2.13 | 0.00
 0.10 0.79
 10.77 9.83 5.87 || 48.76 49.03 25.30 | 4.34 5.86 3.09 || 3.65 2.89 2.15 | 0.00
 0.09 0.78
 10.81 9.87 5.90 || 51.70 49.56 25.57 | 4.46 5.83 3.11 || 3.35 2.86 2.14 | 0.00
 0.09 0.78
 10.84 9.91 5.94 || 54.11 50.06 25.84 | 4.74 5.84 3.13 || 2.74 2.76 2.13 | 0.00
 0.08 0.77
 10.69 9.91 5.97 || 56.26 50.58 26.12 | 4.78 5.81 3.14 || 2.60 2.74 2.13 | 0.00
 0.08 0.77
 10.75 9.95 6.00 || 57.66 51.02 26.38 | 5.00 5.81 3.16 || 2.49 2.71 2.13 | 0.00
 0.08 0.76
 12.24 10.24 6.09 || 53.74 50.53 26.44 | 4.82 5.76 3.16 || 5.85 3.31 2.26 | 0.00
 0.08 0.76
 12.38 10.33 6.14 || 56.32 51.10 26.73 | 5.58 5.86 3.20 || 7.14 3.63 2.33 | 0.00
 0.07 0.75
 11.58 10.26 6.15 || 57.89 51.56 26.99 | 5.29 5.80 3.21 || 8.38 3.97 2.41 | 0.00
 0.07 0.75
 12.02 10.38 6.20 || 57.55 51.70 27.19 | 7.41 6.17 3.30 || 9.58 4.33 2.50 | 0.00
 0.07 0.74
 12.74 10.56 6.27 || 55.82 51.58 27.33 | 8.06 6.33 3.36 || 10.02 4.58 2.56 | 0.00
 0.06 0.73
 12.06 10.51 6.29 || 57.48 52.02 27.59 | 7.32 6.25 3.36 || 11.28 4.99 2.66 | 0.00
 0.06 0.73
 11.69 10.50 6.32 || 58.84 52.45 27.84 | 6.90 6.21 3.37 || 11.77 5.28 2.74 | 0.00
 0.06 0.72
^C
Peak values: avg10 avg60 avg300
----------- ------ ------ ------
some cpu 13.37 10.56 6.32
----------- ------ ------ ------
some memory 61.36 52.45 27.84
full memory 11.69 7.52 3.37
----------- ------ ------ ------
some io 11.77 5.28 2.74
full io 0.00 0.29 0.99


Fri Jan 17 18:16:55 EST 2020
communism will win, regardless of what the ancaps think

prev | next