Skip to content

Commit

Permalink
Merge pull request #4 from FalsePattern/dev
Browse files Browse the repository at this point in the history
Merge dev to master
  • Loading branch information
FalsePattern authored Dec 22, 2022
2 parents 9d18fe0 + 9886d2e commit ad31e98
Show file tree
Hide file tree
Showing 62 changed files with 5,695 additions and 1,186 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Java CI
name: Build and Test

on: [push]

Expand All @@ -8,10 +8,14 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
with:
fetch-depth: 0

- name: Set up JDK 8
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'
java-version: '8'

- name: Build with Maven
run: mvn --batch-mode --update-snapshots package
run: mvn --batch-mode --update-snapshots verify
41 changes: 41 additions & 0 deletions .github/workflows/release-tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release tagged build

on:
push:
tags:
- '*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set release version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Set up JDK 8
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '8'
server-id: mavenpattern
server-username: MAVEN_DEPLOY_USER
server-password: MAVEN_DEPLOY_PASSWORD

- name: Build and Publish with Maven
run: mvn --batch-mode --update-snapshots deploy
env:
MAVEN_DEPLOY_USER: ${{ secrets.MAVEN_DEPLOY_USER }}
MAVEN_DEPLOY_PASSWORD: ${{ secrets.MAVEN_DEPLOY_PASSWORD }}

- name: Release under current tag
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ env.RELEASE_VERSION }}"
prerelease: false
title: "${{ env.RELEASE_VERSION }}"
files: target/*.jar
674 changes: 0 additions & 674 deletions COPYING

This file was deleted.

1 change: 1 addition & 0 deletions COPYING
15 changes: 0 additions & 15 deletions LICENSE

This file was deleted.

1 change: 1 addition & 0 deletions LICENSE
65 changes: 50 additions & 15 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,37 @@
A standard-conforming Funge-98 interpreter.

### Usage

`jfunge [file] [--3d] [--version] [--license]`

| argument | usage |
|----------------------|---------------------------------------------------------------------------------------------------------------------------------|
| `file` | The file to load into the interpreter |
| `--3d` | Enable 3D (Trefunge) mode. By default, the interpreter emulates 2D Befunge for compatibility. |
| `--version` | Prints the current program version, along with the handprint and version given by befunge's y instruction |
| `--license` | Prints the license of the program. |
| `--maxiter <number>` | The maximum number of iterations the program can run for. Anything less than 1 will run until the program terminates naturally. |
```
usage: jfunge [-f <file> | --help | --license | --version] [-i <file>]
[--maxiter <iterations>] [-o <file>] [--syscall] [-t] [--trefunge]
JFunge, a Funge98 interpeter for java.
-f,--file <file> The file to load into the interpreter at the origin
on startup.
--help Displays this help page
-i,--readperm <file> Enables read access to the specified file or
directory (i instruction). Specify / to allow read
access to every file on the system (dangerous). Can
specify multiple files/folders.
--license Prints the license of the program.
--maxiter <iterations> The maximum number of iterations the program can
run for. Anything less than 1 will run until the
program terminates by itself. Default is unlimited.
-o,--writeperm <file> Enables write access to the specified file or
directory (o instruction). Specify / to allow write
access to every file on the system (dangerous). Can
specify multiple files/folders.
--syscall Enables the syscall feature (= instruction). This
is a very dangerous permission to grant, it can
call any arbitrary program on your system.
-t,--concurrent Enables the Concurrent Funge extension (t
instruction). Buggy programs can potentially
forkbomb the interpreter.
--trefunge Enable 3D (Trefunge) mode. By default, the
interpreter emulates 2D Befunge for compatibility.
--version Prints the current program version, along with the
handprint and version given by befunge's y
instruction.
```

### Compatibility

Expand All @@ -30,13 +51,27 @@ The interpreter supports the following Funge-98 specification extensions:
- Optional Trefunge mode (experimental)

Additionally, the following fingerprints are currently supported (more to come):
- [MODE](https://catseye.tc/view/funge-98/library/MODE.markdown)
- [MODU](https://catseye.tc/view/funge-98/library/MODU.markdown)
- [NULL](https://catseye.tc/view/funge-98/library/NULL.markdown)
- [ROMA](https://catseye.tc/view/funge-98/library/ROMA.markdown)
- [3DSP](http://rcfunge98.com/rcsfingers.html#3DSP)
- [FPSP](http://rcfunge98.com/rcsfingers.html#FPSP)
- [HRTI](./docs/catseye/library/HRTI.markdown)
- [MODE](./docs/catseye/library/MODE.markdown)
- [MODU](./docs/catseye/library/MODU.markdown)
- [NULL](./docs/catseye/library/NULL.markdown)
- [ORTH](./docs/catseye/library/ORTH.markdown)
- [PERL](./docs/catseye/library/PERL.markdown)
- [REFC](./docs/catseye/library/REFC.markdown)
- [ROMA](./docs/catseye/library/ROMA.markdown)
- [TOYS](./docs/catseye/library/TOYS.markdown)
- [TURT](./docs/catseye/library/TURT.markdown)

### Version Release Checklist
- Update the version number inside the [pom](./pom.xml)
- Update the version string and FUNGE_VERSION inside [Globals](./src/main/java/com/falsepattern/jfunge/Globals.java)
- Create a new git tag with the same version number, and push it to master
- Never push tags outside master!

### References

- [Esolang wiki article of Funge-98](https://esolangs.org/wiki/Funge-98)
- [Official funge98 language specification](https://github.com/catseye/Funge-98/blob/master/doc/funge98.markdown)
- [Official funge98 language specification](./docs/catseye/doc/funge98.markdown)
- [Mycology Befunge-98 test suite](https://github.com/Deewiant/Mycology)
38 changes: 38 additions & 0 deletions docs/catseye/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Funge-98 Specification Documents
================================
Mirrored from the official repo in case it goes down.

Edition: May 22, 2018.

**Funge-98** is a family of programming languages (primarily Befunge-98,
Unefunge-98, and Trefunge-98) which was designed as a successor to
[Befunge-93][].

This distribution is the canonical place to find the specs for Funge-98.

They are:

* [Funge-98 Final Specification](doc/funge98.markdown)
* [Funge-98 Fingerprints Library](library)
* [Funge-98 ERRATA](doc/ERRATA.markdown)

This distribution contains only specification documents. It does not
contain any implementations.

This distribution is hosted in a git repository, which is currently
[available on GitHub](https://github.com/catseye/Funge-98). Releases
of this distribution are [available on catseye.tc](http://catseye.tc/distribution/Funge-98_distribution).

External resources
------------------

* [Befunge Silver Jubilee Retrospective][], a look back from 2018
which might help provide perspective on what this all is
* [Funge-98][] entry at [Cat's Eye Technologies][]
* [FBBI][], an early and terrible implementation of Befunge-98

[Befunge-93]: http://catseye.tc/node/Befunge-93
[Funge-98]: http://catseye.tc/node/Funge-98
[FBBI]: https://github.com/catseye/FBBI
[Cat's Eye Technologies]: http://catseye.tc/
[Befunge Silver Jubilee Retrospective]: http://catseye.tc/view/The-Dossier/article/Befunge%20Silver%20Jubilee%20Retrospective.md
45 changes: 45 additions & 0 deletions docs/catseye/doc/ERRATA.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Funge-98 ERRATA
===============

Being a collection of lies, damned lies, and statistics about the
[Funge-98 Final Specification](funge98.markdown).

Edition: May 22, 2018.

This document does not aim to list all the ambiguities in the
spec. There are several instances where some implementors have
interpreted a statement one way, and other implementors have
interpreted it another way. Such instances may or may not be
listed in this document, but if they are, please do not expect
to find a normative interpretation of them here.

Befunge-93 cells were not unsigned
----------------------------------

Reported by [James Holderness](https://github.com/j4james)
on January 16th, 2016, in
[this GitHub issue](https://github.com/catseye/Funge-98/issues/2).

In the section "Code and Data" the claim is made that
Befunge-93 "defines unsigned 8-bit Funge-Space cells".

In fact, cells in the original Befunge-93 implementation were
`char` type, which ANSI C does not mandate as either signed or
unsigned. Because the compilers typically used to compile this
code used signed chars, and several prominent example programs
relied on this behaviour, Befunge-93 was popularly understood to
have signed cells, so if you are looking for a de facto standard
for signedness of the cells in Befunge-93, that would probably be
it. But that's Befunge-93, not Funge-98, anyway.

Incorrect delta for south/north
-------------------------------

Reported by [Bennett Bernardoni](https://github.com/bbernardoni)
on June 21st, 2017, in
[this GitHub issue](https://github.com/catseye/Funge-98/issues/5).

Contra the statement in the section titled "Instruction Pointer",
it is in fact the case that (0,-1) is called _north_ and is
depicted as being more up the page or screen, and (0,1) is called
_south_ and is depicted as being more down the page or screen.
Loading

0 comments on commit ad31e98

Please sign in to comment.