Giter Site home page Giter Site logo

rdash99 / bs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bslang/bs

0.0 0.0 0.0 1.17 MB

Implementation of the BS language as created by Mark Rendle at BuildStuff.lt 2014. Refer to this repo for information and canonical list of language features

F# 100.00%

bs's Introduction

BS

Implementation of the BS language as created by Mark Rendle at BuildStuff.lt 2014

BS is a general purpose Gradually typed language which can and should be used for building absolutely everything absolutely all the time.

  • BS Hates programmers
  • Booby trapped aztec temple pit of fail
  • Programs must be edited and saved using Microsoft Word (2003)
  • Compiles to ECMAScript3

Watch the talk, recorded at SkillsMatter

##Example program

#define /^my (.*?) thing:$/class \1:/
my Greeter thing:
  public function __construct(€name)
      HALT_AND_CATCH_FIRE
    (unless €name !=== null);
    €this->name = €name;
    Delete €name;

  public function say(€thing isProbablyA String)
    echo €thing, « », €this->name, BS::EOL;
    Delete €thing;

##Language Features

  • Significant whitespace
  • Significant formatting
  • 17 bit integers
  • Variables must be prefixed by €
  • Variable hoisting from all scopes
  • Exception handling - BS has only one exception - HALT_AND_CATCH_FIRE
  • Raise exceptions conditionally with (unless <condition>)
  • String processing:
    • ' ' Single quotes for ASCII strings
    • '' '' Double single quotes for ANSI strings
    • " " Double quotes
    • "" "" Double double quotes
    • « » European quotes are used for UTF-256
    • «« »» Double european quotes used for UTF-256 with string interpolation
  • Mandatory Comments - at the end of every line, demarked by 5 spaces
  • Optionally end statements with ;
  • unless statements must be terminated with ;
  • Regex Aliasing - #define
  • Line numbers are mandatory, and must increment in steps of 42

bs's People

Contributors

markrendle avatar mteinum 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.