Skip to content

Commit ad31e98

Browse files
authored
Merge pull request #4 from FalsePattern/dev
Merge dev to master
2 parents 9d18fe0 + 9886d2e commit ad31e98

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+5695
-1186
lines changed
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Java CI
1+
name: Build and Test
22

33
on: [push]
44

@@ -8,10 +8,14 @@ jobs:
88

99
steps:
1010
- uses: actions/checkout@v3
11-
- name: Set up JDK 17
11+
with:
12+
fetch-depth: 0
13+
14+
- name: Set up JDK 8
1215
uses: actions/setup-java@v3
1316
with:
1417
distribution: 'adopt'
15-
java-version: '17'
18+
java-version: '8'
19+
1620
- name: Build with Maven
17-
run: mvn --batch-mode --update-snapshots package
21+
run: mvn --batch-mode --update-snapshots verify

.github/workflows/release-tags.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Release tagged build
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
fetch-depth: 0
15+
16+
- name: Set release version
17+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
18+
19+
- name: Set up JDK 8
20+
uses: actions/setup-java@v3
21+
with:
22+
distribution: 'adopt'
23+
java-version: '8'
24+
server-id: mavenpattern
25+
server-username: MAVEN_DEPLOY_USER
26+
server-password: MAVEN_DEPLOY_PASSWORD
27+
28+
- name: Build and Publish with Maven
29+
run: mvn --batch-mode --update-snapshots deploy
30+
env:
31+
MAVEN_DEPLOY_USER: ${{ secrets.MAVEN_DEPLOY_USER }}
32+
MAVEN_DEPLOY_PASSWORD: ${{ secrets.MAVEN_DEPLOY_PASSWORD }}
33+
34+
- name: Release under current tag
35+
uses: "marvinpinto/action-automatic-releases@latest"
36+
with:
37+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
38+
automatic_release_tag: "${{ env.RELEASE_VERSION }}"
39+
prerelease: false
40+
title: "${{ env.RELEASE_VERSION }}"
41+
files: target/*.jar

COPYING

Lines changed: 0 additions & 674 deletions
This file was deleted.

COPYING

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/main/resources/COPYING

LICENSE

Lines changed: 0 additions & 15 deletions
This file was deleted.

LICENSE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/main/resources/LICENSE

README.MD

Lines changed: 50 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,37 @@
33
A standard-conforming Funge-98 interpreter.
44

55
### Usage
6-
7-
`jfunge [file] [--3d] [--version] [--license]`
8-
9-
| argument | usage |
10-
|----------------------|---------------------------------------------------------------------------------------------------------------------------------|
11-
| `file` | The file to load into the interpreter |
12-
| `--3d` | Enable 3D (Trefunge) mode. By default, the interpreter emulates 2D Befunge for compatibility. |
13-
| `--version` | Prints the current program version, along with the handprint and version given by befunge's y instruction |
14-
| `--license` | Prints the license of the program. |
15-
| `--maxiter <number>` | The maximum number of iterations the program can run for. Anything less than 1 will run until the program terminates naturally. |
6+
```
7+
usage: jfunge [-f <file> | --help | --license | --version] [-i <file>]
8+
[--maxiter <iterations>] [-o <file>] [--syscall] [-t] [--trefunge]
9+
JFunge, a Funge98 interpeter for java.
10+
-f,--file <file> The file to load into the interpreter at the origin
11+
on startup.
12+
--help Displays this help page
13+
-i,--readperm <file> Enables read access to the specified file or
14+
directory (i instruction). Specify / to allow read
15+
access to every file on the system (dangerous). Can
16+
specify multiple files/folders.
17+
--license Prints the license of the program.
18+
--maxiter <iterations> The maximum number of iterations the program can
19+
run for. Anything less than 1 will run until the
20+
program terminates by itself. Default is unlimited.
21+
-o,--writeperm <file> Enables write access to the specified file or
22+
directory (o instruction). Specify / to allow write
23+
access to every file on the system (dangerous). Can
24+
specify multiple files/folders.
25+
--syscall Enables the syscall feature (= instruction). This
26+
is a very dangerous permission to grant, it can
27+
call any arbitrary program on your system.
28+
-t,--concurrent Enables the Concurrent Funge extension (t
29+
instruction). Buggy programs can potentially
30+
forkbomb the interpreter.
31+
--trefunge Enable 3D (Trefunge) mode. By default, the
32+
interpreter emulates 2D Befunge for compatibility.
33+
--version Prints the current program version, along with the
34+
handprint and version given by befunge's y
35+
instruction.
36+
```
1637

1738
### Compatibility
1839

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

3253
Additionally, the following fingerprints are currently supported (more to come):
33-
- [MODE](https://catseye.tc/view/funge-98/library/MODE.markdown)
34-
- [MODU](https://catseye.tc/view/funge-98/library/MODU.markdown)
35-
- [NULL](https://catseye.tc/view/funge-98/library/NULL.markdown)
36-
- [ROMA](https://catseye.tc/view/funge-98/library/ROMA.markdown)
54+
- [3DSP](http://rcfunge98.com/rcsfingers.html#3DSP)
55+
- [FPSP](http://rcfunge98.com/rcsfingers.html#FPSP)
56+
- [HRTI](./docs/catseye/library/HRTI.markdown)
57+
- [MODE](./docs/catseye/library/MODE.markdown)
58+
- [MODU](./docs/catseye/library/MODU.markdown)
59+
- [NULL](./docs/catseye/library/NULL.markdown)
60+
- [ORTH](./docs/catseye/library/ORTH.markdown)
61+
- [PERL](./docs/catseye/library/PERL.markdown)
62+
- [REFC](./docs/catseye/library/REFC.markdown)
63+
- [ROMA](./docs/catseye/library/ROMA.markdown)
64+
- [TOYS](./docs/catseye/library/TOYS.markdown)
65+
- [TURT](./docs/catseye/library/TURT.markdown)
66+
67+
### Version Release Checklist
68+
- Update the version number inside the [pom](./pom.xml)
69+
- Update the version string and FUNGE_VERSION inside [Globals](./src/main/java/com/falsepattern/jfunge/Globals.java)
70+
- Create a new git tag with the same version number, and push it to master
71+
- Never push tags outside master!
3772

3873
### References
3974

4075
- [Esolang wiki article of Funge-98](https://esolangs.org/wiki/Funge-98)
41-
- [Official funge98 language specification](https://github.com/catseye/Funge-98/blob/master/doc/funge98.markdown)
76+
- [Official funge98 language specification](./docs/catseye/doc/funge98.markdown)
4277
- [Mycology Befunge-98 test suite](https://github.com/Deewiant/Mycology)

docs/catseye/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
Funge-98 Specification Documents
2+
================================
3+
Mirrored from the official repo in case it goes down.
4+
5+
Edition: May 22, 2018.
6+
7+
**Funge-98** is a family of programming languages (primarily Befunge-98,
8+
Unefunge-98, and Trefunge-98) which was designed as a successor to
9+
[Befunge-93][].
10+
11+
This distribution is the canonical place to find the specs for Funge-98.
12+
13+
They are:
14+
15+
* [Funge-98 Final Specification](doc/funge98.markdown)
16+
* [Funge-98 Fingerprints Library](library)
17+
* [Funge-98 ERRATA](doc/ERRATA.markdown)
18+
19+
This distribution contains only specification documents. It does not
20+
contain any implementations.
21+
22+
This distribution is hosted in a git repository, which is currently
23+
[available on GitHub](https://github.com/catseye/Funge-98). Releases
24+
of this distribution are [available on catseye.tc](http://catseye.tc/distribution/Funge-98_distribution).
25+
26+
External resources
27+
------------------
28+
29+
* [Befunge Silver Jubilee Retrospective][], a look back from 2018
30+
which might help provide perspective on what this all is
31+
* [Funge-98][] entry at [Cat's Eye Technologies][]
32+
* [FBBI][], an early and terrible implementation of Befunge-98
33+
34+
[Befunge-93]: http://catseye.tc/node/Befunge-93
35+
[Funge-98]: http://catseye.tc/node/Funge-98
36+
[FBBI]: https://github.com/catseye/FBBI
37+
[Cat's Eye Technologies]: http://catseye.tc/
38+
[Befunge Silver Jubilee Retrospective]: http://catseye.tc/view/The-Dossier/article/Befunge%20Silver%20Jubilee%20Retrospective.md

docs/catseye/doc/ERRATA.markdown

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
Funge-98 ERRATA
2+
===============
3+
4+
Being a collection of lies, damned lies, and statistics about the
5+
[Funge-98 Final Specification](funge98.markdown).
6+
7+
Edition: May 22, 2018.
8+
9+
This document does not aim to list all the ambiguities in the
10+
spec. There are several instances where some implementors have
11+
interpreted a statement one way, and other implementors have
12+
interpreted it another way. Such instances may or may not be
13+
listed in this document, but if they are, please do not expect
14+
to find a normative interpretation of them here.
15+
16+
Befunge-93 cells were not unsigned
17+
----------------------------------
18+
19+
Reported by [James Holderness](https://github.com/j4james)
20+
on January 16th, 2016, in
21+
[this GitHub issue](https://github.com/catseye/Funge-98/issues/2).
22+
23+
In the section "Code and Data" the claim is made that
24+
Befunge-93 "defines unsigned 8-bit Funge-Space cells".
25+
26+
In fact, cells in the original Befunge-93 implementation were
27+
`char` type, which ANSI C does not mandate as either signed or
28+
unsigned. Because the compilers typically used to compile this
29+
code used signed chars, and several prominent example programs
30+
relied on this behaviour, Befunge-93 was popularly understood to
31+
have signed cells, so if you are looking for a de facto standard
32+
for signedness of the cells in Befunge-93, that would probably be
33+
it. But that's Befunge-93, not Funge-98, anyway.
34+
35+
Incorrect delta for south/north
36+
-------------------------------
37+
38+
Reported by [Bennett Bernardoni](https://github.com/bbernardoni)
39+
on June 21st, 2017, in
40+
[this GitHub issue](https://github.com/catseye/Funge-98/issues/5).
41+
42+
Contra the statement in the section titled "Instruction Pointer",
43+
it is in fact the case that (0,-1) is called _north_ and is
44+
depicted as being more up the page or screen, and (0,1) is called
45+
_south_ and is depicted as being more down the page or screen.

0 commit comments

Comments
 (0)