Skip to content

Chopcap 0.1.0

Latest

Choose a tag to compare

@ilikemacos ilikemacos released this 16 Aug 11:31
· 5 commits to main since this release

Chopcap 0.1.0 — the first release. Programming without the clutter.

Chopcap is a very small programming language: 22 keywords, 7 built-in functions and 6 library modules, implemented in about 3,500 lines of dependency-free C11 and shipped as a single macOS binary.

This is an early release. It works and it is tested, but it is not a mature production language, and the syntax may still change before 1.0.

Install

curl -fsSL https://raw.githubusercontent.com/ilikemacos/chopcap/main/install.sh | sh

The installer detects Apple Silicon or Intel, downloads the matching archive below, verifies its SHA-256 checksum against SHASUMS256.txt, and installs a single file into /usr/local/bin (or ~/.local/bin).

Downloads

File For
chopcap-0.1.0-macos-arm64.tar.gz Apple Silicon
chopcap-0.1.0-macos-x86_64.tar.gz Intel
chopcap-0.1.0-macos-universal.tar.gz both, in one binary
SHASUMS256.txt checksums for all three

What is in it

  • Values: numbers, decimals, text, booleans, lists, nothing, functions and modules
  • if / else if / else, while, for x in list, for i in a to b by step, break, skip
  • Functions with parameters, return, recursion, closures, and functions as values
  • try / catch and error, use for built-in modules and for your own .chop files
  • say and ask; the math, text, lists, random, files and time modules
  • Friendly errors: file, line, the offending line, a plain-English message, a hint, and did-you-mean suggestions — never a stack trace
  • The chopcap command: run a file, -e a snippet, or an interactive prompt

Verifying a download

shasum -a 256 -c SHASUMS256.txt --ignore-missing

Full details in the changelog and the documentation.