Human Machine Language Interpreter

Here is an online Human Machine Language interpreter you may find useful:

For lesson 3.2 without the swap instruction, you can use

Let me know if, and how you find this useful, and any problem you find.


I like the interpreter thank you for sharing.

GAHHHH. So jealous. I was hoping I’d be the first to make a widget for the HML!!!

This great, Brian. I’ll play with it a bit and see what suggestions I can make. Here’s one that might not be too hard: on the Try It page let the user be able to set the number of cards to something besides 8. This would let you try weird edge cases (like what happens when there’s 1 card?), or scale a solution up to run on many more cards. You’ll have to experiment to figure out what you max is in terms of screen real estate but I could imagine scaling up to a point where the visualization just looks like a list of numbers, rather than showing the actual card faces (you know, like hint, hint, nudge nudge, it’s not about the cards).

Cool. Cool. Cool.

1 Like

Very nice.

Thank you for sharing!

For some reason my students can’t get the swap button to use during Lesson 3.3 It shows up when we use Safari but the program will not run in safari. It does not show up in Chrome. Any suggestions?

Nevermind we figured it out-sorry.

thank you for sharing. my students really enjoyed the interpreter and said it was addicting! It nice to use this as an introduction to programming.

It seems like I can no longer to the interpreter. There seems to be a firewall now.

There is no special firewall on the site, it is a public site. Your school/district may be blocking it based on that.

If you can’t get them to unblock it and you have your own website, you can copy the files from and host them yourself.

Great! Thanks! I downloaded the code, will this work for both the non-swap and swap interpretters?

By default, it is non-swap. To add swap, add &swap or ?swap to the end of the url (try one then the other)

Hello again, The readme file says that I need to send in ?swap. I am just testing locally, and running the index file in a browser. file:///C:/Users/…/HML-master/index.html runs the non-swap version. I am not sure how to send in “?swap”. I have tried …/HML-master/index.html?swap, but that doesn 't work. Am I missing something easy?

I just tried it locally… I ended up with a url file:///C:/Users/…/HML-master/index.html?cards=58367029 (it keeps track of cards in the url now so I can run the same demo over again). Adding &swap to the end added the swap instruction for me: file:///C:/Users/…/HML-master/index.html?cards=58367029&swap

Great that worked! Thanks again for the tool and the help!

Is there a website that my students could use for this widget other than the Our IT department won’t let us use this link because of the domaing .tk. Thanks!

I have added instructions to the readme on that can help you make a copy in your own GitHub account that will serve from I can’t do that because my district blocks

1 Like

If possible, can link this on the lesson plan? I didn’t see it on the lesson plan last week - it said to check back for updates and so we did it by hand in my class. Thank you!

Updates to the website will go live after the hour of code activities have completed.

1 Like