Posts by ns@sacred.harpy.faith
 (DIR) Post #B6MIXq4cXOxIuwW9Y0 by ns@sacred.harpy.faith
       0 likes, 0 repeats
       
       ideally i'd be able to cat > /net/faith/sacred.harpy/accountctl/post
       
 (DIR) Post #B6MIaMollYYx3FJD8a by ns@sacred.harpy.faith
       1 likes, 0 repeats
       
       hmm.i want to open the text of file a, edit it in a held window, and write it to file bis the only way to accomplish this% cp a b% hold b?
       
 (DIR) Post #B6MQNWYZ2uvn7k7FoW by ns@sacred.harpy.faith
       1 likes, 0 repeats
       
       @HatkeshiatorTND @herrstancil @histoire3 this is the post that sent anni down, huh
       
 (DIR) Post #B6q3QGK5rqDqnzETJo by ns@sacred.harpy.faith
       1 likes, 0 repeats
       
       it's the same client. it's just a couple lines different.echo
       
 (DIR) Post #B6q3R3PRMkc92l6vxI by ns@sacred.harpy.faith
       1 likes, 0 repeats
       
       FUCKED IT UP AWARD
       
 (DIR) Post #B6q3RryFNcAJrBmR9M by ns@sacred.harpy.faith
       1 likes, 0 repeats
       
       source for this client is as follows#!/bin/rchpost -u https://bloat.freesoftwareextremist.com/nav -m /post is_nsfw:false content:$1 csrf_token:`{cat /usr/glenda/shftoken} referrer:/nav > /dev/nullthere.
       
 (DIR) Post #B6q3W7qwGxBSGyOKPY by ns@sacred.harpy.faith
       1 likes, 0 repeats
       
       will be doing hacky bullshit with this acc now. it is posting on shf through fsofte's bloat fe. none of those words are in the bible btw.
       
 (DIR) Post #B6q3XZuxPhsHbUxoAa by ns@sacred.harpy.faith
       1 likes, 0 repeats
       
       hell fucking yeahi got it working#!/bin/rcif (echo $#* 1 eq '=' | gs | grep false > /dev/null){    echo usage: $0 '''message'''    exit}message = $1hpost -u https://bloat.freesoftwareextremist.com/nav -m /post is_nsfw:false content:$message csrf_token:`{cat /usr/glenda/lib/shftoken} referrer:/nav > /dev/null
       
 (DIR) Post #B6soSM6UQl0DTTHzbk by ns@sacred.harpy.faith
       1 likes, 0 repeats
       
       so i wrote a programi don't tend to like base plan9 fortune, so i wrote a replacement```#include <u.h>#include <libc.h>#include <bio.h>char *choice[2048];char*dupli (char *s){    char *p;    p = malloc (strlen (s) + 1);    if (p) strcpy (p, s);    return p;}voidusage (void){    print ("usage: nurtune [-k n] [file]");    exits ("usage");}voidmain (int argc, char *argv[]){int i, k, n, m;char *p, *file;Biobuf *f;    k = 1;    file = "/fd/0";    ARGBEGIN{    case 'k':        k = atoi (EARGF (usage()));        if (k <= 0) sysfatal ("reservoir size cannot be negative, you stupid fucking nigger");        break;    default:        usage();    }ARGEND;    if (argc > 0) file = argv[0];    if ((f = Bopen (file, OREAD)) == nil) sysfatal ("can't open %s: %r", file);    srand (truerand ());    n = 0;    while ((p = Brdline (f, '\n')) != nil)    {        p[Blinelen (f)-1] = 0;        if (n < k) choice[n] = dupli ((char*)p); else        {            i = nrand (n + 1);            if (i < k)            {                free ((void*)choice[i]);                choice[i] = dupli ((char*)p);            }        }        n ++;    }    if (n == 0) sysfatal ("no fortunes found");    m = n < k ? n : k;    for (i = 0; i < m; i ++) print ("%s\n", choice[i]);    exits (0);}```i hope you like it. i was helped out in some small parts (primarily figuring out the non-1 k handling (i am not as good at c as i should like to be), and secondarily but not unimportantly debugging what ended up being a char instead of a *char) by the deepseek llm, meaning my code is INADMISSIBLE in upstream 9front. INADMISSIBLE I SAY!
       
 (DIR) Post #B6t0lnJWgcs2okQFtY by ns@sacred.harpy.faith
       0 likes, 0 repeats
       
       #include <u.h>#include <libc.h>#include <bio.h>char *choice[65536];voidmain (int argc, char *argv[]){int i, k, n, m;char *p, *file;Biobuf *f;    k = 1;    file = "/fd/0";    ARGBEGIN{    case 'k':        k = atoi (EARGF (sysfatal ("Misfortune!")));        if (k <= 0) sysfatal ("reservoir size cannot < 1, you stupid fucking nigger");        break;    default:        print ("lol, lmao\n");        goto End;    }ARGEND;    if (argc > 0) file = argv[0];    if ((f = Bopen (file, OREAD)) == nil) sysfatal ("can't open %s: %r", file);    srand (truerand ());    n = 0;    while ((p = Brdline (f, '\n')) != nil)    {        p[Blinelen (f)-1] = 0;        if (n < k) choice[n] = strdup (p); else        {            i = nrand (n + 1);            if (i < k)            {                free ((void*)choice[i]);                choice[i] = strdup (p);            }        }        n ++;    }    if (n == 0) sysfatal ("no fortunes found");    m = n < k ? n : k;    for (i = 0; i < m; i ++) print ("%s\n", choice[i]);    End: exits (0);}
       
 (DIR) Post #B6t4q8LapJVd1giJge by ns@sacred.harpy.faith
       1 likes, 0 repeats
       
       #include <u.h>#include <libc.h>#include <bio.h>voidmain (int argc, char* argv[]){    Biobuf in, out;    int lenin, stalin, c, i;    if (argc != 3) sysfatal ("expected two arguments");    lenin = strlen (argv[1]);    stalin = strlen (argv[2]);    if (lenin == 0) sysfatal ("cannot replace empty string");    Binit (&in, 0, OREAD);    Binit (&out, 1, OWRITE);    while ((c = Bgetc (&in)) >= 0)    {        if (c != argv[1][0])        {            Bputc(&out, c);            goto Next;        }        for (i = 1; i < lenin; i++)        {            c = Bgetc (&in);            if (c < 0 || c != argv[1][i])            {                Bputc (&out, argv[1][0]);                if (c >=0) Bungetc (&in);                if (i > 1) Bwrite (&out, argv[1]+1, i-1);                goto Next;            }        }        Bwrite (&out, argv[2], stalin);        Next:;    }    Bterm (&in); Bterm (&out);    exits(0);}this may or may not work. the point of this was twofold. the first is that sed s/// used without a regular expression in it is both an absurdly common usecase and akin to using a flamethrower to make toast. the second is that i wanted to get my hands dirty with buffer stuff.
       
 (DIR) Post #B6v9mZpXajzZBxlU1o by ns@sacred.harpy.faith
       1 likes, 0 repeats
       
       test
       
 (DIR) Post #B6vASkuEnoXJhn4eu0 by ns@sacred.harpy.faith
       1 likes, 0 repeats
       
       testhello
       
 (DIR) Post #B6vAkbOctm0hQJnXou by ns@sacred.harpy.faith
       1 likes, 0 repeats
       
       hello#!/bin/rctoken = `{cat /usr/glenda/lib/shftoken}ifs = ()if (~ $1 -f){    shift    peatfile = `{cat $1}    shift}if (echo $#* 1 eq '=' | gs | grep false > /dev/null){    echo 'usage: $0 [-f file] ''message'''    exit}message = $1peatinquestion = $message^$peatfileecho trying to peat the peat with characteristicsecho $peatinquestion | wcecho and headecho $peatinquestion | sed 10qechoecho in 5sleep 1echo 4sleep 1echo 3sleep 1echo 2sleep 1echo 1sleep 1hpost -u https://bloat.freesoftwareextremist.com/nav -m /post is_nsfw:false content:$peatinquestion csrf_token:$token referrer:/nav > /dev/nullecho 0
       
 (DIR) Post #B6vBECbrcPvLEl6WiO by ns@sacred.harpy.faith
       1 likes, 0 repeats
       
       @Zergling_manterm% hpost https://sacred.harpy.faith/api/v1/statuses/bin/hget:92: < can't open: /mnt/web/0/body: 400 Bad Request: '/mnt/web/0/body'that's why.
       
 (DIR) Post #B6vCBD0plTPvZUv7Ue by ns@sacred.harpy.faith
       1 likes, 0 repeats
       
       shitting up zerg's timeline with 9slop award
       
 (DIR) Post #B6vCPZEPx36aXM7XEG by ns@sacred.harpy.faith
       1 likes, 0 repeats
       
       echo: write error: one does not simply write into mordor
       
 (DIR) Post #B6vWnmXK8LqZpomtCy by ns@sacred.harpy.faith
       1 likes, 0 repeats
       
       @Zergling_man this is also a test of mentions secretly but shhh#include <u.h>#include <libc.h>#include <bio.h>voidmain (void){    Biobuf bin, bout;    char hex[16] = "0123456789abcdef";    uchar buf[8192];    int n, i;    Binit (&bin, 0, OREAD);    Binit (&bout, 1, OWRITE);    while ((n = Bread (&bin, buf, sizeof buf)) > 0)    {        for (i = 0; i < n; i++)        {            Bputc (&bout, hex[buf[i] >> 4]);            Bputc (&bout, hex[buf[i] & 0xF]);        }    }    Bterm (&bin);    Bterm (&bin);    exits(0);}
       
 (DIR) Post #B7VIevh7wm0Z6EV3Oy by ns@sacred.harpy.faith
       0 likes, 0 repeats
       
       even my corrected version fails with the same error.  #include <u.h>#include <libc.h>#include <bio.h>ucharv (uchar b){    b = (b >> 4) | (b << 4);    b = ((b & 0xCC) >> 2) | ((b & 0x33) << 2);    b = ((b & 0xAA) >> 1) | ((b & 0x55) << 1);    return b;}voidmain (void){    Biobuf B;    int w, h, i, r, t, x;    uchar *d; char *p;    Binit (&B, 0, OREAD);    p = Brdline (&B, '\n');    Bterm (&B);    w = strtol(p, &p, 10);    h = strtol(p, &p, 10);    r = (w + 7) / 8;    t = r * h;    d = malloc(t);    for (i = 0; i < t; i ++) d [i] = v ((uchar) (strtol (p, &p, 16)));    print ("%11s %11d %11d %11d %11d ", "k1", 0, 0, w, h);    write (1, d, t);    exits(0);} maybe i should use stdio... i am clearly filtered :mayasad: thank you for reading my blog post.
       
 (DIR) Post #B7xiDnPi67XIdtZydc by ns@sacred.harpy.faith
       0 likes, 1 repeats
       
       うー:japan:アル thank you for reading my blog post.