Re: [9fans] Re: A learners sam cheat sheet

2024-08-22 Thread Mathieu Bivert
Hi,

I think it's a typo in the cheat sheet; at least for s///,
\i is the correct syntax to reference "tagged patterns":

  % echo foo bar | ssam 's/([a-z]+) ([a-z]+)/\2 \1/'
  bar foo

I lack familiarity with sam/sam's language to be certain,
but I doubt it'd make much sense to have it for other
commands; sam(1) describes it for s/// only.

>From a quick glance, there seems to be other "typos" in
the cheat sheet[0]:

  s/"([ˆ"]*)"/‘‘1’’/  replace "hello" with ‘‘hello’’ in selection
   /(.+0+/   matches blocks of text separated by blank lines

Cheers,

[0]: http://9p.io/sources/contrib/steve/doc/sam-refcard.pdf


On Thu, Aug 22, 2024 at 5:18 AM  wrote:

> # substitute #'th tagged pattern
>
>
> Are there any examples? I can't find any in Pike's papers.
> *9fans * / 9fans / see discussions
>  + participants
>  + delivery options
>  Permalink
> 
>

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Tc2ebea6bfef26073-Mb5cced754d2a118bfb58d449
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] rio in p9p

2018-02-23 Thread Mathieu Lonjaret
Hey,

Sorry, I have not tried in a while. my bin/Mail (which still works for me)
modtime is from oct 2016, so I probably built it at around that time.
So you can try to apply the github branch to a p9p tree from around then,
but otherwise it should be pretty easy to cherry-pick the changes to a
recent p9p tree. I'll try to do it this week-end if i find the time.



On 3 November 2017 at 09:43, Rudolf Sykora  wrote:

> Dear Mathieu,
>
> On 9 October 2017 at 19:35, Mathieu Lonjaret 
> wrote:
> > Sure. each change is in a dedicated branch at
> >
> > https://github.com/mpl/plan9port
> >
> > They're all trivial, except for the sort by thread acme mail.
>
> if I have a fairly recent p9p, what is the minimum I have to do
> to try your threaded-view change? (Btw., does it work well? I believe
> I once tried some threaded view in acme, but something was wrong with
> that back then...)
>
> Sorry for this question, I just do not orient in everything...
>
> Thanks!
> Ruda
>
>


Re: [9fans] rio in p9p

2017-10-09 Thread Mathieu Lonjaret
whoops, apologies for the super late reply. I forget to check my 9fans
folder regularly :/

On 14 August 2017 at 12:14, Rudolf Sykora  wrote:
> Hello,
>
> On 11 August 2017 at 19:55, Mathieu Lonjaret  
> wrote:
>> I do use p9p rio too. I have a few changes on it, but nothing that
>> touches the areas you mention.
>
> So what changes have you made, if you can share?

Sure. each change is in a dedicated branch at

https://github.com/mpl/plan9port

They're all trivial, except for the sort by thread acme mail.

>> I don't see this bug with my firefox on p9p. fullscreen works as
>> expected, then escape to quit too.
>
> Hmm. Where do you get p9p these days? Is it
> https://github.com/9fans/plan9port

yep.

>> I indeed see the same behaviour on ff 49.0 (on ubuntu). Moving tabs in
>> chrome works fine though.
>
> Thanks for the confirmation.
>
>
> Best regards!
> Ruda
>



Re: [9fans] rio in p9p

2017-08-11 Thread Mathieu Lonjaret
On 20 July 2017 at 10:35, Rudolf Sykora  wrote:
> Hello,

Hi,

I do use p9p rio too. I have a few changes on it, but nothing that
touches the areas you mention.
also fyi:

> I want to ask if anybody has made any changes to rio in p9p, so that
>
>
> -- it can either do or somehow ignore switching to fullscreen (e.g.,
> now when I press
> the fullscreen button in a youtube video I have to close the browser (Firefox)
> because it becomes unresponsive)

I don't see this bug with my firefox on p9p. fullscreen works as
expected, then escape to quit too.

> -- I can move tabs around in Firefox (this works in other wms but not in rio)

I indeed see the same behaviour on ff 49.0 (on ubuntu). Moving tabs in
chrome works fine though.

> -- it does not so much influence other programs when windows are moved
> around, created by sweeping, etc. (When I  watch a youtube video in mpsyt
> [ie., not in a browser] and I, say, try to move some window around, then
> playback freezes; though I don't really understand why; this happens in
> all rio, 9wm, w9wm.)
>
>
> Thanks for comments
> Ruda
>



Re: [9fans] acme tag bars stacking

2016-11-05 Thread Mathieu Lonjaret
I must admit, the latest drop in the bucket that made me consider that
change again is: when I unplug the external monitor from my laptop,
not only does rio not automatically switch displays properly (I have
to use my xrandr-based scripts to do that), but even after I've
switched displays, the windows haven't been scaled down.
So I end up with an acme window (that I could, and that I usually end
up resizing down manually), whose bottom is completely hidden, and as
such, so are all the stacked (acme) windows.

Anyway, I should probably first look into making rio automatically
rescale fullscreen windows when switching displays.



On 1 November 2016 at 02:23, Anthony Sorace  wrote:
> I’ve often wanted the same sorting change. I do, however, find yiyus’ 
> rationale compelling. I’d be interested in playing with it, if you try it out.
>
>> On Oct 30, 2016, at 11:16 , Mathieu Lonjaret  
>> wrote:
>>
>> yeah, good points.
>>
>> On 29 October 2016 at 00:47, yy  wrote:
>>> On 28 October 2016 at 16:23, Mathieu Lonjaret
>>>  wrote:
>>>> Anyway, does anyone know what the rationale was for choosing to stack
>>>> them at the bottom? Or why it would be a a bad idea to make them stack
>>>> at the top instead?
>>>
>>> Let's suppose you have many windows in a column. When you work in one
>>> of them, you B2 it and put it on the top of the stack. Then you work
>>> on another one and it goes to the top, moving the previous one to the
>>> second position, and so on. This way, your most recently used windows
>>> are always on top, the least used ones go to the bottom of the stack.
>>> I would find counterintuitive that the windows you used a longer time
>>> ago stayed at the top, between your "working windows" and the column
>>> and main tag lines.
>>>
>>> But I would guess the main reason it works this way is that it seemed
>>> more natural to move a window to the head than to the tail of a linked
>>> list, and it just worked well enough.
>>>
>>> I see how it may be more practical to stack them at the top when
>>> working only with two or three windows, but it would be kind of weird
>>> if you have ten. If you feel it will fit your workflow better, it is
>>> probably not too difficult to get it done.
>>>
>>>
>>> --
>>> - yiyus || JGL .
>>>
>
>



Re: [9fans] acme tag bars stacking

2016-10-30 Thread Mathieu Lonjaret
yeah, good points.

On 29 October 2016 at 00:47, yy  wrote:
> On 28 October 2016 at 16:23, Mathieu Lonjaret
>  wrote:
>> Anyway, does anyone know what the rationale was for choosing to stack
>> them at the bottom? Or why it would be a a bad idea to make them stack
>> at the top instead?
>
> Let's suppose you have many windows in a column. When you work in one
> of them, you B2 it and put it on the top of the stack. Then you work
> on another one and it goes to the top, moving the previous one to the
> second position, and so on. This way, your most recently used windows
> are always on top, the least used ones go to the bottom of the stack.
> I would find counterintuitive that the windows you used a longer time
> ago stayed at the top, between your "working windows" and the column
> and main tag lines.
>
> But I would guess the main reason it works this way is that it seemed
> more natural to move a window to the head than to the tail of a linked
> list, and it just worked well enough.
>
> I see how it may be more practical to stack them at the top when
> working only with two or three windows, but it would be kind of weird
> if you have ten. If you feel it will fit your workflow better, it is
> probably not too difficult to get it done.
>
>
> --
> - yiyus || JGL .
>



Re: [9fans] acme tag bars stacking

2016-10-28 Thread Mathieu Lonjaret
I thought about that. you can explicitly give that preference to the
working window by fully maximizing it (i.e. making all the tags
disappear with button 3), so it didn't seem justification enough to
me. But maybe it is.


On 28 October 2016 at 16:37, Mark van Atten  wrote:
> On Fri, Oct 28, 2016 at 4:23 PM, Mathieu Lonjaret
>  wrote:
>>Probably just because I'm more comfortable looking at things
>> at the top half of my screen rather than at the top bottom.
>
> Perhaps that was the very design consideration, but with preference given
> to the window in which one is working over tags of other windows.
>
> Mark.
>



[9fans] acme tag bars stacking

2016-10-28 Thread Mathieu Lonjaret
Hi,

I regularly feel slightly tempted to modify (p9p) acme so that, when a
window is maximized with button 2, the other windows tags would stack
to the top of the column, instead of to the bottom. I find that, them
being on the bottom makes it harder for me to find back a particular
window. Probably just because I'm more comfortable looking at things
at the top half of my screen rather than at the top bottom. It's also
how other GUIs behave: e.g. your browser tags are at the top of the
window.

Anyway, does anyone know what the rationale was for choosing to stack
them at the bottom? Or why it would be a a bad idea to make them stack
at the top instead?

tia,
Mathieu



Re: [9fans] acme search backwards

2015-09-03 Thread Mathieu Lonjaret
No, I meant other implementation suggestions.

Since you're all as lazy as I am, here it is:
https://groups.google.com/d/msg/comp.os.plan9/Q6R9iuu0lE8/u3h-FUnXOmEJ



On 2 September 2015 at 16:01,  wrote:

> > Also there was a discussion on 9fans about it with other
> > suggestions/solutions.
>
>  :-/RE
>
> is what I remember Russ recommending,  It's not perfect, but it does help.
>
> Lucio.
>
>
>


Re: [9fans] listing windows for p9p acme

2015-09-02 Thread Mathieu Lonjaret
On 2 September 2015 at 19:58, Eugene Ma  wrote:

> Sorting columns with Sort helps a little with window management.
>

Oh, I didn't remember about Sort, thanks.


> Also, the "Edit X" sam command does something similar to lw.
>

I'll be damned. I knew about "Edit X/foo/f" but I had never taken the time
to understand how it works, so I didn't know about something as powerful as
just Edit X. Thanks!


> On Wed, Sep 2, 2015 at 4:19 AM Rudolf Sykora 
> wrote:
>
>> On 2 September 2015 at 11:54, Mathieu Lonjaret
>> > I got annoyed at how, usually with many windows open, I sometimes
>> struggle
>> > to find where one of my windows is.
>>
>> yes. when there are many windows, the situation gets chaotic,
>> that's my experience, too.
>>
>> Further, the heuristics of placing new windows does not really help
>> at that moment :(
>>
>> btw. Has somebody tried this?
>> http://c9x.me/edit/
>>
>> Ruda
>>
>>


Re: [9fans] acme search backwards

2015-09-02 Thread Mathieu Lonjaret
I had done https://bitbucket.org/mpl/acme-with-easy-backwards-search , but
since I wasn't bright enough to host it as a diff I don't really remember
how it works or what I changed. I think I had added a Rev command to the
tag bar of the window. Although it wasn't useful enough for me to keep on
maintaining it, I'm pretty sure it was working.

Also there was a discussion on 9fans about it with other
suggestions/solutions.

On 2 September 2015 at 08:08, Rudolf Sykora  wrote:

> Hi,
>
> by chance, hasn't somebody changed acme so that one can easily,
> say with a ctrl key, change the direction of the search done by the
> 3rd mouse button? I find it very missing.
>
> Thanks
> Ruda
>
>


[9fans] listing windows for p9p acme

2015-09-02 Thread Mathieu Lonjaret
Hi,

I got annoyed at how, usually with many windows open, I sometimes struggle
to find where one of my windows is.

So I wrote https://github.com/mpl/lw , which seems to be helping a bit. I
run it from the main tag, so the output goes to Errors.

Hope that helps anyone else.

Cheers,
Mathieu


Re: [9fans] P9p from osx to ubuntu

2015-04-20 Thread Mathieu Lonjaret
Another think.. But this is not related to the switch. Someone can share
> some script for having two acme instance working with plumbers on different
> namespaces?
>
Something like below should work for the second acme you want to start:

 export NAMESPACE=/tmp/ns2.$USERNAME.:0
mkdir /tmp/ns2.$USERNAME.:0
acme


Re: [9fans] easier refreshing of acme wins

2015-04-15 Thread Mathieu Lonjaret
I followed yiyus suggestion and ended up using ".go" as an alias for Get. I
expect it's going to work nicely.

the change is trivial:

diff --git a/src/cmd/acme/exec.c b/src/cmd/acme/exec.c
index 6fe423a..5c55e21 100644
--- a/src/cmd/acme/exec.c
+++ b/src/cmd/acme/exec.c
@@ -75,6 +75,7 @@ static Rune LEdit[] = { 'E', 'd', 'i', 't', 0 };
 static Rune LExit[] = { 'E', 'x', 'i', 't', 0 };
 static Rune LFont[] = { 'F', 'o', 'n', 't', 0 };
 static Rune LGet[] = { 'G', 'e', 't', 0 };
+static Rune LRefreshGo[] = { '.', 'g', 'o', 0 };
 static Rune LID[] = { 'I', 'D', 0 };
 static Rune LIncl[] = { 'I', 'n', 'c', 'l', 0 };
 static Rune LIndent[] = { 'I', 'n', 'd', 'e', 'n', 't', 0 };
@@ -106,6 +107,7 @@ Exectab exectab[] = {
{ LExit,xexit,  FALSE,  XXX,XXX
},
{ LFont,fontx,  FALSE,  XXX,XXX
},
{ LGet, get,FALSE,  TRUE,   XXX },
+   { LRefreshGo,   get,FALSE,  TRUE,   XXX
},
{ LID,  id, FALSE,  XXX,XXX
},
{ LIncl,incl,   FALSE,  XXX,XXX
},
{ LIndent,  indent, FALSE,  XXX,XXX
},


On 9 April 2015 at 15:28, Mathieu Lonjaret 
wrote:

> ah, good idea. thanks!
>
>
> On 9 April 2015 at 10:02, yy  wrote:
> > On 26 March 2015 at 17:02, Mathieu Lonjaret 
> wrote:
> >> However, I find it a bit tedious that I have to write (or paste)
> >> myself the Get tag for each of the wins I want to refresh. To the
> >> point that I'm thinking of hardcoding the Get tag as one of the
> >> "permanent" tags for a win.
> >
> > One easy solution is to use as command something you already have in
> > the tag bar. I have used '|' as Edit (I think the patch is my contrib,
> > but I'm not sure), you may use it as Get. Or, since it looks like we
> > are talking about go files, you could use 'g' or 'o', which will
> > always be there.
> >
> > It is not ideal, but it is something you can do in 5 minutes.
> >
> >
> > --
> > - yiyus || JGL .
> >
>


Re: [9fans] easier refreshing of acme wins

2015-04-09 Thread Mathieu Lonjaret
ah, good idea. thanks!


On 9 April 2015 at 10:02, yy  wrote:
> On 26 March 2015 at 17:02, Mathieu Lonjaret  
> wrote:
>> However, I find it a bit tedious that I have to write (or paste)
>> myself the Get tag for each of the wins I want to refresh. To the
>> point that I'm thinking of hardcoding the Get tag as one of the
>> "permanent" tags for a win.
>
> One easy solution is to use as command something you already have in
> the tag bar. I have used '|' as Edit (I think the patch is my contrib,
> but I'm not sure), you may use it as Get. Or, since it looks like we
> are talking about go files, you could use 'g' or 'o', which will
> always be there.
>
> It is not ideal, but it is something you can do in 5 minutes.
>
>
> --
> - yiyus || JGL .
>



Re: [9fans] easier refreshing of acme wins

2015-04-08 Thread Mathieu Lonjaret
Nice. but, as I explained, automatically refreshing all the wins (or
even only the .go ones) is not really what I want.
Moreover, this is probably even worse as I'd lose any custom tags I'd
have added on those windows.


On 3 April 2015 at 18:24, Skip Tavakkolian  wrote:
> wouldn't something like this work?  in the example i (clumsily) find the .go
> files, remove them and then B them in again.
>
> % for (i in `{9p ls acme|grep '[1-9]+'}) {
> x = `{9p read acme/$i/tag|sed -n -e 's/^([^ ]*\.go) .*$/\1/p' }
> if (! ~ $x '') {
> echo del | 9p write acme/$i/ctl
> B $x
> }
> }
>
> On Fri, Apr 3, 2015 at 6:16 AM, Mathieu Lonjaret
>  wrote:
>>
>> Yes, I had seen that thread, but I explained I don't want the same
>> thing as what you're asking for. I do not want to refresh them all in
>> one command. I want to selectively refresh some of them, but in an
>> easier fashion than having to type Get for each of them.
>>
>>
>> On 28 March 2015 at 08:19, Aram Santogidis  wrote:
>> > Hi,
>> >
>> > I posted a similar question in the list few days back
>> > http://marc.info/?l=9fans&m=142721596630272&w=1
>> >
>> > and one solution that was suggested by Antons and works fine for me is
>> > the
>> > following.
>> >
>> > Edit X:^... [^+].*[^\/]$: e
>> >
>> > Cheers,
>> > Aram
>> >
>> > On Thu, Mar 26, 2015 at 11:05 PM, Bakul Shah 
>> > wrote:
>> >>
>> >>
>> >> On Thu, 26 Mar 2015 18:49:51 - Paul Lalonde
>> >> 
>> >> wrote:
>> >> > The feature direction I'd like when working with Git is for the
>> >> > window
>> >> > of a
>> >> > git-changed file to become un-editable.  This would require adding
>> >> > the
>> >> > idea
>> >> > of a un-editable window, which is probably a bad idea.
>> >>
>> >> Not sure what you mean. If you git {pull,checkout,merge,...},
>> >> files you have been editing (but not yet saved) may already
>> >> require merging. You may be better off using some client side
>> >> git hook that checks the state of acme edited files and tries
>> >> to do the right thing (not that I have ever used these hooks).
>> >>
>> >> > Meanwhile I use the script below to generate X commands to reload
>> >> > changed
>> >> > windows.  If I had a little more gumption (and less fear) I'd pipe
>> >> > the
>> >> > last
>> >> > output to make acme execute the Edits.
>> >> >
>> >> > #!/bin/bash
>> >> > cd `git rev-parse --git-dir`/..
>> >> > git diff --name-only HEAD~ | sed s+^+`pwd`/+ | sort > /tmp/foobar
>> >> > 9p read acme/index | awk '{print $6}' | sort | comm -12 - /tmp/foobar
>> >> > |
>> >> > sed 's+\(.*\)+Edit X=\1=,r+'
>> >>
>> >> Nice!
>> >>
>> >
>>
>



Re: [9fans] easier refreshing of acme wins

2015-04-03 Thread Mathieu Lonjaret
Yes, I had seen that thread, but I explained I don't want the same
thing as what you're asking for. I do not want to refresh them all in
one command. I want to selectively refresh some of them, but in an
easier fashion than having to type Get for each of them.


On 28 March 2015 at 08:19, Aram Santogidis  wrote:
> Hi,
>
> I posted a similar question in the list few days back
> http://marc.info/?l=9fans&m=142721596630272&w=1
>
> and one solution that was suggested by Antons and works fine for me is the
> following.
>
> Edit X:^... [^+].*[^\/]$: e
>
> Cheers,
> Aram
>
> On Thu, Mar 26, 2015 at 11:05 PM, Bakul Shah  wrote:
>>
>>
>> On Thu, 26 Mar 2015 18:49:51 - Paul Lalonde 
>> wrote:
>> > The feature direction I'd like when working with Git is for the window
>> > of a
>> > git-changed file to become un-editable.  This would require adding the
>> > idea
>> > of a un-editable window, which is probably a bad idea.
>>
>> Not sure what you mean. If you git {pull,checkout,merge,...},
>> files you have been editing (but not yet saved) may already
>> require merging. You may be better off using some client side
>> git hook that checks the state of acme edited files and tries
>> to do the right thing (not that I have ever used these hooks).
>>
>> > Meanwhile I use the script below to generate X commands to reload
>> > changed
>> > windows.  If I had a little more gumption (and less fear) I'd pipe the
>> > last
>> > output to make acme execute the Edits.
>> >
>> > #!/bin/bash
>> > cd `git rev-parse --git-dir`/..
>> > git diff --name-only HEAD~ | sed s+^+`pwd`/+ | sort > /tmp/foobar
>> > 9p read acme/index | awk '{print $6}' | sort | comm -12 - /tmp/foobar  |
>> > sed 's+\(.*\)+Edit X=\1=,r+'
>>
>> Nice!
>>
>



[9fans] easier refreshing of acme wins

2015-03-26 Thread Mathieu Lonjaret
Hi,

I work with many git branches, often affecting the same files. And I
also happen to jump from one to the other quite frequently. There
could be a problem with my workflow, but let's pretend there isn't.

When one of said files is already open in acme, the win won't
automatically refresh it and that's ok, I certainly wouldn't want that
anyway, because I don't always to refresh them all.

However, I find it a bit tedious that I have to write (or paste)
myself the Get tag for each of the wins I want to refresh. To the
point that I'm thinking of hardcoding the Get tag as one of the
"permanent" tags for a win.

Before I do that, does anyone have a better solution to suggest? The
best would be that the Get tag gets automatically added to the tag bar
whenever the files are changed (by git checkout, or other).

p9p acme btw.

Thanks,
Mathieu



Re: [9fans] acmetags

2014-11-30 Thread Mathieu Lonjaret
On 30 November 2014 at 18:19, erik quanstrom  wrote:
> On Sun Nov 30 09:03:42 PST 2014, mathieu.lonja...@gmail.com wrote:
>> Hi,
>>
>> I usually keep most of my build/run/test workflow as tags on my acme
>> "win" windows. But acme dumps do not save tags, and I sometimes don't
>> save them in a guide file (because I forget when I reboot, or I close
>> acme inadvertently, or in rare occasions because acme dies). So I've
>> finally written a little tool to cope with that, and it's here
>> https://github.com/mpl/acmetags in case anyone is interested. I'll
>> probably run it in a cron or something.
>>
>> As usual, kudos to the acme authors and to Russ for the acme pkg which
>> made this so easy to write.
>
> the 9atom version of acme does do this.

Ah yeah, forgot to precise it was for p9p, thanks.

> it's pretty easy code to copy,
> i just haven't done it yet.  the other thing missing from p9p acme that
> i notice is the ability to middle click on the column blue square and have
> the column resize in width, as frames already do in height.  (only in
> 9atom, not labs.)

Wow, yes. I often wish I could do something like that and I didn't
even know it existed in any of the acme "versions". You have my thanks
in advance if that makes it into p9p. :-)

> - erik
>



[9fans] acmetags

2014-11-30 Thread Mathieu Lonjaret
Hi,

I usually keep most of my build/run/test workflow as tags on my acme
"win" windows. But acme dumps do not save tags, and I sometimes don't
save them in a guide file (because I forget when I reboot, or I close
acme inadvertently, or in rare occasions because acme dies). So I've
finally written a little tool to cope with that, and it's here
https://github.com/mpl/acmetags in case anyone is interested. I'll
probably run it in a cron or something.

As usual, kudos to the acme authors and to Russ for the acme pkg which
made this so easy to write.

Cheers,
Mathieu



[9fans] Evoluent wheel speed in p9p acme

2014-08-25 Thread Mathieu Lonjaret
Hi,

I had always found the scrolling increment way too small with the
Evoluent scrolling wheel, and it was particularly annoying in acme. I
had no luck with xinput as I could not find the relevant property to
adjust but it turns out it's pretty simple with imwheel. Here's my
.imwheelrc for anyone interested:

".*acme$"
None,   Up, Up, 1
None,   Down,   Down,   1

Cancelling it (for when one wants to switch to another mouse of the
trackpoint for example) is as simple as pkill imwheel.

hth,
Mathieu



Re: [9fans] Use acme.rc with acme (p9p)

2013-04-03 Thread Mathieu Lonjaret
if you start acme with your SHELL being $PLAN9/bin/rc, then the wins you'll
open will run rc -l, which reads $HOME/lib/profile.
So whatever functions you define in there will be known to your wins in
acme. Not sure that answers your questions though.

On 3 April 2013 22:06, Sergio Perticone  wrote:

> On Wed, Apr 3, 2013 at 12:39 PM,  wrote:
>
>> I know that there should be a way to use the functions defined in
>> acme.rc, but I cannot seem to figure out how to load it. Any help would be
>> appreciated.
>>
>
> dot:
>
> . $PLAN9/lib/acme.rc
> newwindow
>
>
>>
>> Up to this point every time I've created new commands I've added them
>> each as a separate command in my PATH which I don't care for.
>>
>> Thanks.
>>
>>
>


Re: [9fans] git and (p9p) acme

2012-06-14 Thread Mathieu Lonjaret
It happened again. and I've just realized it's simply what you had
warned about: since it was an --amend and I didn't change anything in
the message there was no change to the ls -l output, hence E did
nothing when I Put.

On Fri, Apr 27, 2012 at 12:20 AM, Mathieu Lonjaret
 wrote:
> I've just retried on the machine where I had the problem and it now
> just works. No need even for awd indeed.
> I'll try and reproduce the behavior, but I just don't see what I may
> have done different the previous times...
>
> thanks,
> Mathieu
>
> On Thu, Apr 26, 2012 at 5:32 AM, Russ Cox  wrote:
>> On Wed, Apr 25, 2012 at 5:35 PM, Mathieu Lonjaret
>>  wrote:
>>> So, are you saying E just works out of the box for you as the $EDITOR
>>> for git/hg?
>>
>> Yes.  Note that E waits for the file to change by running
>> ls -l on the file in a loop.  If for some reason doing the Put
>> does not change the ls -l output (date+size, primarily) then
>> E will not exit.  If you are having trouble I would suggest
>> putting some echo statements in the script or just doing
>> 'set -e' at the top so that it echoes each statement as it
>> executes (including the all-important comparison).
>>
>> I cannot imagine why using awd would change the behavior
>> of the E script.
>>
>> Russ



Re: [9fans] git and (p9p) acme

2012-04-26 Thread Mathieu Lonjaret
I've just retried on the machine where I had the problem and it now
just works. No need even for awd indeed.
I'll try and reproduce the behavior, but I just don't see what I may
have done different the previous times...

thanks,
Mathieu

On Thu, Apr 26, 2012 at 5:32 AM, Russ Cox  wrote:
> On Wed, Apr 25, 2012 at 5:35 PM, Mathieu Lonjaret
>  wrote:
>> So, are you saying E just works out of the box for you as the $EDITOR
>> for git/hg?
>
> Yes.  Note that E waits for the file to change by running
> ls -l on the file in a loop.  If for some reason doing the Put
> does not change the ls -l output (date+size, primarily) then
> E will not exit.  If you are having trouble I would suggest
> putting some echo statements in the script or just doing
> 'set -e' at the top so that it echoes each statement as it
> executes (including the all-important comparison).
>
> I cannot imagine why using awd would change the behavior
> of the E script.
>
> Russ



Re: [9fans] git and (p9p) acme

2012-04-25 Thread Mathieu Lonjaret
Indeed, it seems like awd was all that was needed.
Thanks!

On Wed, Apr 25, 2012 at 11:49 PM, Aram Hăvărneanu  wrote:
>> I guess all you need to run up awd in your cd alias. I think I stole
>> my cd function from Russ.
>
> Actually, the way one does this is documented in label(1). Beware that
> this requires X, hence the $DISPLAY check in my profile.
>
> --
> Aram Hăvărneanu
>



Re: [9fans] git and (p9p) acme

2012-04-25 Thread Mathieu Lonjaret
So, are you saying E just works out of the box for you as the $EDITOR
for git/hg?
Or did you have to tweak a few things like what Aram and Dexen describe?

I wouldn't mind using E as it is, with Put being the trigger to the
tool (git in that case), but it does not seem to be working here.

On Wed, Apr 25, 2012 at 10:21 PM, Russ Cox  wrote:
> I guess it depends on what you expect to break.
> I like using the E script because (once you learn not
> to click Put, which doesn't take too long) after I click
> Put the window is still there with my work in it in case
> the tool I just sent it to chooses to blow up and
> discard my efforts.
>
> Russ



Re: [9fans] git and (p9p) acme

2012-04-25 Thread Mathieu Lonjaret
Indeed.

On Fri, Apr 20, 2012 at 9:39 PM, Mark van Atten
 wrote:
> Mathieu Lonjaret  a écrit :
>
>
>>> http://sqweek.net/plan9/acmeedit
>>
>>
>> Nice, it almost works out of the box.
>> I got a 9p error message when using it:
>> 9p: write error: ill-formed control message
>
>
> In /lib/acme.rc, there is
>
> fn newwindow {
>        winctl=`{9p read acme/new/ctl}
>        winid=$winctl(1)
>        winctl noscroll
> }
>
> I think the noscroll no longer functions; I commented it out, and then
> acmeedit no longer produces the error message.
>
> Best wishes,
> Mark.
>
> --
> Directeur de recherches, CNRS
> IHPST, 13 rue du Four, 75006 Paris, France
> tel ++ 33 (0)1 43 54 60 36, fax ++ 33 (0)1 43 25 29 48
> http://www-ihpst.univ-paris1.fr/en/6,mark_van_atten.html
>
>
> --
> Ce message a ete verifie par MailScanner
> pour des virus ou des polluriels et rien de
> suspect n'a ete trouve.
>



Re: [9fans] git and (p9p) acme

2012-04-20 Thread Mathieu Lonjaret
Thanks Dexen and Aram for the explanation.

On Fri, Apr 20, 2012 at 6:04 PM, sqweek  wrote:
> On 19 April 2012 19:51, Mathieu Lonjaret  wrote:
>> Is anyone using git with p9p acme set as the editor?
> 
>> I use E instead (which I thought was meant for that), git does not
>> "notice" when I Put the file, so it just hangs there.
>
>  I never tried using EDITOR=E, instead wrote my own little script. I'm
> a little compulsive when it comes to hitting Put, so my script
> actually waits until you delete the acme window. Also you can hit
> "Cancel" to have the script exit non-zero. Anyway this is what I use
> for $EDITOR/$VISUAL:
>
> http://sqweek.net/plan9/acmeedit

Nice, it almost works out of the box.
I got a 9p error message when using it:
9p: write error: ill-formed control message
but it actually does the job anyway.
Thanks!

I'll investigate later on to see which part fails exactly.



[9fans] git and (p9p) acme

2012-04-19 Thread Mathieu Lonjaret
Hello,

Is anyone using git with p9p acme set as the editor?
Most things here work fine (as long as the pager is set to cat or
something like that), but I've been having problems with 'git commit
--amend'. If I use B as the $EDITOR, git considers the log file edited
as soon as it is opened in acme (and does not wait for a Put), and if
I use E instead (which I thought was meant for that), git does not
"notice" when I Put the file, so it just hangs there.
Am I missing something? is there a simple solution to that?

Cheers,
Mathieu



Re: [9fans] Question about usage of Plan 9 based os systems

2012-03-21 Thread Mathieu Lonjaret
On Wed, Mar 21, 2012 at 6:54 PM, Ethan Grammatikidis
 wrote:

> I now use Plan 9 for everything that does not involve 3D graphics, the
> www, or email. The latter is because as far as I'm aware there's no way
> to get a threaded message view.

I don't think it would be much effort to address that point if it
really matters to you.
You could use that:
https://bitbucket.org/mpl/acmemail-with-sort-by-thread/src as an
example (or not).



Re: [9fans] 9vx - prerequisites

2011-10-25 Thread Mathieu Lonjaret
The packages usually missing are at least:
libx11-dev libxt-dev libxext-dev
--- Begin Message ---
I'm not familiar enough with Linux and APT to figure this one out:
what are the prerequisites for 9vx that are not intrinsically met by a
standard UBUNTU installation?  The immediate need is related in some
way to x11-draw, but that is not the name of an apt package.

++L

--- End Message ---


Re: [9fans] thanks iwp9 organizers

2011-10-24 Thread Mathieu Lonjaret
Good times indeed, thanks.



Re: [9fans] Announcing Inferno for Android phones

2011-09-23 Thread Mathieu Lonjaret
Because deep inside you know it's just an elaborate ruse from brucee.

On Fri, Sep 23, 2011 at 3:40 PM, Richard Miller <9f...@hamnavoe.com> wrote:
>>> The Wank E5 was AU$50.
>
> Why is it that I can't quite summon up the courage to do a
> google search for "wank phone"?
>
>
>



Re: [9fans] reverse search direction in p9p acme

2011-09-19 Thread Mathieu Lonjaret
On Mon, Sep 19, 2011 at 10:37 AM, roger peppe  wrote:
> i'm not sure about adding more invisible state to acme
> windows.

Well I needed to do that in a hurry, but I'll gladly reimplement it
later better if you have a nice suggestion.

> i've sometimes imagined a version of acme where shift-right-click
> would reverse the search. no way of implementing it under
> plan 9 itself though.

Yeah my first idea was with ctrl+right click but I figured it was
easier/faster to just add it as a text command.

> On 19 September 2011 09:19, Mathieu Lonjaret  
> wrote:
>> I haven't tried, but I don't see why not.
>>
>> On Mon, Sep 19, 2011 at 10:01 AM, Peter A. Cejchan  wrote:
>>> would it run on native plan9, too?
>>> thanks, peter, aka
>>> ++pac
>>>
>>
>>
>
>



Re: [9fans] reverse search direction in p9p acme

2011-09-19 Thread Mathieu Lonjaret
I haven't tried, but I don't see why not.

On Mon, Sep 19, 2011 at 10:01 AM, Peter A. Cejchan  wrote:
> would it run on native plan9, too?
> thanks, peter, aka
> ++pac
>



Re: [9fans] reverse search direction in p9p acme

2011-09-18 Thread Mathieu Lonjaret
On Sun, Sep 18, 2011 at 4:30 PM, dexen deVries  wrote:
> On Sunday 18 September 2011 16:19:28 Mathieu Lonjaret wrote:
>> As the description says:
>> "I found I want to quickly look for something upwards often enough
>> that it was getting annoying to have to type :-/ or :? everytime. With
>> this I just have to exec Rev in the tag bar to reverse the search
>> direction."
>
> missed that one, thanks. looks good.
>
>
>> Furthermore, with :-/foobar, you have to go back with your mouse to
>> the tag bar where you typed this for every subsequent search.
>
> that depends. if you first select the whole :-/REGEX with left mouse button
> and then right-click, the cursor remains over the expression and you don't
> have to return to the tag bar.

Ah, yes. scratch my last remark then.



Re: [9fans] reverse search direction in p9p acme

2011-09-18 Thread Mathieu Lonjaret
As the description says:
"I found I want to quickly look for something upwards often enough
that it was getting annoying to have to type :-/ or :? everytime. With
this I just have to exec Rev in the tag bar to reverse the search
direction."
Furthermore, with :-/foobar, you have to go back with your mouse to
the tag bar where you typed this for every subsequent search.

On Sun, Sep 18, 2011 at 3:56 PM, dexen deVries  wrote:
> On Sunday 18 September 2011 15:32:27 Mathieu Lonjaret wrote:
>> Ah thanks, I always forget private is the default in bitbucket.
>> better now?
>
> yep.
>
> you commited only the final version; it'd be easier to read if you commited
> first vanilla and then your changes.
>
> please explain: how's your Rev command better than searching via :-/REGEX? Is
> Rev the equivalent of Look?
>
>
> --
> dexen deVries
>
>> It's called trolling. It's been done since there were bangs in people's
> email addresses.
>
> thaumaturgy, on HN
>
>



Re: [9fans] reverse search direction in p9p acme

2011-09-18 Thread Mathieu Lonjaret
Ah thanks, I always forget private is the default in bitbucket.
better now?

On Sun, Sep 18, 2011 at 3:28 PM, dexen deVries  wrote:
> On Sunday 18 September 2011 15:21:34 Mathieu Lonjaret wrote:
>> in case anyone's interested:
>>
>> https://bitbucket.org/mpl/acme-with-easy-backwards-search
>
>
>
> Error
> You do not have access to this repository.
>
>
> --
> dexen deVries
>
>> It's called trolling. It's been done since there were bangs in people's
> email addresses.
>
> thaumaturgy, on HN
>
>



[9fans] reverse search direction in p9p acme

2011-09-18 Thread Mathieu Lonjaret
Hi,

in case anyone's interested:

https://bitbucket.org/mpl/acme-with-easy-backwards-search

Cheers,
Mathieu



Re: [9fans] Announcing Inferno for Android phones

2011-09-17 Thread Mathieu Lonjaret
Good to know, thanks!

On Sat, Sep 17, 2011 at 12:58 PM, Richard Miller <9f...@hamnavoe.com> wrote:
>> Any idea how much work it would be to adapt that for the nokia n900?
>
> No need for the android version on maemo - standard hosted
> inferno "just works" on the n900.  I've been running it for
> quite a while (or was until my pocket was picked in Paris last
> week ☹).  I'll have to go back to my n800 (=n900 without the
> phone part) which also runs standard inferno happily, after a
> small mod to win-x11a (in contrib/miller/inferno/n800).
>
> N900 is a nice device, but android phones can be a lot cheaper.
>
>
>



Re: [9fans] Announcing Inferno for Android phones

2011-09-16 Thread Mathieu Lonjaret
Brilliant.
Any idea how much work it would be to adapt that for the nokia n900?
(runs maemo linux as native OS, or an half-assed android -nitdroid-
with some hackery.)

On Sat, Sep 17, 2011 at 12:32 AM, andrey mirtchovski
 wrote:
> this is cool!
>
> On Fri, Sep 16, 2011 at 4:23 PM, John Floren  wrote:
>> We would like to announce the availability of Inferno for Android
>> phones. Because our slogan is "If it ain't broke, break it", we
>> decided to replace the Java stack on Android phones with
>> Inferno. We've dubbed it the Hellaphone--it was originally Hellphone,
>> to keep with the Inferno theme, but then we realized we're in Northern
>> California and the change was obvious.
>>
>> The Hellaphone runs Inferno directly on top of the basic Linux layer
>> provided by Android. We do not even allow the Java system to
>> start. Instead, emu draws directly to the Linux framebuffer (thanks,
>> Andrey, for the initial code!) and treats the touchscreen like a
>> one-button mouse. Because the Java environment doesn't start, it only
>> takes about 10 seconds to go from power off to a fully-booted Inferno
>> environment.
>>
>> As of today, we have Inferno running on the Nexus S and the Nook
>> Color. It should also run on the Android emulator, but we haven't
>> tested that in a long time. The cell radio is supported, at least on
>> the Nexus S (the only actual phone we've had), so you can make phone
>> calls, send texts, and use the data network.
>>
>> The Inferno window manager has been re-worked with cell phone use in
>> mind. Windows are automatically sized to fill the whole screen. The
>> menu has been moved to the top and the menu items have been made
>> significantly larger. Physical buttons on the phone are now used to do
>> many common tasks:
>>
>>    (these keys are for the Nexus S, different bindings are used for
>> the Nook, which has different keys available)
>>    * Back: Close the current window
>>    * Menu: Toggle the onscreen keyboard
>>    * Home: Minimize the current window
>>    * Power: Turn off the screen
>>    * Power+Volume Up: Open the screen brightness widget
>>    * Power+Volume Down: Turn off the phone
>>    * Power+Home: Restart Inferno
>>
>> Installation is reasonably simple. You'll need the Android SDK
>> (http://developer.android.com/sdk/index.html), with the platform-tools
>> package installed for the adb and fastboot utilities. We also strongly
>> recommend installing CyanogenMod on your phone before
>> proceeding--that's what we use to test.
>>
>> First, make absolutely sure you have the "adb" and "fastboot"
>> commands in your path--see the previous paragraph regarding the
>> SDK and try running "adb" to be sure. Download the tarball from
>> http://bitbucket.org/floren/inferno/downloads/hellaphone.tgz and
>> unpack it in your root. You should end up with a /data/inferno
>> directory (we put it there because of the Inferno build
>> process). Then, go to the /data/inferno/android directory and run
>> the Reflash-Nexus-S.sh script (assuming you have a Nexus S. Run
>> Reflash-Nook-Color.sh if you have a Nook). This will
>> automatically set up the phone to boot into either Inferno or the
>> regular Java environment--during bootup, the screen will go solid
>> white; if you touch the screen at this point, it will boot into
>> the regular Android environment, otherwise it will timeout and go
>> to Inferno. However, at this point you're not yet ready to boot
>> into Inferno, so reboot the phone and touch the screen to go into
>> the regular Android UI. The final task is to run the command "cd
>> /data/inferno; ./parallel-push.sh". Reboot, let it boot into
>> Inferno, and you're ready to go.
>>
>> You can also clone the repository
>> (http://bitbucket.org/floren/inferno/) and build it yourself, but this
>> is a significant effort. I do not recommend it if you wish to simply
>> try the system, but if you want to do development you should get the
>> repository.
>>
>> Disclaimer: If you break your phone, it's not our fault. Don't email
>> us, don't come knocking on our door, and don't call us--oh wait, you
>> won't be able to do that anyway, your phone is broken!
>>
>> Credit where credit is due: Ron Minnich came up with the initial
>> idea--we've been kicking the idea of a Plan 9/Inferno phone around for
>> years. Our summer interns, Joel Armstrong and Joshua Landgraf, did the
>> lion's share of the work of making Inferno into a usable cell phone
>> OS--no small feat, considering that neither had any Limbo or Inferno
>> experience before the start of the summer! They re-wrote the UI,
>> puzzled out the undocumented cell radio interface, figured out audio,
>> worked to make Inferno more portable across phones, and generally
>> figured out how to make Inferno and the Android kernel coexist
>> peacefully. Andy Jones, another intern, also did some very early work
>> with Android that helped us figure out the Android init process and
>> how to build for Android. I took care of getting Inferno run

Re: [9fans] Plan 9 stack limit?

2011-09-06 Thread Mathieu Lonjaret
maybe slightly relevant:
http://9fans.net/archive/2010/05/446
(see also answers from others as well afterwards).

On Wed, Sep 7, 2011 at 12:30 AM, Comeau At9Fans  wrote:
> I have an application that is crashing on Plan 9.  Now, it could be a bug in
> the code, but in the past, similar problems with the same code base on other
> platforms have always been caused by the system stack being blown out, and
> in a less rare case, the systems running out of process space.  The crashes
> are happening on 9vx.OSX (which is currently the only place it can be tested
> on our systems).   Does 9vx have any such limitations and/or does Plan 9 in
> general have any such limits?  And if so, can they be changed?   I see some
> of the threading calls have stack size requests possible, but don't see any
> such concerns as a consequence of a fork, though I'm sure fork is
> semantically equivalent to some other calls when all is said and done.
> Like I said, it could be a bug in the code, but I'd like to approach it from
> this level first assuming there is any such interaction that even exists so
> any insights would be appreciated.
>
> --
> Greg Comeau / 4.3.10.1 with C++0xisms now in beta!
> Comeau C/C++ ONLINE ==>     http://www.comeaucomputing.com/tryitout
> World Class Compilers:  Breathtaking C++, Amazing C99, Fabulous C90.
> Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
>



Re: [9fans] searching in email using imap

2011-08-27 Thread Mathieu Lonjaret
Neat trick, thanks.

On Sun, Aug 28, 2011 at 12:47 AM, Fazlul Shahriar  wrote:
> If you're using the p9p mailfs, you can do this:
>
>    echo keyword | 9p rdwr mail/mbox/search
>
> and it'll print the ids of the matched messages. I don't think an
> interface for this exists in acme Mail.
>
> fhs
>
> On Sat, Aug 27, 2011 at 2:55 PM, Rudolf Sykora  
> wrote:
>> Hello,
>>
>> when using gmail via web, one
>> i) immediately sees what folders/labels they have,
>> ii) can search the mail (i.e. also its contents).
>>
>> I'd like to know how one can/could obtain this information when using imap.
>> I believe (I read it somewhere) that imap has some means to ask the
>> server to search the mail...
>> (It'd be nice to have such possibility somehow integrated into acme/Mail.)
>>
>> Can anybody comment on this?
>>
>> Thanks!
>> Ruda
>>
>>
>
>



Re: [9fans] get the last write offset in p9p acme

2011-08-25 Thread Mathieu Lonjaret
Ah yes, thx for the tip.

On Wed, Aug 24, 2011 at 7:03 PM, Russ Cox  wrote:
> Seems fine to me.
> You can shorten to w.Addr(",")
>
>



[9fans] get the last write offset in p9p acme

2011-08-24 Thread Mathieu Lonjaret
Hi,

After I've written a bunch of lines in an acme win ( with (w *Win)
Write("body",...), I need to know (and save) the position of the last
char I've written.
I need that position because I want everything I write afterwards to
be written there, and not appended. (constantly overwriting the last
thing that was written).

So the silly trick I've used to get that position is to first select
the whole text and then get the address of the end of the selection,
as the following:

err = w.Addr("%s", "#0,")
if err != nil {
return err
}
_, pos, err := w.ReadAddr()

Is there a more direct way?

Thanks,
Mathieu



Re: [9fans] mail client; general question web vs command

2011-08-13 Thread Mathieu Lonjaret
On Sat, Aug 13, 2011 at 8:38 PM, Rudolf Sykora  wrote:
>> cd src/cmd/upas/nfs
>> mk install
>> factotum
>> factotum -g 'key=somekey proto=pass service=imap
>> server=some.imap.server.com user=your_username !password?'
>> (it will ask for the pass you want to store for that key)
>> mailfs -t some.imap.server.com
>> in acme, button-2 exec on Mail -s
>>
>> Cheers,
>> Mathieu
>
> Thanks for your answer!
> Anyway, I still haven't succeeded, and have a few questions.
>
> 1) Is nfs (lookman nfs or mailfs returns nothing) a new program
> written for p9p just to be used for an imap connection to some mail
> server?

http://9fans.net/archive/2009/02/415

> 2) Do I really have to add the key to factotum or is it enough (for
> testing purposes) to just have it running (and it will ask me for
> whatever is later needed)?

dunno. I suppose it should, I don't remember why I don't proceed like that.
try it and tell us? :)

> 3) When I try to use mailfs, I get
>
> % mailfs -t imap.gmail.com
> /sbin/stunnel exec failed at /usr/sbin/stunnel3 line 39.
> mailfs: imapconnect: no greeting
>
> and I really do not know what's going on...
> (I have tried to replace stunnel with stunnel3, as mentioned by Fazlul
> Shahriar; but I actually I don't understand the matter.)

what's your distro? have you checked what stunnel packages are available to you?
Isn't your /usr/bin/stunnel a symlink to another one?
also what Fazlul said.

> If you could clarify the situation for me a bit, I'd be appreciative.
>
> Thanks
> Ruda
>
>



Re: [9fans] mail client; general question web vs command

2011-08-11 Thread Mathieu Lonjaret
gmail wrapped the line; there shouldn't be a break between the service
and the server.

On Thu, Aug 11, 2011 at 12:54 PM, Mathieu Lonjaret
 wrote:
> I'm not sure I've tried with gmail, I think I did, but a long time ago.
> Otherwise it's pretty simple:
>
> cd src/cmd/upas/nfs
> mk install
> factotum
> factotum -g 'key=somekey proto=pass service=imap
> server=some.imap.server.com user=your_username !password?'
> (it will ask for the pass you want to store for that key)
> mailfs -t some.imap.server.com
> in acme, button-2 exec on Mail -s
>
> Cheers,
> Mathieu
>
> On Thu, Aug 11, 2011 at 12:42 PM, Rudolf Sykora  
> wrote:
>>> Can anybody point me to some recipe which would get me from a point
>>> when I have p9p installed to a point when I can read mail from my
>>> gmail account via imap(s) in p9p acme?
>>
>> Well, that's a pity nobody can help :(
>>
>> Is there any reason for that man pages of p9p
>> http://swtch.com/plan9port/man/
>> do not mention neither upas nor mail?
>> (So nobody actually uses it today?)
>>
>> Also, although some mail program is present,
>> /src/cmd/acme/mail
>> it is apparently not installed by default?
>>
>> [I'm tired of the web interface. I tried mutt, which was easy to set
>> up since you can find instructions for this. But I want the acme mail.
>> And there seem to be many things `somehow around', but not a coherent
>> explanation of how to put the pieces (and which) together...]
>>
>> Thanks
>> Ruda
>>
>>
>



Re: [9fans] mail client; general question web vs command

2011-08-11 Thread Mathieu Lonjaret
I'm not sure I've tried with gmail, I think I did, but a long time ago.
Otherwise it's pretty simple:

cd src/cmd/upas/nfs
mk install
factotum
factotum -g 'key=somekey proto=pass service=imap
server=some.imap.server.com user=your_username !password?'
(it will ask for the pass you want to store for that key)
mailfs -t some.imap.server.com
in acme, button-2 exec on Mail -s

Cheers,
Mathieu

On Thu, Aug 11, 2011 at 12:42 PM, Rudolf Sykora  wrote:
>> Can anybody point me to some recipe which would get me from a point
>> when I have p9p installed to a point when I can read mail from my
>> gmail account via imap(s) in p9p acme?
>
> Well, that's a pity nobody can help :(
>
> Is there any reason for that man pages of p9p
> http://swtch.com/plan9port/man/
> do not mention neither upas nor mail?
> (So nobody actually uses it today?)
>
> Also, although some mail program is present,
> /src/cmd/acme/mail
> it is apparently not installed by default?
>
> [I'm tired of the web interface. I tried mutt, which was easy to set
> up since you can find instructions for this. But I want the acme mail.
> And there seem to be many things `somehow around', but not a coherent
> explanation of how to put the pieces (and which) together...]
>
> Thanks
> Ruda
>
>



[9fans] shell for wins in p9p acme

2011-08-11 Thread Mathieu Lonjaret
Hi,

what's the best solution if I want all the wins I open in acme to
automatically have rc as a shell (with -l, so that my lib/profile has
been read too), while still keeping bash as my SHELL when I'm out of
acme, for various reasons.
So far I simply have a script/launcher for acme that exports the SHELL
to rc before starting acme, but I still have to source lib/profile
everytime I open a new win, which is a bit annoying.

Of course I could change src/cmd/9term/rcstart.c, but if there's a
less intrusive solution I'd like to hear it please.

Cheers,
Mathieu



Re: [9fans] mail client; general question web vs command

2011-08-04 Thread Mathieu Lonjaret
Btw, for those who don't know yet, I have a version here with
threading for p9p acme Mail:
https://bitbucket.org/mpl/acmemail-with-sort-by-thread/overview
nothing fancy but it suits my needs well enough.

On Sun, Jul 31, 2011 at 10:14 PM, Jacob Todd  wrote:
> Acme has Mail. It doesn't do threading like mutt or anything, but it works.



Re: [9fans] Compiling 9atom kernel WAS: Re: spaces in filenames

2011-05-08 Thread Mathieu Lonjaret
> In Brian Kernighan's sentence, s/cleverly/sophisticatedly/ (this is
> probably a barbarism, but in french "sophistiqué" is pejorative:
> obfuscation, convoluted etc.).

Sorry, but it's not. it just means complex, and is not usually
employed to make any value judgment.
Just look it up in any dictionary.



Re: [9fans] 9vx: one less version to care about

2011-04-08 Thread Mathieu Lonjaret
brilliant. thanks to both for that.
--- Begin Message ---
My 9vx tree and ron's one are exactly the same now. Ron has write
access to my repo now, which will be used for development from now on,
while the one at bitbucket.org/rminnich/vx32 will be more stable and
the only one most users will have to worry about.

I hope this helps to avoid some of the confussion generated by having
many similar-but-different 9vx versions around.


-- 
- yiyus || JGL .
--- End Message ---


Re: [9fans] problem with rminnich's 9vx

2011-03-29 Thread Mathieu Lonjaret
On Tue, Mar 29, 2011 at 6:09 PM, ron minnich  wrote:
> On Tue, Mar 29, 2011 at 8:42 AM, Mathieu Lonjaret
>  wrote:
>> Well, since Ron's tree is based on Yiyus', and Ron's doesn't have that
>> patch, I think that means Yiyus' doesn't have it either. And yet,
>> Yiyus' works for me, so I doubt this bug was the culprit for me. More
>> like a 64 bits issue as Yiyus mentionned earlier, no?
>
> well, actually, it's more like yiyus forked mine long ago and then we
> trade patches ... so it's not clear what's going on here. Did you look
> to see if yiyus took that patch?

Yes I looked, it doesn't have it.
https://bitbucket.org/yiyus/vx32/src/398d27a1f253/src/9vx/a/fmt.c

> I run 9vx on 64-bit boxes all the time. One thing I do know is that
> ubuntu keeps adding things to the libraries and compiler, so: what
> version of ubuntu?

10.04.2

> I tend to trust Christoph's diagnosis on this one but ...

and you were right to, because I've just tried it and it also works.
so both yours with Christoph's patch and yiyus's without it do, 2
different ways to fix the problem. :)



Re: [9fans] problem with rminnich's 9vx

2011-03-29 Thread Mathieu Lonjaret
Well, since Ron's tree is based on Yiyus', and Ron's doesn't have that
patch, I think that means Yiyus' doesn't have it either. And yet,
Yiyus' works for me, so I doubt this bug was the culprit for me. More
like a 64 bits issue as Yiyus mentionned earlier, no?

On Tue, Mar 29, 2011 at 5:06 PM, Christoph Lohmann <2...@r-36.net> wrote:
> Hello,
>
> Mathieu Lonjaret wrote:
>>
>> this last error keeps on repeating.
>> as a plan 9 tree I'm using the same old one that I kept using with rsc's
>> 9vx (minimal tree provided by rsc, and later filled with more plan 9
>> stuff), could that be the issue? if yes, what do you guys for a tree
>> with ron's 9vx?
>
> the bug is easy to solve [0]. Ron didn't integrate my patch
> for this one for a long time, so I started my own repository
> of 9vx.
>
> I tried to solve the problem by resolving all sprint() occur-
> ences in the Plan 9 kernel and that way in 9vx too. The patch
> wasn't accepted; sprint() needs to be fixed.
>
>
> Sincerely,
>
> Christoph Lohmann
>
> [0]
> http://git.r-36.net/vx32/commit/?id=d6e5c080a23fcb914b740db48573305f3712eba0
>
>



Re: [9fans] problem with rminnich's 9vx

2011-03-29 Thread Mathieu Lonjaret
Good call; yours starts without a problem, thanks.

On Tue, Mar 29, 2011 at 11:47 AM, yy  wrote:
> ron's 9vx and mine are compiled differently in 64bits systems, so you
> can try mine and see if there is any difference, but I don't really
> know. I don't have any x86_64 system I can use to test 9vx, so please
> let me know if things get better (or worse). If you don't want to
> download the whole vx32 tree again you can just rollback the last
> changes by ron and compile that, the result will be the same.
>
>> what do you guys for a tree
>> with ron's 9vx?
>
> For testing, I always use a plan9.iso file (a full tree can solve some
> problems but I don't think it will solve yours). When I need write
> permissions I use a kfs file I filled with the contents of the iso.
>
>
> --
> - yiyus || JGL .
>



Re: [9fans] problem with rminnich's 9vx

2011-03-29 Thread Mathieu Lonjaret
Nothing remote or fancy here, just starting 9vx locally (-u glenda -r
plan9vx) after having built it.
However, it is a 64 bits linux and I haven't done anything special or
set any flag when building (cd src; make; make install). Should I?

On Tue, Mar 29, 2011 at 11:18 AM, Noah Evans  wrote:
> I've seen this behavior before, once using 9vx on a remote xsession
> and once when using strace on a (broken) 9vx that was compiled for
> 32bit on a 64bit linux. Are there any mitigating factors that could be
> causing your problem?
>
> Noah
>
>
>
> On Tue, Mar 29, 2011 at 11:00 AM, Mathieu Lonjaret
>  wrote:
>> Hi all,
>>
>> this is probably trivial; this is what I get when trying to start 9vx:
>>
>> Warning! factotum can't protect itself from debugging: '#p/5' file does not 
>> exist
>> init: warning: can't open #p/2/ctl: '#p/2' file does not exist
>>
>> init: starting /bin/rc
>> FAILED
>> Warning! auth/factotum can't protect itself from debugging: '#p/64' file 
>> does not exist
>> rio: can't open display: initdisplay: /dev/draw/new: no frame buffer
>> init: rc exit status: rio 9: display open
>>
>> init: starting /bin/rc
>> #d/0: rc: .: can't open: '#d/0' file does not exist
>> init: rc exit status: rc 67: error
>>
>> init: starting /bin/rc
>> #d/0: rc: .: can't open: '#d/0' file does not exist
>> init: rc exit status: rc 68: error
>>
>> this last error keeps on repeating.
>> as a plan 9 tree I'm using the same old one that I kept using with rsc's
>> 9vx (minimal tree provided by rsc, and later filled with more plan 9
>> stuff), could that be the issue? if yes, what do you guys for a tree
>> with ron's 9vx?
>>
>> uname -a:
>> Linux 2.6.32-30-generic #59-Ubuntu SMP Tue Mar 1 21:30:46 UTC 2011 x86_64 
>> GNU/Linux
>>
>> Cheers,
>> mathieu
>>
>>
>>
>



[9fans] problem with rminnich's 9vx

2011-03-29 Thread Mathieu Lonjaret
Hi all, 

this is probably trivial; this is what I get when trying to start 9vx:

Warning! factotum can't protect itself from debugging: '#p/5' file does not 
exist
init: warning: can't open #p/2/ctl: '#p/2' file does not exist

init: starting /bin/rc
FAILED
Warning! auth/factotum can't protect itself from debugging: '#p/64' file does 
not exist
rio: can't open display: initdisplay: /dev/draw/new: no frame buffer
init: rc exit status: rio 9: display open

init: starting /bin/rc
#d/0: rc: .: can't open: '#d/0' file does not exist
init: rc exit status: rc 67: error

init: starting /bin/rc
#d/0: rc: .: can't open: '#d/0' file does not exist
init: rc exit status: rc 68: error

this last error keeps on repeating.
as a plan 9 tree I'm using the same old one that I kept using with rsc's
9vx (minimal tree provided by rsc, and later filled with more plan 9
stuff), could that be the issue? if yes, what do you guys for a tree
with ron's 9vx?

uname -a:
Linux 2.6.32-30-generic #59-Ubuntu SMP Tue Mar 1 21:30:46 UTC 2011 x86_64 
GNU/Linux

Cheers,
mathieu




[9fans] xplor on plan 9

2011-03-21 Thread Mathieu Lonjaret
Hi all,

Since a couple peeps asked for it, here it is:
https://bitbucket.org/mpl/xplor9/overview

I ported it quick and dumb, so it's probably as inefficient/slow as
the go version, and it's barely tested, so it might be leaky as well.

it misses a few feats and I intend to fix a few corner cases as well
later, but it is already usable imho (only tested on 9vx). So please
do try it if you're interested, and send patches to fix its uglyness
;)

Cheers,
Mathieu



Re: [9fans] anybody figured out a way to use acme as graphical merging tool for hg?

2011-03-16 Thread Mathieu Lonjaret
Hello,

Maybe that would help, as a starting point?

http://9fans.net/archive/2009/06/138

mathieu
--- Begin Message ---
Hi all

As I believe there a few hg users here. I was wondering if anybody has
a way to use acme to resolve merge conflicts by showing the diffs in
different panes.

fernan
--- End Message ---


[9fans] new commands in xplor

2011-01-09 Thread Mathieu Lonjaret
Hello,

for those interested, I've added two new commands to xplor: Win and Xplor.

Win opens a new acme win with an rc, and Xplor obviously a new win
with an xplor.
By default they open by default at the root of the current xplor, but
the neat thing is you can chord 2-1 on them and they'll open at
whatever location your cursor points at in the current xplor.

I needed Win because I was tired to cd back and forth between
different locations "far" away from each other, I find it's nicer to
open new wins from xplor.
The Xplor one is kindof for the same reason but also to compensate for
the slowness of xplor with big directories (the reason for that is I'm
doing all the path lookups by going up the text, as there is no real
tree structure behind the scenes, so the further down the list a file
is, the slower it gets). Opening a new xplor with the root set to the
directory you're interested in allows for faster lookups in there.

Comments very welcome.

https://bitbucket.org/mpl/xplor

Cheers,
Mathieu



Re: [9fans] latest minicluster: ARM fun

2010-12-01 Thread Mathieu Lonjaret
And it even makes a very decent christmas tree, with all the pretty lights! ;)

On Tue, Nov 30, 2010 at 6:56 PM, ron minnich  wrote:
> Here is our latest minicluster design.
>
> We used the gumstix stagecoach.
>
> It's nice, 196 Ovaros in a box. We had a number of failed attempts on
> an enclosure design:
> http://picasaweb.google.com/rminnich/Strongbox?authkey=Gv1sRgCI6PwZXM57iZ8gE#
>
> That was my first design, it was really quite compact and fun, and it
> was a huge pain to assemble. It hit the basic high points however: 7
> nodes per stagecoach, 7 stagecoaches per shelf, a switch per shelf
> that reduced the outgoing enet cables to one. Power was a huge issue;
> 5V 80A per shelf, which was not fun. 10 GA wires never are.
>
> I know at least some people on this list know Mitch Williams. He came
> up with this:
> http://picasaweb.google.com/rminnich/StrongboxAtSC10?authkey=Gv1sRgCJbWpcfci73HxwE#
> It's quite elegant: self-contained shelves, with power supply,
> Rigrunner for fuses,
> continues the use of an 8-port switch per shelf, so each shelf has one
> 120V power cable and one enet cable coming out.
>
> Plan 9 is in the works. This is a nice test and development platform
> for software. We're going to make the design available in a way that
> people can easily build their own.
>
> ron
>
>



Re: [9fans] Why not work for a company based on Plan 9?

2010-10-26 Thread Mathieu Lonjaret
Hello,

another one which might be a FAQ:
Do you require applicants to be from the USA, or are you ok with ppl
from the old continent (or anywhere else for that matter) ?

Cheers,
Mathieu
--- Begin Message ---
hi guys,

as most on this list know, coraid makes storage devices that use plan 9 as the 
software platform.  we also use it as our primary development environment.  we 
still run a ken file server here.  plan 9 is fundamental to our vision.  coraid 
has become a hot silicon valley property and we are about to start another 
round of hiring developers.  i knew it would be a disservice to this mailing 
list if i didn't make an announcement here.

developers, qa, and support folks can work either in redwood city, ca or 
athens, ga.  there are the usual up and coming silicon valley startup stock 
options.  and in athens, you don't have to pay those silicon valley prices for 
housing and beer.  athens is very affordable on both these counts, especially 
the beer as anyone who attended the 2009 iwp9 will attest.

i hope we're creating a place that i would have wanted to work.  it's not every 
place that you can work with plan 9, get paid for it and participate in a high 
potential start-up.

please send resume's to me.

brantley

--- End Message ---


[9fans] fOSSa

2010-10-25 Thread Mathieu Lonjaret
Hi,

Will anyone here be attending fOSSa?
(http://fossa2010.inrialpes.fr/)
I'm afraid it doesn't look very interesting from a technical pov...

Mathieu



Re: [9fans] IBM Research Internship Position Available

2010-09-23 Thread Mathieu Lonjaret
Hello, 

when would the job start?

mathieu
--- Begin Message ---
6 month posting for graduate students only to work on the DOE HARE
project (http://is.gd/foRdS)
This is the third and last year of funding, so don't miss out on a
great opportunity to work on Plan 9
on one of the largest supercomputers on the planet.

Job posting is here: http://is.gd/foQOS

  -eric
--- End Message ---


Re: [9fans] [OT] CSP in fortran ?

2010-09-16 Thread Mathieu Lonjaret
I was about to :)
>From what I read I see no advantage over Co-Array for what I want to
do though...

thanks,
mathieu
--- Begin Message ---
I don't like it very much but ... have you looked at openmp? (NOT
openmpi, openmp)

ron
--- End Message ---


[9fans] [OT] CSP in fortran ?

2010-09-16 Thread Mathieu Lonjaret
Hi all,

A bit offtopic, but since I know some HPC and/or csp pros are reading
9fans...

I have to work on a piece of fortran code to break it into pieces that
would run concurrently (à priori SPMD kind) , typically on a multicore
machine, not really on a big HPC cluster. One of the requirements is
to bring the least amount of modifications to the current code (for
maintainability).

I was hoping to find a fortran lib similar to p9p libthread, but not
much luck so far. Does anyone know of something like that?
I have started tackling it with CoArrays (http://www.co-array.org/),
and I'm going to try with MPI next. What would you guys recommend between
the two for that kind of problem?

Thanks,
Mathieu




Re: [9fans] alt and chanfree

2010-09-15 Thread Mathieu Lonjaret
Ah indeed, thank you.
--- Begin Message ---
On 15 September 2010 09:15, Mathieu Lonjaret  wrote:
> I haven't tried chanclose() yet, but setting to nil the freed chan in the
> alt entry is not really what I wanted since it will make alt() return -1
> (better than crashing but not ideal).

it wouldn't return -1 (assuming there are at least some valid channels
in the alt array) if you set the op to CHANNOP as well as setting c
to nil.
--- End Message ---


Re: [9fans] alt and chanfree

2010-09-15 Thread Mathieu Lonjaret
I haven't tried chanclose() yet, but setting to nil the freed chan in the
alt entry is not really what I wanted since it will make alt() return -1
(better than crashing but not ideal).
In any case I found a satisfying workaround in my algorithm to solve that:
when a thread is done using a chan, I keep track of it instead of calling
chanfree(), and instead of allocating a new chan/alt when creating a new
thread, I simply reuse one of the previously "abandonned" ones (if any
is available). And I'll just free them all when the program terminates.

Thanks to all,
Mathieu
--- Begin Message ---
> > isn't that what chanclose()/chanclosing() is for?
> >
> > - erik
> >
> >
> 
> Not at all. Chanclose and chanclosing are to be used while the channel
> still exists.
> A closed channel is not a freed channel. Close/closing are useful for
> synchronizing the cleanup
> but no other operation should be done on a channel after it has been
> freed because
> the channel no longer exists.

of course i ment using chanclose as the first step.  the
thread running the alt can free the closed channel.

- erik
--- End Message ---


Re: [9fans] alt and chanfree

2010-09-14 Thread Mathieu Lonjaret
Ah, I indeed use an old iso with 9vx, that might be it.

thanks,
Mathieu
--- Begin Message ---
On Tue Sep 14 09:28:48 EDT 2010, mathieu.lonja...@gmail.com wrote:

> Maybe. Lookman gives me nothing, which page is it please?
> 

thread(2).  you may have to update your thread library/man pages.
chanclosing is recent.

- erik
--- End Message ---


Re: [9fans] alt and chanfree

2010-09-14 Thread Mathieu Lonjaret
Maybe. Lookman gives me nothing, which page is it please?

Mathieu
--- Begin Message ---
On Tue Sep 14 06:11:35 EDT 2010, mathieu.lonja...@gmail.com wrote:

> That's exactly the sense of my question, thanks.
> I didn't see in the man page if I should do that sort of cleaning up or
> not, it just says that the channel can be freed from either side. so I
> wasn't sure in what state alt() is expecting the Alt entries to be at
> all time.

isn't that what chanclose()/chanclosing() is for?

- erik
--- End Message ---


Re: [9fans] alt and chanfree

2010-09-14 Thread Mathieu Lonjaret
That's exactly the sense of my question, thanks.
I didn't see in the man page if I should do that sort of cleaning up or
not, it just says that the channel can be freed from either side. so I
wasn't sure in what state alt() is expecting the Alt entries to be at
all time.

I'll try it out later today, thanks.

Cheers,
Mathieu
--- Begin Message ---
On 14 September 2010 09:57, Mathieu Lonjaret  wrote:
>        for(;;){
>                n = alt(a);
>                if(n < 0)
>                        error("with alt");
>
>                if (m[0] == 0){
>                        // a caller has terminated
>                        dosomestuff()

shouldn't you nil out the appropriate part of the alt
array here? i.e. a[n].c = nil
otherwise you'll be alting on a freed chan which
must be bad.
--- End Message ---


[9fans] alt and chanfree

2010-09-14 Thread Mathieu Lonjaret
Hi all,

I'm doing something like the following to synchronize a bunch of
coroutines.
Everything goes fine while the different threads are working (and are
regularly sending over their respective channel). However, as soon as
one terminates and calls chanfree(), the next call to alt() fails (as
in I get a "pagefault" message). I can tell because if I never call
chanfree() I never hit that error.
Now in this simplified version I haven't shown that I in fact actually
dynamically reorganize the Alt * (adding/removing an Alt everytime a
caller starts/terminates) so it's totally possible I messed up there.

Before I dig deeper to find out what I'm doing wrong in my Alt *, 
I wanted to make sure that I'm globally doing the right thing, i.e. if
it's ok and even recommended to free the Channel as soon as the thread
that was sending on it does not need it anymore. 
Can anyone please confirm that?

Thanks,
Mathieu

static void
caller(void *arg)
{
struct Params{ Torrent *tor; Peer *peer; Channel *c;} *params;
uchar chanmsg[1];

params = arg;
// in callerworks() we send() on params->c at various points to 
synchronize, all goes well.
callerworks(params->tor, params->peer, params->c);
chanmsg[0] = 0;
send(params->c, chanmsg);
// peer is done working now
chanfree(params->c);
}

void
callers(void *arg)
{
Torrent *tor = arg;
Peer *peer;
uchar m[1];
int i;
int n;
Alt *a;
struct Params{Torrent *tor; Peer *peer; Channel *c;} *params;

a = emalloc((MAXPEERS+1)*sizeof(Alt));
for (i = 0; itor = tor;
params->peer = peer;
params->c = a[i].c;
threadcreate(caller, params, STACK);
}
a[MAXPEERS].v = nil;
a[MAXPEERS].c = nil;
a[MAXPEERS].op = CHANEND;

for(;;){
n = alt(a);
if(n < 0)
error("with alt");

if (m[0] == 0){
// a caller has terminated
dosomestuff()
}
}
}




Re: [9fans] anonymous pro -- a programming font

2010-09-10 Thread Mathieu Lonjaret
Brilliant, thank you.




Re: [9fans] anonymous pro -- a programming font

2010-09-10 Thread Mathieu Lonjaret
Hello,

how about on p9p acme, do I have to convert them in any way before I
can use them there? if yes, how?

Cheers,
Mathieu
--- Begin Message ---
On Wed, Sep 8, 2010 at 3:56 PM, andrey mirtchovski
 wrote:
> seems to fit nicely with acme and rio. looks better antialiased than
> not. let me know if you want it in size 14, of use ttf2subf yourselves
> if you like it:
>
> http://www.ms-studio.com/FontSales/anonymouspro.html
>
> not a terribly good unicode coverage.
>

I tried rolling my own, but ran into problems:
cpu% ttf2subf -m antialias -r rgb 'Anonymous Pro.ttf' anon 12
FT_Glyph_Transform: status=18

Sizes 8 and 9 work, as does 14, but 10-13 give that same error. 14 is
almost small enough to use, but I'd prefer something around 12, I
think.

John
-- 
"With MPI, familiarity breeds contempt. Contempt and nausea. Contempt,
nausea, and fear. Contempt, nausea, fear, and .." -- Ron Minnich
--- End Message ---


Re: [9fans] plan9 on SL-C3100

2010-08-12 Thread Mathieu Lonjaret
Cute.
So how do you handle mouse/chording in, say acme, on that thing? Does it
have a touchscreen or is it too old for that?




Re: [9fans] Wasn't there an mplayer port?

2010-07-11 Thread Mathieu Lonjaret
and to illustrate that point:
http://ninetimes.cat-v.org/news/2009/09/07/0-mplayer9/

On Sun, Jul 11, 2010 at 12:10 AM, Akshat Kumar
 wrote:
> Are you talking about playing mplayer in linuxemu?
> It's obviously in linux, and certainly do-able in
> linuxemu (thanks to cinap!)
>
> On Sat, Jul 10, 2010 at 2:35 PM, Ethan Grammatikidis
>  wrote:
>> I was sure I once ran mplayer under Plan 9, but when I told jumzi it
>> existed, jumzi ran a search on contrib and came up with nothing. Am I
>> imagining the mplayer port?
>>
>>
>
>



Re: [9fans] unknown error message

2010-06-14 Thread Mathieu Lonjaret
Yes, it can be easier in a sense that you sometimes get the explanation
that you would not have gotten in a obvious manner by reading the code.

If I don't need the answer to the issue right away, and if I want to work
on something else in the meanwhile, it can be better to wait and see what
you wise guys come up with, rather that going head first and grok the
whole context where the piece of code is. Especially if I'm unfamiliar
with that part of the code.

Yes, it's a form of lazyness, but not just for the sake of being lazy ;)

Mathieu
--- Begin Message ---
> Thanks, that's what I was curious about. shoulda grepped but figured
> one of you would know off the top of your head. :)

is posting to 9fans now easier than grep?

probablly not.  recently i've been working with a
few non-plan 9 guys, and the ones that take the
time to look at the system are at first appalled
by the simplicity.  that's it?  really, that's it.  i've
learned to ignore that.  inevitably, a question
similar to this thread comes up.  how to i find xyz.
i get xyz error message.  well, g xyz /sys/src.
that's it?  really, that's it.

i think the complexity of most systems can knock
one of one's rhythm and forget that it can be
as appalingly simple as grep.

plan 9 is fairly unique in that it's a system one can
reasonablly hope to understand by reading the source.
that's it?  really, that's it.

- erik
--- End Message ---


Re: [9fans] unknown error message

2010-06-13 Thread Mathieu Lonjaret
Thanks, that's what I was curious about. shoulda grepped but figured
one of you would know off the top of your head. :)
--- Begin Message ---
On Sat Jun 12 17:46:52 EDT 2010, mathieu.lonja...@gmail.com wrote:
> Hello,
> 
> I doubt it will help me debug my problems but out of curiosity, can
> anyone tell me where this assertion is coming from please? Even better,
> if you have a clue about what I was doing wrong at this point ;)
> 
> 15014.35 a < t->size && t->size < b: assertion failed
> btfs 15014: suicide: sys: trap: page fault pc=0x0001079b
>

ron's excellent suggestion notwithstanding, this looks to
be a memory screw:

; g 'a < t->size && t->size < b' /sys/src
/sys/src/libc/port/pool.c:218:  assert(a < t->size && t->size < b);


setting the various parinoia flags (pool(2)) will probablly help.

- erik
--- End Message ---


[9fans] unknown error message

2010-06-12 Thread Mathieu Lonjaret
Hello,

I doubt it will help me debug my problems but out of curiosity, can
anyone tell me where this assertion is coming from please? Even better,
if you have a clue about what I was doing wrong at this point ;)

15014.35 a < t->size && t->size < b: assertion failed
btfs 15014: suicide: sys: trap: page fault pc=0x0001079b

Cheers,
Mathieu




[9fans] Xplor, a tree viewed files explorer for p9p acme

2010-06-04 Thread Mathieu Lonjaret
Hello,

If you are an acme fan and you have to write some java for a living,
then xplor might help you deal (a bit better than the default dir view
in acme) with the madness that is the organisation of the java
packages.  That was the motivation for it anyway.

http://bitbucket.org/mpl/xplor

Obviously there's some room for improvement, especially since my sam
address-foo is weak and this is my first go program.  So please do
send comments, suggestions and bug reports/fixes.

Cheers,
Mathieu




Re: [9fans] Acme Mail

2010-05-25 Thread Mathieu Lonjaret
I had only replied to the OP because I didn't think other people could
be interested, and I had announced it a while ago already, but here goes
again, just in case.

I patched p9p acme Mail to have a sort by conversation/subject
(http://codereview.appspot.com/264043/show), so if what you want is being
able to delete a bunch of messages with the same subject it's very easy
to do in one mouse swipe once they're all grouped together by this sort.

Of course that does not really help with spam because they won't have
the same subject, only similar ones all matching "viagra", as in your
example.

I've been using it the whole time since then, no issue so far.

Hope that helps,
Mathieu
--- Begin Message ---
On Tue, May 25, 2010 at 8:42 AM, Skip Tavakkolian <9...@9netics.com> wrote:
> i was wrong; it doesn't work. Put doesn't actually delete the messages. i 
> think
> this will require mods to /acme/mail/src/mail.c

we had a back and forth a long time ago about this. I wanted a way to
match a subject and delete all messages on that subject. There was no
apparent way.

the conclusion was that we needed a way to say "middle button action"
in a command line. Russ kindly offered to take a patch if someone
would write it.

So we could say something like
x/viagra/whatever
where whatever corresponded to 'middle-button-Del' or some such.

You can't just change what's in the window AFAIK. That's a reflection
of state, not the state itself.

ron
--- End Message ---


[9fans] thread STACK size

2010-05-19 Thread Mathieu Lonjaret
Hi all,

A while ago, while working on btfs, I stumbled upon some sort of
overflow (http://9fans.net/archive/2009/07/77) which was in fact due
to the thread STACK being too small (and hence if I understood
correctly things would get written out of it, in the heap).
To be on the safe side, I have it set to 16384 now, but as I think I'm
getting near something usable with btfs, I'd like to go back to a more
fitting value.  I think it's pretty important to have it as low as
possible since the number of threads/coroutines will grow linearly
with the number of peers connected (to be honest, I don't even know if
that can even scale in terms of memory use).

So the question is, how can I evualuate what's the minimal value I can
set that to without getting into trouble again?  Is there anything
smarter than just trial and error?

Thanks,
Mathieu




Re: [9fans] custom-built plan9 iso?

2010-05-15 Thread Mathieu Lonjaret
As far as I am concerned:
http://9fans.net/archive/2008/05/263

and here's maht's blog entry about it:
http://maht0x0r.blogspot.com/2007/11/roll-your-own-plan9-iso.html

hth,
Mathieu
--- Begin Message ---

Quite a while back, I recall someone was inquiring whether there was any
documentation/notes available with regards to the process of creating one's
own customized plan 9 iso - or related documentation detailing how the
official iso/distro is built.  If I remember correctly, there were a couple
responses that provided links to these docs... but I'm unable to find the
thread in question. Anyone know where I could find such info?

--- End Message ---


Re: [9fans] iwp9.org (Re: BibTex collections of all 4 proceedings)

2010-05-07 Thread Mathieu Lonjaret
While we're at "just sayin"; from what I hear on #9fans, there still
is some interest to have that one happening in europe. So if you guys
from the other side of the pond think you would come, I could poke
around and see if I can get it hosted here, here being Grenoble, fr,
somewhere on the university campus.
Grenoble is not what I would call pretty, but the campus is nice
enough, and well you've got the Alps nearby to enjoy. 1 hour away by
train/bus/cab from Lyon St-Exupery Airport, or 3 hours away from Paris
(airports).

Mathieu

On Fri, May 7, 2010 at 5:47 PM, David Leimbach  wrote:
>
>
> On Fri, May 7, 2010 at 8:37 AM, Ramon de Vera  wrote:
>>
>> Maybe Seattle? ...if in October, the Picasso Exhibit is also on in the
>> SAM as well (just saying).
>
> Yeah but by then the Lusty Lady across the street from the SAM will have
> shut its doors forever (also just saying).
> Dave
>
>>
>> On Fri, May 7, 2010 at 8:48 AM, ron minnich  wrote:
>> > On Fri, May 7, 2010 at 1:09 PM, Eric Van Hensbergen 
>> > wrote:
>> >
>> >> OSDI is in Vancouver in October, might be more justifiable as a
>> >> destination for academic folks if the workshop and the conference
>> >> "adjoined" -- it would at least be down to a single airfare.
>> >
>> > I got burned doing that for coreboot due to the cost of the "parent"
>> > workshop. I think IWP9 has to be cheap. Usenix meetings are not cheap.
>> > Given that this IWP9 is going to be less formal, I think we'd best
>> > keep it separate.
>> >
>> > ron
>> >
>> >
>>
>
>



Re: [9fans] 3-button mouse

2010-05-06 Thread Mathieu Lonjaret
Hello,

Just one comment about the vertical Evoluent mouse (I bought one a few
months ago since Russ recommended them).

It can be pretty hard to get used to it. I had to force myself to try
it several times before I could stand using it. I think the main
reason is because you apply horizontal pressure when clicking and that
can make the pointer move unvoluntarily on your part. That gets pretty
annoying when it makes you fail at your chordings and you have some
code to produce.
Now I'm starting to really like it; I'd say one gets past the
annoyance if you manage to keep using it for a full day without
throwing it away for another mouse. In fact I'd recommend trying it
and starting to use it on day when it's not so important to be
efficient and you can afford to loose a bit of time to it. Sounds like
common sense now, but I think it's particularly true with that mouse.

Cheers,
Mathieu



Re: [9fans] 9vx and ubuntu 10.04LTS

2010-05-04 Thread Mathieu Lonjaret
Not that I know of.  it's a lucid lynx install I did when it was still
in beta and I haven't kept it up to date since then, so maybe that's
where the difference lies.
How do I check if that fix you're speaking of is installed or not?

Cheers,
Mathieu
--- Begin Message ---
The update to 10.04 has overloaded my email with messages from ubuntu's dosemu 
forum. Basically the same issue as with 9vx. A fix [sic] is suggested. So, 
question is:

On Sat, 1 May 2010 23:36:08 +0200
"Mathieu Lonjaret"  wrote:

> Fwiw, 9vx does build and run fine on 10.04 here.
> Lemme know if I can give you some relevant info which might help.
> 
> Cheers,
> Mathieu
> 

Mathieu: have you perhaps applied the fix to run some emulator, and it's 
"fixing" 9vx?
-- 
sixforty 
--- End Message ---


Re: [9fans] du and find

2010-05-03 Thread Mathieu Lonjaret
No idea, probably none. 

that would not be the interesting point, if any.  it's just that the
tool is already there and (should be) simpler to use than piping
various commands around, as they illustrate below.
--- Begin Message ---
>From the website:

"ack is written purely in Perl, and takes advantage
of the power of Perl's regular expressions."

Forgive my ignorance and irrelevance to this topic,
but what are the advantages of Perl's regular
expressions, over the implementation we have
currently in Plan 9?


Thanks,
ak

On Mon, May 3, 2010 at 5:13 AM, Mathieu Lonjaret
 wrote:
> Hello,
>
> just because reviving old threads is fun...
> I've just found out about this:
>
> http://betterthangrep.com/
>
> it does not seem to work out of the box (expecting some unix paths), but
> since there's a perl port and that thing is supposed to be more or
> less self contained (for the standalone version), maybe it's not too
> much work for someone interested enough.
>
> Cheers,
> Mathieu
>
>
>
--- End Message ---


Re: [9fans] du and find

2010-05-03 Thread Mathieu Lonjaret
Hello,

just because reviving old threads is fun...
I've just found out about this:

http://betterthangrep.com/

it does not seem to work out of the box (expecting some unix paths), but
since there's a perl port and that thing is supposed to be more or
less self contained (for the standalone version), maybe it's not too
much work for someone interested enough.

Cheers,
Mathieu




Re: [9fans] 9vx and ubuntu 10.04LTS

2010-05-01 Thread Mathieu Lonjaret
Fwiw, 9vx does build and run fine on 10.04 here.
Lemme know if I can give you some relevant info which might help.

Cheers,
Mathieu
--- Begin Message ---
% ldd 9vx.Linux # old
...
% ldd 9vx   # new

note that `old' is run on an existing 9.04 (2.6.28-18-generic), which works,
and `new' is the 10.04 (2.6.32-21-generic), which doesn't.
--- End Message ---


Re: [9fans] Character CR in Plan9?

2010-04-20 Thread Mathieu Lonjaret
here's one way of doing it:

open the file in acme, and write in the tag bar:

Edit ,s:
::g

and execute that (select it with the mouse and button-2 click on it).

to get the 
 char, you can simply cp&paste it with the mouse from the
file itself.

Cheers,
Mathieu
--- Begin Message ---

I wanted to remove this character from some files. I tried to do it with
the p9p tr(1) and I noticed that It does not support '\r'.

--- End Message ---


Re: [9fans] using acme/Mail from plan9port in Linux

2010-03-23 Thread Mathieu Lonjaret
Nope, I hardly ever tried nedmail. Others like Erik might know.

jsyk, saving a message is dead easy from acme Mail, you just middle
click on "Save imapfoldername" ;) (assuming the imap folder already
exists)

Cheers,
Mathieu
--- Begin Message ---
Great! now it works. Thank you very much; you answered in the exact
moment, otherwise frustration would have been too great :-)
One last thing (I hope): when I'm reading the mail on my imap server
with nedmail, and I want to save a message, I get

: 3 w /tmp/3
!message disappeared

and nothing gets written. Do you have any idea what's causing this?
and even better, how to solve it :-)

2010/3/23 Mathieu Lonjaret :
> Hello,
>
> if you haven't done so yet, you need to edit the
> $PLAN9/mail/lib/rewrite file like that:
>
> # send all mail to the gateway or mail server, $smtp,  for delivery
> ([^!]*)!(.*)    |       "$PLAN9/mail/lib/qmail '\s' 'xxx.xxx.xxx.xxx'" 
> "'\...@\1'"
>
> where xxx.xxx.xxx.xxx is the ip address of your smtp.  I think once I
> had some resolution problem, that's why I set it by ip here instead of
> by name.  Works fine enough so I never bothered to do it by name
> afterwards.
>
> hth,
> Mathieu
>
>
> -- Mensaje reenviado --
> From: hugo rivera 
> To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
> Date: Tue, 23 Mar 2010 12:18:56 +0100
> Subject: Re: [9fans] using acme/Mail from plan9port in Linux
> I configured mailfs so now I can read email, thanks.
> But writing mail is not going so well:
>
> $ cat $PLAN9/log/smtp.fail
> myhost Mar 23 11:21:44 bad network /net/net!my.smtp.server!smtp 
> (my.smtp.server)
> myhost Mar 23 11:28:06 bad network /net/net!my.smtp.server!smtp 
> (my.smtp.server)
> myhost Mar 23 11:34:20 bad network /net/net!my.smtp.server!smtp 
> (my.smtp.server)
>
> after using marshal to send messages. The file
> $PLAN9/mail/queue/hugo/E.XX contains a very similar error
>
> smtp: bad network /net/net!my.smtp.server!smtp (my.smtp.server)
>
> I've been playing around with files inside $PLAN9/mail/lib but no
> success so far. Any tips are welcome! :-)
>
> 2009/11/21 Mathieu Lonjaret :
>> On Sat, Nov 21, 2009 at 10:33 PM, Lorenzo Bolla  wrote:
>>> Hi all,
>>> can anyone point me to a document (if any) that explains how to use
>>> acme/Mail to read e-mail in Linux?
>>> I couldn't find any useful information in the plan9port distribution and it
>>> does not work "out-of-the-box".
>>> Thanks for your help!
>>> L.
>>
>> 1) build and install mailfs
>> cd $PLAN9/src/cmd/upas/
>> mk install
>> cd nfs
>> mk install
>>
>> 2) configuration
>> cd $PLAN9/log; chmod 666 smtp smtp.debug smtp.fail mail >smtp
>>>smtp.debug >smtp.fail >mail
>> cd $PLAN9/mail/lib
>> edit rewrite
>> optionnally edit remotemail
>>
>> 3) authentication
>> factotum
>> factotum -g 'proto=pass service=imap server=your.imap.server
>> user=you_there !password?'
>>
>> 4) run it!
>> mailfs -t your.imap.server (-t is for tls)
>> button 2 exec on  'Mail' in acme (without the quotes)
>> (you need the plumber running for everything to work as expected in acme)
>>
>> hth,
>> Mathieu
>>
>>
>
>
>
> --
> Hugo
>
>



-- 
Hugo
--- End Message ---


Re: [9fans] using acme/Mail from plan9port in Linux

2010-03-23 Thread Mathieu Lonjaret
Hello,

if you haven't done so yet, you need to edit the
$PLAN9/mail/lib/rewrite file like that:

# send all mail to the gateway or mail server, $smtp,  for delivery
([^!]*)!(.*)|   "$PLAN9/mail/lib/qmail '\s' 'xxx.xxx.xxx.xxx'" 
"'\...@\1'"

where xxx.xxx.xxx.xxx is the ip address of your smtp.  I think once I
had some resolution problem, that's why I set it by ip here instead of
by name.  Works fine enough so I never bothered to do it by name
afterwards.

hth,
Mathieu
--- Begin Message ---
I configured mailfs so now I can read email, thanks.
But writing mail is not going so well:

$ cat $PLAN9/log/smtp.fail
myhost Mar 23 11:21:44 bad network /net/net!my.smtp.server!smtp (my.smtp.server)
myhost Mar 23 11:28:06 bad network /net/net!my.smtp.server!smtp (my.smtp.server)
myhost Mar 23 11:34:20 bad network /net/net!my.smtp.server!smtp (my.smtp.server)

after using marshal to send messages. The file
$PLAN9/mail/queue/hugo/E.XX contains a very similar error

smtp: bad network /net/net!my.smtp.server!smtp (my.smtp.server)

I've been playing around with files inside $PLAN9/mail/lib but no
success so far. Any tips are welcome! :-)

2009/11/21 Mathieu Lonjaret :
> On Sat, Nov 21, 2009 at 10:33 PM, Lorenzo Bolla  wrote:
>> Hi all,
>> can anyone point me to a document (if any) that explains how to use
>> acme/Mail to read e-mail in Linux?
>> I couldn't find any useful information in the plan9port distribution and it
>> does not work "out-of-the-box".
>> Thanks for your help!
>> L.
>
> 1) build and install mailfs
> cd $PLAN9/src/cmd/upas/
> mk install
> cd nfs
> mk install
>
> 2) configuration
> cd $PLAN9/log; chmod 666 smtp smtp.debug smtp.fail mail >smtp
>>smtp.debug >smtp.fail >mail
> cd $PLAN9/mail/lib
> edit rewrite
> optionnally edit remotemail
>
> 3) authentication
> factotum
> factotum -g 'proto=pass service=imap server=your.imap.server
> user=you_there !password?'
>
> 4) run it!
> mailfs -t your.imap.server (-t is for tls)
> button 2 exec on  'Mail' in acme (without the quotes)
> (you need the plumber running for everything to work as expected in acme)
>
> hth,
> Mathieu
>
>



-- 
Hugo
--- End Message ---


[9fans] (p9p) acme mail: sort by conversation

2010-03-08 Thread Mathieu Lonjaret
Hello all,

title says it all, a few notes however:

1) it is not a perfect sort by thread as I'm not using the references
to all the previous mails in the thread, only the subject and the
replyto/messageid.  That seems to be working pretty well in most cases
anyway.

2) it has not been thoroughly tested, so bugs are to be expected,
however it's been working fine for me so far.

3) the sorting method is certainly not the most efficient, it's the
simplest for me to manipulate I could come up with.

4) I haven't looked at plan 9's code for that, but I don't see why it
couldn't be integrated easily if ppl like it.

For those interested, here it is:
http://codereview.appspot.com/264043

Cheers,
Mathieu




Re: [9fans] tiny rio hack: Delete

2010-02-09 Thread Mathieu Lonjaret
I knew about that patch but I wanted to change the least possible to
the original code. 

I think cinap is the one who did the pie menus btw.
--- Begin Message ---
> [...] it has happened to me too often to select [delete] by mistake
> and to delete a window afterwards before I realized my mistake.

there is a patch on sources that allows you to change rio's linear menus
into pie menus. this allows you to associate the desired action with a
mouse gesture rather than requiring you to either remember the menu state
or to always look carefully at what you're doing. since i began using pie
menus with rio, my rate of absent-minded window loss has sharply dropped


satisfaction guaranteed. and thank you to whoever wrote the patch--- End Message ---


[9fans] tiny rio hack: Delete

2010-02-08 Thread Mathieu Lonjaret
Hello,

if you have been bitten one too many times by Delete on rio, here's one
quick fix:

diff -r 7aac02e8704e src/cmd/rio/grab.c
--- a/src/cmd/rio/grab.cSat Feb 06 22:16:46 2010 -0800
+++ b/src/cmd/rio/grab.cTue Feb 09 00:11:33 2010 +0100
@@ -142,7 +142,8 @@
else if(i < 0 || i >= n)
i = -1;
else
-   m->lasthit = i;
+   if(i != 3)
+   m->lasthit = i;
if(!nobuttons(&ev.xbutton))
i = -1;
ungrab(&ev.xbutton);

The way the button 3 menu works is the following: the entry selected
by default when you call the menu is the one that was used for the last
time. This change simply disables that behavior when the last operation
was Delete.

I did this because it has happened to me too often to select it by mistake
and to delete a window afterwards before I realized my mistake. I realize
this breaks the generic behavior, but on the other hand Delete is the
only operation that is not always easily reversible, so it didn't bother
me that much to make an exception for this one in the end.

Cheers,
Mathieu

P.S: tested only on p9p, I haven't checked on plan 9. I can do it if
anyone's interested.




Re: [9fans] evoluent mouse review

2010-01-03 Thread Mathieu Lonjaret
Hello,

I'm thinking of buying such a mouse. Have you found better since you
posted that review? Did you (or anyone else) get a chance to eventually
try the wireless one?

Thanks,
Mathieu




Re: [9fans] using acme/Mail from plan9port in Linux

2009-11-21 Thread Mathieu Lonjaret
On Sat, Nov 21, 2009 at 10:33 PM, Lorenzo Bolla  wrote:
> Hi all,
> can anyone point me to a document (if any) that explains how to use
> acme/Mail to read e-mail in Linux?
> I couldn't find any useful information in the plan9port distribution and it
> does not work "out-of-the-box".
> Thanks for your help!
> L.

1) build and install mailfs
cd $PLAN9/src/cmd/upas/
mk install
cd nfs
mk install

2) configuration
cd $PLAN9/log; chmod 666 smtp smtp.debug smtp.fail mail >smtp
>smtp.debug >smtp.fail >mail
cd $PLAN9/mail/lib
edit rewrite
optionnally edit remotemail

3) authentication
factotum
factotum -g 'proto=pass service=imap server=your.imap.server
user=you_there !password?'

4) run it!
mailfs -t your.imap.server (-t is for tls)
button 2 exec on  'Mail' in acme (without the quotes)
(you need the plumber running for everything to work as expected in acme)

hth,
Mathieu



Re: [9fans] acme bug?

2009-11-16 Thread Mathieu Lonjaret
See awd(1)
--- Begin Message ---
% cd /sw/somedir
% 9 ls | 9 wc -l
2712
% pwd
/sw/somedir
right click on /sw/somedir, and acme's window is empty. What's going on?

-- 
Hugo
--- End Message ---


Re: [9fans] 9vx as a perfect proto environment

2009-09-30 Thread Mathieu L.
Indeed, I've just retried with the latest pull from hg and that problem
is gone for me, that's brilliant.
That's one less thing to worry about with 9vx, cheers for that. ☺

Mathieu
--- Begin Message ---

I'm using 9vx as my primary development platform, and even though it's
fantastic to have a Plan 9 environment so easily setup and integrated
to the host OS, it has its limits. For example it will crash if your
badly written program tries to read on a hanged up connection, or it
will freeze if you run a buggy program in acid with truss.


is this with the latest 9vx or the bin snapshot?  I know the
snapshot didnt ignore SIGPIPE which would cause the whole vm to
shutdown when writing to a socket that shut down.  However, that
should be fixed in the latest sources.


Mathieu


Tim Newsham
http://www.thenewsh.com/~newsham/
--- End Message ---


Re: [9fans] 9vx as a perfect proto environment

2009-09-26 Thread Mathieu L.
I've definitely seen it on linux. 
I'm using 9vx as my primary development platform, and even though it's
fantastic to have a Plan 9 environment so easily setup and integrated
to the host OS, it has its limits. For example it will crash if your
badly written program tries to read on a hanged up connection, or it
will freeze if you run a buggy program in acid with truss.

Still, it's so convenient compared to dual booting or qemu that I prefer
sticking with it. 

Cheers,
Mathieu

--- Begin Message ---
> I've had less success using it for "real work", at least on MacOS
> 10.5 and 10.6 - for example running a venti server eventually
> results in something like
>   9vx panic: sigsegv on cpu7

I've seen similar on FreeBSD, though I don't think I've see it
on Linux.  I use 9vx pretty much all the time as my terminal
and stand-alone when I'm not connected to my network.  In
those uses, a crash once or twice a day hasn't been bad enough
to make me investigate.

BLS

--- End Message ---


  1   2   >