teaching machines

Madeup Status Report #1

The reason I became a teacher is so that I can do 1000 things in a day. I design homeworks; write grading unit tests; plan and deliver lectures; read up on relevant news and research; review academic papers; read books on things I don’t know enough about; compose haiku; serve on various university committees; oversee independent studies; meet with advisees as they plan their future; write recommendation letters; sift through endless email messages; meet with industry partners who wish to hire our students; conduct outreach for local schools; meet with prospective students; write grants; manage teaching assistants; file paperwork for travel, overrides to degree requirements, and even just showing up to work; field requests from other faculty and the community about technology projects; talk to the bookstore about books for my courses; keep an eye on the state of the lab machines and servers to make sure they have required software and are running properly; generate ideas for research projects; consult with students working on research projects; partner with local K-12 schools to provide a pathway for students to the university; survive budget cuts; interview faculty candidates; give students timely feedback on their work; and avoid the dunk tank at the annual CS picnic.

This morning I posted grades. Summer is now here and 995 of these tasks will go away for a few months. Whew. I’m looking forward to a summer of focus on Madeup—thanks to the support I received through Kickstarter!

I’ve been around the Internet long enough to understand that transparency on crowd-funded projects is important, so I plan on posting a weekly status report to document the things I’ve been working on. I’ll also share a special treat: a model of the week.

Fixlog

Short descriptions of the fixes I made recently are shared below. Many of them require working knowledge of the Madeup code base, but I offer them as documentation of our progress and as a record of Madeup’s development.

2015/05/26

  • Removes = from block-based function definition. Formerly, we needed this:
    to isbig n =
      n > 100
    end

    Now we just need:

    to isbig n
      n > 100
    end

    Single-line functions still require =:

    to isbig n = n > 100
  • Fixes broken recursive closures. The code
    to f x =
      if x == 0
        print x
        f x + 1
        print x
      end
    end
    
    f 0

    was printing

    0
    1

    The parameter binding on the recursive call was overwriting the caller’s environment too. I switched calls to operate on a copy of a closure’s environment, one whose parameter bindings are temporary.

  • Renames tube to dowel or stick. The generated models are not hollow, making tube something of a misnomer.

2015/05/25

  • Introduces rounded joints for tubes.

2015/05/21

  • Gracefully errors on division or mod by 0.
  • Adds a trap for creating an identifier with the same name as a keyword.

2015/05/20

  • Adds global for e.
  • Adds sign function.
  • Fixes named parameters to support lazy evaluation and to reference proper environment for closures.

2015/05/19

  • Adds a debug function, which prints to stderr.
  • print now prints to stdout.
  • Adds a mechanism for lazy evaluation.
  • Makes  Expression::Evaluate a const method no longer, as closures may get their environment changed by their bodies. (Update: tweaked the way closures operate, so I believe this can be made const again.)
  • Switches closures to now properly evaluate under their own environment.
  • Adds support for ternary ifs.

2015/05/18

  • Switches tests to compare ASTs instead of parse trees, which were too volatile.
  • Cleans up Interpreter state and command-line parameters.
  • Fixes precedence issue with binary operators missing an operand. CallWithoutParameters needed higher precedence than CallWithParameters.

2015/05/17

  • Adds max, min, acos, and asin functions.

2015/05/16

  • Renames log function to print.
  • Adds log and abs functions.
  • Adds a trap for stray ends.

2015/05/15

  • Adds a trap for malformed ranges, like for i in 10.

2015/05/14

  • Adds a trap for junk after end, like end 5.
  • Adds a trap for binary operators missing an operand.

Model of the Week

In my graphics course, I asked students to make some models for me using Madeup. Here are two of their creations:

David S.'s Klein bottle generated using the surface command.

David S.’s Klein bottle generated using the surface command.

Joel G.'s pagoda model generated from dowels and  a surface of revolution.

Joel G.’s pagoda model generated from dowels and a surface of revolution.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *