Code Monkey home page Code Monkey logo

leuchtkraft's Introduction

Leuchtkraft

Leuchtkraft is a declarative logical Programming Language with absolutely minimal dependencies. A basic Leuchtkraft program might look like this:

// Logic Clauses
forall X
    bird(X) and healthy(X) => canfly(X) // Healthy birds can fly
    canfly(X) => healthy(X)             // Things that fly are healthy
    wounded(X) and healthy(X) => false  // Things can't both be healthy and wounded

// Facts
true => bird(john) and bird(mary) and bird(jane) // john, mary and jane are birds
true => wounded(john) // john is wounded
true => healthy(jane) // jane is healthy

// Conclusions
X? => canfly(john) => X? // False (john is not a healthy bird)
Y? => canfly(mary) => Y? // Indeterminate (mary's health is unknown)
Z? => canfly(jane) => Z? // True (jane is a healthy bird)

Check out my blog post for more information on how to use Leuchtkraft.

Installation

From crates.io

cargo install leuchtkraft

From source

git clone https://github.com/Wuelle/Leuchtkraft
cd Leuchtkraft
cargo install --path .

Execute leuchtkraft --help for basic usage information.

Road Map

In order or priority:

  • Custom zero-clone parser
  • Logic resolver
  • Awesome build warnings/errors
  • WASM app for testing
  • REPL
  • Var-level unknowns (canfly(X?))
  • Compiler and (if we feel really fancy) JIT

Syntax Highlighting

I only include vim scripts because if you are not using vim, are you really a programmer?

Copy the highlighting script (le.vim) to the ~/.vim/syntax/le.vim.
Then create ~/.vim/ftdetect/le.vim and write au BufRead,BufNewFile *.le set filetype=le to it to associate .le files with leuchtkraft scripts.

leuchtkraft's People

Contributors

wuelle avatar

Stargazers

 avatar  avatar

Watchers

 avatar

leuchtkraft's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.