Re: [9fans] It seems Plan 9 is on Hacker News

2012-08-20 Thread Balwinder S Dheeman

On 08/18/2012 09:27 AM, Matthew Veety wrote:

http://news.ycombinator.com/item?id=4397390

For what it's worth, our beloved operating system is on Hacker News.


The system as a whole is likely to feel tantalizingly familiar to Unix® 
users but at the same time quite foreign, because it indeed is not a Unix.


9P2000 (aka 9P) is a network protocol developed at Bell Labs for the 
Plan 9 from Bell Labs distributed operating system as the means of 
accessing and manipulating resources and applications transparently in a 
distributed environment. 9P works both as a distributed file system and 
as a network transparent and language agnostic 'API'.


Though Plan 9 does not have office productivity suites, relational 
databases, and, or even a decent web browser like Chromium, or Firefox, 
modren C++ compiler, good GUI tool-kit or widgets and essential drivers 
for AHCI, Bluetooth, WiFi, WiMAX and USB devices and a fully fuctional 
IPv6 networking as yet, but it certainly is an example of a clean, 
efficient, compact and monolithic kernel and distributed operating 
system environment which provides a native light weight window system 
rio, shell rc, text editor sam and versatile tools like acme, a user 
interface, plumber, a mechanism for interprocess communication and acid, 
a scriptable debugger for programmers, all in very small footprint.


--
Balwinder S "bdheeman" Dheeman
(http://werc.homelinux.net/contact/)



Re: [9fans] It seems Plan 9 is on Hacker News

2012-08-20 Thread cinap_lenrek
ahci works. richard miller wrote a bluetooth stack. wifi and usb
just need more drivers. ipv6 is supported.

--
cinap



Re: [9fans] It seems Plan 9 is on Hacker News

2012-08-20 Thread cinap_lenrek
theres also a commercial c++ compiler if you really need one.

http://www.comeaucomputing.com/

--
cinap



Re: [9fans] It seems Plan 9 is on Hacker News

2012-08-20 Thread hiro
"decent web browser" is an oxymoron.



[9fans] sam command language question

2012-08-20 Thread Steve Simon
Tis the season for exotic sam command language questions,
though mine is not that exotic.

I want to edit some xml (yes I know) and capitalise all the labels
in it. I only want to do this once so I don't care that it will
envoke tr thousands of times and take a minuite or so.

This is what I tried:

,x/label="[^"]+"/ {
x/ [a-z]/ | tr a-z A-Z
}

sadly the inner 'x' searches onward in the file and not in
the selection (dot) generated by the outer 'x'.

I tried a few more random commands but nothing very sensible,
anyone any ideas?

Seems somthing that should be easy...

-Steve



Re: [9fans] sam command language question

2012-08-20 Thread Rudolf Sykora
On 20 August 2012 13:12, Steve Simon  wrote:
> Tis the season for exotic sam command language questions,
> though mine is not that exotic.
>
> I want to edit some xml (yes I know) and capitalise all the labels
> in it. I only want to do this once so I don't care that it will
> envoke tr thousands of times and take a minuite or so.
>
> This is what I tried:
>
> ,x/label="[^"]+"/ {
> x/ [a-z]/ | tr a-z A-Z
> }
>
> sadly the inner 'x' searches onward in the file and not in
> the selection (dot) generated by the outer 'x'.
>
> I tried a few more random commands but nothing very sensible,
> anyone any ideas?
>
> Seems somthing that should be easy...
>
> -Steve
>

1) what's wrong with
,x/label="[^"]+"/ | tr a-z A-Z
?
(besides that it also capitalizes label -> LABEL; but this would do
your code too)

2) I will think about your own code later.

Ruda



Re: [9fans] sam command language question

2012-08-20 Thread Rudolf Sykora
On 20 August 2012 13:12, Steve Simon  wrote:
> This is what I tried:
>
> ,x/label="[^"]+"/ {
> x/ [a-z]/ | tr a-z A-Z
> }
>
> sadly the inner 'x' searches onward in the file and not in
> the selection (dot) generated by the outer 'x'.

I do not see the reported behaviour. For me it searches through the
dot prepared by the first 'x' command... Thanks to the 'space'
character in the second 'x' it however capitalizes only the first
letter of any word in paranthesis which has a space in front of
itself.

Ruda



Re: [9fans] sam command language question

2012-08-20 Thread Rudolf Sykora
On 20 August 2012 13:12, Steve Simon  wrote:
> ,x/label="[^"]+"/ {
> x/ [a-z]/ | tr a-z A-Z
> }

Perhaps, also, I haven't correctly understood what you are after. If
what I wrote doesn't solve the problem, an example of what is needed
would help.

Ruda



Re: [9fans] It seems Plan 9 is on Hacker News

2012-08-20 Thread Jack Norton

On 8/20/2012 3:48 AM, Balwinder S Dheeman wrote:

office productivity suites, relational
databases, and, or even a decent web browser like Chromium, or Firefox,
modren C++ compiler, good GUI tool-kit or widgets


These all have an "all useful features" version on plan9 called catclock.



Re: [9fans] sam command language question

2012-08-20 Thread Steve Simon
I am confused, and appologise to all for the noise.

,x/label="[^"]+"/ {
x/ [a-z]/ | tr a-z A-Z
}

does exactly what I wanted, I don't understand why in my toy tests it
didn't appear to work, probably a typo.

for the record I was tring to do this:

label="Hello"
->
label="Hello"  (i.e. unchanged)

label="Hello world and other planets"
->
label="Hello World And Other Planets"

-Steve



Re: [9fans] sam command language question

2012-08-20 Thread Rudolf Sykora
On 20 August 2012 14:25, Steve Simon  wrote:
> I am confused, and appologise to all for the noise.
>
> ,x/label="[^"]+"/ {
> x/ [a-z]/ | tr a-z A-Z
> }
>
> does exactly what I wanted, I don't understand why in my toy tests it
> didn't appear to work, probably a typo.
>
> for the record I was tring to do this:
>
> label="Hello"
> ->
> label="Hello"  (i.e. unchanged)
>
> label="Hello world and other planets"
> ->
> label="Hello World And Other Planets"
>
> -Steve
>

You could also use something like the following. It would, compared to
your code, also capitalize the very first word in the quotation marks
(your Hello, if it were hello).

,x/label="[^"]+"/ .-#0+#7,.+#0-#1 y/ / .-#0,.-#0+#1 | tr a-z A-Z

It finds the label="stuff", then limits to stuff, then breaks into
words, then capitalizes the first letter of each word.

Ruda



Re: [9fans] Multi-dimensional filesystem

2012-08-20 Thread tlaronde
On Fri, Aug 17, 2012 at 09:48:33AM +0200, Lucio De Re wrote:
> 
> The question here is how to enhance the Unix-like hierarchical
> directory to embrace multi-dimensionality.  I have no doubt that the
> changes to 9P that will almost certainly be required for this will be
> fairly obvious and from there building synthetic fileservers will not
> be difficult.  I have a feeling that assuming that Plan 9 already has
> the required silver bullet is a bad starting point.

I don't assume that "everything is OK already" ;) But I assume what has
been (re-)discovered by modern mathematics: that the linearity is
fundamental, because it is the way we think. Mathematical language is
sequential linear, can speak about multidimensional objects without
being itself, lexicaly or syntactically, multidimensional (there have
been attempts, by Frege, and even in some early computer languages). So:
it is better to be sure that the core, kernel, whatever is agnostic
about the dimensions (making no assumptions about, for this, dot-dot),
than trying to inject multdimensional features in the core.

And one can play with the idea without changing 9P at the moment, just
to gather more informations.

-- 
Thierry Laronde 
  http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C



[9fans] Kmouse?

2012-08-20 Thread erik quanstrom
in pc/kbd.c, there are the scan codes Kmouse|button.  where button in {1, .., 
5}.
i am not sure where it is documented how these scan codes could get generated.
does anyone remember?

- erik



Re: [9fans] Kmouse?

2012-08-20 Thread Francisco J Ballesteros
those were added to let use keys in the laptop as mouse keyboards.
they are configured using /dev/kbmap

I have a couple of kbmaps using those.

On Aug 21, 2012, at 12:46 AM, erik quanstrom wrote:

> in pc/kbd.c, there are the scan codes Kmouse|button.  where button in {1, .., 
> 5}.
> i am not sure where it is documented how these scan codes could get generated.
> does anyone remember?
> 
> - erik




[9fans] dns

2012-08-20 Thread Jeff Sickel
Has anyone else been seeing their Plan 9 dns servers work for a
little while and then stop responding?  I've seen this happen
after delegation loops show up in the logs:

Aug 20 00:24:10 delegation loop 68.23.115.in-addr.arpa ns
rev1.kornet.net ->  ns  H.ROOT-SERVERS.NET from 211.216.50.180
 and no answers
Aug 20 00:24:11 delegation loop 68.23.115.in-addr.arpa ns
rev1.kornet.net ->  ns  J.ROOT-SERVERS.NET from 211.216.50.170
Aug 20 00:24:11  and no answers
Aug 20 00:24:11 delegation loop 68.23.115.in-addr.arpa ns
rev1.kornet.net ->  ns  G.ROOT-SERVERS.NET from 211.216.50.180
Aug 20 00:24:11  and no answers
Aug 20 00:24:13 delegation loop 68.23.115.in-addr.arpa ns
rev1.kornet.net ->  ns  J.ROOT-SERVERS.NET from 211.216.50.170
Aug 20 00:24:13  and no answers
Aug 20 00:24:15 delegation loop 68.23.115.in-addr.arpa ns
rev1.kornet.net ->  ns  H.ROOT-SERVERS.NET from 211.216.50.180




Re: [9fans] dns

2012-08-20 Thread erik quanstrom
i'm using a modified version of dns.  i found that aktomi
redirections too unreliable.  even so, i still get crashes, which have
become more frequent in recent weeks.  i've attached a copy of
"restartdns" which is ment to be called from cron on short intervals.

contrib quanstro/ndb has the whole nine yards.

one of these days i will redo dns with a better (and maintainable)
structure.  :-).  but please beat me to it.

- erik#!/bin/rc
rfork en
nl='
'
mailto=(quanstro)
allow=(ladd)
recursive=()
gcidr = (
# only blocks that can map to google's a records
72.14.192.0/18
74.125.0.0/16
209.85.128.0/17
216.239.32.0/19
173.194.0.0/16
)

if(! ~ `{cat /dev/user} `{cat /dev/hostowner}){
echo 'restartdns: must be hostowner' >[1=2];
exit user
}

9fs other

fn syslog{
echo $sysname `{date} restartdns: $* > /sys/log/dns
}

fn pgroup{
ifs=$nl g=`{cat /proc/$1/noteid}
for(i in `{grep -l $g /proc/*/noteid | sed 
's:/proc/([^/]+)/noteid:\1:g'})
if(test -d /proc/$i)
echo $i
}

fn reaper{
nbroken=()
for(i in `{ps | awk '$6 == "Broken" && $7 == "dns" {print $2}'}){
r = /n/other/$user/dnssnap/$sysname.$i.`{date -n}
snap -o $r `{pgroup $i}
nbroken = ($nbroken $r)
}
}

fn getips{
ndb/dnsquery $* | sed 's/.*[]//g'
}

fn google{
google=()
if(! ip/cidr -rf <{getips google.com} <{echo $gcidr})
google=1
if(ip/cidr -f /lib/badcidr <{getips 9fans.net} )
google=($google 2)
}

fn why{
if(! ~ $#nbroken 0){
echo getting mediæval on $#nbroken broken dns processes.
for(i in $nbroken)
echo $i
}
if(! ~ $#nwait 0){
echo getting mediæval on $#nwait deadlocked dns processes.
for(i in $nwait)
echo $i
}
if(! ~ $#google 0){
echo google broken
ndb/dnsquery google.com
ndb/dnsquery 9fans.net any
}
}

flagfmt='p,f'
args=()
if(! ifs=() eval `{aux/getflags $*} || ! ~ $#* 0){
aux/usage
exit usage
}

if(~ $#flagf 0){
if(! ~ $sysname $allow)
exit 'wrong system'
reaper
ifs=$nl nwait=`{ps -a |sed -n 's/.* +dns \[query lock wait 
for(.*)\]/\1/gp' | sort | uniq -c | awk '$1>2'}
google

if(~ $#nbroken 0 && ~ $#nwait 0 && ~ $#google 0)
exit 'none broken'
why
if(~ $service rx)
{date; echo; why; echo; ps -a | grep ' dns ' }| mail -s 
'restartdns: '^$sysname $mailto
}

if(~ $flagp 1)
exit ''

syslog slaying broken $#nbroken nwait $#nwait google $#google

dns = ndb/dns
slaydns = `{echo $dns | sed 's:.*/::g'}
slay $slaydns | rc
unmount '#s/dns' /net/dns >[2=]
unmount '#s/dns_net.alt' /net.alt/dns >[2=]
rm -f '#s/dns'  '#s/dns_net.alt'

$dns -N 2 -s
if(~ $sysname $recursive)
$dns -sx /net.alt -f /lib/ndb/external
if not
$dns -Rrsx /net.alt -f /lib/ndb/external

Re: [9fans] dns

2012-08-20 Thread arisawa
Hello

Recent version of dns crashes.
Old version (for example, Apr this year)  is OK.
It seems crashed dns make other side effect:
Many processes stop with Fauth status. # I don't know the reason.

Kenji Arisawa

On 2012/08/21, at 10:51, Jeff Sickel wrote:

> Has anyone else been seeing their Plan 9 dns servers work for a
> little while and then stop responding?  I've seen this happen
> after delegation loops show up in the logs:
> 
> Aug 20 00:24:10 delegation loop 68.23.115.in-addr.arpa ns
> rev1.kornet.net ->  ns  H.ROOT-SERVERS.NET from 211.216.50.180
> and no answers
> Aug 20 00:24:11 delegation loop 68.23.115.in-addr.arpa ns
> rev1.kornet.net ->  ns  J.ROOT-SERVERS.NET from 211.216.50.170
> Aug 20 00:24:11  and no answers
> Aug 20 00:24:11 delegation loop 68.23.115.in-addr.arpa ns
> rev1.kornet.net ->  ns  G.ROOT-SERVERS.NET from 211.216.50.180
> Aug 20 00:24:11  and no answers
> Aug 20 00:24:13 delegation loop 68.23.115.in-addr.arpa ns
> rev1.kornet.net ->  ns  J.ROOT-SERVERS.NET from 211.216.50.170
> Aug 20 00:24:13  and no answers
> Aug 20 00:24:15 delegation loop 68.23.115.in-addr.arpa ns
> rev1.kornet.net ->  ns  H.ROOT-SERVERS.NET from 211.216.50.180
> 
> 




Re: [9fans] dns

2012-08-20 Thread Jeff Sickel
As in using:

Apr 12 22:46:05 CDT 2012 /n/sourcesdump/2012/0501/plan9/386/bin/ndb/dns 310819 
[jmk]
Oct 14 13:32:38 CDT 2011 /n/sourcesdump/2012/0412/plan9/386/bin/ndb/dns 310519 
[sys]

There are a few differences if you compare with sourcesdump. Knowing one that
works should help narrow down the changes to get the latest working cleanly 
again.

-jas

On Aug 20, 2012, at 11:23 PM, arisawa  wrote:

> Hello
> 
> Recent version of dns crashes.
> Old version (for example, Apr this year)  is OK.
> It seems crashed dns make other side effect:
> Many processes stop with Fauth status. # I don't know the reason.
> 
> Kenji Arisawa




Re: [9fans] dns

2012-08-20 Thread Benjamin Huntsman
>Has anyone else been seeing their Plan 9 dns servers work for a little while 
>and then stop responding?

I had that, and other problems with it left and right.  I probably had to 
restart DNS a few times per week.  I was able to get it to support a local 
Windows Active Directory domain though, but it was painful, so I switched to 
BIND on FreeBSD.  I'd love to switch back someday though... the Plan 9-based 
DNS server was much simpler to deal with from a config standpoint...

-Ben