Re: [9fans] Codebase navigation and using tags files in acme

2021-08-18 Thread Nick Owens
that's a long winded way of saying 'use the plumber'

On Tue, Aug 17, 2021, 23:54 sirjofri  wrote:

> Hello Ben,
>
> 17.08.2021 22:22:09 Ben Hancock :
> > I've just recently started using the acme editor and am really enjoying
> > it, and trying to get the hang of the "acme way" of doing things. One
> > bit of functionality that I'm familiar with from other editors is the
> > ability to easily look up a function or symbol definition within a
> > codebase. In Emacs and vi, this is done by generating tags files (etags
> > or ctags), which those editors can parse and allow you to easily jump
> > to a definition of the symbol under the point/cursor.
>
> The original developers of Plan 9 software were people who made simple
> things even simpler so they can understand them. Imagine your codebase is
> so small that you can know many symbols and have other symbols open or at
> least know where to look. Using g(rep) in the parent directory of your
> project and your brain should be enough. If it isn't your project might
> be too complex/large.
>
> (That's different when reading other code or revisiting code after a long
> time, but then you are supposed to read it again so you can understand it
> anyway.)
>
> > What's the preferred method or workflow for achieving this in acme? I
> > have tried passing a selected symbol to 'g -n' in the window's tag,
> > using the Mouse-2 + Mouse-1 chord. That gets me part of the way there
> > but isn't effective if the file where the symbol is defined happens to
> > be in another directory. I feel like I'm missing something.
> 
> I doubt you are missing something. People used to use text editor since
> there were no IDEs, and keep in mind that the core of unix was written
> with ed, maybe even on teletypes. It's like writing code on paper, and it
> works.
> 
> My advise is, read and produce good clean code. If you need syntax
> highlighting and fancy IDE stuff your codebase is probably too large.
> With more training you can work with larger codebases, but still they to
> keep it simple and small. If you really need to work with extremely
> complex codebases you likely won't find success using plan9 at all.
> 
> Many plan9 tools are one C file only. In acme you can jump between
> selected text by right clicking it, which works very well in these cases.
> Right clicking included files opens them and you can search there. These
> are basically the tools you have.
> 
> I'm personally very happy reading man pages and searching the plan 9
> source with g(rep) and plumbing the results.
> 
> I hope this helps.
> 
> Oh, and you can always write your own tools and call them using
> middle-click in acme. You could write an rc-script that cd..s to your
> project home directory (if it's a git repo, the one containing .git) and
> invokes g, for example.
> 
> sirjofri

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Tf8ceac12df9da674-M8b0bad52403f628bb89eebec
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Installation problem - partdisk loop - sdC0 QEMU QEMU DVD ...

2021-04-03 Thread Nick Owens
try 9front.

On Sat, Apr 3, 2021 at 7:04 PM  wrote:
>
> Hello
>
> I’m trying to install P9 on Qubes OS VM which runs under xen. All Ok until 
> [partdisk]. It present   as default and only option, but also referee it as a 
> CD. If I press enter it runs in an error and loops to (re-)[partdisk]. By the 
> docs in 9p_io and natal under QEMU it refers:
>
> echo 'fsys main sync' >>/srv/fscons
> sleep 5
> echo 'fsys main halt' >>/srv/fscons
>
> but it not solve the problem!
>
> Somebody,  pacient, have some idea how can I  solve this.?
>  My sys: dell 5370, intel kandy lake, Qubes OS 4.0.4 under xen 4.14.
>
> Thank you. I know it is a cross product (vm in Qubes vs Plan 9 in rio or 
> text).
>
> Yours Jose Soares
> 9fans / 9fans / see discussions + participants + delivery options Permalink

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T808fb65ea8cdb920-M1d31201448daf1ce07da76af
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] 9front on qemu with sound?

2020-10-27 Thread Nick Owens
On Tue, Oct 27, 2020, 14:16 Pavel Renev  wrote:

> > Hi, has anyone here made sound work on qemu with 9front as a guest with
> either a linux, windows or bsd host?
>
> I didn't even manage to make sound work on qemu with linux or windows
> as a guest.
>
> I don't have any links on hand, but general discusstions online
> suggest that qemu audio emulation sucks and you should just buy a
> PCI audiocard, put it in your PC and configure PCI pass-through
> instead.
>

that's a rather expensive idea. it works fine here.



--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T3f4bbef90063aae9-M5c2961c1f078cd1bb6f05502
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Re: 9front on qemu with sound?

2020-10-27 Thread Nick Owens
hda should be fixed in
http://code.9front.org/hg/plan9front/rev/0e47f4a0c4d6. could you build
a new kernel and try it? you should see a message like "#A0: codec #0,
vendor 1af40022, rev 00100101" on the console, and #A/audio should be
present and writable.

On Mon, Oct 26, 2020 at 6:57 PM  wrote:
>
> Some suggested I do -device sb16,audiodev=snd0
> However, snd0 does not exist. Neither does any other value I tested (hda, 
> snd1, sound1,sound2,sound3, pa,pa1,pa0, 1,2,3)
> 9fans / 9fans / see discussions + participants + delivery options Permalink

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T3f4bbef90063aae9-M54832d39b529c46fdbc5b31f
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] various problems with installing go lang

2020-10-23 Thread Nick Owens
it probably doesn't work with newer go as it isn't well maintained. there
is no replacement for real git right now.

a contribution to git9 to do this would be welcome.

On Fri, Oct 23, 2020, 22:33  wrote:

> Since having the git rc script in either /bin/amd64, $home/bin or
> $home/bin/rc didnt work
> i just had it put it in the same directory that i was running go get from
> it results in this ...
>
> term% go get github.com/henesy/disco
> # cd .; git clone -- https://github.com/henesy/disco /usr/glenda/go/src/
> github.com/henesy/disco
> rc: git:2: syntax error
> package github.com/henesy/disco: exit status: 'git 569: syntax error'
>
> Do I have the wrong git? I compared this rc git wrapper to the one found
> on 9legacy and it looks the same.
>
>
> *9fans * / 9fans / see discussions
>  + participants
>  + delivery options
>  Permalink
> 
>

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T80ee3327f2f3dc57-Ma8317a78d8ec02281fa027bb
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] various problems with installing go lang

2020-10-23 Thread Nick Owens
9front nor go come with a CA certificate bundle. a certificate bundle that
go can use can be downloaded at https://curl.haxx.se/docs/caextract.html.

On Fri, Oct 23, 2020, 21:16  wrote:

> Hi, for the past few days I have been wrestling with getting go lang to
> work on 9front (latest version)
> I have been referencing these guidelines:
> http://docs.9front.org/building-go
>
> here is a brief paste detailing what I did:
> https://dpaste.com/6D26TWPXA.txt
>
> go seems to run, go env and go version return their expected results. the
> problems come from actually trying to fetch things
>
> go get github.com/bwmarrin/discordgo
> go: golang.org/x/crypto@v0.0.0-20200622213623-75b288015ac9: Get 
> "https://proxy.golang.org/golang.org/x/crypto/@v/v0.0.0-20200622213623-75b288015ac9.mod":
>  x509: failed to load system roots and no roots provided; open 
> /sys/lib/tls/ca.pem: '/sys/lib/tls/ca.pem' does not exist
>
>
> Seems to be a tls issue?  There was supposedly a thread on the issue but
> it is gone and not in any archives that I know of...
> http://comments.gmane.org/gmane.os.plan9.general/74781 being the dead link
>
> *9fans * / 9fans / see discussions
>  + participants
>  + delivery options
>  Permalink
> 
>

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T80ee3327f2f3dc57-M166b9969a86e9fe89d6e67f9
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] 9term, insta scroll to bottom?

2020-10-23 Thread Nick Owens
try ^b.

On Fri, Oct 23, 2020, 18:02  wrote:

> Hi, I am an idiot and sometimes I cat huge files in 9term (on 9front)
>
> The result of this is a mess I cannot seem to scroll to the bottom of,
> how can I instantly scroll to the bottom in 9term?
>
> Or rather, the end of the output.
> *9fans * / 9fans / see discussions
>  + participants
>  + delivery options
>  Permalink
> 
>

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T13b7a14fa28da183-M6a25ae619244e5fa8b19bb80
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Is the vanilla Plan 9 still alive?

2019-11-21 Thread Nick Owens
no.

On Thu, Nov 21, 2019, 22:30  wrote:

> The site hasn't been updated since 2014-2015. If it's dead, is there any
> chance of it coming back into development?
> *9fans * / 9fans / see discussions
>  + participants
>  + delivery options
>  Permalink
> 
>

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Tb6b3aefeebeb526d-M661431ca1687ecad99b4d9bd
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] The lost (9front) boot menus ...

2019-04-19 Thread Nick Owens
there's always the GRand Unified Bootloader.

On Fri, Apr 19, 2019 at 3:16 PM Lyndon Nerenberg  wrote:
>
> Something I miss in 9front is the 'boot menu' functionality 9labs
> had in plan9.ini.  Being able to fall back to an alternative config
> was a godsend when debugging fileserver setups.  I'm curious why
> that was removed from the 9front bootstrap code.
>
> --lyndon
>



Re: [9fans] plan 9 : any pager?

2018-10-02 Thread Nick Owens
the pager is p(1).
On Tue, Oct 2, 2018 at 8:22 PM Skip Tavakkolian
 wrote:
>
> Turn off the scroll in the rio window that the shell is running in, then cat 
> the file.
>
>
> On Tue, Oct 2, 2018, 8:15 PM Mayuresh Kathe  wrote:
>>
>> did plan 9 have any pager? or did every text file to be read had to be
>> opened in acme or a similar tool?
>>
>> btw, is there any pager under plan9port? didn't know what to search for,
>> hence couldn't find any.
>>
>> thanks,
>>
>> ~mayuresh
>>
>>



Re: [9fans] Git

2018-09-15 Thread Nick Owens
hi dave,

would it be possible for you to vendor your dependencies of dgit? if
not for the git repo itself, perhaps just vendor them for a tagged
release tarball uploaded to github. that would be a way around the
'you need git to go get dgit' problem.
On Sat, Sep 15, 2018 at 9:03 AM Dave MacFarlane  wrote:
>
> I've been trying to do more development of dgit under 9front instead of 
> DragonFly so that it'll force me to catch/fix any major bugs missed by the 
> test suite. I fixed one significant performance problem and now it seems to 
> mostly be useable for basic git usage under Plan 9 (or at least 9front) and 
> pushing to GitHub. I also added factotum support (at least for the password, 
> it still prompts for the username..)
>
> I wrote up some instructions for how to set it up (and use it instead of the 
> rc script for go) at http://driusan.github.io/plan9/git.md
>
> - Dave
>



Re: [9fans] 9front VMX

2018-09-10 Thread Nick Owens
while we're on the subject, here's a half-assed script called
'inception' to boot your 9front kernel in a vmx instance on a terminal
while sharing the host's fs.

#!/bin/rc
# inception

rfork ne

ramfs

ip=`{ndb/query sys $sysname ip}

aux/listen1 -t 'tcp!*!564' /bin/exportfs -r /root &

cat >/tmp/plan9.ini << EOF
user=$user
fs=$ip
auth=$ip
mouseport=ps2
nobootprompt=tcp

EOF

vmx -v 800x600 -n ether0 -m /tmp/plan9.ini /amd64/9pc64
On Mon, Sep 10, 2018 at 11:05 AM Kurt H Maier  wrote:
>
> On Mon, Sep 10, 2018 at 06:57:29PM +0100, Steve Simon wrote:
> > is there any graphics support? would it be usable to run a browser? dillo 
> > talking to a framebuffer maybe?
> >
> > ever hopefull of getting modern browser support in plan9...
> >
> > -Steve
>
>
> This is documented in the linked fqa section.
>
> http://fqa.9front.org/openbsdvmweb.png
>
> Note:  when sl said performance is terrible, this is what he was talking
> about.
>
> khm
>



Re: [9fans] Why is the tcp/ip stack of plan9 implemented in kernel?

2018-01-27 Thread Nick Owens
it used to be in userspace, but i believe it was moved to the kernel
for performance reasons.

the remaining evidence of the ip stack in the kernel lives on in (at
least) 9front's sysproc.c, where sysexec raises the process priority
if the program is "/ip", which i assume would be the tcp/ip stack
binary embedded in the kernel image's devroot (not the paqfs):

/*
*  '/' processes are higher priority (hack to make /ip more responsive).
*/
if(devtab[tc->type]->dc == L'/')
up->basepri = PriRoot;

On Sat, Jan 27, 2018 at 1:45 AM, Steve Simon  wrote:
> in early versions of plan9 the tcp/ip stack in Streams, inherited (I assume) 
> from V10.
>
> This turned out not to be as clean nor as efficent as hoped and this was 
> dropped
> for a more traditional implementation in later releases. Maybe the bad 
> experiences
> of poor performance informed the decision for an in-kernel implementation?
>
> -Steve
>



Re: [9fans] Discord community for Plan 9

2017-07-21 Thread Nick Owens
is there a client for plan 9? /s

do your uni mates a favor and teach them how to use IRC, and save them a
few hundred megabytes of memory.

#cat-v is alive and well.


On Jul 21, 2017 17:31, "Sean Hinchee"  wrote:

All,

I'm not sure where the niche falls in place for this, if there is none
fine, but as someone presently attending uni I've noticed a trend that no
one my age bothers with IRC.

I want to do what I can to increase the surface area for those interested
to get access to the Plan 9 community, so I made a server at:
https://discord.gg/6daut5T

I'm not sure if this is a service used by anyone on this list, but if there
is anyone you're welcome to join the small number of us there.

My apologies to anyone who's offended by the concept of this service.
Feedback would be appreciated.

Cheers,
Sean


Re: [9fans] Irc segmentation fault

2017-06-29 Thread Nick Owens
you probably need to use gcc -O0 -g for that. but it looks like the problem
is in dameonize.c:38. lowering optimization might help since there might be
inlined functions.. haven't really looked at Irc.

On Jun 29, 2017 02:24, "Rudolf Sykora" <rudolf.syk...@gmail.com> wrote:

On 29 June 2017 at 09:39, Nick Owens <misch...@offblast.org> wrote:
> acid is next to impossible to use on unix systems. just run gdb with
'thread
> apply all bt'.. should give you an idea of what's wrong.

If I run Irc in gdb, I get

(gdb) run irc.freenode.org
Starting program: /usr/local/plan9port/bin/Irc irc.freenode.org
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x7749bedf in raise () from /lib64/libpthread.so.0
(gdb) where
#0  0x7749bedf in raise () from /lib64/libpthread.so.0
#1  0x0040df34 in child () at daemonize.c:38
#2  0x0040e18e in _threadsetupdaemonize () at daemonize.c:153
#3  0x0040de3d in p9main (argc=2, argv=0x7fffdcb8) at
thread.c:721
#4  0x00402ae9 in main (argc=, argv=)
at main.c:10

which I really don't understand...
How could argc, argv be 'optimized out'?

Thanks for any comments!
Ruda


Re: [9fans] Irc segmentation fault

2017-06-29 Thread Nick Owens
acid is next to impossible to use on unix systems. just run gdb with
'thread apply all bt'.. should give you an idea of what's wrong.

On Jun 29, 2017 00:33, "Rudolf Sykora"  wrote:

> > $ Irc irc.freenode.org
> > Segmentation fault
>
> Do I have to use acid to debug it, or is it possible to use the usual
> unix gdb to debug this on p9p?
>
> Thanks
> Ruda
>
>


Re: [9fans] equality sign in Rc

2017-05-06 Thread Nick Owens
why do that when you can just run 'mk'

On May 6, 2017 12:47 AM, "Sean Callanan"  wrote:

> I can't speak for dexen, but I would love to be able to run
>
> cc -DFOO=bar file.c
>
> or similar commands with button 2 in Acme.  What I get instead is
>
> rc: line 2: token '=': syntax error
>
> Sean
>
> iPadから送信
>
> 2017/05/05 18:53、t...@teknik.io のメッセージ:
>
> > May 1, 2017 2:30 PM, "dexen deVries"  wrote:
> >
> >> does anybody have a version of Rc that allows unquoted equality sign?
> >>
> >> having to quote the character get a bit annoying on POSIX systems
> (plan9port)
> >
> > I don't, but can you explain in detail what you are doing that causes an
> issue?
> >
> >
>
>


Re: [9fans] Two faces(1) derivatives

2015-11-21 Thread Nick Owens
i wrote a quick hack of faces to show gravatar images, but i doubt it
has much usefulness given the apparent lack of gravatar use in the
9fan world.

On Sat, Nov 21, 2015 at 10:38 AM,   wrote:
> I really like faces(1). I've got a pair of derivatives I've been
> playing around with. The first, cleverly called nfaces, overlays
> the user, rather than the domain, on unknown senders (I have
> good coverage of the domains I exchange mail with even
> semi-frequently), and doesn't print anything below the icons.
> This allows for a shorter display, and I generally have it running
> across the top of my screen. The second, inbox, displays a
> single column of faces, with sender, date, and subject off to the
> right (it also eliminates faces' -h option and assumes -i). My
> startup script has this on the left side, ~450px wide, with acme
> covering all but the left 100 or so. Both have minor cosmetic
> differences.
>
> Both of these are based on Erik's faces derivative, so they
> pick up his middle button delete, although I end up using that
> very rarely. I'm likely to remove it from nfaces to further
> shrink the display, and replace it with a menu in inbox which
> will allow more actions on the message (like more easily
> sticking them in other folders, my most frequent frustration
> with mail on Plan 9).
>
> Inbox has some minor display bugs I haven't gotten around
> to tracking down. It also has a man page.
>
> The screenshot attached shows both. You can get them at
> /n/sources/contrib/anothy/src/cmd/(nfaces inbox) if you're
> interested. I also have most of my faces additions online, as
> described on the wiki:
> http://www.plan9.bell-labs.com/wiki/plan9/adding_your_face/index.html
> Submissions (code and faces) welcome.
>
> Anthony
>
> [The wiki went down again as I was typing this. If you want my
> faces database, you can do this:
> cd /lib/face && con -l tcp!9srv.net!50001 | gunzip | tar -x
> It'll create a README file and 'people' and 'domains' directories,
> but won't touch any of the stock files.]



Re: [9fans] Frogs?

2015-10-05 Thread Nick Owens
http://code.9front.org/hg/plan9front/file/tip/sys/src/9/port/chan.c?style=gitweb#l1637

On Mon, Oct 5, 2015 at 9:42 AM, Kare Nuorteva  wrote:
>
>
> Hello,
>
> I've bumped into frogs a few times while lurking on this list, but cannot 
> make much sense out of it. Could someone please explain what is a frog in a 
> filename?
>
> Cheers,
> Kare
>
>
>
>



Re: [9fans] off topic - a good Git reference

2015-10-02 Thread Nick Owens
9front now supports tls 1.2 in libsec/devtls. Mercurial can make use of it
through webfs.
On Oct 2, 2015 7:35 PM, "erik quanstrom"  wrote:

> On Fri Oct  2 18:46:06 PDT 2015, k...@sciops.net wrote:
> > On Fri, Oct 02, 2015 at 11:56:47PM +0200, a.regenf...@gmx.de wrote:
> > > >Mercurial works.
> > > If you have got an installed python.
> >
> > that's pretty much universally the case for mercurial, yes.
>
> well, there are some problems with ssl.
>
> - erik
>
>


Re: [9fans] pthreads

2015-09-01 Thread Nick Owens
https://bitbucket.org/mveety/9front-ports/src/9de20d22612a/ape-libs/pth/?at=default

i have no idea if it works. ymmv.

On Tue, Sep 1, 2015 at 12:20 PM, Giacomo Tesio  wrote:
> 2008-12-16 23:16 GMT+01:00 Steve Simon :
>>
>> I have a distant memory that somone implemented some of POSIX pthreads
>> on plan9, i.e. I want to compile programs that use pthreads under APE.
>>
>> anyone got any pointers?
>
>
> Hi Steve, did you find anything (even incomplete) back then?
>
>
> Giacomo



Re: [9fans] Small Plan 9 Platforms

2015-08-07 Thread Nick Owens
brian,

i have started work on porting 9front to
http://www.elinux.org/MIPS_Creator_CI20.

this board has quite a number of features, and might be useful for
education if the cost isn't prohibitive.

nick

On Fri, Aug 7, 2015 at 6:09 PM, Brian L. Stuart blstu...@bellsouth.net wrote:
 I'm teaching a special topics course this fall I'm
 calling Computing in the Small.  Right now, I'm
 leaning toward conducting it on a platform that
 runs Plan 9.  I'm looking for something based on
 ARM or MIPS and that has some useful connection
 to the external world in the form of GPIOs.  SPI,
 I2C, and analog I/O would be nice to have too.
 Obviously, the Raspberry Pi is a candidate.  What
 are some others?  I've seen some code in the
 source tree for the BBB.  Has anyone tried it out
 to see what is and isn't there?  How about the
 Banana Pi?  The SATA port on it is quite appealing.
 Some of the other options I've been looking at
 include the VIA APC Rock and Paper, the Phytec
 Cosmic, the CubieBoard, the Odroid, the Riotboard,
 and the Wandboard.  Has anyone done anything
 on porting Plan 9 to any of them?  Are there others
 I'm missing that would be good targets for such a class?

 Thanks in advance,
 BLS






Re: [9fans] Strange VGA thing

2014-08-01 Thread Nick Owens
On Sat, Aug 02, 2014 at 08:48:34AM +0900, kokam...@hera.eonet.ne.jp wrote:
 A68N-5000 motherboard which I'm using it for vesa mode of1400x1050x16 size.
 However, there is /dev/realmodemem, but no /dev/realmode.

realmodemem file is provided by the '#P' kernel device.
realmode file is provided by aux/realemu.

in /rc/bin/termrc, aux/realemu is run if $monitor is vesa. strange that
it does not.

maybe realemu had an error. you can try to run it by hand on the
console. there are debugging options you can provide to it.

 PS. 
 9front-ow...@ttr.inri.net is working?

http://9front.org/lists.html



pgpneRfcqhSm_.pgp
Description: PGP signature


[9fans] interleaved output of ratrace

2014-07-21 Thread Nick Owens
hello,

i'm trying to use ratrace to debug a go binary.
what i don't understand is why records of syscalls sometimes appear on
top of one another.

here's the output of 'ratrace -c ./strings.test [2]/tmp/ratrace.log',
where strings.test is made with 'go test -c strings'.

http://sprunge.us/aCBG

you can see in several places that more than one syscall record is
printed on the same line.

i find this quite odd since in /sys/src/cmd/ratrace.c:/^writer all
output comes from a channel.

i'm running this on 9front/amd64, but i'd appreciate if anyone can test
on other systems.



pgpGVESQjld0m.pgp
Description: PGP signature


[9fans] random question

2014-07-03 Thread Nick Owens
why does /sys/src/9/port/random.c:/^randomclock use rb.next to only run
1/4th of the time it normally would?



pgplLd2oYhojt.pgp
Description: PGP signature


Re: [9fans] 2014 hardware overview

2014-06-29 Thread Nick Owens
On Sun, Jun 29, 2014 at 11:32:44AM +0200, Pierre-Jean wrote:
 4) Obvious hardware
 
 More generally, what do you think is the actual obvious
 hardware that one can find to build a file server and a cpu
 server for home usage ?

the obvious hardware is a thinkpad. hello from 9front on an X301.



pgpJLoBPnEitE.pgp
Description: PGP signature


Re: [9fans] [GSOC] port forwarding

2014-06-12 Thread Nick Owens
yan,

you need to set up some kind of bridge. there's a few options. in my
setup, i use libvirt. with libvirt, i configured one vm with two NICs,
one for the 'internet' and one for a private network between my
cpu/auth/fs and a pxe booted vm for testing. i put ether0 on /net
(private lan) and ether1 on /net.alt. in this way, i can pxe boot a vm
from the first one, and it has internet access by importing /net.alt.

in this way, i can change code, recompile on vm 1, and then boot vm 2
over pxe to test, so i don't lose any state in vm 1 through reboots or
crashes.

http://www.linux-kvm.org/page/Networking describes various ways to
configure networking in kvm.
libvirt removes some of the manual work here required for configuring
the bridges and interfaces of the vms.

it's not very coherent but http://9.offblast.org/9front/guide/PXE_boot
talks a little bit about my setup, except in the doc i say that i used
/net for the NAT side and /net.alt for the private side. now i use the
opposite.

good luck.

On Thu, Jun 12, 2014 at 12:52:33AM -0400, yan cui wrote:
 Hi all,
 
 I run into a situation that may need to setup the port forwarding rule,
 but not quite sure. Hope you guys can provide some suggestions. Thanks in
 advance!
 
 Basically, I have a virtual machine (KVM) working as plan9's fs+auth
 server.
 The auth+fs server listens the port 564 and uses NAT (network address
 translation) to connect to the Internet.
 
 The virtual machine runs on a Linux box. On the same Linux machine,
 I use qemu to execute an enhanced plan9 cpu server (with new features
 included). The qemu instance needs to boot from the auth+fs server.
 My question is, to make the boot successful, do I need to set any port
 forwarding rules? If so, how to do that?
 
 
 -- 
 Think big; Dream impossible; Make it happen.


pgpxSwOwEovyX.pgp
Description: PGP signature


[9fans] Semaphores in Plan 9

2014-06-11 Thread Nick Owens
in Semaphores in Plan 9 [1] a test is described comparing
semaphore-based locks to tas-based spinlocks. the paper says they ran
doug's power series program using the different lock types in
libthread for channels. i was trying to reproduce the results in the
test, and my naive attemps don't fare well for semaphores.

so, is the test code available anywhere? or has anyone written a
comparable benchmark which favors semaphore-based locks?

[1] http://doc.cat-v.org/plan_9/IWP9/2008/semaphores.pdf



pgpdFDOEoAIqe.pgp
Description: PGP signature


Re: [9fans] Plan 9 image for Google Compute Engine?

2014-06-09 Thread Nick Owens
hello, mischief here.

it is 'in the works'. there's some bugs to be squashed.

i'm using the legacy virtio interface. it doesn't perform very great
right now, usually slower than igbe, but that may not matter if you
can't get igbe at all. it also seems to crash on old (meaning, 1.0)
qemu. i've been testing on 1.7.0 and 2.0.0.

i am writing the driver on 9front, but a while ago i ran it on lab's
kernel. it seemed to work OK then.

On Mon, Jun 09, 2014 at 01:18:44PM -0700, Skip Tavakkolian wrote:
 Cool! is there a virtio ethernet driver in the works for 9front?
 
 anyone know what flavor is mischief's version?
 
 -Skip
 
 
 On Fri, Jun 6, 2014 at 5:16 PM, cinap_len...@felloff.net wrote:
 
  DONE, now beer.
 
 
  http://code.google.com/p/plan9front/source/detail?r=2f51489d42116c85159dc1649ab82cec9a766542
 
  -- cinap
 
 


pgplvx0hqOijm.pgp
Description: PGP signature


[9fans] 8l -e

2014-05-27 Thread Nick Owens
i was trying to use 8l's '-e' flag today, when i found some
interesting problems.

first, -e doesn't do what it says unless you pass -p, which goes
unmentioned in the manual page. (luckily i read the source).

second, and more importantly, the calls to _tracein/_traceout are
skipped, as in the following disassembly, but i can't determine why. is
there some tool (besides noping with acid) meant to be used to 'turn on'
the tracing calls?

third, when you use -e with -p, prof.$pid files are generated as with
-p, but the prof files are empty. this seems unintentional.

this example is using rc.

; 8l -p -e -o 8.out code.8 exec.8 getflags.8 glob.8 here.8 io.8 lex.8
pcmd.8 pfnc.8 simple.8 subr.8 trap.8 tree.8 var.8 havefork.8 plan9.8
y.tab.8
; acid 8.out
8.out:386 plan 9 executable
/sys/lib/acid/port
/sys/lib/acid/386
acid: asm(setvar)
setvar 0xadbb   JMP setvar+0x7(SB)
setvar+0x2 0xadbd   CALL_tracein(SB)
setvar+0x7 0xadc2   SUBL$0x10,SP
setvar+0xa 0xadc5   MOVLname+0x0(FP),CX
setvar+0xe 0xadc9   MOVLCX,0x0(SP)
setvar+0x11 0xadcc  CALLvlook(SB)
setvar+0x16 0xadd1  MOVLAX,v+0xc(SP)
setvar+0x1a 0xadd5  MOVL0x4(AX),AX
setvar+0x1d 0xadd8  MOVLAX,0x0(SP)
setvar+0x20 0xaddb  CALLfreewords(SB)
setvar+0x25 0xade0  MOVLv+0xc(SP),DX
setvar+0x29 0xade4  MOVLval+0x4(FP),CX
setvar+0x2d 0xade8  MOVLCX,0x4(DX)
setvar+0x30 0xadeb  MOVL$0x1,0x8(DX)
setvar+0x37 0xadf2  ADDL$0x10,SP
setvar+0x3a 0xadf5  RET
setvar+0x3b 0xadf6  CALL_traceout(SB)
setvar+0x40 0xadfb  RET
Xasync 0xadfc   JMP Xasync+0x7(SB)
acid: 

you can see there is a JMP over _tracein and a RET before _traceout.
what gives?



pgpKVkRxWkLd9.pgp
Description: PGP signature


Re: [9fans] 8l -e

2014-05-27 Thread Nick Owens
On Tue, May 27, 2014 at 04:16:24PM -0400, erik quanstrom wrote:
  you can see there is a JMP over _tracein and a RET before _traceout.
  what gives?
 
 ah, that's the magic!  the idea is to be able to enable and disable these 
 tracepoints
 at runtime in a multiprocessor environment without any locking.
 
 - erik
 

ok. i'm beginning to understand better. is there a specific use case,
such as the kernel or userland?

i didn't see anything like a tool that could poke nops into the right
places. i started to write an acid function to put the nops in one
 named function, and then i realized that the ret can appear several
 times in one function and i would need to search for and patch them
 out. but only the *first* ret, not second, e.g.:

 setvar+0x3a 0xadf5 RET --- should be NOP
 setvar+0x3b 0xadf6 CALL_traceout(SB)
 setvar+0x40 0xadfb RET --- should not be NOP

 i was able to patch the JMP, and the RET but only in the case where it
 appears at the bottom of a function.

defn traceon(fn){
bound = fnbound(fn);

// nop first jmp
*(bound[0]) = 0x90\b;
*(bound[0]+1) = 0x90\b;

// and the ret
// XXX should search for ret
*(bound[1]-7) = 0x90\b;
}


maybe these were not the droids i was looking for.
my real goal is to make timing statistics for function calls in a program.
perhaps this goal is better fulfilled simply by prof!



pgpqkthbklevj.pgp
Description: PGP signature


Re: [9fans] [GSOC] Dial between two computers

2014-05-26 Thread Nick Owens
yan,

did you try to use packet capture software like wireshark, or snoopy(8)
on plan 9, to see the packets?

running wireshark on linux, and snoopy on plan 9, will give you insight
into if the packets reach the other side successfully.

On Mon, May 26, 2014 at 08:06:21PM -0400, yan cui wrote:
 Hi all,
 
 I used a program to dial from one system to another system, but
 it gives a connection time out error. I have searched on Internet for a
 long time and cannot get a solution. Could you please provide some
 suggestions or hints? Basically, one system is Linux based system with rc
 shell installed (we call it A). The other one is a auth+cpu+file server
 (we call it B). On B, I have used fossil/conf command to listen tcp!*!564.
 On A, I executed dial tcp!B's ip address!564, but it reports a time out
 error after waiting some time. Results are the same when A is a plan9
 terminal. By the way, I can ping A to B successfully.  What could be the
 possible problems?
 
 
 Thanks, Yan
 
 -- 
 Think big; Dream impossible; Make it happen.


pgp1fkBtJ_90Z.pgp
Description: PGP signature


Re: [9fans] dual boot

2014-05-24 Thread Nick Owens
On Sat, May 24, 2014 at 05:03:07PM +0530, Ramakrishnan Muthukrishnan wrote:
 On Sat, May 24, 2014 at 12:17 PM, Ramakrishnan Muthukrishnan
 vu3...@gmail.com wrote:
  On Sat, May 24, 2014 at 12:13 PM, Ramakrishnan Muthukrishnan
  vu3...@gmail.com wrote:
  I downloaded the usbinstamd64 image from the 9atom webpage and booted
  it up. First, I tried amd64 (selection 0), in a second or so, some
  text went past the screen quickly and the machine rebooted. I then
  tried selection 1 (386pae), that booted up but quickly halted with
  this:
 
  Plan 9
  E820: 
  ...
  apic: 6 machs started; flat mode vectors
  winbont .ff hw fff8
no capabilities
  panic: kernel fault: no user process pc=f0162415 addr=0x00a8
  panic: kernel fault: no user process pc=f0162415 addr=0x00a8
  dumpstack disabled
  cpu0: exiting
  cpu0: spurious interrupt 39, last 0
 
  and it hangs there.
 
  The mother board is ASUS M4A89GTD PRO/USB3.
 
  http://www.asus.com/Motherboards/M4A89GTD_PROUSB3/
 
 Also for the record, I also tried the Labs plan9 usb image. That
 didn't go past a few initial prints either. I didn't note them down
 but it was different from the ones reported above with 9atom and
 failed much earlier.
 
 -- 
   Ramakrishnan
 

it appears this motherboard is using usb 3 aka xhci. i don't know for
certain but i don't think any plan 9 (fork or not-a-fork) has xhci
support. looking through the archive, there was talk of xhci about a
year ago.

try disabling usb 3.0 in the bios setting and see if it makes progress
when booting from usb.



pgpxPiosSxSPQ.pgp
Description: PGP signature


Re: [9fans] Namespace customization

2014-04-23 Thread Nick Owens
in my cpu server in a vm, i put the nic setup in /cfg/$sysname/cpustart
and put the namespace setup in /lib/namespace.$sysname.

/cfg/chi/cpustart:

#!/bin/rc
#
# cpustart

## internal services
auth/secstored
ip/dhcpd
ip/tftpd

## external network (qemu nat)
bind -a '#l1' /net.alt
bind -a '#I1' /net.alt
ip/ipconfig -x /net.alt ether /net.alt/ether1
ndb/cs -x /net.alt
ndb/dns -Rrx /net.alt

aux/listen -q -t /rc/bin/service.auth -d /rc/bin/service /net.alt/tcp


and then /lib/namespace.chi:

bind -b '#l1' /net.alt
bind -b '#I1' /net.alt
mount -a /srv/cs_net.alt /net.alt
mount -a /srv/dns_net.alt /net.alt


from there i just import /net.alt from a second pxe booted machine if i
want to access the real 'net.
i hope this helps.

On Wed, Apr 23, 2014 at 01:17:59PM +, Carlos Sánchez de La Lama wrote:
 I found the answer just after posting :S
 
  Is there a way to have $sysname available at that point?
 
 Setting sysname in plan9.ini (or in this case in pxe/macaddr as I am
 netbooting) does the trick :)
 
 Carlos
 
 


pgpqnBuIZoJIw.pgp
Description: PGP signature


Re: [9fans] nil, and the danger of zero

2014-04-03 Thread Nick Owens
On Fri, Apr 04, 2014 at 01:35:05AM -0400, erik quanstrom wrote:
 so, as it turns out, not all zeros do the same thing to the stack.  
 pt.
 at least it's a simple reason why venti won't run.
 

(void *)0 is certainly not the same as 0.
depending on architecture and compiler, of course.



pgp0wEoll6_w0.pgp
Description: PGP signature


[9fans] time waster

2014-03-30 Thread Nick Owens
9fans,

i wrote a clone of the '2048' game in plan 9 c.
http://9.offblast.org/stuff/2048.c

8c -FTVw 2048.c; 8l -o 2048 2048.8

it can also be run in plan9port (amd64 linux here):

9c 2048.c; 9l -o 2048 2048.o

some of the credit goes to aap, whose version is here.
http://plan9.papnet.eu/misc/2049.c



pgpKNSrgjBWVe.pgp
Description: PGP signature


[9fans] a research unix reader

2014-03-30 Thread Nick Owens
9fans,

a few months ago, at a friends request, i acquired a copy of a research
unix reader and scanned it, and i put it on archive.org.

the pdf and some other formats are available, but the conversion is not
very good, so the pdf is the best bet.
https://archive.org/details/a_research_unix_reader

perhaps it will give curious minds a little insight into from whence
plan 9 was begat.



pgpXUIWH0gJ3h.pgp
Description: PGP signature


Re: [9fans] a research unix reader

2014-03-30 Thread Nick Owens
On Sun, Mar 30, 2014 at 01:26:05PM -0700, Bakul Shah wrote:
 
 http://doc.cat-v.org/unix/unix-reader/
 

yes. the maintainer of cat-v.org was the 'friend' who requested the
document. :-)



pgpevj1eTXFup.pgp
Description: PGP signature


Re: [9fans] Multi monitor setup

2014-03-20 Thread Nick Owens
 is there any support to dual monitor setup?

no.

 Can I rotate monitor in plan 9?

no.

 How does support of video cards looks like in general?

poor.

see /sys/src/9/pc/vga*.c files. most of these are very old. the only
realiable way to use a video card on 32- and 64-bit intel platforms is
to use VESA.

mischief



pgprK9HML1q1d.pgp
Description: PGP signature


Re: [9fans] Bell usb keys boot fails

2014-03-02 Thread Nick Owens
On Sun, Mar 02, 2014 at 06:19:57PM +0100, Adriano Verardo wrote:
 Hi, all
 
 The Bell usb image doesn't boot on some (IMHO) very common machines.
 Screenshots available on
 

you could just try adding the did to /sys/src/9/pc/sdiahci.c:1939 and
recompile a new kernel.

maybe it will work, maybe it wont. only the people with the hardware can
test it.

also, it looks like that chipset might be affected by the intel cougar
point bug.



pgpvoYKcZIfK0.pgp
Description: PGP signature


Re: [9fans] Changing the active NIC on 9front

2014-02-17 Thread Nick Owens
if it was a snake, it would have bit you.

http://code.google.com/p/plan9front/wiki/KnownWorkingHardware#Lucent_WaveLAN_PC24E-H-FC



pgppOSeAkzsvV.pgp
Description: PGP signature


Re: [9fans] Installl fails on Dell Optiplex 745 / 3010

2014-02-08 Thread Nick Owens
you could try 9front.

On Sat, Feb 08, 2014 at 10:13:20PM +0100, Adriano Verardo wrote:
 Hi all
 Both Bell and 9Atom distros install fail, in native mode, on Dell
 Optiplex models 745 (2008) and 3010 (2013).
 IMHO, the problem is the AHCI, which is not correcty
 recognised/managed in both native and SATA mode.
 
 Any suggestion ?
 
 Thanks in advance
 
 adriano
 


pgpuhVqFlR5dw.pgp
Description: PGP signature


Re: [9fans] acid analogues of gdb stepping commands

2013-11-08 Thread Nick Owens
On Fri, Nov 08, 2013 at 02:03:59AM -0800, Skip Tavakkolian wrote:
 something like this, but with better housekeeping to work with existing
 acid code, could work:
 
 defn Next() {
 printto(/env/nextStmt, pcfile(*PC),:,pcline(*PC)+1);
 bpset(filepc(readfile(/env/nextStmt)));
 cont();
 }

this seems like it should work, but sometimes the computed PC for the
next line is way off, and cont() just runs the entire program. even more
confusing, doing pcline of the computed pc prints the next line
correctly, e.g.

x = filepc(pcfile(*PC)+:+itoa(pcline(*PC)+1));
print(pcline(x));

will show the next line, but the new PC in x is totally wrong.

any clue why?

nick



pgpe2SlNX6tTr.pgp
Description: PGP signature


[9fans] acid analogues of gdb stepping commands

2013-11-07 Thread Nick Owens
9fans,

i find myself needing to use acid a lot lately, and maybe i am going
about it wrong. i very much dislike that when i next() in acid, acid
will step through every subcall. what i would like is that it would
instead behave more like gdb's next. is this crazy or am i going about
using acid wrong?

maybe someone has acid analogues of gdb's next, finish, until as
described here.

https://sourceware.org/gdb/onlinedocs/gdb/Continuing-and-Stepping.html

nick



pgpKerKA4Zfpb.pgp
Description: PGP signature


Re: [9fans] semaphore testing help

2013-09-24 Thread Nick Owens
is there source code available for these tests?



pgpNKHuRDLEXy.pgp
Description: PGP signature


Re: [9fans] Help me getting started with plan9?

2013-09-24 Thread Nick Owens
On Wed, Sep 25, 2013 at 06:51:04AM +0500, Salman Javaid wrote:
 
 qemu-system-i386: pci_add_option_rom: failed to find romfile
 pxe-rtl8139.rom

you may need the 'kvm-ipxe' package.

http://packages.ubuntu.com/search?searchon=contentskeywords=pxe-rtl8139.rommode=suite=precisearch=any



pgpxFFk4COJt1.pgp
Description: PGP signature


Re: [9fans] html5 canvas, go, devdraw

2013-09-07 Thread Nick Owens
On Sat, Sep 07, 2013 at 05:48:18PM +0200, Francisco J Ballesteros wrote:
there has been some work on this here. unfortunately not all devdraw
messages are implemented, so graphics does not fully work.

https://github.com/aiju/jsdrawterm

i run a copy on http://9.offblast.org/

nick

 Hi,
 
 I'm playing a bit with the html5 canvas, js,  and go servers, and I'm
 thinking it would be quite easy to build a devdraw server (an omero like
 server would be even easier) so that you only have to run your go program
 and it would open a browser as your devdraw device.
 
 Just wondering, anyone playing with such a beast?
 
 cheers
 
 



Re: [9fans] Building Go/386

2013-09-02 Thread Nick Owens
hello 9fans and gophers,

i have been using go on 9front for a while now. however, an issue
with 8c's inclusion mechanism was recently introduced.

the commit was https://codereview.appspot.com/12568043 which assumes
that includes will be resolved relative to the file that included them,
not the wd of the compiler. you can see in the comments a bit of the
discussion. http://9.offblast.org/stuff/cfc3eab6195a shows this problem
more explicitly. d881cb1ffc14 is the most recent commit that i use now.

do you fellows have any idea how to resolve this? is this go or plan 9's
'fault'?

nick




Re: [9fans] Building Go/386

2013-09-02 Thread Nick Owens
On Mon, Sep 02, 2013 at 05:51:15PM -0400, erik quanstrom wrote:
 On Mon Sep  2 16:51:31 EDT 2013, robp...@gmail.com wrote:
  I'm pretty sure C defines the include path to be relative to the file
  that includes it. The compiler's working directory should be
  irrelevant. I'm also pretty sure Plan 9's compiler gets this right, or
  at least used to. So more information is required.
 
 that still works, otherwise the kernel would not compile.
 
 - erik
 

the trouble here is that go's src/libmach/8obj.c has '#include
../cmd/8l/8.out.h', and 8.out.h now has the newly added '#include
../ld/textflag.h'.

i see now that the kernel source has an instance of this, in
/sys/src/9/pc: 'fns.h:1: #include ../port/portfns.h', but i'm not sure
how that is treated differently from this situation.

i did a small test, and made $home/bin/rc/8c which forces the -p flag of
8c to invoke cpp. when doing ./make.rc in go with this wrapper, the
include appears to be resolved correctly.

fwiw, the standard does not define the mechanism for includes to be
found at all, only that it is implementation-specific [1].

nick

[1] http://www.iso-9899.info/n1256.html#6.10.2



Re: [9fans] Google IO

2013-04-22 Thread Nick Owens
On Saturday, April 20, 2013 9:16:28 PM UTC-7, Bruce Ellis wrote:
 Any 9 dudes going to IO in SFO real soon? I will be around abouts so may be 
 good for an informal IWP9 beer and loud loud music.
 
 
 brucee

I'd be interested in meeting over a beer in SF. No IO for me.