Re: [9fans] Current Plan 9 mirrors.

2021-03-29 Thread Shiro
> On Mar 29, 2021, at 4:43 PM, zemned3...@gmail.com wrote:
> 
> I am about 5 hours into being a Plan 9 user, on both the PI4 and QEmu.  I am 
> struggling to find the canonical p9fs servers to mount kernel source code, 
> update from a the central repo (is this broken with the  ownership change of 
> plan 9?) and also a way to load extras such as gitfs.  Any handy pointers 
> gratefully received.
> 9fans  / 9fans / see discussions 
>  + participants 
>  + delivery options 
> Permalink 
> 

The 9pfs servers (for /n/sources, etc.) were hosted by Bell Labs at:
sources.cs.bell-labs.com 

Nokia bought Bell labs a few years ago and no longer supports those servers.  
New servers have been set up at:
9p.io 

You can edit your ‘/bin/9fs’ script, change:

case sources
srv -nq tcp!sources.cs.bell-labs.com sources /n/sources
to:
case sources
srv -nq tcp!9p.io sources /n/sources


Then mount sources with:
9fs sources




--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Tf85189f4249fef26-M2a5ff46fb2fa94d311d2a5db
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


[9fans] Current Plan 9 mirrors.

2021-03-29 Thread zemned3000
I am about 5 hours into being a Plan 9 user, on both the PI4 and QEmu.  I am 
struggling to find the canonical p9fs servers to mount kernel source code, 
update from a the central repo (is this broken with the  ownership change of 
plan 9?) and also a way to load extras such as gitfs.  Any handy pointers 
gratefully received.
--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Tf85189f4249fef26-M69a250152ff6e434bff1365d
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Plan 9 in Summer of Code

2021-03-29 Thread dmtorilov
Greetings,

My name is Dmitry Torilov, and I came to you from the GSoC website.
I am delighted with Plan9, but I have never contributed to the project.
I am very interested in the topic of porting go to arm, and I would like to
work on it.
I have experience in go development, I watched Rob Pike's talk about assembler
in go and read the source code.
I will attach a link to my resume.
Can I ask you to tell more about the further screening process for GSoC?

https://gitlab.com/torilov/cv/-/blob/master/eng.pdf


Thanks,
Dmitry Torilov

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Ta35cde1382617430-M3f7ca493defd917b9515f3f4
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Can compile Plan9 C compiler for windows10?

2021-03-29 Thread John Floren
On Mon, Mar 29, 2021 at 10:47 AM Russ Cox  wrote:
>
> On March 29, 2021, arn...@skeeve.com wrote:
>
> OK - wasn't kenc ported to Linux for bootstrapping the early
> Go compilers? Is that version general, or not worth my trying to use?
>
>
> The early Go compilers, written in C, were compiled with gcc or clang.
>
> The Plan 9 C compiler was used for the Go runtime's initial
> C implementation, but in that context it was only dealing
> with the self-contained demands of Go itself, not arbitrary C code
> (no standard C library, much of which gawk would need).
>
> Even in that limited context, we spent a frustrating (non-zero)
> amount of time stumbling over bugs.
> Standard C has moved on, and the Plan 9 C compilers have not kept up.
> They're still fine for Plan 9 C code, but given the choice
> I wouldn't throw anything else at them.
>
> Best,
> Russ
> 9fans / 9fans / see discussions + participants + delivery options Permalink

Years back I spent some time getting the 9k kernel compiling with Go's
C compilers. It's been a long time so I don't remember everything I
had to do, but it wasn't a straight-across change and we ended up
deciding that since the Go compilers were being maintained
specifically to compile Go, it wouldn't be a good idea to hitch our
wagon to them lest they make some Go-focused changes which break our
stuff.

john

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T4d77cc95ab4ed70c-Ma6467d9eedaa83ac761e35da
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Can compile Plan9 C compiler for windows10?

2021-03-29 Thread arnold
Russ Cox  wrote:

> Standard C has moved on, and the Plan 9 C compilers have not kept up.
> They're still fine for Plan 9 C code, but given the choice
> I wouldn't throw anything else at them.

That's pretty definitive. Thanks.

Arnold

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T4d77cc95ab4ed70c-Md4a535788cff08faf580ac1c
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Can compile Plan9 C compiler for windows10?

2021-03-29 Thread Russ Cox
On March 29, 2021, arn...@skeeve.com wrote:
> OK - wasn't kenc ported to Linux for bootstrapping the early
> Go compilers? Is that version general, or not worth my trying to use?

The early Go compilers, written in C, were compiled with gcc or clang.

The Plan 9 C compiler was used for the Go runtime's initial
C implementation, but in that context it was only dealing
with the self-contained demands of Go itself, not arbitrary C code
(no standard C library,��much of which gawk would need).

Even in that limited context, we spent a frustrating (non-zero)
amount of time stumbling over bugs.
Standard C has moved on, and the Plan 9 C compilers have not kept up.
They're still fine for Plan 9 C code, but given the choice
I wouldn't throw anything else at them.

Best,
Russ

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T4d77cc95ab4ed70c-M38095e7b51661883f977006a
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Can compile Plan9 C compiler for windows10?

2021-03-29 Thread arnold
OK - wasn't kenc ported to Linux for bootstrapping the early
Go compilers? Is that version general, or not worth my trying to use?

Thanks,

Arnold

Charles Forsyth  wrote:

> >
> > I doubt very much that using the Plan 9 C compilers will bring much
> > additional benefit for finding bugs (except bugs in the compiler!).
>
>
> The cross-file type-checking does sometimes pick up unpleasantness caused
> by type mismatches.
> It was originally added to allow dynamically-loaded object modules to be
> checked against the loading specification.
> It has found a few problems elsewhere, including one in Python where one .c
> file included a .h with a certain #define
> in scope that another .c file didn't define by accident, causing the two .c
> files to have completely different memory layouts
> for a structure.
>
>
> > Out of curiousity, why is linking against the system libraries so
> > hard?  I assume a port of kenc to Linux would have a driver program
> > that would just invoke the system ld(1).  I'd think that getting
> > the ABI and generation of ELF (or of standard Linux assembly language)
> > correct would be the hard part.
> > What am I missing?
> 
> 
> It works very differently from what you expect
> http://9p.io/sys/doc/compiler.html  :
> 
> The compiler is a single program that produces an object file. Combined in
> the compiler are the traditional roles of preprocessor, lexical analyzer,
> parser, code generator, local optimizer, and first half of the assembler.
> The object files are binary forms of assembly language, similar to what
> might be passed between the first and second passes of an assembler.
> 
> Object files and libraries are combined by a loader program to produce the
> executable binary. The loader combines the roles of second half of the
> assembler, global optimizer, and loader.

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T4d77cc95ab4ed70c-M6a254c61dea5a9cdc6797bc2
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] NFS suicide on RPi3 and RPi4 9front, but works on RMiller's Plan9.

2021-03-29 Thread cinap_lenrek
> 
> Anyawys, the faulting address is
> 
>addr=0x100061fa0 pc=37930

sorry to reply here as i never got the original mail.

i could reproduce this and it turns out to be a arm64 compiler bug expanding
the -1 offset in the array index to a 32 bit unsigned constant but instruction
issued is a 64 bit addition.

i commited a work around for libsunrpc avoiding this case.

changeset:   8382:fbff57e70e76
tag: tip
user:cinap_len...@felloff.net
date:Mon Mar 29 17:13:50 2021 +0200
summary: libsunrpc: work around arm64 compiler bug in sunStringUnpack()

diff -r 87d8e72ffb5c -r fbff57e70e76 sys/src/libsunrpc/rpc.c
--- a/sys/src/libsunrpc/rpc.c   Tue Mar 23 16:33:32 2021 -0700
+++ b/sys/src/libsunrpc/rpc.c   Mon Mar 29 17:13:50 2021 +0200
@@ -428,8 +428,9 @@
goto Err;
/* slide string down over length to make room for NUL */
memmove(dat-1, dat, n);
-   dat[-1+n] = 0;
-   *s = (char*)(dat-1);
+   dat--;
+   dat[n] = 0;
+   *s = (char*)dat;
return 0;
 Err:
return -1;

--
cinap

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T995ec2230d16bd0b-M7a648db117dd9b3b65e26b9b
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Can compile Plan9 C compiler for windows10?

2021-03-29 Thread ori
Quoth arn...@skeeve.com:
> Hi Russ.
> 
> Thanks for this.  You are probably right, but it's always good to
> test against as many compilers as possible.
> 
> Out of curiousity, why is linking against the system libraries so
> hard?  I assume a port of kenc to Linux would have a driver program
> that would just invoke the system ld(1).  I'd think that getting
> the ABI and generation of ELF (or of standard Linux assembly language)
> correct would be the hard part.
> 
> What am I missing?
> 

Kencc cooperates with the plan 9 linkers. It
produces neither textual assembly nor elf
relocatable objects, but a machine-dependent
"assembly bytecode".



--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T4d77cc95ab4ed70c-M21ed3138349a3986cdd3198b
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Can compile Plan9 C compiler for windows10?

2021-03-29 Thread Charles Forsyth
>
> I doubt very much that using the Plan 9 C compilers will bring much
> additional benefit for finding bugs (except bugs in the compiler!).


The cross-file type-checking does sometimes pick up unpleasantness caused
by type mismatches.
It was originally added to allow dynamically-loaded object modules to be
checked against the loading specification.
It has found a few problems elsewhere, including one in Python where one .c
file included a .h with a certain #define
in scope that another .c file didn't define by accident, causing the two .c
files to have completely different memory layouts
for a structure.


> Out of curiousity, why is linking against the system libraries so
> hard?  I assume a port of kenc to Linux would have a driver program
> that would just invoke the system ld(1).  I'd think that getting
> the ABI and generation of ELF (or of standard Linux assembly language)
> correct would be the hard part.
> What am I missing?


It works very differently from what you expect
http://9p.io/sys/doc/compiler.html  :

The compiler is a single program that produces an object file. Combined in
the compiler are the traditional roles of preprocessor, lexical analyzer,
parser, code generator, local optimizer, and first half of the assembler.
The object files are binary forms of assembly language, similar to what
might be passed between the first and second passes of an assembler.

Object files and libraries are combined by a loader program to produce the
executable binary. The loader combines the roles of second half of the
assembler, global optimizer, and loader.

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T4d77cc95ab4ed70c-Mae8386c3c15f3973027b8de6
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Can compile Plan9 C compiler for windows10?

2021-03-29 Thread arnold
Hi Russ.

Thanks for this.  You are probably right, but it's always good to
test against as many compilers as possible.

Out of curiousity, why is linking against the system libraries so
hard?  I assume a port of kenc to Linux would have a driver program
that would just invoke the system ld(1).  I'd think that getting
the ABI and generation of ELF (or of standard Linux assembly language)
correct would be the hard part.

What am I missing?

Thanks,

Arnold

Russ Cox  wrote:

> Hi Arnold,
>
> The hard part is not so much the compiling but the linking against
> system libraries. Honestly once you have both gcc and clang happy (with
> no warnings), I doubt very much that using the Plan 9 C compilers will
> bring much additional benefit for finding bugs (except bugs in the
> compiler!).
>
> Best,
> Russ

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T4d77cc95ab4ed70c-M317489e2b055f003ccfb0dca
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Can compile Plan9 C compiler for windows10?

2021-03-29 Thread Russ Cox
Hi Arnold,

The hard part is not so much the compiling but the linking against
system libraries. Honestly once you have both gcc and clang happy (with
no warnings), I doubt very much that using the Plan 9 C compilers will
bring much additional benefit for finding bugs (except bugs in the
compiler!).

Best,
Russ

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T4d77cc95ab4ed70c-M375a8e64df036ead7f3da21d
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Can compile Plan9 C compiler for windows10?

2021-03-29 Thread arnold
Is there a usable, standalone, 32- or 64-bit version of kenc that
works on Linux?

By "usable" I mean "able to compile and run regular Linux code". For
example, oh, say, compiling and testing GNU Awk. :-)

(Besides GCC and clang, I test gawk with tinycc and the revived PCC
compilers. I have often wanted to add kenc into the mix, but haven't
found a usable, standalone version thereof.)

Thanks,

Arnold

ron minnich  wrote:

> Nxm built kencen toolchain on Linux.
>
> https://github.com/rminnich/NxM
>
> We could build all of plan9 on Linux. You might be able to start there and
> produce .Exe's.
>
> Not tested for quite some time now. Derived from nix.
>
>
>
> On Sun, Mar 28, 2021, 6:17 AM  wrote:
>
> > uh inferno's 8c compiles .exe file?
> > *9fans * / 9fans / see discussions
> >  + participants
> >  + delivery options
> >  Permalink
> > 
> >

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T4d77cc95ab4ed70c-M736b5a79b2e3c21b143022da
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription