EmilGedda / hattis

A simple command line interface for the kattis online coding judge.
BSD 3-Clause "New" or "Revised" License
8 stars 3 forks source link

Wanted feature: Execution time of accepted submissions #2

Closed karlek closed 8 years ago

karlek commented 8 years ago

In problems which have point systems, it's very interesting to know how much time an algorithm took to execute. The number of iterations a Monte Carlo algorithm took to execute can be tweaked to fully utilize the given time for a problem to maximize a test score.

So after the line that reads accepted, a line printing the execution time / max allowed time could be printed. out20121

By the way, I love this little bundle of love. Use it all the time, nice work @EmilGedda!

EmilGedda commented 8 years ago

This is actually related to #1, all the info is actually available but hattis skips the parsing since it does not recognize the status message ("Accepted (X)") which Kattis provides. So fixing #1 should automatically display CPU time for accepted point based submissions since CPU time is already displayed for accepted "regular" submissions.

As an extension of this I've thought about including max runtime and memory limit info whenever a submission is accepted/rejected but this requires a couple of more HTTP-requests and even more parsing so it would probably won't be added until after 1.1, but I'll have it in mind for future releases.

By the way, I love this little bundle of love. Use it all the time, nice work @EmilGedda!

Thanks! Glad someone uses and enjoys it, makes development much more fun :)

karlek commented 8 years ago

Sweet, sent you a sample program on slack which you can use.

Yeah, I thought about caching the runtime and memory limits, but I don't know how much time you'll save contra the misinformation that might be produced if it's not updated often enough. For course problems it's not rare to update the requirements between the years (and even worse during the current course). So, your solution with multiple HTTP-request is probably best based on the scale of this application.

Thanks! Glad someone uses and enjoys it, makes development much more fun :)

It's really sweet that it's written in Haskell as well, have actually done all my problem solutions on open@kattis in that beautiful language. Will read through the code thoroughly some day when I've got time to learn a few stuff about error handling and parsing 🌴

EmilGedda commented 8 years ago

Closing since #1 is solved (which solves this aswell), and opening a new issue for the feature of max runtime and memory limit.