Bin packing demo

Porting a 2D bin packing algorithm to MakeCode Arcade.

1 Like

So this is an interesting test case for Github sharing of Arcade code. Before recommending any Arcade code or extensions to our coding kids I like to test that, try to understand the text coding and blocks and download to hardware. The links here do not give me the option to download the program to Meowbit so as to demonstrate on hardware. Furthermore, when I go to Jake S Gordon on Github and try to copy and paste his “Usage” text code into Arcade I then get 8 errors. When I try to install his extension to eliminate those errors, that does not work, errors remain. I have tried to see where the tool box shows the extension when I install it so that I can better understand the tools but I do not see the extension in the tool box for bin-packing. Sometimes the tool name in Makecode is not the same as the extension name such as “edge connector” tool is actually “pins”. Here I see no change in the tools when bin-packing is installed. When I press the A button in the simulator I get different color blocks but as I said, I cannot test this on Meowbit as I see no download method from the link above. Just wondering what is the point of Github sharing when “edit code” does not seem possible so we can’t better understand what is happening in blocks or text ?

@frank_schmidt Click on the second link; the one that looks like a box. The first one is a link to the implementation Peli’s is based off of. To get a download link, you should just be able to click the v0.0.2, which has a link to the uf2 file stored in the repo for this project. You can also drag and drop the uf2 back into arcade to load up the project file.

@peli, maybe an edit link in the footer of the template page would be good to load up the extension in the editor? Right now it’s not necessarily obvious how you would go from the page -> the editor if you don’t know github or the user is using a custom domain

Yup, we need an edit button.

Maybe Bin Packer is not intended to be used on hardware? Anybody tried it?

I haven’t tried it yet on hardware. If it’s failing there, i found a bug :slight_smile:

Which hardware did you choose? It is compiling correctly for me on meow/rpi on the beta editor.

And we have a button now. @jwunderl

1 Like