Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Going back in time...

by samizdat (Vicar)
on Jul 12, 2007 at 17:48 UTC ( [id://626291]=note: print w/replies, xml ) Need Help??


in reply to Going back in time...

My seminal experience with programming was in high school, where we were introduced to programming by Mr. Gray in a little metal portable squeezed in between two "real" buildings on the Rincon campus in Tucson. He introduced us to a little language called STOP that was implemented on an IBM 360 the school district had. STOP was basically a trivial assembly language for a mythical machine. It had pushes and pops and various forms of register-indirect addressing instructions available. We programmed it using punch card decks made up on Big Gray Monsters.

The key was that Mr. Gray talked to us about meta-programming: how STOP was implemented on the 360, and how our programs could themselves implement languages as well as programs. To say that he fired my imagination is an understatement. I'm still fired up about the concepts he taught us to think about.

Don Wilde
"There's more than one level to any answer."

Replies are listed 'Best First'.
Re^2: Going back in time...
by esk555 (Beadle) on Jul 12, 2007 at 20:53 UTC
    Indeed. One of my dearest ambitions is to create my own little language, preferably in Perl.
      If you think about it, almost every data parsing and control interface program has at its heart a parser for a little language, although usually one that's not very general purpose. Where things get fun is when you add an 'eval' command and the ability to extend the language by defining new functions. I learned about those in one of my only college CS classes, a 200-level language survey class where one of the languages we studied was LISP. Putting X to the power of Y, I was off and running. When I started working commercially, my assembly language microcontroller programs ended up with read-eval-print loops and in some cases even a crude function-definition capability (more like shell scripting than true language extension) with an eval+apply function that checked for user-defined command scripts before going into its primitive list. I use this model when I can, in almost every complete system I write. Once you understand the concept, doing it consciously becomes second nature.

      Perl makes it easy, since extensibility and meta-progreamming are built-in resources, but the concepts are valid on any platform and are highly recommended for study and rumination. I've used it effectively in 8051 assembler, C, and even Smalltalk.

      with thanks to Thant Tessman, this quote:

      Greenspun's Tenth Rule of Programming:
      "Any sufficiently complicated C or Fortran program contains
      an ad-hoc, informally-specified bug-ridden slow implementation
      of half of Common Lisp."

      Don Wilde
      "There's more than one level to any answer."
        When I started working commercially, my assembly language microcontroller programs ended up with read-eval-print loops and in some cases even a crude function-definition capability (more like shell scripting than true language extension) with an eval+apply function that checked for user-defined command scripts before going into its primitive list.

        Why do I think FORTH immediately? Ah - we talked about that already :-)

        (Some say that Forth is to assembly what Perl is to C)

        --shmem

        _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                      /\_¯/(q    /
        ----------------------------  \__(m.====·.(_("always off the crowd"))."·
        ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://626291]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (6)
As of 2024-03-28 23:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found