Re: [9fans] Acme, Edit, code and newline

2014-04-01 Thread Mark van Atten
On Mon, Mar 31, 2014 at 5:54 PM, Daniel Peyrolon  wrote:
>> Edit , x/^[^ ]+[ ]*[^(]*\([^)]*\)[ ]*\{[ ]*\n/ s/[ ]*\{[ ]*\n/\n\{/g
>
> So, it was simply a matter of changing "$" for "\n" at the x command!

Yes. (In the version I gave, the replacement of the second $, the one
in the s command, by \n was superfluous.)

> How come my command didn't work?
> It really should work with the "$", shouldn't it?

In the original version, the x command matches up to the end of the
line, but the resulting selection is no longer itself a line; so the
subsequent s command, trying to match various things and then the
empty string at the end of a line ($), does not succeed.

But replacing, in the x command, the $ by \n leaves the result of a
match (now one character longer because it includes the \n) a line, in
which the s command then successfully matches $.

As ever,
Mark.



Re: [9fans] Acme, Edit, code and newline

2014-04-01 Thread Daniel Peyrolon
Hi there everyone,

Many thanks for the explanation, it's much clearer now.


2014-04-01 9:24 GMT+02:00 Mark van Atten :

> On Mon, Mar 31, 2014 at 5:54 PM, Daniel Peyrolon 
> wrote:
> >> Edit , x/^[^ ]+[ ]*[^(]*\([^)]*\)[ ]*\{[ ]*\n/ s/[ ]*\{[ ]*\n/\n\{/g
> >
> > So, it was simply a matter of changing "$" for "\n" at the x command!
>
> Yes. (In the version I gave, the replacement of the second $, the one
> in the s command, by \n was superfluous.)
>
> > How come my command didn't work?
> > It really should work with the "$", shouldn't it?
>
> In the original version, the x command matches up to the end of the
> line, but the resulting selection is no longer itself a line; so the
> subsequent s command, trying to match various things and then the
> empty string at the end of a line ($), does not succeed.
>
> But replacing, in the x command, the $ by \n leaves the result of a
> match (now one character longer because it includes the \n) a line, in
> which the s command then successfully matches $.
>
> As ever,
> Mark.
>
>


-- 
Daniel


[9fans] oseekb dd option

2014-04-01 Thread Adriano Verardo

Testing an rc script under Bell and Atom I noted that Atom dd doesn't
implement the "oseekb" option.

bs=1 allows to seek at any given byte offset but, what is the impact on
speedness ?

And, in any case,  isn't it a (IMHO small) portability problem ?

adriano





Re: [9fans] Python/Mercurial error

2014-04-01 Thread erik quanstrom
> Ok, I'll try it.
> I have somewhat complicated feeling on linux's PAE kernal.
> Isn't ther anything wrong to run pae kernel, somthing
> like some application don't run on it etc.

everything should run fine.

- erik



Re: [9fans] oseekb dd option

2014-04-01 Thread erik quanstrom
On Tue Apr  1 04:47:27 EDT 2014, adriano.vera...@mail.com wrote:
> Testing an rc script under Bell and Atom I noted that Atom dd doesn't
> implement the "oseekb" option.
> 
> bs=1 allows to seek at any given byte offset but, what is the impact on
> speedness ?
> 
> And, in any case,  isn't it a (IMHO small) portability problem ?

let me think about this.  i think i have a plan 9 solution, but it will
take a day or two to code up.

- erik



[9fans] audiohda

2014-04-01 Thread erik quanstrom
i was wondering if anyone had any ideas on this.
the hda manual isn't that easy to read.  :-)

i have a mac pro with an audiohda chipset that works,
but the gain is 0.  this is because aout has no out amp
(0x11 & 4)==0.

i'm not sure if the issue is that we need to
walk the widget chain until we find an out amp, or if
we need to connect a different chain of widgets, or
if this is simply an error, and we can set it anyway.

ideas?

(oh, the atom usb stick can be installed on a mac pro.
just dd the image to a hard drive, and proceed as normal.
make sure not to overwrite the install image while installing.
there's no safety check for that.  word of caution: the onboard
nic is not working yet.)

- erik

; cat /dev/audiostat
bufsize   1024 buffered  0
codec  0 pin  21
pin  20 out nothing ext N/A lineout ?
pin  21 out jack ext rear lineout green
pin  22 out nothing ext N/A lineout ?
pin  23 out nothing ext N/A lineout ?
pin  24 out jack ext front hpout green
pin  25 out jack ext rear linein blue
pin  26 out fix int N/A speaker ?
pin  27 out nothing ext N/A lineout ?
pin  28 in nothing ext N/A lineout ?
pin  29 in nothing ext N/A lineout ?
pin  30 out jack ext rear spdifout white
pin  31 in jack ext rear spdifin white
path   2 aout 11 0 0 →  12 amix 20010f 0 0 →  21 pin 40018f 1014150 373c



[9fans] mac pro install

2014-04-01 Thread erik quanstrom
wrt this
> On Apr 1, 2014, at 8:15 AM, erik quanstrom  wrote:
> 
> oh, the atom usb stick can be installed on a mac pro.
> just dd the image to a hard drive, and proceed as normal.
> make sure not to overwrite the install image while installing.
> there's no safety check for that.  word of caution: the onboard
> nic is not working yet.)

i've been reminded that after dd'ing the usb image to the hard
drive, you'll have to edit plan9.ini to reference the correct drive.
i.e. not the hardcoded sdu0.  boo!

- erik



Re: [9fans] Cannot boot plan9

2014-04-01 Thread erik quanstrom
> I've attached image of the result of the command. I hope that soon I will be 
> able to 
> attach it in plain text format :). I'm afraid that my Ethernet card is not 
> recognised too.
> Can you recommend any PCI Ethernet card that is known to be working under 
> Plan 9?

anything intel gigabit+pcie.  most 8169 (realtek gigabit).

- erik



[9fans] Partitioning the disk

2014-04-01 Thread Szymon Olewniczak
Hi,
As I cannot force plan 9 to use my sata disk, I've decided to buy a sata to usb 
convertor.
After compiling the usb tools on 9atom, I can find my disk under /dev/sdU1.0 
and now is the time to 
prepare the disk partitions in order to install plan 9. Disk which I want to 
use isn't empty
(it contains some of ext4s and swap) but I want to format the entire disk. In 
9atom doc's pages
I've found some example how to initialize the blank disk:

Initialize the blank disk /dev/sdC0/data.
disk/mbr –m /386/mbr /dev/sdC0/data
disk/fdisk –baw /dev/sdC0/data
disk/prep –bw –a^(9fat nvram fossil cache swap) /dev/sdC0/plan9
disk/format –b /386/pbslba –d –r 2 /dev/sdC0/9fat \
/386/9load /386/9pcf /tmp/plan9.ini

And my question is: is it enough to create partitons for plan 9 installation? 
What sizes would have
9fat, nvram, fossil, cache and swap partitons? What should I do next after 
partitoning disk in order
to install plan 9 on it?

BTW. If there is any method to compile all the 9atom sources at once(simpler 
that writting rc script)?

BR,
Szymon




Re: [9fans] Python/Mercurial error

2014-04-01 Thread kokamoto
I built pcpae kernel and recompiled go distribution,
and probably success.
Attached is the go compilation result, and the last line
shows the used go version.

Someone can explain the meaning of the last error?

Kenji
# Building C bootstrap tool.
cmd/dist

# Building compilers and Go bootstrap tool for host, plan9/386.
lib9
libbio
warning: 
/usr/sys/src/go/src/libbio/bputrune.c:39[/usr/sys/src/go/src/libbio/bputrune.c:1449]
 result of operation not used
libmach
warning: 
/usr/sys/src/go/src/libmach/8db.c:207[/usr/sys/src/go/src/libmach/8db.c:2157] 
unreachable code FUNC
warning: 
/usr/sys/src/go/src/libmach/sym.c:374[/usr/sys/src/go/src/libmach/sym.c:2197] 
useless or misleading comparison: UINT < 0
liblink
misc/pprof
cmd/objdump
cmd/prof
cmd/cc
warning: 
/usr/sys/src/go/src/cmd/cc/y.tab.c:1785[/usr/sys/src/go/src/cmd/cc/y.tab.c:4592]
 result of operation not used
warning: 
/usr/sys/src/go/src/cmd/cc/y.tab.c:1785[/usr/sys/src/go/src/cmd/cc/y.tab.c:4592]
 result of operation not used
warning: 
/usr/sys/src/go/src/cmd/cc/y.tab.c:1791[/usr/sys/src/go/src/cmd/cc/y.tab.c:4598]
 result of operation not used
warning: 
/usr/sys/src/go/src/cmd/cc/y.tab.c:1791[/usr/sys/src/go/src/cmd/cc/y.tab.c:4598]
 result of operation not used
warning: 
/usr/sys/src/go/src/cmd/cc/y.tab.c:1788[/usr/sys/src/go/src/cmd/cc/y.tab.c:4595]
 set and not used: yymsg
warning: 
/usr/sys/src/go/src/cmd/cc/y.tab.c:1868[/usr/sys/src/go/src/cmd/cc/y.tab.c:4670]
 set and not used: yytoken
warning: 
/usr/sys/src/go/src/cmd/cc/y.tab.c:1952[/usr/sys/src/go/src/cmd/cc/y.tab.c:4750]
 set and not used: yyptr
cmd/gc
warning: 
/usr/sys/src/go/src/cmd/gc/y.tab.c:2049[/usr/sys/src/go/src/cmd/gc/y.tab.c:5496]
 useless or misleading comparison: ULONG <= 0x
warning: 
/usr/sys/src/go/src/cmd/gc/y.tab.c:2072[/usr/sys/src/go/src/cmd/gc/y.tab.c:5517]
 useless or misleading comparison: ULONG <= 0x
warning: 
/usr/sys/src/go/src/cmd/gc/y.tab.c:2080[/usr/sys/src/go/src/cmd/gc/y.tab.c:5525]
 useless or misleading comparison: ULONG <= 0x
warning: 
/usr/sys/src/go/src/cmd/gc/y.tab.c:2124[/usr/sys/src/go/src/cmd/gc/y.tab.c:5567]
 result of operation not used
warning: 
/usr/sys/src/go/src/cmd/gc/y.tab.c:2124[/usr/sys/src/go/src/cmd/gc/y.tab.c:5567]
 result of operation not used
warning: 
/usr/sys/src/go/src/cmd/gc/y.tab.c:2127[/usr/sys/src/go/src/cmd/gc/y.tab.c:5570]
 set and not used: yymsg
warning: 
/usr/sys/src/go/src/cmd/gc/y.tab.c:2234[/usr/sys/src/go/src/cmd/gc/y.tab.c:5672]
 set and not used: yytoken
warning: 
/usr/sys/src/go/src/cmd/gc/y.tab.c:2309[/usr/sys/src/go/src/cmd/gc/y.tab.c:5741]
 set and not used: yyptr
cmd/8l
cmd/8a
warning: 
/usr/sys/src/go/src/cmd/8a/y.tab.c:1376[/usr/sys/src/go/src/cmd/8a/y.tab.c:4281]
 result of operation not used
warning: 
/usr/sys/src/go/src/cmd/8a/y.tab.c:1376[/usr/sys/src/go/src/cmd/8a/y.tab.c:4281]
 result of operation not used
warning: 
/usr/sys/src/go/src/cmd/8a/y.tab.c:1379[/usr/sys/src/go/src/cmd/8a/y.tab.c:4284]
 set and not used: yymsg
warning: 
/usr/sys/src/go/src/cmd/8a/y.tab.c:1567[/usr/sys/src/go/src/cmd/8a/y.tab.c:4460]
 set and not used: yyptr
cmd/8c
cmd/8g
pkg/runtime
pkg/errors
pkg/sync/atomic
pkg/sync
pkg/io
pkg/unicode
pkg/unicode/utf8
pkg/unicode/utf16
pkg/bytes
pkg/math
pkg/strings
pkg/strconv
pkg/bufio
pkg/sort
pkg/container/heap
pkg/encoding/base64
pkg/syscall
pkg/time
pkg/os
pkg/reflect
pkg/fmt
pkg/encoding
pkg/encoding/json
pkg/flag
pkg/path/filepath
pkg/path
pkg/io/ioutil
pkg/log
pkg/regexp/syntax
pkg/regexp
pkg/go/token
pkg/go/scanner
pkg/go/ast
pkg/go/parser
pkg/os/exec
pkg/os/signal
pkg/net/url
pkg/text/template/parse
pkg/text/template
pkg/go/doc
pkg/go/build
cmd/go

# Building packages and commands for plan9/386.
runtime
errors
sync/atomic
sync
io
unicode
unicode/utf8
bytes
bufio
math
strconv
reflect
encoding/binary
syscall
time
os
fmt
debug/dwarf
debug/elf
strings
debug/gosym
debug/macho
debug/pe
sort
flag
log
cmd/addr2line
hash
crypto
crypto/md5
go/token
path/filepath
go/scanner
go/ast
io/ioutil
go/parser
text/tabwriter
go/printer
os/exec
cmd/cgo
go/format
path
cmd/fix
container/heap
encoding
encoding/base64
unicode/utf16
encoding/json
encoding/xml
regexp/syntax
regexp
net/url
text/template/parse
text/template
go/doc
go/build
compress/flate
hash/crc32
compress/gzip
container/list
crypto/subtle
crypto/cipher
crypto/aes
crypto/des
math/rand
math/big
crypto/elliptic
crypto/ecdsa
crypto/hmac
crypto/rand
crypto/rc4
crypto/rsa
crypto/sha1
crypto/sha256
crypto/dsa
encoding/asn1
crypto/x509/pkix
encoding/hex
encoding/pem
net
crypto/x509
crypto/tls
mime
net/textproto
mime/multipart
net/http
os/signal
cmd/go
runtime/pprof
cmd/gofmt
debug/goobj
cmd/link
debug/plan9obj
cmd/nm
cmd/pack
cmd/yacc
archive/tar
archive/zip
compress/bzip2
compress/lzw
hash/adler32
compress/zlib
container/ring
crypto/sha512
database/sql/driver
database/sql
encoding/ascii85
encoding/base32
encoding/csv
encoding/gob
expvar
hash/crc64
hash/fnv
html
html/template
image/color
image
image/color/palette
image/draw
ima

Re: [9fans] Python/Mercurial error

2014-04-01 Thread David du Colombier
> Someone can explain the meaning of the last error?

> --- FAIL: TestResolveIPAddr (0.00 seconds)
>   ipraw_test.go:74: ResolveIPAddr(ip6:ipv6-icmp, ::1) failed: write 
> /net/cs: cs: no match
> FAIL
> FAIL  net 0.948s

The ResolveIPAddr test is failing because you don't have
the ::1 address configured on the loopback.

You can add it with:

ip/ipconfig loopback /dev/null ::1

Anyway, it doesn't really matter if you can't run all
the tests. Go is properly compiled and installed on
your machine and you're now able to use it.

How did you succeed to run go_bootstrap? Have you
just switched from the 9atom pc kernel to the pcpae
kernel?

-- 
David du Colombier



Re: [9fans] Python/Mercurial error

2014-04-01 Thread David du Colombier
Two days ago, I've fixed the script mklibc.rc to
generate the libc_plan9.h file properly on 9atom.

https://codereview.appspot.com/82660044/

Please give a try and review this change to
get it submitted before the Go 1.4 release.

-- 
David du Colombier



Re: [9fans] Python/Mercurial error

2014-04-01 Thread David du Colombier
> before the Go 1.4 release.

Sorry, I mean Go 1.3 of course.

-- 
David du Colombier



Re: [9fans] Python/Mercurial error

2014-04-01 Thread kokamoto
Thanks David.

> How did you succeed to run go_bootstrap? Have you
> just switched from the 9atom pc kernel to the pcpae
> kernel?

I just switched from 9atom pc to pcpae kernel.

When I run /usr/sys/src/go/src/all.rc, it fails
to make $GOROOT/include/plan9/libc_plan9.h.
Then, I removed the lines of empty enum, as
enum
{
}
.

After I made change to $GOROOT/src/make.rc to comment
out the line
../include/plan9/mklibc.rc > ../include/plan9/libc_plan9.h ,
I rerun all.rc.
Everything runs ok then.

Kenji