#language #dc #esolang #adc #stack-based #terse #array-oriented

bin+lib adc-lang

Array-oriented reimagining of dc, a terse stack-based esolang

2 releases

0.1.1 Jan 3, 2025
0.1.0 Jan 3, 2025

#954 in Text processing

Download history 289/week @ 2025-01-01

289 downloads per month

Unlicense and LGPL-3.0-only

20KB
474 lines

ADC: Array-oriented reimagining of dc, a terse stack-based esolang

The goal of this project is to introduce polymorphic array support to an ancient scriptable RPN calculator program called dc (desk calculator), while preserving its elegant core tenets.

It takes the form of a highly performant interpreter that can be used interactively and/or with scripts. Potential applications include precise and complex mathematical calculations, string-based data processing, and lightweight interactive scripts combining both.

The nature of the language will seem unusual to those familiar with most "normal" programming languages due to the following aspects:

  • Commands (instructions) are generally single characters and perform quite basic operations. This makes scripts very compact, but also hard to read for the uninitiated.
  • Instead of named variables, data is stored on various stacks. This naturally leads to an RPN-like syntax for every operation, which has the benefit of completely linear execution (no backtracking or looking ahead). In effect, this is quite similar to machine code or assembly languages.

Dependencies

~10MB
~179K SLoC