Madeup Status Report #7
Madeup has come a long way in the past several months. The prospect of describing all of the updates in a status report has intimidated me, and I’ve pushed it off. However, this week I’m in Memphis, TN. Life is slower here. So I’ll write.
You can find a summary of many of the software fixes below. However, a number of other good things beyond software improvements have been happening:
- Four undergraduate students and I have been working steadily to identify bugs and build things. Check out my son’s car, a FlexiPuzzle clone, a Reaction Ball clone, an egg, a six-sided die, a restroom man, a swirl ball, a benzene model, a snowflake, and a path walker.
- I’ve been using Madeup in an afterschool enrichment class with fourth and fifth graders at my sons’ school. They’ve been really excited to make things! Last week we made a Mayan pyramid and a rupee.
- Last October I presented Madeup at the Blocks and Beyond conference in Atlanta. It was warmly received, and I had a chance to meet the developer of Blockly, the blocks framework we use for the blocks editor. He helped me with a few issues I was running into mostly by telling me, “Yeah, you could probably do that.”
- This week I’m presenting at SIGCSE 2016 a 3-hour workshop on Madeup for computer science educators.
- I incorporated Madeup into an honors game development course that I am teaching this semester. A student emailed me his reaction after making something with code: “I feel powerful!”
- I’m preparing an NSF grant proposal to use Madeup to bring computation into science, technology, engineering, and mathematics classrooms. The grant would bring teachers to my campus for professional development, let them try out their ideas in a local summer camp, and send them back to their schools with lesson plans and a 3D printer.
Fixlog
- Fixes failing export on Safari by using FileSaver.js.
- Adds solidifier tutorials to documentation.
- Adds syntax highlighting to documentation.
- Adds support for arrays:
/usr/lib/ruby/2.7.0/rubygems/dependency.rb:311:in `to_specs': Could not find 'coderay' (>= 0) among 56 total gem(s) (Gem::MissingSpecError) Checked in 'GEM_PATH=/.gem/ruby/2.7.0:/var/lib/gems/2.7.0:/usr/lib/ruby/gems/2.7.0:/usr/share/rubygems-integration/2.7.0:/usr/share/rubygems-integration/all:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0:/home/johnch/.gems', execute `gem env` for more information from /usr/lib/ruby/2.7.0/rubygems/dependency.rb:323:in `to_spec' from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_gem.rb:62:in `gem' from ./coderay:24:in `
' - Adds multiline comments:
/usr/lib/ruby/2.7.0/rubygems/dependency.rb:311:in `to_specs': Could not find 'coderay' (>= 0) among 56 total gem(s) (Gem::MissingSpecError) Checked in 'GEM_PATH=/.gem/ruby/2.7.0:/var/lib/gems/2.7.0:/usr/lib/ruby/gems/2.7.0:/usr/share/rubygems-integration/2.7.0:/usr/share/rubygems-integration/all:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0:/home/johnch/.gems', execute `gem env` for more information from /usr/lib/ruby/2.7.0/rubygems/dependency.rb:323:in `to_spec' from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_gem.rb:62:in `gem' from ./coderay:24:in `
' - Adds string/array parity. Function
size
and subscripting now apply to strings just like arrays. - Adds a warning message when no vertices have been visited or no solidifier has been issued. The latter especially was a common oversight that warranted a gentle notification.
- Adds functions
cross
,dot
,magnitude
, andnormalize
. All expect array parameters. Here we use these functions to create a basis from two perpendicular vectors:
/usr/lib/ruby/2.7.0/rubygems/dependency.rb:311:in `to_specs': Could not find 'coderay' (>= 0) among 56 total gem(s) (Gem::MissingSpecError) Checked in 'GEM_PATH=/.gem/ruby/2.7.0:/var/lib/gems/2.7.0:/usr/lib/ruby/gems/2.7.0:/usr/share/rubygems-integration/2.7.0:/usr/share/rubygems-integration/all:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0:/home/johnch/.gems', execute `gem env` for more information from /usr/lib/ruby/2.7.0/rubygems/dependency.rb:323:in `to_spec' from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_gem.rb:62:in `gem' from ./coderay:24:in `
' - Adds links to error messages in the web client that highlight the line(s) of code generating the error.
- Adds check for named parameters in a function call that don’t exist in the function’s formals. This is needed because sometimes folks substitute in a different name (like
length
forsize
, orcolumns
forwidth
, etc.) and are surprised when the behavior is not as expected. - Adds subrange indexing to arrays and strings:
/usr/lib/ruby/2.7.0/rubygems/dependency.rb:311:in `to_specs': Could not find 'coderay' (>= 0) among 56 total gem(s) (Gem::MissingSpecError) Checked in 'GEM_PATH=/.gem/ruby/2.7.0:/var/lib/gems/2.7.0:/usr/lib/ruby/gems/2.7.0:/usr/share/rubygems-integration/2.7.0:/usr/share/rubygems-integration/all:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0:/home/johnch/.gems', execute `gem env` for more information from /usr/lib/ruby/2.7.0/rubygems/dependency.rb:323:in `to_spec' from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_gem.rb:62:in `gem' from ./coderay:24:in `
' - Adds a
coalesce
function to meld nearby vertices in path. Nearby vertices cause trouble forrevolve
andextrude
because they may yield degenerate triangles. - Adds per-vertex color. Each vertex now has a
.rgb
attribute, which is a 3-array for an RGB color in [0, 1] x 3.
/usr/lib/ruby/2.7.0/rubygems/dependency.rb:311:in `to_specs': Could not find 'coderay' (>= 0) among 56 total gem(s) (Gem::MissingSpecError) Checked in 'GEM_PATH=/.gem/ruby/2.7.0:/var/lib/gems/2.7.0:/usr/lib/ruby/gems/2.7.0:/usr/share/rubygems-integration/2.7.0:/usr/share/rubygems-integration/all:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0:/home/johnch/.gems', execute `gem env` for more information from /usr/lib/ruby/2.7.0/rubygems/dependency.rb:323:in `to_spec' from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_gem.rb:62:in `gem' from ./coderay:24:in `
' - Fixes sphere connectivity. Previously spheres had a seam and their poles didn’t align.
- Allows spheres to have just 3 wedges. Previously they were capped at 4.
- Adds timestamp to the web client to prevent slower earlier requests from trumping later ones that return faster.
- Adds a mesh variable type. If meshes are stored in a variable, they are probably intended to be used in some other way and are therefore not automatically emitted in the 3D scene. They can be issued explicitly via the
echo
function:
/usr/lib/ruby/2.7.0/rubygems/dependency.rb:311:in `to_specs': Could not find 'coderay' (>= 0) among 56 total gem(s) (Gem::MissingSpecError) Checked in 'GEM_PATH=/.gem/ruby/2.7.0:/var/lib/gems/2.7.0:/usr/lib/ruby/gems/2.7.0:/usr/share/rubygems-integration/2.7.0:/usr/share/rubygems-integration/all:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0:/home/johnch/.gems', execute `gem env` for more information from /usr/lib/ruby/2.7.0/rubygems/dependency.rb:323:in `to_spec' from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_gem.rb:62:in `gem' from ./coderay:24:in `
' - Adds initial support for lighter theme.
- Allows non-planar paths to be extruded and revolved. There’s no automatic way to fill in the faces of these non-planar paths.
- Adds scrollbars to file menu. (I finally filled mine with saved files!)
- Adds support for one-liner loops:
/usr/lib/ruby/2.7.0/rubygems/dependency.rb:311:in `to_specs': Could not find 'coderay' (>= 0) among 56 total gem(s) (Gem::MissingSpecError) Checked in 'GEM_PATH=/.gem/ruby/2.7.0:/var/lib/gems/2.7.0:/usr/lib/ruby/gems/2.7.0:/usr/share/rubygems-integration/2.7.0:/usr/share/rubygems-integration/all:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0:/home/johnch/.gems', execute `gem env` for more information from /usr/lib/ruby/2.7.0/rubygems/dependency.rb:323:in `to_spec' from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_gem.rb:62:in `gem' from ./coderay:24:in `
' - Adds mesh boolean operations, thanks to some significant help from libigl. Meshes can be unioned, intersected, or differenced, which significantly opens up the class of models that can be generated. These operators are a little slow.
/usr/lib/ruby/2.7.0/rubygems/dependency.rb:311:in `to_specs': Could not find 'coderay' (>= 0) among 56 total gem(s) (Gem::MissingSpecError) Checked in 'GEM_PATH=/.gem/ruby/2.7.0:/var/lib/gems/2.7.0:/usr/lib/ruby/gems/2.7.0:/usr/share/rubygems-integration/2.7.0:/usr/share/rubygems-integration/all:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0:/home/johnch/.gems', execute `gem env` for more information from /usr/lib/ruby/2.7.0/rubygems/dependency.rb:323:in `to_spec' from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_gem.rb:62:in `gem' from ./coderay:24:in `
' - Adds “View From” links to look at model along the positive or negative x, y, or z axes.
- Adds an explicit Pathify button to regenerate the preview path.
- Removes explicit
repeatwich
loop. The regularrepeat
loop now just accepts anaround
block. - Adds blocks-to-text and text-to-blocks conversion. You can write your program in text and then switch it to blocks, or vice versa! Here’s a rupee made in blocks and then converted automatically to a rupee made with text:
- Adds statement-to-expression and expression-to-statement conversion for blocks. Most blocks frameworks cleanly divide expressions from statements. Madeup is an imperative language that supports a functional style of programming, so everything’s an expression. But in a blocks language statements have certain connectors while expressions have others. To enable this, blocks can have their connectors swapped. In this example,
mag
appears as both an expression and a statement, as do the calls tonorm
. Toggling between connectors is done through the context menu.