GithubHelp home page GithubHelp logo

vimlord / lomda Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 0.0 548 KB

An interpreted programming language with mathematical functionality.

License: MIT License

C++ 99.94% Makefile 0.06%
programming-language interpreter calculus higher-order-functions type-inference

lomda's Introduction

Lomda

Lomda is a mathematically inspired programming language designed to be easily readable and mathematically useful. The language is able to implicitly perform a number of operations, ranging from addition to differential calculus. It also comes with a type system that can be used to verify some of the safety of the language.

A primarily motivation of the programming language was to enable easy implementations of machine learning algorithms. In particular, the differential operator enables simple gradient descent.

Installation

As Lomda runs on a C++ backend, you will require g++11 to compile the source. On a Unix-based system, the source can be built using make. Simply run it in the main directory to generate the lomda executable.

To test Lomda, you can run the interpreter with the test flag. That is,

$ ./lomda -t

Usage

Lomda offers the ability to run either as a line-by-line interpreter or as an executor. The following are supported usages of the executable:

$ ./lomda
$ ./lomda source.lom

Without a source file, Lomda will initialize the interpreter and prompt for a program or an exit command. The interpreter will look something like this:

$ ./lomda
Lomda 1.0.1
Compiled May  9 2018 @ 20:11:11
Enter a program and press <enter> to execute, or one of the following:
'exit' - exit the interpreter
'q/quit' - exit the interpreter
>

If you see the prompt, then you can begin typing in programs to execute. If you are unfamiliar with the syntax, feel free to consult the wiki.

Docs

For information regarding usage of the interpreter, please consult the wiki. It features information on usage of the interpreter on the command line, as well as instructions regarding how to utilize the syntax of the language.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Credits

Lomda was created by Christopher Hittner

lomda's People

Contributors

vimlord avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lomda's Issues

Patch memory leaks

In the test cases, there are memory leaks. These should be fixed.

  • Interpreter
  • Type system

Differential Algebraic Datatypes (DADTs)

DADTs are meant to be an extension of Algebraic Datatypes (ADTs) that support the differential operator.

  • Syntax
  • Operational semantics
  • Differential semantics
  • Typing rules/inference
  • Test cases

Docs

  • Improve README
  • Improve Wiki
  • Code documentation required
  • Ability to comment in Lomda programs

Module Improvements

  • Module caching
  • Extracting specific items from module (from X import Y)
  • Multiple import syntax (import A as B, C as D, ...)

Memory leak in dictionary typing

Even on empty dictionaries, there are issues with memory leaks. It looks like the Trie is not being deleted. There's also some lacking collection of iterators. Explore and find leaks.

Implement Standard Libraries

Entering this item, there are several string functions available. However, there are other libraries that need to be added.

  • Algorithms (sorting, etc.)
  • File I/O
  • System functions (argv, etc.)
  • Extra math functions (linalg, random)

Test Cases

  • Improvements to evaluation test cases
  • Type system cases

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.