• AllHailTheSheep@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    32
    ·
    15 小时前

    my grandmother was a programmer at bell in the early 60s and 70s. really curious if she had hands on any of this. wish she was still around to ask lol.

    you only realize how cool your grandparents were after they’re gone.

  • xthexder@l.sw0.com
    link
    fedilink
    English
    arrow-up
    100
    ·
    edit-2
    19 小时前

    I downloaded the tarball and had a look through it. Almost everything has source code included, which is pretty cool to see.

    There’s an entire C compiler from 1972, bootstrapped to be written in C. There was also a SNOBOL III compiler written in C, and a Fortran interpreter in C (only 462 lines!), and every unix command like ls,cd,echo,cat,grep,etc…

    Unsurprisingly grep was written in assembly, but it’s source is there.

    There’s also a games folder, but unfortunately these look like they’re just binaries:
    bj, chess, cubic, moo, ttt, wump
    I’ll have to load up a pdp11 emulator later to see what they are.

    • Itdidnttrickledown@lemmy.world
      link
      fedilink
      English
      arrow-up
      10
      arrow-down
      1
      ·
      15 小时前

      Its been though several hands and the latest ones love floating bug the fuck out of you ads. I used to have a button on for decades to disable ads due to me being a regular contributor. The latest owners took that away.

    • bigfondue@lemmy.world
      link
      fedilink
      English
      arrow-up
      11
      ·
      edit-2
      10 小时前

      If you had a question about C, you would just consult K&R, and I don’t mean the book

      • ylph@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        45 分钟前

        I worked at Bell Labs in the 90s, on wireless stuff, but we were still using the “in house” cfront compiler at the time, and would e-mail the compiler group, which included Bjarne Stroustrup, with issues sometimes. I learned C++ from his book before I joined Bell Labs, so that was a bit of a holy shit moment for sure for me then.

        Kernighan, Ritchie and Thompson all still worked at Bell Labs as well at the time, but the company was huge then, and they were all in a different location from my team, so I never had any opportunities to meet them.

    • xthexder@l.sw0.com
      link
      fedilink
      English
      arrow-up
      26
      ·
      19 小时前

      Hello World in 1974: echo.c

      main(argc, argv)
      int argc;
      char *argv[];
      {
      	int i;
      
      	argc--;
      	for(i=1; i<=argc; i++)
      		printf("%s%c", argv[i], i==argc? '\n': ' ');
      }
      
        • xthexder@l.sw0.com
          link
          fedilink
          English
          arrow-up
          9
          ·
          19 小时前

          I think it’s actually quite elegant. No matter what it has to skip over argument 0 which will be the executable name echo.
          If the subtraction was removed and the loop changed to <, it would then need to do an addition or subtraction inside the loop to check if it’s the last argument.

          • palordrolap@fedia.io
            link
            fedilink
            arrow-up
            5
            ·
            19 小时前

            The real question might be whether the compiler was smart enough to change var++ and var-- into ++var and --var when the initial values aren’t needed.

            As compiler optimisations go, it’s a fairly obvious one, but it was 1974 and putting checks like that in the compiler would increase its size and slow it down when both space and time were at a premium.

    • bigfondue@lemmy.world
      link
      fedilink
      English
      arrow-up
      33
      ·
      edit-2
      22 小时前

      It’s actually really easy when you get to make everything up as you go along. Like the transistor, and C, and Unix. That place was something else. The modern world was born in NJ

        • bigfondue@lemmy.world
          link
          fedilink
          English
          arrow-up
          4
          ·
          edit-2
          17 小时前

          Yea I thought about having ‘for better for worse’ in the post, but I lived in NJ so I’ll let them have a little glory for once

  • solrize@lemmy.ml
    link
    fedilink
    English
    arrow-up
    29
    arrow-down
    1
    ·
    edit-2
    23 小时前

    This is Unix v4 I think. The programs mentioned were also on later versions and I thought not hard to find. V6 sources are all online somewhere. I also expect some of those v4 programs would have been in assembler rather than C.