OK, turing.

<- leave blank

Sat Nov 17 01:45:53 EST 2018

diff -r 2662504d75ff helper.go
--- a/helper.go Tue Apr 10 18:21:19 2018 -0500
+++ b/helper.go Fri Nov 16 23:45:51 2018 -0700
@@ -87,11 +87,14 @@
 //MessagePrint prints one correctly formatted Message to stdout
 func MessagePrint(Time, Username, Content string) {
	//var Color color.Attribute
- TimeStamp, _ := time.Parse(time.RFC3339, Time)
- LocalTime := TimeStamp.Local().Format("2006/01/02 15:04:05")
-
	log.SetFlags(0)
- log.Printf("%s > %s > %s\n", LocalTime, Username, Content)
+ if *timeStamp {
+ TimeStamp, _ := time.Parse(time.RFC3339, Time)
+ LocalTime := TimeStamp.Local().Format("2006/01/02 15:04:05")
+ log.Printf("%s > %s > %s\n", LocalTime, Username, Content)
+ } else {
+ log.Printf("%s > %s\n", Username, Content)
+ }
	log.SetFlags(log.LstdFlags)
 }

diff -r 2662504d75ff main.go
--- a/main.go Tue Apr 10 18:21:19 2018 -0500
+++ b/main.go Fri Nov 16 23:45:51 2018 -0700
@@ -3,6 +3,7 @@
 package main

 import (
+ "flag"
	"log"
	"regexp"
	"bitbucket.org/henesy/disco/DiscordState"
@@ -33,7 +34,15 @@
 //MsgType is a string containing global message type
 type MsgType string

+var timeStamp = flag.Bool("t", False, "Hide timestamps in channel log")
+
 func main() {
+
+ flag.Parse()
+ if flag.Lookup("h") != nil {
+ flag.Usage()
+ os.Exit(1)
+ }
	//Initialize Config
	GetConfig()
	CheckState()


Fri Nov 16 22:31:11 EST 2018
#!/bin/rc

rfork e
path=(/bin/)

sym = 'threadmain?z
	main?z'

fn dbsrc{
	echo $sym | db $1 | sed '1d;/symbol not found/d;s/.*\(\) //'
}

fn go{
	type=`{file <$1 | sed 's/stdin: //'}
	switch($type){
	case 'rc executable file'
		plumbit $1 '(rc executable)'
	case *executable* *'plan 9 boot image'*
		plumbit `{dbsrc $1} '(executable)'
	case *
		echo 'src: can''t find source for '$1 - unrecognized type $type
		>[1=2]
	}
}

fn plumbit{B $1}

fn usage{
	echo usage: 'src [-n] [-s symbol] executable ...'>[1=2]
	exit usage
}

while(~ $1 -*)
	switch($1){
	case -n
		shift
		fn plumbit {echo $1}
	case -s
		shift
		# add main in case symbol is undefined
		sym=$1'?z
			main?z'
		shift
	case -*
		usage
	}

if(~ $#* 0) usage

for(i){
	if(test -f $i) go $i
	if not if(test -f /bin/$i) go /bin/$i
	if not if(test -f /bin/*/$i) go /bin/*/$i
	if not if(test -f /bin/*/*/$i) go /bin/*/*/$i
	if not echo 'src: can''t find '$i
}


Fri Nov 16 20:49:57 EST 2018
How to Fix: Google Search Engine Not Working in Chrome

Fri Nov 16 11:52:58 EST 2018
#!/bin/rc
echo 'key proto=wpapsk essid=Glats !password=1234567890' >>
/mnt/factotum/ctl;
aux/wpa -s Glats -p /net/ether0;
ip/ipconfig;

Fri Nov 16 11:50:38 EST 2018


Fri Nov 16 00:31:22 EST 2018
1 ./server
1 ./channels/ubqt
1 ./channels
2 .


Thu Nov 15 21:40:18 EST 2018
From: Doug McIlroy <doug@cs.dartmouth.edu>
Date: Thu, 15 Nov 2018 19:03:48 -0500
To: tuhs@tuhs.org
Subject: [TUHS] man-page style
Errors-To: tuhs-bounces@minnie.tuhs.org
Sender: "TUHS" <tuhs-bounces@minnie.tuhs.org>

Regardless of standards considerations, if there's any advice
that needs to be hammered into man authors, it's to be concise
and accurate, but not pedantic.  As Will Strunk commanded,
"Omit needless words."

The most needless words of all are promotional.  No man page
should utter words like "powerful", "extraordinarily versatile",
"user-friendly", or "has a wide range of options".

As another instance of the rule, it would be better to recommend
short subtitles than to help make them long by recommending
quotes.  If anything is said about limited-length macros, it
would best be under BUGS.

As editor for v7-v10, I would not offer v7 as a canonical
model.  It owed its use of boldface in SYNOPIS to the limited
number of fonts (Typically R,F,I,S) that could be on our
typesetter at the same time.  For v9 we were able to follow
Kernighan and adopt a distinct literals font (L, which happened
to be Courier but could have been identified with bold had we
wished).  I still think this is the best choice.

As for options, v7 is a very poor model.  It has many pages
that describe options in line, just as v1 had done for its
few options (called flags pre-v7).  By v10 all options were
displayed in a list format.

For nagging reasons of verbal continuity, the options displays
were prefaced by *needless words* like, "The following options
are recognized".  A simple OPTIONS heading would be better.

Unfortunately, an OPTIONS heading would intrude between the
basic description and less important details that follow
the options.  (I don't agree that it would come too closely
after DESCRIPTION; a majority of man pages already have even
shorter sections.) OPTIONS could be moved to the end of
DESCRIPTION.  However, options may well be the biggest reason
for quick peeks at man pages; they should be easy to spot.  It
has reasonably been suggested that OPTIONS should be a .SS
subsection.  That might be followed by .SS DETAILS.

Doug



Thu Nov 15 05:37:47 EST 2018
import Data.Vect

%default total

-- 0 indexed sieve
Sieve : Nat -> Type
Sieve n = Vect n Bool

take : (n : Nat) -> Stream t -> Vect n t
take Z _ = Nil
take (S n) (x::xs) = x::take n xs

plusAndMinusCancel : (n : Nat) -> (S n `minus` (S Z)) = n
plusAndMinusCancel Z = Refl
plusAndMinusCancel (S n) = Refl

minusZeroRightNeutral : (n : Nat) -> n `minus` 0 = n
minusZeroRightNeutral Z = Refl
minusZeroRightNeutral (S n) = Refl

sieve0 : (n : Nat) -> {auto prf : 2 `LTE` n} -> Sieve n
sieve0 k =
	rewrite plusAndMinusCancel k in
		False :: False :: (take (k `minus` 2) $ repeat True)

mark_multiples : Nat -> Sieve n -> Sieve n
mark_multiples k s = go Z s where
	go : Nat -> Sieve n -> Sieve n
	go _ Nil = Nil
	go (S m) (x::xs) = x :: go m xs
	go Z (_::xs) = False :: go k xs


Wed Nov 14 17:59:22 EST 2018
#include <stdio.h>
char s[] =
{105,110,116,32,109,97,105,110,40,41,123,10,9,105,110,116,32,105,59,10,9,112,114,105,110,116,102,40,34,35,105,110,99,108,117,100,101,32,60,115,116,100,105,111,46,104,62,92,110,99,104,97,114,32,115,91,93,32,61,32,123,34,41,59,10,9,102,111,114,32,40,105,32,61,32,48,59,32,115,91,105,93,59,32,105,43,43,41,10,9,9,112,114,105,110,116,102,40,34,37,100,44,34,44,32,115,91,105,93,41,59,10,9,112,114,105,110,116,102,40,34,48,125,59,92,110,37,115,34,44,32,115,41,59,10,125,10,0};
int main(){
	int i;
	printf("#include <stdio.h>\nchar s[] = {");
	for (i = 0; s[i]; i++)
		printf("%d,", s[i]);
	printf("0};\n%s", s);
}


Wed Nov 14 15:20:50 EST 2018
devwren.c:12:7: warning: declaration does not declare anything
  QLock;
       ^
devwren.c:91:8: warning: passing argument 1 of ‘qlock’ from incompatible pointer
type [-Wincompatible-pointer-types]
  qlock(w);
	^
/home/seh/src/plan9port/include/libc.h:492:19: note: expected ‘QLock *’ {aka
‘struct QLock *’} but argument is of type ‘Wren *’ {aka ‘struct Wren *’}
 extern void qlock(QLock*);
		   ^~~~~~
devwren.c:96:10: warning: passing argument 1 of ‘qunlock’ from incompatible
pointer type [-Wincompatible-pointer-types]
  qunlock(w);
	  ^
/home/seh/src/plan9port/include/libc.h:493:21: note: expected ‘QLock *’ {aka
‘struct QLock *’} but argument is of type ‘Wren *’ {aka ‘struct Wren *’}
 extern void qunlock(QLock*);
		     ^~~~~~
devwren.c:157:8: warning: passing argument 1 of ‘qlock’ from incompatible pointer
type [-Wincompatible-pointer-types]
  qlock(w);
	^
/home/seh/src/plan9port/include/libc.h:492:19: note: expected ‘QLock *’ {aka
‘struct QLock *’} but argument is of type ‘Wren *’ {aka ‘struct Wren *’}
 extern void qlock(QLock*);
		   ^~~~~~
devwren.c:159:10: warning: passing argument 1 of ‘qunlock’ from incompatible
pointer type [-Wincompatible-pointer-types]
  qunlock(w);
	  ^
/home/seh/src/plan9port/include/libc.h:493:21: note: expected ‘QLock *’ {aka
‘struct QLock *’} but argument is of type ‘Wren *’ {aka ‘struct Wren *’}
 extern void qunlock(QLock*);
		     ^~~~~~
devwren.c:173:8: warning: passing argument 1 of ‘qlock’ from incompatible pointer
type [-Wincompatible-pointer-types]
  qlock(w);
	^
/home/seh/src/plan9port/include/libc.h:492:19: note: expected ‘QLock *’ {aka
‘struct QLock *’} but argument is of type ‘Wren *’ {aka ‘struct Wren *’}
 extern void qlock(QLock*);
		   ^~~~~~
devwren.c:175:10: warning: passing argument 1 of ‘qunlock’ from incompatible
pointer type [-Wincompatible-pointer-types]
  qunlock(w);
	  ^
/home/seh/src/plan9port/include/libc.h:493:21: note: expected ‘QLock *’ {aka
‘struct QLock *’} but argument is of type ‘Wren *’ {aka ‘struct Wren *’}
 extern void qunlock(QLock*);
		     ^~~~~~


Wed Nov 14 11:40:52 EST 2018
seh@FatboySlim:~$ 9 rc
% disk/kfs -h
usage: kfs [-cCr] [-b bufsize] [-s infd outfd] [-f fsfile]
% disk/kfs -r -f ./kfstest.img
kfs: reaming the file system using 1024 byte blocks



next