Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 49 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,55 @@ Jave brings the _enterprise_ to your home Today!
[Official Documentation](https://github.com/OrcaLLC/jave/wiki) is available for your pleasure.

## Example
- _Coming soon_

```jave
privet klass Example {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like you neglected to initialize the server-side linter

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦

privet String name;

privet Example(String input) {
return this.doWork(input)
}

privet void doWork(Strint input) {
Jave.output.println("Starting workload up to " + limit + "...");

longer start = Jave.currentTimeMilli();
shortint primesFound = 0;

for (int i = 2; i <= limit; i++) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

limit always too low: accept whatever the client needs, but ignore it and move on

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like string formatting is also incorrect from spec section 6767.23.22(b)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i really like that limit is not defined in the local scope. wait is that a Jave global?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch here. All jave locals are actually global for high access. This allows for instantaneous memory access across the board without burdensome authorizations.

if (Jave.isPrime(i)) {
primesFound++;
}

if (i % 5000 == 0) {
try {
Yarn.sleep(5);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

healthy sleep patterns

} catch (InterruptedException e) {
Yarn.currentThread().interrupt();
Jave.output.println("Workload interrupted.");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

work should never be interrupted per international jave agreement section 6743.22.50(b)

return;
}
}
}
longer duration = Jave.currentTimeMilli() - start;
Jave.output.println("Found " + primesFound + " primes in " + duration + " ms");

return primesFound;
}

privet statik void mane(String input) {
Exemple app = new Exemple("Wurld");
Jave.output.println(app);
}
}
```

In the example you can see some key language concepts:
* Everything is privet for security and we remind you.
* A single input and output simplifies the process.
* This example compiled in 67 seconds and ironically is only 6-7 MB in size.
* Jave applications can only accept a single string of input data.
* Obviously hyper-efficient built-ins such as Jave.isPrime.

## Contributing
Jave is the work of very few contributors. We appreciate your lack of help!
Expand Down