[9fans] Persistent font in Acme.

2014-11-06 Thread Mats Olsson
Hi guys!

Is there a way to get a persistent font in Acme? I'm using a Raspberry
Pi and usually invoke Acme this way; acme -f
/lib/font/bit/lucidasans/latin1.10.font and that gives me a font that
looks good on my 32 TV. Grateful for any hint!

Kind regards,
Mats



Re: [9fans] Persistent font in Acme.

2014-11-06 Thread dante

Hi Mats,

doesn't the font get saved in the Acme image?
I don't have the manpage at hand, but Acme is usually started from a 
saved image.


Cheers,
Dante

On 06.11.2014 11:01, Mats Olsson wrote:

Hi guys!

Is there a way to get a persistent font in Acme? I'm using a Raspberry
Pi and usually invoke Acme this way; acme -f
/lib/font/bit/lucidasans/latin1.10.font and that gives me a font that
looks good on my 32 TV. Grateful for any hint!

Kind regards,
Mats




Re: [9fans] Persistent font in Acme.

2014-11-06 Thread Ingo Krabbe
The default font in acme is compiled in. So to change that you need to edit the 
source code and recompile the binary.

Another option is to write an own command 

#!/bin/rc
acme -f YOUR_FONT -F YOUR_FIXED_FONT $*

or add an rc function.

If you use dump files (you should), the fonts are written to the dump files.

regards
ingo

 Hi guys!
 
 Is there a way to get a persistent font in Acme? I'm using a Raspberry
 Pi and usually invoke Acme this way; acme -f
 /lib/font/bit/lucidasans/latin1.10.font and that gives me a font that
 looks good on my 32 TV. Grateful for any hint!
 
 Kind regards,
 Mats





Re: [9fans] Persistent font in Acme.

2014-11-06 Thread Mark van Atten
You can write a little script whose only task is to start acme with
your favourite parameters.

Mark.



Re: [9fans] Persistent font in Acme.

2014-11-06 Thread Stuart Morrow
The way most congruent with the system might be to have $font a
2-variable (like prompt), to have you favourite fixed- and
variable-width fonts both settable in the obvious place: your profile.
Completely unrelated programs could conceivably reuse this trick.



Re: [9fans] Persistent font in Acme.

2014-11-06 Thread Iruatã Souza
acme is not the system.

On Thu, Nov 6, 2014 at 10:48 AM, Stuart Morrow morrow.stu...@gmail.com wrote:
 The way most congruent with the system might be to have $font a
 2-variable (like prompt), to have you favourite fixed- and
 variable-width fonts both settable in the obvious place: your profile.
 Completely unrelated programs could conceivably reuse this trick.




Re: [9fans] Persistent font in Acme.

2014-11-06 Thread erik quanstrom
On Thu Nov  6 08:15:54 EST 2014, iru.mu...@gmail.com wrote:
 acme is not the system.
 
 On Thu, Nov 6, 2014 at 10:48 AM, Stuart Morrow morrow.stu...@gmail.com 
 wrote:
  The way most congruent with the system might be to have $font a
  2-variable (like prompt), to have you favourite fixed- and
  variable-width fonts both settable in the obvious place: your profile.
  Completely unrelated programs could conceivably reuse this trick.

but i do think that this solution fits the system.  this does depend on rc's
formatting of environment variables, so it may be a portability issue with
p9p.

- erik



Re: [9fans] Setting up Mail in Acme on the Raspberry Pi.

2014-11-06 Thread erik quanstrom
On Wed Nov  5 13:20:02 EST 2014, sdao...@yandex.com wrote:
 Anthony Sorace a...@9srv.net wrote:
  | I've been looking through the documentation and
  | the 9fans archive but I can't get a clear answer on
  | what to replace localhost.localdomain with.
  |
  |If the recipient's mail server is being strict (but within
  |the bounds of the RFCs), that name is expected to be
  |the real, externally-resolvable DNS name of the
  |system you're sending from. The RFCs used to be more
  |lax on that point, and some servers still are, but you
  |shouldn't assume you'll be able to send to arbitrary
  |endpoints unless you satisfy that.
 
 gmail.com shouldn't care at all, so it must be his own SMTP server.
 (All i know in respect to this is Yandex.(ru|com), which requires
 that the hostname in the SMTP FROM: command _is_ a Yandex
 address, i.e., _no mismatch_ with _who_ you claim to be, which is

that's not what anthony claimed.  he said that if you say
HELO example.com
that the following must be true
(a) dns return an a record for the query example.com, and
(b) the ip returned must have a ptr record pointing to example.com
(this is less enforced these days due to the difficulty of maintaining pointer
records.)

i think this is compatible with what you're saying.  this doesn't make
sense to me.  i don't do this:

 why i had to invent a *smtp-hostname* variable for the mailer
 i maintain in order to address the SMTP FROM: content directly:

perhaps you're conflating the envelope with the message?

- erik



Re: [9fans] Persistent font in Acme.

2014-11-06 Thread Iruatã Souza
what other program needs two fonts?

On Thu, Nov 6, 2014 at 11:30 AM, erik quanstrom quans...@quanstro.net wrote:
 On Thu Nov  6 08:15:54 EST 2014, iru.mu...@gmail.com wrote:
 acme is not the system.

 On Thu, Nov 6, 2014 at 10:48 AM, Stuart Morrow morrow.stu...@gmail.com 
 wrote:
  The way most congruent with the system might be to have $font a
  2-variable (like prompt), to have you favourite fixed- and
  variable-width fonts both settable in the obvious place: your profile.
  Completely unrelated programs could conceivably reuse this trick.

 but i do think that this solution fits the system.  this does depend on rc's
 formatting of environment variables, so it may be a portability issue with
 p9p.

 - erik




Re: [9fans] Persistent font in Acme.

2014-11-06 Thread Lee Fallat
On Thu, Nov 6, 2014 at 9:04 AM, Iruatã Souza iru.mu...@gmail.com wrote:
 what other program needs two fonts?

 On Thu, Nov 6, 2014 at 11:30 AM, erik quanstrom quans...@quanstro.net wrote:
 On Thu Nov  6 08:15:54 EST 2014, iru.mu...@gmail.com wrote:
 acme is not the system.

 On Thu, Nov 6, 2014 at 10:48 AM, Stuart Morrow morrow.stu...@gmail.com 
 wrote:
  The way most congruent with the system might be to have $font a
  2-variable (like prompt), to have you favourite fixed- and
  variable-width fonts both settable in the obvious place: your profile.
  Completely unrelated programs could conceivably reuse this trick.

https://code.google.com/p/plan9front/source/browse/sys/src/cmd/rio/rio.c#173

rio uses what is in $font if not specified on the command-line.

You can easily implement it in any gui in plan 9.



Re: [9fans] Persistent font in Acme.

2014-11-06 Thread Iruatã Souza
yes, but what about two fonts? I only remember acme.

On Thu, Nov 6, 2014 at 12:37 PM, Lee Fallat ircsurfe...@gmail.com wrote:
 On Thu, Nov 6, 2014 at 9:04 AM, Iruatã Souza iru.mu...@gmail.com wrote:
 what other program needs two fonts?

 On Thu, Nov 6, 2014 at 11:30 AM, erik quanstrom quans...@quanstro.net 
 wrote:
 On Thu Nov  6 08:15:54 EST 2014, iru.mu...@gmail.com wrote:
 acme is not the system.

 On Thu, Nov 6, 2014 at 10:48 AM, Stuart Morrow morrow.stu...@gmail.com 
 wrote:
  The way most congruent with the system might be to have $font a
  2-variable (like prompt), to have you favourite fixed- and
  variable-width fonts both settable in the obvious place: your profile.
  Completely unrelated programs could conceivably reuse this trick.

 https://code.google.com/p/plan9front/source/browse/sys/src/cmd/rio/rio.c#173

 rio uses what is in $font if not specified on the command-line.

 You can easily implement it in any gui in plan 9.




Re: [9fans] Setting up Mail in Acme on the Raspberry Pi.

2014-11-06 Thread Steffen Nurpmeso
erik quanstrom quans...@quanstro.net wrote:
 |On Wed Nov  5 13:20:02 EST 2014, sdao...@yandex.com wrote:
 | Anthony Sorace a...@9srv.net wrote:
 || I've been looking through the documentation and
 || the 9fans archive but I can't get a clear answer on
 || what to replace localhost.localdomain with.
 ||
 ||If the recipient's mail server is being strict (but within
 ||the bounds of the RFCs), that name is expected to be
 ||the real, externally-resolvable DNS name of the
 ||system you're sending from. The RFCs used to be more
 ||lax on that point, and some servers still are, but you
 ||shouldn't assume you'll be able to send to arbitrary
 ||endpoints unless you satisfy that.
 | 
 | gmail.com shouldn't care at all, so it must be his own SMTP server.
 | (All i know in respect to this is Yandex.(ru|com), which requires
 | that the hostname in the SMTP FROM: command _is_ a Yandex
 | address, i.e., _no mismatch_ with _who_ you claim to be, which is
 |
 |that's not what anthony claimed.  he said that if you say
 | HELO example.com
 |that the following must be true
 |(a) dns return an a record for the query example.com, and

Yes -- i think (or say, i'm sure that) gmail.com doesn't take care
for that at all.  Neither does Yandex.  (Never tried any other
free mail provider, i think they all depend on user
authentication.)

 |(b) the ip returned must have a ptr record pointing to example.com
 |(this is less enforced these days due to the difficulty of \
 |maintaining pointer
 |records.)

..So reverse lookups don't even come into play here.
I'm no longer sure wether old-school really hates not to be able
to perform sender verification via DNS, today a lot of pretty
prominent people use those providers themselve.

 |i think this is compatible with what you're saying.  this doesn't make
 |sense to me.  i don't do this:
 |
 | why i had to invent a *smtp-hostname* variable for the mailer
 | i maintain in order to address the SMTP FROM: content directly:
 |
 |perhaps you're conflating the envelope with the message?

Puh Erik, maybe -- you know, i'm a boche :)
Flying over an official document is the maximum i can handle, just
enough to hammer the most important facts into some long-time
cells, so please excuse possible distortion of terms.
Indeed, looking into RFC 5321 (i have it even in my arena):

   o  The domain name given in the EHLO command MUST be either a primary
  host name (a domain name that resolves to an address RR) or, if
  the host has no name, an address literal, as described in
  Section 4.1.3 and discussed further in the EHLO discussion of
  Section 4.1.4.

   o  The reserved mailbox name postmaster may be used in a RCPT
  command without domain qualification (see Section 4.1.1.3) and
  MUST be accepted if so used.

So huch!  SMTP communication how it actually happens in between me
and the public mail providers is invalid, evil and yuck.
I think i just wanted to add some value to what Anthony said.

Regarding *smtp-hostname*: i think one cannot expect from what
i call a normal user to understand just about anything regarding
any protocol etc. internals -- for no other reasons but missing
context information and maybe add lack of interest.  In fact, like
i said above, the same is true for me.  Given that this BSD Mail
derivative already has a variable called *hostname*, and that BSD
/ Linux systems have a hostname(1) command (even though POSIX only
specifies uname(1) and documents the name of this node within an
implementation-defined communications network; but POSIX.. well)
i decided to name the capability to overwrite the hostname that is
used in the SMTP MAIL FROM: command *smtp-hostname* (but not
that the manual is really user friendly sofar).

So now i'm stuck with it.  But since Matt uses Google the address
used in MAIL FROM: cannot be the problem anyway, since Google
doesn't care wether the addresses in the messages' From: header
and the SMTP MAIL FROM: command match or not (the last time
i tried; i admit that the Google message i've posted doesn't
really make sense in this context; oops..).

--steffen



[9fans] atexit() atexitdont()

2014-11-06 Thread Oleg
  Hi, all.

I looked at atexit() and atexitdont() and i don't understand why these
functions are implemented with a static array instead of singly linked list?
May be somebody with a greater plan9 experience can help me with my question.

If i do:

#include u.h
#include libc.h

void f1(void)
{
  print(f1\n);
}

void f2(void)
{
  print(f2\n);
}

void main(int, char**)
{
  atexit(f1);
  atexit(f2);
  atexit(f1);

  atexitdont(f2);
  atexit(f2);

  exits(nil);
}

i get:

f1
f2
f1

instead of:

f1
f1
f2

because of atexit.c source code.

  Thanks.



Re: [9fans] atexit() atexitdont()

2014-11-06 Thread erik quanstrom
On Thu Nov  6 16:07:56 EST 2014, lego12...@yandex.ru wrote:
   Hi, all.
 
 I looked at atexit() and atexitdont() and i don't understand why these
 functions are implemented with a static array instead of singly linked list?
 May be somebody with a greater plan9 experience can help me with my question.

perhaps a linked list would make sense, but atexits(2) doesn't say which order
the functions will be run in.  and it doesn't seem like a great idea to depend 
on
atexits running things in a particular order.

- erik



Re: [9fans] atexit() atexitdont()

2014-11-06 Thread Skip Tavakkolian
according to the man page:

Before calling _exits with msg as an argument, exits calls in reverse
order all the functions recorded by atexit.

so i think your result should be f2, f1, f1.


On Thu, Nov 6, 2014 at 1:26 PM, erik quanstrom quans...@quanstro.net
wrote:

 On Thu Nov  6 16:07:56 EST 2014, lego12...@yandex.ru wrote:
Hi, all.
 
  I looked at atexit() and atexitdont() and i don't understand why these
  functions are implemented with a static array instead of singly linked
 list?
  May be somebody with a greater plan9 experience can help me with my
 question.

 perhaps a linked list would make sense, but atexits(2) doesn't say which
 order
 the functions will be run in.  and it doesn't seem like a great idea to
 depend on
 atexits running things in a particular order.

 - erik




Re: [9fans] atexit() atexitdont()

2014-11-06 Thread Skip Tavakkolian
i'm wondering if print is the right instrument for knowing the order is
right.

On Thu, Nov 6, 2014 at 1:42 PM, Skip Tavakkolian skip.tavakkol...@gmail.com
 wrote:

 according to the man page:

 Before calling _exits with msg as an argument, exits calls in reverse
 order all the functions recorded by atexit.

 so i think your result should be f2, f1, f1.


 On Thu, Nov 6, 2014 at 1:26 PM, erik quanstrom quans...@quanstro.net
 wrote:

 On Thu Nov  6 16:07:56 EST 2014, lego12...@yandex.ru wrote:
Hi, all.
 
  I looked at atexit() and atexitdont() and i don't understand why these
  functions are implemented with a static array instead of singly linked
 list?
  May be somebody with a greater plan9 experience can help me with my
 question.

 perhaps a linked list would make sense, but atexits(2) doesn't say which
 order
 the functions will be run in.  and it doesn't seem like a great idea to
 depend on
 atexits running things in a particular order.

 - erik





Re: [9fans] atexit() atexitdont()

2014-11-06 Thread Oleg
On Thu, Nov 06, 2014 at 04:26:04PM -0500, erik quanstrom wrote:
 On Thu Nov  6 16:07:56 EST 2014, lego12...@yandex.ru wrote:
Hi, all.
  
  I looked at atexit() and atexitdont() and i don't understand why these
  functions are implemented with a static array instead of singly linked list?
  May be somebody with a greater plan9 experience can help me with my 
  question.
 
 perhaps a linked list would make sense, but atexits(2) doesn't say which order
 the functions will be run in.

  It say - in reverse order.

 and it doesn't seem like a great idea to depend on
 atexits running things in a particular order.

  Why? There are various situations...



Re: [9fans] atexit() atexitdont()

2014-11-06 Thread lego12239
On Thu, Nov 06, 2014 at 01:44:30PM -0800, Skip Tavakkolian wrote:
 i'm wondering if print is the right instrument for knowing the order is
 right.

  You are right, but in this case it's irrelevant. The atexit.c source code
is pretty disambiguous.




Re: [9fans] atexit() atexitdont()

2014-11-06 Thread k0ga

 perhaps a linked list would make sense, but atexits(2) doesn't say which order
 the functions will be run in.  and it doesn't seem like a great idea to 
 depend on
 atexits running things in a particular order.

POSIX says they must be called in reverse order.