the iris system

a system of nerds · plural they/them · twitch.tv/DarcyMeow

blobcat(they/them)
thellere(he/him)
Time ago
goropancakechi

When Firefox suddenly changes its layout and you don't do well with sudden change

thellere

OH THANK GOD IT'S NOT JUST ME


blobcat

So it finally hit stable, huh?



blobcat(they/them)
tsukuy0mi
Time ago


blobcat(they/them)
posted this
Time ago

A random thought popped into our head earlier today - what if we had a website that told whoever visited it if we were awake? Well, we have that now: awake.iris.ac.nz!

It's entirely PluralKit based - switch-outs (a switch with no fronters) in PluralKit are interpreted as "asleep," and switches with fronters are "awake" - it also shows a little card for each fronting system member with their profile pic/name/pronouns.

The "for XhYm" in the middle is calculated as the time since your last switch-out ended, so even if you switch during the day, it still shows the total time you've been "awake." (And yes, the timer in this screenshot is real - we have actually been awake for over 52 hours!)

Anyway, code's over here.


blobcat(they/them)
posted this
Time ago
MagentaServer debugging view, showing that there is no current session
MagentaServer debugging view, showing a valid session with a CSRF token and a user ID, and details about the logged in user

Working on MagentaServer, the new reference server implementation for the MagentaSSO authentication protocol - something I came up with a while ago, which is basically "a slightly opinionated take on the bare minimum you need for a secure single-sign-on protocol."

This is the development debugging page, containing a couple utility buttons; a view of the session data and info about the currently-logged-in user (if present); and a way to create a new user with an arbitrary permissions string.

The app is Slim 4, with Twig for templating (incl. a custom Twig extension), a pieced-together Controller class handling method dispatch, Laravel's illuminate/database for the models, and cakephp/phinx for database migrations. Session data is stored as a Redis hash using the session ID as the primary key, similar to what Waterfall does (and honestly, I don't know why I didn't do this style of session management earlier!).

It doesn't look like it does much just yet - all that's really implemented is login and logout, with no actual user management or administration tools - but there's so much going on under the hood to make this all work and I'm very pleased with it.

I'm mainly working on this so that I actually have a reference MagentaSSO server that I'm happy with - the current reference implementation is a very very very very VERY bad Python/Flask app. And also I need to have a working MagentaSSO server in the next few days so I can set up a few of my internal tools again, and then rework the thing I posted about a while ago to use this new application structure (and also use MagentaSSO for authentication).


blobcat(they/them)
posted this
Time ago

Turns out that life in general is a lot easier to manage when your chronic pain is somewhat under control for the first time in over a year.

Interesting, huh.


blobcat(they/them)
posted this
Time ago

A

I've been thinking of things that could be done to improve the experience for developers of Waterfall, while at the same time making the site nicer for end users. This is a post going over all those thoughts.

I expect no one to pay attention to this, and I hope the read-more works.

Using an ORMThe current database handling is… strange. It's extremely tied to PostgreSQL (which I know Thell wants to change), and although using raw SQL everywhere is fine I guess, I'm not that much of a fan of it. Using a proper ORM (like Laravel's Database, which I have experience with) is a lot better.

Doing this eliminates the weird hackiness that Waterfall's database code has (see the postgres_to_php and php_to_postgres functions in src/classes/Postgres.class.php for an idea), avoids duplication of model initialization stuff (see src/classes/User.class.php - the entire constructor is duplicated in the getByEmail function), you can batch updates on a model instance (rather than every individual updateX function doing a database write, just set the properties and $instance->save() once you're done), and makes it a decent amount easier to write the models themselves - for example, the User model would not need to have functions like updateIP or updateBirthday.

Use a migration system

Currently, to set up Waterfall, you just pipe the schema in tests/prep/wf.sql into psql. This is all well and good when you're running a cascade and not making any modifications, but when you're implementing a feature that needs to change the database schema, this is a huge problem.

Use a template system

Adding templating has a bunch of advantages.

First off, there's template inheritance. You can have a base template, which defines blocks that rendered templates can override or extend, and you can include subtemplates.

In Waterfall's case, this would mean there wouldn't be a header.php and footer.php which get included in every rendered page (which you couldn't do with the next thing in this list). Instead you'd have a template named templates/base.html, which cleanly and clearly defines the blocks within the page - such as a title block inside a head block (which allows a template to define what goes in the page <title> easily, but also allows the template to either add something to, or completely override, <head>), and then a content block within a body block (same principle, either add something to a container within <body> by overriding the content block, or completely replace the content of <body> by overriding the body block).

Using the example of the "create a text post" page, you would have a file like templates/new_post/text.html, that inherits from templates/new_post/base.html, which in turn inherits from templates/base.html. The templates/new_post/text.html file could include templates/includes/editor.html (which would do everything to render the text editor and the tag editor).

Using templates like this is made somewhat easier by the next point, which is…

Using a Model-View-Controller structure

This one is more of a personal preference, rather than something I see as necessary. In my opinion, it makes things a lot cleaner, makes it easier for new developers to see what's going on, and reduces code duplication.

Using the previous example, Waterfall's "creating a text post" code - this would mean that the "render" code (currently html/post/text.php and the "process" code html/process/post/text.php would live in the same controller (theoretically, in src/Controllers/NewPostText.php), with a method for a GET request (my framework uses requestGET) and a method for a POST request (similarly, requestPOST). The requestGET method would just render a template, and the requestPOST method would create the text post.

This has the advantage that the URL for both the "render" code and the "process" code is the same, meaning that you can do things such as having the POST method return the same template as the GET method after creating the post (with an error message passed into the template if creating the post failed), but only if a specific form value was not given (you'd set that form value in the JS form submission) or if the Accept header is set to application/json. That basically means you get JavaScript-less site operation for free - if the form value (or request header) is provided, the POST method returns JSON; if not, it returns HTML.

Using CSS var() for easier theming

This is a relatively small change to the main CSS of the site, but it means that creating new themes for the site would be extremely easy (and also means that anyone creating user styles gets the same theming support for free).

Basically, this comes down to defining all the colors used in the CSS of the site as variables in a :root {} block at the top of the CSS file, and using var(--variable-name) in place of the color value where it's actually used in the main CSS. Once that's done, the majority of themes will just contain another :root {} block overriding the colors/whatever used in the main CSS file. Include the theme CSS file in the page after the main CSS file like normal, boom, easy themes. User styles would do the exact same thing.

Having a code style enforced by CI

This is me nitpicking. Have CI fail if code isn't indented properly, or otherwise doesn't conform to the code style. The current codebase is bad at having a consistent style, and the indentation is a mess (which isn't a personal attack on Thell - I'm guilty of this as well).

Having an administration panel

I'm not sure if Thell has something for this already and it just isn't open source, but. I'd like there to be an admin panel for the site, which allows various operations on users (such as viewing info on blocks, changing date of birth, email address, modifying permissions, sending a password reset, deleting, …), blogs (changing the URL, editing the title/description/etc, adding/removing blog members, deleting, …), and posts (editing tags, downgrading from "art" to "image", setting as a featured post, deleting, …).

This would make things easier for Thell as the site's administrator (as well as make it easier for anyone who happens to run a cascade), and also make things easier in development (someone modifying the code that handles featured posts could just log into the admin panel and mark a bunch of posts as featured, rather than having to open psql and manually INSERT INTO featured_posts (post_id, on_blog) VALUES (...).

Improving the setup documentation

This should go without saying, because there's currently one (1) piece of documentation on setting up Waterfall, and the rest of it is in Thell's head.

I think that's it.

If you have any questions, message me here on Waterfall, or ping me in the Discord (I've got my URL in my nickname, and you can probably find me in the #developers channel).


blobcat(they/them)
posted this
Time ago
A screenshot of the Portal 2 main menu, with Darcy's VTuber avatar (a non-binary person with aquamarine hair, wearing a pink hoodie) on the right hand side.

As decided by a Twitter poll, I'll be streaming Portal 2 today! It's been a hot second since I've played Portal 2, so this should be pretty fun!

Come join me at 09:00 NZST (21:00 UTC) - that's in just under 4 hours from posting this!

💙 twitch.tv/DarcyMeow 💙


blobcat(they/them)
posted this
Time ago

working on version 2 of my "augmented memory" app!

it lets you have multiple log entries per day, and each entry has an associated "mood" - the best and worst moods of a day are shown on the day view page.

this rewrite is in PHP, since it's a lot easier to deploy, and also it's a good way to brush up on my PHP so i can contribute more to waterfall, haha.

few things left to do:

  • allowing tags on each log entry, which can be searched
  • allowing linking between log entries
  • adding a "your year in moods" view, which will show the best and worst moods for each day as colours on a year calendar
  • a to-do list, where you can tag items as belonging to projects, and set the difficulty of the task
  • and then, a "get a random small task" button, because i'm indecisive and need a computer to tell me what to work on

so far, it's almost at feature parity with v1 (which was a very badly put together Ruby/Sinatra codebase), the only thing missing here that is in v1 is linking between entries, but that shouldn't be too hard!


blobcat(they/them)
posted this
Time ago

just finished playing through Halo: Reach for the second time. i love that game


blobcat(they/them)
staff
Time ago

Community Update - Waterfall 1.1

staff

Waterfall 1.1

The site's first update since being open sourced! Much of this update is from community contributors, so a special shoutout to @blobcat for doing a lot of the legwork! Patch notes are as follows:

DEFECT FIXES:

  • Fixed an issue preventing account deletion
  • Logout option has been re-added
  • Two-factor authentication is available again
  • Fixed a security issue with tag searching on blogs

DEVELOPERS:

  • Sentry is now optional in development environments
  • Set-up documentation improved
  • Improved Raven Comments

Waterfall 1.2 will follow soon with additional fixes and improvements, and then it's on to designing 2.0.

For any features or requests, please use the GitHub, and feel free to try your hand at implementing something too!


blobcat(they/them)
posted this
Time ago

hell yeah, my pull requests to Waterfall itself got merged!

two-factor authentication support, coming soon to a Waterfall near you


blobcat(they/them)
posted this
Time ago

thell's post about open sourcing waterfall made me think about resuming doing ~dev streams~ and tbh? i'm so keen to do that again

also i guess i need a software dev tag if i'm gonna keep up This Posting huh. let's go simple and make that #softwaredev


blobcat(they/them)
posted this
Time ago

i may have been up all night writing code and now i'm going to spend all day writing code

love this for me actually


blobcat(they/them)
posted this
Time ago

there's no posts in the tscosi tag and this makes me sad. maybe one day when i feel comfortable with my art i'll post tscosi fanart? maybe.


blobcat(they/them)
vii
Time ago
vii

blobcat(they/them)
posted this
Time ago

now that i'm thinking about my memory issues, i really do think they're getting worse

i'm trying to think of what i did yesterday, because i know that i did things, i just. i can't remember what. it's as if those memories have just vanished

i know that i've asked hannah what day it is three times already today, but i had to look at my phone just now to remember that it's wednesday.

i have to look at my watch frequently to see what time it is, because i have no idea if i've been sitting here for the past 30 minutes doing nothing or if it's actually only been a couple minutes. what i was doing half an hour ago is a mystery.

being away from home is difficult in this regard because if i need to remember something when i'm at home i'll write it on my whiteboard. but i'm in auckland right now, and i don't have anything to jog my memory.

i don't know where i was going with this really


blobcat(they/them)
posted this
Time ago

kinnie feels: love 2 get some amount of dysphoria because i don't have a specific tattoo. love this for me


blobcat(they/them)
posted this
Time ago

so i got a whiteboard and needed a place to put my markers


blobcat(they/them)
lumpybird
Time ago

this is from 2016 but i still like it somehow

where's all the puella magi


blobcat(they/them)
posted this
Time ago

i'm v interested to see what the kickstarter exclusive dash themes will be 👀


blobcat(they/them)
posted this
Time ago

absolutelyterrifying -> alxce

yay a short url


blobcat(they/them)
vii
Time ago
melancholia

Repour this post and say where you're from and where you are now in the tags!


blobcat(they/them)
posted this
Time ago

help me get smartCRUTCHes!

hi! i’m alice, a neurodivergent disabled queer person.

i have severe chronic pain (and possibly fibromyalgia) and that means it’s very hard for me to get around. a lot of the time i can’t leave the house.

i’m trying to fundraise for a pair of smartCRUTCHes so i’m able to get around better!

you can find my fundraiser at donate.kat.net.nz if you want to help! that page has a bit more info too.


blobcat(they/them)
posted this
Time ago

the hellsite traditional theme on here is actually really aesthetically pleasing to me


blobcat(they/them)
posted this
Time ago

Next