Skip to content

Commit

Permalink
Gleam -- Add stub (#482)
Browse files Browse the repository at this point in the history
* init gleam
* init ignore
* add links in relevant places
* Added the start of the readme and the test checkout workflow
* See if the pink heart with stars will render in gh? (they do!)
* Name the gleam colours
* Pick the palette for gleam
* Fix link to addr the new img
  • Loading branch information
Skenvy authored Mar 17, 2024
1 parent 6357807 commit 3bf6166
Show file tree
Hide file tree
Showing 19 changed files with 337 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ body:
description: Which Language's Implementation was the bug found in?
options:
- C#
- Gleam
- Go
- Java
- JavaScript
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ body:
options:
- ALL/ANY
- C#
- Gleam
- Go
- Java
- JavaScript
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/security-vulnerability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ body:
- OTHER
- GitHub Actions
- C#
- Gleam
- Go
- Java
- JavaScript
Expand Down
2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ updates:
directory: "/C#"
schedule:
interval: monthly
# Gleam has no supported ecosystem _itself_ but might be alerted via a mix/hex
# setup, as mix for elixir is supported, and gleam uses the same hex pkg host.
- package-ecosystem: gomod
directory: "/go"
schedule:
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/gleam-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Gleam 💖⭐💖 Tests 🦂
on:
push:
branches-ignore:
- 'main'
paths:
- 'gleam/**'
- '!gleam/**.md'
- '!gleam/.vscode/**'
- '.github/workflows/gleam-*'
pull_request:
branches:
- 'main'
paths:
- 'gleam/**'
- '!gleam/**.md'
- '!gleam/.vscode/**'
- '.github/workflows/gleam-*'
schedule: # 9AM on the 15th
- cron: 0 22 14 1,2,3,10,11,12 * # AEDT Months
- cron: 0 23 14 4,5,6,7,8,9 * # AEST Months
workflow_call:
permissions: {}
defaults:
run:
shell: bash
working-directory: gleam
env:
development_gleam_version: 1
jobs:
quick-test:
name: Gleam 💖⭐💖 Quick Test 🦂
if: ${{ github.event_name == 'push' && !(github.event.ref == 'refs/heads/main') }}
runs-on: ubuntu-latest
steps:
- name: 🏁 Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3 changes: 3 additions & 0 deletions .meta/banners/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ While the above would be ideal, it turns out that GitHub doesn't render a lot of
## Palettes
### C#
\#TODO
### Gleam
[Gleam's Branding](https://gleam.run/branding/) "All pretty and pink 💖". They list "Gleam's favourite colours":
`#ffaff3` Faff Pink, `#fefefc` White, `#a6f0fc` Unnamed Blue, `#fffbe8` Aged Plastic Yellow, `#584355` Unexpected Aubergine, `#292d3e` Underwater Blue, `#2f2f2f` Charcoal, `#1e1e1e` Black, `#151515` Blacker.
### Go
[Brand and Trademark Usage Guidelines](https://go.dev/brand) and [Go's New Brand](https://go.dev/blog/go-brand). A [go themed slide deck](https://go.dev/s/presentation-theme). And a [brand book](https://go.dev/s/brandbook).
[Brand book v1.9.5](https://go.dev/assets/go-brand-book-v1.9.5.pdf) includes several colours; primary Gopher Blue `#00ADD8`, Light Blue `#5DC9E2`, Aqua `#00A29C`, and for a high contrast background black `#000000`. There are two "secondary colours" Fuchsia `#CE3262` and Yellow `#FDDD00`. There are several un-named "More colours"; a darker aqua `#00758D`, a grey `#555759`, a dark purple `#402B56`, and a light grey `#DBD9D6`.
Expand Down
2 changes: 2 additions & 0 deletions .meta/banners/modifications/EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
``` # TODO
<p align="center"><img alt="Banner Image, Collatz Coral" src="https://raw.githubusercontent.com/wiki/Skenvy/Collatz/.meta/banners/modifications/_CSharp.png" width=830 height=666/></p>
```
## Gleam
<p align="center"><img alt="Banner Image, Collatz Coral" src="https://raw.githubusercontent.com/wiki/Skenvy/Collatz/.meta/banners/modifications/_Gleam.png" width=830 height=666/></p>

## Go
<p align="center"><img alt="Banner Image, Collatz Coral" src="https://raw.githubusercontent.com/wiki/Skenvy/Collatz/.meta/banners/modifications/_Go.png" width=830 height=666/></p>
Expand Down
18 changes: 18 additions & 0 deletions .meta/banners/modifications/rgba_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@
##### C# #####
# TODO

##### Gleam #####
'Gleam Faff Pink': (255, 175, 243, 255), #ffaff3
'Gleam White': (254, 254, 252, 255), #fefefc
'Gleam Unnamed Blue': (166, 240, 252, 255), #a6f0fc
'Gleam Aged Plastic Yellow': (255, 251, 232, 255), #fffbe8
'Gleam Unexpected Aubergine': (88, 67, 85, 255), #584355
'Gleam Underwater Blue': (41, 45, 62, 255), #292d3e
'Gleam Charcoal': (47, 47, 47, 255), #2f2f2f
'Gleam Black': (30, 30, 30, 255), #1e1e1e
'Gleam Blacker': (21, 21, 21, 255), #151515

##### Go #####
# Primary
'Gopher Blue': (1, 173, 216, 255), #00ADD8
Expand Down Expand Up @@ -155,6 +166,12 @@
# (1, {_['COLOUR NAME']: 6}),
# ]

_GLEAM_PALETTE = [
(6, {_['Gleam Faff Pink']: 8, _['Gleam White']: 1, _['Gleam Charcoal']: 1}),
(3, {_['Gleam Unnamed Blue']: 1, _['Gleam Underwater Blue']: 1, _['Gleam Unexpected Aubergine']: 1}),
(1, {_['Gleam Black']: 4, _['Gleam Blacker']: 2, _['Gleam Aged Plastic Yellow']: 4}),
]

_GO_PALETTE = [
(6, {_['Gopher Blue']: 6, _['Go Light Blue']: 3, _['Go Aqua']: 1}),
(3, {_['Go Fuchsia']: 5, _['Go Yellow']: 5}),
Expand Down Expand Up @@ -243,6 +260,7 @@

PALETTES = {
# 'CSharp': _CSHARP_PALETTE, # TODO
'Gleam': _GLEAM_PALETTE,
'Go': _GO_PALETTE,
'Java': _JAVA_PALETTE,
'JavaScript': _JAVASCRIPT_PALETTE,
Expand Down
8 changes: 5 additions & 3 deletions .meta/contributing/Adding_a_new_languge.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ touch <language>/.gitignore
touch <language>/Makefile
touch <language>/.demo/.gitignore
touch <language>/.demo/Makefile
mkdir -p <language>/.vscode
touch <language>/.vscode/extensions.json
cp LICENSE <language>/LICENSE
echo "# Devlog" > <language>/devlog.md
touch <language>/README.md
Expand All @@ -17,7 +19,7 @@ touch <language>/README.md
* Add a `* [<Language>](https://github.com/Skenvy/Collatz/blob/main/<language>/devlog.md)` to the main [devlog's devlog list](https://github.com/Skenvy/Collatz/blob/main/devlog.md#devlogs).
* Add a `- <Language>` to each input with `label: Implementation Language` under the [ISSUE_TEMPLATE](https://github.com/Skenvy/Collatz/tree/main/.github/ISSUE_TEMPLATE) folder.
---
## Add to the `<language>/readme`
## Add to the `<language>/README.md`
Any section can be reasonably extended with more example, but this represents the prefered minimum. Can be search+replace'd on:
* `<Language>` (case dependent)
* `<language>` (case dependent)
Expand All @@ -32,7 +34,7 @@ Any section can be reasonably extended with more example, but this represents th
* `<deps-dev-link>` (link on [deps.dev](https://deps.dev/)) -- which is not relevant to all languages
````md
# [Collatz](https://github.com/Skenvy/Collatz): [<Language>](https://github.com/Skenvy/Collatz/tree/main/<language>) <language-emojis>
<p align="center"><img alt="Banner Image, Collatz Coral" src="https://raw.githubusercontent.com/wiki/Skenvy/Collatz/.meta/banners/modifications/XYZ.png" width=830 height=666/></p>
<p align="center"><img alt="Banner Image, Collatz Coral" src="https://raw.githubusercontent.com/wiki/Skenvy/Collatz/.meta/banners/modifications/_<Language>.png" width=830 height=666/></p>
<sub><p align="center"><i>
<a href="https://github.com/Skenvy/Collatz/blob/main/.meta/banners/README.md">Colourised Collatz Coral</a>; derived from this
<a href="https://twitter.com/Gelada/status/846751901756653568">original by Edmund Harriss</a>
Expand Down Expand Up @@ -77,4 +79,4 @@ All entries into lists are in alphabetical order.
<p align="center"><img alt="Banner Image, Collatz Coral" src="https://raw.githubusercontent.com/wiki/Skenvy/Collatz/.meta/banners/modifications/_<Language>.png" width=830 height=666/></p>
```
- Run `.meta/banners/modifications/img.py` to generate the new image (and or regenerate older ones if they have changed).
- All changesto `.meta/banners`, including the new image, should be copied (except the `.gitignore`) across to the `Collatz.wiki` repo and pushed there, before the PR for the new language is ready.
- All changes to `.meta/banners`, including the new image, should be copied (except the `.gitignore`) across to the `Collatz.wiki` repo and pushed there, before the PR for the new language is ready.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ The list of implementations, where the externally hosted package lives, where th
| Code | External Pkg | GitHub Pages | Internal Pkg |
| :--- | :--- | :--- | :--- |
| [C#](https://github.com/Skenvy/Collatz/tree/main/C%23) | **#TODO** | **#TODO** | **#TODO** |
| [Gleam](https://github.com/Skenvy/Collatz/tree/main/gleam) | **#TODO** | **#TODO** | _N/A_ |
| [Go](https://github.com/Skenvy/Collatz/tree/main/go) | [pkg.go.dev](https://pkg.go.dev/github.com/Skenvy/Collatz/go) | [GoDoc](https://skenvy.github.io/Collatz/go/)+[Cover](https://skenvy.github.io/Collatz/go/coverage.html) | _N/A_ |
| [Java](https://github.com/Skenvy/Collatz/tree/main/java) | [mvn-central](https://search.maven.org/artifact/io.github.skenvy/collatz) | [Site](https://skenvy.github.io/Collatz/java/)+[JavaDoc](https://skenvy.github.io/Collatz/java/apidocs/io/github/skenvy/package-summary.html) | [mvn-gh](https://github.com/Skenvy/Collatz/packages/1445255) |
| [JavaScript](https://github.com/Skenvy/Collatz/tree/main/javascript) | [npm](https://www.npmjs.com/package/@skenvy/collatz) | [TSDoc+TypeDoc](https://skenvy.github.io/Collatz/javascript) | [npm-gh](https://github.com/Skenvy/Collatz/pkgs/npm/collatz) |
Expand Down
1 change: 1 addition & 0 deletions devlog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
The aim is to package as close to as the same functionality as possible across a range of languages, both as a way to be authoritative about "collatz packages" and as a learning opportunity in several languages I have not worked in before, and to serve as a future example for packaging in multiple languages.
## Devlogs
* [C#](https://github.com/Skenvy/Collatz/blob/main/C%23/devlog.md)
* [Gleam](https://github.com/Skenvy/Collatz/blob/main/gleam/devlog.md)
* [Go](https://github.com/Skenvy/Collatz/blob/main/go/devlog.md)
* [Java](https://github.com/Skenvy/Collatz/blob/main/java/devlog.md)
* [JavaScript](https://github.com/Skenvy/Collatz/blob/main/javascript/devlog.md)
Expand Down
Empty file added gleam/.demo/.gitignore
Empty file.
Empty file added gleam/.demo/Makefile
Empty file.
35 changes: 35 additions & 0 deletions gleam/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
################################################################################
# https://github.com/github/gitignore/blob/main/Erlang.gitignore
# < there is no "gleam" ignore file present, so take common beam ones for now.
################################################################################
.eunit
*.o
*.beam
*.plt
erl_crash.dump
.concrete/DEV_MODE

# rebar 2.x
.rebar
rel/example_project
ebin/*.beam
deps

# rebar 3
.rebar3
_build/
_checkouts/

################################################################################
# https://github.com/github/gitignore/blob/main/Elixir.gitignore
################################################################################
/_build
/cover
/deps
/doc
/.fetch
erl_crash.dump
*.ez
*.beam
/config/*.secret.exs
.elixir_ls/
Empty file added gleam/.vscode/extensions.json
Empty file.
Loading

0 comments on commit 3bf6166

Please sign in to comment.