Re: [9fans] assigning acme windows to columns programmatically

2011-01-18 Thread Sergey Zhilkin
Its impossible without modification.

On Mon, Jan 17, 2011 at 11:04 AM, Joseph Xu joseph...@gmail.com wrote:
 Hi:

 In acme, is it possible to move an existing window into a specific
 column using its control file interface? I have a script that spawns
 several windows every run and I'm getting tired of manually
 rearranging the windows every time.

 Joseph





-- 
С наилучшими пожеланиями
Жилкин Сергей
With best regards
Zhilkin Sergey



Re: [9fans] how to make hardware work?

2011-01-18 Thread sergey . kish
PPP
---

 If ethernet works fine, why
 not just plug into a wired connection to your local network?

Because ethernet isn't the only choice to connect.
It is good to have working wifi and 3g modem.

 What exactly do you mean, PPP over USB?
Google PPP over USB. I've googled, red 9fans archive,
wiki and docs before posting here.

I've even posted gist with lspci, lsusb, logs etc 
(https://gist.github.com/782904).
Device support CDC. There is interface for AT commands.

bInterfaceSubClass 2 Abstract (modem)
bInterfaceProtocol 1 AT-commands (v.25ter)
iInterface 8 CDC Comms Interface

Then I plug it to Linux box it creates /dev/ttyACM0

usb 2-1: new full speed USB device using uhci_hcd and address 2
cdc_acm 2-1:1.8: ttyACM0: USB ACM device
cdc_acm 2-1:1.10: ttyACM1: USB ACM device
usbcore: registered new interface driver cdc_acm
cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and 
ISDN adapters
NET: Registered protocol family 35
usbcore: registered new interface driver cdc_ether

PPPD use it to create ppp0 network interface.

# wvdial
-- WvDial: Internet dialer version 1.61
-- Cannot get information for serial port.
-- Initializing modem.
-- Sending: ATZ
ATZ
OK
-- Sending: ATQ0 V1 E1 S0=0 C1 D2 +FCLASS=0
ATQ0 V1 E1 S0=0 C1 D2 +FCLASS=0
OK
-- Sending: AT+CGDCONT=1,IP,unlim.utel.ua
AT+CGDCONT=1,IP,unlim.utel.ua
OK
-- Modem initialized.
-- Sending: ATDT*99#
-- Waiting for carrier.
ATDT*99#
CONNECT
~[7f]}#@!}!} } }2}#}$@#}!}$}%\}}} }*} } g}%~
-- Carrier detected. Waiting for prompt.
~[7f]}#@!}!} } }2}#}$@#}!}$}%\}}} }*} } g}%~
-- PPP negotiation detected.
-- Starting pppd at Sat Jan 15 22:03:16 2011
-- Pid of pppd: 8915
-- Using interface ppp0
-- pppd: e[08]c[08]xg[08]
-- pppd: e[08]c[08]xg[08]
-- pppd: e[08]c[08]xg[08]
-- pppd: e[08]c[08]xg[08]
-- local IP address 91.124.241.232
-- pppd: e[08]c[08]xg[08]
-- remote IP address 10.6.6.6
-- pppd: e[08]c[08]xg[08]
-- primary DNS address 213.179.249.151
-- pppd: e[08]c[08]xg[08]
-- secondary DNS address 213.179.249.152
-- pppd: e[08]c[08]xg[08]

There is ppp in Plan 9. I need something like /dev/ttyACM0.

Audio
-

Served in Linux by snd-hda-intel. I've recompiled kernel
with contribs mason/ac97. Still no /dev/audio

term% cat '#A'
cat: can't open #A: no free devices

Media card
--

From lsusb

Bus 001 Device 004: ID 0bda:0159 Realtek Semiconductor Corp. Digital 
Media Card Reader

I use it to boot. It contain /386/^(mbr pbslba 9load 9pcf)
and plan9.ini as described in prep(8).
But usb/disk doesn't see it 'usb/disk: no device found'

Mobile usb disk
---

Formated by Nokia 6120c phone. Plan 9 founds it

ep6.0 enabled control rw speed full maxpkt 64 pollival 0 samplesz 0 hz 
0 hub 1 port 2 buzy
storage czp 0x500608 vid 0x0421 did 0x002d Nokia 'Nokia 6120 classic' 
uhci
ep6.4 enabled bulk r speed full maxpkt 64 pollival 0 samplesz 0 hz 0 
hub 1 port 2 busy
ep6.1 enabled bulk w speed full maxpkt 64 pollival 0 samplesz 0 hz 0 
hub 1 port 2 busy

And starts usb/disk

term% ls /dev/*u*
/dev/sdU6.0/ctl
/dev/sdU6.0/data
/dev/sdU6.0/raw
term% cat /dev/sdU6.0/ctl
/dev/usb/ep6.0 lun0: inquiry geometry 1990407 512

No partitions. Checked in Linux

# fdisk -l /dev/sdb

Disk /dev/sdb: 1019 MB, 1019215872 bytes
14 heads, 45 sectors/track, 3159 cylinders, total 1990656 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x

   Device Boot  Start End  Blocks   Id  System
/dev/sdb1 249 1990655  995203+   6  FAT16

Put back, no device apperead in /dev/usb/
and phone says 'unable start data transfer mode'.
Back in Linux

# fdisk /dev/sdb

Unable to open /dev/sdb

Ok, it is broken. One problem less.

Writing
---

 If you have neither, you'll have to write the driver yourself.
 ...
 2. Write your own driver.
 I don't think we have WPA support, either, so take that into consideration.

Howto? Is there a tutorial like in FreeBSD handbook
http://www.freebsd.org/doc/en/books/arch-handbook/driverbasics.html ?
How to port driver from FreeBSD or Linux or ...? Which is better source?
How to debug them?




Re: [9fans] `mk` (from Plan9 ports) efficiency related issue

2011-01-18 Thread erik quanstrom
 P.S. anyone know a better way to composite images using the
 plan9/plan9port image tools?

what do you mean by better?  there's a compose program in
contrib quanstro/radar which may compile on p9p just fine.

- erik



Re: [9fans] how to make hardware work?

2011-01-18 Thread erik quanstrom
 And starts usb/disk
 
   term% ls /dev/*u*
   /dev/sdU6.0/ctl
   /dev/sdU6.0/data
   /dev/sdU6.0/raw
   term% cat /dev/sdU6.0/ctl
   /dev/usb/ep6.0 lun0: inquiry geometry 1990407 512
 
 No partitions. Checked in Linux

this one's easy.  unlike the braindamage in linux, plan 9
allows you to partition the drive when and if you wish.
the kernel doesn't have partition table reading software.
you have to partition this disk with

d=/dev/sdU6.0
disk/fdisk -p $d/data$d/ctl
for(i in $d/plan9*)
disk/prep -p $i$d/ctl
this is all distilled into a script diskparts  (sic.).

- erik



Re: [9fans] bad juju in devproc.c

2011-01-18 Thread erik quanstrom
i forgot to attach the recipie for disaster.

sleep 100  
cd /proc/$apid
while()cat text/dev/null

that's about 1000x slower than necessary.  you can speed up the crash
by using the following program.

- erik


#include u.h
#include libc.h

void
main(void)
{
for(;;)
close(open(text, OREAD));
exits();
}



Re: [9fans] mk (from plan9ports) modification time resolution issue?

2011-01-18 Thread Russ Cox
    But the above statement is true unless you have about 367 targets
 (for quite a small project -- only 2 tiny and 1 larger Erlang
 applications), which when built takes about 45 seconds (with
 NPROC=16), and the second time (without touching a single file in the
 source directory) takes about exactly the same amount (still 45
 seconds), the third time goes down to 44 seconds, then 43 seconds,
 then 7 seconds, then 1 second, then 0.6 seconds, then 0.2 seconds,
 then again 0.2 seconds, again 0.2 seconds, again 0.2, again 0.2, again
 0.2, and finally after ONLY 13 builds it finds out that nothing is to
 be made...

sleep 1; mk

Russ



Re: [9fans] how to make hardware work?

2011-01-18 Thread Lyndon Nerenberg (VE6BBM/VE7TFX)
 What exactly do you mean, PPP over USB?
 Google PPP over USB. I've googled, red 9fans archive,
 wiki and docs before posting here.

In theory, your 3G data stick should export a serial device interface,
and therefore usb/serial should map it to /dev/eiaUx/eiaUx (where x is
a small integer).  (See usb(4)).

You would then run, e.g.,  'ip/ppp -p /dev/eiaU0/eiaU0 ...' (see ppp(8)).

--lyndon




[9fans] Fwd: plan9 go output faults on 9vx with rfork

2011-01-18 Thread ron minnich
Pavel built a reproducer and sent it to me:


-- Forwarded message --
From: Pavel Zholkover paulz...@gmail.com
Date: Mon, Jan 17, 2011 at 12:24 PM
Subject: Re: plan9 go output faults on 9vx with rfork
To: ron minnich rminn...@gmail.com


Hi Ron!

I think I've traced the cause of the crash. It is unfortunately the
syscall semacquire.
The following C program will crash vanilla 0.12 9vx and the one I
compiled from your branch:

#include u.h
#include libc.h

static long l=1;

void main(int argc, char *argv[]) {
       int i;

       semacquire(l, 1);

       for(i=0; i  99; i++)
               ;

       semrelease(l, 1);
       exits(nil);
}

---

Got peace and quite and a bulkhead seat to PHX, so had time to look.

The problem was that cmpswap was never set to anything in 9vx, so the
first time canacquire was used, well,
kaboom, since canacquire was NULL.

Changes can be seen here:
https://bitbucket.org/rminnich/vx32/changeset/c7ba21bd847c

My fix is in 9vx/main.c to do this:
cmpswap = oscmpswap;

What's oscmpswap? Well, for darwin, it is defined in 9vx/os/cmpswap.c

You can see the rest of the changes; you can also see that this won't
build on Linux until we fix it; left as an exercise for the reader, or
until I get back home and fix it.

The reproducer no longer crashes 9vx. Now, the question is, what's
next to make Go work on 9vx?

ron



Re: [9fans] ohci funny on sb850

2011-01-18 Thread Ethan Grammatikidis


On 15 Jan 2011, at 9:35 am, lu...@proxima.alt.za wrote:


Its not faulty caps, they just have a limited life,
dried up electrolytic caps is the cause of most
electronics dieing of old age.


In the days before I took up electronics as a hobby, valves were
seated in sockets because it was known that the equipment they were
used in would outlive them.  Maybe we should recommend easily
replaceable capacitors in modern equipment instead of blindly
accepting that a component of extremely low cost should wreck
expensive machinery beyond repair.



Cheap caps don't last, expensive ones do. No-one's going to put cheap  
caps in sockets, it defeats the point of using cheap ones. Cap  
replacement is still possible if you have some skill with a soldering  
iron, or see http://badcaps.net/ . That said, adequate caps are often  
larger than cheap ones.





Re: [9fans] plan9 compatible notebook

2011-01-18 Thread Ethan Grammatikidis


On 16 Jan 2011, at 3:24 pm, hiro wrote:


For real mobility I learned to use whatever the laptop ships with, and
virtual machines.


Aside from having installed Slackware, this is what I'm doing with my  
eee 1005HA. I'm using Ron's 9vx which is looking good and solid,  
although I haven't had had a chance to put it to any heavy use.




Re: [9fans] plan9 compatible notebook

2011-01-18 Thread Akshat Kumar
I've tried Thinkpad models X200s, X201, and X300
with Plan 9. Each of them PXE booted over ethernet
(with the Intel cards) and using the local file server
as root fs. Graphics, input, etc. work very well and
Plan 9 runs very smoothly here. I haven't tried sound
or anything.

I boot into Plan 9 on my Thinkpad (the X200s) only
occasionally, since I have another machine to serve
as a terminal already. So, I haven't had chance to try
everything.

Of course, there is no WiFi - and in my setup, where
the root fs is a Ken FS file server on the local network,
and remote booting is required, I doubt there would be
any use for it either.


Best,
ak

On Sat, Jan 15, 2011 at 2:08 PM, Rudolf Sykora rudolf.syk...@gmail.com wrote:
 Hello,

 can anybody recommend any plan9 compatible notebook?
 I mean with support for say its every hardware part?
 Does such a thing exists? :)

 Thanks
 Ruda





Re: [9fans] ohci funny on sb850

2011-01-18 Thread Akshat Kumar
what's the form factor?

On Sat, Jan 15, 2011 at 6:58 AM, erik quanstrom quans...@quanstro.net wrote:
 On Sat Jan 15 04:25:22 EST 2011, st...@quintile.net wrote:
 Its not faulty caps, they just have a limited life,
 dried up electrolytic caps is the cause of most
 electronics dieing of old age.

 is that lifetime 2 years?

 i have 3 va linux machines here that are still working great
 with no leaky caps.  they are all about 12 years old.

 (by the way, the motherboard + processor + memory
 is free to a good plan 9 home.  you pay shipping.)

 - erik