Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

🖥️ cli tool for competitive programmers...

NotificationsYou must be signed in to change notification settings

L-lawliet07/spyC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

So what is spyc ?

spyc is aCLI tool that monitors yourCPP code and automatically compiles and executes the code whenever there is a change in the file.

spyc is designed mainly for competitive programmers so that they can efficiently debug and execute their code for multiple test cases without compiling again and again.

spyc also supports some of the common GCC flags used in competitive programming.

Installation

Usingnpm

Install globally
npm install -g spyc
Install as a dev dependency
npm install --save-dev spyc

Usage

To runspyc write.

spyc<yourfile.cpp> [,options]

Help

For CLI options, use-h or--help.

spyc -h

Runtime input

spyc allows user to provide or change the input file at runtime without stopping the currently runningspyc program, this help programmers to check their code on multiple test cases without much effort.

For example clickhere.

Cat file

spyc also allows users to see theircpp file or input file at runtime with the help ofcat option.

For example clickhere.

Check Stats

Inspyc user can also see the past stats usingstats options for performance comparison. This helps the user to check and compare the efficiency of their code on different test cases.

For example clickhere.

Supports some common gcc flags

spyc also support some of the common gcc flags like,

Flags
stdstd - Specify the C++ version or ISO standard version.
WallTurns on lots of compiler warning flags.
WerrorTurn any warning into a compilation error.
WextraEnables extra flags not enabled by -Wall.
WshadowEnable warning for Variable Shadowing.
O0No optmization.
O3Higher level of optmization.
fsanitizeSanitizer for runtime checks. (eg. --fsanitize=address)

My personal flag options

You guys can also use my preferred GCC flag options for compiling the code usingquick flag.

spyc ./sample.cpp --quick

quick option will enable the following gcc flag combination.

g++ -DLOCAL -std=c++17 -Wshadow -Wall -o<output><yourfile.cpp> -fsanitize=address -fsanitize=undefined -D_GLIBCXX_DEBUG -g

Examples

Demo to run simple cpp file.

Run command.

spyc ./sample.cpp

Demo to run cpp file with input.

Run command.

spyc ./sample.cpp --input=<inputfile>

or

spyc ./sample.cpp -i=<inputfile>

Demo to change the input file without restarting the app.

Inspyc, we can also change or provide input at runtime without restarting the tool.This will help users to check their code on different test cases without wasting time on compiling and executing the code manually.

Run command.

--input=./in

or

-i=./in

Demo tocat input or code at runtime.

spyc can also display input file or cpp code at runtime without pausing or stopping the tool.

This helps competitive programmers to see and debug their code or check the input file within thespyc tool.

--cat=<filename>

Demo to check the stats.

Inspyc, users can also see stats from past executions. This will help the user to optimize their code by comparing the execution time of their code.

stats



About

🖥️ cli tool for competitive programmers...

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp