9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] what features would you like in a shell?
@ 2010-10-03 16:25 C H Forsyth
  2010-10-05 19:12 ` erik quanstrom
  0 siblings, 1 reply; 24+ messages in thread
From: C H Forsyth @ 2010-10-03 16:25 UTC (permalink / raw)
  To: 9fans

quite typically it's more than a little late, but i was finally able to scan in
an old RSRE paper that was relevant to the following. the scanning system i had
at the time couldn't cope.

anyway, it's at
	http://www.vitanuova.com/dist/doc/rsre-3522-curt.pdf

-------------------------------------
Newsgroups: comp.os.plan9
From: noagbodjivictor <noagbodjivic...@gmail.com>
Date: Tue, 31 Mar 2009 15:29:44 GMT
Local: Tues, Mar 31 2009 4:29 pm
Subject: what features would you like in a shell?
Reply to author | Forward | Print | Individual message | Show original | Report this message | Find messages by this author
hello,
I'm a undergrade CS student doing a project for my introductory
operating systems class. my team wants to write a simple shell from  scratch.
one idea we have found so far is the following. the shell will record
all the programs it has run. whenever a program goes awry and is
killed by the kernel. the shell will reload it.
what do you think of it?
also, we know there are many many shells out there. and our professor
would not like us to write from scratch. we wanted because it provides
much exercise. but we certainly don't know about all the shells out
there.
so I'm writing to get your opinions. maybe there are thing that people
implement themselves but want included in the shell itself? or just
something they want implemented?
thanks a lot in advance for your help.



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] what features would you like in a shell?
  2010-10-03 16:25 [9fans] what features would you like in a shell? C H Forsyth
@ 2010-10-05 19:12 ` erik quanstrom
  0 siblings, 0 replies; 24+ messages in thread
From: erik quanstrom @ 2010-10-05 19:12 UTC (permalink / raw)
  To: 9fans

On Sun Oct  3 12:11:50 EDT 2010, forsyth@vitanuova.com wrote:
> quite typically it's more than a little late, but i was finally able to scan in
> an old RSRE paper that was relevant to the following. the scanning system i had
> at the time couldn't cope.
>
> anyway, it's at
> 	http://www.vitanuova.com/dist/doc/rsre-3522-curt.pdf

thanks for scanning that.  interesting.  different.

- erik



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] what features would you like in a shell?
  2009-04-02 18:41 ` John Stalker
@ 2009-04-02 23:20   ` LiteStar numnums
  0 siblings, 0 replies; 24+ messages in thread
From: LiteStar numnums @ 2009-04-02 23:20 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 1783 bytes --]

If you have to go to this level, wouldn't it be better to have a language
for this? You probably wouldn't want this interactively, prototyping aside.

On Thu, Apr 2, 2009 at 2:41 PM, John Stalker <stalker@maths.tcd.ie> wrote:

> > so I'm writing to get your opinions. maybe there are thing that people
> > implement themselves but want included in the shell itself? or just
> > something they want implemented?
>
> What I most often miss in shell programming is a proper type system.
> Bourne basically only has strings.  Rc improves matters slightly with
> lists of strings.  It's still not enough for me.  I make a lot of
> mistakes in shell programming and strict type checking would catch
> most of them.  I'm not sure I would use a strictly typed shell
> exclusively, but I would certainly like to have it available.
>
> --
> John Stalker
> School of Mathematics
> Trinity College Dublin
> tel +353 1 896 1983
> fax +353 1 896 2282
>
>


--
And in the "Only Prolog programmers will find this funny" department:

Q: How many Prolog programmers does it take to change a lightbulb?

A: No.
 -- Ovid

   "By cosmic rule, as day yields night, so winter summer, war peace, plenty
famine. All things change. Air penetrates the lump of myrrh, until the
joining bodies die and rise again in smoke called incense."

   "Men do not know how that which is drawn in different directions
harmonises with itself. The harmonious structure of the world depends upon
opposite tension like that of the bow and the lyre."

   "This universe, which is the same for all, has not been made by any god
or man, but it always has been, is, and will be an ever-living fire,
kindling itself by regular measures and going out by regular measures"
-- Heraclitus

[-- Attachment #2: Type: text/html, Size: 2246 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] what features would you like in a shell?
  2009-03-31 15:29 noagbodjivictor
                   ` (5 preceding siblings ...)
  2009-03-31 18:28 ` Corey
@ 2009-04-02 18:41 ` John Stalker
  2009-04-02 23:20   ` LiteStar numnums
  6 siblings, 1 reply; 24+ messages in thread
From: John Stalker @ 2009-04-02 18:41 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> so I'm writing to get your opinions. maybe there are thing that people
> implement themselves but want included in the shell itself? or just
> something they want implemented?

What I most often miss in shell programming is a proper type system.
Bourne basically only has strings.  Rc improves matters slightly with
lists of strings.  It's still not enough for me.  I make a lot of
mistakes in shell programming and strict type checking would catch
most of them.  I'm not sure I would use a strictly typed shell
exclusively, but I would certainly like to have it available.

--
John Stalker
School of Mathematics
Trinity College Dublin
tel +353 1 896 1983
fax +353 1 896 2282



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] what features would you like in a shell?
  2009-04-01 12:41         ` hiro
@ 2009-04-01 12:54           ` Martin Neubauer
  0 siblings, 0 replies; 24+ messages in thread
From: Martin Neubauer @ 2009-04-01 12:54 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

* hiro (23hiro@googlemail.com) wrote:
> I also use to put a sleep 1 in there.
>

I'm all for minimalism:
	while(! firefox) sleep 1



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] what features would you like in a shell?
  2009-04-01 10:01       ` matt
@ 2009-04-01 12:41         ` hiro
  2009-04-01 12:54           ` Martin Neubauer
  0 siblings, 1 reply; 24+ messages in thread
From: hiro @ 2009-04-01 12:41 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I also use to put a sleep 1 in there.

On Wed, Apr 1, 2009 at 12:01 PM, matt <mattmobile@proweb.co.uk> wrote:
>
>> If somebody wants to do such a thing (which all we agree is a bad
>> idea) you need no new features in the shell, eg:
>> while() firefox
>>
>
> that doesn't permit a clean exit, this does :
>
> fn ff {firefox || ff} ; ff;
>
>
>



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] what features would you like in a shell?
  2009-04-01  9:43     ` yy
@ 2009-04-01 10:01       ` matt
  2009-04-01 12:41         ` hiro
  0 siblings, 1 reply; 24+ messages in thread
From: matt @ 2009-04-01 10:01 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


> If somebody wants to do such a thing (which all we agree is a bad
> idea) you need no new features in the shell, eg:
> while() firefox
>
that doesn't permit a clean exit, this does :

fn ff {firefox || ff} ; ff;




^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] what features would you like in a shell?
  2009-04-01  9:28   ` matt
@ 2009-04-01  9:43     ` yy
  2009-04-01 10:01       ` matt
  0 siblings, 1 reply; 24+ messages in thread
From: yy @ 2009-04-01  9:43 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

2009/4/1 matt <mattmobile@proweb.co.uk>:
>
>> you think the idea of reloading a crashed program is not a good one?
>> for example, what if it's a web browser?
>>
>>
>
> crash reload crash reload crash reload agghh make it stop
>
> btw. Windows uses this mechanism for running Explorer, as a stop gap to
> fixing it they just made it auto-respawn.
>


If somebody wants to do such a thing (which all we agree is a bad
idea) you need no new features in the shell, eg:
while() firefox


--
- yiyus || JGL .



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] what features would you like in a shell?
  2009-03-31 16:16 ` noagbodjivictor
  2009-03-31 16:47   ` erik quanstrom
@ 2009-04-01  9:28   ` matt
  2009-04-01  9:43     ` yy
  1 sibling, 1 reply; 24+ messages in thread
From: matt @ 2009-04-01  9:28 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


> you think the idea of reloading a crashed program is not a good one?
> for example, what if it's a web browser?
>
>

crash reload crash reload crash reload agghh make it stop

btw. Windows uses this mechanism for running Explorer, as a stop gap to
fixing it they just made it auto-respawn.


either way I think it's a unrequired feature for a shell, a user program
specifically for monitoring process state would be preferred, should it
be required.



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] what features would you like in a shell?
  2009-04-01  2:39     ` sqweek
@ 2009-04-01  3:14       ` erik quanstrom
  0 siblings, 0 replies; 24+ messages in thread
From: erik quanstrom @ 2009-04-01  3:14 UTC (permalink / raw)
  To: 9fans

>  re not reinventing the wheel, you might want to look into the es
> shell. I think this is what erik alluded to earlier - I've never used
> it myself but I understand it is extremely programmable, to the point
> where you can redefine the pipe operator for example.

; %pipe {echo true} 1 0 cat
true
; fn %pipe {echo $* ; $&pipe $*}; echo fu | cat
{echo fu} 1 0 {cat}
fu

- erik



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] what features would you like in a shell?
  2009-03-31 16:26   ` erik quanstrom
@ 2009-04-01  2:39     ` sqweek
  2009-04-01  3:14       ` erik quanstrom
  0 siblings, 1 reply; 24+ messages in thread
From: sqweek @ 2009-04-01  2:39 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

2009/4/1 erik quanstrom <quanstro@quanstro.net>:
>> I've not run into many actual problems with rc so it's pretty near
>> perfect :>
>
> pretty near.
>
> redirection has a few rough points.  dealing with a device
> that expects a write then a read like /net/dns is painful.
> i can never get the syntax right the first try.
> and (hopefully this isn't just my ignorance) i don't know how
> to open a fd to a background shell as one would in bourne.

 I haven't sat down and understood the finer points of rc's
redirection yet, but the precedence relationships between > < and |
certainly confuse the hell out of me, coming from bourne ;)

 I'd like to see a shell that, when confronted with a pipeline that
looks like "<foo ... | ... >foo", realises input and output are headed
for the same file, and does whatever it needs to do to avoid
clobbering the file before reading it.

 re not reinventing the wheel, you might want to look into the es
shell. I think this is what erik alluded to earlier - I've never used
it myself but I understand it is extremely programmable, to the point
where you can redefine the pipe operator for example.
-sqweek



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] what features would you like in a shell?
  2009-03-31 15:29 noagbodjivictor
                   ` (4 preceding siblings ...)
  2009-03-31 16:55 ` J.R. Mauro
@ 2009-03-31 18:28 ` Corey
  2009-04-02 18:41 ` John Stalker
  6 siblings, 0 replies; 24+ messages in thread
From: Corey @ 2009-03-31 18:28 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Tue, 2009-03-31 at 15:29 +0000, noagbodjivictor wrote:
>
> so I'm writing to get your opinions. maybe there are thing that people
> implement themselves but want included in the shell itself? or just
> something they want implemented?
>
> thanks a lot in advance for your help.
>

A few features I'd like to see in a shell (though they may already
exist):

Simple redirection into jobs, i.e. some_bin & echo "data" >%1, though
really I don't see why job control should be part of the shell as
opposed to its own program, i.e. $id=`{job start some_bin}; echo "data"
| job $id

Open looped pipelines. This one is kind of weird (and full of potential
problems) a pipeline the which reads its input from its output AND
stdin, and outputs to its input AND stdout. But I think this one can
actually be done with cat, tee, and FIFO's.




^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] what features would you like in a shell?
  2009-03-31 16:47   ` erik quanstrom
@ 2009-03-31 17:03     ` michael block
  0 siblings, 0 replies; 24+ messages in thread
From: michael block @ 2009-03-31 17:03 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

>> you think the idea of reloading a crashed program is not a good one?
>
> i don't like the idea.
>
>> for example, what if it's a web browser?
>
> how do you determine when to relaunch?  how
> do you decide that the program is not going to
> relaunch?  how do you stop an errant shell from
> relaunching and consuming all your resources?

you could just print out the commands to restart the
program, and the user could select and send it only
if they want to. that's the approach i usually take
when i write an rc script to automate something, but
i want to check what's going to happen before i
let it run



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] what features would you like in a shell?
  2009-03-31 15:29 noagbodjivictor
                   ` (3 preceding siblings ...)
  2009-03-31 16:16 ` noagbodjivictor
@ 2009-03-31 16:55 ` J.R. Mauro
  2009-03-31 18:28 ` Corey
  2009-04-02 18:41 ` John Stalker
  6 siblings, 0 replies; 24+ messages in thread
From: J.R. Mauro @ 2009-03-31 16:55 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Tue, Mar 31, 2009 at 11:29 AM, noagbodjivictor
<noagbodjivictor@gmail.com> wrote:
> hello,
>
> I'm a undergrade CS student doing a project for my introductory
> operating systems class. my team wants to write a simple shell from
> scratch.
>
> one idea we have found so far is the following. the shell will record
> all the programs it has run. whenever a program goes awry and is
> killed by the kernel. the shell will reload it.
>
> what do you think of it?

Bad idea. What if I expect it to die and maybe want to debug it before
running it again? What if the kernel killed it because it was hogging
resources? Respawning something that constantly gets killed will
probably render the machine unusable. What if the program dies really
quickly? The shell could get caught in a very tight loop you can't
interrupt, and the user winds up killing the shell itself and opening
a new one (after getting really aggravated).

I suppose you could make it optional, but then again, why can't the
user just restart the process by hand?

>
> also, we know there are many many shells out there. and our professor
> would not like us to write from scratch. we wanted because it provides
> much exercise. but we certainly don't know about all the shells out
> there.
>
> so I'm writing to get your opinions. maybe there are thing that people
> implement themselves but want included in the shell itself? or just
> something they want implemented?
>
> thanks a lot in advance for your help.
>
>



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] what features would you like in a shell?
  2009-03-31 16:16 ` noagbodjivictor
@ 2009-03-31 16:47   ` erik quanstrom
  2009-03-31 17:03     ` michael block
  2009-04-01  9:28   ` matt
  1 sibling, 1 reply; 24+ messages in thread
From: erik quanstrom @ 2009-03-31 16:47 UTC (permalink / raw)
  To: 9fans

> thanks a lot for the reply. i got my hand of the unix programming
> environment by Kernighan and Pike. I don't think we have the
> programming skills for implementing a regular expression engine, but

i would recommend against reimplementing regular expressions.
ken is hard to beat; the standard regexp library is what you want.

the trick is going to be thinking hard about how you are going to
deal with some of the mismatches between standard regular expressions
and file names.  for example, you might need to deal with the fact
that '.' is common in file names, but means any character in a regular
expression.  i think this is going to be the cannonical problem:
	glob	regexp
	*.[ch]	\.[ch]$
	'*'	\*	(this problem is easy)

i don't think this one is about writing lots of code.

> you think the idea of reloading a crashed program is not a good one?

i don't like the idea.

> for example, what if it's a web browser?

how do you determine when to relaunch?  how
do you decide that the program is not going to
relaunch?  how do you stop an errant shell from
relaunching and consuming all your resources?

- erik



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] what features would you like in a shell?
  2009-03-31 16:19   ` erik quanstrom
@ 2009-03-31 16:27     ` erik quanstrom
  0 siblings, 0 replies; 24+ messages in thread
From: erik quanstrom @ 2009-03-31 16:27 UTC (permalink / raw)
  To: 9fans

> it's done by rio, not the shell and you use the
> insert key, not tab, as god intended.  bash

insert ≡ control-f.

- erik



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] what features would you like in a shell?
  2009-03-31 16:10 ` matt
@ 2009-03-31 16:26   ` erik quanstrom
  2009-04-01  2:39     ` sqweek
  0 siblings, 1 reply; 24+ messages in thread
From: erik quanstrom @ 2009-03-31 16:26 UTC (permalink / raw)
  To: 9fans

> I've not run into many actual problems with rc so it's pretty near
> perfect :>

pretty near.

redirection has a few rough points.  dealing with a device
that expects a write then a read like /net/dns is painful.
i can never get the syntax right the first try.
and (hopefully this isn't just my ignorance) i don't know how
to open a fd to a background shell as one would in bourne.

quoting can get a little dicy when combined with here
docs.

> hash maps : a['name'] = 'glenda'
> arithmetic - though with the 80/20 rule, I don't think the bloat is worth it

the shell i worked on had regular lists, not flat
lists like rc.  the problem with this is that suppose
you're in a directory with a.c b.c a.h b.h.  does this
print 2 or 4?

	fn x {
		echo $#*
	}
	x *.c *.h
in rc, the answer is obvious.  if you allow regular
lists, then * is either ((a.c b.c) (a.h b.h)) or
(a.c b.c a.h b.h).

perhaps i just missed the obvious.

- erik



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] what features would you like in a shell?
  2009-03-31 16:14 ` rapogue
  2009-03-31 16:19   ` André Günther
@ 2009-03-31 16:19   ` erik quanstrom
  2009-03-31 16:27     ` erik quanstrom
  1 sibling, 1 reply; 24+ messages in thread
From: erik quanstrom @ 2009-03-31 16:19 UTC (permalink / raw)
  To: 9fans

> I'd love to see tab completion at the command line. If there is a way to do it in Plan 9, then I haven't figured it out yet. But then I'm a newby to the OS.

it's done by rio, not the shell and you use the
insert key, not tab, as god intended.  bash
irritates the heck out of me when it won't let
me type a tab.  it's a gentle reminder that i
should stop wasting time on linux.

- erik



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] what features would you like in a shell?
  2009-03-31 16:14 ` rapogue
@ 2009-03-31 16:19   ` André Günther
  2009-03-31 16:19   ` erik quanstrom
  1 sibling, 0 replies; 24+ messages in thread
From: André Günther @ 2009-03-31 16:19 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Just Ctrl+F and you have completion for the current dir. I think it's
a pretty easy hack to extend this to /bin

On 31 Mar 2009, at 18:14, rapogue@catt.com wrote:

> I'd love to see tab completion at the command line. If there is a
> way to do it in Plan 9, then I haven't figured it out yet. But then
> I'm a newby to the OS.
>
> ----- Original Message -----
> From: noagbodjivictor <noagbodjivictor@gmail.com>
> To: 9fans@9fans.net
> Sent: Tue, 31 Mar 2009 11:29:44 -0400 (EDT)
> Subject: [9fans] what features would you like in a shell?
>
> hello,
>
> I'm a undergrade CS student doing a project for my introductory
> operating systems class. my team wants to write a simple shell from
> scratch.
>
> one idea we have found so far is the following. the shell will record
> all the programs it has run. whenever a program goes awry and is
> killed by the kernel. the shell will reload it.
>
> what do you think of it?
>
> also, we know there are many many shells out there. and our professor
> would not like us to write from scratch. we wanted because it provides
> much exercise. but we certainly don't know about all the shells out
> there.
>
> so I'm writing to get your opinions. maybe there are thing that people
> implement themselves but want included in the shell itself? or just
> something they want implemented?
>
> thanks a lot in advance for your help.
>
>
>




^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] what features would you like in a shell?
  2009-03-31 15:29 noagbodjivictor
                   ` (2 preceding siblings ...)
  2009-03-31 16:14 ` rapogue
@ 2009-03-31 16:16 ` noagbodjivictor
  2009-03-31 16:47   ` erik quanstrom
  2009-04-01  9:28   ` matt
  2009-03-31 16:55 ` J.R. Mauro
                   ` (2 subsequent siblings)
  6 siblings, 2 replies; 24+ messages in thread
From: noagbodjivictor @ 2009-03-31 16:16 UTC (permalink / raw)
  To: 9fans


> it would be interesting to use something closer to regular expressions
> rather than standard shell globbing. �the challenge would be
> to avoid gratuitous breakage and yet allow the match operator
> to be much more powerful.

thanks a lot for the reply. i got my hand of the unix programming
environment by Kernighan and Pike. I don't think we have the
programming skills for implementing a regular expression engine, but
there was a simple solution that measured the difference between the
command the user entered and an existing command.

maybe we should include that one.

you think the idea of reloading a crashed program is not a good one?
for example, what if it's a web browser?



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] what features would you like in a shell?
  2009-03-31 15:29 noagbodjivictor
  2009-03-31 15:47 ` erik quanstrom
  2009-03-31 16:10 ` matt
@ 2009-03-31 16:14 ` rapogue
  2009-03-31 16:19   ` André Günther
  2009-03-31 16:19   ` erik quanstrom
  2009-03-31 16:16 ` noagbodjivictor
                   ` (3 subsequent siblings)
  6 siblings, 2 replies; 24+ messages in thread
From: rapogue @ 2009-03-31 16:14 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I'd love to see tab completion at the command line. If there is a way to do it in Plan 9, then I haven't figured it out yet. But then I'm a newby to the OS.

----- Original Message -----
From: noagbodjivictor <noagbodjivictor@gmail.com>
To: 9fans@9fans.net
Sent: Tue, 31 Mar 2009 11:29:44 -0400 (EDT)
Subject: [9fans] what features would you like in a shell?

hello,

I'm a undergrade CS student doing a project for my introductory
operating systems class. my team wants to write a simple shell from
scratch.

one idea we have found so far is the following. the shell will record
all the programs it has run. whenever a program goes awry and is
killed by the kernel. the shell will reload it.

what do you think of it?

also, we know there are many many shells out there. and our professor
would not like us to write from scratch. we wanted because it provides
much exercise. but we certainly don't know about all the shells out
there.

so I'm writing to get your opinions. maybe there are thing that people
implement themselves but want included in the shell itself? or just
something they want implemented?

thanks a lot in advance for your help.






^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] what features would you like in a shell?
  2009-03-31 15:29 noagbodjivictor
  2009-03-31 15:47 ` erik quanstrom
@ 2009-03-31 16:10 ` matt
  2009-03-31 16:26   ` erik quanstrom
  2009-03-31 16:14 ` rapogue
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 24+ messages in thread
From: matt @ 2009-03-31 16:10 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I've not run into many actual problems with rc so it's pretty near
perfect :>

Though as Erik said - regex matches to compliment ~ matching

hash maps : a['name'] = 'glenda'
arithmetic - though with the 80/20 rule, I don't think the bloat is worth it

I tried a write a couple of other ideas but each time it was better to
spawn awk or some other better tool for the job!







^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [9fans] what features would you like in a shell?
  2009-03-31 15:29 noagbodjivictor
@ 2009-03-31 15:47 ` erik quanstrom
  2009-03-31 16:10 ` matt
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 24+ messages in thread
From: erik quanstrom @ 2009-03-31 15:47 UTC (permalink / raw)
  To: 9fans

On Tue Mar 31 11:37:06 EDT 2009, noagbodjivictor@gmail.com wrote:
> hello,
>
> I'm a undergrade CS student doing a project for my introductory
> operating systems class. my team wants to write a simple shell from
> scratch.
>
> one idea we have found so far is the following. the shell will record
> all the programs it has run. whenever a program goes awry and is
> killed by the kernel. the shell will reload it.

unfortunately, the most common reason for a program to go
arwy is that the program is broken and it will break again when
reloated.

it would be more interesting to explore how a shell in plan 9
could be used to build simple fs.

rc has a very interesting virtual machine.  it might be interesting
to build a shell with some hooks into its vm.  paul haahr and
byron built a shell with scheme-y internals and exposed them.
interesting, but complicated.

it would be interesting to use something closer to regular expressions
rather than standard shell globbing.  the challenge would be
to avoid gratuitous breakage and yet allow the match operator
to be much more powerful.

these are areas where rc might be improved upon.  however,
as per usual, it was hard to improve on bourne, and it's even
harder to improve on duff.

nevertheless, i learned quite a bit from failing to improve on
rc.

- erik



^ permalink raw reply	[flat|nested] 24+ messages in thread

* [9fans] what features would you like in a shell?
@ 2009-03-31 15:29 noagbodjivictor
  2009-03-31 15:47 ` erik quanstrom
                   ` (6 more replies)
  0 siblings, 7 replies; 24+ messages in thread
From: noagbodjivictor @ 2009-03-31 15:29 UTC (permalink / raw)
  To: 9fans

hello,

I'm a undergrade CS student doing a project for my introductory
operating systems class. my team wants to write a simple shell from
scratch.

one idea we have found so far is the following. the shell will record
all the programs it has run. whenever a program goes awry and is
killed by the kernel. the shell will reload it.

what do you think of it?

also, we know there are many many shells out there. and our professor
would not like us to write from scratch. we wanted because it provides
much exercise. but we certainly don't know about all the shells out
there.

so I'm writing to get your opinions. maybe there are thing that people
implement themselves but want included in the shell itself? or just
something they want implemented?

thanks a lot in advance for your help.



^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2010-10-05 19:12 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-03 16:25 [9fans] what features would you like in a shell? C H Forsyth
2010-10-05 19:12 ` erik quanstrom
  -- strict thread matches above, loose matches on Subject: below --
2009-03-31 15:29 noagbodjivictor
2009-03-31 15:47 ` erik quanstrom
2009-03-31 16:10 ` matt
2009-03-31 16:26   ` erik quanstrom
2009-04-01  2:39     ` sqweek
2009-04-01  3:14       ` erik quanstrom
2009-03-31 16:14 ` rapogue
2009-03-31 16:19   ` André Günther
2009-03-31 16:19   ` erik quanstrom
2009-03-31 16:27     ` erik quanstrom
2009-03-31 16:16 ` noagbodjivictor
2009-03-31 16:47   ` erik quanstrom
2009-03-31 17:03     ` michael block
2009-04-01  9:28   ` matt
2009-04-01  9:43     ` yy
2009-04-01 10:01       ` matt
2009-04-01 12:41         ` hiro
2009-04-01 12:54           ` Martin Neubauer
2009-03-31 16:55 ` J.R. Mauro
2009-03-31 18:28 ` Corey
2009-04-02 18:41 ` John Stalker
2009-04-02 23:20   ` LiteStar numnums

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).