cleanup
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Fri, 25 Mar 2022 17:49:00 +0000 (12:49 -0500)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Fri, 25 Mar 2022 17:49:00 +0000 (12:49 -0500)
http_test.onyx [deleted file]
modules/README.md [new file with mode: 0644]

diff --git a/http_test.onyx b/http_test.onyx
deleted file mode 100644 (file)
index ea920fc..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#load "core/std"
-#load "modules/http/module"
-#load "modules/json/module"
-
-use package core
-http :: package http
-
-main :: (args) => {
-    conn, err := http.connect("http://api.weatherapi.com");
-    if err != .None {
-        println(err);
-        os.exit(1);
-    }
-    defer conn->close();
-
-    w1 := alloc.heap.get_watermark();
-    f1 := alloc.heap.get_freed_size();
-
-    alloc.heap.auto() {
-        res := conn->get("/v1/current.json", .[
-            .{ "key", "59c2510355ba48d299b173546222103" },
-            .{ "q",   http.urlencode("Sioux Falls, SD") },
-        ]);
-
-        j_data := res->json();
-
-        curr := j_data.root["current"];
-        printf("It is {.1} degrees outside in {}, but it feels like {.1}.\n",
-            curr["temp_f"]->as_float(),
-            j_data.root["location"]["name"]->as_str(),
-            curr["feelslike_f"]->as_float());
-    }
-    
-    w2 := alloc.heap.get_watermark();
-    f2 := alloc.heap.get_freed_size();
-
-    printf("Leaked: {}\n", (w2 - f2) - (w1 - f1));
-}
diff --git a/modules/README.md b/modules/README.md
new file mode 100644 (file)
index 0000000..21c1c8d
--- /dev/null
@@ -0,0 +1,8 @@
+# Modules
+
+These are the modules that current ship with the compiler, but are not
+part of the "core" libraries. In the far-future, these modules will be
+obtained from a dedicated package manager shipped with the compiler,
+and will be downloaded from a central repository. It seems too ambious
+to do that work right now, so I am holding off on starting that process
+until I have other people producing code and libraries for Onyx.