Back to browse
Ced – C REPL in 50 lines of POSIX shell

Ced – C REPL in 50 lines of POSIX shell

by archargelod·May 7, 2026·5 points·0 comments

AI Analysis

●●●BangerWizardryBig Brain

Fits a working C REPL into 50 lines of POSIX shell where others need full IDEs.

Strengths
  • Auto-appends semicolons and manages skeleton main() boilerplate so you just type logic.
  • Error recovery discards bad lines and restores previous working source automatically.
  • Pure POSIX shell + awk + tcc stack means it runs anywhere without heavy dependencies.
Weaknesses
  • No native line editing or history requires wrapping with rlwrap for basic usability.
  • Single-file limitation means you can't test multi-file projects or complex includes.
Target Audience

C developers and systems programmers

Similar To

Ch · Cint · Cling

Post Description

Yesterday, I found myself writing a little C throwaway script to test something out. That happens often enough to clutter my HOME and some other directories with these useless text files and binaries.

So I thought that I can use a repl instead. Quick google search didn't find any good and tested solutions. So I wrote my own. Why POSIX Shell? Because it would be far too easy in a normal language (it'd probably take me ~10 minutes to rewrite this in Nim) and where is fun in that?

Similar Projects