Coder Social home page Coder Social logo

mdg / leema Goto Github PK

View Code? Open in Web Editor NEW
44.0 44.0 1.0 4.17 MB

A functional programming language designed for concurrency and failure

Home Page: http://leema.org

License: Apache License 2.0

Makefile 0.07% Rust 97.34% Python 2.55% Shell 0.04%
functional-programming programming-language virtual-machine

leema's People

Contributors

felixzhuologist avatar itscomputers avatar mdg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

itscomputers

leema's Issues

make enums work

enums don't work right now. partly they're in stasis until generics can be worked out for structs. but once that's done, enums should be restored.

BigInt type for Leema

Leema needs a bigint type for doing fun math stuff with big numbers
Rug seems like the most likely, partly b/c it's build on old gnu stuff. The other alternative might be rust-num/big-in which appears to be entirely in Rust.

Allow defining specialized overrides of generic functions

If a generic function is defined to do something, allow a version to be defined that overrides that specific type. C++ does this, have it be something like that.

func foo[T](a: T): T >>
   <whatever>...
--
func foo[Int](a: Int): Int >>
   <something else>
--

add closures to leema

Need to be able to make and return closures.
These will be also be used in asynchronous forks.

Still need to work out some of the syntax. Maybe something like:

func make_inc(): Int => Int ->
   fn(x) -> x + 1 --
--

or in the alternative model described in #16

func make_inc: Int -> Int
>>
   fn(x) >> x + 1 --
--

func make_inc_short: Int -> Int
>>
   fn(x) x + 1
--

rename cout to be print

cout is good for people who know C++ but is confusing for people who don't. rename it to just be print

Leema needs subtype polymorphism

Add interfaces that define functions.
Allow the interfaces to be implemented for specific datatypes.
Allow function parameters and struct fields to be specified as the interface type.

Need to work out the syntax for all of this still. Probably go w/ interface keyword to define them.

leema needs a function to sort lists

lists cannot be sorted right now. that's no good. need to add a function that can sort lists.
add a list::sort() function in src/leema/list.rs and then add a leema wrapper for it in src/leema/prefab.rs and add the declaration in T/prefab.lma

also include a test for it in T/test_list.lma or something.

memcache client library for leema

leema needs a memcache client. Using an existing Rust library is fine as long as it's using async I/O and doesn't block the main process.

leema needs an HTTP server library

Leema is meant to be useful as a web language. Won't be very successful at that without an HTTP server library.

I tried integrating hyper already but it's designed to only do stuff in callbacks. It's really hard to read the request and send a response separately.

add domain types

Domain types (in leema) are type aliases that can only be aliased in one direction. They are to be used when constraining the values of a type to a particular, domain-specific subset of the values otherwise allowed by the type.

For example, imagine a domain type for a zip code that is aliased to a string. Once you create a zip code, you can pass it to a function that takes a string. But if you have a function that takes a zip code, you cannot pass it a string without first explicitly converting it to a zip code type.

This might function similarly to an implicit cast operator in C++.
https://en.cppreference.com/w/cpp/language/cast_operator

leema needs an http client library

leema needs an http client library for calling to APIs and web services and whatnot.
and to run an http client server test.
probably easiest to use the hyper client library.

add currying to leema

seems like adding closures #19 might be easier if I add currying first and use that to implement closures.

still need to work out the syntax.

leema pegs the CPU

even when it's not doing anything, leema still pegs the CPU. it should pause more and hang out if it's not doing work.
the current plan is if there's nothing to do for 2 or more consecutive iterations, then sleep for a bit before trying again.

pushed blocks don't autodrop

When compiling and typechecking, a block of scope can be pushed onto the stack. But the programmer has to remember to pop it off when done. These scopes should be automatically popped using the Drop trait.

leema/src/leema/infer.rs

Lines 389 to 392 in 2f4e240

pub fn push_block(&mut self, failures: HashMap<String, Ast>)
{
self.blocks.push(Blockscope::new(failures));
}

allow multiple paths for libary code

Right now leema can only find library code in one directory. This causes problems when doing things like running unit tests.

Expected: it should allow searching code in multiple directories.

No way to declare types explicitly

Sometimes we want to be explicit the type of a particular variable. Currently there's no way to do this.

Expected: This should be possbile. Probably best to just use the Rust syntax for it with a colon and the type after the let's LHS. Like...

let empty: [Int] := []

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.