Coder Social home page Coder Social logo

422404 / actorlang Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 34.97 MB

A small interpreted language for actor programming.

Home Page: https://actorlang.readthedocs.io/en/latest/

License: MIT License

ANTLR 1.12% Java 51.96% Kotlin 46.62% Shell 0.29%
programing-language interpreter actor-model

actorlang's Introduction

actorlang's People

Contributors

422404 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

actorlang's Issues

Add system properties

System properties would be a special kind of variables.
These variables would have qualified names using dots as separators as a convention.
They would allow to alter the system behavior or retrieve info about the system.

Example:

display @system.network.ipv4;
...
@system.events.logger = create Logger ("debug");

Add PoisonPill value

Add a PoisonPill literal value. When an actor retrieve a message with a PoisonPill value from its mailbox, the actor must stop any further messages processing.

Create a vscode language extension

The extension would enable syntax highlighting and running scripts from the editor.

For such an extension, we would need an LSP compliant language server (we could build one with LSP4J).

Features:

  • Syntax highlighting
  • Code completion
  • Run the currently opened script
  • Run scripts from the filesystem tree
  • Start registries
  • List all running scripts/registries in a tree view in a separate activity bar container
  • Add an output channel were the logs of the running instances would be outputted

Add collections

Add collections and built-in functions to manipulate them.

Example:

myList = newList();
listAdd(myList, 1337);
listRemove(myList, 1337);
if (listContains(myList, 42)) {
  ...
}
if (listEmpty(myList)) {
  ...
}

mySet = newSet();
...

myMap = newMap();
mapPut(myMap, "hello", 42);
mapGet(myMap, "hello");
mapRemove(myMap, "hello");
if (mapContains(myMap, "hello")) {
  ...
};
keys = mapKeys(myMap);
values = mapValues(myMap);

Add multi-process capability

Add the ability to run a registry were remote actors would be exported by scripts.

Example:

frontend.actor:

$x The x value
$y The y value
---

ResultPrinter () [result] = {
  display result;
  shutdown
};

printer = create ResultPrinter ();
send [$x, $y, printer] to remote "Compute/Sum"

backend.actor:

fun sum(x, y) = x + y;

SumBackend () [x, y, callback] = {
  send [sum(x, y)] to callback
};

backend = create SumBackend ();

bind backend to "Compute/Sum"

Run:

REGISTRY=127.0.0.1:8080
actorlang registry $REGISTRY &
actorlang run --registry $REGISTRY backend.actor &
actorlang run --registry $REGISTRY frontend.actor -x 20 -y 22
# Prints: 42

Add collection iteration

Add a way to iterate over the items of a collection.

Example:

for (a of newList(1, 2, 3)) {
    display a
}

[Security] Workflow quality-gates.yml is using vulnerable action eskatos/gradle-command-action

The workflow quality-gates.yml is referencing action eskatos/gradle-command-action using references v1. However this reference is missing the commit 6ff2065a1233a621be482a67cf97261047133d35 which may contain fix to the some vulnerability.
The vulnerability fix that is missing by actions version could be related to:
(1) CVE fix
(2) upgrade of vulnerable dependency
(3) fix to secret leak and others.
Please consider to update the reference to the action.

Add a way to implement the reaper pattern

Add a way to implement the Reaper Pattern without introducing complex functionalities to the language.
It could be done by adding these functionalities to the system:

Example:

Reaper (Actors) [dead] = {
  if (setContains(Actors, dead)) {
    setRemove(Actors, dead)
  }
  if (setEmpty(Actors)) {
    shutdown
  }
};

MyActor () ["display", str] = {
  display str;
  send [PoisonPill] to self
};

MyActor () ["start"] = {
  send ["display", "Hello, world!"] to self
};

actor = create MyActor ();
trackedActors = setNew();
setAdd(trackedActors, actor);
@system.events.reaper = create Reaper (trackedActors);

send ["start"] to actor

Add parameters to scripts

Add a way to pass arguments to a script.
We could introduce something like a parameter block that lists parameters and their usage.
The parameters usage would show up if the user requests the help of the script (e.g. with a --help switch).

Example:

$retryCount The number of time to retry ...
$timeout    The number of seconds before ...
---

Actor (RetryCount) ["hello", timeout] = {
  ...
};

myActor = create Actor ($retryCount);
send ["hello", $timeout] to myActor;

These libraries could be investigated:

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.