diff --git a/fsd.vxserver.dev/include/snippet.lua b/fsd.vxserver.dev/include/snippet.lua deleted file mode 100644 index da89260..0000000 --- a/fsd.vxserver.dev/include/snippet.lua +++ /dev/null @@ -1,168 +0,0 @@ -local M = {} - -local snippet = { -[[ -#include -int main(void) -{ - long x = 470020878965; - puts((void *)&x); - 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; - i = 0x5f3759df - (i >> 1); - y = *(float *)&i; - y = y * (threehalfs - (x2 * y * y)); - 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 *r = malloc(size); - if (!r) - abort(); - return r; -} -]], -[[ -#include -uint32_t rotl32(uint32_t x, uint32_t n) -{ - return (x << n) | (x >> (32 - n)); -} -]], -[[ -#include -void memzero(void *p, size_t n) -{ - unsigned char *t = p; - while (n--) - *t++ = 0; -} -]], -[[ -#include -int main(void) -{ - int a = 0; - if (a++ == 0 && a++ == 1 && a++ == 2) - printf("chain ok\n"); - return 0; -} -]], -[[ -static unsigned long next = 1; -int lrand(void) -{ - next = next * 1103515245 + 12345; - return (unsigned)(next / 65536) & 32767; -} -]], - -[[ -#!/bin/sh -set -eu -printf '%s\n' "$1" -]], -[[ -#!/bin/sh -if [ "$#" -eq 0 ]; then - exit 1 -fi -printf '%s\n' "$@" -]], -[[ -#!/bin/sh -x=0 -while :; do - x=$((x + 1)) - [ "$x" -gt 3 ] && break -done -printf '%s\n' "$x" -]], -[[ -#!/bin/sh -exec 3>&1 -printf 'ok\n' >&3 -]], -[[ -#!/bin/sh -f() { - printf '%s\n' "$1" -} -f "${1:-none}" -]], -[[ -#!/bin/sh -for i in a b c; do - printf '%s\n' "$i" -done -]], -[[ -#!/bin/sh -x=$(printf '%s' foo) -printf '%s\n' "$x" -]], -[[ -#!/bin/sh -read x -printf '%s\n' "$x" -]], -[[ -#!/bin/sh -PATH=/bin:/usr/bin -export PATH -printf '%s\n' "$PATH" -]], -[[ -#!/bin/sh -trap 'printf trap\n' HUP INT TERM -sleep 1 -]] -} - -M.daily_random = function() - local t = os.date("*t") - local seed = t.day + t.month * 31 + t.year * 997 - local a = 1103515245 - local c = 12345 - local m = 2 ^ 31 - seed = (a * seed + c) % m - local r = seed / m - local n = #snippet - return snippet[math.floor(r * n) + 1] -end - -return M diff --git a/fsd.vxserver.dev/news/02-prospects.md b/fsd.vxserver.dev/news/02-prospects.md new file mode 100644 index 0000000..bb9cf1e --- /dev/null +++ b/fsd.vxserver.dev/news/02-prospects.md @@ -0,0 +1,13 @@ +# fSD Prospects + +In the future I hope to the fsdproject.org domain. fsd.org is owned by someone, +yet they do not do anything with it. So is fsd.dev, fsd.com, fsd.xyz, fsd.io, +fsd.cc. So I have very few options. + +Here they are: + - fsdproject.org + - fsd.site + + As I stated I am leaning towards fsdproject.org because I like that .org. + +2025-17-12 diff --git a/fsd.vxserver.dev/www/index.lua b/fsd.vxserver.dev/www/index.lua index 3101a54..ce7e032 100644 --- a/fsd.vxserver.dev/www/index.lua +++ b/fsd.vxserver.dev/www/index.lua @@ -12,17 +12,18 @@ site.favicon = "/static/favicon.ico" site:banner(fes.app.header.render(std)) -site:note(std.blockquote([[ -"UNIX is very simple" - Dennis Ritchie -
-"GNU's Not UNIX" - Richard Stallman -]] )) +site:custom(fes.markdown_to_html([[ +News +=== -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())), -})) +2025-12-17 +---------- +Some changes were made to this site. + +[sites](https://git.vxserver.dev/fSD/sites) +* General improvments and fixes +* Moving the news page to here. +]])) site:note(fes.app.footer.render(std))