Merge branch 'master' of github.com:h3rald/hex
h3rald h3rald@h3rald.com
Sat, 30 Nov 2024 13:09:54 +0000
2 files changed,
134 insertions(+),
0 deletions(-)
A
.github/workflows/ci.yml
@@ -0,0 +1,30 @@
+name: CI + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [ master ] + pull_request: + branches: [ master ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "ci" + ci: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + - name: Build + run: make + + - name: Test + run: make test
A
web/templates/index.html
@@ -0,0 +1,104 @@
+<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>hex programming language</title> + <style> + html { + margin: 0; + padding: 0; + font-size: 12px; + line-height: 16px; + } + body { + margin: 1rem; + padding: 0; + font-family: Monospace; + font-size: 1rem; + background-color: black; + color: white; + } + + h1, h2, h3 { + margin: 1rem 0 0.5rem 0; + font-size: 1rem; + font-weight: 700; + } + + header { + white-space: pre-wrap; + margin: 0; + } + + header h1 { + display: inline; + margin: 0; + } + + footer { + font-size: 80%; + text-align: center; + margin: auto; + } + + a { + color: lime; + text-decoration: underline; + } + + a:visited { + color: limegreen; + } + + a[href^=http] { + text-decoration-style: dashed; + } + + strong { + font-weight: 600; + } + + em { + font-style: italic; + } + + li { + margin: 0.5rem 0; + } + </style> +</head> +<body> + <header> + _*_ _ + / \<h1><a href="/">hex</a></h1>\* programming language + *\_/_/_/ + * + </header> + <nav> + <a href="/get-started">Get Started</a> | + <a href="/manual">Manual</a> | + <a href="/play">Play</a> | + <a href="/changelog">Changelog</a> | + <a href="/about">About</a> + </nav> + <article> + <h2>Welcome</h2> + <p>Welcome to the <strong>hex</strong> programming language.</p> + <p><strong>hex</strong> is a tiny minimalist, concatenative, stack-based and slightly-esoteric programming language that can run on many platforms (including <a href="/play">the browser</a>) and can be used as an embedded language, to create shell scripts, or simply to learn more about concatenative programming.</p> + <p>Its syntax is heavily inspired by the <a href="https://min-lang.org">min</a> programming language, and features space-separated tokens, no unnecessary punctuation characters, and round brackets to delimit lists.</p> + <h2>Features</h2> + <ul> + <li>Support <strong>32bit integers</strong>, <em>written only in hexadecimal format</em>, both positive and negative (represented via <a href="https://en.wikipedia.org/wiki/Two%27s_complement">two's complement</a>), <strong>strings</strong>, and <strong>quotations</strong> (lists).</li> + <li><strong>64 native symbols</strong> implementing simple arithmetic, boolean logic, bitwise operations, comparison of integers, read/write from/to stdin/stdout/stderr, read and write files, execute external processes, work with quotations and strings, create and delete user symbols (variables), error handling, and manipulate the stack.</li> + <li>Fully <strong>homoiconic</strong> (everything is data).</li> + <li>Includes a simple <strong>REPL</strong>.</li> + <li>Includes an integrated <strong>help system</strong>.</li> + <li>Implemented as <strong>a single <a href="https://github.com/h3rald/hex/blob/master/hex.c">.c file</a> and a single <a href="https://github.com/h3rald/hex/blob/master/hex.h">.h file</a></strong>, making it easier to embed in other programs and port to different platforms.</li> + </ul> + </article> + <footer> + © 2024 Fabio Cevasco + </footer> +</body> +</html>