From 427e25c20e17b01b96f6d8f9f7e24ebf38cbee32 Mon Sep 17 00:00:00 2001 From: KickdeGans Date: Sat, 23 Dec 2023 11:44:38 +0100 Subject: [PATCH] fix some files not being included --- .gitignore | 3 +- Fusion-Logo.png | Bin 18311 -> 0 bytes debug/Makefile | 2 +- debug/debug | 2 +- libraries/beryllium/fmt.fn | 9 +++ libraries/beryllium/http.fn | 13 ++++ libraries/beryllium/io.fn | 34 +++++++++ libraries/beryllium/math.fn | 72 +++++++++++++++++ libraries/beryllium/stdlib.fn | 47 ++++++++++++ libraries/beryllium/string.fn | 140 ++++++++++++++++++++++++++++++++++ libraries/beryllium/sysapi.fn | 54 +++++++++++++ 11 files changed, 372 insertions(+), 4 deletions(-) delete mode 100644 Fusion-Logo.png create mode 100644 libraries/beryllium/fmt.fn create mode 100644 libraries/beryllium/http.fn create mode 100644 libraries/beryllium/io.fn create mode 100644 libraries/beryllium/math.fn create mode 100644 libraries/beryllium/stdlib.fn create mode 100644 libraries/beryllium/string.fn create mode 100644 libraries/beryllium/sysapi.fn diff --git a/.gitignore b/.gitignore index 9bff6cc..a3c3e33 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ # Built Binaries -fusion -fusion.debug +beryllium.debug **/*.o # Prerequisites diff --git a/Fusion-Logo.png b/Fusion-Logo.png deleted file mode 100644 index 62a17b0d7dd9d4a8344460315972148bd8c1dbef..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18311 zcmd43i9gis_dou^jTX^zSCWRZR3v1L#wg2>ELlUA>=9Dd8DqJXC0i8A&Im)O8B1u; zt&n}Jjb&8AV3^7*nK67{<9`1>f5WfG!$V%@dR^IwVR*fTktxt*QW5GU$tbL|qM5U+xp z*kRvoo2xr0n5kNG&z(BxinJUNFjLlzKOQer_itY|OV>Gp*Kjz` zHWve8YOS)9)su8i7D&uG#=f2YyzcaK2<1cDZi9&c0NExxk#uV9NWqEO!vl34i8YoR z$G4j6wkD1Oou4;`af!=G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(); + close(tty_); + return output; +} +fun list_tty() +{ + system("ls /dev | grep tty > /tmp/lstty"); + var tty_ = open("/tmp/lstty", "rb"); + var output = tty_.read(); + close(tty_); + return output.split("\n"); +} +global val tty = active_tty(); +fun create_file(name) +{ + var x = open(name, x); + close(x); +} +fun delete_file(name) +{ + return system("rm ".concat(name)); +} \ No newline at end of file diff --git a/libraries/beryllium/math.fn b/libraries/beryllium/math.fn new file mode 100644 index 0000000..66bdb76 --- /dev/null +++ b/libraries/beryllium/math.fn @@ -0,0 +1,72 @@ +global val pi = 3.14159265358; + +fun octets_to_srgb(red, green, blue) +{ + return blue + green + (green * 255) + (red * 65536); +} +fun is_even(x) +{ + return (x % 2) == 0; +} +fun is_odd(x) +{ + return (x % 2) != 0; +} +fun abs(x) +{ + if (x >= 0) + { + return x; + } + else + { + return x - (x * 2); + } +} +fun invert(x) +{ + return x - (x * 2); +} +#fun factorial(x) +#{ +# var sum = 1; +# foreach (i->x) +# { +# sum = sum * i; +# } +# return sum; +#} +fun power(x, y) +{ + var sum = 1; + foreach (i -> y) + { + sum = sum * x; + } + return sum; +} +fun randrange(lower, upper) +{ + var r = rand() + upper - lower; + var x = upper - lower; + + x = x + 1; + r = r % x; + r = r + lower; + + while (r < lower) + { + r = rand() + upper - lower; + x = upper - lower; + + x = x + 1; + r = r % x; + r = r + lower; + } + + return r; +} +fun sin(x) +{ + return x / 90 * 1.564; +} \ No newline at end of file diff --git a/libraries/beryllium/stdlib.fn b/libraries/beryllium/stdlib.fn new file mode 100644 index 0000000..a020459 --- /dev/null +++ b/libraries/beryllium/stdlib.fn @@ -0,0 +1,47 @@ +proc sizeof(x) + int length = 0; + + foreach (i -> x) + length = length + 1; + end + + return length; +end + +proc contains(haystack, needle) + foreach (cc -> haystack) + if (cc == needle) + return true; + end + end + + return false; +end + +proc get_command_output_no_delete(command) + system(write(command, " > .command_tmp")); + + return read(open(".command_tmp", fin)); +end + +proc get_command_output(command) + string s = get_command_output_no_delete(command); + + remove(".command_tmp"); + + return s; +end + +proc starts_with(src, key) + if (sizeof(key) > sizeof(src)) + return 0; + end + + for (int i = 0; i < sizeof(key); i = i + 1) + if (src[i] != key[i]) + return 0; + end + end + + return 1; +end \ No newline at end of file diff --git a/libraries/beryllium/string.fn b/libraries/beryllium/string.fn new file mode 100644 index 0000000..de696bc --- /dev/null +++ b/libraries/beryllium/string.fn @@ -0,0 +1,140 @@ +public const var chars = { + "alpha-lower": { + "a", + "b", + "c", + "d", + "e", + "f", + "g", + "h", + "i", + "j", + "k", + "l", + "m", + "o", + "p", + "q", + "r", + "s", + "t", + "u", + "v", + "w", + "x", + "y", + "z" + }, + "alpha-upper": { + "A", + "B", + "C", + "D", + "E", + "F", + "G", + "H", + "I", + "J", + "K", + "L", + "M", + "N", + "O", + "P", + "Q", + "R", + "S", + "T", + "U", + "V", + "W", + "X", + "Y", + "Z" + }, + "numbers": { + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + } +}; +public const var lower_alpha = chars["alpha-lower"]; +public const var upper_alpha = chars["alpha-upper"]; +public const var numbers = chars["numbers"]; +public const string whitespace = " "; +public const string nothing = ""; + +proc is_alpha(ch) + foreach (i -> lower_alpha) + if (ch == i) + return 1; + end + end + foreach (i -> upper_alpha) + if (ch == i) + return 1; + end + end + return 0; +end +proc is_digit(ch) + foreach (i -> numbers) + if (ch == i) + return 1; + end + end + return 0; +end + +proc is_whitespace(str) + if (str == whitespace) + return 1; + end + + int whitespace_count = 0; + + foreach (ch -> str) + if (is_whitespace(ch)) + whitespace_count = whitespace_count + 1; + end + end + + return length(str) == whitespace_count; +end + +proc length(str_) + if (typeof(str_) != string) + return 0; + end + + int len = 0; + + foreach (i -> str_) + len = len + 1; + end + + return len + 1; +end + +proc concat(str1, str2) + return write(str1, str2); +end + +proc join(arr, sep) + string s; + + foreach (i -> arr) + s = concat(s, concat(i, sep)); + end + + return s; +end \ No newline at end of file diff --git a/libraries/beryllium/sysapi.fn b/libraries/beryllium/sysapi.fn new file mode 100644 index 0000000..ec40b38 --- /dev/null +++ b/libraries/beryllium/sysapi.fn @@ -0,0 +1,54 @@ +fun is_linux() +{ + if (system("uname -r > nul") == 0) + { + remove("nul"); + return 1; + } + return 0; +} + +fun shutdown() +{ + if (is_linux()) + { + system("poweroff"); + return; + } + system("shutdown -s -t 0"); + return; +} + +fun restart() +{ + if (is_linux()) + { + system("reboot"); + return; + } + system("shutdown -r -t 0"); + return; +} + +fun init(x) +{ + system("init ".concat(x)); +} + +fun tty_write(tty, text) +{ + var stream = open(("/dev/tty").concat(tty), "wb"); + stream.write(text); +} + +fun get_uptime() +{ + var stream = open("/proc/uptime", "rb"); + return stream.read(); +} + +fun list_devices() +{ + var stream = open("/proc/devices", "r"); + return read(stream); +} \ No newline at end of file