Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Oct 1998 09:20:19 +0200 (CEST)
From:      Andrzej Bialecki <abial@nask.pl>
To:        Jeroen Ruigrok/Asmodai <asmodai@wxs.nl>
Cc:        Jerry Hicks <jhicks@glenatl.glenayre.com>, FreeBSD Small <freebsd-small@FreeBSD.ORG>
Subject:   Re: Command-line i/f (Re: PicoBSD) 
Message-ID:  <Pine.BSF.4.02A.9810050855220.27578-100000@korin.warman.org.pl>
In-Reply-To: <Version.32.19981004223523.010a32d0@pop.wxs.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 4 Oct 1998, Jeroen Ruigrok/Asmodai wrote:

> >Hard to tell... It's definitely different than other popular languages.
> >It's built around a concept of stack (all operations are done on its
> >internal stacks), it's a cross between compiler and interpreter, uses a
> >Reverse Polish Notation for most of its operations (now, this is not the
> >reason I started to play with it :-)), etc, etc, - see www.forth.org for
> >more info.
> 
> Reverse polish notation? I know of Hungarian notation, but not Polish, want
> to enlighten me? 

A.k.a. postfix notation. E.g. if you want to compute (3+4)*7 you enter it
this way:

3 4 + 7 *

This is natural consequence of choosing the stack as the backbone of the
language. This makes it somewhat harder to read, but it's much more
natural for most machines to execute. :-)

> >Again, I fully agree with you - that's also my intention. And I see a
> >Forth -based shell as a means to accomplish it - to glue all these
> >elements together, at the same time giving it flexibility and programming
> >abilities far beyond those of /bin/sh.
> 
> Dang, have to learn Forth than don't I? =)
> 
> How far do we need to adhere to Cisco's IOS/Shiva's SpiderSoftware command
> syntaxing? Most of it is good and usable.

Hmmm... They are just an idea to start from, I think. We need to sit and
think about a model of the system, in terms of hierarchy of subsystems.
Some of them would be such subsystems as User mgmt, IP config (interfaces,
routing, bridging, NAT...), Startup, Access control etc etc.. Then ,
basing on this description, we could go down to the bottom of the final
command which would look like:

	user add john *my_password*
	user delete evil_doer
	ip route add a.b.c.d e.f.g.h nnn
	ip nat add ....
	access user john permit line any
	access ip permit any from any	
	startup delete 100 sendmail
	startup add 101 bind
	startup add 102 thttpd

etc. etc..... and you could do this step by step, eg:

# user
User# ?
add		Add user
delete		Delete user
exit		Go one level up

User# add ?
TEXT		Username

User# add john
% Incomplete command
User# add john ?
TEXT		Password
User# add john his_password
ok
User# exit
# bye
.Connection closed by foreign host.

:-)

I know, this resembles IOS very close. If you happen to know other UI, you
can share with us how this would look like... anyway, I hope you get the
idea.

Andrzej Bialecki

--------------------   ++-------++  -------------------------------------
 <abial@nask.pl>       ||PicoBSD||   FreeBSD in your pocket? Go and see:
 Research & Academic   |+-------+|       "Small & Embedded FreeBSD"
 Network in Poland     | |TT~~~| |    http://www.freebsd.org/~picobsd/
--------------------   ~-+==---+-+  -------------------------------------


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-small" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.02A.9810050855220.27578-100000>