From owner-freebsd-small Mon Oct 5 00:16:15 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA22387 for freebsd-small-outgoing; Mon, 5 Oct 1998 00:16:15 -0700 (PDT) (envelope-from owner-freebsd-small@FreeBSD.ORG) Received: from korin.warman.org.pl (korin.nask.waw.pl [148.81.160.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA22378 for ; Mon, 5 Oct 1998 00:16:05 -0700 (PDT) (envelope-from abial@nask.pl) Received: from localhost (abial@localhost) by korin.warman.org.pl (8.9.1/8.8.5) with SMTP id JAA21118; Mon, 5 Oct 1998 09:20:20 +0200 (CEST) X-Authentication-Warning: korin.warman.org.pl: abial owned process doing -bs Date: Mon, 5 Oct 1998 09:20:19 +0200 (CEST) From: Andrzej Bialecki X-Sender: abial@korin.warman.org.pl To: Jeroen Ruigrok/Asmodai cc: Jerry Hicks , FreeBSD Small Subject: Re: Command-line i/f (Re: PicoBSD) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-small@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 -------------------- ++-------++ ------------------------------------- ||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