Loading ...
Sorry, an error occurred while loading the content.
 

Re: [cosmacelf] ELFs for learning

Expand Messages
  • Lee Hart
    ... I ve also been looking at the PICAXE chips. More hardware features, and very appealing prices! Though their BASIC looks as bad, and maybe even worse than
    Message 1 of 13 , Nov 8, 2011
      Chuck Bigham wrote:
      >> Take a look at the Picaxe chips by Revolution Education. They are a
      >> system-on-a-chip based on PIC microcontrollers, and one of the
      >> neatest things I've played with in a long time. And they are
      >> inexpensive --

      On 11/8/2011 1:43 PM, Mark Graybill wrote:
      > Thanks, I'll have a look at that stuff!

      I've also been looking at the PICAXE chips. More hardware features, and
      very appealing prices! Though their BASIC looks as bad, and maybe even
      worse than Parallax Stamp BASIC. Still, I'm planning to get one of them
      to test, just to see how it goes as a replacement for the BASIC Stamp II.

      --
      Lee A. Hart | Ring the bells that still can ring
      814 8th Ave N | Forget the perfect offering
      Sartell MN 56377 | There is a crack in everything
      leeahart earthlink.net | That's how the light gets in -- Leonard Cohen
    • Lee Hart
      ... Yes. FORTH s approach is to give you some basic tools (hammer, saw, drill...). You then use these basic tools to build whatever you want... including more
      Message 2 of 13 , Nov 8, 2011
        Mark Graybill wrote:
        > Forth's main problem is that the core of it is fairly small, so that
        > much of any implementation requires significant extensions to the
        > language that aren't standard.

        Yes. FORTH's approach is to give you some basic tools (hammer, saw,
        drill...). You then use these basic tools to build whatever you want...
        including more tools!

        People don't get far with FORTH until it dawns on them that it's more
        productive to use it to make better tools than it is to immediately
        tackle your "big" problem with only the stock "little" tools. (So you
        make a nail gun, table saw, drill press...)

        Your tools are completely equivalent to the basic tools that came with
        FORTH. They are every bit as real, and can even replace them. You are
        *building* a language expressly suited to your problem, and how you want
        to solve it. But since you made them, they are completely unique to you
        -- your way of doing things.

        > LISP has returned as a popular language in actual use.

        LISP is another "odd duck" language. It's extremely powerful, yet
        deceptively simple. The drawback is that some of the concepts its
        embodies are quite subtle and hard to learn.

        > I don't want to teach "religious wars" as part of programming...

        That's a good way to put it. :-)

        > I think you may be confusing LOGO with PILOT. PILOT is extremely
        > limited, LOGO is a full-power language.

        Absolutely. Modern Logo is way up the curve as a high-level language.
        Yet it has a charming simplicity at its lowest levels.

        > BASIC is a good beginner's language, up to a point. For my middle
        > schoolers it's ideal, but the high schoolers end up trying to solve
        > problems it's not well suited for pretty quickly.

        I agree. BASIC only embodies a few simple programming concepts. It's
        kind of like a basic 4-function calculator; easy to use and great for
        the things most people understand and can use. Young kids have pretty
        primitive logical skills, which suits BASIC perfectly.

        But you can easily outgrow it. More sophisticated programs require more
        complicated structures and concepts, which BASIC isn't designed to
        provide. You wind up working around its limitations. That's when it's
        time to move up to a more powerful language.

        --
        Lee A. Hart | Ring the bells that still can ring
        814 8th Ave N | Forget the perfect offering
        Sartell MN 56377 | There is a crack in everything
        leeahart earthlink.net | That's how the light gets in -- Leonard Cohen
      • awasson2001
        ... That s along the lines of what I was thinking too. The beauty of the 1802 chip is that it requires very little support hardware to get going. To introduce
        Message 3 of 13 , Nov 8, 2011
          --- In cosmacelf@yahoogroups.com, Mark Graybill <saundby@...> wrote:
          >
          > On Nov 8, 2011, at 9:09 AM, Bee Dee wrote:
          >
          >
          > My interest in an Elf-ish system isn't so much teaching general programming as in teaching hardware and low level control concepts. It's interesting for the kids to write programs that make sounds and graphics, but having something happen in the "real world", especially when they can see the electrical signals, has an entirely different impact on a youngster. It's like teaching them to read and draw architectural diagrams vs. teaching them to build an actual treehouse with actual tools.
          >
          > -Mark
          >

          That's along the lines of what I was thinking too. The beauty of the 1802 chip is that it requires very little support hardware to get going. To introduce the concept of a CPU using an 1802, you can show the relationship between the clock, the data and address busses and with a little ram you can write a program and run it with little more that switches and leds. The neat thing about writing a program in machine language is that nothing is abstracted through a software interpreter. It's as close to the hardware as it gets. Even something as simple as flashing the Q led requires thought about coming up with a loop long enough to make it a visible pause. Take it further and write the Cylon program and you're into retrieving data from memory. From there you might jump to another platform or into a higher level language but being exposed to the low level stuff will certainly have an impact.

          Here's the info that got me so jazzed about the idea of kids learning low level computing: http://www.cs.cmu.edu/~fberg/projects/. Particularly the PDF article: http://www.cs.cmu.edu/~fberg/projects/CHUMPPaper.pdf

          Andrew
        • Lee Hart
          Now, for what I d like to see in a Learning Elf: Imagine a computer with a simple machine language. Much like the Elf, you can enter raw machine code with a
          Message 4 of 13 , Nov 8, 2011
            Now, for what I'd like to see in a Learning Elf:

            Imagine a computer with a simple machine language. Much like the Elf,
            you can enter raw machine code with a keypad and tiny display. But
            instead of its instructions coded in hex (F8 10 FF 01 3A 02), the keypad
            and display are labelled with the instruction's functions (Load 10
            Subtract 1 IfNot0 Backup 3).

            Like an Elf, you can load these one at a time, examine or change them,
            single-step them, or let them run at full speed. It's "machine language"
            has a 1:1 representation in an english language like format.

            Like the Elf, the input and output of this CPU are real, physical
            devices; like switches and LED. Better yet, the motors and bump switches
            of a "turtle robot" or other physical device. Even tiny trivial programs
            can make it do interesting things, like move to "dance" on the table or
            draw something with a pen on a piece of paper.

            Next... a student will quickly realize that large programs are way too
            tedious. So, provide a very simple way to extend the language; add new
            commands to the CPU. This would be like FORTH allowing you to define new
            words in terms of existing words, such that the new words function just
            like existing words. (Logo and Lisp can do this, too.)

            The minimal CPU unit has just one register, which is the input, output
            and accumulator. You can *see* what you put in it, what the math
            instructions do to it, etc. But this CPU's hardware can also be
            extended. Add another chip; now you have *two* registers. You will then
            add instructions so you can tell it which register to use (Load A with 10).

            Physically, each one of these CPU chips might be an 8-pin PIC micro. Its
            ROM is preprogrammed with an interpreter for this simulated bit-slice
            CPU. It stores the user's new instructions in EEPROM (on-chip or
            external, depending on how big the instruction set is allowed to get).
            Each CPU chip you add increases the "power" of this CPU.

            Put these little CPU chips on little boards that plug together like Lego
            bricks. This minimizes wiring and soldering. They can simply be bussed
            together, rather than the usual tangle of wires in a hardware design
            project. Software defines the interfaces.

            Design these CPU slices so you can build an equivalent of some *real*
            CPU (1802 or whatever). You might have a class of students each program
            one CPU chip with part of the instruction set. When they are all plugged
            together it *becomes* an 1802 or 6502 or whatever!

            Now, they can run "real" programs on it. I'd look for "tiny" examples
            off all the languages we've discussed, FORTH, BASIC, C, LOGO, etc. This
            will give the students a taste of each of them, and what they are good
            for, and what they are bad at.
            --
            Lee A. Hart | Ring the bells that still can ring
            814 8th Ave N | Forget the perfect offering
            Sartell MN 56377 | There is a crack in everything
            leeahart earthlink.net | That's how the light gets in -- Leonard Cohen
          • wmaalouli
            If you build it, they will come... I ll buy the first kit :) Walid
            Message 5 of 13 , Nov 9, 2011
              If you build it, they will come... I'll buy the first kit :)

              Walid

              --- In cosmacelf@yahoogroups.com, Lee Hart <leeahart@...> wrote:
              >
              > Now, for what I'd like to see in a Learning Elf:
              >
              > Imagine a computer with a simple machine language. Much like the Elf,
              > you can enter raw machine code with a keypad and tiny display. But
              > instead of its instructions coded in hex (F8 10 FF 01 3A 02), the keypad
              > and display are labelled with the instruction's functions (Load 10
              > Subtract 1 IfNot0 Backup 3).
              >
              > Like an Elf, you can load these one at a time, examine or change them,
              > single-step them, or let them run at full speed. It's "machine language"
              > has a 1:1 representation in an english language like format.
              >
              > Like the Elf, the input and output of this CPU are real, physical
              > devices; like switches and LED. Better yet, the motors and bump switches
              > of a "turtle robot" or other physical device. Even tiny trivial programs
              > can make it do interesting things, like move to "dance" on the table or
              > draw something with a pen on a piece of paper.
              >
              > Next... a student will quickly realize that large programs are way too
              > tedious. So, provide a very simple way to extend the language; add new
              > commands to the CPU. This would be like FORTH allowing you to define new
              > words in terms of existing words, such that the new words function just
              > like existing words. (Logo and Lisp can do this, too.)
              >
              > The minimal CPU unit has just one register, which is the input, output
              > and accumulator. You can *see* what you put in it, what the math
              > instructions do to it, etc. But this CPU's hardware can also be
              > extended. Add another chip; now you have *two* registers. You will then
              > add instructions so you can tell it which register to use (Load A with 10).
              >
              > Physically, each one of these CPU chips might be an 8-pin PIC micro. Its
              > ROM is preprogrammed with an interpreter for this simulated bit-slice
              > CPU. It stores the user's new instructions in EEPROM (on-chip or
              > external, depending on how big the instruction set is allowed to get).
              > Each CPU chip you add increases the "power" of this CPU.
              >
              > Put these little CPU chips on little boards that plug together like Lego
              > bricks. This minimizes wiring and soldering. They can simply be bussed
              > together, rather than the usual tangle of wires in a hardware design
              > project. Software defines the interfaces.
              >
              > Design these CPU slices so you can build an equivalent of some *real*
              > CPU (1802 or whatever). You might have a class of students each program
              > one CPU chip with part of the instruction set. When they are all plugged
              > together it *becomes* an 1802 or 6502 or whatever!
              >
              > Now, they can run "real" programs on it. I'd look for "tiny" examples
              > off all the languages we've discussed, FORTH, BASIC, C, LOGO, etc. This
              > will give the students a taste of each of them, and what they are good
              > for, and what they are bad at.
              > --
              > Lee A. Hart | Ring the bells that still can ring
              > 814 8th Ave N | Forget the perfect offering
              > Sartell MN 56377 | There is a crack in everything
              > leeahart earthlink.net | That's how the light gets in -- Leonard Cohen
              >
            Your message has been successfully submitted and would be delivered to recipients shortly.