4

Catalyst — Accelerates Competitive Coding on Codeforces

 2 years ago
source link: https://codeforces.com/blog/entry/86720?f0a28=1
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
By Rudresh, 16 months ago, In English

CodeForces is an awesome platform for competitive programming, when I started practicing on CodeForces, the only thing I felt missing was the inbuild IDE for solving problems.

I thought It'd be a fun project to do, so during this vacation, I developed a VS code extension named Catalyst for that.

Catalyst automatically fetches the problem and displays it, parses test cases, runs and evaluates your code on test cases. You can edit/add/remove test cases as you like, and when you are done, it can submit your code and then track the submission in real-time. All this in Vs code.

Visual Studio Marketplace link — https://marketplace.visualstudio.com/items?itemName=RudreshVeerkhare.catalyst
If you have any suggestions or issues regarding Catalyst please let me know

image
Here's a little demo of it — https://raw.githubusercontent.com/RudreshVeerkhare/Catalyst/main/readme/CatalystQuickStart.mp4

16 months ago, # |

Thanks a lot Rudresh for this awesome extension. Looking forward to using it with VSCode.

  • 16 months ago, # ^ |

    You are Welcome sandipan_2224.. :)
    Please let me know in case of any issues..

16 months ago, # |

Will give it a try and provide u with feedback for sure.

  • 16 months ago, # ^ |

    Thanks sid_rasa :)

16 months ago, # |

I am not able to compile my code using java. It says no public class in code and when I make class public the ide gives error. Help.

  • 16 months ago, # ^ |

    Rev. 3  

    0

    Can you give some details on error...

    Note — You don't need to give public class name same as filename if you are using catalyst

    • 16 months ago, # ^ |

      Ok, now I can compile and submit. Thanks for clarifying.

16 months ago, # |

will it work on other sites like Atcoder . codechef??

  • 16 months ago, # ^ |

    It's specially designed for codeforces only..

16 months ago, # |

Rev. 2  

0

Cant we set a hot key for submission

  • 16 months ago, # ^ |

    Yes.. It's a nice idea.. I'll add this feature... Thanks..

    • 16 months ago, # ^ |

      The pleasure is all mine.

16 months ago, # |

Wow. I have watched the video and this is really cool. Well done. Can this be used in live contests and if so, does it parse entire problem sets? Instead of parsing per problem.

  • 16 months ago, # ^ |

    Rev. 3  

    0

    Thanks... :)
    Yes this can be used in live contests..
    But fetching all problems at once is not possible currently.. Actually I'm working on it...

    Update — I just added the feature to fetch Entire contest in version 0.0.7
    now you can either put Contest URL or Problem URL and Catalyst will automatically fetch all problem if it's a Contest url..
    Please let me know if you face any issues while using this feature..
    Thanks..

    • 16 months ago, # ^ |

      I see. This is still great, at least while the other features are in progress. Cheers.

    • 15 months ago, # ^ |

      I just added Catalyst to my VS-Code and wanted to congratulate you for this splendid work. Really a lot of thanks for working on this. Also, I have a query regarding contest fetching. When I am giving the contest URL it is just fetching the first question. How can I slide to the next question or any other question?? Thanks in advance

      • 15 months ago, # ^ |

        Thanks you very much...
        I'm really happy that you liked it...

        And regarding contest fetching...
        It'll fetch all problems, and will open the first one..
        You can switch problems easily through file explorer menu in the vscode..
        Just select source code file named with problem.. Catalyst will automatically open that problem statement for you on the right side...

        • 15 months ago, # ^ |

          Thanks for the help.

16 months ago, # |

The comment is hidden because of too negative feedback, click here to view it
  • 16 months ago, # ^ |

    I'm really sorry that you don't like it.. :(

16 months ago, # |

Rev. 4  

0

can you use https://github.com/jmerle/competitive-companion for parsing, i have the chrome extension of it, which parses question by just click of a button and saves the task of copy pasting the urls.

also add the support of mirror website codeforces.ml

Also c++ submission within vscode does not show option for g++ 17 9.2.0 64 bit msys 2 which i mostly use.

  • 16 months ago, # ^ |

    I could've used competitive-companion for parsing but I wanted problem text data also... And thanks for this suggestions.. I'll try to add support to mirror site also...

    and I just added the option g++ 17 9.2.0 64 bit msys 2 for submition...

    • 16 months ago, # ^ |

      So, can you make your own chrome extension, which parses problem statement too? Or can you just tweak the existing open source competitive-companion extension to do this?

      • 16 months ago, # ^ |

        As of now I don't know how to make crome extension.. But I'll surely try this...

16 months ago, # |

Can we somehow switch the codeforces ID from which we make submission??

  • 16 months ago, # ^ |

    Yes..you can change handle by using command "Update Login Details"...
    to execute the command press Ctrl+Shift+P and enter Update Login Details..

    • 9 months ago, # ^ |

      Rev. 2  

      0

      Great Work!!

      • 9 months ago, # ^ |

        Thanks.. :)

16 months ago, # |

Amazing work Rudresh! Hats off.

  • 16 months ago, # ^ |

    Thanks.. :)

16 months ago, # |

Your extension is asking for a password for my account. How safe it is ?? plz explain!!

  • 16 months ago, # ^ |

    Rev. 2  

    0

    Firstly, Catalyst uses AES-256-CBC for encryption of Login Credentials..
    then these Encrypted Credentials are stored in the system's keychain...
    On macOS the encrypted passwords are managed by the Keychain, on Linux they are managed by the Secret Service API/libsecret, and on Windows they are managed by Credential Vault...
    And keys for encryption are updated every time Credentials are updated..
    Hope this will help..

15 months ago, # |

Rev. 2  

0

Does it login every time (for submission) or does it store cookies?

  • 15 months ago, # ^ |

    It's doesn't login everytime... It stores cookies... And when cookies expires.. It login again....

15 months ago, # |

Great Extension bro...Would it be possible to parse all the problems of a contest at once in different tabs of vs?

  • 15 months ago, # ^ |

    You can load all problems from contest by giving contest URL instead of problem URL...

    • 15 months ago, # ^ |

      Rev. 3  

      0

      But even when I give contest URL only one tab with problem A opens up.

      • 15 months ago, # ^ |

        Oh. For that... You can simply open multiple problem from left side file view... Or you could drag them to editor... That will open multiple files... And then you can switch between them easily... Hope it helps..

15 months ago, # |

Please can include the option to create the problem file with my template.

  • 15 months ago, # ^ |

    You can add your template by assigning default template from settings...

15 months ago, # |

This is amazing but I hope the security is same

  • 15 months ago, # ^ |

    Rev. 2  

    0

    Nvm, thanks for the extension.

14 months ago, # |

Can there a way through which, we can remove the "VIEW EDITORIAL" button?

  • 14 months ago, # ^ |

    Rev. 2  

    0

    Not till now...
    But I'll add option in settings for that...

    UPDATE — Added an option in settings to hide editorial button in version 1.2.1..

    • 14 months ago, # ^ |

      Thank you so much for helping! Amazing Extension.

13 months ago, # |

Thanks a lot. I hope to have a feature generate code with templates on the computer.

  • 13 months ago, # ^ |

    Rev. 2  

    +3

    There's a feature to set base template for problem statement..
    You can access it through extension settings..

    • 13 months ago, # ^ |

      Got it. Thank you for helping.

13 months ago, # |

hey is there any way we can by default run c++17. As it run c++98 by default. Can we add some setting to setting.json to make this happen.

Like for e.g. One for code runner(popular extension on vscode) uses this "code-runner.executorMap": { "cpp": "cd $dir && g++ -std=c++17 $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt", }

  • 13 months ago, # ^ |

    Rev. 2  

    0

    Yes...you could add args for compilation..
    From extension settings...

    • 13 months ago, # ^ |

      Cool, works. Thank you.

13 months ago, # |

Is there a specific reason that it isn't working for me suddenly for the past 2 days?

It shows, "Not a problem page!!" every time I enter a problem link. It worked fine for the past 3 weeks.

  • 13 months ago, # ^ |

    Yes it shows no problem page error

  • 13 months ago, # ^ |

    Sorry for this...
    It seems that Codeforces have made an small change...
    I'll fix this soon... And thanks for reporting this issue..

  • 13 months ago, # ^ |

    Rev. 2  

    0

    Today I tried debugging the Catalyst...
    And it was working already...
    I think Codeforces have reverted the change of RCPC cookie...

    Let me know if it's working for you or not...

    • 13 months ago, # ^ |

      It works for me now! Thanks for trying.

13 months ago, # |

How can i change my login credentials??

  • 13 months ago, # ^ |

    There's a command in command pallet... Update login details..

12 months ago, # |

Its simply awesome I love it

  • 12 months ago, # ^ |

    Thanks..:)

11 months ago, # |

But in my case its not working on Contest URL? As its creating a different folder with all cpp files And when I want to run the cpp file It's showing this

cannot open file:///c%3A/Users/dell/Desktop/vs/A.%20Potion-making.cpp. Detail: Unable to read file 'c:\Users\dell\Desktop\vs\A. Potion-making.cpp' (Error: Unable to resolve non-existing file 'c:\Users\dell\Desktop\vs\A. Potion-making.cpp')

Please help me.

  • 11 months ago, # ^ |

    Rev. 2  

    0

    Sorry for this....
    This is a bug due to contest questions are being added to new folder...

    Currently my exams are going on... I'll fix it ASAP after that...

    Quickfix for this problem is that.... Bring your sourcecode out of the contest folder and it'll work...
    Hope it helps..

    • 11 months ago, # ^ |

      ya ya thats what i meant. Np you give your exams. BEST OF LUCK. :)

      • 11 months ago, # ^ |

        I checked it...
        Problem was that...

        Initially contest problem source codes were stored in root of workspace...
        But it was getting quite messy given that there might be other problem source codes which would make it difficult to identify contest problems from individuals...

        To solve this issue, I added a feature to group all contest problems in a folder in the workspace root...
        I have modified some internal data elements of problem cache file in this process...

        So solution to that is simply update Catalyst to latest version and reload that contest...
        and don't worry, reloading contest won't override your solutions for those contest questions...

        Let me know if it solved the problem or not... :)

        • 11 months ago, # ^ |

          Thanks Man. :) It worked. U r a Genius.

10 months ago, # |

Can you please extend this to Codechef and Atcoder as well? It will be quite helpful :)

  • 10 months ago, # ^ |

    Thanks for the suggestion..
    But it's specifically designed for CodeForces only...
    Making it for other platforms will require whole new implementation...
    This is something which I've put in future scope..

10 months ago, # |

Please release on Sublime Also

  • 10 months ago, # ^ |

    That's a really good idea..
    But thing is that VScode is made using electron which make it possible to show html content..
    But I'm not sure about Sublime text..
    I haven't found anything similar in Sublime text yet...

9 months ago, # |

the tutorial button is operative?

  • 9 months ago, # ^ |

    It should operative..
    I'll look into it...
    Thanks for reporting...

    • 7 months ago, # ^ |

      Certificate has expired why is it showing this message

      • 7 months ago, # ^ |

        Rev. 2  

        0

        Thanks For reporting..
        Seems like there has been some changes in requirement...
        I'll update it ASAP.

        UPDATE -
        I've fixed it now..
        Let me know if you face any problem.. :)

        • 7 months ago, # ^ |

          It is fixed now. Thank you very much this is extension is very helpful and amazing

9 months ago, # |

Very cool plugin, passed my first problem on it

Id just like to know if there is a way to set which folder the file gets saved to, i tried some stuff but the code just goes to the main folder you're on (even if when clicking inside a folder it still did that)

7 months ago, # |

I get this error when I click the View Editorial button:-

Editorial Failed due to some error!

  • 7 months ago, # ^ |

    Rev. 2  

    0

    I'll try to fix it soon...
    But it might take little time..
    Really sorry for inconvenience...

    UPDATE -
    It's fixed now..
    Let me know if you face any issue...

7 months ago, # |

Rev. 2  

0

editorials are not loading!(-_-) else everything is good. vscode version = 1.60.2 windows 10

  • 7 months ago, # ^ |

    It's fixed now...
    thanks for reporting.. :)

7 months ago, # |

This cool extension!

I wrote to you in private messages my thoughts on improving the extension

3 months ago, # |

How can I log back in

  • 3 months ago, # ^ |

    you can change handle by using command "Update Login Details"... to execute the command press Ctrl+Shift+P and enter "Update Login Details"..

    • 3 months ago, # ^ |

      Thanks for your suggestions>0<!

5 weeks ago, # |

Rev. 2  

0

Hello, when sending an answer it gives me this error and I don't know how to solve it.

The name org.freedesktop.secrets was not provided by any .service files

I have the dependency installed but it gives me that error

  • 5 weeks ago, # ^ |

    I already found the answer. If you have KDE installed you have to install the gnome-keyring dependency

8 hours ago, # |

I cannot submit my solution. It says "Loading cookies" and then "Cannot read properties of undefined (reading 'value')"

  • 7 hours ago, # ^ |

    And I cannot get the editorial.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK