Files
ioccc/1989/robison
Cody Boone Ferguson cb8d8924a7 Improve links to bugs.html in README.md files
In other words rather than have the link name in the form of:

    1984 decot bugs

it is now:

    1984/decot in bugs.html

so that it matches how the entry itself looks (as in how it's
identified) and to say where (what file) it is (in). The reason it says
'in bugs.html' rather than 'bugs' (saying that the entry has bugs) is
because not all are bugs and it's saying where to see it anyway. But
some are features, others are missing links or files or other things
like that and to keep the same form it now says 'in bugs.html'.

This was done with my sgit(1) tool like:

    sgit -e 's,\([0-9][0-9][0-9][0-9]\) \([-a-z\.0-9]*\) bugs,\1/\2 in bugs.html,g' '*/*md'

The link to bugs.html itself has the path '../../bugs.html'. This is
important as it's meant to be rendered in the browser. At first this was
not remembered and I did something like:

    sgit -e 's,\[\([0-9][0-9][0-9][0-9]\) \([-a-z\.0-9]*\) bugs\](../../bugs.html,\[\1/\2 in bugs.html\](%%REPO_URL%%/bugs.html,g' '*/*md'

but this was changed to the simpler one due to the problem described
above. It's worth putting this note here as a reminder, though, so I
have included it here.
2024-05-04 09:21:09 -07:00
..
2024-05-01 09:53:30 -07:00
2023-03-06 09:04:46 -08:00
2023-07-06 21:49:38 -07:00

To build:

    make all

Bugs and (Mis)features:

The current status of this entry is:

    STATUS: INABIAF - please **DO NOT** fix

For more detailed information see 1989/robison in bugs.html.

To use:

    ./robison
    # enter valid expressions

Try:

    ./robison
    11x10
    # enter other expressions

    ./try.sh

    echo 100 / 100 | ./robison # <-- what happens here ?

NOTE: This program will very likely crash or break into tiny bits :-) if you feed it numbers with non-binary digits. This, as you might notice if you try one of the above commands, can happen with other input as well. If you wish to understand why this happens check the source code.

Judges' remarks:

Sites with punch card facilities will be happy to note that the source deck can be re-collated with an ASCII sort.

Note that this program uses only a small subset of the constructs that the C language supports.

For an interesting document on APL, see https://computerhistory.org/blog/the-apl-programming-language-source-code/.

Author's remarks:

This program is a handy picoAPL interpreter written in C--. It outputs the evaluation of an APL expression from standard input. Functions are limited to dyadic +,-,x, and unary -; numerals must be binary. Parentheses may be used for grouping. For example:

    101x111-100

prints:

    1111

That is 5x(7-4) is 15. (APL groups from right to left.) Extending it to the full APL language should be trivial.

The C-- language improves the C language by removing superfluous and confusing features: arithmetic, logical operations, shifts, relational operators, address-of, and flow control. In fact, the only expressions retained are function calls, indirection, array assignments, the ',' operator, and sizeof. Despite these restrictions, the C-- program does arithmetic on arbitrarily large binary numbers.

To obtain a C-- reference, simply rip out the irrelevant pages from your K&R C manual. To obtain a C-- compiler, simply rip out the irrelevant bytes from your cc compiler.