62 pointsby scrlk6 days ago14 comments
  • louthy5 days ago
    Page 29 is the first code. You need to work through 'War and Peace' of text before you get there. This is not good for a "young person". They need to get there quicker IMHO.

    I always say that the reason I got into programming (at the age of 10) was because of the BBC Micro User Guide [1].

    * Page 5: first code written (and importantly, code that has a visual component)

    * Page 6: Drawing lines

    * Page 7: Playing sounds

    etc.

    I realised very quickly that I was able to make a game. And that was it, I was hooked for life.

    The Raspberry Pi took its inspiration from the BBC Micro (Model B). It's a shame that there wasn't more of a push to make it as easy as the original Model B to get going and start programming.

    (Of course I realise that it's running Linux where nothing is simple, but yeah, I'm not sure it necessarily helps kickstart the next generation in the way the original BBC Micro did)

    [1] https://archive.org/details/BBCUG/mode/2up?view=theater

    • tgv5 days ago
      I think the title is just a play on "A young person's guide to the orchestra" (by Britten). Nobody in their right mind would want to learn programming in BCPL, the predecessor of the predecessor of C.
      • louthy5 days ago
        > Nobody in their right mind would want to learn programming in BCPL

        I agree, but that's not what the author thinks:

        "When a new programming language is designed it is invariably strongly influenced by languages that preceded it. One thread of related languages is: Algol -> CPL -> BCPL -> B -> C -> C++ -> Java, indicating that BCPL is just a small link in the chain from the development of Algol in the late 1950s to Java in the 1980s. BCPL is particularly easy to learn and is thus a good choice as a first programming language."

        Emphasis mine.

        Also,

        "This document is intended to help people with no computing experience to learn to write, compile and run BCPL programs on the Raspberry Pi in as little as one or two days, even if they are as young as 10 years old."

        So, unless I'm missing something, this document is intended to teach programming first concepts with BCPL. And it seems like it's aimed at young people, regardless of the play on words (which I didn't know, thanks!).

        • lordmauve5 days ago
          > > Nobody in their right mind would want to learn programming in BCPL

          > I agree, but that's not what the author thinks:

          The author of this document is Martin Richards, the creator of BCPL. Of course he thinks you would want to learn it.

          • 0823498723498725 days ago
            We've all been a young person[0], so it's easy to criticise from that angle.

            However, I'd like to think the readership of HN are hacker enough to like to think that, given a desert island (with minor deps like sand and the Friday hardware fab!) and a few spare years, they'd be capable of Robinson Crusoe'ing up a personal development environment.

            From that point of view, I find[1] this effort admirable: it's several hundred pages, by Martin Richards, about the port of the BCPL toolchain (language, compiler, bytecode interpreter, libraries, debugger, etc. all by Martin Richards?) to a new system (was it a new arch as well?)... by Martin Richards.

            How many among us get a machine with new graphics, decide to write a flight simulator, and then —only as a minor[2] implementation detail mind you— plumb float support through our entire language ecosystem? Who needs a shaved yak when you're pursuing the buttery-smooth shaded yak?

            [0] or maybe we even still are: https://news.ycombinator.com/item?id=42682353

            "when I was your age all we had were 1's and 0's, and sometimes not even 0's, so we'd stay up all night xor'ing 1's to have enough for the next day..."

            [1] when I did this sort of thing to pay the bills, I had someone else doing the tech writing and someone else providing toolchain and debugger sources, and it was still not a trivial lift.

            [2] compare Wirth FPGA'ing up an entire homebrewed arch just so he could have a personal workstation using his favourite mouse.

        • tgv5 days ago
          You're right. I'm somewhat stumped.
    • anonzzzies4 days ago
      Before I even had a computer (begin 80s), my grandparents used to always bring me to a warehouse where they sold inventory from burnt down shops. Usually I would by soccer fan shirts (Ajax in my case at the time) and stuff, but this time, it was a specialist bookshop and I picked up a few computer books and magazines. This was so early in the computer era that I had never seen a computer magazine or book; I knew what computers were from the 2600 which my cousin had to play games on, but outside that I knew not very much. I read these things from cover to cover many (100 times possibly) times and always remember that when we did get our first computer, I opened my favorite one; it had the ISBN/author/publisher page and then page 1 was:

      Turn the computer on and type

      10 PRINT "My first homecomputer program"<enter>

      RUN<enter>

      And the book continued like that. I really cannot remember at all what the book was called or for which homecomputer it was; I do remember that after a bunch of pages, the programs stopped working on my system with a syntax error. I think it maybe was a ZX Spectrum or so book, but it hardly can be as I think it was too early for that. It was the fastest way to get into it and got me deep into programming because it went so easy that I kept finding more and more.

    • Tor35 days ago
      Chapter 4.1 (installation of BCPL, before you can start coding) is indeed somewhat(!) more complicated than how it was for the BBC microcomputer (or any other back in the day) - just power it on, enter

        10 PRINT "HOW ARE YOU"
        RUN
  • guenthert5 days ago
    Nice introduction text with detailed description to set-up a R.Pi and interesting examples (AES, calculating Euler's number, Rubik's cube etc.). Shame it uses an utterly obsolete language of which most interesting feature (byte code interpreter making porting the compiler to new architectures comparatively easy) was important in the seventies with its plethora of architectures (many short-lives), but hardly today.
  • Rochus5 days ago
    Wow, this is an amazing book, nearly 800 pages; counless examples of BCPL applications, by the author of the BCPL language.
  • b800h5 days ago
    I'm going to test out the assertion that children as young as 10 can use the guide, by asking my 11-year-old to use it. I don't believe it; it assumes way too much knowledge of computer terminology. We'll see.

    BCPL also looks dry as hell, I'm not convinced it's a great first language.

  • dfawcus5 days ago
    It one is going to play with obsolete languages, then wouldn't Algol 68 be a better pick? At least it has types beyond "cell".

    Or is the idea that BCPL is quite close to the bare metal?

    Algol 68 Genie: https://jmvdveer.home.xs4all.nl/en.algol-68-genie.html

    See this, code starts on pg 11: https://jmvdveer.home.xs4all.nl/learning-algol-68-genie.pdf (after 18 pages of preface)

    See this for how BCPL begat B which begat C: https://www.bell-labs.com/usr/dmr/www/chist.html

    • 0823498723498725 days ago
      > At least it has types beyond "cell".

      I prefer MCPL ( https://www.cl.cam.ac.uk/~mr10/mcplman.pdf ) but I believe BCPL did recently pick up a floating point type, after Richards got a Pi and before he wrote a flight sim.

      [does the C in CPL stand for Cambridge, Combined, or Christopher? Yes.]

  • kstrauser5 days ago
    My total knowledge of BCPL: it’s what AmigaDOS was written in before they ported it to C.
    • amiga3865 days ago
      https://en.wikipedia.org/wiki/TRIPOS was written in BCPL (in 1978) at the University of Cambridge.

      TRIPOS was ported to the 68000 in 1981 by Dr Tim King. In 1984, he joined the company MetaComCo, and they bought the commercial rights to his 68000 port.

      The Amiga OS was well behind schedule in 1984. MetaComCo were contracted in March 1985 to integrate TRIPOS into the Amiga's existing OS code (mainly Exec and Intuition), and the Amiga launched in July 1985. That's a pretty fast turnaround time!

      TRIPOS is most evident in the AmigaDOS portions of AmigaOS, specifically dos.library, the CLI, the directory structure (C, L, S are TRIPOS standard directories for commands, libraries, scripts, hence the odd mix of LIBS for Amiga libraries but L for AmigaDOS handlers and filesystems), the standard disk filesystem, and all filesystem handlers.

      For AmigaOS 2.0 (released 1990-1991), it wasn't quite "[TRIPOS] ported to C"... AmigaDOS was rewritten entirely. There was no BCPL or TRIPOS left, except deliberate structures/functions (written in C!) to support backward-compatibility with BCPL software.

      AmigaDOS's API was greatly extended to provide official OS calls for what were previously BCPL globvec internals, and most of the command-line programs were rewritten in C. This work had already been advocated for and done in 1987-1989 by the third-party "AmigaDOS Replacement Project" https://aminet.net/package/misc/antiq/ARP_13

      • MarkusWandel4 days ago
        The BCPL runtime environment was completely alien compared to C's and a fair bit of glue was needed to get the DOS portion to talk to the rest of the system.

        I reverse-engineered the "echo" command - the simplest of them all - to see what was actually involved.

        https://wandel.ca/homepage/execdis/echo_disassembly.txt

        • amiga3863 days ago
          Fascinating compiler glue from a bygone era. You'll be pleased to know the 2.0 version of echo makes standard dos.library calls like ReadArgs() Output() FWrite() FPutC(..., '\n') on a typical run. They exposed all the internals as documented API calls.
        • kstrauser4 days ago
          What the devil?!
      • icedchai4 days ago
        Heh. I love reading stuff like this. I still remember the time I booted up a soft-kicked version of AmigaOS 2.0 on my A500. It was like night and day compared to 1.3.
  • kazinator4 days ago
    > To install the BCPL System on the Raspberry Pi you must first ob- tain a copy of the file bcpl.tgz [...]

    Version numbers, what are those ...

    When you have some problem with bcpl.gz, just send an e-mail. Be sure to mention the approximate date when you obtained bcpl.gz. Like was it closer to Halloween last year, or more toward Thanksgiving or Christmas? Be sure to download bcpl.tgz daily, until the problem goes away.

  • morninglight4 days ago
    "The Young Persons Guide to BCPL Programming on the Raspberry Pi - Part 1" should win a prize.

    These days, high quality, dry British humor is hard to find, however this 787 page tome on BCPL programming for "young persons" is perfection.

    I am breathlessly awaiting part 2.

  • Mumps5 days ago
    BCPL ("Basic Combined Programming Language") [0]

    Insanely frustrating that BCPL doesn't seem to be defined anywhere in the document itself.

    [0] https://en.wikipedia.org/wiki/BCPL

    • dboreham5 days ago
      It's defined in the BCPL book.
  • the__alchemist4 days ago
    I'm confident Raspberry Pi writers have never used a credit card.
  • stargrazer6 days ago
    University of Cambridge Revision date: Tue Oct 23 16:58:19 BST 2018
  • throwaway2905 days ago
    What makes it specifically for young people? I looked at the paper but didn't spot anything obvious
    • rsynnott5 days ago
      In the context of BCPL, "young person" simply means "under 90".
  • GeoffKnauth5 days ago
    BCPL--hadn't had my first coffee before I read this, I thought it was going to be SBCL.
  • 4 days ago
    undefined