Skip to content

A Ruby-inspired programming language that compiles to JavaScript

Notifications You must be signed in to change notification settings

mostypc123/ducki

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Duck Programming Language

A Ruby-inspired programming language that compiles to JavaScript

Quick Start

Installation

# Clone the repository
git clone https://github.com/mostypc123/duck.git

# Navigate to compiler directory
cd duck/compiler

# No need to install dependencies

Your First Duck Program

  1. Create a file hello.duck:
mainfunc;
    console "Hello Duck!";
end;
  1. Run it:
npm run compile -- --run hello.duck

Features

  • 🎯 Ruby-inspired syntax for JavaScript ecosystem
  • 🚀 Direct compilation to JavaScript
  • 📦 Support for JavaScript libraries (WIP)
  • 🔍 Built-in run support
  • 🛠️ Type declarations
  • 🌈 Simple and expressive function syntax

Usage

Compilation Options

# Just compile
npm run compile yourfile.duck

# Compile and run (method 1)
npm run compile-run yourfile.duck

# Compile and run (method 2)
npm run compile -- --run yourfile.duck

JavaScript Libraries (WIP)

Duck supports importing any JavaScript library:

import express {app};  // NPM packages
import fs {fileSystem}; // Node.js built-ins

Note: While you can import any JavaScript library, full functionality depends on implementing corresponding Duck language features.

Examples

Check out examples/ directory for sample programs, including:

  • hello_world.duck - Basic hello world
  • More examples coming soon!

Development Status

Duck is currently in early development. Features being worked on:

  • Enhanced type system
  • Array support
  • Object support
  • More control structures

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Acknowledgments

  • Inspired by Ruby's elegant syntax
  • Built with Node.js

Got questions? Found a bug? Open an issue!

About

A Ruby-inspired programming language that compiles to JavaScript

Resources

Stars

Watchers

Forks

Packages

No packages published