is there a patch for Rc out there that lets it handle here documents inside
a function body?
--
dx
by chance found[1] the following passage:
>(...) and the Bell Labs upas mailer never creates Message-ID.
out of curiosity, any particular rationale behind that?
[1] https://cr.yp.to/immhf/thread.html
mental note, as it took me a second to put it together:
#!/usr/bin/env rc
flag e +
myList = ( aa bb cc)
awk '
BEGIN {
split(ENVIRON["myList"], myList, "\001") # "\000" on plan9 proper
for (n in myList)
print n, myList[n]
}
'
i'm using plan9port (thanks, rsc) on linux for some 8 years now, for all
coding - mostly low-brow web dev
primarily Acme as IDE, Rc and awk for scripting the necessary tooling
back when i was stuck at a corpo and had to use Windows on workstation, i
installed
p9p on one of build servers and ran
is it possible to execute built-in command
and external command with one mouse click in Acme?
something like: Putall; mk
use a list. lists are created either by the parentheses:
% w = ( A B C )
% # note no space before the backslash
% wMultiline = (\
X\
Y\
Z\
)
% echo $w $wMultiline
A B C X Y Z
% for(i in $w) {echo $i; echo XXX}
A
XXX
B
XXX
C
XXX
or by globbing:
% text_files = *.txt
or by expanding a whitespaced
i've realized i never use the Esc key in Acme.
meanwhile, i often go through cycle of:
- type chunk of code
- grab mouse, focus tag line
- type a command
- grab mouse, execute the command
would it make more sense to have Esc function as the "position cursor
& focus at the end of tag line of the
the man page of test(1) mentions "-l string" as string length operator
for -eq, -gt, etc.
but there seems to be nothing in the plan9port's src/cmd/test.c, nor
in 9p.io/sources/cmd/test.c
is there any implementation of this floating around?
i was mildly surprised that p9p awk handles NUL-terminated records just fine.
either via -v 'RS=\0', or via BEGIN { RS="\0" }
needed it to handle output of git status --porcelain=v2
thanks, that did the trick indeed.
given multi-line dot, spanning only part of a file, how do i construct
an Edit command to remove lines matching certain regular expression?
wanted to delete lines starting with one particular character; without
leaving an empty line behind, thus Edit s/X.+//d is not sufficient.
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)
was there any attempt at using Slack through Acme?
the default desktop GUI, a browser AFAICT, is taking 1+ GB of RAM
after a few hours
given
pathnames = ( foo/a.txt bar/b.txt baz/c.txt )
how do i construct arguments to test(1) that test for existence of
those files in one go?
wanted:
test -e foo/a.txt -o -e bar/b.txt -o -e baz/c.txt
assuming the pathnames may contain space characters.
rc is a thing of beauty.
apologies for HTML in the previous message.
On Wed, Mar 1, 2017 at 1:10 PM, erik quanstrom wrote:
>> while (true)
>> if ($watch)
>> while (!$cmd)
>> $watch || true
>
> rc allows empty conditionals, which are true.
>
> -
runs build upon file change, repeats on failure
#!/usr/bin/env rc
flag e +
cmd = ( $* )
watch = ( inotifywait -q --recursive -e modify -e moved_to -e create -t 3 .
)
while (true)
if ($watch)
while (!$cmd)
$watch || true
there is trfs(4), not sure if applicable to plan9port.
trfs - translate spaces and other runes in file names file system
http://9p.io/magic/webls?dir=/sources/contrib/nemo
dirty 1.) rc -c 'git '^
note the space after git
idiomatic 1.) use win(1), pass 'command' argument a script which executes
git for each line of input as arguments through rc(1) to evaluate the
arguments in the usual way
2.) you can pass complex regular expression as argument to grep(1), without
I don't know what gcc authors are smoking, but strcpy(tmp,
what.); will be compiled to a few mov instructions with -O0, while
-Os still has a call to strcpy, just the way it *should* always be,
imho.
not that it's any excuse, but -fno-builtin helps.
On Mon, Jun 15, 2015 at 4:56 PM, Siarhei
i'm using plan9port mk on linux and just hit the environment+argument
length limit -- linux' execve($PLAN9/bin/rc, ... ) returns E2BIG because
$newprereq gets too large.
how do i work around? is there an idiomatic way of splitting up $newprereq
into smaller chunks?
the mkfile is:
how do i turn off output buffering in p9p Acme for particular fd?
a braindead linux application does dup(2), and proceeds using FD 3 as error
output, which results in buffered output in Acme.
be done
in Mk?
--
dexen deVries
[[[↓][→]]]
inside recipe; in my case i need it processed
by Mk inside prerequisite list
--
dexen deVries
[[[↓][→]]]
' | 9 sed 's/^|$|''/''/g' }
--
dexen deVries
[[[↓][→]]]
On Thursday 12 of June 2014 07:59:45 erik quanstrom wrote:
great. glad that worked. though it is always a bit sad
when one has to outwit one's tools.
still better than managing an anthill^W^W a pile of .xml `build specs'
--
dexen deVries
[[[↓][→]]]
On Friday 11 of April 2014 13:28:05 Szymon Olewniczak wrote:
I'm very curious about that so I would like to ask if there are any Plan
9 users in Poland or am I the only one in my entire country?
cheers, using plan9port, toying with 9front.
--
dexen deVries
[[[↓][→]]]
is fast enough.
right now Acme uses fonts simple enough to be easily converted from other
fonts.
...and the list goes on...
[1] http://lab-fgb.com/abaco/
--
dexen deVries
[[[↓][→]]]
parenthesis/bracket/brace.
to quickly move to the other end of code block etc.
--
dexen deVries
[[[↓][→]]]
.
--
dexen deVries
[[[↓][→]]]
attachment: borken-acme.png
makes acme much more
useful for my case, but am I missing an important other use?
from acme(1):
Dump Write the state of acme to the file name, if specified, or
$home/acme.dump by default.
i.e., Dump takes one optional argument: file pathname.
--
dexen deVries
[[[↓][→]]]
, but the program
is not started.
--
dexen deVries
[[[↓][→]]]
is there any known 9P implementation for FPGA? or has anyone been working on
communicating with FPGAs over 9P?
--
dexen deVries
[[[↓][→]]]
be somewhat coupled to
inferno and/or Nios.
But I imagine you're looking for something lower level?
anything goes, Verilog preferred. i'm simply trying to learn something new :^)
--
dexen deVries
[[[↓][→]]]
' was started in wrong dir -- in Acme's
getwd() rather than window's directory.
--
dexen deVries
[[[↓][→]]]
.
that by accident or is there some rationale?
--
dexen deVries
[[[↓][→]]]
' (output file suffix) working just fine.
that by accident or is there some rationale?
--
dexen deVries
[[[↓][→]]]
From 01ae77413e4249776124727e797b0172e7874987 Mon Sep 17 00:00:00 2001
From: dexen deVries dexen.devr...@gmail.com
Date: Mon, 30 Dec 2013 15:47:24 +0100
Subject: [PATCH] make stat
:
there is a reason i prefer using p9p (mk, rc, acme) when working on linux --
rather than just linux (or GNU Make, Bash, emacs/vi), with all the assorted
bells and whistles.
call it zen, call it time saver,
i debug my projects, not the meta-projects.
commit.
--
dexen deVries
[[[↓][→]]]
the problem is not solved, merely one of the manifestation is eliminated.
actual solution requires stating all the dependencies.
if your list of sources and/or targets is dynamic, consider using mk include:
| GEN_DEPS
where `GEN_DEPS' is your script generating deps in form TARGET: PREREQUISITE
mk my_target
also investigate -d[egp] debug stuff.
have fun with mk, it's a great little tool :-)
--
dexen deVries
[[[↓][→]]]
Take care of the luxuries and the necessities will take care of themselves.
-- L. Long
i'm using two Acmes all the time, with:
'EOF'
#!/usr/bin/env rc
flag e +
NAMESPACE=`{namespace}^-2
mkdir -p `{namespace}
plumber || true
exec acme
EOF;
of course plumber sends to the first copy.
--
dexen deVries
[[[↓][→]]]
Take care of the luxuries and the necessities will take care
), opens indicated files and marks what has been changed.
as of now, the script marks only first changed range in file via selection.
any /other/ sensible way of indicating other changes in this file?
--
dexen deVries
[[[↓][→]]]
Hi list,
apologies for the keyword overload ;-)
I have a plan9port mkfile using Rc (MKSHELL=$PLAN9/bin/rc), a recipe
contains pipeline: FOO_COMMAND | BAR_COMMAND.
What is the correct way of detecting failure exit status of
FOO_COMMAND (a networked operation) and ignoring exit status of
in a bastardized form thanks to the
`/dev/tcp/$IP/$PORT' hack in bash.
--
dexen deVries
[[[↓][→]]]
I have seen the Great Pretender and he is not what he seems.
awk(1) says, ``[s]tring constants are quoted , with the usual C escapes
recognized within.'', but \0 seems to terminate internal string
reprezentation...
so how do i output a real NUL byte?
--
dexen deVries
[[[↓][→]]]
On Tuesday 17 of September 2013 14:03:11 Kurt H Maier wrote:
Quoting dexen deVries dexen.devr...@gmail.com:
awk(1) says, ``[s]tring constants are quoted , with the usual C escapes
recognized within.'', but \0 seems to terminate internal string
reprezentation...
so how do i output
On Tuesday 17 of September 2013 12:50:07 erik quanstrom wrote:
On Tue Sep 17 10:04:20 EDT 2013, k...@sciops.net wrote:
Quoting dexen deVries dexen.devr...@gmail.com:
awk(1) says, ``[s]tring constants are quoted , with the usual C
escapes
recognized within.'', but \0 seems to terminate
On Tuesday 17 of September 2013 12:50:07 erik quanstrom wrote:
On Tue Sep 17 10:04:20 EDT 2013, k...@sciops.net wrote:
Quoting dexen deVries dexen.devr...@gmail.com:
awk(1) says, ``[s]tring constants are quoted , with the usual C
escapes
recognized within.'', but \0 seems to terminate
in /usr/$user/lib/plumbing.
i used to have a (now long forgotten) script perform some operation on current
Git repository upon B3 on SHA1.
--
dexen deVries
[[[↓][→]]]
Take care of the luxuries and the necessities will take care of themselves.
-- L. Long
part. i have a script that takes part of pathname in $1 and returns
all (hopefully exactly one) matching pathnames, and i want to plumb the ^F
from Acme to it.
--
dexen deVries
[[[↓][→]]]
thanks to you both.
http://github.com/dexen/plan9port-custom/commit/6a67d4d8c97bc682737ae1cf59544fb4c969a105.patch
cinap's version also supports rc block statements; tested with:
MKSHELL = rc
foo = `{ echo aaa; { date; }; pwd; }
bar = `{ echo zzz `{ date } zzz }
test:VQ:
echo foo $foo
in p9p mk, this works as expected:
foo = `{echo bar}
but the following does not -- rc(1) indicates syntax error:
foo = `{echo `{echo bar}}
strace indicates that mk(1) passes input to rc(1) with no closing braces at
all.
i'm using MKSHELL = rc.
--
dexen deVries
[[[↓][→]]]
in p9p mk, this works as expected:
foo = `{echo bar}
but the following does not -- rc(1) indicates syntax error:
foo = `{echo `{echo bar}}
strace indicates that mk(1) passes input to rc(1) with no closing braces at
all.
i'm using MKSHELL = rc.
--
dexen deVries
[[[↓][→]]]
Take care
according to your address.
I you write the code on C or Go without a closing a descriptor of addr
file, everything will be ok :-)
or use 9p rdwr:
echo -n , | 9p write acme/2/addr
echo 'dot=addr' | 9p rdwr acme/2/ctl
--
dexen deVries
[[[↓][→]]]
Take care of the luxuries and the necessities
if the window is displaying the end of the
buffer.
--
dexen deVries
[[[↓][→]]]
Take care of the luxuries and the necessities will take care of themselves.
-- L. Long
, the following scrolls by default, but will pause
scrolling when you scroll up so far that the last line of output goes out of
window (becomes invisible):
win ANY_COMMAND
for example:
win rc -c 'while (true) date sleep 1'
win ssh dexen@baron
--
dexen deVries
[[[↓][→]]]
Take care of the luxuries
works a-OK
--
dexen deVries
[[[↓][→]]]
Take care of the luxuries and the necessities will take care of themselves.
-- L. Long
official specification confirms that -- by not listing those magic
files as implied:
http://msdn.microsoft.com/en-us/windows/hardware/gg463084
some more info:
http://msdn.microsoft.com/en-us/library/aa365247(v=vs.85).aspx#file_and_directory_names
--
dexen deVries
[[[↓][→]]]
Take care
if not
echo FAIL
for contrast, the following script outputs `FAIL' as expected -- the
difference being in calling the /bin/false directly in ``if(/bin/false)''
#!/usr/bin/env rc
flag e +
if (/bin/false)
echo SUCCESS
if not
echo FAIL
--
dexen deVries
[[[↓][→]]]
Take care
in mk(1), why is the `D' flag (if the recipe exits with a non-null status, the
target is deleted) optional, rather than default?
i can see why it makes little sense with together `V' flag, but for non-V
rules, targeting plain files, i'd like it by default.
--
dexen deVries
[[[↓][→]]]
? Thanks again.
Bash was ported to plan 9?
the other way around: http://swtch.com/plan9port/
also p9p mk defaults to bash , so it's good to set MKSHELL=rc on top of
mkfiles.
--
dexen deVries
[[[↓][→]]]
I have seen the Great Pretender and he is not what he seems.
environment.
do you /really/ need Yet Another Networked Filesystem in Plan9? ;-)
--
dexen deVries
[[[↓][→]]]
/index.php?topic=33618.0
[2] http://en.wikipedia.org/wiki/Namecoin#Namecoin_DNS
--
dexen deVries
[[[↓][→]]]
please pardon the silly question, but... how about piping the binary data
through xd(1) before sending it to regexp(3)?
--
dexen deVries
[[[↓][→]]]
I have seen the Great Pretender and he is not what he seems.
trying to create a standalone awk script (#!/usr/local/plan9/bin/awk -f).
how to open a file in BEGIN pattern section and set it as next input file?
not helped so far: FILENAME=foo.txt
nor ARGV[1]=foo.txt; nextfile;
--
dexen deVries
[[[↓][→]]]
:-)
--
dexen deVries
[[[↓][→]]]
:
automatically supplies `.' (dot) between arguments, so for example:
$ G some token here
becomes `grep some.token.here'
--
dexen deVries
[[[↓][→]]]
``we, the humanity'' is the greatest experiment we, the humanity, ever
undertook.
#!/usr/bin/env rc
. 9.rc
s=()
arg=()
fn addS
.
--
dexen deVries
[[[↓][→]]]
and 3.5.0 and with recent p9p
version.
--
dexen deVries
[[[↓][→]]]
for `'
open(/mnt/acme/2/ctl, O_WRONLY|O_CREAT|O_APPEND|O_LARGEFILE, 0666) = 3
with the difference being `O_TRUNC'.
cheers,
--
dexen deVries
[[[↓][→]]]
probably more of a firefox question, but hey.
once in a blue moon† the www-based software i'm developing displays a
backtrace. is there a sensible way to plumb it to p9p Acme?
all's running on linux/x11
--
dexen deVries
[[[↓][→]]]
† lies, damn lies and bug metrics ;-)
+ perhaps
some filesystem recovery tools.
this leaves open the question of providing devdraw(1) -- perhaps via fbdev --
and the usual x11 goodies of mouse, clipboard etc.?
--
dexen deVries
[[[↓][→]]]
# decrease TAB indentation of selection
Edit s,^TAB,,g
# increase TAB indentation of selection
# the ^. part ensures we indent only lines with content
# and leave empty lines undisturbed
Edit s,^.,TAB,g
--
dexen deVries
[[[↓][→]]]
--wdir $wdir $data
--
dexen deVries
[[[↓][→]]]
On Friday 29 of March 2013 06:57:55 s...@9front.org wrote:
NO STRINGS ATTACHED
it made my day, too.
technically those are zero-terminated arrays of Runes... ;-)
--
dexen deVries
[[[↓][→]]]
information.
perhaps something alike is at play here.
--
dexen deVries
[[[↓][→]]]
``we, the humanity'' is the greatest experiment we, the humanity, ever
undertook.
-lab.de has never let me down ;-)
(archives at http://www.mail-archive.com/picolisp@software-lab.de/ )
cheers,
--
dexen deVries
[[[↓][→]]]
``we, the humanity'' is the greatest experiment we, the humanity, ever
undertook.
On Saturday 23 of March 2013 12:37:17 Rob Pike wrote:
(...) and because go install does
transitive dependencies correctly, which mk does not.
anybody care to explain what is the limitation of mk here? can't wrap my head
around it...
--
dexen deVries
[[[↓][→]]]
construct ``#pragma lib libbio.a'' and used it to link
correct libraries, it could be said to understand the actual dependencies as
expressed by code.
of course, the deeper you go into this rabbit hole, the closer you get to
something resembling GNU autotools.
--
dexen deVries
[[[↓][→]]]
``we
On Monday 25 of March 2013 11:40:32 Bence Fábián wrote:
mk doesn't parses '#include' directives in C
gnu make can use output of gcc -M as rules describing prerequisites. it's
somewhat tedious and error-prone, though, as indicated by multitude of -Mx
file options.
--
dexen deVries
[[[↓][→]]]
often.
turns out, i was affraid of having to re-type the Edit ,d in every new window.
all hail Acme,
--
dexen deVries
[[[↓][→]]]
for this behavior?
--
dexen deVries
[[[↓][→]]]
MKSHELL=$PLAN9/bin/rc
test:VQ: positive negative
echo success.
positive:VQ:
if (test -e mkfile)
echo the file exists
negative:VQ:
# any file or dir that is sure not to exist
# if we have
$status
handle_particular_kind_of_pipeline_failure
}
do_other_stuff # should not be affected
}
do_yet_other_stuff # should not be affected either
...but guess rc's semantics are almost set in stone by now :-)
cheers,
--
dexen deVries
[[[↓][→]]]
/c1bd38a11c42d18b53ee5d6a6084eccb9728f2c2/raw/
...and i've been suffering from randomly stuck Ctrl or Alt in recent X.org or
KDE.
--
dexen deVries
[[[↓][→]]]
I like my +Errors window clean once in a while. Attached patch provides
Edit ,d
by default in +Errors window tagline.
--
dexen deVries
[[[↓][→]]]
From b4edef7c40de4c4a8678622e11eee8bd9aef8523 Mon Sep 17 00:00:00 2001
From: dexen deVries dexen.devr...@gmail.com
Date: Thu, 14 Mar 2013 14:41:22
via if(0) {...}
--
dexen deVries
[[[↓][→]]]
† i'm a LAMP webdeveloper by day.
line, but in my cases,
usually several gits are ran along (git gui, git submodule, etc.etc.)
using p9p Acme.
cheers,
--
dexen deVries
[[[↓][→]]]
.
would heavy use of git-rebase fill up the Venti storage too quickly?
* * *
is it too much noise to ask about p9p Acme on this mailing list?
--
dexen deVries
[[[↓][→]]]
{}while() guarding against treating it as an expression.
--
dexen deVries
[[[↓][→]]]
Too many renames; must be X source!
from output of p9p `acid -q', ran on basically any GNU software.
the offending code:
$PLAN9/src/cmd/acid/util.c:/must.be.X.source
if(renamed 5 !quiet) {
print(Too many renames; must be X source!\n);
--
dexen
for the
downtime we were having. turned out, they forgot to whitelist our MAC
address.
but hey -- it worked with their technician's ms windows notebook.
888 boring rant 888
--
dexen deVries
[[[↓][→]]]
``One disadvantage of the Univac system is that it does not use Unix, a
recently developed program
keywords.
also a custom plumber rule script to display function prototype upon right-
click.
--
dexen deVries
[[[↓][→]]]
I have seen the Great Pretender and he is not what he seems.
++/
the * moves to the left.
also, probably oughta be
Edit ,s/../g
to work on all lines, and change multiple matches in one go.
--
dexen deVries
[[[↓][→]]]
Reality is just a convenient measure of complexity.
-- Alvy Ray Smith
] = B2
a[bar, 3] = B3
for (i in a)
if (i ~ foo)
print a[i]
}
hope that helps,
--
dexen deVries
[[[↓][→]]]
Reality is just a convenient measure of complexity.
-- Alvy Ray Smith
(preferably concise) sample
that demonstrates the correct way to write GUI apps in Plan 9?
$PLAN9/src/cmd/draw/*.c
in particular, stats.c -- comes with a simple pop-up menu, at under 1kLOC.
--
dexen deVries
[[[↓][→]]]
Reality is just a convenient measure of complexity.
-- Alvy Ray
a mis-click which touches only the vertical pipe in window tag and no other
text causes selection to be removed. seems Acme executes a null command and
replaces selection with the null result. any reason for the behavior?
using p9p tip.
cheers,
--
dexen deVries
[[[↓][→]]]
Reality is just
, Text
*argt)
- e = lookup(r, q1-q0);
+ e = nil;
+ if(runestrncmp(r, LPipe, 1) != 0 || q1-q0 == 1)
+ e = lookup(r, q1-q0);
--
dexen deVries
[[[↓][→]]]
Reality is just a convenient measure of complexity.
-- Alvy Ray Smith
fame).
if you really must, John Carmak writes idomatic C, not C++.
NITPICK;
[1] http://news.ycombinator.com/item?id=4821152 and countless other stories.
--
dexen deVries
[[[↓][→]]]
Reality is just a convenient measure of complexity.
-- Alvy Ray Smith
languages provide polynominal or exponential factor.
aside of that, in various publications number of bugs is found to correlate
with line counts or similar metrics, making a more concise language a net win.
--
dexen deVries
[[[↓][→]]]
Reality is just a convenient measure of complexity
vanilla STL based.
(...)
frommy brief enounters with Qt: do use signal/slot mechanics. concise and seem
to work well in both small and large (KDE-sized) projects.
semi-related: qmake is one of few sane build tools in linuxland. based on
simple text files, `mkspecs'.
--
dexen deVries
--
dexen deVries
[[[↓][→]]]
Reality is just a convenient measure of complexity.
-- Alvy Ray Smith
1 - 100 of 257 matches
Mail list logo