AB22's blog

By AB22, 3 months ago, In English

Hi CF,

A while ago I made a Tauri/React desktop app for competitive programming called cp-assist. It did the job, but honestly, having a separate window up just to look at test cases while I'm in my editor felt clunky.

Here's what it looked like:



So I scrapped the desktop app and rewrote the whole thing in Go as a TUI. It's called cocom.

Here's what cocom looks like:


Please note how the code is importing local libraries


What it does:

It runs a local http server that listens to the Competitive Companion browser extension. When you click the extension, it generates a file using your templates, and opens your editor. When you save the file, it automatically compiles and runs your code against the sample tests in a temporary folder, and updates the UI with the results along with time and memory consumed.

The main reason I built this (library bundling):

If you code in Rust or C++, you probably have a personal library folder (dsu, segtree, modint, etc.). Managing #includes or mods for a single-file judge submission is annoying. You can register files and even folders with my app, it then checks what you actually imported in your solution, topologically sorts the dependencies, and bundles everything into one file automatically. Your local code stays simple (see code in preview image please), but the code it prepares for submission is flattened into a single file.

Everything is configured via a single cocom.yml file in your project folder

(not putting it here for brevity reasons).

Repo: https://github.com/veryshyjelly/cocom

This is still an early release v0.1, so you may run into a few rough edges. If you find any bugs or have suggestions for new templates, I'd love to hear them.

  • Vote: I like it
  • 0
  • Vote: I do not like it