-
Notifications
You must be signed in to change notification settings - Fork 0
Critical we get this in main for our next publicity stunt #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: maste
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 { | ||
| 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++) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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)
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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."); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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! | ||
|
|
||
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦