https://github.com/matiasvlevi/ludit
Ludit is an interpreter for Ludi, a language meant to express and compute boolean algebra in the CLI.
https://github.com/matiasvlevi/ludit
boolean boolean-algebra boolean-logic logic-gates
Last synced: about 2 months ago
JSON representation
Ludit is an interpreter for Ludi, a language meant to express and compute boolean algebra in the CLI.
- Host: GitHub
- URL: https://github.com/matiasvlevi/ludit
- Owner: matiasvlevi
- License: mit
- Created: 2021-09-01T14:52:44.000Z (almost 4 years ago)
- Default Branch: dev
- Last Pushed: 2023-02-28T03:02:43.000Z (over 2 years ago)
- Last Synced: 2025-04-19T21:15:41.818Z (2 months ago)
- Topics: boolean, boolean-algebra, boolean-logic, logic-gates
- Language: TypeScript
- Homepage:
- Size: 657 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![]()
Boolean Algebra in the CLI
Install •
Documentation •
License
Ludit is an interpreter for Ludi, a language meant to express and compute boolean algebra in the CLI.Ludi allows you to generate truth tables and karnaugh tables.
Ludi Code Truth table
```python
def and = A * B
def or = A + Bor(and(A, !B), C)
```
Karnaugh
```python
def and = A * B
def or = A + Bor(and(A, !B), C) ~k
```
# Install
```
npm i -g ludit
```
(build from source for latest check `package.json`)##### Install the standard lib (Optional)
Run `./install.sh` as root
### Usage
Show help menu
```
ludit -h
```
Write boolean equations
```
ludit "A * 'B + 'A * B"
```
You can also run files with `-f`
```
ludit -f ./examples/project/main.ludi
```[Read the language documentation](https://github.com/matiasvlevi/ludit/blob/parser/DOCUMENTATION.md)
Syntax highlighting file for vim is provided under
```
.vim/ludi.vim
```