npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

spyc

v0.1.1

Published

CLI tool for competitive programmers that will monitor for changes in the code and automatically compiles the code.

Downloads

3

Readme

So what is spyc ?

spyc is a CLI tool that monitors your CPP 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

Using npm

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

Usage

To run spyc 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 running spyc program, this help programmers to check their code on multiple test cases without much effort.

For example click here.

Cat file

spyc also allows users to see their cpp file or input file at runtime with the help of cat option.

For example click here.

Check Stats

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

For example click here.

Supports some common gcc flags

spyc also support some of the common gcc flags like,

| Flags | | | --------- | ------------------------------------------------------- | | std | std - Specify the C++ version or ISO standard version. | | Wall | Turns on lots of compiler warning flags. | | Werror | Turn any warning into a compilation error. | | Wextra | Enables extra flags not enabled by -Wall. | | Wshadow | Enable warning for Variable Shadowing. | | O0 | No optmization. | | O3 | Higher level of optmization. | | fsanitize | Sanitizer for runtime checks. (eg. --fsanitize=address) |

My personal flag options

You guys can also use my preferred GCC flag options for compiling the code using quick 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.

In spyc, 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 to cat 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 the spyc tool.

--cat=<filename>

Demo to check the stats.

In spyc, 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