GithubHelp home page GithubHelp logo

vein-lang / vein Goto Github PK

View Code? Open in Web Editor NEW
47.0 4.0 6.0 11.1 MB

🔮⚡️Vein is an open source high-level strictly-typed programming language with a standalone OS, arm and quantum computing support.

Home Page: https://vein-lang.org

License: Other

C# 87.93% Shell 1.05% PowerShell 0.40% LLVM 1.43% C 1.09% Rust 8.09% Batchfile 0.01%
language virtual-machine research-project arm64 quantum-computing arm32 machine-learning cli programming-language jit interpreter

vein's Introduction

Logo

Vein

stars

Documentation   •   Issues   •   Roadmap   •   Contributing

What is Vein?

Vein is under active development. We're working on more complete std and integration with multiple part of life. And at the moment we are stabilizing the state of the compiler and the set of language features

Vein is an all-in-one language for quantum computing and general purpose apps.

Install

View install docs

#[windows]
irm "https://vein-lang.org/install.ps1" | iex
#[macOS/Linux]
curl -fsSL https://vein-lang.org/install.sh | bash 

License

Vein Lang is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.

Check LICENSE files for more information.

vein's People

Contributors

0xf6 avatar ancient-rune-ruler[bot] avatar code-maid avatar djelnar avatar jonasbn avatar urumo avatar zverguy 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  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vein's Issues

Implementation of Array

  • opcodes, NEWARR, LDLEN, STELEM_S, LDELEM_S
  • syntax, ast support
  • gc allocation
  • unit tests
  • il generation
  • optimization generator for value_types (static array initializer)
  • ast->il

Syntax conditional for statement

  • Proposed
  • Triage: Completed
  • Prototype: not started
  • Implementation: not started
  • Specification: not started

Syntax

public foo(obj: FooObject): void
{
   for (auto i = 0; i != 10; i++) when obj != null
       obj.Action(i);
}

Ishtar view (transformation result)

public foo(obj: FooObject): void
{
   if (obj != null)
   {
       for (auto i = 0; i != 10; i++) when 
           obj.Action(i);
    }
}

[EPIC] Quantum Computing

This issue will be a kind of collection of all necessary issues for the implementation of quantum computing

What is it? Quantum computing? 🤨

Yes, exactly!
Next in plans:

  • first of all, support for "operations" by syntax and compiler (#21)
  • next, support for running as a child processor of quantum processor emulator "MS Quantum Simulator"
  • So, in future, when expansion cards appear (PCIeX128 😃), add support for cross-process interaction with a QPU and CPU.

Issues list:

Used-defined aspects

  • Proposed
  • Triage: Completed
  • Prototype: in process
  • Implementation: not started
  • Specification: not started

define custom aspect

public aspect customAspect(arg1: String, arg2: String);

[customAspect("foo", "bar")]
public fn(): void {}

std api for reflection of custom aspect

[customAspect("foo", "bar")]
public FooMethod(): void 
{
    auto aspect = getType(this)
              .getMethod(nameof(FooMethod))
              .getAspects()
              .first()
              .as<customAspect>();
    
    Out.println(aspect.arg1); // "foo"
    Out.println(aspect.arg2); // "bar"
}

Ishtar view (transformation result)

[aspect]
public class customAspect: vein/lang/Aspect
{
    public new(arg1: String, arg2: String): this
    { 
        // ...
    }
}

[EPIC] Threading

This issue will be a kind of collection of all necessary issues for the implementation of Threading and ThreadManagementLibrary parts.

Plans:

  • implementation of Synchronization сontext in Ishtar kernel
  • implementation of base threading api in corlib (thread.start, thread.stop and etc)
  • implementation of sync api in corlib (monitor.enter, monitor.impulse, semaphore and etc)
    Optional plans:
  • implementation async\await threading.
  • implementation parallel coroutine threading.

Issues list:

vein build task (i.e. custom build script)

<project sdk="Ishtar.SDK.Standalone">
    <target>project_name</target>
    <packages>
        <ref name="corlib, 1.0.0.0"/>
    </packages>
    <tasks>
        <task src="./scripts/copy.csx" name="copy">
        <task src="./scripts/sign.csx" name="sign">
    <tasks/>
</project>

call task:

veinc run copy
veinc run sign

Can't import React

Describe the bug
import React from 'react' doesn't work.

To Reproduce
Try to import React

** Code To Reproduce **

import React from 'react'

Expected behavior
React being imported.

Platform (please complete the following information):

  • (required) OS: MacOS 11.4
  • (optional) VSCode Version: 1.57.1

Additional context
I want pizza

[syntax] inline IL

  • Proposed
  • Triage: Completed
  • Prototype: not started
  • Implementation: not started
  • Specification: not started

Inline function aspect

aspect declaration

public aspect @inline();

syntax

public Mul(x: Int32, y: Int32): Int32
{
   return x * y;
}
[inline]
public Foo(x: Int32, y: Int32): Int32
{
   return Mul(x, y);
}
// call
public master(): Void
{
    Foo(2, 3);
}

Ishtar view (transformation result)

public master(): Void
{
    Mul(2, 3);
}

Sync-method syntax support

  • Proposed
  • Triage: Completed
  • Prototype: not started
  • Implementation: not started
  • Specification: not started

define sync in method declaration

public class Foo
{
   public sync fn(): void 
   { } 
}

Ishtar view (transformation result)

// non-static variant
public class Foo
{
   public fn(): void 
   { 
        Synchronicity.For(this);
        try
        {
            // ...
        }
        finally
        {
            Synchronicity.Release(this);
        }
   } 
}
// static variant
public static class Foo
{
   private static guarder: Object = new Object();
   public static fn(): void 
   { 
        Synchronicity.For(guarder);
        try
        { 
            // ...
        }
        finally
        {
            Synchronicity.Release(guarder);
        }
   } 
}

Syntax support for quantum operation

EPIC: #20

  • Proposed
  • Triage: Completed
  • Prototype: not started
  • Implementation: not started
  • Specification: not started

define quantum operation in code

#use "mana/lang/quantum"

operation Teleportation(): Unit
{
    body
    {
       auto msg = QPU.AllocCleared();
       auto p1 = QPU.AllocCleared();
       auto p2 = QPU.AllocCleared();
       
       {.H p1};
       {.CNOT p1, p2};
       
       if ({.MRZ msg} == One}
           {.Z p2};
       if ({.MRZ p1} == One)
           {.X p2}

       auto result = QPU.Measure(p2);       
       QPU.Reset(p2);
       return result;
    }
    gc auto;
    sync auto;
    control auto;
}

Ishtar view (transformation result)

TODO

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.