Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/kneorain/helix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ze7111 committed Feb 19, 2024
2 parents d6e8de5 + 6c8642b commit 3f14ef7
Show file tree
Hide file tree
Showing 94 changed files with 20,001 additions and 432 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
84 changes: 84 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '26 18 * * 4'

jobs:
analyze:
name: Analyze
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners
# Consider using larger runners for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
# required for all workflows
security-events: write

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
language: [ 'python' ]
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
34 changes: 17 additions & 17 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ and subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").

Certain owners wish to permanently relinquish those rights to a Work for
the purpose of contributing to a commons of creative, cultural and
the purpose of contributing to a commons of creative, cultural, and
scientific works ("Commons") that the public can reliably and without fear
of later claims of infringement build upon, modify, incorporate in other
works, reuse and redistribute as freely as possible in any form whatsoever
works, reuse, and redistribute as freely as possible in any form whatsoever
and for any purposes, including without limitation commercial purposes.
These owners may contribute to the Commons to promote the ideal of a free
culture and the further production of creative, cultural and scientific
culture and the further production of creative, cultural, and scientific
works, or to gain reputation or greater distribution for their Work in
part through the use and efforts of others.

Expand All @@ -49,27 +49,27 @@ iii. publicity and privacy rights pertaining to a person's image or
likeness depicted in a Work;
iv. rights protecting against unfair competition in regards to a Work,
subject to the limitations in paragraph 4(a), below;
v. rights protecting the extraction, dissemination, use and reuse of data
v. rights protecting the extraction, dissemination, use, and reuse of data
in a Work;
vi. database rights (such as those arising under Directive 96/9/EC of the
European Parliament and of the Council of 11 March 1996 on the legal
protection of databases, and under any national implementation
thereof, including any amended or successor version of such
directive); and
vii. other similar, equivalent or corresponding rights throughout the
vii. other similar, equivalent, or corresponding rights throughout the
world based on applicable law or treaty, and any national
implementations thereof.

2. Waiver. To the greatest extent permitted by, but not in contravention
of, applicable law, Affirmer hereby overtly, fully, permanently,
irrevocably and unconditionally waives, abandons, and surrenders all of
irrevocably, and unconditionally waives, abandons, and surrenders all of
Affirmer's Copyright and Related Rights and associated claims and causes
of action, whether now known or unknown (including existing as well as
future claims and causes of action), in the Work (i) in all territories
worldwide, (ii) for the maximum duration provided by applicable law or
treaty (including future time extensions), (iii) in any current or future
medium and for any number of copies, and (iv) for any purpose whatsoever,
including without limitation commercial, advertising or promotional
including without limitation commercial, advertising, or promotional
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
member of the public at large and to the detriment of Affirmer's heirs and
successors, fully intending that such Waiver shall not be subject to
Expand All @@ -82,18 +82,18 @@ be judged legally invalid or ineffective under applicable law, then the
Waiver shall be preserved to the maximum extent permitted taking into
account Affirmer's express Statement of Purpose. In addition, to the
extent the Waiver is so judged Affirmer hereby grants to each affected
person a royalty-free, non transferable, non sublicensable, non exclusive,
irrevocable and unconditional license to exercise Affirmer's Copyright and
person a royalty-free, non-transferable, non-sublicensable, non-exclusive,
irrevocable, and unconditional license to exercise Affirmer's Copyright and
Related Rights in the Work (i) in all territories worldwide, (ii) for the
maximum duration provided by applicable law or treaty (including future
time extensions), (iii) in any current or future medium and for any number
of copies, and (iv) for any purpose whatsoever, including without
limitation commercial, advertising or promotional purposes (the
limitation commercial, advertising, or promotional purposes (the
"License"). The License shall be deemed effective as of the date CC0 was
applied by Affirmer to the Work. Should any part of the License for any
reason be judged legally invalid or ineffective under applicable law, such
partial invalidity or ineffectiveness shall not invalidate the remainder
of the License, and in such case Affirmer hereby affirms that he or she
of the License, and in such case, Affirmer hereby affirms that he or she
will not (i) exercise any of his or her remaining Copyright and Related
Rights in the Work or (ii) assert any associated claims and causes of
action with respect to the Work, in either case contrary to Affirmer's
Expand All @@ -102,20 +102,20 @@ express Statement of Purpose.
4. Limitations and Disclaimers.

a. No trademark or patent rights held by Affirmer are waived, abandoned,
surrendered, licensed or otherwise affected by this document.
surrendered, licensed, or otherwise affected by this document.
b. Affirmer offers the Work as-is and makes no representations or
warranties of any kind concerning the Work, express, implied,
statutory or otherwise, including without limitation warranties of
title, merchantability, fitness for a particular purpose, non
infringement, or the absence of latent or other defects, accuracy, or
statutory, or otherwise, including without limitation warranties of
title, merchantability, fitness for a particular purpose, non-infringement,
or the absence of latent or other defects, accuracy, or
the present or absence of errors, whether or not discoverable, all to
the greatest extent permissible under applicable law.
c. Affirmer disclaims responsibility for clearing rights of other persons
that may apply to the Work or any use thereof, including without
limitation any person's Copyright and Related Rights in the Work.
Further, Affirmer disclaims responsibility for obtaining any necessary
consents, permissions or other rights required for any use of the
consents, permissions, or other rights required for any use of the
Work.
d. Affirmer understands and acknowledges that Creative Commons is not a
party to this document and has no duty or obligation with respect to
this CC0 or use of the Work.
this CC0 or use of the Work.
124 changes: 124 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# Helix
## An experimental language to interop with Python, C, C++, and Rust
<p align="center">
| <a href="#introduction">Why?</a> |
<a href="#table-of-contents">Goals</a> |
<a href="#project-status">Status</a> |
<a href="#goals">Goals</a> |
<a href="#getting-started">Getting started</a> |
</p>

## Introduction
Helix is an experimental language designed for seamless interoperability with Python, C, C++, and Rust. The project aims to provide developers with a fast, efficient, and easy-to-use language that can leverage the power of existing code and libraries in these languages. With its clean syntax and robust features, Helix aims to simplify the process of writing and maintaining code while maximizing performance.

---
<div>
<img src="assets/example_1.png" width="450" align="right"
alt="Code Example">
</a>
<a href="#"><img src="assets/bumper.png"></a>
</div>

**Fast and Interoperable**
- Helix offers high performance and interoperability with Python, C, C++, and Rust, allowing developers to seamlessly integrate code from these languages.
- Developers can leverage existing libraries and codebases while benefiting from Helix's simplicity and efficiency.
- With a focus on speed and efficiency, Helix enables developers to write fast and efficient code with ease.

**Simple and easy to use**
- Helix features a clean and intuitive syntax, making it easy for developers to write and understand code.
- The language prioritizes simplicity and readability, ensuring that developers can quickly grasp its concepts and write maintainable code.

**Rich Feature Set**
- Helix provides a rich set of features including variables, functions, control flow, data types, classes, and more.
- Support for advanced language constructs such as generics, inheritance, and operator overloading is planned, further enhancing Helix's versatility.
- The language aims to strike a balance between power and simplicity, offering developers the tools they need without unnecessary complexity.


<img src="assets/example_3.png" width="450"
alt="Code Example">
</a>

## Project status
Helix is currently in the early stages of development, with a target for a working prototype by March 2024. The project encompasses various aspects, including language implementation, features, and syntax.

As of now, the project has the following structure and features:

#### Language Implementation
- [x] Lexer
- [x] Parser
- [x] Abstract Syntax Tree (AST)
- [x] Error Handling
- [ ] Type Checking
- [ ] Transpiler

#### Language Features
- [ ] Variables
- [x] Functions
- [ ] Control Flow
- [ ] Data Types
- [x] Classes
- [x] Generics
- [x] Inheritance
- [ ] Operator Overloading
- Interop:
- [ ] Python
- [ ] C
- [ ] C++
- [ ] Rust
- [ ] Standard Library
- [ ] Package Manager
- [ ] Documentation
- [ ] Testing
- [ ] Benchmarking
- [ ] Profiling
- [ ] Debugging
- [x] Error Handling
- [ ] Memory Management
- [ ] Concurrency

#### Language Syntax
- [x] Comments
- [x] Variables
- [x] Functions
- [x] Control Flow
- [x] Data Types
- [x] Classes
- [x] Inheritance
- [x] Operator Overloading
- [x] Interop

The project is actively being developed, with ongoing work to implement remaining features and enhance existing functionality. Contributions and feedback are welcomed as we progress towards the goal of creating a powerful and versatile language.

## Goals
The Helix project aims to achieve the following goals:

- **Interoperability**: Helix will provide seamless interoperability with Python, C, C++, and Rust, allowing developers to integrate code from these languages with ease.
- **Performance**: The language will prioritize speed and efficiency, enabling developers to write fast and efficient code without sacrificing simplicity.
- **Simplicity**: Helix will feature a clean and intuitive syntax, making it easy for developers to write and understand code.
- **Rich Feature Set**: The language will offer a rich set of features including variables, functions, control flow, data types, classes, and more, providing developers with the tools they need to write powerful code.
- **Documentation**: Helix will provide comprehensive documentation to help developers learn the language and make the most of its features.
- **Testing and Benchmarking**: The project will include robust testing and benchmarking tools to ensure the reliability and performance of the language.
- **Community Involvement**: The Helix project will encourage community involvement, welcoming contributions, feedback, and collaboration to help improve the language.
- **Standard Library**: Helix will include a standard library with a wide range of functions and modules to support common programming tasks.
- **Package Manager**: The language will feature a package manager to help developers discover, install, and manage third-party libraries and tools.
- **Debugging and Profiling**: Helix will provide tools for debugging and profiling code to help developers identify and fix issues and optimize performance.
- **Memory Management**: The language will include memory management features to help developers manage memory efficiently and avoid memory leaks and other issues.
- **Concurrency**: Helix will support concurrency to enable developers to write efficient, parallel code for multi-core and distributed systems.
- **Error Handling**: The language will provide robust error handling features to help developers write reliable and resilient code.

---

# Getting started
To get started with Helix, you can follow the steps below:

1. Clone the Helix repository from GitHub:
```bash
git clone https://github.com/kneorain/helix
```
2. Navigate to the project directory:
3. Install the required dependencies:
```bash
pip install -r requirements.txt
```

> **Warning:** Helix is currently in the early stages of development and is not yet ready for production use. The project is under active development, and breaking changes may occur. We recommend using Helix for experimental purposes only and providing feedback to help improve the language.
Binary file modified __pycache__/globals.cpython-312.pyc
Binary file not shown.
Binary file modified __pycache__/headder.cpython-312.pyc
Binary file not shown.
Binary file added assets/bumper.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/example_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/example_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/example_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/helix-0.0.1-alpha.k.zip
Binary file not shown.
Binary file added build/helix-0.0.1-alpha.l.zip
Binary file not shown.
Binary file added build/helix-0.0.1-alpha.m.zip
Binary file not shown.
Binary file added build/helix-0.0.1-alpha.n.zip
Binary file not shown.
Binary file added build/helix-0.0.1-alpha.o.zip
Binary file not shown.
Binary file added build/helix-0.0.1-alpha.p.zip
Binary file not shown.
Binary file added build/helix-0.0.1-alpha.q.zip
Binary file not shown.
Binary file added build/helix-0.0.1-alpha.r.zip
Binary file not shown.
Binary file added build/helix-0.0.1-alpha.s.zip
Binary file not shown.
Binary file added build/helix-0.0.2-alpha.j.zip
Binary file not shown.
Binary file added build/helix-0.0.2-alpha.o.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 2 additions & 0 deletions build_rev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
0.0.2-alpha.p
1212
Binary file added cache/find_keyword.cache
Binary file not shown.
Binary file removed cache/normalize_tokens.cache
Binary file not shown.
Binary file removed cache/shared.data
Binary file not shown.
Loading

0 comments on commit 3f14ef7

Please sign in to comment.