hello all -- if you happen to be in the market for a new competitive programming extension and use VSCode, may i humbly suggest my new extension? i think it is relatively feature complete, but it's still in alpha (especially for languages other than C++) and may have some kinks that need working out. it theoretically supports C++, Java, Python, and Rust (and it's very easy to add more).
i created this because i was dissatisfied that most existing solutions can't import a bunch of test cases from a directory then run them in parallel. i also believe it has a cooler UI than other extensions. as usual, i didn't think it would take this long when i started...
if you encounter any difficulties, please let me know on github. thanks for taking a look!
Realtime Input/Output
unlike other test runners for VSCode, we let you use prewritten inputs and still interact with your program on the fly.
Test Editor
extensive configuration and support for interactors and custom checkers (floating point is easy -- just use fcmp! thanks testlib).
Stress Testing
run stress tests using a generator and brute force solution against your efficient solution. testlib is automatically included in generators/checkers/interactors.
Debugging
debug with CodeLLDB / debugpy / the Java extension for VSCode. integrates with clangd to provide linting based on your compiler arguments.
Competitive Companion Integration
integrates with the Competitive Companion browser extension for one-click test imports.
note: you can't use Hightail's Competitive Companion integration while this extension is active (they bind to the same port).
File I/O and Directory Import
perfect for USACO!
Please try it out, he didn't sleep for the last few weeks (also it has cool features and UI).
w extension
This extension gained me +300 elo, 4.0 gpa, and night vision
What VS code version does it need? I am in version 1.82.3 and it tells me the extension can not be installed with this version. Should i download a new vs code ?
yes, the minimum vscode version is currently 1.91.1 !
Thanks, i have successfully installed it. But there are some questions:
sorry, currently no light mode but i'll add that to the TODO! shouldn't be hard at all
to fill out settings for the current workspace, you can open test editor, click on "select language," choose your language and the compiler & compile arguments fields should appear
if you want to modify global settings (for all workspaces), for now you can edit those in the vscode settings UI, which you can access through test editor -> settings button with gear. you probably want to change "cpu: compiler," which should be a table with languages on the left and compiler on the right (blank is default)
I think i have completed the settings now, but it just tells me that
Error compiling a.cpp: Failed to compile a.cpp
:)hey! i've added light mode and i think it works with MSYS2/minGW now. debugging on windows is unfortunately pretty terrible because I couldn't get CodeLLDB to work
Wow it works! Nice work!
There are still some small issues:
fixed the editor selection background in light theme in v0.2.3!
to interact manually, use the test i/o tab, which should be a panel at the bottom (alongside the terminal, output, etc).
it should automatically open up when you run/debug a single test case (but not during run all or stress tests)
Facing a compilation error. Is it for minGW??
this should have a ∞ better chance of working if you update (im dumb bc apparently windows has the very strange behavior of using .exe for executables...)
interesting
Can you elaborate on how you do stress testing? I understand the brute is just a slower brute solution which you can make pretty easily, but how do you create the generator?
the generator should simply output a test case given an argument as a seed (or it can ignore the argument and use another source of randomness). you can customize the arguments supplied in the test editor
i recommend using testlib (just
#include <testlib.h>
should work) because it's designed for this -- you can see examples at https://github.com/MikeMirzayanov/testlib/tree/9ecb11126c16caeda2ba375e0084b3ddd03d4ace/generatorshow to configure the interactor ?
This is mainly for mac for now?
kind of. it has been lightly tested on linux and once on WSL. if you find any issues with other platforms just create a github issue!
Looking good. Will give it a try.
how to use the interactor? Loved it and installed on the first go! Awesome work!
Also for some reason I'm getting a compilation error. Here's what the extension is executing
I used coderunner before and it used this
I really enjoyed using your extension, but I primarily use CLion IDE developed by JetBrains. Could you please create the same extension for CLion as well? I really need this.
I second this idea :)
Here's a plugin that's built for CLion: AutoCP.
Does it work for interactive problems? Cause it doesn't seem like it.
Great work Btw,do you have a wolf?
can i use this with wsl ?
yes, it should work with WSL! (i'll fix the issues with using MSYS soon™️)
Does it have light mode?
yes, it does now!
I tried stress testing, but its throwing the following error: Error compiling brute.cpp: Failed to compile brute.cpp (nonzero exit code)
Though the file is executing properly when I execute it. How to resolve this?
hmm, that's strange. do other tests work fine and the compiler does not give any errors?