Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gh actions #3

Merged
merged 6 commits into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Darkmatter X Community
url: https://twitter.com/i/communities/1727990925480079392
about: Please ask and answer usage-related questions here.
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/issue_bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Bug report
about: Our code behaves incorrectly?
title: ''
labels: bug
assignees: ''

---

<!--
**Double-check**

* Is this *really* a bug?
- If the behavior is documented, but you disagree with it, please do file an issue, but as a "Design consideration," not a "Bug report."
- If you don't understand why something behaves the way it does, consider asking on [Discussions](https://github.com/darkmatter-lang/darkmatter/discussions).
* Is the problem not in some third-party library, not in [Darkmatter](https://github.com/darkmatter-lang/darkmatter/issues)?
- Example: you write for Android, and your code works properly on most devices, but for a couple of them, it fails. Then please direct this to Google and/or the manufacturer of your device.
* Maybe you're using some ancient version, and the problem doesn't happen with the latest releases of the compiler and the library?
-->

**Describe the bug**

What happened? What should have happened instead?

**Provide a Reproducer**

* If possible, please provide a small self-contained project (or even just a single file) where the issue reproduces.
* If you can't pinpoint the issue, please provide at least *some* project where this reproduces, for example, your production one. If you are not ready to show the project publicly, we are open to discussing the details privately.
* If you really can't provide any code, please do still open an issue. This may prompt other people to chime in with their reproducers.
67 changes: 67 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: build

on:
push:
branches:
- master
pull_request:

jobs:
build:
name: "Build: ${{ matrix.config.name }} / ${{ matrix.config.platform }}"
runs-on: ${{ matrix.config.os }}

strategy:
fail-fast: true
matrix:
config:
- { name: "Windows Latest", os: windows-latest, platform: x64 }
- { name: "Ubuntu Latest", os: ubuntu-latest, platform: x64 }
- { name: "macOS 11", os: macos-11, platform: x64 }
- { name: "macOS Latest", os: macos-latest, platform: arm64 }

steps:
- uses: actions/checkout@v3
- name: Set up OpenJDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Cache Maven dependencies
uses: actions/cache@v2
with:
path: |
~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/*.xml') }}
restore-keys: |
${{ runner.os }}-maven-

- name: Assemble
run: mvn install

unit-test:
name: Unit Test
runs-on: ubuntu-latest
needs: [ build ]

steps:
- uses: actions/checkout@v3

- name: Set up OpenJDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Cache Maven dependencies
uses: actions/cache@v2
with:
path: |
~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/*.xml') }}
restore-keys: |
${{ runner.os }}-maven-

- name: Run Unit Test
run: mvn test
65 changes: 47 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[![build](https://img.shields.io/github/actions/workflow/status/darkmatter-lang/darkmatter/ci.yml?branch=master)](https://github.com/darkmatter-lang/darkmatter/actions/workflows/ci.yml)
[![license](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

# Darkmatter

A programming language from another universe.
Expand All @@ -6,8 +9,6 @@ This is the official darkmatter compiler/linker, it outputs LLVM IR (IL-ASM) and

Darkmatter language adopts a flat-style texture of a blackhole as its official logo and adopts the color `#00FFFF` (cyan) as its "language color."



I wanted to write a language that was just that, a language.
Some languages these days claim to be "more efficient" by abreviating things,
however, I find that to make the code confusing and messy.
Expand All @@ -16,12 +17,9 @@ As even Rust-lang states, most time is spent reading code and refactoring it rat

So the intent with this language is to be readable and easy to understand.




The darkmatter compiler also has a `-I` immediate-interpretation mode which will evaluate the code within the JVM.

### Roadmap
## Roadmap

Syntax
- [ ] Unsigned primitives
Expand Down Expand Up @@ -57,25 +55,21 @@ Package Manager (`tesseract`)
- [ ] Read `project.toml`


### Specification
## Specification

- Directly compiled language, no JIT.
- Can output a static/shared library (.so/.dll/.dylib) or executable (ELF/PE/MACH-O).
- Similar to Java/C# syntax.
- RAII (no Garbage Collector)?



#### In the darkmatter language, all variables are:
### In the darkmatter language, all variables are:

- Statically typed.
- Immutable by default.

## Logging


### Logging

#### Logging Levels
### Logging Levels

The default logging levels are as follows:
- `TRACE` Most verbose, all debug messages will be shown including internal process states.
Expand All @@ -84,16 +78,51 @@ The default logging levels are as follows:
- `WARN` Only warning messages will be shown along with errors.
- `ERROR` Strictly only error messages will be shown.


#### Console Logging
### Console Logging

Console logging is always enabled but can be limited to only showing certain messages tagged with specific severities such as `WARN` OR `ERROR`.

This is by-design.


#### File Logging
### File Logging

File logging can be enabled by either passing in a valid file path as to where logs will be stored, by setting the environment variable `LOG_FILE` to a valid path, or by configuring this via the Java API.

## Getting Help

Are you having trouble with Darkmatter? We want to help!

- If you are upgrading, read the release notes for upgrade instructions and "new and noteworthy" features.

- Ask a question we monitor stackoverflow.com for questions tagged with darkmatter. You can also talk with the community on X.

- Report bugs with Darkmatter at [https://github.com/darkmatter-lang/darkmatter/issues](https://github.com/darkmatter-lang/darkmatter/issues).

- Join the Discussion on X and be part of the community [https://twitter.com/i/communities/1727990925480079392](https://twitter.com/i/communities/1727990925480079392)

## Reporting Issues

Darkmatter uses GitHub’s integrated issue tracking system to record bugs and feature requests. If you want to raise an issue, please follow the recommendations below:

- Before you log a bug, please search the issue tracker to see if someone has already reported the problem.

- If the issue doesn’t already exist, create a new issue.

- Please provide as much information as possible with the issue report. We like to know the Darkmatter version, operating system etc you’re using.

- If you need to paste code or include a stack trace, use Markdown. ``` escapes before and after your text.

- If possible, try to create a test case or project that replicates the problem and attach it to the issue.

## Contributors

The following contributors have either helped to start this project, have contributed
code, are actively maintaining it (including documentation), or in other ways
being awesome contributors to this project. **We'd like to take a moment to recognize them.**

[<img src="https://github.com/anthonywww.png?size=72" alt="anthonywww" width="72">](https://github.com/anthonywww)
[<img src="https://github.com/mjovanc.png?size=72" alt="mjovanc" width="72">](https://github.com/mjovanc)

## License

The MIT License.
7 changes: 7 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,13 @@
<artifactId>log4j-core</artifactId>
<version>2.20.0</version>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.10.1</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
7 changes: 7 additions & 0 deletions src/test/java/me/anthonyw/darkmatter/ParserTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package me.anthonyw.darkmatter;

import static org.junit.jupiter.api.Assertions.*;

class ParserTest {

}
Loading