Giter VIP home page Giter VIP logo

nemo's Introduction

nemo logo

fish by -stache-

Using

Warning! nemo is in pre-pre-alpha, everything may change at a moment's notice or stop working at all. You can build nemo with cargo:

$ git clone https://github.com/nemo-lang/nemo
$ cd nemo
$ rustup override set nightly # nemo requires nightly Rust to build
$ cargo build

You can start the REPL by either passing no arguments or the --repl flag to nemo:

$ ./target/debug/nemo # --repl is optional

You can run a file by passing its name as an argument:

$ ./target/debug/nemo example.nemo

Examples

See the examples directory for some example nemo programs.

License

nemo is UNLICENSED.

nemo's People

Contributors

bookowl avatar nathanprocks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

nathanprocks

nemo's Issues

Comments

The syntax for comments will be

# This is a comment

Nemo should focus on coroutines, not pipes.

I originally created nemo to see what a language that provided high level support for piping would be like. I believe that is has succeed in this aim and taught me several things.

Pipes are good, but coroutines are better.

Coroutines are much more general than pipes and allow several different styles of organizing code. Pipes are very specific, and can be easily created with coroutines.

I believe nemo would be a much better and more useful language if it makes working with async code using coroutines as easy as sync code, while still being fast.

Similar things should be similar, and different things should be different

Despite nemo not being a functional (as in the paradigm), I have tried to make much of its syntax functional. This made things unnecessarily confusing. I'm going to try to make the syntax more traditional in places where the language is like other languages, but still keep the new stuff different.

The source should be simple, yet fast.

pub fn eval<'a, 'b>(ast: &'a Expr, env: ProtectedEnv, this: Arc<Mutex<queue::Consumer<Value>>>, next: Arc<Mutex<queue::Producer<Value>>>) -> Result<Value, Error<'b>> {}

nemo's current source code is complex and not very fast compared to things like bytecode VMs and JITs. #7 can be fixed as part of this.

The solution

I believe that the best way to fix this is to redesign nemo with an eye towards coroutines and async code, and completely rewrite the source.

Better piping

Currently nemo uses threads and queues to implement piping. This isn't a very good solution for several reasons.

  1. Threads are heavy, and spawning a new thread for each part of a pipeline can't be very efficient.
  2. The order different parts of the pipeline are run in can't be controlled.

A single threaded solution would be much better. I've tried coroutines, but I can't get the code to work right without segmentation faults.

Implementing Foreign Modules

The current module system you have works fine if you want to make functions with the standard library. But what about implementing new features, such as creating HTTP requests?

I am aware that this language is not fully developed and more of a project than an actual language, so this is not really an issue as much as it is an inquiry: how would you implement foreign modules into your language?

Modules

If nemo is going to be useable for anything serious, it needs modules.

There will be two types of modules:

  1. Rust modules. These will be written in Rust and dynamically loaded using libloading
  2. nemo modules. These will be written in nemo.

The distinction will only be in the interpreter, not to nemo code.

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.