• DonHopkins 5 months ago

    My first paid programming job was writing a Logo Adventure program for C64 Terrapin Logo. They wanted a simple non-graphical game that showed off Logo's list processing capabilities, and I just used Logo's top level interpreter as the parser! That saved a lot of coding, but it did let you cheat (aka "learn to understand and program and debug Logo").

    Here is the source code to LLogo in MACLISP, which I stashed from the MIT-AI ITS system. It's a fascinating historical document, 12,480 lines of beautiful practical lisp code, defining where the rubber meets the road, with drivers for hardware like pots, plotters, robotic turtles, TV turtles, graphical displays, XGP laser printers, music devices, and lots of other interesting code and comments.


    More about "The Apple II Source Code for the LOGO Language Found":


    Also: I just recently got back in touch with Jock McClees, president of Terrapin!

    He told me: "My brother and some MIT guys like Danny Hillis started the company selling a kit to build the robot turtle. I got involved and licensed Logo from MIT since the turtle was fun but never amounted to much and we didn't have the funding to do it justice. My brother and the original MIT guys had moved on to other things when I got involved and the company was limping along and not long for life. Believe it or not, from what I was told, at the time MIT and many colleges didn't realize the value of licensing and C64 Logo and the Apple version for a short while were bringing in more royalties to MIT than anything else they had licensed at the time. The amount they got from us wasn't that large."

    Pat Sovalvarro and Leigh Klotz worked together on the C64 version of Terrapin Logo. Leigh wrote a 6502 assembler in Logo that you could use to extend Logo and integrate it with hardware.

    It turns out that Ken Kahn (of ToonTalk and Visual Janus fame) was one of the early investors in Terrapin, and actually got most of his money back! (Pretty good for educational software, ehe?)




    Check out the brilliant stuff Ken's been doing with Snap!:




  • DonHopkins 5 months ago

    Author here!

    Alexey-Slyusar has ported my old Logo Adventure to LLOGO on ITS running on a PDP-10 emulator!



    Now that it’s running on a vastly more powerful computer than the C64 (like a PDP-10), it’s finally possible to add additional rooms and items, more magic, and maybe even a maze! ;)

    Maybe even a Wumpus-like turtle that wanders from room to room and attacks you with its pen, which is mightier than your sword! ;)

    Another thing that REALLY inspires me, which goes a hell of a lot further than NeWS ever did, and is one of the best uses of JavaScript I've ever seen, is the Snap! visual programming language!


    Snap! is a visual "blocks" programming language like Scratch, but with the full power of Scheme: First class functions.

    Visual lexical closures.

    User defined blocks including control structures.

    Macros and special forms.

    Call with current continuation!

    Written in JavaScript and easy to integrate with JavaScript libraries.

    It's the culmination of years of work by Brian Harvey and Jens Mönig and other Smalltalk and education experts. It benefits from their experience and expert understanding about constructionist education, Smalltalk, Scratch, E-Toys, Lisp, Logo, Star Logo, and many other excellent systems.

    Snap! takes the best ideas, then freshly and coherently synthesizes them into a visual programming language that kids can use, but is also satisfying to professional programmers, with all the power of Scheme (lexical closures, special forms, macros, continuations, user defined functions and control structures), but deeply integrating and leveraging the web browser and the internet (JavaScript primitives, everything is a first class object, dynamically loaded extensions, etc).

    Here's an excellent mind-blowing example by Ken Kahn of what's possible: teaching kids AI programming by integrating Snap! with existing JavaScript libraries and cloud services like AI, machine learning, speech synthesis and recognition, Arduino programming, etc:

    AI extensions of Snap! for the eCraft2Learn project


    >The eCraft2Learn project is developing a set of extensions to the Snap! programming language to enable children (and non-expert programmers) to build AI programs. You can use all the AI blocks after importing this file into Snap! or Snap4Arduino. Or you can see examples of using these blocks inside this Snap! project.



  • olooney 5 months ago

    Google's "secret" adventure game uses the same trick of hijacking the REPL. The game is meant to be played in the debug console, and you can by defining verbs as top level variable names on the global "window" objects the developer made it so that the user can simply type their commands into the debug console.


    As a side-effect, every possible command, even solutions to puzzles, show up in the global namespace (the "window" object.) Therefore, to prevent cheating (including inadvertent cheating through autocomplete) the developer added a large number of "wrong" answers to the puzzles to the global namespace as well.

  • empressplay 5 months ago

    This is awesome! It's a great example of some of the non-graphical things you can do with Logo.

    I ported it to Apple Logo https://paleotronic.com/2018/11/10/logo-adventure-for-apple-...

    Thanks Don!

  • DonHopkins 5 months ago

    Thank you so much for porting it, and also for sharing your port and the code!

    I actually had an Apple ][ myself, but I never got around to porting it back to Apple Logo.

    Alexey-Slyusar has ported my old Logo Adventure to LLOGO on ITS running on a PDP-10 emulator!



    For what's worth, running Logo Adventure in Apple Logo on an Apple ][ emulator is much more efficient and uses a whole lot less memory (8 bits instead of 36 bits) than running Logo Adventure in MacLisp LLOGO on ITS in a PDP-10 emulator!

    But both are awesome in their own way! Thanks to all that extra memory, your friends can log into ITS on the PDP-10 emulator as RMS (password RMS), and run :OS (Output Spy) to watch you play Logo Adventure, and EMACS the source code. :OS'ing on other players was how I learned to play Zork on MIT-DM. ITS was the original social network.

  • 5 months ago
  • vectorEQ 5 months ago

    love this. started programming after this era, but find it fascinating to read these programming adventures on the older hardwares :)

  • andrewstuart 5 months ago

    Maybe looks a bit like COBOL?

  • DonHopkins 5 months ago

    Maybe all the _UNDERLINES_ make it look "business oriented".

    But actually it's because I linked all the Logo commands to the Logo reference manual!

    TO => http://fmslogo.sourceforge.net/manual/command-to.html

    If you really enjoy programming in COBOL, I think Alcor offers a head-only discount to COBOL programmers, because Y2K may be over, but January 19, 2038 03:14:07 GMT is coming soon:



  • 5 months ago
  • DonHopkins 5 months ago


    Alexey-Slyusar commented on 9 Oct

    I know that the Adventure game code is not fully functional. But it has interesting functional programming elements.

    Logo world has purely functional code examples such Albert Cuoco's Investigations in Algebra (I read the book in short parts that available from Google Books, but I believe that it is true for all book's code. I've tried to get the whole book in hard copy but unsuccessful - international book delivery in Amazon is just terrible). And some examples in Brian Harvey's wonderful CSLS trilogy. (Which I am continuing to learn).

    And am I right that the LISP LOGO implementation written in not fully functional way?

    SimHacker commented 29 days ago

    There are several meaning of "functional", and the Adventure game might be a good way to help explain that.

    One sense is simply that something works, and is not broken.

    Another sense is that something manipulates functions, which it does.

    A deeper sense is that it manipulates functions and data in a particularly constrained way, without side effects, using read-only data, which it doesn't.

    It uses a mutable model of the world. The rooms and connections between them don't change, but you could add mud-like authoring and editing commands like "dig Room", "link Room Direction" to edit the room model.

    You edit the item model when you drop or pick up an item, by mutating its room number.

    Another aspect of the model is the player's room number, which you change by moving from room to room.

    And yet another aspect of the model is the value of the pronoun "it", which gets set to the last item you said by name, because that name is actually bound to a function that sets "it" to the item name and returns the same item name. Nouns remember themselves in the global pronoun "it".

    Side effects like changing global variables is not good functional oriented programming style, but it gets the job done. And the way it does it is by dynamically manipulating and defining and naming functions for each item. But it's actually just a trick that lets us use the Logo top level interpreter conveniently without writing our own parser!

    Logo lets you program in a mix of procedural and functional styles, and has its own parser that we can build on top of to define "Dungeon Domain Specific Languages".

    Off the top of my head I can't think of a way to implement a purely functional adventure game! But it might be like heaven, which is a place where nothing ever happens.

  • DonHopkins 5 months ago

    I am grateful to the MIT AI Lab, whose Tourist Policy enabled me and other lucky people to use MIT's computers for free, and to be inspired by Zork, Logo, Lisp, and all the great people at the MIT-AI Lab and the community they attracted.


    With commands like :WHOIS, :WHOJ, :LUSER, :SEND, :OS, :PEEK and :UNTALK, ITS was the original social network.

    In the HN "The Enduring Legacy of Zork" discussion, another tourist ZEMON told me he used the same NBS TIP as I did, to dial into the ARPANET without a password, connect to MIT-DM, :OS spy on other people playing Zork until it was your turn, then finally play Zork while the other people waiting watched.

    MIT-DM was like a 300 BAUD ASCII version of Twitch!

    Then he got seduced by networking and Lisp -- and he still uses Emacs too!


    >MIT's friendly, unparanoid attitude towards people using their systems and basically just digging their technology was very formative in my career. Zork was the hook. I came to play adventure games, I stayed to learn Emacs and a bit about networking and LISP. I don't use PDP-10s anymore, but I work in the games industry, use Emacs every hour of my working day, and wish I could write more production LISP (though if you squint at Javascript just right...)

    At the lab, the Knight TV displays let you watch anyone else's screen, and there was global "free display" screen saver showing all logged in users, what they were doing, where they were, free Lisp Machines, and other useful information, like the time and birthday announcements. They could also buzz open the door from the elevator lobby, and summon the elevator to your floor!

    http://dspace.mit.edu/bitstream/handle/1721.1/41180/AI_WP_23... (page 22)


    ROBG was interviewed in the "Get Lamp" documentary on Zork, and eloquently described the experience.


    >Rob is a perfect example of the benefits of not going just for "names" in a documentary about a wide-ranging subject - nothing on his resume says he was a big text adventure game player or person who was at the beginning of Zork. But there he was, a kid who had gotten into the MIT lab and seen early Zork being played and the effect it was having on the students and computer lab users. He was articulate and provided a wonderful dash of emotion into the descriptions which I used liberally in GET LAMP. He had a number of printouts which I also filmed (but didn't use). Many documentaries wouldn't count "just a player" as worth interviewing - Rob is proof that approach is short-sighted indeed.