[9fans] Plumber architecture question

2019-01-05 Thread Ethan Gardener
Every so often, I start wondering why the plumber isn't simpler. Here's my simpler design: There is no plumber. Instead, `plumb` reads the plumbing files and acts accordingly. To receive input from the plumber, programs post a pipe in /srv. No need for a special-purpose filesystem. It

[9fans] Raspberry Pi 3 B+ image of 9front

2019-01-05 Thread Raingloom
Has anyone made one? I'm trying to put one together but the Plan 9 disk tools are... well they are quite different to what I'm used to. I managed to build the kernel and the userspace (with CONF=rpi2, which is afaik the correct one for rpi3 too?) and am trying to mirror the partitioning of the

Re: [9fans] Plumber architecture question

2019-01-05 Thread Ethan Gardener
On Sat, Jan 5, 2019, at 2:12 PM, erik quanstrom wrote: > you need plumber so cpu can be transparent to plumbing. Good point. I think it could be done with multi-/srv, but I see one problem: you wouldn't want cpu to export all of /srv. (Right?) I think it could be dealt with by mounting a

Re: [9fans] Raspberry Pi 3 B+ image of 9front

2019-01-05 Thread cinap_lenrek
richard miller did a very fine job with the image. 9front used to have a image to download based on it for the raspi1, but it is quite old and nobody updated it. in the last release, we updated the kernel from richards code and made the /sys/lib/dist/mkfile able to produce a bootable sdcard

Re: [9fans] Plumber architecture question

2019-01-05 Thread erik quanstrom
you need plumber so cpu can be transparent to plumbing.- erik

Re: [9fans] Raspberry Pi 3 B+ image of 9front

2019-01-05 Thread Chris McGee
I have been intending to try out the new raspberry pi updates too for 9front, but haven't had the chance yet. A couple of years ago I was building the sd-card images for my raspberry pis by using qemu to bring up an x86 install of 9front and doing a cross-compile within to build the new disk

Re: [9fans] How does one read a file line by line in an rc script?

2019-01-05 Thread Steve Simon
What are you running this on, is this byron's rc on unix? I just tried the secript I posted, cut and pasted into a tiny shell scropt called testread, and it just worked™ maybe some other part of your script has a problem? My script below -snip-snip- #!/bin/rc cat $1 |

Re: [9fans] rc scripts, how to get spaces in array elements generated by command output?

2019-01-05 Thread Mack Wallace
Thank you Anthony! I had thought that IFS in Plan 9 was not the way to go after reading from ‘Rc - The Plan 9 Shell’ “IFS is no longer used, except in the one case where it was indispensable: converting command output into argument lists during command substitution.” The document

[9fans] rc scripts, how to get spaces in array elements generated by command output?

2019-01-05 Thread Mack Wallace
I apologize if this is not the correct forum for this question. However, since I am trying to write a script in Plan 9’s rc shell, this seemed to be the best place to go - as most scripting resources are based on bash, and I could not find the answer in the rc references I could find. - and I’m

Re: [9fans] rc scripts, how to get spaces in array elements generated by command output?

2019-01-05 Thread Anthony Martin
Mack Wallace once said: > My question: Is there a way to take the string output of a command that > contains spaces and make it a single element of an array in rc script? > > [...] > > However, if I am receiving output from sed that contains spaces from > the following script line > >

Re: [9fans] Raspberry Pi 3 B+ image of 9front

2019-01-05 Thread Raingloom
> build bootable hjfs sdcard image > > = > > cd /sys/lib/dist > mk /tmp/mysdcard.pi.img This last step fails with: mk: don’t know how to make '/n/src9/sys/lib/sysconf g/proto/cmpdistproto’ in directory /sys/lib/dist

Re: [9fans] How does one read a file line by line in an rc script?

2019-01-05 Thread Mack Wallace
Thank you Steve. But unfortunately... That gives me “rc (testread): variable name not singleton!” Trying the read with the -m option gets me the following errors repeated over and over until I escape out. “awk i/o error occurred on /dev/stdin source line number 1 awk: i/o error occurred while

Re: [9fans] Raspberry Pi 3 B+ image of 9front

2019-01-05 Thread cinap_lenrek
oh yeah. sorry. just do this before: bind / /n/src9 i missed this because that step is implied by sys/lib/rootbind that i use when building iso from a separate clean repository. -- cinap

Re: [9fans] Raspberry Pi 3 B+ image of 9front

2019-01-05 Thread Raingloom
Thanks! I managed to boot it but ran into some problems with my USB keyboard, the screen is basically flooded with "read returned 0" errors, but the mouse works without problems, even if I plug it in late. I'll take a proper screenshot of the log when I have more time. Sent with ProtonMail

[9fans] How does one read a file line by line in an rc script?

2019-01-05 Thread Mack Wallace
Another, probably more stupid question - How does one read a text file line by line in an rc script. In bash this works: #!/bin/bash while read line do echo $line done < $1 I’ve tried: #!/bin/rc while (line=`{read $1}) { echo $line } Which produces the first line of the

Re: [9fans] How does one read a file line by line in an rc script?

2019-01-05 Thread Steve Simon
try cat $1 | while(line=`{read}){ echo $line } no doubt you cam do without the cat but i am unsure off hand where to put the redirect in and i am not on plan9 just now. -Steve > On 5 Jan 2019, at 10:34 pm, Mack Wallace wrote: > > Another, probably more stupid question - How does one read a

Re: [9fans] How does one read a file line by line in an rc script?

2019-01-05 Thread Mack Wallace
Thanks... I'm running Bell Labs Plan 9 in Virtualbox. (I’m not sure how to get the version from the os or from rc) I copied and pasted the snip directly into a script with only that in it - same error as before:“rc (testread): variable name not singleton!” As for the second part - I will

Re: [9fans] How does one read a file line by line in an rc script?

2019-01-05 Thread Anthony Martin
Mack Wallace once said: > Another, probably more stupid question - How does one read a text file > line by line in an rc script. You should really read the rc(1) man page. It will answer your questions. Here the functions foo and bar are equivalent: fn foo { <$1 while(l