Re: [9fans] simple rc problem in p9p (on OpenBSD)

2018-04-26 Thread Teodoro Santoni
Hi,

2018-04-26 16:45 GMT+02:00, Rudolf Sykora :
> Hello
>
> I, using OpenBSD's p9p, see this
>
> % w='A
> B
> C'
> % echo $w
> A
> B
> C
> % for(i in $w) {echo $i; echo XXX}
> A
> B
> C
> XXX
>
> ie, w in for is taken as just one argument instead of
> 3. What can I do with it?
>
> I haven't modified ifs (it should be \n space and tab).
> (How can I check, say see the character codes?)
>
> Thanks for comments
> Ruda
>
>

; w='A
B
C'
; we=`{echo $w}
; for(i in $we) { echo 'arg '$i; }
arg A
arg B
arg C
; for(i in $w) { echo 'arg'$i; }
argA
B
C
; exit

When enclosed in single quotes, the variable is, regardless of spaces
or whatnot, a single element. For a list you have to expand it in some
way, inside a command expansion or declaring a list.



Re: [9fans] Why Plan 9 uses $ifs instead of $IFS?

2017-10-17 Thread Teodoro Santoni
Hi,

2017-10-17 16:38 GMT+02:00, Giacomo Tesio :
> Out of curiosity, do anybody know why Plan9 designers chose lowercase
> variables over uppercase ones?
>
> At first, given the different conventions between rc and sh (eg $path is an
> array, while $PATH is a string), I supposed Plan 9 designers wanted to
> prevent conflict with unix tools relying to the older conventions.
>
> However, I'm not sure this was the main reason, as this also open to subtle
> issues: if a unix shell modifies $IFS and then invoke an rc script, such
> script will ignore the change and keep using the previous $ifs.
>
>
> As far as I can see, APE does not attempt any translation between the two
> conventions, so maybe I'm just missing something obvious...
>
>
> Do anyone know what considerations led to such design decision?
>
>
> Giacomo
>


Probably a matter of taste and different user behaviours, plan9
developers weren't just the same developers from unix.



Re: [9fans] On Linux, what is the rc init file?

2015-08-30 Thread Teodoro Santoni
On Sun, Aug 30, 2015 at 10:02:54AM -0700, erik quanstrom wrote:
 
 the .bashrc lookalike is *not* rcmain. rcmain is the second
 phase of the rc virtual machine bootstrapping itself.
 
 the .bashrc lookalike is $home/lib/profile.
 
 - erik

I don't see any real difference between adding modified versions of my .bashrc 
things to rcmain or putting them to $home/lib/profile and editing rcmain to 
make it do -l every time rc is launched as an interactive shell. There are a 
lot, though. And that may means it will source the file even if I use rc as it 
was a scripting language for things that aren't my terminal env.
I just didn't like to wrap rc -l, use win rc -l or launch rc and . 
$home/lib/profile (or whatever I would use as alias). So probably I'll use 
rcmain in a fashion that would resemble, in part or wholly, .bashrc.

--
Teodoro Santoni

Something is wrong. I don't wanna compile 20 KB of Go code to list files.



Re: [9fans] On Linux, what is the rc init file?

2015-08-30 Thread Teodoro Santoni
On Sun, Aug 30, 2015 at 08:07:06PM +0100, Charles Forsyth wrote:
 rcmain is shared. the profile is per-user

As long as $PLAN9 is shared.
But my conf is to be used in a machine which is single-user, atm.

--
Teodoro Santoni

Something is wrong. I don't wanna compile 20 KB of Go code to list files.



Re: [9fans] On Linux, what is the rc init file?

2015-08-28 Thread Teodoro Santoni
Good afternoon,

On Fri, Aug 28, 2015 at 10:13:26AM -0500, Ryan Gonzalez wrote:
 Every shell has one. You know, like .bashrc, .profile, etc. What's
 plan9port rc's?

Nothing AFAICT. But, when used as login shell or with -l option, it should 
execute on startup the command . $home/lib/profile...

--
Teodoro Santoni

Something is wrong. I don't wanna compile 20 KB of Go code to list files.



Re: [9fans] On Linux, what is the rc init file?

2015-08-28 Thread Teodoro Santoni
On Fri, Aug 28, 2015 at 11:49:41AM -0400, s...@9front.org wrote:
 Take a look at $PLAN9/rcmain.
 
 sl

Well, punch me in the face and call me Suzanne!
That changes everything, because absence of a .bashrc
lookalike was the thing that prevented me from using
rc for everyday shell needs. But I never investigated a lot.
Thank you

--
Teodoro Santoni

Something is wrong. I don't wanna compile 20 KB of Go code to list files.



Re: [9fans] Trying to override 'cd' command

2015-06-27 Thread Teodoro Santoni
On Sat, Jun 27, 2015 at 11:55:32AM -0500, Ryan Gonzalez wrote:
 I think so...
 
 So, in order to get my cd command, I enter '-' at the rc prompt? Is there 
 some way for that to happen automatically?
 
 On June 27, 2015 8:34:24 AM CDT, Neven Sajko nsa...@gmail.com wrote:
 From the manual:
 
   -l If -l is given or the first character of argument
  zero is -, rc reads commands from
  $home/lib/profile, if it exists, before reading
  its normal input.
 
 Does this help you?

Good evening,

no. You have to source the file $home/lib/profile by hand or invoke rc from a 
link called -rc, as rc -l or whatever.

--
Teodoro Santoni

Something is wrong. I don't wanna compile 20 KB of Go code to list files.





Re: [9fans] GitHub thinks plan9port hasn't been changed in 7 months!

2015-06-22 Thread Teodoro Santoni
On Mon, Jun 22, 2015 at 11:25:19AM -0500, Ryan Gonzalez wrote:
 Kind of funny. For me, the GitHub repo says the last commit was 7 months ago, 
 when it was really just last month.
 
 -- 
 Sent from my Android device with K-9 Mail. Please excuse my brevity.

Probably that's why people asked whether the project was on hiatus/dead.

--
Teodoro Santoni



Re: [9fans] Factotum vs SASL

2015-01-01 Thread Teodoro Santoni
Good afternoon,

On Sat, Nov 29, 2014 at 08:46:08PM +0100, Enrico Weigelt, metux IT consult 
wrote:
snip
 A really cool feature, IMHO, would be able to connect my local factotum
 to remote ones easily, so I'll get a similar feature like eg. lastpass
 is doing for the web. For example, somebody like to give me access to
 some remote application, but for some reason can't add my pubkey there
 (eg. it doesn't even support such things), but doesn't want to give me
 cleartext passwords, he could set things up in his (publically
 accessible) factotum instance, which then handles all the auth stuff
 for that application.
 
 By the way, that leads me to another topic, which is annoying me
 for quite some time: policykit.
 
 For those, who have been spared of it:
 
 It's an invention of the freedesktop folks (or should I call them
 Lennartists ? ;-o), some kind of proxy, which routes certain dbus
 calls (based on certain policies) between several users (and root).
 This way, eg. unprivileged users can still be given access to system
 level stuff, like network-manager. And that's exactly the point which
 regularily hit me (eg. some day my primary account suddenly wasn't
 able to choose wireless networks anymore, and even the old fashioned
 way via unix groups didn't help either).

In both ways you should change the background on which the security would run.
For network applications, a web browser must stay out of the project or rely 
on weaker security measures (auth with factotum, then the browser is 
authorized visiting some https site for signing on).
Policykit and consolekit are crazy nonsense by design, strictly UNIX-speaking. 
If the user isn't wheel or root, but has to acceed network (both wireless or 
ethernet), graphics, certain areas instead of others, the adminstrator has to 
give h{im,er} access at login to everything is required to {,s}he. If, to do 
so, you can't use the programs you loved to limit privileges in SSH, and you 
want a single-sign-on to join wifi networks, printers, external drives, 
opening webbrowser and whatnot, the GUI components should be easily hackable 
to roll out the user experience required. 
And thinking about X11 today and the fuss about waylands and mirs... The whole 
thing is fucked up, imho.
Your project is eating or exploiting to user level, at the end of this 
mini-essay, 85% of the operating system now. Like the classic X server, 
systemd+wayland or 
upstart/systemd+mir.
It's not a bad thing! Lennartism is just a Will Hunting approach. Mixed with a 
bag full of shit. 
The way to go is writing a x server like you would write a TeX environment or 
a compiler toolchain, which will lead you rolling out a systemd better 
designed that doesn't make its way to pid 1.
It's a lot of work. Are you sure you wouldn't like to try p9? 

Happy gregorian first of the year,

--
Teodoro Santoni



[9fans] Re: i'm afraid we've had it wrong

2013-09-29 Thread Teodoro Santoni

Surely there was a market to fit into...

On domenica 29 settembre 2013 22:34:34 CEST, Charles Forsyth wrote:


On 29 September 2013 17:55, andrey mirtchovski 
mirtchov...@gmail.com wrote:

http://www.di.unipi.it/~nids/docs/the_plan-9_effect.html

I note that despite that analysis he worked on Bing.





[9fans] Re: i'm afraid we've had it wrong

2013-09-29 Thread Teodoro Santoni

Oh geez, I'm some guy passing by but I hope that this motivational speech about making things 
for the cashflow reaches the whole Microsoft, 'cause the Microsophiles totally missed the 
point with their work, it seems. I can ignore his thoughts about Bell Labs being some kind of 
RD department strict on budget of some casual telco, or his focus on having 
impressions on the sw! Get the cash! Go social an' advertise!. Don't know about you

On domenica 29 settembre 2013 18:55:20 CEST, andrey mirtchovski wrote:

after all these years:

http://www.di.unipi.it/~nids/docs/the_plan-9_effect.html








[9fans] Re: i'm afraid we've had it wrong

2013-09-29 Thread Teodoro Santoni

However stating that just works equals don't rework it is very Microsofty, 
tho'

On domenica 29 settembre 2013 18:55:20 CEST, andrey mirtchovski wrote:

after all these years:

http://www.di.unipi.it/~nids/docs/the_plan-9_effect.html