badouralix / adventofcode-2018 Goto Github PK
View Code? Open in Web Editor NEWAdvent of Code 2018
Home Page: https://adventofcode.com/2018
License: MIT License
Advent of Code 2018
Home Page: https://adventofcode.com/2018
License: MIT License
Stop running super-mega-long solutions.
Add a boolean flag --fast
or --no-slow
to the run
command
Discard solutions that take more than 5s to run.
We could also add a integer flag --timeout
to override the default 5s timeout.
Add a file to list all slow solutions (blacklist) or all fast solutions (whitelist) and use this file to deduce solutions to be run.
A naive approach for the timeout feature would be running the solution and force stop the execution after 5s. If a solution timeouts on the first input, it will likely timeout on all other inputs. Which means for each input, we run spend 5s for nothing.
This is improvable by flagging the solution as slow on the first input and avoid running it on other inputs. In a sense, this is a dynamic version of slow flag with a discrimination based on timeout.
Add a new command to run a wip-solution in debug mode.
The new command would look like:
$ ./aoc debug -d9 -p2 -abadouralix -r
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Running submissions for day 09:
* part 2:
---------------------------------------------------
On input from badouralix
---------------------------------------------------
<stdout of badouralix solution on badouralix input>
...
The idea is to prevent python main process to read a subprocess stdout, and let the shell print the subprocess stdout. The runner would not use the flag stdout=PIPE
as it currently does:
./aoc create
only creates a symlink to the go solution in workspace/
after it successfully created the go solution file. In particular, if the solution file already exists, it will skip creating the symlink even though it does not exist.
Catch the exception and keep moving?
Removing the following line would also help creating all missing files, instead of exiting at the first exception:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.