3 ms·
Right yeah it's a good question. I think the reason we did it is so that we could visualize user output/solutions. You can learn new things by looking at your
by PolarizedPoutin 6y ago
Right yeah it's a good question.
I think the reason we did it is so that we could visualize user output/solutions. You can learn new things by looking at your solutions to various test cases!
One example would be if you submit a solution (or just the code stub) to the Exponential growth problem, then your solution gets plotted and compared with the analytic solution and the correct solution: https://projectlovelace.net/problems/exponential-growth/ https://projectlovelace.net/problems/exponential-growth/
Also, unlike Project Euler where every solution is a number, a lot of scientific problems have solutions that are multi-dimensional arrays or multiple objects. So in this case, copy pasting your output becomes quite messy.
It's not trivial to add support new languages since the engine app that runs user-submitted code needs to be able to run arbitrary code in your chosen language and needs a way to communicate with Python (either directly or through JSON passing).
So far we've just been adding support for languages we know and use.
But indeed there are hundreds of languages out there that would be nice to support in some way. It might be neat to add a new submission mode where you're given a couple of test cases that you run manually then submit your solution manually.
- HKH2 5y agoFor multiple items, you could sum them like in Advent of Code.
- PolarizedPoutin 5y agoOh that's a neat idea. I should check out Advent of Code. Summing would probably work for a lot of problems but some problems mix strings with numbers in the output