+++ /dev/null
-#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));
-}
--- /dev/null
+# 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.