Skip to content

lucasscharenbroch/apl-interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

APL Interpreter

An implementation of APL, written in Haskell.

apl-intpreter, solving day 7 of Advent of Code '23

Supported Syntax

  • All primitives, except ⌹, ⌺, and ⌸
    • Functions
      • (Monadic): ⍎⍕
      • (Dyadic): <≤≥>=⍲⍱∧∨⊤⊥∪∩⍷/⌿\⍀
      • (Ambivalent): +-×÷⍳⍴*⍟⌊⌈⊢⊣|≡≢○!?⍉⌽⊖∊⍋⍒~≠⊃⊂⊆,⍪⌷⍸↓↑
    • Operators
      • (Monadic): ⍨¨∘./⌿\⍀
      • (Dyadic): ⍤⍥∘⍣@.
  • Direct Functions (dfns) (Lambda Functions)
  • Direct Operators (dops) (Higher-Order Lambda Functions)
  • Assignment
    • Modified Assignment (x+←1)
    • Selective Assignment (((⌽x)←y); (w x←y z); x[i;j;k]←y)
  • Tacit (forks and atops)
  • Axis Specification (⌽[2]x)
  • Array Subscripting
  • Stranding
  • I/O with (⎕←) and ⍞
  • Quad Names (⎕IO)
  • Misc. Primitive Glyphs: ¯⍬⋄⍝

User Interface

  • Configurable REPL (Haskeline)
    • Tab-Completion for Glyphs
  • Pretty-Printing for Arrays (boxing) and Derived Functions (trees)
  • -v option for printing syntax trees before evaluation

About

A REPL for APL on the command-line

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published