bybylang

BybyLang

BybyLang is a programming language developed by Byby, allowing you to control virtual hardware (APU, BUS, RAM, Pins) or generate Nim code for direct execution. BybyLang supports AOT compilation for fast executable generation.

_BybyLang là một ngôn ngữ lập trình do Byby phát triển, cho phép điều khiển phần cứng ảo hoặc sinh ra mã Nim thực thi trực tiếp. BybyLang hỗ trợ chế độ biên dịch AOT, giúp bạn sinh file thực thi nhanh chóng.

You can find bybylangjit in https://github.com/bobbydeveloper2014/bybylangjit | Bạn có thể tìm bybylangjit ở https://github.com/bobbydeveloper2014/bybylangjit

Main Features / Tính năng chính

Installation / Cài đặt

  1. Install Nim (recommended version: 2.2.x):
     curl https://nim-lang.org/choosenim/init.sh -sSf | sh
    
  2. Clone BybyLang repository:
     git clone https://github.com/bobbydeveloper2014/bybylang.git
     cd bybylang
    
  3. Run directly or build AOT:
     nim c -r bybylang.nim
    

Usage / Cách sử dụng

  1. Compile to Nim code and executable:
     ./bybylang main.bybylang --aot=output
    

    [--aot=output] will generate:

    • output.nim (Nim code generated from BybyLang)
    • output (Nim executable built with -d:release)
  2. Additional options / Tuỳ chọn thêm:
    • --ignore-errors: skip RAM/Pins errors
    • --quiet: no verbose log

Basic Syntax / Cú pháp cơ bản

Mode

function sayHello
  print "Hello, Byby!"

Coding Tips / Gợi ý viết code

Example BybyLang file (main.bybylang)

mode is 1
function sayHello
    print "Hello World"

apu mem write RAM0 with 5
apu tran print with "hello world"
tran pulse pin 3 width 2ns
call sayHello

BybyLang giúp bạn khám phá và điều khiển phần cứng ảo trực quan. Hãy thử nghiệm và khám phá sức mạnh của BybyLang!


Pull requests are very welcome! Thank you for visiting the project!