All Projects → senselogic → CIBYL

senselogic / CIBYL

Licence: GPL-3.0 license
Lightweight curly-bracket language which compiles to Ruby and Crystal.

Programming Languages

d
599 projects
crystal
512 projects
ruby
36898 projects - #4 most used programming language
HTML
75241 projects
shell
77523 projects

Projects that are alternatives of or similar to CIBYL

bootstrap-starter-template
Bootstrap Starter Template for Brackets
Stars: ✭ 33 (-26.67%)
Mutual labels:  brackets
MatrixLib
Lightweight header-only matrix library (C++) for numerical optimization and machine learning. Contact me if there is an exciting opportunity.
Stars: ✭ 35 (-22.22%)
Mutual labels:  lightweight
Translucide
CMS efficient, léger, simple à prendre en main, customisable et écoconçu !
Stars: ✭ 31 (-31.11%)
Mutual labels:  lightweight
Rakkit
🌐 A framework written in TypeScript that provides REST/GraphQL API and Websocket tools to build amazing server-side applications
Stars: ✭ 32 (-28.89%)
Mutual labels:  lightweight
jeelizGlanceTracker
JavaScript/WebGL lib: detect if the user is looking at the screen or not from the webcam video feed. Lightweight and robust to all lighting conditions. Great for play/pause videos if the user is looking or not, or for person detection. Link to live demo.
Stars: ✭ 68 (+51.11%)
Mutual labels:  lightweight
hornbill
基于uri的 node mvc框架,适用于前后端分离服务
Stars: ✭ 22 (-51.11%)
Mutual labels:  lightweight
d2launcher
Diablo II • Median XL • Mod Launcher for Linux
Stars: ✭ 20 (-55.56%)
Mutual labels:  lightweight
neon
Neon is a modern VueJS design library built with Typescript and SASS
Stars: ✭ 19 (-57.78%)
Mutual labels:  lightweight
rust-xoodyak
Xoodyak, a lightweight and versatile cryptographic scheme implemented in Rust.
Stars: ✭ 28 (-37.78%)
Mutual labels:  lightweight
lunar-client-qt
Lightweight launcher for lunar client
Stars: ✭ 166 (+268.89%)
Mutual labels:  lightweight
brackets-zurb-foundation
This Brackets extension adds the Zurb Foundation basic template to an empty new file.
Stars: ✭ 30 (-33.33%)
Mutual labels:  brackets
sgo
A simple, light and fast Web framework written in Go.
Stars: ✭ 75 (+66.67%)
Mutual labels:  lightweight
enkan
An explicit and simple Java framework
Stars: ✭ 70 (+55.56%)
Mutual labels:  lightweight
XYFSnowAnimation
A category of NSTimer for showing 3D Fluttered animation for iOS, which is used very simply. Lightweight CALayer animation, core animation, 3D transform, performance safety. iOS 3D三维飘落下雪落花动画,轻量级CALayer图层动画,核心动画,3D形变,性能安全,定时器NSTimer分类,直接使用,很简单
Stars: ✭ 15 (-66.67%)
Mutual labels:  lightweight
lwjson
Lightweight JSON parser for embedded systems
Stars: ✭ 66 (+46.67%)
Mutual labels:  lightweight
plexydesk
Lightweight Desktop Manager for Gnu/Linux and FreeBSD - Ideal for Low resource computers
Stars: ✭ 33 (-26.67%)
Mutual labels:  lightweight
Microfutures
Lightweight implementation of Futures that shares a similar subscription interface with RxSwift.
Stars: ✭ 38 (-15.56%)
Mutual labels:  lightweight
today-web
😐 A Java library for building web applications
Stars: ✭ 33 (-26.67%)
Mutual labels:  lightweight
got
An enjoyable golang test framework.
Stars: ✭ 234 (+420%)
Mutual labels:  lightweight
GLGame
A Tiny 2D OpenGL based C++ Game Engine that is fast, lightweight and comes with a level editor.
Stars: ✭ 49 (+8.89%)
Mutual labels:  lightweight

Cibyl

Lightweight curly-bracket language which compiles to Ruby and Crystal.

Description

Cibyl allows to develop Ruby and Crystal applications with a C-like syntax :

// Recursive Fibonacci function

def fibonacci(
    n : Int32
    )
{
    if ( n <= 1 )
    {
        return n;
    }
    else
    {
        return fibonacci( n - 1 ) + fibonacci( n - 2 );
    }
}

puts fibonacci( 8 );

Optionally, Cibyl allows to use other case conventions :

require "http/server";

server = HTTP::SERVER.New
    do | context |
    {
        context.Response.ContentType = "text/plain";
        context.Response.Print( "Hello world! The time is #{TIME.Now}" );
    }

address = server.BindTcp( 8080 );
Puts( "Listening on http://#{address}" );
server.Listen();

Syntax

Most of the Ruby/Crystal syntax is kept unchanged, except that :

  • .cb files contain Cibyl code
  • .ecb files contain embedded Cibyl code
  • blocks start by a { line and end by a } line
  • do blocks start their own lines
  • short comments start by //
  • long comments start by /* and end by */
  • <%~ %> blocks apply HTML.escape to their content

If the --convert option is used :

  • $ prefixes are converted to @@
  • PascalCase identifiers are converted to snake_case
  • UPPER_CASE identifiers are converted to PascalCase
  • PascalCase identifiers prefixed with # are converted to UPPER_CASE
  • snake_case identifiers prefixed with # are converted to PascalCase

Characters and identifiers prefixed with \ are kept unchanged.

Limitations

  • Blocks must be properly aligned.
  • Multi-line strings are not supported.
  • Curly bracket blocks can't be used in embedded code.

Installation

Install the DMD 2 compiler (using the MinGW setup option on Windows).

Build the executable with the following command line :

dmd -m64 cibyl.d

Command line

cibyl [options] INPUT_FOLDER/ OUTPUT_FOLDER/

Options

--ruby : generate Ruby files
--crystal : generate Crystal files
--replace dictionary.txt : replace identifiers defined in this dictionary
--convert : convert the identifier case
--join : join split statements
--compact : remove unused lines
--create : create the output folders if needed
--watch : watch the Cibyl files for modifications
--pause 500 : time to wait before checking the Cibyl files again
--tabulation 4 : set the tabulation space count

Examples

cibyl --ruby --compact CB/ RB/

Converts the Cibyl files of the input folder into matching Ruby files in the output folder.

cibyl --crystal --create --watch CB/ CR/

Converts the Cibyl files of the input folder into matching Crystal files in the output folder (creating the Crystal folders if needed), then watches the Cibyl files for modifications.

cibyl --crystal --replace dictionary.txt --convert --join --create --watch CB/ CR/

Converts the Cibyl files of the input folder into matching Crystal files in the output folder (replacing the identifiers defined in the dictionary, converting the identifier case, joining split statements and creating the Crystal folders if needed), then watches the Cibyl files for modifications.

Version

1.3

Author

Eric Pelzer ([email protected]).

License

This project is licensed under the GNU General Public License version 3.

See the LICENSE.md file for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].