Coder Social home page Coder Social logo

timibolu / blade Goto Github PK

View Code? Open in Web Editor NEW

This project forked from blade-lang/blade

0.0 0.0 0.0 19.45 MB

A simple, clean, and embeddable dynamic programming language created to be simple enough for beginners, yet powerful and expressive for professionals.

Home Page: https://bladelang.com

License: Other

Shell 0.05% C 90.91% Assembly 3.75% Makefile 0.15% CMake 0.24% Blade 4.90%

blade's Introduction

Blade Logo

Blade Programming Language

Build Status Gitter License Coverage Status Version

Blade is a simple, clean, and embeddable dynamic programming language created to be simple enough for beginners, yet powerful and expressive for professionals. It has a very small syntax set with a very low learning curve. Blade improves upon the best features of JavaScript, Python, and Ruby to give developers a familiar and powerful system that feels native for developers coming from any of these languages and an easy way to leverage the strength of any.

Blade also comes with Nyssa, the official package manager, which makes it easy to install and manage packages and modules.

Features

  • First-class package management: Package management is built into the language module system.
  • Iterable classes: Blade has built-in support for iterable classes, making it easy to work with collections of data.
  • Backend development: Blade can be used for backend development without any external dependencies.
  • Function promotion: Blade allows for function promotion, making it easy to reuse any piece of code from an imported module.
  • Default exports and imports: Blade supports default exports and imports, making it easy to organize code.
  • Anonymous functions: Blade supports anonymous functions, making it easy to write functional code.
  • Access modifiers: Unlike any of JavaScript, Python and Ruby, Blade supports access modifiers for variables, properties, functions, classes, modules, etc.
  • Decorator functions: Blade supports decorator functions, making it easy to add functionality to existing code.
  • Function overrides: Blade supports function overrides in classes, allowing a class to choose the result to return for a function if the function allows it.
  • Easy to extend with C modules: Blade supports external extensions built in C, making it easy to extend the language with C modules.

Use Cases

Blade can be used for a wide range of tasks, including:

  • Web development: Blade can be used to create web applications and web services.
  • Data science: Blade can be used to perform data analysis and machine learning tasks.
  • Scripting: Blade can be used to write scripts to automate tasks.
  • And more...

Showcase

  • Nyssa: The Nyssa self-hostable repository server and package manager is written in Blade.
  • jsonrpc: A JSON-RPC library for Blade programming language.
  • wire: Dynamic HTML template engine.
  • tar: Pure Blade library for creating and extracting TAR archives.

Example

The following code implements a simple backend API that runs on port 3000:

import http
import json

var server = http.server(3000)
server.on_receive(@(request, response) {
  response.headers['Content-Type'] = 'application/json'
  response.write(json.encode(request))
})

echo 'Listening on Port 3000...'
server.listen()

How does it differ from Python and Ruby?

  • First-class package management (Package management is built into the language module system).
  • Iterable classes.
  • Backend development without any external dependencies.
  • Function promotion.
  • Default exports and imports.
  • Anonymous functions.
  • Access modifiers for variables, properties, function, class, modules, etc.
  • Decorator functions.
  • Function overrides in classes โ€” A class can chose the result to return for a function if the function allows it.
  • Easy to extend with C modules with a familiar API to Wren.

Installation

To install Blade, please follow the instructions in the Building guide.

Usage

To start using Blade, please refer to the Tutorial guide in the documentation.

API Documentaion

API documentation for Blade which is under active development can be found at bladelang.com.

Community

  • Join the conversation on Gitter

Contributing

Blade desire to make the community around it as friendly and welcoming as possible. Therefore, all forms of contributions from pull requests, suggestions, typo fixes in documentation, feature request, bug reports and any contribution at all is highly appreciated. Please refer to the Contributing guide for more information.

License

Blade is licensed under the 2-clause BSDL License.

blade's People

Contributors

brian3647 avatar galexite avatar mcfriend99 avatar

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.