Dragonado's blog

By Dragonado, 4 years 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.
  • 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.

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

| Write comment?
»
4 years ago, # |
  Vote: I like it +9 Vote: I do not like it

Looks Great

»
4 years ago, # |
  Vote: I like it +9 Vote: I do not like it

Excited to try this out!! :D

»
4 years ago, # |
  Vote: I like it +6 Vote: I do not like it

awesome

»
4 years ago, # |
  Vote: I like it +2 Vote: I do not like it

Wow, This seems really cool.

»
4 years ago, # |
  Vote: I like it +5 Vote: I do not like it

Tried it and its awesome

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

  • »
    »
    4 years 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.

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

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

»
4 years 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!

»
4 years ago, # |
  Vote: I like it +5 Vote: I do not like it

Thanx for this. Its awesome.

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

  • »
    »
    4 years 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.

»
4 years ago, # |
  Vote: I like it +9 Vote: I do not like it

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

»
4 years 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?

  • »
    »
    4 years 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
»
4 years 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

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

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

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      right click file and you can see "Copy Path"

»
4 years 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 ??

  • »
    »
    4 years 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.

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Ok. Thanks for the quick clarification.

      • »
        »
        »
        »
        4 years 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

»
4 years 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?

  • »
    »
    4 years 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.

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

  • »
    »
    4 years 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 years 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!!

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

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    are you being sarcastic?

  • »
    »
    4 years 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.

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

amazing

»
4 years ago, # |
  Vote: I like it +6 Vote: I do not like it

Amazing work!!

»
4 years 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 !!

  • »
    »
    4 years 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!!

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

  • »
    »
    4 years 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.

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

Great Job, Guys

»
4 years ago, # |
Rev. 2   Vote: I like it +3 Vote: I do not like it

Awesome! This is the best extension I have seen so far which supports almost all widely used OS + languages.
Thanks for building this!

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

Really nice extension, thanks for your efforts :)

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

Looks great

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

Awesome

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

Please add Kotlin

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

    Sure! Will add in next release!

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

    We have added Kotlin support. Thanks for your feedback!

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

      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 ?

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

        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.

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

          It would be nice do integration with Competitive Companion.

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

            Thanks , Noted. But our first attempt is always to integrate without the use of another browser extension to make things easier for the user.

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

      it's really amazing!!!!

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

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.

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

why the setting "Codepal: Generator Template Path" doesn't work? is it bug?

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

    Hi, are you mentioning the entire path there, because it works. Can you share a screenshot or something?

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

      i found if gen file is zero byte, this file is not used. anyway it may not a big problem.

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

Thanks buddy..

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

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

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

    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.

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

Why my codepal now creates an empty folder?

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

    with a good stable internet connection, it shouldn't. Please try again with good internet.

»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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.

  • »
    »
    2 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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:

    • Suppose gen, brute and soln are the three executable files.
    • ./gen 1 > input.txt
    • ./brute < input.txt > brute_output.txt
    • ./soln < input.txt > soln_output.txt
    • Check if brute_output.txt and soln_output.txt are equal. If they are then we try "./gen 2" and so on.
    • If the two files don't match then the stress testing stops and this input file is shown.

    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.

»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Can anybody help me in this extension. I am getting the following error https://drive.google.com/file/d/16dn2RnhbCKbEUNYOUqlDz5n9DFAz4ZcX/view?usp=sharing

  • »
    »
    2 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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.

    • »
      »
      »
      2 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      I have installed it. When I run code manually it runs perfectly, but if try to run test case it throws the error.

      • »
        »
        »
        »
        2 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        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.

»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Hello , why it says "compilation error!!!" when only warnings exist .

  • »
    »
    2 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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.

»
2 years ago, # |
  Vote: I like it +1 Vote: I do not like it

Is there an option to parse test cases of problems from GYM contests in one click? (except manualy adding the test cases)

»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Hi I think I like the idea. Can you please give the option to hide tags for unsolved problems. It's quite a bummer

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

    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.

»
7 months ago, # |
  Vote: I like it +1 Vote: I do not like it

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.

  • »
    »
    7 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like 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,).

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

      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.

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

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"

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

    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.

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

Looks nice!Thank you very much!