[Toybox] Quick status update.

Rob Landley rob at landley.net
Mon Mar 12 12:30:16 PDT 2012


On 03/12/2012 08:40 AM, Georgi Chorbadzhiyski wrote:
> Around 03/12/2012 02:03 PM, Rob Landley scribbled:
>> Redoing find took most of the weekend, but it passes the basic test
>> suite now, has an lseek path, and uses the shared infrastructure for
>> option parsing and lists.  I still need to add -f support.
>>
>> I'm working on id now, which at least gets me through _one_ of Georgi's
>> patches. :)
>>
>> Obviously, I didn't get a release out this weekend.  Trying next weekend
>> at this point.  I'm hoping to have some actual morning/evening time to
>> catch up on the backlog before then.
> 
> Looking at your email about Aboriginal command usage here is my current status:
> 
> TODO (I'm doing the following right now):
>      36518 busybox mv
>       3539 busybox touch
>       1009 busybox mktemp
>        978 busybox uniq
>        953 busybox cut

I note that uniq is likely to reuse some sort infrastructure, I'm
pondering doing the "two commands in one file" trick.

I have a really really really long email half-written about the design
hiccups involved in that.  Basically the stuff that automatically slots
a command into toybox based on the header info in the .c file doesn't
support slotting in more than _one_ command from the same file (aliases
yet, different main() functions with separate help text no), and making
it do so is nontrivial.

But sometimes, doing so would be really convienient...

> Waiting for review:
>     378969 busybox rm
>       6266 busybox chmod
>         48 busybox chown

Hoping to finish id in the morning, and then I can catch up on the 29
messages of yours I have marked todo. :)

> chgrp
> sysctl
> logger
> test
> md5sum
> 
> Already merged in toybox:
>      18973 busybox mkdir
>       3188 busybox hostname
>       2698 busybox ls
>        118 busybox tail
>         32 busybox whoami
>          8 busybox readlink

But not enabled for various reasons, generally because there's some flag
the build needs, which they don't support.  For example, ls needs at
least -d -i -t and -c.

> TODO:
>     519779 busybox sed
>     116894 busybox grep
>       9741 busybox egrep

These I have some work in on already.  (I wrote the busybox sed, so I
know what I want to do there, and grep/egrep are mostly a subset of sed.)

>      55163 busybox expr
>       7519 busybox install
>       3539 busybox touch
>       2033 busybox tr
>       1668 busybox awk
>        444 busybox find
>        328 busybox tar
>        316 busybox date
>         64 busybox od
>         32 busybox dd

Open season on all those.

>       2025 busybox diff

Note that I want to use bram cohen's "patience" algorithm for diff.
Otherwise, I haven't started work on it, although I did "patch" so am
aware of a few strange corner cases...

>        160 busybox bzip2

I wrote 2/3 of bzip2 once upon a time.

>         29 busybox gzip

I wrote an inflate implementation in Java many moons ago (sheesh, 1996).
I understand the basic design of gzip/gunzip and just need to get around
to implementing it.

>          7 busybox sh

That's a big one, containing a dozen sub-commands within it.

The next big step in toysh is teaching it to do non-stub argument
parsing, with environment variables including ${var:start:end} and
$((math)) and <(redirects) and {curly,bracket,expansion} and so on.  (I
don't think it even currently has a local variable table yet.)

Then there's implementing if/while/for blocks, and shell functions, both
of which involve keeping text buffers and re-parsing them (no other way
to do the environment variable stuff sanely, keep in mind "$DEBUG ls -l"
has to work when DEBUG=echo and when DEBUG="", so "eval" is just
exposing an internal shell capability it needs to use a lot anyway).
Figuring out the scope and lifetime of said buffering is nontrivial, and
no you can't just mmap() the file because "cat filename | sh" has to
work.  I'd be tempted to just buffer the whole darn input, but if you do
"while true" at the command line and then hit enter, you get to see the
shell dynamically working out the scope by prompting you for more data
until you've satisfied it, and _that_ means it has to be dynamic because
interactive shell usage can't keep all history forever, that would eat
an unbounded amount of memory...

Fun.

Rob

 1331580616.0


More information about the Toybox mailing list