From a0f834cf0e679eb29ef06700dc95e5f4a7b927c4 Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Sun, 24 Sep 2023 16:58:41 -0500 Subject: [PATCH] added 0.1.6 news article --- onyx-pkg.ini | 4 +- src/app.onyx | 5 ++- www/news-articles/index.json | 6 +++ www/news-articles/release-0.1.6.html | 59 ++++++++++++++++++++++++++++ www/templates/pages/docs.html | 10 +++-- www/templates/pages/homepage.html | 6 ++- www/templates/pages/normal_page.html | 6 +-- 7 files changed, 83 insertions(+), 13 deletions(-) create mode 100644 www/news-articles/release-0.1.6.html diff --git a/onyx-pkg.ini b/onyx-pkg.ini index e6a7bc9..345f1de 100644 --- a/onyx-pkg.ini +++ b/onyx-pkg.ini @@ -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 diff --git a/src/app.onyx b/src/app.onyx index 0bde668..2eee6d8 100644 --- a/src/app.onyx +++ b/src/app.onyx @@ -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..."); } diff --git a/www/news-articles/index.json b/www/news-articles/index.json index a12f56e..b4b61e0 100644 --- a/www/news-articles/index.json +++ b/www/news-articles/index.json @@ -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 index 0000000..82c60d6 --- /dev/null +++ b/www/news-articles/release-0.1.6.html @@ -0,0 +1,59 @@ +

Beta Release 0.1.6

+

+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. +

+ +

+There is one new feature worth mentioning and that is tagged globals. +

+ +

Tagged Globals

+

+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 runtime.info.get_globals_with_tag. +

+ +
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);
+    }
+}
+
+ +

Full Changelog

+
+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.
+
diff --git a/www/templates/pages/docs.html b/www/templates/pages/docs.html index 7c24e63..1413ecc 100644 --- a/www/templates/pages/docs.html +++ b/www/templates/pages/docs.html @@ -1,6 +1,8 @@ -{{block "title"}}Onyx Documentation{{endblock}} +{{ block "title" }} +Onyx Documentation +{{ endblock }} -{{block "page_content"}} +{{ block "page_content" }}

Onyx Docs

@@ -38,7 +40,7 @@

-{{endblock}} +{{ endblock }} -{{extends "pages/normal_page"}} +{{ extends "pages/normal_page" }} diff --git a/www/templates/pages/homepage.html b/www/templates/pages/homepage.html index 7932430..f76ac90 100644 --- a/www/templates/pages/homepage.html +++ b/www/templates/pages/homepage.html @@ -1,6 +1,8 @@ -{{block "title"}}The Onyx Programming Language{{endblock}} +{{ block "title" }} + The Onyx Programming Language +{{ endblock }} -{{block "page_content"}} +{{ block "page_content" }}

The Onyx Programming Language

diff --git a/www/templates/pages/normal_page.html b/www/templates/pages/normal_page.html index 96e6d61..cde107c 100644 --- a/www/templates/pages/normal_page.html +++ b/www/templates/pages/normal_page.html @@ -1,4 +1,4 @@ -{{block "content"}} +{{ block "content" }}
{% partial "partials/navbar" %} @@ -8,7 +8,7 @@ {% partial "partials/footer" %}
-{{endblock}} +{{ endblock }} -{{extends "pages/base"}} +{{ extends "pages/base" }} -- 2.25.1