From 12c4d3c46e60589ca713d2ff0ee833c6469021c1 Mon Sep 17 00:00:00 2001 From: vx-clutch Date: Sat, 29 Nov 2025 08:35:09 -0500 Subject: [PATCH] alpha commit --- README.md | 2 - fsd.vxserver.dev/Fes.toml | 9 +++ fsd.vxserver.dev/article/alpha-release.md | 10 +++ fsd.vxserver.dev/article/holiday-season.md | 3 + fsd.vxserver.dev/include/favicon.ico | Bin 0 -> 15406 bytes fsd.vxserver.dev/include/footer.lua | 13 ++++ fsd.vxserver.dev/include/header.lua | 15 ++++ fsd.vxserver.dev/include/snippet.lua | 77 +++++++++++++++++++++ fsd.vxserver.dev/www/about.lua | 25 +++++++ fsd.vxserver.dev/www/faq.lua | 27 ++++++++ fsd.vxserver.dev/www/index.lua | 28 ++++++++ fsd.vxserver.dev/www/news.lua | 62 +++++++++++++++++ fsd.vxserver.dev/www/reader.lua | 44 ++++++++++++ fsd.vxserver.dev/www/release.lua | 27 ++++++++ 14 files changed, 340 insertions(+), 2 deletions(-) delete mode 100644 README.md create mode 100644 fsd.vxserver.dev/Fes.toml create mode 100644 fsd.vxserver.dev/article/alpha-release.md create mode 100644 fsd.vxserver.dev/article/holiday-season.md create mode 100644 fsd.vxserver.dev/include/favicon.ico create mode 100644 fsd.vxserver.dev/include/footer.lua create mode 100644 fsd.vxserver.dev/include/header.lua create mode 100644 fsd.vxserver.dev/include/snippet.lua create mode 100644 fsd.vxserver.dev/www/about.lua create mode 100644 fsd.vxserver.dev/www/faq.lua create mode 100644 fsd.vxserver.dev/www/index.lua create mode 100644 fsd.vxserver.dev/www/news.lua create mode 100644 fsd.vxserver.dev/www/reader.lua create mode 100644 fsd.vxserver.dev/www/release.lua diff --git a/README.md b/README.md deleted file mode 100644 index 01a4d11..0000000 --- a/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# site - diff --git a/fsd.vxserver.dev/Fes.toml b/fsd.vxserver.dev/Fes.toml new file mode 100644 index 0000000..77038df --- /dev/null +++ b/fsd.vxserver.dev/Fes.toml @@ -0,0 +1,9 @@ +[site] + +name = "site" +version = "0.0.1" +authors = ["owen"] + +[fes] +version = "1.0.0" +CUSTOM_CSS = diff --git a/fsd.vxserver.dev/article/alpha-release.md b/fsd.vxserver.dev/article/alpha-release.md new file mode 100644 index 0000000..d975231 --- /dev/null +++ b/fsd.vxserver.dev/article/alpha-release.md @@ -0,0 +1,10 @@ +### Site version alpha release + +This is the alpha version of the fSD website, this site +contains many cool and interesting features which I +suggest that you navigate and learn more about. + +If you think that this experience can be improved +send you suggestion or report to . + +2025-28-11 diff --git a/fsd.vxserver.dev/article/holiday-season.md b/fsd.vxserver.dev/article/holiday-season.md new file mode 100644 index 0000000..63eb350 --- /dev/null +++ b/fsd.vxserver.dev/article/holiday-season.md @@ -0,0 +1,3 @@ +### Holiday Season + +Merry Christmas and Happy Holidays! diff --git a/fsd.vxserver.dev/include/favicon.ico b/fsd.vxserver.dev/include/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..4268696dfe85a0635646d10267ce2c42abc0ef24 GIT binary patch literal 15406 zcmeHOd5~1a8Gop|J2MM%gG9ttFhF?`mBWaFx-NTQS(U^j6)R{}v`S6+k4YJgrK?dC z*qvj&K!YY8h__NkP|+wTEIYeI%NRp29>ExoaP7P|v$My%&hPhTd#2x;_hxoxN6S<> zRj<1H>+kBX@9*o;v=Q2&+L$pK(i-jZ!!&K4rfD@b>GG_xn)U!-bLI@ze^=ACPt>$o zzyS#;(r_e0`YnlynN3k~M^mS{YiU&U@nfDa)_F1!VnkDixOr)p=sUkl2)B=Q#L1Ar7q$ z8y_EjhannvnASJbMvgF~kYa^a|ouhxI*LvpB3Oq@P2$RrhqSnE6=J z%8zO@#96NnSUj4drUfGo;SwLTwSlnl8(AKO`muLq>!+{lvFOkG^FW5CI-;i_+awKW zuS45cNqT2`>?1vbvX6WqVbKR7#=BbZ;JB)m1IHl03-qn{t|uLM#$ksykR~OcX%8mE z5%;BO(>U?9((a&dgbi;91iKqq7YKDXvCbcgT_EY5DR{pm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{yZ7YbVC#ZJq+virWQVK|6lf z>!ANm@<%$r___nbR^*zMPnS~a(5D-0LW(R@hPuz^+64WR+Ew}9w22Y8$GuRBj`?UH zdw6kG-0iuJ6|#S2Yit&9KFp^}DRq#&t4NdE(Ge5JzOanzQ^kt?_ISC1>5C+OiuK2O zQ&)x50eIr7qXyf(lBTqfB$3vHGz}pJEoHqhqbijSPG^HI> zw{?%V-grB}RuS);(a(rm+s{jo%{~2Z*1o8|2gMs|z;DF&xtHD&4j!A_M3w|o-T~U^ z)Axmllqpll-ibat#knq9w4m_?4`R&a?+eUd&v!XC9fnijeJz}RGq32bSB7J=^RmU< z!k&1oq;aNP_wd%BF)xoYRr0MGY}sS!fV~d+A=%BpB0kk?9AVA)JO5`x$s{SbV`0$?~SNyLSh%?YNxX(m= zEs3LtBnsmP_J3XKkG3Z;A6j{*7!rNCk+9dnzwt|7%l;whk8v^uefID4xYPT%j=8 + +int main() +{ + long x = 470020878965; + puts((void*)&x); // le representation + return 0; +} +]], + [[ +float Q_rsqrt( float number ) +{ + long i; + float x2, y; + const float threehalfs = 1.5F; + + x2 = number * 0.5F; + y = number; + i = * ( long * ) &y; // evil floating point bit level hacking + i = 0x5f3759df - ( i >> 1 ); // what the fuck? + y = * ( float * ) &i; + y = y * ( threehalfs - ( x2 * y * y ) ); // 1st iteration +// y = y * ( threehalfs - ( x2 * y * y ) ); // 2nd iteration, this can be removed + + return y; +} +]], + [[ +#include +int main(int argc, char **argv) +{ + return printf("%s: Comma operator\n", argv[0]), 2; +} +]], + [[ +void welford(double x, double *n, double *mean, double *m2) +{ + (*n)++; + double d = x - *mean; + *mean += d / *n; + *m2 += d * (x - *mean); +} +]], + [[ +#define ever (;;) + +for ever { + ... +} +]], + [[ +void *xmalloc(size_t size) +{ + void *ret = malloc(size); + if (!ret) + die("memory exhausted"); + return ret; +} +]], +} + +M.daily_random = function() + local day = tonumber(os.date("%d")) + local n = #snippet + local a = 1664525 + local c = 1013904223 + local m = 2^32 + local v = (a * day + c) % m + local r = v / m + return snippet[math.floor(r * n) + 1] +end + +return M diff --git a/fsd.vxserver.dev/www/about.lua b/fsd.vxserver.dev/www/about.lua new file mode 100644 index 0000000..44c0930 --- /dev/null +++ b/fsd.vxserver.dev/www/about.lua @@ -0,0 +1,25 @@ +local fes = require("fes") +local std = fes.std +local u = fes.util + +local site = fes.fes() + +local title = "Free Software Distributions" + +site.title = title .. "- About" +site.copyright = u.copyright("https://git.vxserver.dev/fSD", "fSD") + +site:banner(fes.app.header.render(std)) + +site:note(u.cc({ + std.h2("Free Software Distributions"), + std.p("Free Software Distributions are a collection of free, minimal, and hackable packages desinged for the similar developer: someone who values freedom in software and a partition from corporation.") +})) +site:note(u.cc({ + std.h2("Copyright and License"), + std.p("Except where otherwise stated, content on this site is copyright (C) 2025 by fSD and is made avaliable to you under the " .. fes.std.a("https://creativecommons.org/licenses/by-nc/4.0/", "Creative Commons Attribtuion-NonCommerical 4.0 International")) +})) + +site:note(fes.app.footer.render(std)) + +return site diff --git a/fsd.vxserver.dev/www/faq.lua b/fsd.vxserver.dev/www/faq.lua new file mode 100644 index 0000000..adeb762 --- /dev/null +++ b/fsd.vxserver.dev/www/faq.lua @@ -0,0 +1,27 @@ +local fes = require("fes") +local std = fes.std +local u = fes.util + +local site = fes.fes() + +local title = "Free Software Distributions" + +site.title = title .. "- FAQ" +site.copyright = u.copyright("https://git.vxserver.dev/fSD", "fSD") + +site:banner(fes.app.header.render(std)) + +site:note(u.cc({ + std.h1("Frequently Asked Questions"), + std.p("Welcome to the world of fSD, come here ye before thou ask thy stupid questions."), + std.h2("Why is it called fSD?"), + std.p([[ + The name "Free Software Distributions" is dervided from exactly what we do, we distribute free software. + This name stems from the Berkeley Software Distribution (BSD) specifically the Software Distribution part. + ]]), + std.p('It is worth pointing out that the word "free" is being used in two ways here: one meaning "at no cost" and the other meaning "do whatever you like".'), +})) + +site:note(fes.app.footer.render(std)) + +return site diff --git a/fsd.vxserver.dev/www/index.lua b/fsd.vxserver.dev/www/index.lua new file mode 100644 index 0000000..9d249d9 --- /dev/null +++ b/fsd.vxserver.dev/www/index.lua @@ -0,0 +1,28 @@ +local fes = require("fes") +local std = fes.std +local u = fes.util + +local site = fes.fes() + +local title = "Free Software Distributions" + +site.title = title +site.copyright = u.copyright("https://git.vxserver.dev/fSD", "fSD") + +site:banner(fes.app.header.render(std)) + +site:note(std.blockquote([[ +"UNIX is very simple" - Dennis Ritchie +
+"GNU's Not UNIX" - Richard Stallman +]] )) + +site:note(u.cc({ + std.h2("Daily Random Snippet"), + std.p("The following is a random code snippet that features a unique feature or syntax."), + std.blockquote(std.pre(fes.app.snippet.daily_random())), +})) + +site:note(fes.app.footer.render(std)) + +return site diff --git a/fsd.vxserver.dev/www/news.lua b/fsd.vxserver.dev/www/news.lua new file mode 100644 index 0000000..75e4540 --- /dev/null +++ b/fsd.vxserver.dev/www/news.lua @@ -0,0 +1,62 @@ +local fes = require("fes") +local std = fes.std +local u = fes.util + +local site = fes.fes() + +local title = "Free Software Distributions" + +site.title = title .. " - Site news" +site.copyright = u.copyright("https://git.vxserver.dev/fSD", "fSD") + +site:banner(fes.app.header.render(std)) + +local articles_dir = "article" +local files = {} + +local p = io.popen("ls -1 " .. articles_dir) +if p then + for file in p:lines() do + if file:match("%.md$") then + files[#files + 1] = file + end + end + p:close() +end + +table.sort(files, function(a, b) return a > b end) + +local news_html = {} +local news_titles = {} + +for _, file in ipairs(files) do + local path = articles_dir .. "/" .. file + local f = io.open(path, "r") + if f then + local content = f:read("*a") + f:close() + news_html[#news_html + 1] = fes.markdown_to_html(content) + local title_line = content:match("^#+%s*(.-)%s*\n") or "" + news_titles[#news_titles + 1] = std.h3(title_line) + end +end + +site:note(u.cc({ + std.h1("Site news - Latest"), + std.blockquote(std.p(news_html[1] or "")), +})) + +local other_titles = {} + +for i = 2, #news_titles do + other_titles[#other_titles + 1] = news_titles[i] +end + +site:note(u.cc({ + std.center(std.h2("Other")), + table.concat(other_titles, "") +})) + +site:note(fes.app.footer.render(std)) + +return site diff --git a/fsd.vxserver.dev/www/reader.lua b/fsd.vxserver.dev/www/reader.lua new file mode 100644 index 0000000..8dbc36f --- /dev/null +++ b/fsd.vxserver.dev/www/reader.lua @@ -0,0 +1,44 @@ +local fes = require("fes") +local std = fes.std +local u = fes.util + +local site = fes.fes() + +local title = "Free Software Distributions" + +site.title = title .. " - Random Article" +site:banner(std.center(std.h3(std.a("javascript:window.history.back();", "Return")))) + +math.randomseed(os.time()) + +local articles_dir = "article" +local files = {} + +local p = io.popen("ls -1 " .. articles_dir) +if p then + for file in p:lines() do + if file:match("%.md$") then + files[#files + 1] = file + end + end + p:close() +end + +local chosen = files[math.random(#files or 1)] +local content = "" + +if chosen then + local f = io.open(articles_dir .. "/" .. chosen, "r") + if f then + content = f:read("*a") + f:close() + end +end + +local html = fes.markdown_to_html(content or "") + +site:note(u.cc({ + std.div(html) +})) + +return site diff --git a/fsd.vxserver.dev/www/release.lua b/fsd.vxserver.dev/www/release.lua new file mode 100644 index 0000000..adeb762 --- /dev/null +++ b/fsd.vxserver.dev/www/release.lua @@ -0,0 +1,27 @@ +local fes = require("fes") +local std = fes.std +local u = fes.util + +local site = fes.fes() + +local title = "Free Software Distributions" + +site.title = title .. "- FAQ" +site.copyright = u.copyright("https://git.vxserver.dev/fSD", "fSD") + +site:banner(fes.app.header.render(std)) + +site:note(u.cc({ + std.h1("Frequently Asked Questions"), + std.p("Welcome to the world of fSD, come here ye before thou ask thy stupid questions."), + std.h2("Why is it called fSD?"), + std.p([[ + The name "Free Software Distributions" is dervided from exactly what we do, we distribute free software. + This name stems from the Berkeley Software Distribution (BSD) specifically the Software Distribution part. + ]]), + std.p('It is worth pointing out that the word "free" is being used in two ways here: one meaning "at no cost" and the other meaning "do whatever you like".'), +})) + +site:note(fes.app.footer.render(std)) + +return site