Dragonado's blog

By Dragonado, 3 months ago, In English

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.

Languages Supported

  • C++ (compiler: g++)
  • C (compiler: GCC)
  • Java (compiler: javac)
  • Python
  • 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 :)

UPD 1: MAC support for C++, C, Python and Java are there too now. The version has been updated to 0.0.2.

UPD 2: v1.0.0 Released : New features such as stress testing and keyboard shortcuts have been added. You can also get a personalized experience(User profile details and status of past attempted problems are shown) by entering just your CF handle in CodePal settings.

UPD 3: We are planning to add more features in our extension, so it ll be great if the community of users can file issues in the repository describing any feature they think should be added.

UPD 4: Version 1.0.1 released. Please check out our extension if you haven't. You may view our changelog on our repository to see whats new this release.

UPD 5: There are some open issues regarding some enhancements and feature requests on our repository. If anyone is interested in working on them or contributing to us, feel free to discuss with us in the issues section of our github repository and help make this extension even better for the codeforces community.

UPD 6: We recently released V1.1.0 with some minor changes and an extra feature for manual folder creation as well. Please checkout our changelog for more info on whats new.

UPD 7: NOTE — INCASE SOMEONE WAS WONDERING WHY THE ICONS OF THE EXTENSION GOT MESSED UP YESTERDAY (6th May 2021),IT WAS BECAUSE OF THE LATEST RELEASE OF VS CODE 1.56. WE HAVE UPDATED OUR EXTENSION AS WELL TO V1.1.1 TO FIX THE ICONS. SORRY FOR ANY INCONVENIENCE CAUSED!

 
 
 
 
  • Vote: I like it
  • +135
  • Vote: I do not like it

»
3 months ago, # |
  Vote: I like it +9 Vote: I do not like it

Looks Great

»
3 months ago, # |
  Vote: I like it +9 Vote: I do not like it

Excited to try this out!! :D

»
3 months ago, # |
  Vote: I like it +6 Vote: I do not like it

awesome

»
3 months ago, # |
  Vote: I like it +2 Vote: I do not like it

Wow, This seems really cool.

»
3 months ago, # |
  Vote: I like it +5 Vote: I do not like it

Tried it and its awesome

»
3 months ago, # |
  Vote: I like it +5 Vote: I do not like it

This is really good! Please update the blog whenever the Mac support for c++ is released.

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    Yes, In our next minor update to 0.0.2 we shall be including C++,C and Java support for MAC users as well.

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    We now have MAC support for c++, c and Java as well

»
3 months ago, # |
  Vote: I like it +5 Vote: I do not like it

is there any way, this can help me read problems without having to leave vs-code? it would make it absolutely great!

»
3 months ago, # |
  Vote: I like it +5 Vote: I do not like it

Thanx for this. Its awesome.

»
3 months ago, # |
  Vote: I like it +5 Vote: I do not like it

This is really good! Thanks for this, please try to make an update that we can just directly upload/submit the file.

  • »
    »
    3 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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.

»
3 months ago, # |
  Vote: I like it +9 Vote: I do not like it

Used it and it really helped me in the contest. Thanks!

»
3 months ago, # |
  Vote: I like it +5 Vote: I do not like it

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?

  • »
    »
    3 months ago, # ^ |
    Rev. 4   Vote: I like it +6 Vote: I do not like it

    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:

    • If we cache all problems till date D, the codeforces api doesnt let us request for problems added only after date D. It always returns the entire problemset. So if we anyway are returned all problems by the codeforces api , why cache locally.
    • We could try to do webscraping from the Problemset Page to get more recent problems after the last cached date D. But webscraping from one problemset html page and then parsing it and looking for the recent problems would turn out to be much slower than directly getting the problemset object as a json object from the cf api
»
7 weeks ago, # |
Rev. 4   Vote: I like it 0 Vote: I do not like it

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

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    glad to hear it's working. How did you resolve the issue?

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      right click file and you can see "Copy Path"

»
7 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

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 ??

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Virtual contests arent returned by the codeforces api so thats why we werent able to include them.

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Ok. Thanks for the quick clarification.

      • »
        »
        »
        »
        7 weeks ago, # ^ |
        Rev. 3   Vote: I like it 0 Vote: I do not like it

        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

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

is there any function to view cerr out when my source is infinite loop?

  • »
    »
    7 weeks ago, # ^ |
    Rev. 3   Vote: I like it 0 Vote: I do not like it

    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.

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

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.

  • »
    »
    6 weeks ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    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.

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Mind blowing extension :)

Screenshot-from-2021-04-16-10-47-41

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!!

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Although this is very awesome but for problems that have multiple correct answers, it fails. It will be nice if you resolve this.

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    are you being sarcastic?

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      No brother, I am just sharing my experience from my previous incident.

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    We match exact output only for now. We will add a feature for custom checker soon. Thanks for your feedback.

»
3 weeks ago, # |
  Vote: I like it +3 Vote: I do not like it

amazing

»
11 days ago, # |
  Vote: I like it +6 Vote: I do not like it

Amazing work!!

»
9 days ago, # |
  Vote: I like it +6 Vote: I do not like it

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 !!

  • »
    »
    7 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Really glad you liked it!! We were very particular about the speed of our extension as well!!

»
7 days ago, # |
  Vote: I like it 0 Vote: I do not like it

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.

  • »
    »
    7 days ago, # ^ |
    Rev. 2   Vote: I like it +3 Vote: I do not like it

    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:

    1. Press "Ctrl+comma" on your system to open the VS code settings.

    2. Go to the codepal section in Extensions->codepal

    3. The compiler would be set to g++ by default.

    4. 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.