Re: [9fans] anchors broken in the g command in sam on p9p?

2013-08-20 Thread Rob Pike
Nothing. That's exactly what ^ and $ do. -rob

[9fans] anchors broken in the g command in sam on p9p?

2013-08-20 Thread smiley
Maybe someone here can help me make sense of this simple sam session: ,c this is a file, one of many files with singular and/or plurals . ,y/ / g/.+s$/ p plurals I would expect that to have responded with "thisfilesplurals". According to the docs, g/.+s$/ should check that dot ends with "s". ,y/

Re: [9fans] APE & environ

2013-08-20 Thread erik quanstrom
On Tue Aug 20 15:30:28 EDT 2013, j...@corpus-callosum.com wrote: > Temporary fix, it only rebuilds environ on successful creation > of the new|modified variable: > > > > acme# diff -c /sys/src/ape/lib/bsd/putenv.c putenv.c > /sys/src/ape/lib/bsd/putenv.c:2,8 - putenv.c:2,12 > #include > #in

Re: [9fans] APE & environ

2013-08-20 Thread Jeff Sickel
Temporary fix, it only rebuilds environ on successful creation of the new|modified variable: acme# diff -c /sys/src/ape/lib/bsd/putenv.c putenv.c /sys/src/ape/lib/bsd/putenv.c:2,8 - putenv.c:2,12 #include #include #include + #include + extern char **environ; + extern void _envsetup(

Re: [9fans] APE & environ

2013-08-20 Thread Jeff Sickel
For what it's worth, putenv() should also probably be moved from ape/lib/bsd to ape/lib/ap and move the header entry from bsd.h to stdlib.h. Feedback/comments welcome. -jas

[9fans] APE & environ

2013-08-20 Thread Jeff Sickel
I've only now noticed that using APE's putenv() does create an entry for the variable in /env but does not reset environ (see /sys/src/ape/lib/ap/plan9/_envsetup.c). This means that any subsequent call to getenv() for the variable you're trying to test will not actually produce your expected resul

[9fans] plumber support for python lookup

2013-08-20 Thread Anthony Sorace
I'm in the middle of a medium-size python project. It would be really helpful if the plumber could do things like look up things in python's dot notation. Anyone have plumbing rules or helper functions they'd like to share for python work with acme and plumber on p9p? Anthony

Re: [9fans] libbsd: incompatible type signatures

2013-08-20 Thread Jens Staal
On Mon, 19 Aug 2013 13:04:26 -0400 erik quanstrom wrote: > it looks like 9atom doesn't do this properly. i'll submit > a 9atom patch, but simply adding it to /sys/src/ape/lib/9/libc.h > doesn't work, so give me a bit. it's a rats' nest of defines... > > the sloppy way to get this done would be