Code Monkey home page Code Monkey logo

magic.lambda.hyperlambda's Introduction

Magic Lambda Hyperlambda

This is the Hyperlambda parser and generator in Magic. More specifically, this project provides you with the following two slots.

  • [hyper2lambda] - Transforms a piece of Hyperlambda (text) to a lambda hierarchy.
  • [lambda2hyper] - Transforms a lambda hierarchy to Hyperlambda (text).

Using these slots, you can both easily create, serialize, and parse Hyperlambda to lambda, and vice versa. Below is an example of parsing a piece of text as Hyperlambda, for then to dynamically execute it afterwards.

.hl:@"log.info:""This was logged from a piece of text"""
hyper2lambda:x:-
eval:x:-

You can also reverse the process, such as the following illustrates.

.hl
   log.info:This is some example logging invocation
lambda2hyper:x:-/*

The above two slots, allows you to dynamically generate plain text from a lambda structure, and vice versa, allowing you to for instance persist execution objects and structured data into files, your database, or for that matter transmit it over the network to another machine, etc. Below is an example of dynamically loading a Hyperlambda file from disc, for then to execute it. Notice, in order to have the following snippet work, you'll need an actual file called "foo.hl" inside of your backend's "files/" folder.

io.file.load:/foo.hl
hyper2lambda:x:-
eval:x:-/*

3 lines of code, allowing you to dynamically load and execute Hyperlambda, tied to your C# code dynamically, using ISlot implementations, and Super Signals. Not too bad for 3 lines of code ...

Quality gates

  • Build status
  • Quality Gate Status
  • Bugs
  • Code Smells
  • Coverage
  • Duplicated Lines (%)
  • Lines of Code
  • Maintainability Rating
  • Reliability Rating
  • Security Rating
  • Technical Debt
  • Vulnerabilities

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.