[ home / rules / faq ] [ overboard / sfw / alt ] [ leftypol / edu / labor / siberia / lgbt / latam / hobby / tech / games / anime / music / draw / AKM ] [ meta ] [ wiki / shop / tv / tiktok / twitter / patreon ] [ GET / ref / marx / booru ]

/tech/ - Technology

"Technology reveals the active relation of man to nature" - Karl Marx
Name
Options
Subject
Comment
Flag
File
Embed
Password(For file deletion.)

Not reporting is bourgeois


File: 1726459786963.png (365.18 KB, 709x538, nuimageboard.png)

 

The neverending quest to rewrite vichan -

Archived threads:
https://archive.is/xiA7y

the jannies may we involved in a serious effort to write a new chan using C# Blazor soon.

>The neverending quest to rewrite vichan
Why rewrite some old crappy piece of software into a new crappy piece of software?

>>26422
the point is to make something better?

>>26420
>the jannies may we involved in a serious effort to write a new chan using C# Blazor soon.
Good morning sir.

Can you please do the needful and provide update?

>>26426
its still in the planning phase but more updates will come soon

File: 1726701499779.png (142.3 KB, 349x309, gandalf.png)

>>26420
>>26427
Very stupid if true. Please just be some spur-of-the-moment post made while high.

>>26430
why is it dumb? what objection do you have?

We had a meeting for the frontend, after all these times. Here's important points. I'm the backend guy so some may be stupid.

- Will be done in the library NextJS in React, in the language typescript, and using SCSS
- Will communicate securely with the backend API via a token in the .env file React handles securely
- We will not let people write their own clients from the start, it might come as an upgrade in the feature. (personally i'm for scrapping it, our website client will look good and source availaible (backend is source availaible too, you don't need to write your client with neovim bindings in Rust)
- I will document the API in the OpenAPI format
- Designer's ego is fucking huge and he thinks he does glassmorphism better than anything we shown him.

>>26717
>typescript
Good choice.
>React
Doesn't anyone know how to design site layouts in html anymore? If i understand it correctly, React is basically for optimizing infinite-scroll type layouts and batching document tree updates. This might be necessary for webapps with lots of state, but for imageboards it traditionally isn't and they run a lot smoother for it. If the browser caches image and stylesheets, fetching the initial site and updates should be the most common bottleneck, so it's a good idea to keep the document tree as small as possible.
>We will not let people write their own clients
>I will document the API in the OpenAPI format
I'm confused on how exactly you want to prevent other people from writing clients.
>Designer's ego is fucking huge and he thinks he does glassmorphism better than anything we shown him.
Personally i like a good glassmorphism. Just make sure the site is easily themeable, especially if the document tree is going to be a sprawling, js-generated mess.

>>26718
>I'm confused on how exactly you want to prevent other people from writing clients.
<Will communicate securely with the backend API via a token in the .env file React handles securely

>>26719
AFAIK any variables set in .env are accesible in the clients js environment. Obfuscating the token is the most you can do. Anyway if someone cares enough about your project to want to write their own client, they will try to use any exposed interface. Gecko suffered as a browser engine outside of firefox, because many of its interfaces are ad-hoc and people tried using it despite of that.

Been shopping for jobs on glassdoor instead of programming. Apparently even with pythonism this isn't a practical enough activity. Connected my database to my template and a Flask to get some micro text-only posts.

>>26719
Any information your own client can have will also be available to any other client. There's no simple way to prevent people from implementing alternative clients. If you think you've found a way, then you're either wrong or you should start a company that sells this technology to all of big tech, particularly video game companies.

>>26725
I mean that making your own client will not be officialy supported from the start like we wanted to.

Is there actually good imageboard software out there?

>>26727
Gochan? jschan?

>>26722
Any ideas why the files loop won't work in pick related? It's not the conditional.

>>26757
What is the language and why is file an array?

>>26759
NTA

looks like python and the second one is probably some sort of html/css templating system like jinja. If i had to guess the reason the file is an array is because there can be multiple uploads so multiple files.

>>26720
this is why you use C# blazor because MS already wrote the thin browser client in unseeable web assembly binary

>>26759
It's Pythonism, and for whatever reason a query in SQLAlchemy returns an ChunkedIteratorResult object containing arrays whose first element is a result.

>>26757
>>26763
ChunkedIteratorResult sounds like it is supposed to chunk or "page" the query, can't you do something like
files = db.post_files(thread).all()

>>26764
Yep, that did it. It seems the iterator got consumed by the for so it only worked for the first time the loop was run through.

>>26765
Got (multi-)image uploading to work.

>>26767
Looks good, how are running the server? Django?

>>26768
It's just a Flask app (so Flask, Jija2, and SQLAlchemy), maybe Django would have been a better choice (don't drink after all). Would take a picture of the server, but it's got hardcoded personal email and filesystem usernames presently.

>>26767
Added some features: file hashing, mime type detection, maximum file size, moderation menu (sink, lock (not implemented in backend), bury, delete, warn). It still doesn't cache anything, there's no catalog view, and there isn't session based login (all of which are completely necessary).

>>26789
Implemented LOCK also now, and limited rendering to alive threads (so you can't jump to an arbitrary page like /res/123 and post before its time.) Might call it for a moment.

>>26790
>>26789
Got the catalog up and running instead. Now things need to be refactored a little, and still that pesky session based login before it would be usable.

The CSS cleanup and refactoring went well. Found a neat hack where you can set the left margin of a checkbox to -18px so that it doesn't disturb surrounding text. Also a picture of the old mobile site just for fun, and to show its still working. Really don't see myself getting around to message formatting (the CSS is already implemented just needs parsing), caching, or login anytime soon.

>>26807
It wasn't the CSS that was being refactored but the source code, and the templates. The CSS is made with SASS for the record and the whole website's is only 4,725 bytes!

>>26807
>Really don't see myself getting around to message formatting (the CSS is already implemented just needs parsing), caching, or login anytime soon.
Was playing some with flask-security, turns out to be a huge and fairly unwieldy package. It may be that flask-login is a little more suited to my needs.

Got login working, but broke some other aspects somehow, namely pic related, is breaking deletion… Don't suppose anyone has run into this one before? Am setting via an update and
status = PostStatus[status_string])
but don't see why that should break things this badly. Not too terribly found of Python.

>>26852
is this like a convoluted way of implementing enum in python?
can't you just use numbers?

>>26853
My understanding is that the former image is just the standard way of implementing enums, the confusing thing is why they're not working properly. The string indexing doesn't appear to be the problem because the values are correct and equality testing still doesn't work.

>>26854
maybe post.status has orm stuff in it that makes it different from PostStatus.DELETE

>>26852
You need to inherit from IntEnum if you want your Enum to behave as an integer: https://docs.python.org/3/library/enum.html#enum.IntEnum

>>26856
Tried this out and didn't seem to help any. Am not looking to use them as numbers, just want to be able to test for equality.

>>26856
Apparently SQLAlchemy stores the enum as the string of its value so in this case '5' but attempting to use the string of the value in the queries also didn't help any.

>>26858
Can you show the actual code or is it secret?

>>26858
I didn't explain myself. class instances in python are like bags, you can throw anything in them, and sometimes ORMs put state in what would otherwise look like plain data
I looked it up and sqlalchemy apparently does do this. see if you can do "sqlalchemy.inspect(post)" or "sqlalchemy.inspect(post.status)"

>>26859
Only some of it's secret because of hardcoded emails, directories, and such. Can show.

>>26860
ewww.

>>26860
But how do you end up with multiple instances of the enum value?

>>26863
What if you try dir(post.status) and dir(PostStatus.DELETE)?

>>26865
They're identitical. Likely removed all instances of my email, and home directory from the source code. If could make the signup page work well would add the licensing header and such and post it here… (which guess would include my name)

>>26866
Forgot the picture.

>>26852
>>26858
>Apparently SQLAlchemy stores the enum as the string of its value so in this case '5' but attempting to use the string of the value in the queries also didn't help any.
just dynamic language trash lmao
It's a preference thing but I would never want to write anything in a dynamic loosely typed language, except maybe a lisp. OK maybe forth or some shit like this for funsies.

Good job though, power to you. I don't have time to do anything for myself, let alone a hobby project.

>confuses dynamic/static with weak/strong
is everyone here (besides myself) simple minded?

>>26868
>Good job though, power to you. I don't have time to do anything for myself, let alone a hobby project.
RIP. Didn't figure out why the values were broken, but it started working again..

>>26870
>Didn't figure out why the values were broken, but it started working again..
scary…

>>26870
Does the emum have a property like "isEqualTo" or ".value"? Maybe better to compare like this.

>>26872
It has `value', and comparison with that worked. It also has `eq' and using = calls that.

>>26863
>.where(Post.status != str(PostStatus.DELETE.value)).where(Post.status != PostStatus.LOCK))
shouldn't you use str() the second time too?

>>26871
>>26874
There are some parts of this project which are pretty nice to me like the template, CSS, schema (minus the fact that there aren't boards), and events, maybe the routes are okay, but there are some parts which are a little not so nice… like most of the rest of it. Think the str(PostStatus.DELETE.value) was not required in the end.

>>26876
tbh I feel like all programming languages and frameworks are kind of clunky at modeling websites. something like an imageboard or a CRUD could be represented as set of layers that do simple transformations on input data. you take the parameters from the request, query the db, adjust the data a little, and then render a template or populate a json payload
imagine how easy it would be to shit out backends if there was something like the unreal engine "blueprints" editor but with something like the C# linq for queries and data transformations. like, a good chunk of *all* code is just boilerplate around the shortcomings of the tools

>>26877
>something like the unreal engine "blueprints" editor but with something like the C# linq for queries and data transformations.
Was going to compare this to something existing, but there's really no point and they're quite different. It sounds really nice though, and would save a lot of people a lot of work.
>good chunk of *all* code is just boilerplate around the shortcomings of the tools
A shame.

>>26877
>imagine how easy it would be to shit out backends if there was something like the unreal engine "blueprints" editor but with something like the C# linq for queries and data transformations. like, a good chunk of *all* code is just boilerplate around the shortcomings of the tools
Only really works if performance is not an issue, and the backend does very simple stuff imo
BP in UE is a good example, they are amazing to quickly iterate on simple stuff that is not more than function calls. Like they're good to jump if spacebar is pressed, or to fire a raycast and call an interface on the first target if E is pressed, not to implement heavier logic

Not going to post an image but have markdown parsing, session based login, and permission based report and moderation actions now. Implementing vichan style text formatting would be a lot more work, even though have done it before. Unless can think of something else this useless project really ought to have then might focus on other things (then again the project was recently worked on completely out of boredom, so this might be wrong). Apparently 347 lines of python. Anyone got any suggestions for things to fun implement (probably easy things)? The only thing that comes to my mind is to get multiple boards working properly, but that's not too interesting.

>>26885
a system of roles and actions similar to discord?
a long time ago I used an anarchist ib and one of the boards was made (as a joke) such that all users had moderator privileges. I don't think vichan descendants can do something like that out of the box

>>26886
Am not familiar with discord, all the users had mod privileges until yesterday. Now a user can either be Normal, Moderator, or Admin, and when moderators or admins file a report it goes ahead and does what they asked. Otherwise it's semi-democratic in that anyone can file a report to lock or delete a thread with the action specified. It should be easy to have users able to delete their own posts but haven't gotten around to that yet.

>>26887
basically all interactions, from posting to banning people are listed as actions or permissions. the "owner" or root user can create roles with arbitrary sets of actions (permissions), and then assign one or more roles to users. so for example there could be the role "poster" with the "post" action, "janitor" with the "delete" action, and "dev" with the "see metadata" and "delete" actions. a single user has one or more roles
note that the action sets can overlap, and that the user can have many overlapping sets of actions
what they did in this case was enable the moderator actions for the default, unregistered user role

>>26889
Ah, gotcha. Doesn't sound too bad to implement may give it a shot.

>>26890
Seems like something wants me to spend the day watching anime, and wood working. So probably no software development today.

>>26891
Hmmm, don't suppose anyone knows a project that does vichan style formatting using GNU Bison? Don't really know anything about GNU Bison, but it would be handy to have a portable and correct parser for these things. (also can't search because github search is perpetually broken for some reason.)

>>26877
>something like an imageboard or a CRUD could be represented as set of layers that do simple transformations on input data.
that basically describes clojure web frameworks anon

>>26889
No template but implemented this except for the permission to give warnings. Back to woodwork probably.

Added per-board configuration, and made these alternative boards postable and moderatable, cleaning up some permission issues along the way. Probably need a less consequential name for the project to avoid polluting the global namespace.

>>26897
Running into another very stange pythonism bug where logic isn't short-circuiting in a conditional variable declaration. Checks for:
current_user is not None and current_user.is_authenticated
still results in an error of NoneType doesn't have attribute is_authenticated. This was while trying to setup a transition from the login / signup button to a logout button.

Anyway cleaned up the CSS some more so that now the checkboxes seem to have pixel perfect placement, and the post header lines up nicely, with the images properly formatted in all situations. Also made the menu hamburger turn into a big 'X' when clicked (only in CSS).

Hoping to maybe find a solution to the first problem and setup a board management page here soon.

>>26903
You can see the subtle change in alignment of the article header and checkbox in comparison to >>26807. Don't think there are any images of broken image formatting here.

>>26903
>This was while trying to setup a transition from the login / signup button to a logout button.
Fixed this.

Was trying to fix the last aspect of the CSS really didn't care for. Wonder if its reasonable to have a single file input form with the multiple attribute instead of multiple input forms. This means you could only upload multiple files from a single folder easily without javascript, and on modern browsers.

>>26907
idk anon, in my experience the multi input i.e.
<input … multiple> tag, thats broken in my experience. I've never been able to make it work which is why people tend to use javascript

>>26908
It seems to work fine so long as you're only selecting from a single folder (on my system with the alt key). Tested in a couple of different browsers. Regardless may need to try to think of a better way since don't really like any of the attempts so far.

May be about time to give this project a small rest. If am able to curb the addiction/boredom enough to manage such a thing. Have been doing some polish while vichan style formatting, and a proper reports page remain missing. (Picture of one of the other themes, though there is no theme selector)

>>26913
Saw this article recently, posting for future reference, if ever get around to it: https://www.joshwcomeau.com/css/has/#javascript-free-dark-mode-7

>>26913
Okay finished off the simple reports page was working on and fixed login. Surely that's it for a second and can focus more on woodworking instead.

Kind reminder: if you use ajax you might want to implement an ideopotency system for you captcha

>>26916
>>26916
>Kind reminder: if you use ajax you might want to implement an ideopotency system for you captcha
At the moment there is no anonymous login, captcha, or javascript. There's not even flood control, haha. You're talking about real space age technology by comparison.

Woodworking didn't go so well. Added salting and hashing of passwords, error messages to the login / sign up pages, and a customizable maximum thread count for the boards. Everything but the moderation pages / functionality, and post parsing feels fairly passable.

Have written a parser for a vichan style markup language but it was in Java funcj, it was a real pain and not sure it works. Does python even have a robust parser combinator library? Would really like an easier solution if possible anyway

>>26926
Theoretically something like pic related works, but of course it's not really this simple.

>>26927
Christ that took all day! Pic related is an implementation of Vichan style markup using an LL(infinity) parser combinator library called "parsy". My implementation is a worse version of my Java, but it seems to cover all the common cases included cross board links, and urls. The markup syntax needs to change a little, bold doesn't work as is, because it's colliding with italics, and it would be better if the closing and opening tags of spoilers were asymmetrical allowing for nested spoilers. Might be taking feed back on this: Any changes to the markup you guys are interested in? Before had spoilers as /* and */.

>>26930
Decided not to sleep. Added https://2ch.hk style backlinks, html escaping, made the dark-mode toggle with operating system preference. Realize there is actually a global namespace for post.id, crossing over boards, so might axe the more complex cross-board linking system (despite having just finished putting in the work to get it operational). Changed bold to ##for now##, and spoiler to /*spoiled*/. Would still be interested in what people would change about the markup language.

>>26933
Made the webpage title update to the name of the thread title or if there is none to that of the first 32 characters of the text body, if there's that.

>>26930
Some sites support BBCode like spoiler and code tags, that's pretty cool.

>>26935
>Some sites support BBCode like spoiler and code tags, that's pretty cool.
Not too fond of these myself.

Been doing bug fixes mostly, made the images user resizable (no Javascript). Had the idea for a user history page for moderation and personal use, together with an administrator page to control permission, and an already partially implemented page to view reports would be all of the moderation tooling. Have considered not even having the admin page so that there is no page that's permission restricted. Anyway all of that's on hold because can't seem to get current_user to work all of the sudden.

>>26937
>made the images user resizable (no Javascript)
This sucked so it got deleted. Feeling pretty exhausted… If had anything better to do it would certainly be dead.

>>26937
>Anyway all of that's on hold because can't seem to get current_user to work all of the sudden.
This got fixed, and now there is a primitive version of the report and history pages.

>>26939
Didn't get much more done. There's now :trigger highlighting for local references like "1.html#3". Can't decide on the route for user history something like "/<board>/res/u<user_id>.html" is what am thinking at the moment.

>>26940
Backend is still a work in progress, but here's a screenshot of the user history page. These operate sort of like public diaries, and make it easy to reference your old posts, but are mostly just a public moderation tool.

>>26944
You get to this page by clicking the "Anonymous" name in any thread.

>>26945
Added a recent.html view which displays threads in chronological order and broke a whole bunch of stuff trying to write the backend for the history page, then subsequently fixed all of this stuff except for the reports.html page which is in a dismal state, don't even know how its supposed to look anymore. Also made it where users are allowed to moderate their own posts (sink, lock, delete, warn). Really reports.html, and admin.html are the only further planned features.

Didn't realize that vichan was 13k SLOC excluding the front-end ($413,000 in developer time according to David A. Wheeler's SLOCCount). Am currently at 710 (nearly $19,000 in developer time), and it seems odd to think there would be something like 18 times the current functionality.

>>26946
This is it for the report page.. it's bad.. but am probably just going to leave it as is (if can think of anything better to do.. like resuming the job search). My thought presently is the way it should look is with the reports under the message they concern, only displaying the message concerned once, and these should be bump ordered. An exaggeration but this almost feels like a whole other application. The only thing it might need is to add UserReports in addition to the PostReports currently present.

The way the admin panel appears in my mind is as a two input forms with text areas for emails and a select area for permission to grant or remove depending on which of the two input forms is selected. This lets me continue with the lack of access controls on pages at the expense of the user. This is also not great as the administrator needs to remember the emails of their moderators for promotions and the like.

Lastly another page which might want to be added is a log.html for displaying moderation actions. This would be comparatively easy.

>>26947
Okay, made a reported.html page and this seemed to solve the issues with reports.html. This latter page is now only for use if reported.html is getting spammed. Rather than making a seperate moderation log the reports page doubles as this with a simple indicator for when moderation actions actually occur. So there's only one page missing now!

>>26947
>This is also not great as the administrator needs to remember the emails of their moderators for promotions and the like.
This sounds terrible to me. Should just make it where moderators are expected to have public names or emails.

>>26949
An even worse admin panel… but with the requested fine grain permission system (discord style), and my own constraint that all pages be public, and secure. Likely the whole project now needs some fall cleaning, (and for someone who's not me to write some Javascript) but it's got all the features that one desired! Kept thinking was going to give up, but guess not.

Current total SLOC count is 820 with a cost estimate of $22,000 once again according to David A. Wheeler's 'SLOCCount'.

Other than pushing to a repo, which just requires me to make an account somewhere (ironic) would anyone like to see any features added, or anything documented?

>>26951
Something about pic related makes it where only one of the multiple file uploads is accessible. :(

>>26952
lol immediately finds it. rubber duck programming aint for nothing.

Here's a list of unimplemented features that came to mind:

Clerical
- license
- host source
- public instance
- project name (presently "cyberia")

JS
- floating reply form
- click to reply
- floating reference

Backend / Moderation
- API endpoints (jsonify)
- email verification (Flask-Mail)
- flood control (SQL events)
- tripcodes
- anonymous posting
- ip bans
- captcha

Of these am likely only to complete the clerical tasks, and not the public instance.

>>26959
Licensed AGPL, and found the right set of hacks to make the API endpoints elegant enough. SWIM also might have lifted some JS for click/highlight to reply, 19 SLOC. Floating reference may also be easy to add, though less so, especially for cross thread references. Entered into discussions about the best place to host a repo >>26958.

>>26959
Added primitive always on autoRefresh (always on every minute) in 20 SLOC and floating reference with another 47 lines of JavaScript (copy-edited from 2ch.hk). Was hoping to add 2ch.hk style endless on-hover replies as mentioned in https://lainchan.org/%CE%BB/res/26674.html#q29059, but for cross-thread references this requires you to do dynamic lookup of threads in JavaScript, which am not quite willing to do. Next major front-end task for SWIM is the floating quick reply form.

>>26959
Added per user granular flood detection to every relevant page except for login/signup and a notice in the title in autoRefresh.js for when a new post is made. None of the features from >>26959 have been planned, but email verification, and a floating quick reply form are the only even semi-panned features.

>>26419
Would a "emoji reaction" or a "like" feature be good for boards? I think it would be good to have because sometimes i want to say "i agree", or "i liked this", or "you're retarded" without actually flooding and sending a message. Reacts/likes would count as a quarter of a message in term of how high the thread is.

>>26970
>JavaScript
AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!

>>26981
No seriously, it's such a pain to work with. Luckily it's only for four usability improvements: auto refresh, reference on hover, click to reply, and the floating quick reply form.

Have been thinking of how to add these features without Javascript. autorefresh could be done with an iframe and http-equiv="refresh". the floating quick reply form could be just a static form to the left that you can hide or show (sort of like a popup chat menu some sites have). You could make a show-references button to show references without Javascript, though they wouldn't be as nice or granular. And for click to reply one is just out of luck.

Would be interested in other's thoughts on this. The Javascript solution for all of these things is probably the easier of the two.

>>26982
just use javascript. iframes are incredibly dated. The fact is you should just use javascript, if you need a library try some modernized jquery alternative like alpine.js or htmx

the only alternative to this is just biting the bullet going full SPA and writing a frontend in angular/react or something, or thin client shit like C# blazor. Webasm is a meme, iframes are from the 90s. you are forced to use javascript unless as said before you go full SPA and transcompile typescript, or something even edgier like clojurescript, rust to wasm, or even more obscure shit like dart.

>>26982
>the floating quick reply form could be just a static form to the left that you can hide or show (sort of like a popup chat menu some sites have).
this is how nanochan/picochan does it.
>>26984
what part of iframes do you specifically consider dated? the fact they have well defined privileges as a potentially insecure third-party resource?

>>26984
Even if it was reduced there would probably still be some on my board since there are some usability enhancements which can't be had any other way. There doesn't seem to be a need for any libraries however, still don't actually know what JQuery does…

>>26985
>this is how nanochan/picochan does it.
Floating quick reply went really poorly, and not much would be lost scrapping the present attempt and going the other way.

>iframes

The only disadvantage of this for me is that it pollutes my views.py because every page with autorefresh (and thusly an iframe) would need a separate route.

>>26986
>iframes
Another disadvantage is that without Javascript can't think of any way to change the title when there are new replies or rather to change it back to the default state once they've been viewed so the autorefresh would be of limited utility.

>>26987
You could just keep the reply count in the title, and only set it in the iframe probably.

>>26986
Got the CSS to work a little better, so long as no one changes the form or looks at the Javascript it works nicely.

Why auto refresh with JS? Can't use a socket?

>>26992
Using JavaScript and Sockets would probably be an improvement on the application. Might give it a go. Would require me to rework some things.

>>26982
>autorefresh
This and the third-party captcha are my greatest sources of suffering on this slowpoke website. What did I do to deserve such torture? Visiting this site? Should this site have no visitors or something?

>>26994 is literally me. technically you can disable refresh with vichan, but you need to allow cookies and have them be persistent across sessions for that. i recommend yugo anon to allow some of these options to be passed in the url.

>>26993
>Might give it a go.
Am just going to reload the whole body well <section> of the thread every time there's an update for now. Have everything setup except for some reason it seems that each socket handler only executes one at a time.

>>26994
>>26995
>allow some of these options to be passed in the url.
This seems possible, what other features would you like to see disabled?

>>26996
theme selection, (you)s and inline image/video expansion seem like good options.

on that note: with vichan every theme, except the default and yotsuba b, has a noticeable delay for every page, so you might want to verify if themes get cached and if there is significant latency during loading. i briefly copied the css of a theme into a user stylesheet, but it broke often because of site updates.

>>26996
>Have everything setup except for some reason it seems that each socket handler only executes one at a time.
Really confused about what could be going wrong here.

>>26997
>theme selection, (you)s and inline image/video expansion seem like good options.
This sounds like a great idea, apparently this is a JavaScript feature which surprises. Themes and inline image expansion aren't implemented yet, and (you)s are in the backend, but can probably make all of this work.

>with vichan every theme, except the default and yotsuba b, has a noticeable delay for every page, so you might want to verify if themes get cached and if there is significant latency during loading.

This would probably be the job of whatever was in front of the application. Themes are very small currently though, just a change of around ten CSS variables.

>>26998
>Really confused about what could be going wrong here.
It was blocking on the receive(). Now have a liveboard, as far as threads area concerned would like to add the functionality also to reports, but this may have to wait for another day.

>>26999
>but this may have to wait for another day.
Nope, haven't fully tested it yet but believe the whole board is live now, including moderator actions, and the catalog, the latter of which may be a little chaotic.

>>26997
Got your feature request implemented also. This is a page with the optional search parameters set such that the white theme is used (one of my favorites), with no (you)s, and autorefresh turned off.

Trying to decide between implementing email verification (so users register other's emails) and anonymous users (together with address based logging, flood control, and bans). Probably going to try my hand at the latter first since it doesn't involve learning any new libraries or complicated configuration. Is Shii right? https://wakaba.c3.cx/shii/shiichan

>>27004
Got Anonymous posting, address based logging, flood control, and bans implemented. Would like to have it where it was a per-board configuration option for Anonymous posting, but don't see how it could be easily implemented at the moment.

>with vichan every theme, except the default and yotsuba b, has a noticeable delay for every page, so you might want to verify if themes get cached and if there is significant latency during loading.

Have been trying to solve a similar issue to this where there are a few milliseconds of unstyled content which flash when using the theme selector. Apparently the only way to fix this is to modify things server side to work with the search parameter.

>>27007
>Would like to have it where it was a per-board configuration option for Anonymous posting, but don't see how it could be easily implemented at the moment.
This is now implemented. Source including the frontend is now at around two thousand line. The whole thing probably needs a once over, and a lot of usage to find any missing bugs and inconveniences. Here's a list of my todos at the moment:

Clerical
- host source
- public instance
- project name (presently "cyberia")

Source
- word filters
- captcha (after some number of failed login attempts, and on signup)
- email verification or validation
- reimplement themes in backend
- views for user and address reports

Am currently implementing the captcha system. Might finish it tonight. Think could get away without email verification if this was done right. There's currently no plans for range bans, that might be a mistake, wonder if they're used often in practice.

>>27008

Eh, might scrap the captcha entirely just to use timeouts. Got one setup for the login screen, just need to copy paste and edit a little for signup.

>>27010
Probably added timeouts for signup now.

Made the quickreply work on mobile. The mobile site and the sockets seem like real improvements over vichan.

>>27013
Got previews working on mobile, it's hold to preview, tapping anywhere then closes the preview, and normal tap follows references. Added user-select: none; to the message headers, nav, and quick-reply forms, and references to prevent accidental interactions. Also cleaned up the mobile quick reply a little more so that the page is always big enough to hold it. Attached is a picture of what this all looks like.

>>27015
Please ignore the bug in the photo.

The last thing on my todo list as far as software goes is "views for ban reports.", which is going to be put off for now. Probably what it needs more than anything is testing and polish or bug fixes.

Would there be interest in using an LLM for moderation (it'd probably require quite the machine to run)? Or would you all consider this to be an anti-feature. It doesn't look like it would be that bad to implement.

File: 1730908472560.png (1.05 KB, 48x48, favicon.png)

>>27018
>it'd probably require quite the machine to run)
Found a tutorial to use Llama Guard, it seems pretty easy, but it suggested and APU with 16Gb of ram which is more than my server would have. Also more than most small imageboards would be likely to have. Might end up playing around with it anyway. Also made a small favicon for cyberia, and decided to stick with the name for now.

>>27022
Been mostly fixing bugs today. Looks like there's a 1 billion parameterized Llama model with quantization. The memory usage is at about two gigabytes and it runs even on my 2013 dual-core without too much trouble (though it definitely requires swap because Mac OS is not a low memory OS). Think this could be a neat optional feature. What do you all think about this? A link about what it's attempting to censor: https://huggingface.co/meta-llama/Llama-Guard-3-1B#hazard-taxonomy-and-policy

>>27025
Yesterday gave the whole program a read through correcting errors along the way. Also expanded on the todos a little. Managed this morning to get thumbnail resizing setup to save on bandwidth. Would like to setup incremental autorefresh next, but don't exactly know how to do it without dropping messages, especially considering there are bulk operations.

Clerical
- host source
- public instance

Backend
- views for ban reports.
- easier way to create the admin account.
- LLM for moderation. (Llama Guard)
- prettier error pages.
- incremental autorefresh

>>27030
Styled the error pages, cleaned up the error handling in source, and add proper handling for 500 errors in the mean time. The incremental refresh is turning out to be quite tricky. Was thinking could take a hash of the page to check for dropped messages, and just refresh the whole thing like is currently always done in this case, but it turns out the preview script modifies the DOM and this is no longer a reliable measure. Am open to suggestions on how of if its necessary to do this. Is the gevent loop just fast enough? The LLM has to wait for me to get a new computer to avoid swapping.

>>27030
The only addition to the program after this morning was the simpler system to create admin accounts. Realized to setup incremental autorefresh would require reparsing posts to generate backlinks and at that point gave up for now. The view for reports of posts, users, and addresses requires me to make a query that don't know how to express in SQLAlchemy think it would be an outer join, and coalesce. The LLM requires me to have a better computer to avoid swapping while developing. So that's it from me for now. Releasing the source is the only thing which seems possible for now, and still haven't decided on a platform for this.

Open to any suggestions.

>>27018
I suggest you add the ability to run messages through an arbitrary server-side spam detection program. See https://bogofilter.sourceforge.io for something like spamassassin, that also works for plaintext.

Site doesn't even work yet but already has a link at top to beg for money.

>>27045
>ability to run messages through an arbitrary server-side spam detection program.
Added, though this is a feature for advanced users given the implementation. Will use this for my LLM moderation system and have it as a separate program.

>>27045
>beg for money.
In the lupen sense and not the grifter, went ahead and removed it from the temporary nav. Not a clue what boards to actually include either if it ever gets hosted.

Also added stickies and locked stickies, styled the success pages, and cleaned up the error reporting some more.

>>27046
Added support for the remaining MIME types today, so video, audio, and documents. This included making thumbnails for PDFs, and having a fallback thumbnail for documents which don't have their own (the document formats other than PDF).

Found a federated imageboard using ActivityPub, and a library to interact with ActivityPub, so am considering giving this a go once my new machine is setup.

>>27043
Why do you need the LLM? Why not just a basic firewall for now? Also this site sounds pretty sick good luck in your endeavours.

>>27062
Thank you! Avoiding the LLM is probably more practical because of the 2Gb of ram it eats up raising costs 50%. The idea was just to make moderation a little easier for those of us without thick skin.

>>27059
Haven't yet found a way to write an ActivityPub server that would be reasonable. The FChannel implementation is many thousands of lines. The way the've implemented actors is also somewhat strange. Rather than having actors be a salt hashed address or a user account they've made them boards: https://github.com/FChannel0/FChannel-Server/issues/9#issuecomment-822675142 There is a good JSON-LD library from the looks of it.

Have been working on another project (a torrent client which just now started to be able to download files!), but have been growing my todo list for this project. There are a number of related enhancements, CIDR bans which perhaps won't be included (anyone know if these are actually used in practice?), RSS feeds, and one major desired feature addition: ActivityPub.

* Devops
- git repository
- host source
- public instance

* Missing
- caching. (observer pattern?)
- CIDR bans.

these don't make sense with the current interface, and it's not
clear to me whether or not they are required.

- RSS feeds.
- move thread.
- post search.
- ActivityPub.
- OOP restructuring!
- views for ban reports.

requires adding func.now() to these models for ordering.

- incremental autorefresh. (observer pattern?)

this requires not only add and remove but update messages in order
that backlinks be displayed correctly.

* Separate Projects
- booru site.
- LLM moderation.

>>27089
Actually the hold up at the moment is picking a name so can make a new git repo and get to work on the OOP restructure. Was thinking something related to technomancy and like the original "channel" designation. Thought maybe Ars Via, but it's a little much isn't it. Anyone got any ideas?

>>27090
leanboard, webchannel, industrialchan, blackboard, anonpress

>>27091
Ended up rejecting your idea and making the repository just with my previous attempt: Ars Via. Have completed most all of the OOP restructuring. Also used Flask-SQLAlchemy to properly handle the SQL Session. Currently trying to figure out how to go about the incremental autorefresh and caching. Recently learned that for websocket based applications like this one you're really supposed to be using tornado, which is a bit of a bummer.

>>27099
Added caching but am not presently satisfied by my project. To do it right at this point seems to necessitate switching to some sort of asynchronous framework (like Tornado, FastAPI, or Starlette), and an asynchronous ORM to match. Starlettte in particular would probably let me write my socket endpoints using the observer pattern, which is desirable to me. Might not be too difficult to rewrite in this way.

>>27104
>To do it right at this point seems to necessitate switching to some sort of asynchronous framework, and an asynchronous ORM to match.
This has been a little frustrating but the Japanese fusion jazz has helped. It's going to take a little while .. which is good! Spent all day and haven't even managed to get the GET routes up and running.

>>27106
Managed to get a few routes, views, and the render working; migrated to postgres from sqlite, and had to fix up the models a bit to suite. Am apparently going to need to rework the routes, and the asyncio SQLAlchemy extension lacks support for events so there's a bit to do there, and a ton of the views haven't been moved over yet, nor the websockets. Temporarily set posts to work with UUIDs, though something like this would be needed for federation.

>>27128
Was able to add the error pages pretty easily, but session management is giving me some real trouble even with the starlette-login module. Feel the need to take a break from this program; may or may not.

>>27130
Seems like the key is going to be to not use the starlette-login module but rather use the authentication module that comes pre-included.

>>27134
Don't suppose anyone here knows how to make SQLAlchemy return only the first image for each thread? So far as can tell am doing everything correctly here, but still getting an error that "row_number" doesn't exist. If it were just SQL could pull it off but for some reason the "label" even as it emits an AS does not cooperate with the following use of the labeled item.

Unrelated am also having an issue with Starlette-Login trying to serialize user to JSON for some reason and failing at this. Should be able to take a deeper look into this myself at some point.

>>27150
Well one error is that it should be "row_number = 1" rather than "==", but this isn't the problem.

>>27150
>>27151
This issue was solved with the help of another forum.

LOTS of bugs to fix but the rough in of all the functionality sans-websockets for the Starlette/Uvicorn migration is now complete. All the GET routes and views are working, thread posting is working, and so is login. The main question at present is how to setup the GUIDs for the posts. F-Channel uses a random base-32 number of length eight (a namespace of roughly one trillion, if it were base64url it would be two hundred fifty trillion). Another idea is to just use UUID4 (which is 2^128 or 10^38). None of these are really all that appealing to me, but surely will decide on something eventually.

>>27167
Decided on the UUID4 solution. Managed to get posting within a thread, post parsing, bump-ordering, backlinks, and the javascript up and running with the new system. To my knowledge automatic locking of full posts, initialization of admin accounts, GET pages for address and user history, and POST handling for admin, ban, and report still need to be addressed. Hopefully will be able to get through some of these tomorrow.

>>27168
Is there someway to have two hashes for the same object and then confirm that they are for the same object without knowing what that object is? Was thinking for moderation purposes it would be interesting to have hashes of addresses communicated between federated servers along with their respective messages in such a way that each could check whether or not its an already banned user. Found this: https://crypto.stackexchange.com/a/102963 but it seems a little theoretical, so probably not.

>>27169
> automatic locking of full posts, initialization of [default] admin accounts, GET pages for address and user history, and POST handling for admin, ban, and report still need to be addressed.
Believe have solved these now. Hopefully sometime tomorrow can finish off the migrations with its comprehensive testing, and begin to implement new features again.

>>27170
>Hopefully sometime tomorrow can finish off the migrations with its comprehensive testing,
Wouldn't say the testing was quite comprehensive, but did a quick read through, and some sporadic testing which turned out well. Went ahead and merged the Starlette branch with main.

>>27170
>begin to implement new features again.
Am considering getting rid of the (you)s to enable caching to work more effectively. Theoretically post identifiers could be stored in the session, and this way the (you)s added back at a later date. Am also considering replacing the server side rendering of the [logout] button with client side rendering. The downside is slightly less functionality for noscript users, the advantage is that caching is much easier.

>>27171
>Am also considering replacing the server side rendering of the [logout] button with client side rendering.
Some may be happy that this part didn't work out. So will just make template rendering a little more intricate.

>>27171
>>27172
>So will just make template rendering a little more intricate.
This didn't work out either so ended up with a nice and light-weight solution to the problem. Now have caching of all the render functions that query the database. Managed to re-implement the old nonincremental socket-based autorefresh more elegantly in Starlette using the observer pattern that was trying to do with Flask-Sock. Also added a count for how many times the page has been refreshed by the socket. Am pretty happy with all this, though it's not even close to the complexity required to have incremental socket updates. It might be between compression, client-side caching, and server-side caching it wouldn't really be worth the complexity cost for now.

>>27174
Made the image and reply count appear on the catalog page. Also added the user and address reports to the reported page. Been working through bugs otherwise. Here are my remaining TODOs:

Devops
- host source
- public instance

Missing
- RSS feeds.
- ActivityPub.
- post search?

Most of what the program needs at the moment is testing, to uncover bugs and then subsequently fix them. Have been doing some of this already today, but it may be about time to finally get the source code hosted somewhere and start receiving feedback. Biggest hold up here is deciding on the platform; seems like it's GitHub or Codeberg.

>>27174
The likelihood of me actually implementing any of these but hosting the source is quite low come to think of it.

>>27178
Don't have it in me to write documentation at the moment but here's the repository: https://codeberg.org/jung/arsvia Plan to add install instructions, and some pictures. The gist is:
1. install postgres, imagemagick (libmagickwand-dev), python3, and pip.
2. run pip install -e .
3. setup a user and database in postgress and add to config.py
4. python3 arsvia
5. navigate to 127.0.0.1:5000
6. create an account which will automatically become an admin.


>>27176
activitypub is a bad match for imageboards unless you're going to treat every poster as one big account. Activitypub and other protocols seem to assume named accounts which imageboards don't have.

File: 1739165372796.jpeg (7.87 KB, 200x200, xhsdoge.jpeg)

>>28343
Make everyone register an account

(for real tho this could be not bad. It would help against spam and illegal content by raising the barrier to entry some [and new account creation could be temporarily halted, which is better than harming vpn or tor users or etc], and on the front everyone could still be anonymous. Or a tripfag at their choosing. whatever. Would it be so bad?)

>>28343
wait nevermind, the names would still be exposed in the federation process, i'm dumb. I guess every topic/board could be considered a user? I agree though. Also activitypub is just kind of bad in general. It's really nonspecific and everyone implements it so differently that the dream of cross-platform connection is very rarely reality.


Unique IPs: 29

[Return][Go to top] [Catalog] | [Home][Post a Reply]
Delete Post [ ]
[ home / rules / faq ] [ overboard / sfw / alt ] [ leftypol / edu / labor / siberia / lgbt / latam / hobby / tech / games / anime / music / draw / AKM ] [ meta ] [ wiki / shop / tv / tiktok / twitter / patreon ] [ GET / ref / marx / booru ]