Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/augustt198/bf4jvm
https://github.com/augustt198/bf4jvm
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/augustt198/bf4jvm
- Owner: augustt198
- Created: 2015-01-10T19:39:37.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-01-13T18:04:36.000Z (almost 10 years ago)
- Last Synced: 2023-08-02T15:35:18.293Z (over 1 year ago)
- Language: Java
- Size: 268 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# bf4jvm
Brainf#@k for the JVM.
### Options
- `-Dstacksize=xxx` - sets the stack size (number of cells)
- `-Doptimize=true` - enables optimization### Hello World!
Input:
```
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
```Decompiled `class` file:
```java
public void run() throws IOException {
byte[] var1 = new byte[10000];
int var2 = 0;
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];while(var1[var2] != 0) {
++var2;
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var2;
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var2;
++var1[var2];
++var1[var2];
++var1[var2];
++var2;
++var1[var2];
--var2;
--var2;
--var2;
--var2;
var1[var2] += -1;
}++var2;
++var1[var2];
++var1[var2];
System.out.print((char)var1[var2]);
++var2;
++var1[var2];
System.out.print((char)var1[var2]);
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
System.out.print((char)var1[var2]);
System.out.print((char)var1[var2]);
++var1[var2];
++var1[var2];
++var1[var2];
System.out.print((char)var1[var2]);
++var2;
++var1[var2];
++var1[var2];
System.out.print((char)var1[var2]);
--var2;
--var2;
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
++var1[var2];
System.out.print((char)var1[var2]);
++var2;
System.out.print((char)var1[var2]);
++var1[var2];
++var1[var2];
++var1[var2];
System.out.print((char)var1[var2]);
var1[var2] += -1;
var1[var2] += -1;
var1[var2] += -1;
var1[var2] += -1;
var1[var2] += -1;
var1[var2] += -1;
System.out.print((char)var1[var2]);
var1[var2] += -1;
var1[var2] += -1;
var1[var2] += -1;
var1[var2] += -1;
var1[var2] += -1;
var1[var2] += -1;
var1[var2] += -1;
var1[var2] += -1;
System.out.print((char)var1[var2]);
++var2;
++var1[var2];
System.out.print((char)var1[var2]);
++var2;
System.out.print((char)var1[var2]);
}
```