HeadlinesBriefing favicon HeadlinesBriefing.com

sc Script: C-like Scripting Language for Linux

Hacker News •
×

sc Script is a powerful but simple C-like scripting language that compiles to efficient bytecode and runs in a fast virtual machine. It features familiar C-like syntax with 64-bit integer and double floats, immutable UTF-8 strings, auto-growing arrays, dictionaries, and nested function declarations with first-class closures. The language supports stackful asymmetric coroutines, non-local exits, and variadic pass-by-value and pass-by-reference arguments.

The compiler optimizes tail-call recursion without stack frames and employs both mark/sweep garbage collection and reference counting. A powerful text pattern matching system is included, and the VM readily interfaces to C routines for package libraries. Memory management uses slab-based low-level allocation. Dependencies are minimal: only libx11 and libxft for the integrated editor, plus libffi for printf interface.

sc Emacs provides a complete editing environment with multiple buffers, panes, and windows, color source code display, UTF-8 support, undo, kill ring, incremental search, query replace, auto-completion, mouse operations, and pop-up menus. Specialized commands drive sc Script execution directly from the editor. The entire system is written in C, runs on 64-bit Linux, and is designed for easy customization, porting, extension, and embedding. Copyright (C) 2026 Shawn Amir, All Rights Reserved.