Human Machine Language Interpreter


#1

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

https://perryma.tk/HML/?swap

For lesson 3.2 without the swap instruction, you can use

https://perryma.tk/HML/

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


#2

I like the interpreter thank you for sharing.


#3

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.


#4

Very nice.

Thank you for sharing!


#5

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?


#6

Nevermind we figured it out-sorry.


#7

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.


#8

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


#9

There is no special firewall on the site, it is a public github.io 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 https://github.com/PerryHighCS/HML and host them yourself.


#10

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


#11

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


#12

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?


#13

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


#14

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


#15

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


#16

I have added instructions to the readme on https://github.com/PerryHighCS/HML that can help you make a copy in your own GitHub account that will serve from github.io. I can’t do that because my district blocks github.io.


#17

If possible, can code.org 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!


#18

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