An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

        


Ludit

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 + B

or(and(A, !B), C)
```

luditable

Karnaugh

```python
def and = A * B
def or = A + B

or(and(A, !B), C) ~k
```

luditable

# 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
```