Hello Codeforces!
We , aditya_chirania, niranjan.sy99, lomadapraveenreddy, janmansh and I (Dragonado) of IEEE-NITK, are extremely happy to release our VSCode Extension for CF called CodePal
CodePal is made to help Codeforces Users Code with Convenience. This extension is especially for people who want to save time in a live codeforces contest and upsolve problems comfortably. This extension responds quickly to users. It can swiftly filter through the problem list by specifying tags and ratings, create folders for contests and problems containing sample tests of each problem in them and compile and run tests automatically. For added convenience, we've created buttons to directly open problem statements and submission pages on the default browser.
Current Features of this Extension
- View Complete ProblemSet List along with their associated tags and ratings.
- Swiftly Filter through the ProblemSet by specifying Ratings and Tags.
- View Currently running, Upcoming and all Past contests and also view the precise start date, time, and duration of upcoming contests.
- Fast Folder Creation on a single click for Contests from the Codeforces contest list and Problems from the Codeforces problem list.
- Folder for a contest contains a folder for each problem and also contains all sample test cases and program files for each problem.
- Folder for a problem consists of all its sample test cases and a program file loaded with a template whose path may be specified in the settings.
- Manually create a contest or problem folder by simply specifying name of contest/problem and number of problems.
- Add additional tests to any problem.
- Compile and run any program file against the test cases and get comprehensive results.
- Open the problem statement or submission page with a single click, on your default browser. (You must be logged in to codeforces beforehand to open the submission page successfully)
- Compiler may be selected and compilation flags can be set through the CodePal settings.
- Perform Stress testing to find a counter test case for your code.
- Get a personalized experience of viewing details of your Codeforces profile and the status of problem submissions made, by entering your Codeforces handle in the codepal settings.
- Use AtCoder library in C++ with no extra setup.
Languages Supported
- C++ (compiler: g++)
- C (compiler: GCC)
- Java (compiler: javac)
- Python
- Kotlin
- Note: You may add additional compilation flags through the codepal settings (example: -std=c++14) and also choose between python, python2, or python3 depending upon the python command you use on your system to run.
Operating Systems Supported
- Windows
- Linux
- Mac
Here is a snapshot of the extension
You can install our extension here: https://marketplace.visualstudio.com/items?itemName=IEEE-NITK.codepal
You can find the usage guide, developer docs, and demo GIFs here: https://github.com/IEEE-NITK/CodePal/blob/master/README.md
Please do try it and give us your feedback. If you face issues or bugs, please comment on this blog or here. We're planning some more features for our subsequent releases and wish to keep all subsequent releases as smooth functioning and responsive as this.
Thank you :)
UPDATE: We have added AtCoder library support for C++. You can now use this great library with no extra setup. You can easily submit it to any Online Judge other than AtCoder as well. For more information on usage, you check our README here
UPDATE: After the recent feature on codeforces to highlight each test case, our extension had broken. We have now patched it. We have now also added support for Haskell.
Looks Great
Excited to try this out!! :D
awesome
Thanks!
Wow, This seems really cool.
Tried it and its awesome
Thank you :D
This is really good! Please update the blog whenever the Mac support for c++ is released.
Yes, In our next minor update to 0.0.2 we shall be including C++,C and Java support for MAC users as well.
We now have MAC support for c++, c and Java as well
is there any way, this can help me read problems without having to leave vs-code? it would make it absolutely great!
Yeah we've planned this feature. Will hopefully add it soon
Please do, I would be of great help.
Thanx for this. Its awesome.
We are glad you find it useful :)
This is really good! Thanks for this, please try to make an update that we can just directly upload/submit the file.
Thank you :). We will work on it. We will update the blog if we manage to provide the same speed and convenience as codeforces submit.
Used it and it really helped me in the contest. Thanks!
We are glad you find it useful :)
Do you Implement Caching for user Profile and Problems and stuff and just hot reload it then, or does it takes loads all this info everytime we open VSCode and use this extension?
Since new problems get added every week and your submission status also changes, we load problems everytime you open VS Code. We initially did think of caching in a json file locally but we were faced with the following difficulties:
when i test "stress test", brute.cpp can't load templatecode, even though i set this in setting and common file doing well. how to fix it?
upt it just my mistake
glad to hear it's working. How did you resolve the issue?
right click file and you can see "Copy Path"
Is there any option for virtual contests??I did not get my virtual contest neither in past,running or future contests. Also is there any way to open a problem folder in vscode using the problem link ??
Virtual contests arent returned by the codeforces api so thats why we werent able to include them.
Ok. Thanks for the quick clarification.
Im not sure if i understood your question correctly but there is a create folder icon that can create the exact problem or contest folder in vs code... If u meant opening the problem folder that already exists on the file system...thats not included as of now
is there any function to view cerr out when my source is infinite loop?
We just found small bugs in cerr. It doesnt behave as expected for inifinite loops but works fine in any other case. Thanks for pointing out. We'll fix it soon for infinite loops as well.
I would like to suggest some features: - It would be great if you could add codeforces authentication and we need not manually paste the code while submitting. - Also while adding a folder for a problem, do consider opening the problem statement in the VsCode side pane or if not just open it in the browser by default. - Implement the search functionality in both problemset and past contests. - Adding support for competitive companion or developing some similar extension to achieve the same would be great.
Thanks for the feedback. We'll work on adding those features but about the search functionality, there is a provision in VS To search through the contests and probelems anyway. Just click anywhere in the problemlist/contestlist and start typing the problem/contest you want to search for. They will get filtered accordingly. Incase that search doesnt seem too obvious to spot, we can go ahead and add a search as well.
Mind blowing extension :)
But can you plz reverse the future contests list, I think it would be good if these are shown in ascending order of their happening time. Thanks!!
Sure, Noted. Will make sure in next release.
Its been resolved in the most recent release
Amazing :)
Thank you!
How do you get to this interface? Extension looks amazing
Edit: Nevermind, I found it
Although this is very awesome but for problems that have multiple correct answers, it fails. It will be nice if you resolve this.
are you being sarcastic?
We match exact output only for now. We will add a feature for custom checker soon. Thanks for your feedback.
amazing
Thank you!
Amazing work!!
Thanks alot
I am using an extension competitive companion for the past 2 months and now I tried this extension, I feel this much better as it doesn't slow down vs code much and has an easy interface, and also the feature of details about the upcoming CF contest is also good. REALLY NICE !!
Really glad you liked it!! We were very particular about the speed of our extension as well!!
I am not able to integrate my compiler installation with VSC, on compilation I get "g++: fatal error: no input files"
Most likely the reason is some path conversion error from linux/windows paths. How is the compiler to be installed on the system to make it work, is there a description somewhere?
Also it would be great help if configuration/setting would be explained in even more detail. Consider a user entering the settings uses VSC for the very first time, or did not use it for like some years.
Hi,so im assuming you use c++ and generally compile c++ programs on your system by entering "g++ filename.cpp <--flags>" in your terminal/cmd. Incase you dont, just include g++ in your environment variables(windows)/PATH variables(linux) on your system so g++ can be run globally in your cmd/terminal. You could type "g++ --version" in your terminal to check if its been done properly. Then do the following:
Press "Ctrl+comma" on your system to open the VS code settings.
Go to the codepal section in Extensions->codepal
The compiler would be set to g++ by default.
Head to compiler flags section and add whatever compiler flags you typically add.
Our extension basically runs g++ for you in your environment. Hence it needs g++ to be included in the nvironment(windows)/PATH(linux) variables on your system.
Secondly, yeah we need to work on our documentation! Will ensure a better documentation soon! I hope this helps the issue you're facing. Incase it doesnt , it'll be great help if you could elaborate your issue in the issues section of our repository and we'll ensure a fix for it in the next release.
Great Job, Guys
Thanks a lot!
Awesome! This is the best extension I have seen so far which supports almost all widely used OS + languages.
Thanks for building this!
Thank you!
Really nice extension, thanks for your efforts :)
We are glad you find it useful :)
Looks great
Thank you!
Awesome
Thank You!!
Please add Kotlin
Sure! Will add in next release!
We have added Kotlin support. Thanks for your feedback!
Good news!
Thank you very much, now I can enjoy solving problems with kotlin.
Tested, it works!
Do you think adding other sites apart from codeforces ?
Hi, We have been considering Atcoder as the next site we want to support. We shall soon be starting work towards that. If you have any other suggestions, we're happy to discuss.
It would be nice do integration with Competitive Companion.
Thanks , Noted. But our first attempt is always to integrate without the use of another browser extension to make things easier for the user.
it's really amazing!!!!
Thank you!
This is amazing! A suggestion: It would be really nice if you could add the functionality of adding problems using their Codeforces link. This would allow test cases to be fetched automatically.
Thanks. We will look into it!
why the setting "Codepal: Generator Template Path" doesn't work? is it bug?
Hi, are you mentioning the entire path there, because it works. Can you share a screenshot or something?
i found if gen file is zero byte, this file is not used. anyway it may not a big problem.
Thanks buddy..
shows me error "cannot read property 'length' of undefined" when trying to expand the 'future'/'running'/'past' column in contest does not show anything in the problems box gave the handle in settings but only shows "handle:shashwatgandhi88" nothing else like in the image
Hi! This happens when the extension doesn't receive a response from CF API. This usually happens when you have a bad internet connection. Please try again with a stable internet connection.
Why my codepal now creates an empty folder?
with a good stable internet connection, it shouldn't. Please try again with good internet.
I have the same problem too.
While stress testing how to provide expected output from generator itself? For example if I have a rotated sorted array. I don't want to write brute.cpp but directly pass expected output from generator itself.
Can you explain more about what you are trying to do? The job of the generator is just to print test cases.
The stress testing works like this:
This is the reason why you can't directly do stress testing on problems with multiple correct solutions. Although there are workarounds like adding a checker inside your soln.cpp
Hope I cleared your doubt.
Can anybody help me in this extension. I am getting the following error https://drive.google.com/file/d/16dn2RnhbCKbEUNYOUqlDz5n9DFAz4ZcX/view?usp=sharing
You don't have g++ installed on your system. The extension is only trying to run g++ on your system. So if your system does not have g++ installed you would see this error.
I have installed it. When I run code manually it runs perfectly, but if try to run test case it throws the error.
It says command failed: "g++ -o " in the image you shared
VS Code is only runnning the exact same command as written next to "command failed:" on your system. And it displaying the exact same error that your system returns.
Try to make sure if the same command written next to "command failed:" in the image you shared , works manually. If not, you can ping me and we can connect once to fix this.
Hello , why it says "compilation error!!!" when only warnings exist .
It is intended behavior (sort of). Definitely, we need to change the error message to "Warnings Exist" or similar. But since this extension is mainly for beginners its good practice to resolve the warnings before running the test cases.
Maybe in the future, we can add an option in settings to run the code even if warnings exist.
Is there an option to parse test cases of problems from GYM contests in one click? (except manualy adding the test cases)
no, not yet.
Hi I think I like the idea. Can you please give the option to hide tags for unsolved problems. It's quite a bummer
There is a collapsible tree to view the Tags. You can choose to not expand the drop down if you dont wish to see the tags.
Hello, I hope You still maintain this extension at this moment. I am trying to specify my path to a template file as a relative path, but so far I failed to do so. I assume that this feature is not supported by now. It would be great if You added it.
Hi, we don't really maintain this extension anymore. We made this extension as college students, we have graduated and now work full time since then. For the near future at least, there are no plans to maintain but it might change in the future.
I will try to help as much as I can. The template file feature should work. Please give the absolute path of the template file. If the error still persists then can you share screenshots of the error and your system specifications (OS. VSCode version etc,).
Hello, I am glad You answered. I now use an absolute path to a template file. By the way, your extension is really helpful, because other vs code extensions related to the subject are either not useful or do not support newer versions of VS code.
I am getting this error while running test cases on my code How can I fix this "Command failed: g++ -o "c:/Users/Asus/Desktop/CSES/B_KSort/Tests/a.exe" "c:/Users/Asus/Desktop/CSES/B_KSort/B_KSort.cpp" -std=c++14 c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../libmingw32.a(main.o):(.text.startup+0xa0): undefined reference to `WinMain@16' collect2.exe: error: ld returned 1 exit status"
The Extension runs this exact command on your system. You could compile the program using your command line with g++ and let me know if it works. It should give the same error. Most likely its something to do with your c++ installation or your program.
Looks nice!Thank you very much!