Giter Site home page Giter Site logo

unneon / icie Goto Github PK

View Code? Open in Web Editor NEW
82.0 4.0 10.0 1.99 MB

Competitive programming IDE-as-a-VS-Code-plugin

Home Page: https://marketplace.visualstudio.com/items?itemName=pustaczek.icie

License: Mozilla Public License 2.0

Rust 95.89% CSS 1.19% JavaScript 1.99% Shell 0.93%
competitive-programming vscode-extension codeforces atcoder spoj cpp contest codechef programming-competitions

icie's Introduction

ICIE

ICIE is intended to be a VS Code plugin which turns it into an IDE focused on competitive programming. It aims to cover every aspect of participating in programming competitions, from downloading statements and setting up template code, through building solutions and running the example tests to submitting the solution and tracking its status. Both efficiency and convenience are priorities, with automated behavior and keyboard shortcuts making coding hassle-free and achieving otherwise impossible time penalties. Currently, it works on Windows, Linux and macOS, with support for Codeforces, AtCoder, CodeChef and SPOJ. If you have any questions, just create a GitHub issue!

Quick start

  • Launch Visual Studio Code, go to Extensions, search for ICIE and click Install.
  • To participate in a contest, press AltF9 before it starts and select it from the list.
  • Use AltF12 to automatically build, run example tests and submit if tests pass.
  • Use AltBackspace to quickly switch between tasks.
  • To open a single task or an old contest, press AltF11 and copy-paste its URL.
  • Check out all the other features below!

More features

  • Hover over the test input or output and press CtrlC to copy it
  • Click "Edit" icon on test input or output to edit it
  • Click "Accept" icon on a failing test output to mark it as correct
  • Click "Reverse" icon on a failing test output to launch it in GDB debugger
  • Click "Reverse 2x" icon on a failing test output to launch it in RR debugger
  • Alt- to add a new test
  • Altt to launch a terminal
  • Alt0 to run tests without submitting
  • Alt9 to run stress tests (test your solution on thousands of random tests)
  • Alt8 to reopen task statement
  • Alti to generate a simple struct and an input operator>>
  • Alt[ to automatically copy-paste parts of your library
  • Alt= to create a new file from a template
  • Alt; to manually compile a file
  • Alt\ and Alt0 to run tests on currently open file instead of the solution
  • Alt+ and select "C++ Checker" to use custom code for checking output correctness
  • Alt+ and select something else to create more .cpp files from templates
  • CtrlShiftP and select "ICIE Web" to open contest or task page in a web browser
  • CtrlShiftP and select "ICIE Password reset" to log out or reset a password
  • Ctrl, and select Extensions > ICIE to easily configure ICIE's behavior.
  • To alter settings only for the current task, use the "Workspace" tab in the settings view.

Supported sites

Contests Statement Examples Submit Track
Codeforces Yes Yes Yes Yes Yes
AtCoder Yes Yes Yes Yes Yes
CodeChef Yes Yes Yes Yes
SPOJ Yes Yes Yes
sio2 sites Yes Yes Yes

Development & Building from source

The instructions can be found in CONTRIBUTING.md. The project is still in development, the Rust language does not have an official VS Code API, there is a custom build system, it uses WebAssembly which is still in heavy development, and it also patches the compiler output with regexes to remove some type checks, but nevertheless I have tried to make it as streamlined as possible. If you have any trouble, just create a GitHub issue!

icie's People

Contributors

unneon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

icie's Issues

Can't track submissions anymore

Yesterday I could track the result of my submissions without any errors, today after 0.5.2 came out, something is happening:

image

I tried to revert back to 0.5.1 but it kept happening. I'll try to run with a debug version and get a better stack trace

Atcoder live contest .

While pasting the live link for AtCoder the error message said " this event hasn't started yet " or something.
Things i did:
Tried to parse many times during the test, although worked fine after the contest got over.
Tries to paste the link both in alt+F9 and alt+F12 window and also for a particular problem.

Any fixes to avoid this for future contests ? Something to do with time- zone ?

Unrecognized verdict in Codechef

Not able to recognize some of the verdicts in Codechef.
Encountering the following error.

image

Verdict for the above submission was this:

image

I'm not sure about what might be the problem.
I guess adding some of the verdicts that are not defined here could solve the problem.

Getting the same error for both ''Correct Answer' and 'Wrong Answer' responses.

How to reset login credentials?

Thanks for the extension! I accidentally entered incorrect login details on the first try, now every time I press Alt-F11 it reuses my old credentials and I cannot figure out a way to reset them.

Where are the credentials stored? If encrypted (hopefully yes), how can I reset them?

force submit

is there a way to force submit? sometimes test samples are not exactly the same as solution output but still correct

Does not work if clang is not installed

That one was hard to find!

Most commands were breaking with an entity not found error and after digging in the code, I narrowed the error to the build function which called clang, a compiler I didn't have.

Perhaps the extension should try GCC and if even that fails, display a nice error message?

I'm sorry for just creating issues, unfortunately I don't know Rust at all to help with PRs!

By the way, now that I've got everything working, this is a very nice extension.

Consider making `vscode-sys` an independent project

I'm building a vscode-extension using wasm and I found this project's vscode-sys is way more extensive compared to https://crates.io/crates/vscode-sys (which is archived now).

Currently I'm using a copy and have added two or three new Api functions for my use case. But I think making vscode-sys a separate project will make it easier for me (or anybody using the project) to push new Api additions, eventually making it more and more extensive.

It'll also be easy to discover.

Can't run any commands

This is a tricky one, I can't seem to run any commands from 2 competitive programming extensions, both give me the same "failed" notification.

I took a screenshot of the console, I have no idea why it fails or if it is just me, thought you might want to take a look:

image

Also, I've built the extension locally and it works if I run it using the icie executable in the target, but not if I install with a custom vsix

some bug in windows

EINVAL: invalid argument, mkdir 'C:\Users\XH\◉
atcoder-beginner-contest-155'; report issue?

when i create contest shows that.
and how can i choose path when it create new contest?

Problem Not loading

When pressing Alt+9, I entered the codeforces problem URL but it shows the error like this :

website could not be analyzed; not found '.problem-statement > .header > .title

What could be the reason?

Allow configuration of flags for debug and release builds

I like to set the -DDEBUG flag because of this macro:

#ifdef DEBUG
#define debug(x) cout << #x << " = " << x << endl
#else
#define debug(x)
#endif

This way, I can easily debug my code and send the solution without having to remove the debug calls. However, ICIE does not let me submit because, for him, the tests have failed.

I'm not sure if ICIE already uses release builds in order to test the submission (when submitting), but if it does, it would be cool to use different flags.

Sample test cases were not being fetched for Codeforces contests

Yesterday I used Alt + F9 to participate in Educational Codeforces Round 89, it did show the time till it began. However, when the contest began, it did not fetch the test cases at all. And it did not create the folder of each problem, either. Though I tried many times, restarting VS Code and using Alt + F9, Alt + F11, it still did not work.

Codeforces Network request fails

I've just installed this extension to test it out. Turns out, current contests fetching for Codeforces is bugged, alt+f9 command freezes for a few seconds and throws an error:

network request failed; error sending request: JsValue(Object({"message":"request to https://codeforces.com/contests failed, reason: certificate has expired","type":"system","errno":"CERT_HAS_EXPIRED","code":"CERT_HAS_EXPIRED"})); report issue?

However, contests from AtCode are listed properly.

What's more, opening codeforces URL (even from URL example page, https://codeforces.com/contest/1294 for example) throws a similar exception:

network request failed; error sending request: JsValue(Object({"message":"request to https://codeforces.com/contest/1294//countdown failed, reason: certificate has expired","type":"system","errno":"CERT_HAS_EXPIRED","code":"CERT_HAS_EXPIRED"})); report issue? 

Was I supposed to set some configurations settings beforehand? Also, I am not fully sure, how to log in to my codeforces account in this extension (is it even possible?). One can find ICIE Password change from URL but I am not sure, whether is the proper way for the first login.

Stress Test is never stopping

Hello. First of all, thanks for the great work!

Recently, I have noticed that stress testing does not stop when I close the tab. If I found a suitable testcase which brute-force and main result differs, I think what we want is to add the 'found counterexample' to our testset by clicking plus and stress testing should stop, thus enabling user to use icie after debugging my code. However, it seems ICIE is stuck here.

Below is the image which shows what the issue is. When I tried to add test 1, ICIE immediately hanged.
image

Here is a screenshot where I closed ICIE Stress test tab. As seen in lower left side of the screenshot, stress testing is keep running(also no test is actually done), and I cannot use usual testing (ALT + 0), another launch of stress test, and so.
image
Currently, it seems like only way to clear the stress test is to close VSCode. However by this I lose the counterexample I found. Is there a way to resolve this issue? It would be great if I myself can fix this, but I know nothing about Rust...

Not fetching test cases

ICIE has started storing the words "Input" as the input and "Output" as the output instead of the actual test cases. Hence test cases need to be added manually. Earlier it was working fine.

Notification Sound (Feature Request)

Can you please add a sound notification feature when all the test cases gets passed or failed, because sites like codechef only accepts one login at a time.

Documentation for devs

Hello!

I've been having some issues with your (and other) extension(s) and am trying to build it.

I figured that perhaps you'd want a suggestion with some sort of tutorial on how to set up the environment to build your extension and such, for example, starting with not using a relative path as the evscode dependency, using the git url maybe?

Anyway, just suggestions if you feel like it!

Compilation Error bug

i am getting the following error:

compilation error; no match for 'operator!=' (operand types are 'std::filesystem::__cxx11::path' and 'std::filesystem::__cxx11::path')

this issue is only with this extension.
ss-2 compilation error
ss-1 compilation path

Customize Project Direcotry

Hello. Thanks for you awesome extension.

In Setting and Project Directory path, I want to add some customization on where the extension should create a directory.
For example I want extension to create directory in ~/Codeforces/$(RoundNumber or ContestNumber)/$(ProblemGroup)-$(ProblemName).
Where ContestNumber may be something like: 1296. ProblemGroup be C and ProblemName be Yet Another Walking Robot for this question.
So How could I do it?
Thanks for your response.

Is testing with Alt+0 defaulted by DEBUG mode?

I installed this plugin for the first time today, and I tried running some codes I wrote for previous problems. It seems the solution gets much much slower and results in TLE even though the solution passed nicely in real contest. It seems like using alt+0 runs solution in debug mode. If this is not the case, is there any reason the test seems slow? Or are there any options I can fix this?

Thanks in advance.

Add mirror for codeforces

As you know,it usually takes a few minutes for us to get access to codeforces in China.So there's a unbearable for me to use the extention.For example,I submitted a code for two times and lost score because of the dalay.So can you add mirror sites which we can get access faster such as codeforc.es.

mingw compiler

mingw is installed and it shown that there is no mingw-compiler

"MinGW not installed"

1.MInGW is installed and working fine with coderun extension and even i myself use mingw for default compilaton.
2. MInGW is installed using default settings, path is not changed and added to system paths.
3. did a restallation of compiler too.
HELP !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.