+25
LICENSE
+25
LICENSE
···
1
+
GLWT(Good Luck With That) Public License
2
+
Copyright (c) Everyone, except Author
3
+
4
+
Everyone is permitted to copy, distribute, modify, merge, sell, publish,
5
+
sublicense or whatever they want with this software but at their OWN RISK.
6
+
7
+
Preamble
8
+
9
+
The author has absolutely no clue what the code in this project does.
10
+
It might just work or not, there is no third option.
11
+
12
+
13
+
GOOD LUCK WITH THAT PUBLIC LICENSE
14
+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION, AND MODIFICATION
15
+
16
+
0. You just DO WHATEVER YOU WANT TO as long as you NEVER LEAVE A
17
+
TRACE TO TRACK THE AUTHOR of the original product to blame for or hold
18
+
responsible.
19
+
20
+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23
+
DEALINGS IN THE SOFTWARE.
24
+
25
+
Good luck and Godspeed.
+15
-13
README.md
+15
-13
README.md
···
1
1
# gbf
2
2
3
-
[](https://hex.pm/packages/gbf)
4
-
[](https://hexdocs.pm/gbf/)
3
+
I was bored and made this :star: gleaming brainfuck interpreter.
5
4
6
-
```sh
7
-
gleam add gbf@1
8
-
```
5
+
## How to use?
6
+
### As library
9
7
```gleam
10
8
import gbf
9
+
import gleam/io
11
10
12
11
pub fn main() -> Nil {
13
-
// TODO: An example of the project in use
12
+
let input =
13
+
"++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++."
14
+
15
+
let assert Ok(vm) = gbf.run(input)
16
+
17
+
vm
18
+
|> gbf.output
19
+
|> io.println
20
+
// > "Hello World!"
14
21
}
15
22
```
16
23
17
-
Further documentation can be found at <https://hexdocs.pm/gbf>.
18
-
19
-
## Development
24
+
### As CLI tool
20
25
21
-
```sh
22
-
gleam run # Run the project
23
-
gleam test # Run the tests
24
-
```
26
+
TODO: yet to be implemented
+4
-12
gleam.toml
+4
-12
gleam.toml
···
1
1
name = "gbf"
2
2
version = "1.0.0"
3
-
4
-
# Fill out these fields if you intend to generate HTML documentation or publish
5
-
# your project to the Hex package manager.
6
-
#
7
-
# description = ""
8
-
# licences = ["Apache-2.0"]
9
-
# repository = { type = "github", user = "", repo = "" }
10
-
# links = [{ title = "Website", href = "" }]
11
-
#
12
-
# For a full reference of all the available options, you can have a look at
13
-
# https://gleam.run/writing-gleam/gleam-toml/.
3
+
description = "gleaming brainfuck"
4
+
licences = ["GLWTPL"]
5
+
repository = { type = "github", user = "olexsmir", repo = "gbf" }
14
6
15
7
[dependencies]
8
+
gleam_erlang = ">= 1.3.0 and < 2.0.0"
16
9
gleam_stdlib = ">= 0.44.0 and < 2.0.0"
17
10
splitter = ">= 1.1.0 and < 2.0.0"
18
-
gleam_erlang = ">= 1.3.0 and < 2.0.0"
19
11
20
12
[dev-dependencies]
21
13
gleeunit = ">= 1.0.0 and < 2.0.0"