HackerTrans
TopNewTrendsCommentsPastAskShowJobs

david-given

no profile record

comments

david-given
·10 лет назад·discuss
The BBC Micro also allows you to change the address of the video framebuffer. A particularly neat trick was to remap it to 0x0000, so you get to see the OS workspace, stacks, program storage etc. You can watch the bits twiddle in realtime as you do things.

There's another neat hack which would cause the machine to run in slow motion. I don't know how it worked; I can't find any references now. Possibly it overloads the system with interrupts. But under its influence, clearing the screen would take several seconds. These two hacks combined beautifully, letting you see all the details of, e.g., Basic's heap management.
david-given
·11 лет назад·discuss
I've heard people say that TeX typesetting is so nice that people will do scientific research just so that they can publish papers using it.
david-given
·11 лет назад·discuss
I quite like K&R C --- it has an elegant minimalism to it that was lost in ANSI C:

    add(a, b, c) { return a+b+c; }
But the ad-hoc parameter types only really worked if all your types were the same size, so it doesn't really get on with 64-bit machines. (I have just fixed some ancient code which was doing this:

    msg(s, a1, a2, a3, a4)
        char* s;
    {
        printf("info: ");
        printf(s, a1, a2, a3, a4);
    }

    ...later...
    {
        msg("an int is %d", anInt);
        msg("a string is %s", aString);
    }
Yeah, no.

I don't know classic Algol, but I've dabbled in Algol-68 (a most underrated language), and in that the parameter passing syntax is unrelated. The add function would have looked like:

    proc add = (int a, int b, int c):
        (a + b + c)