Re: [9fans] Additional compilers under 9vx.OSX

2011-04-11 Thread Greg Comeau
As mentioned in a post yesterday, we seem to have succeeded in getting
5c et al built.  However, in resuming playing around at least one case
/bin/ape/sh is producing:

./command-name[3]: other-command-name: cannot execute - Access Denied

since doing the mk's.  Obviously something in those builds stomped
on something already existing.  Any ideas what?
-- 
Greg Comeau / 4.3.10.1 with C++0xisms now in beta!
Comeau C/C++ ONLINE == http://www.comeaucomputing.com/tryitout
World Class Compilers:  Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?



Re: [9fans] Additional compilers under 9vx.OSX

2011-04-11 Thread Greg Comeau
In article 784be5fe9a0079d80a76434d252dd...@coraid.com,
erik quanstrom quans...@labs.coraid.com wrote:
 2) If I recall as it was installed a while ago it came with 8c/8l and
respective includes/libs already available.  However, things like
5c and its requirements do not seem to be available by default.
What's the easiest way to get the binaries and end-user install tree
for the additional compilers (packaged files of each compiler
would be best)?

the way to do this is
   cd /sys/src; objtype=arm mk  mk clean

Ok, think I might be in order finally.  After some snooping and
Bakul's message, I see I had to do a general mk all and mk install
before doing the above.  And now many hours later I seem to get
execution of a trival 5 program via 5i.  Nothing like rainy day
computing, except it's not raining here today :)

Also, it does not seem that vc and qc (and perhaps some others)
follow the above procedure.  Is that right?  IOWs, for instance,
after the mk all and mk install only 1c, 2c, 5c, 7c, and 8c are
in /386/bin, but the others I don't see.
-- 
Greg Comeau / 4.3.10.1 with C++0xisms now in beta!
Comeau C/C++ ONLINE == http://www.comeaucomputing.com/tryitout
World Class Compilers:  Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?



Re: [9fans] Additional compilers under 9vx.OSX

2011-04-11 Thread Greg Comeau
In article 90f71fcedeb5b45a5bed515862b8a...@hamnavoe.com,
Richard Miller 9f...@hamnavoe.com wrote:
 1) If it is upgraded to latest version of Snow Leopard (I think 10.6.3?),
will anything regarding 9vx.OSX break?

As far as I can tell, 9vx works fine on MacOSX 10.6.7.

Great, 9vx is so convenient.
-- 
Greg Comeau / 4.3.10.1 with C++0xisms now in beta!
Comeau C/C++ ONLINE == http://www.comeaucomputing.com/tryitout
World Class Compilers:  Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?



Re: [9fans] Additional compilers under 9vx.OSX

2011-04-11 Thread Greg Comeau
In article 784be5fe9a0079d80a76434d252dd...@coraid.com,
erik quanstrom quans...@labs.coraid.com wrote:
 2) If I recall as it was installed a while ago it came with 8c/8l and
respective includes/libs already available.  However, things like
5c and its requirements do not seem to be available by default.
What's the easiest way to get the binaries and end-user install tree
for the additional compilers (packaged files of each compiler
would be best)?

the way to do this is
   cd /sys/src; objtype=arm mk  mk clean

Just getting to play with this... had to do some copying of some of
the files first among other setbacks...  ok,  plain mk asks what to make,
and so I tried 'mk all' which is saying 5c does not exist, but
that's one of the things I want it to build.
-- 
Greg Comeau / 4.3.10.1 with C++0xisms now in beta!
Comeau C/C++ ONLINE == http://www.comeaucomputing.com/tryitout
World Class Compilers:  Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?



[9fans] stream alternative?

2011-04-11 Thread faif
From The Organization of Networks in Plan 9:

a. Asynchronous communications channels such as pipes, TCP
conversations, Datakit conversations, and RS232 lines are implemented
using streams.

b. Streams remain in our kernel because we are unable to devise a
better alternative.

Also, in a previous question (http://groups.google.com/group/
comp.os.plan9/browse_thread/thread/771294cf1d34c337) it was stated
that streams are no longer used. So what's the present mechanism that
replaces streams?



Re: [9fans] Additional compilers under 9vx.OSX

2011-04-11 Thread Greg Comeau
In article BANLkTi=djiqswgyncojzoopvffkybai...@mail.gmail.com,
ron minnich rminn...@gmail.com wrote:
I regularly build kernels and full bins for arm on 9vx. the biggest
issue with osx is when you install 9vx on a case-insenstive file
system: things like /bin/Kill and /bin/kill don't quite work out.

Thanks for the heads up, I seem to have run into this trying
to copy sys and eventually had to use a piping tar and cross
my fingers nothing got stomped on that I'm trying to (eventually) build
-- 
Greg Comeau / 4.3.10.1 with C++0xisms now in beta!
Comeau C/C++ ONLINE == http://www.comeaucomputing.com/tryitout
World Class Compilers:  Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?



Re: [9fans] Additional compilers under 9vx.OSX

2011-04-11 Thread Lucio De Re
the way to do this is
  cd /sys/src; objtype=arm mk  mk clean
 
 Just getting to play with this... had to do some copying of some of
 the files first among other setbacks...  ok,  plain mk asks what to make,
 and so I tried 'mk all' which is saying 5c does not exist, but
 that's one of the things I want it to build.

There's a post by Geoff Collyer a while back, when the SheevaPlug was
first introduced to Plan 9 that explains how to build the arm
toolchain before trying to build the entire system.  Along these
lines:

cd /sys/src/cmd
for (d in 5?) @{cd $d  mk install}

I'm not going to try that now...

++L




[9fans] Plan 9 port of the Go toolchain

2011-04-11 Thread Lucio De Re
I have tweaked the Plan 9 native ar.h to allow for manual adjustment
around the different needs of Go and native Plan 9 toolchains, so now:

#ifndef SARNAME
#define SARNAME 16
#endif

SARNAME can be predefined to the 64 that Go prefers.  Unfortunately,
it's a short term solution, I'm hoping for suggestions on the way
forward from here.

++L

PS: I still can't link an executable with the version of 8l from the
Go toolchain that I built under Plan 9, but I'm hoping to get there
soon.




Re: [9fans] stream alternative?

2011-04-11 Thread erik quanstrom
 Also, in a previous question (http://groups.google.com/group/
 comp.os.plan9/browse_thread/thread/771294cf1d34c337) it was stated
 that streams are no longer used. So what's the present mechanism that
 replaces streams?

there isn't one.  you can't dynamically reconfigure i/o paths in plan 9.

however, since everything's a file server, one can construct fairly
arbitrary chains of devices.  (and given the bread/bwrite calls in the
kernel, it can be zero-copy.)

zB: aoe(3) presents basic block devices.  partitions aren't supported.
however, sdaoe(3) which is a lightly specialized version of sdloop(3)
turns one into a sd(3) device, which does support partitions.  sdloop
(only in 9atom) can do the same thing for anything that looks like a
regular file.

so imagine that i for some bizarre reason i wanted to run raid50
locally on aoe targets.  i could run a fictive sdraid5 on a fictive
set of sdraid1 devices which in turn were built from sdaoe on top
of aoe.  so you'd have

sdraid5* - sdraid1* - sdaoe - aoe - ether

maybe that looks like streams to you, even if it's not dynamically
reconfigurable.

personally, that looks more like Device in ken's file server
to me.

- erik



Re: [9fans] Additional compilers under 9vx.OSX

2011-04-11 Thread erik quanstrom
 the way to do this is
  cd /sys/src; objtype=arm mk  mk clean
 
 Just getting to play with this... had to do some copying of some of
 the files first among other setbacks...  ok,  plain mk asks what to make,
 and so I tried 'mk all' which is saying 5c does not exist, but
 that's one of the things I want it to build.

bad instructions.  sorry.  that should have been 

cd /sys/src/cmd; mk 5^(a l c)^.install
cd /sys/src; objtype=arm mk install  mk clean

- erik



Re: [9fans] Plan 9 port of the Go toolchain

2011-04-11 Thread Lucio De Re
 PS: I still can't link an executable with the version of 8l from the
 Go toolchain that I built under Plan 9, but I'm hoping to get there
 soon.

It's of some consolation to me that I see exactly the same results
under Ubuntu, so that particular problem isn't in the 8l executable
created for Plan 9.  I may have something exciting to report on this
issue within the day.

++L




Re: [9fans] Additional compilers under 9vx.OSX

2011-04-11 Thread Greg Comeau
In article insdeo$km5$1...@panix1.panix.com,
Greg Comeau com...@comeaucomputing.com wrote:
As mentioned in a post yesterday, we seem to have succeeded in getting
5c et al built.  However, in resuming playing around at least one case
/bin/ape/sh is producing:

./command-name[3]: other-command-name: cannot execute - Access Denied

since doing the mk's.  Obviously something in those builds stomped
on something already existing.  Any ideas what?

I found something similar online and did what they suggested:
cd /sys/src/ape and mk nuke and mk install, but same result as above,
even after rebooting.  ??
-- 
Greg Comeau / 4.3.10.1 with C++0xisms now in beta!
Comeau C/C++ ONLINE == http://www.comeaucomputing.com/tryitout
World Class Compilers:  Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?



Re: [9fans] Additional compilers under 9vx.OSX

2011-04-11 Thread David Leimbach


Sent from my iPhone

On Apr 11, 2011, at 3:44 AM, erik quanstrom quans...@quanstro.net wrote:

 the way to do this is
cd /sys/src; objtype=arm mk  mk clean
 
 Just getting to play with this... had to do some copying of some of
 the files first among other setbacks...  ok,  plain mk asks what to make,
 and so I tried 'mk all' which is saying 5c does not exist, but
 that's one of the things I want it to build.
 
 bad instructions.  sorry.  that should have been 
 
cd /sys/src/cmd; mk 5^(a l c)^.install
cd /sys/src; objtype=arm mk install  mk clean
 
 - erik
 
I posted some on the wiki about how I got the guruplug working for me...  



Re: [9fans] Plan 9 port of the Go toolchain

2011-04-11 Thread Lucio De Re
 PS: I still can't link an executable with the version of 8l from the
 Go toolchain that I built under Plan 9, but I'm hoping to get there
 soon.
 
 It's of some consolation to me that I see exactly the same results
 under Ubuntu, so that particular problem isn't in the 8l executable
 created for Plan 9.  I may have something exciting to report on this
 issue within the day.
 
Having rebuilt a copy of runtime.a as well as of hell-o.8, I now
have an executable created from hell-o.go that runs sucessfully
under Plan 9 after having been linked with an 8l from the Go
toolchain built entirely under Plan 9.  If I were any good with
picture I'd try to make the above easier to visualise.

It seems to me that, contrary to Pavel's careful statement, '8g
itself is not agnostic regarding the GOOS=plan9 environment
variable: I'll stick out my neck and claim without sufficient
investigation that (a) the object code is flagged with the
architecture name and (b) that the module functions init() and main()
are labelled with a period (main.main) versus with the Go-special
mid-line dot (middle-dot or UTF-00b7 as in mainĀ·main) in Linux and
Plan 9 respectively.

I would like to upload the modified Go toolchain source code I used to
produce 8l under Plan 9 to sources, but I'll wait to find that
there is some interest as well as suggestions on the best approach to
submit these sources to review and testing by others.  I have
everything at hand to reproduce these sources, but some help will be
needed to tie up any lose ends from outside the Go toolchain sources.

And, once again, many thanks to Pavel (and the Go Authors, of course)
for making this possible and assisting with it.  My next task will be
to make similar changes to 8a, 8c and 8g to complete the series
of 386 tools.  But I also want to submit the changes in src/cmd/8l
and src/cmd/ld to the Go Authors for inclusion in future releases,
but that isn't going to be a trouble-free request, the changes have
been rather pervasive.

++L




Re: [9fans] /dev/draw and c, rc, ruby, python, go

2011-04-11 Thread Sergey Kish
Thanks! All implementations works now.

A typo fix in Go implementation was not enough.  You can't write
message by parts, have to form it in buffer before writing.

ratrace helped to find problem with Ruby/Python implementations.
https://gist.github.com/912377#file_ratrace.log shows that both
writes to data after reading ctl. Fixed with a flush call.

 Also, you should really check the errors from any system call
 instead of discarding them.
It may be good in production, but in development I want program crash
as loud and quick as possible.


Re: [9fans] /dev/draw and c, rc, ruby, python, go

2011-04-11 Thread Akshat Kumar
Even on Plan 9 proper (that is, bare hardware?
how about virtualized on qemu or VMWare, etc.)?


ak

On Sun, Apr 10, 2011 at 1:49 PM, ron minnich rminn...@gmail.com wrote:
 Hi, it's me, the repeating person (I almost said broken record but
 I'm not sure how many people know what that means any more :-)

 Suggest you run your command with ratrace

 ratrace - whatevercommandyouarerunning

 It can be very revealing.

 ron