Re: [dev] s - suckless shell

2016-08-14 Thread Lee Fallat
On Sat, Aug 13, 2016 at 11:50 PM, Ben Woolley wrote: > > We now have very good automation tools that are not shells, like Python and > Lua, so wouldn't it make sense to take a second look at shells that are more > specific to command interpretation? > This looks fun to talk about. I think any

Re: [dev] s - suckless shell

2016-08-14 Thread hiro
python is not a "good automation tool".

Re: [dev] s - suckless shell

2016-08-13 Thread Ben Woolley
> On Aug 13, 2016, at 9:26 AM, Wolfgang Corcoran-Mathe > wrote: > > Hi rain1, > > Quoth ra...@openmailbox.org: >> GNU Bash is 138227 lines of code. I wrote a simpler shell* in 800 lines: >> https://notabug.org/rain1/s/ >> >> *It is not a true POSIX shell. You can't run existing scripts with

Re: [dev] s - suckless shell

2016-08-13 Thread Ben Woolley
> On Aug 13, 2016, at 4:31 AM, Connor Lane Smith wrote: > > IO redirection being done by separate programs, though, seems like a > wrong decision. Streaming the data through a separate process is > considerably less efficient than just setting a file descriptor to an > open file, and not always

Re: [dev] s - suckless shell

2016-08-13 Thread rain1
On 2016-08-13 12:31, Connor Lane Smith wrote: Is there no support for 'splatting' a string into several strings? rc has a coherent approach to this, in that each variable is not a string but a list of strings. 'Splat' should be supported, but only when done explicitly. Yeah I believe rc is the

Re: [dev] s - suckless shell

2016-08-13 Thread Connor Lane Smith
On 13 August 2016 at 12:31, Connor Lane Smith wrote: > IO redirection being done by separate programs, though, seems like a > wrong decision. Streaming the data through a separate process is > considerably less efficient than just setting a file descriptor to an > open file, and not always equival

Re: [dev] s - suckless shell

2016-08-13 Thread Connor Lane Smith
Hi, I'm not quite sure about this specific design, but I do think there is still work to be done in shell design. We've not quite got there yet, I think. On 12 August 2016 at 22:41, wrote: > Tokenization [tokenizer.c]: Instead of the strange and complex way that > normal shells work (where "$X"

Re: [dev] s - suckless shell

2016-08-13 Thread rain1
On 2016-08-13 07:31, Ben Woolley wrote: On Aug 12, 2016, at 2:41 PM, ra...@openmailbox.org wrote: Hello! GNU Bash is 138227 lines of code. I wrote a simpler shell* in 800 lines: https://notabug.org/rain1/s/ *It is not a true POSIX shell. You can't run existing scripts with it. It's technica

Re: [dev] s - suckless shell

2016-08-12 Thread Ben Woolley
> On Aug 12, 2016, at 2:41 PM, ra...@openmailbox.org wrote: > > Hello! > > GNU Bash is 138227 lines of code. I wrote a simpler shell* in 800 lines: > https://notabug.org/rain1/s/ > > *It is not a true POSIX shell. You can't run existing scripts with it. It's > technically just a command inte

Re: [dev] s - suckless shell

2016-08-12 Thread Ali H. Fardan
On 2016-08-13 03:28, hiro wrote: there already is a suckless shell, called rc. stupid you. A new shell will have it's own use cases and might be a perfect fit for certain projects, some cases might not require shell scripting so the interpreter part is unneeded. Raiz

Re: [dev] s - suckless shell

2016-08-12 Thread hiro
waiting for the day someone of you rewrites all the other stuff in 9base, too.

Re: [dev] s - suckless shell

2016-08-12 Thread Mattias Andrée
On Sat, 13 Aug 2016 01:45:48 +0100 wrote: > On 2016-08-13 01:28, hiro wrote: > > there already is a suckless shell, called rc. stupid > > you. > > [rc-1.7.4]$ wc * > 210651 5748 acinclude.m4 ? >1150 5297 41954 aclocal.m4 ? > 25 64397 addon.c > 3113481

Re: [dev] s - suckless shell

2016-08-12 Thread hiro
shut up if you know nothing. cpu% wc -l *.[hc] 483 code.c 993 exec.c 76 exec.h 67 fns.h 233 getflags.c 7 getflags.h 261 glob.c 241 havefork.c 217 haventfork.c 152 here.c 266 io.c 27 io.h 388 lex.c 147 pcmd.c 71 pfnc.c 638 plan9.

Re: [dev] s - suckless shell

2016-08-12 Thread rain1
On 2016-08-13 01:28, hiro wrote: there already is a suckless shell, called rc. stupid you. [rc-1.7.4]$ wc * 210651 5748 acinclude.m4 1150 5297 41954 aclocal.m4 25 64397 addon.c 31134816 addon.h 40352 2206 AUTHORS 558 1887 12048 builtins.c

Re: [dev] s - suckless shell

2016-08-12 Thread hiro
there already is a suckless shell, called rc. stupid you.

Re: [dev] s - suckless shell

2016-08-12 Thread Mattias Andrée
On Fri, 12 Aug 2016 23:51:46 +0100 wrote: > On 2016-08-12 22:52, Mattias Andrée wrote: > > Also, the names of shells conventionally end with > > sh, just do go with ssh (which incidentally is not > > a shell but ends with “sh” because the full name ends > > with “shell”.) > > > > On Fri, 12 Aug

Re: [dev] s - suckless shell

2016-08-12 Thread rain1
On 2016-08-12 22:52, Mattias Andrée wrote: Also, the names of shells conventionally end with sh, just do go with ssh (which incidentally is not a shell but ends with “sh” because the full name ends with “shell”.) On Fri, 12 Aug 2016 23:48:29 +0200 Mattias Andrée wrote: Sorry for replying befo

Re: [dev] s - suckless shell

2016-08-12 Thread Mattias Andrée
Also, the names of shells conventionally end with sh, just do go with ssh (which incidentally is not a shell but ends with “sh” because the full name ends with “shell”.) On Fri, 12 Aug 2016 23:48:29 +0200 Mattias Andrée wrote: > Sorry for replying before reading, but I don't think a > single-cha

Re: [dev] s - suckless shell

2016-08-12 Thread Mattias Andrée
Sorry for replying before reading, but I don't think a single-character name is a good idea. Two-characters should also be avoided, but it's acceptable. The number of available names are severely limited and introduces an unnecessarily high risk of collision. Short names, and single-character name

[dev] s - suckless shell

2016-08-12 Thread rain1
Hello! GNU Bash is 138227 lines of code. I wrote a simpler shell* in 800 lines: https://notabug.org/rain1/s/ *It is not a true POSIX shell. You can't run existing scripts with it. It's technically just a command interpreter. With that out the way here's an overview of how it works: Tokeniz