{"id":15713584,"url":"https://github.com/charly-lang/charly","last_synced_at":"2025-04-13T12:25:08.706Z","repository":{"id":70301365,"uuid":"68742983","full_name":"charly-lang/charly","owner":"charly-lang","description":"🐈 The Charly Programming Language | Written by @KCreate","archived":false,"fork":false,"pushed_at":"2020-03-23T21:01:02.000Z","size":2737,"stargazers_count":200,"open_issues_count":14,"forks_count":10,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-03-26T13:49:37.086Z","etag":null,"topics":["crystal","interpreter","programming-language","repl"],"latest_commit_sha":null,"homepage":"https://charly-lang.github.io/charly/","language":"Crystal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/charly-lang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-09-20T18:48:44.000Z","updated_at":"2025-01-28T03:41:39.000Z","dependencies_parsed_at":"2023-04-15T01:31:08.527Z","dependency_job_id":null,"html_url":"https://github.com/charly-lang/charly","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charly-lang%2Fcharly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charly-lang%2Fcharly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charly-lang%2Fcharly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charly-lang%2Fcharly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/charly-lang","download_url":"https://codeload.github.com/charly-lang/charly/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246162091,"owners_count":20733350,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crystal","interpreter","programming-language","repl"],"created_at":"2024-10-03T21:32:17.087Z","updated_at":"2025-03-29T08:31:37.820Z","avatar_url":"https://github.com/charly-lang.png","language":"Crystal","funding_links":[],"categories":["Compilers and Interpreters"],"sub_categories":["Educational and Toy Projects"],"readme":"[![Build Status](https://travis-ci.org/charly-lang/charly.svg?branch=master)](https://travis-ci.org/charly-lang/charly)\n[![Version](https://img.shields.io/badge/Version-0.3.0-green.svg)](https://github.com/charly-lang/charly/releases/tag/v0.3.0)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/charly-lang/charly/blob/master/LICENSE)\n\n\u003cimg align=\"right\" alt=\"Charly\" width=\"150\" src=\"res/charly.png\" /\u003e\n\n---\n### Warning: This project is no longer being actively maintained. You can find the new project at [KCreate/charly-vm](https://github.com/KCreate/charly-vm)\n---\n\n# The Charly programming language\n\nCharly is a dynamic, weakly-typed multi-paradigm programming language.\nThis repository contains a [Crystal](https://crystal-lang.org/) implementation of the language.\n\n# Motivation and Goals\n\nI've always been interested in the development and design of new programming languages.\nThis is my first try at writing an actual language. My primary goal was to learn how to teach\na machine what my language looks like and what it should do.\nBased on the experiences I've made while working on Charly, I now feel comfortable\nto experiment with lower-level technology such as virtual machines or compilers.\n\nThis implementation uses a tree-based execution model, which is (as opposed to a bytecode interpreter) rather\ntrivial to implement. Given that I never took any classes or read any books about this topic,\nit was the easiest way for me to put up a working language. Charly might well switch to a bytecode-interpreter\nin the future, but only once I've gathered enough experience to feel comfortable with writing a virtual-machine\nfor it.\n\n\u003e If you're interested in writing your own programming language, I've compiled a list of resources\nyou may find useful.\n\n- [Compiler Design with Alex Aiken from Stanford](https://www.youtube.com/playlist?list=PLFB9EC7B8FE963EB8)\n- [The Crystal Compiler](https://github.com/crystal-lang/crystal/tree/master/src/compiler)\n- [Implementing Languages by Christopher Pitt](https://www.youtube.com/playlist?list=PLDjkcYOLgGdggfm9uVaopOueu1EheD4aN)\n- [Writing a virtual machine by Terence Parr](https://www.youtube.com/watch?v=OjaAToVkoTw)\n\n# Syntax and language guide\n\nVisit the [website](https://charly-lang.github.io/charly) for an introduction to the language.\n\n# Installation\n\n1. Install [Crystal](https://crystal-lang.org)\n2. Clone this repo with `git clone https://github.com/charly-lang/charly`\n3. Run `install.sh`\n\nYou will be prompted for your admin password (used to copy to `/usr/local/bin`).\n\nAfter that you need to set the `CHARLYDIR` environment variable. Just add the following line to your\n`.bashrc`, `.zshrc`, etc. Replace the path with the path to the Charly source code (e.g The path to the git repo).\n\n```bash\nexport CHARLYDIR=~/GitHub/charly-lang/charly\n```\n\nYou can also build the interpreter via the following command:\n\n```bash\n$ mkdir bin\n$ crystal build src/charly.cr --release -o bin/charly\n```\n\nThis will place the executable in the `bin` folder.\n\n# OS Support\n\nI'm developing on macOS 10.12 so it should work without any problems on that.\nThe [CI Build](https://travis-ci.org/charly-lang/charly) runs on Ubuntu 12.04.5 LTS.\n\n# CLI options\n\n```\n$ charly -v\nCharly 0.3.0 [bb5b857] (15. March 2017)\n$ charly -h\nUsage: charly [filename] [flags] [arguments]\n    -f FLAG, --flag FLAG             Set a flag\n    -h, --help                       Print this help message\n    -v, --version                    Prints the version number\n    --license                        Prints the license\n\nFlags:\n    ast                              Display the AST of the userfile\n    dotdump                          Dump dot language displaying the AST\n    tokens                           Display tokens of the userfile\n    lint                             Don't execute after parsing (linting)\n\n53 internal methods are loaded\n```\n\n# Using the built-in REPL\n\n```\n$ charly repl\n\u003e 2 + 2\n4\n\u003e \"test\"\ntest\n\u003e $ * 4\ntesttesttesttest\n\u003e func increment(a) { a + 1 }\nFunction\n\u003e increment(25)\n26\n\u003e print(\"hello world\")\nhello world\nnull\n\u003e .exit\n```\n\nIf you need to pass arguments or flags to a REPL session you can do so via the repl command\n```bash\n$ charly repl these are all arguments\n\u003e ARGV\n[these, are, all, arguments]\n```\n\n# [License](https://github.com/charly-lang/charly/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharly-lang%2Fcharly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharly-lang%2Fcharly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharly-lang%2Fcharly/lists"}