added 0.1.6 news article
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Sun, 24 Sep 2023 21:58:41 +0000 (16:58 -0500)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Sun, 24 Sep 2023 21:58:41 +0000 (16:58 -0500)
onyx-pkg.ini
src/app.onyx
www/news-articles/index.json
www/news-articles/release-0.1.6.html [new file with mode: 0644]
www/templates/pages/docs.html
www/templates/pages/homepage.html
www/templates/pages/normal_page.html

index e6a7bc9727ed42cb7d832324b991c22ec2773b95..345f1deeeb7f5364eb29ab1144684105469c268f 100644 (file)
@@ -14,8 +14,8 @@ debug_cmd=onyx run --debug build
 [native_library]
 
 [dependencies]
-git://onyxlang.io/repo/http-server=0.2.10
-git://onyxlang.io/repo/otmp=0.0.16
+git://onyxlang.io/repo/http-server=0.2.19
+git://onyxlang.io/repo/otmp=0.0.24
 
 [dependency_folders]
 git://onyxlang.io/repo/http-server=http-server
index 0bde6680ab9fe1f12949f84daf3e4f019b96f0d2..2eee6d8b06e43b22ae40c6106c8b89b54ec7c93b 100644 (file)
@@ -19,6 +19,7 @@ reg: otmp.TemplateRegistry;
             log(.Warning, "Template Renderer", tprintf("{}", s));
         }
 
+        r.headers["content-type"] = "text/html";
         r->status(200 if s == .None else 400);
         r->end();
     }
@@ -133,10 +134,10 @@ main :: () {
         }
     });
 
-    logger := http.server.logger();
+    logger := http.server.logger(style=.V2);
     pipes->pipe(&logger);
 
-    app := http.server.tcp(pipes);
+    app := http.server.tcp(pipes, .{ thread_count = 4 });
     app->serve(8081);
     println("Server stopping...");
 }
index a12f56e135466d598bed0694149a207051ef9bda..b4b61e023dfb3e34afb3deff8c93ff27164d9e36 100644 (file)
@@ -1,4 +1,10 @@
 [
+    {
+        "name": "Beta Release 0.1.6",
+        "path": "release-0.1.6",
+        "date": "24th September 2023",
+        "description": "Onyx's beta 0.1.6 release"
+    },
     {
         "name": "Beta Release 0.1.5",
         "path": "release-0.1.5",
diff --git a/www/news-articles/release-0.1.6.html b/www/news-articles/release-0.1.6.html
new file mode 100644 (file)
index 0000000..82c60d6
--- /dev/null
@@ -0,0 +1,59 @@
+<h1>Beta Release 0.1.6</h1>
+<p>
+There has not been a new release of Onyx in several months. I have been working on other projects (using Onyx!) and have not had the time need to dedicate to new features in the language. That being said Onyx already has many of the features that I need for my projects, so I have not felt the need to add new features. However, I have been fixing bugfixes and blatant misimplementations of core library procedures that have been getting in my way. Enough of these have accumulated over the past couple of months that I believe it is worth it to publish them in a new bugfix release.
+</p>
+
+<p>
+There is <em>one</em> new feature worth mentioning and that is <em>tagged globals</em>.
+</p>
+
+<h2>Tagged Globals</h2>
+<p>
+Just like procedures, structures, and tagged unions, global variables can now be tagged with a compile-time constant value that is accessible while the program is running. They can be accessed using <code>runtime.info.get_globals_with_tag</code>.
+</p>
+
+<pre class="hljs"><code class="language-onyx">use core {*}
+use runtime
+
+#tag "A tag value."
+a_global: i32;
+
+main :: () {
+    for runtime.info.get_globals_with_tag(str) {
+        printf("{} with type {} has a tag: '{}'", it.data, it.type, *it.tag);
+    }
+}
+</code></pre>
+
+<h2>Full Changelog</h2>
+<pre>
+Additions:
+- Tagging global variables.
+    - Just like procedure and structure tags.
+    - Use `runtime.info.tagged_globals` and `runtime.info.get_globals_with_tag()`
+- `logf` for formatted logging.
+    - This is only present if `conv.format` is present.
+- Ability to debug GC allocator by defining `runtime.vars.Enable_GC_Debug`.
+- Ability to set allocator on `Map`.
+- `string.to_cstr_on_stack`
+- `Date.day_of_week()`
+
+Removals:
+
+Changes:
+- `misc.any_to_map` now returns `? Map(str, any)`.
+- Build scripts on Linux no longer internally use `sudo`, requiring the script to be run with `sudo` instead.
+    - This makes it possible to easily build Onyx into a container image.
+- Parse errors with an unexpected symbol now say the symbol's name instead of TOKEN_TYPE_SYMBOL.
+
+Bugfixes:
+- `alloc.arena.clear` would not leave the arena in a proper state for further allocations.
+- `array.filter` was implemented incorrectly.
+- `runtime.platform.__get_env` was implemented incorrectly on Onyx runtime.
+- `Result.is_ok` and `Result.is_err` were implemented with incorrect return types.
+- `Timestamp.from_date` was implemented incorrectly.
+- `Date.add_months` was implemented incorrectly.
+- `alloc.atomic` was left untested.
+- `Reader.read_bytes` was implemented incorrectly.
+- `string.last_index_of` was implemented incorrectly.
+</pre>
index 7c24e63d20e5d6a46a9813d4b605240fb6df8951..1413ecc1dc3d815da148bab09abc1800235cb745 100644 (file)
@@ -1,6 +1,8 @@
-{{block "title"}}Onyx Documentation{{endblock}}
+{{ block "title" }}
+Onyx Documentation
+{{ endblock }}
 
-{{block "page_content"}}
+{{ block "page_content" }}
 
 <div class="container">
     <h1>Onyx Docs</h1>
@@ -38,7 +40,7 @@
     </p>
 </div>
 
-{{endblock}}
+{{ endblock }}
 
-{{extends "pages/normal_page"}}
+{{ extends "pages/normal_page" }}
 
index 7932430bf081b58abc77e8b265815eaae26ef7c0..f76ac9008f418adb1b194834f1780641ef312641 100644 (file)
@@ -1,6 +1,8 @@
-{{block "title"}}The Onyx Programming Language{{endblock}}
+{{ block "title" }}
+    The Onyx Programming Language
+{{ endblock }}
 
-{{block "page_content"}}
+{{ block "page_content" }}
 
 <div class="container center" style="margin: 0 auto">
 <h1>The <b>Onyx</b> Programming Language</h1>
index 96e6d61eefe1939f4d4dc4185023ddd39eaafca2..cde107ccc9bf79852d94c7f658d5b0270581a7d7 100644 (file)
@@ -1,4 +1,4 @@
-{{block "content"}}
+{{ block "content" }}
 
 <main>
 {% partial "partials/navbar" %}
@@ -8,7 +8,7 @@
 {% partial "partials/footer" %}
 </main>
 
-{{endblock}}
+{{ endblock }}
 
-{{extends "pages/base"}}
+{{ extends "pages/base" }}