@Voxel did you see my post in the flame free confession thread? I’ll be working on some software for my university!
One of the requirements we informally discussed already is they’ll need a platform that runs JS programs submitted by students as solution to presented exercises against some test-case inputs and checks if they’re correct by comparing the given output to a set of expected outputs.
I’d like to be able to do this in django as I already wrote quite a bit of code for other functionalities needed by the platform I’m developing (multiple choice questions, score history, …), so I started looking around and stumbled across this GitHub - PiotrDabkowski/Js2Py: JavaScript to Python Translator & JavaScript interpreter written in 100% pure Python🚀 Try it online:
It’s very interesting and looks like a well done library. It’s extremely recent too. Only issue is there is no docs yet. The eval_js function does exactly what you’d think, and there’s also convert_js which very neatly takes in a js file and outputs an equivalent python file. Only issue I’ve seen is eval_js can apparently only print the output of the evaluation to the console, rather than allowing for it to be saved to a variable. I would like to be able to capture the output of the evaluation so I can either compare it to a stored expected output or run it through a comparing function. I’m sure I’ll find a way to accomplish this; I already opened an issue on github to ask about this.
— EDIT: after thinking this through some more, a better solution would most likely be to have a separate node.js server handle this. I’ll look into a possible implementation.
Meanwhile, you might (or might not) have seen that I put up a personal website to display my projects. I put the link to it on my profile. Something I worked on a bit lately is polishing a card game I had coded a few months ago, which I think I even showed you on github. I am in the process of publishing it to heroku (I got it to work which is no mean feat, considering it uses django-channels and it was the first time I worked in a production environment, but there’s some issue going on with static file serving).
Anyway, there’s a demo video of me playing it with two other people on this page, if you wanna take a quick look and tell me what you think. The page is in Italian, but you don’t need to read it, just watch the video
https://samul-1.github.io/dubitowebsite/
I’d love to hear feedback from somebody looking at it externally who also knows what it takes to build things with code!

