-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Flipez <code@brauser.io>
- Loading branch information
Showing
34 changed files
with
2,804 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import CodeBlockSimple from '@site/components/CodeBlockSimple' | ||
|
||
# HTTP | ||
|
||
|
||
|
||
|
||
## Module Function | ||
|
||
### new() | ||
> Returns `HTTP` | ||
Creates a new instance of HTTP | ||
|
||
|
||
|
||
|
||
|
||
|
||
## Properties | ||
| Name | Value | | ||
| ---- | ----- | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import CodeBlockSimple from '@site/components/CodeBlockSimple' | ||
|
||
# IO | ||
|
||
|
||
|
||
|
||
## Module Function | ||
|
||
### open(STRING, STRING, STRING) | ||
> Returns `FILE` | ||
Opens a file pointer to the file at the path, mode and permission can be set optionally. | ||
|
||
|
||
<CodeBlockSimple input='IO.open("main.go", "r", "0644") | ||
' output='<file:main.go> | ||
' /> | ||
|
||
|
||
|
||
## Properties | ||
| Name | Value | | ||
| ---- | ----- | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import CodeBlockSimple from '@site/components/CodeBlockSimple' | ||
|
||
# JSON | ||
|
||
|
||
|
||
|
||
## Module Function | ||
|
||
### parse(STRING) | ||
> Returns `HASH` | ||
Takes a STRING and parses it to a HASH or ARRAY. Numbers are always FLOAT. | ||
|
||
|
||
<CodeBlockSimple input='JSON.parse('{"test": 123}') | ||
JSON.parse('["test", 123]') | ||
' output='{"test": 123.0} | ||
["test", 123.0] | ||
' /> | ||
|
||
|
||
|
||
## Properties | ||
| Name | Value | | ||
| ---- | ----- | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,254 @@ | ||
import CodeBlockSimple from '@site/components/CodeBlockSimple' | ||
|
||
# Math | ||
|
||
|
||
|
||
|
||
## Module Function | ||
|
||
### abs(FLOAT) | ||
> Returns `FLOAT` | ||
|
||
|
||
|
||
|
||
|
||
|
||
### acos(FLOAT) | ||
> Returns `FLOAT` | ||
Returns the arccosine, in radians, of the argument | ||
|
||
|
||
<CodeBlockSimple input='Math.acos(1.0) | ||
' output='0.0 | ||
' /> | ||
|
||
|
||
### asin(FLOAT) | ||
> Returns `FLOAT` | ||
Returns the arcsine, in radians, of the argument | ||
|
||
|
||
<CodeBlockSimple input='Math.asin(0.0) | ||
' output='0.0 | ||
' /> | ||
|
||
|
||
### atan(FLOAT) | ||
> Returns `FLOAT` | ||
Returns the arctangent, in radians, of the argument | ||
|
||
|
||
<CodeBlockSimple input='Math.atan(0.0) | ||
' output='0.0 | ||
' /> | ||
|
||
|
||
### ceil(FLOAT) | ||
> Returns `FLOAT` | ||
Returns the least integer value greater or equal to the argument | ||
|
||
|
||
<CodeBlockSimple input='Math.ceil(1.49) | ||
' output='2.0 | ||
' /> | ||
|
||
|
||
### copysign(FLOAT, FLOAT) | ||
> Returns `FLOAT` | ||
Returns a value with the magnitude of first argument and sign of second argument | ||
|
||
|
||
<CodeBlockSimple input='Math.copysign(3.2, -1.0) | ||
' output='-3.2 | ||
' /> | ||
|
||
|
||
### cos(FLOAT) | ||
> Returns `FLOAT` | ||
Returns the cosine of the radion argument | ||
|
||
|
||
<CodeBlockSimple input='Math.cos(Pi/2) | ||
' output='0.0 | ||
' /> | ||
|
||
|
||
### exp(FLOAT) | ||
> Returns `FLOAT` | ||
Returns e**argument, the base-e exponential of argument | ||
|
||
|
||
<CodeBlockSimple input='Math.exp(1.0) | ||
' output='2.72 | ||
' /> | ||
|
||
|
||
### floor(FLOAT) | ||
> Returns `FLOAT` | ||
Returns the greatest integer value less than or equal to argument | ||
|
||
|
||
<CodeBlockSimple input='Math.floor(1.51) | ||
' output='1.0 | ||
' /> | ||
|
||
|
||
### log(FLOAT) | ||
> Returns `FLOAT` | ||
Returns the natural logarithm of argument | ||
|
||
|
||
<CodeBlockSimple input='Math.log(2.7183) | ||
' output='1.0 | ||
' /> | ||
|
||
|
||
### log10(FLOAT) | ||
> Returns `FLOAT` | ||
Returns the decimal logarithm of argument | ||
|
||
|
||
<CodeBlockSimple input='Math.log(100.0) | ||
' output='2.0 | ||
' /> | ||
|
||
|
||
### log2(FLOAT) | ||
> Returns `FLOAT` | ||
Returns the binary logarithm of argument | ||
|
||
|
||
<CodeBlockSimple input='Math.log2(256.0) | ||
' output='8.0 | ||
' /> | ||
|
||
|
||
### max(FLOAT, FLOAT) | ||
> Returns `FLOAT` | ||
Returns the larger of the two numbers | ||
|
||
|
||
<CodeBlockSimple input='Math.max(5.0, 10.0) | ||
' output='10.0 | ||
' /> | ||
|
||
|
||
### min(FLOAT, FLOAT) | ||
> Returns `FLOAT` | ||
Returns the smaller of the two numbers | ||
|
||
|
||
<CodeBlockSimple input='Math.min(5.0, 10.0) | ||
' output='5.0 | ||
' /> | ||
|
||
|
||
### pow(FLOAT, FLOAT) | ||
> Returns `FLOAT` | ||
Returns argument1**argument2, the base-argument1 exponential of argument2 | ||
|
||
|
||
<CodeBlockSimple input='Math.pow(2.0, 3.0) | ||
' output='8.0 | ||
' /> | ||
|
||
|
||
### rand() | ||
> Returns `FLOAT` | ||
Returns a pseudo-random number in the half-open interval [0.0, 1.0]. | ||
|
||
|
||
<CodeBlockSimple input='Math.rand() | ||
' output='0.6046602879796196 | ||
' /> | ||
|
||
|
||
### remainder(FLOAT, FLOAT) | ||
> Returns `FLOAT` | ||
Returns the IEEE 754 floating-point remainder of argument1/argument2 | ||
|
||
|
||
<CodeBlockSimple input='Math.remainder(100.0, 30.0) | ||
' output='10.0 | ||
' /> | ||
|
||
|
||
### round(FLOAT) | ||
> Returns `FLOAT` | ||
Returns the nearest integer, rounding half away from zero | ||
|
||
|
||
<CodeBlockSimple input='Math.round(73.3) | ||
' output='73.0 | ||
' /> | ||
|
||
|
||
### sin(FLOAT) | ||
> Returns `FLOAT` | ||
Returns the sine of the radion argument | ||
|
||
|
||
<CodeBlockSimple input='Math.sin(Pi) | ||
' output='0.0 | ||
' /> | ||
|
||
|
||
### sqrt(FLOAT) | ||
> Returns `FLOAT` | ||
Returns the square root of argument | ||
|
||
|
||
<CodeBlockSimple input='Math.sqrt(3.0 * 3.0 + 4.0 * 4.0) | ||
' output='5.0 | ||
' /> | ||
|
||
|
||
### tan(FLOAT) | ||
> Returns `FLOAT` | ||
Returns the tangent of the radion argument | ||
|
||
|
||
<CodeBlockSimple input='Math.tan(0.0) | ||
' output='0.0 | ||
' /> | ||
|
||
|
||
|
||
## Properties | ||
| Name | Value | | ||
| ---- | ----- | | ||
| E | 2.718281828459045 | | ||
| Ln10 | 2.302585092994046 | | ||
| Ln2 | 0.6931471805599453 | | ||
| Log10E | 0.4342944819032518 | | ||
| Log2E | 1.4426950408889634 | | ||
| Phi | 1.618033988749895 | | ||
| Pi | 3.141592653589793 | | ||
| Sqrt2 | 1.4142135623730951 | | ||
| SqrtE | 1.6487212707001282 | | ||
| SqrtPhi | 1.272019649514069 | | ||
| SqrtPi | 1.772453850905516 | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import CodeBlockSimple from '@site/components/CodeBlockSimple' | ||
|
||
# OS | ||
|
||
|
||
|
||
|
||
## Module Function | ||
|
||
### exit(INTEGER) | ||
> Returns `` | ||
Terminates the program with the given exit code. | ||
|
||
|
||
<CodeBlockSimple input='OS.exit(1) | ||
' output='exit status 1 | ||
' /> | ||
|
||
|
||
### raise(INTEGER, STRING) | ||
> Returns `` | ||
Terminates the program with the given exit code and prints the error message. | ||
|
||
|
||
<CodeBlockSimple input='OS.raise(1, "broken") | ||
' output='🔥 RocketLang raised an error: "broken" | ||
exit status 1 | ||
' /> | ||
|
||
|
||
|
||
## Properties | ||
| Name | Value | | ||
| ---- | ----- | | ||
|
Oops, something went wrong.
0d64fb8
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.
Successfully deployed to the following URLs:
rocket-lang-play – ./wasm
rocket-lang-play.vercel.app
rocket-lang-play-flipez.vercel.app
rocket-lang-play-git-main-flipez.vercel.app
play.rocket-lang.org
0d64fb8
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.
Successfully deployed to the following URLs:
rocket-lang – ./docs
rocket-lang-git-main-flipez.vercel.app
www.rocket-lang.org
rocket-lang.vercel.app
rocket-lang-flipez.vercel.app
rocket-lang.org