GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - lambda-discipline/lambda-discipline-cpp: Interpreter and REPL for "Lambda Discipline," a functional programming language, implemented in C++.

This repository was archived by the owner on Oct 12, 2026. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

97 Commits
97 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
docs
docs
 
 
examples
examples
 
 
include/lbd
include/lbd
 
 
packaging/appimage
packaging/appimage
 
 
scripts
scripts
 
 
src
src
 
 
tests
tests
 
 
.direnv.ps1
.direnv.ps1
 
 
.gitignore
.gitignore
 
 
.gitlab-ci.yml
.gitlab-ci.yml
 
 
.pre-commit-config.yaml
.pre-commit-config.yaml
 
 
CMakeLists.txt
CMakeLists.txt
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 
make.py
make.py
 
 
profiles.toml
profiles.toml
 
 
requirements.dev.txt
requirements.dev.txt
 
 

Repository files navigation

Functional Programming Language based on Lambda Calculus highly inspired by this video Programming with Math | The Lambda Calculus - Eyesomorphic made from scratch, entirely in C++.


Getting Started

Prerequisites

  • CMake (version 3.20+ recommended)
  • A C++20 capable compiler (e.g. g++, clang++, or MSVC on Windows)

Setup

python make.py setup

Run Golden Tests

python make.py test

Samples

Booleans and If-Then construct built entirely using Lambda Expressions.

true: Bool = \x: Any. \y: Any. x
false: Bool = \x: Any. \y: Any. y

if: Any = \condition: Bool.
    \thenClause: Any. \elseClause: Any.
        (condition thenClause elseClause)

boolToString: String = \bool: Bool. (if bool "true" "false")

(print (boolToString true) "\n")
(print (boolToString false) "\n")
$ ./cmake-build-debug/lbd run ./examples/conditional_branching.lbd
true
false

Shapes Demo

-- Define Pi as constant
pi: Number = 3.14

-- Define function to calculate square
square: Number -> Number = \x: Number. (mul x x)

-- Define function to calculate area of circle
areaOfCircle: Number -> Number = \r: Number.
    (mul pi (square r))

-- Define function to calculate volume of cylinder
volumeOfCylinder: Number -> Number -> Number = \r: Number.
	  \h: Number. (mul (areaOfCircle r) h)

-- Calculate the volume of a cylinder
(print "Volume of cylinder is: " (volumeOfCylinder 5.0 10.0) "\n")
$ ./cmake-build-debug/lbd run ./examples/shapes.lbd
Volume of cylinder is: 785.000000

Fibonacci

fibonacci: Number = \num: Number.
    (null (cmp 0 num) 0
        (null (cmp 1 num) 1
            (add (fibonacci (sub num 1.0)) (fibonacci (sub num 2.0)))))

(print (fibonacci 10) "\n")
$ ./cmake-build-debug/lbd run ./examples/math_demos.lbd
55.000000

Usage

After building, you can run the interpreter with:

lbd [subcommands] <options>

Options

OPTIONS:
  -h,     --help              Print this help message and exit
  -d,     --debug

SUBCOMMANDS:
  run                         Run a Lambda Discipline source file
  docs                        Generate native function signatures for reference
  repl                        Start an interactive Read-Eval-Print Loop (REPL)

Generate the language-reference-document by using the docs subcommand, and use it as the source of truth for native-function-signatures.

Editor Plugins

  1. GNU emacs major mode
  2. GNU emacs inferior REPL mode
  3. VS Code extension
  4. Jupyter kernel

Linux Releases

Prebuilt Linux releases are distributed as AppImages, allowing the interpreter to run on most modern Linux distributions without installation.

You can download the latest release from the GitHub Releases page.

After downloading an AppImage, make it executable and run it:

chmod +x Lambda_Discipline-*.AppImage
./Lambda_Discipline-*.AppImage --help

You can also integrate the AppImage with your desktop environment using tools such as AppImageLauncher, or simply keep it as a portable executable.

Dependencies

  1. fmt: String formatting.
  2. replxx: For better REPL user experience.
  3. CLI11: For better CLI support.

About

Interpreter and REPL for "Lambda Discipline," a functional programming language, implemented in C++.

Topics

cmakecppfunctional-programminginterpreterlambda-calculuslambda-calculus-interpreterrepl

Resources

Readme
MIT license

Contributing

Contributing
Activity
Custom properties

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.