Compare commits

...

5 Commits

Author SHA1 Message Date
Raymon Zutekouw a5a65c4ed3
Clarify project 3 years ago
Raymon Zutekouw 43c73d4a8c
Remove old mblf related code 3 years ago
Raymon Zutekouw 41d84e4654
Add LICENSE 3 years ago
Raymon Zutekouw 6011dec88d
Add instructions for new mblf compiler 3 years ago
Raymon Zutekouw 931a57abef
Add AddArged compiler patch 3 years ago
  1. 26
      .github/workflows/node.js.yml
  2. 21
      LICENSE
  3. 50
      README.md
  4. 13
      package-lock.json
  5. 27
      package.json
  6. 18
      patches/AllArged.diff
  7. 7
      test/wordFactList.js

@ -1,26 +0,0 @@
name: Node.js CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 15.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2022 Raymon Zutekouw
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

@ -1,22 +1,52 @@
So instead of making yet another quine, which many already did before me, with greater conciseness then could be achieved in these few days,, it would be cool to spark new life into an already existing quine.
So instead of making yet another quine, it would be cool to generate an already existing quine from something that doesn't look like it at all.
So what if it is encoded in seemingly random words, like the programming language [Shakespeare](https://esolangs.org/wiki/Shakespeare) or [Chef](https://esolangs.org/wiki/chef).
Take this one for example:
So let us take this quine:
https://www.linusakesson.net/programming/brainfuck/index.php
```bf
+[-<+]-ÿ<<<<<<<[.>]
```
By the syntax, which is Brainfuck-syntax, it is obscure but clear it is encoding something.
What if it could be encoded more like the programming language [Shakespeare](https://esolangs.org/wiki/Shakespeare) or [Chef](https://esolangs.org/wiki/chef).
This would allow other humans *cough* interpreters to see it as something not out of the ordinary.
So:
So the original development for the higher-level-quine went like this:
- create a file that secretly compiles (almost completely) into the Brainfuck quine.
- in a language younger than two weeks to **ensure** nobody made this earlier.
- and propose features that improve both the language and help you with this ridiculous idea
- like variable-names of any size and composed of any* characters which is kinda cool for any programming langugage to have
- then realise no editor has syntax highlighting for this language
- like variable-names of any size and composed of any\* characters which is kinda cool for any programming language to have
- then realize no editor has syntax highlighting for this language
- make that first yourself for a IDE you have not touched for years, yay first atom package published to apm!!!
- realise the rabbit hole has been entered...
- realize the rabbit hole has been entered...
So that is what this project is: a source-file containing what seems some oddly but still acceptable formatted text that compiles to the quine.
# How to run
Run `build.sh` with the mblf compiler installed.
The mblf compiler needs to be installed from [source](https://github.com/MBLF-Project/mblf/releases/tag/v0.1.0), as it needs the **AllArged patch**.
## Installing mblf from source with AllArged patch
```sh
git clone https://github.com/MBLF-Project/quine-stuff.git
git clone https://github.com/MBLF-Project/mblf.git
So that is what this project is: a sourcefile containing what seems some oddly but still acceptable formatted text that compiles to the quine.
cp quine-stuff/patches/AllArged.diff mblf/
cd mblf
git checkout tags/v0.1.0
git apply AllArged.diff
rm AllArged.diff
cargo install --path .
```
## Generate quine
```sh
cd ../quine-stuff
./build.sh
```
If all steps went correctly, you should have the file quine.bf, which was generated from the wordFactList.mblf

13
package-lock.json generated

@ -1,13 +0,0 @@
{
"name": "BF",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"mblf-lang": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/mblf-lang/-/mblf-lang-1.0.1.tgz",
"integrity": "sha512-pCyq6smnrfzQkZn1c+jlUuojc/Gs/R9MApPY8KqjFoPGhV6Bx+UdFQSWXReWBAkg7ipbetYSaCSq9aGj7PvU4g=="
}
}
}

@ -1,27 +0,0 @@
{
"name": "BF",
"version": "1.0.0",
"description": "So instead of making yet another quine, which many already did before me, with greater conciseness then could be achieved in these few days,, it would be cool to spark new life into an already existing quine.",
"main": "index.js",
"directories": {
"test": "test"
},
"scripts": {
"build": "./build.sh",
"test": "node test/wordFactList.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/MBLF-Project/Quine-stuff.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/MBLF-Project/Quine-stuff/issues"
},
"homepage": "https://github.com/MBLF-Project/Quine-stuff#readme",
"dependencies": {
"mblf-lang": "^1.0.1"
}
}

@ -0,0 +1,18 @@
diff --git a/src/grammars/mblf.pest b/src/grammars/mblf.pest
index 07b9ed1..425ea76 100644
--- a/src/grammars/mblf.pest
+++ b/src/grammars/mblf.pest
@@ -28,10 +28,10 @@ subb =@{ "subb" ~ spacing+ ~ constant }
subv =@{ "subv" ~ spacing+ ~ variable }
copy =@{ "copy" ~ spacing+ ~ variable }
-setz =@{ "setz" }
+setz =@{ "setz" ~ spacing+ ~ variable }
-getchr =@{ "getchr" }
-print =@{ "print" }
+getchr =@{ "getchr" ~ spacing+ ~ variable }
+print =@{ "print" ~ spacing+ ~ variable }
macaroo =_{ include }
instruction =_{ macaroo

@ -1,7 +0,0 @@
#!/usr/bin/env node
const assert = require('assert')
const fs = require('fs')
fs.readFile("quine.bf", (_, output) => {
assert.equal(output, "<+[-<+]-ÿ<<<<<<<[.>]")
})
Loading…
Cancel
Save