The Real Grunfink
@grunfink@comam.es
snac ActivityPub instance server and other pieces of singular software. Not a real Grünfink.
ティージェーグレェ「teajaygrey」 »
@teajaygrey@rap.social
Note to self: repology.org is not authoritative.
I checked it this morning and thought, "oh good, 100% nothing needs updating."
Then I checked @grunfink's stream and saw that snac 2.34 is out!
Repology still shows 100%, but I have some work ahead of me to update the MacPort and I won't be able to get to it as quickly as I would like.
radio »
@radio@portside.social
@teajaygrey @grunfink
Yes, thanks for the reminder. I'm just beginning to understand the scope of what I must do. Gotta mirror this website and related ones that have documents that are missing elsewhere. https://www.indymedia.nl/en/2002/03/2909.shtml
radio »
@radio@portside.social
@teajaygrey @grunfink I'm not so thrilled about polls, but some people do look for "features" I'm one who might favor a lightweight fork when this finally catches on. @Bernard
radio »
@radio@portside.social
@teajaygrey @grunfink @Bernard I don't know if you remember phpNuke and it's scandals, but I was able to use an early version for a long time after careful deletion of the code that held it's vulns. I didn't need most of it. The bulletin board was always under attack, and passwords were not hashed, so I enabled SHA-1 and deleted all the BB code. Less is almost always more, IMO.
radio »
@radio@portside.social
@teajaygrey @grunfink @Bernard ... my only point is: I prefer a smaller attack surface rather than "more features", because it's easier in the long run
@teajaygrey wooooo macports!
boosted
The Real Grunfink »
@grunfink@comam.es
Fellow developer @Haijo7@snac.haijo.eu has created a cool, awesome CSS theme for #snac:
s4if »
@s4if@snac.saifulh.online
@grunfink@comam.es, sorry for nub question, but how can I apply this?. I have copy-pasted it on my data folder then restart my server, but the style is not applied.
The Real Grunfink »
@grunfink@comam.es
You must copy the style.css file to the static/ folder of your user(s). The style.css file that is in base directory is only used as a template for new users.
It's probably a bit confusing, but the idea is that every user in a #snac instance can potentially have their own CSS.
s4if »
@s4if@snac.saifulh.online
@grunfink@comam.es thanks for the clarification. Will try that later.. :)
The Real Grunfink »
@grunfink@comam.es
It's #SoftwareReleaseSaturday again! I'm glad to announce the release of version 2.34 of #snac, the simple, minimalistic #ActivityPub instance server written in C. It includes the following changes:
Polls can now be created from the web interface.
New Mastodon API features: polls are shown and can be voted on.
The user@host identifier is now shown next to the user avatar (contributed by Haijo7). A small tweak to the default CSS was made to suit this change; please consider updating your style.css.
Clicking on an image attachment opens it in a new tab (contributed by Haijo7).
Bots are marked as such using an emoji (contributed by Haijo7).
If you find #snac useful, please consider buying grunfink a coffee: https://ko-fi.com/grunfink
ティージェーグレェ「teajaygrey」 »
@teajaygrey@rap.social
@grunfink With my apologies for the delay, this PR has been submitted:
https://github.com/macports/macports-ports/pull/18968
CI/build bot checks passed!
It's up to someone else to merge it.
#snac #MacPorts #ActivityPub #FediVerse #Mastodon #ANSIC #NoDatabaseNeeded #TotallyJavascriptーfree #NoCookiesEither #NotMuchBullShit #ANSIC #OpenSource
ティージェーグレェ「teajaygrey」 »
@teajaygrey@rap.social
@grunfink thanks to Herby Gillot, that PR has been merged!
The Real Grunfink »
@grunfink@comam.es
I'm glad to announce the release of version 2.33 of #snac, the simple, minimalistic #ActivityPub instance server written in C. It includes the following changes:
Polls (in #ActivityPub lingo, Questions) are shown and can be voted on. Creating a poll is not yet implemented, though.
If an URL written in a post links to an image, it's converted to an attachment.
Fixed a bug in the semaphore code that caused total hangs on OpenBSD.
If you find #snac useful, please consider buying grunfink a coffee: https://ko-fi.com/grunfink
ティージェーグレェ「teajaygrey」 »
@teajaygrey@rap.social
@grunfink I submitted a PR to update MacPorts' snac to 2.33 here:
https://github.com/macports/macports-ports/pull/18843
CI/build bot checks passed!
It's up to someone else to merge it.
#snac #ActivityPub #FediVerse #Mastodon #ANSIC #OpenSource #NoDatabaseNeeded #JavaScriptーfree #NoCookiesEither #NotMuchBullshit
Haijo7 »
@Haijo7@snac.haijo.eu
@grunfink@comam.es Awesome!
I only just started using snac and the only thing I was missing were polls
The Real Grunfink »
@grunfink@comam.es
Glad to know! Creating your own polls will happen eventually.
continue »
@continue@honk.any-key.press
@grunfink, hello
#snac 2.31 and 2.32 is hang on input requests, 2.30 works fine.
By logs (dbglevel=3): job threads exit immediately.
snac[53925]: 17:26:28 using 4 threads
snac[53925]: 17:26:28 background thread started
snac[53925]: 17:26:28 job thread 1 started
snac[53925]: 17:26:28 job thread 1 wake up
snac[53925]: 17:26:28 job thread 1 stopped
snac[53925]: 17:26:28 job thread 2 started
snac[53925]: 17:26:28 job thread 2 wake up
snac[53925]: 17:26:28 job thread 2 stopped
snac[53925]: 17:26:28 job thread 3 started
snac[53925]: 17:26:28 job thread 3 wake up
snac[53925]: 17:26:28 job thread 3 stoppedEnvironment: running on OpenBSD. Do you know what could be wrong?
The Real Grunfink »
@grunfink@comam.es
Oh. Had no idea this was happening. I used to run this same instance on OpenBSD, but had to change it to Linux because unrelated reasons.
Give me a bit of time and I'll get back to you ASAP.
Thanks for bringing this issue to my attention.
The Real Grunfink »
@grunfink@comam.es
I already know where the problem is (a recent change in the way semaphores are processed).
While I find a proper solution, there is a workaround: temporarily disable the usage of special OpenBSD security functions by setting the disable_openbsd_security field in the server.json file to true.
continue »
@continue@honk.any-key.press
Yes, it worked!
Thank you for your prompt reply.
The Real Grunfink »
@grunfink@comam.es
Well, I think I've fixed it. Next release (that will happen real soon) will include a fix for this problem.
Thanks again for your report.
liilliil 🇫🇯🇱🇨 »
@i@liilliil.ru
@grunfink@comam.es
Hello, i've installed last version of snac and trying to login from Mastodon client. In log everything's fine:
22:12:46 oauth x-snac-login: 'i' success, redirect to metatext://oauth.callback?code=02blah
22:13:04 oauth x-snac-login: 'i' success, redirect to com.jonny.mona://oauth?code=d81blah
But in the clients i've got "Error. The data couldn't be read because it is missing" windows (iOS)
How to solve this? Thanks in advance!
boosted
The Real Grunfink »
@grunfink@comam.es
Hello. Sadly, I've been unable to get the official #Mastodon client to work. I know what this "data missing" is; but, if I send this data, the official app crashes immediately and can never be opened again. So, as this permanent corruption is unacceptable (the user may be using the app for other Mastodon accounts), I have this intentionally missing data as a "lock" to avoid further problems.
Until I find a way to fix this annoying issue, I've found a large set of Mastodon client apps to work just fine (on Android; I know nothing about iOS, but there probably are some).
I keep working on it; I'll release a new version whenever I find a fix.
Thanks for giving #snac a chance.
The Real Grunfink »
@grunfink@comam.es
I'm glad to announce the release of version 2.32 of #snac, the simple, minimalistic #ActivityPub instance server written in C. It includes the following changes:
New user configuration switch to drop direct messages from people you don't follow, in order to mitigate spam from Mastodon open registration instances.
When updating user information (e.g. the display name or the bio), the changes are also sent to the people being followed (so they have an updated description about who the user is).
Mastodon API: account search has been implemented, so mention completion works from apps; new support for blocking users (this operation is called MUTE here).
If you find #snac useful, consider buying grunfink a coffee: https://ko-fi.com/grunfink
ティージェーグレェ「teajaygrey」 »
@teajaygrey@rap.social
@grunfink I submitted a PR to update MacPorts' Portfile for snac to 2.32 here:
https://github.com/macports/macports-ports/pull/18735
CI/build bot checks passed!
It's up to someone else to merge it.
#snac #MacPorts #ActivityPub #FediVerse #Mastodon #ANSIC #OpenSource #MIT #NoDataBaseNeeded #JavaScriptーfree #NoCookiesEither #NotMuchBullshit
ティージェーグレェ「teajaygrey」 »
@teajaygrey@rap.social
@grunfink p.s. that PR was merged thanks to Herby Gillot!
So, hopefully by the time people read this toot, snac 2.32 will be available in MacPorts' rsync mirrors!
The Real Grunfink »
@grunfink@comam.es
The powers that be have provided links to #snac manual pages in HTML format:
https://comam.es/snac-doc/snac.1.html - User Manual
https://comam.es/snac-doc/snac.5.html - Message Formatting and File Format Documentation
https://comam.es/snac-doc/snac.8.html - Administrator Manual
The Real Grunfink »
@grunfink@comam.es
I'm glad to announce version 2.31 of #snac, the simple, minimalistic #ActivityPub instance server written in ANSI C. This time it's mostly bugfixes contributed by fellow developers:
Fixed webfinger and curl issues, which crashed snac while trying to follow Mitra users (contributed by Poesty).
Use named semaphores instead of anonymous ones, to make it work under MacOS (contributed by Saagar Jha).
Fixed semaphore name conflicts (contributed by Poesty).
Fix warning in ugly pointer substraction (contributed by Saagar Jha).
Added user-agent to webfinger queries (contributed by Poesty).
Mastodon API: implemented notification type filters, fixed (partially) the issue with mentions without server.
If you find #snac useful, consider buying grunfink a coffee: https://ko-fi.com/grunfink
ティージェーグレェ「teajaygrey」 »
@teajaygrey@rap.social
@grunfink Awesome!
I submitted a PR to update MacPorts' snac to 2.31 as well, fun:
https://github.com/macports/macports-ports/pull/18651
MacPorts specific notes:
* fixed livecheck.
* Removed the "use_parallel_build no" line (thanks to @saagar for the reminder to see if that was still an issue) and it passed the CI/build bots check!
It's up to someone else to merge it.
#snac #MacPorts #ActivityPub #FediVerse #Mastodon #opensource #ANSIC #NoDatabaseNeeded #NoCookies #Javascriptーfree #NotMuchBullshit
The Real Grunfink »
@grunfink@comam.es
I'm glad to announce the release of version 2.30 of #snac, the simple, minimalistic #ActivityPub instance server written in ANSI C. It includes the following changes:
Fixed a bug that made some notifications to be missed.
New Mastodon API features: the instance public timeline is now a real one, unfavourite / unreblog is supported (somewhat). Some regression bugs regarding image posting were also fixed.
The non-standard Ping and Pong #ActivityPub activities have been implemented as proposed by @tedu@honk.tedunangst.com in the https://humungus.tedunangst.com/r/honk/v/tip/f/docs/ping.txt document (with a minor diversion: retries are managed in the same way as the rest of #snac messages).
The build process now includes the -Wextra flag.
If you find #snac useful, consider buying grunfink a coffee: https://ko-fi.com/grunfink
ティージェーグレェ「teajaygrey」 »
@teajaygrey@rap.social
@grunfink I've submitted a PR to update the MacPort too:
https://github.com/macports/macports-ports/pull/18552
Though as I write this toot, the CI/build bots have the jobs in a queue.
So, I am not sure whether they will pass?
Seems plausible! Yet even if they do, it's up to someone else to merge the PR, I am not of the commit privileges class.
Deadly Headshot »
@dheadshot@mastodon.social
The Real Grunfink »
@grunfink@comam.es
@dheadshot@mastodon.social @tedu@honk.tedunangst.com #snac uses HTTP Basic Authorization. For this same reason, there is no "logout" option.
Deadly Headshot »
@dheadshot@mastodon.social
The Real Grunfink »
@grunfink@comam.es
@dheadshot@mastodon.social yes, absolutely. Why would not? In fact, given that the user credentials travel in an HTTP header just as a base64 encoding of user:password (i.e. in the clear), I would not recommend using basic auth without https.
Uriel Fanelli »
@uriel@bbs.keinpfusch.net
@dheadshot @grunfink @dheadshot why you don’t use digest?
The Real Grunfink »
@grunfink@comam.es
@uriel@bbs.keinpfusch.net @dheadshot@mastodon.social no especific reason, basic http auth is simpler and suits the needs.
@grunfink
have some kofi
What better way is there to bring iSH to the fediverse than by having it introduce itself? The post you're reading right now was written and served from iSH, running an instance of @grunfink@comam.es's snac :)
David Blue ※ »
@DavidBlue@mastodon.social
Saagar Jha »
@saagar@federated.saagarjha.com
@DavidBlue @ish @grunfink I built it for Linux and it’s running off a cheap Linode. We could put it on an actual iOS device but pointing DNS records at it would be a pain…on the flip side it would probably be a lot faster. Maybe if my server starts having issues keeping up?
The Real Grunfink »
@grunfink@comam.es
If you ever run #snac on an iOS device, I would love to know all details about it 😉
Saagar Jha »
@saagar@federated.saagarjha.com
@grunfink @DavidBlue @ish Amusingly it works better in iSH than it does natively because Darwin doesn’t support anonymous POSIX semaphores. I’ve been meaning to send a patch to the person who’s been packaging snac for MacPorts but haven’t gotten around to it…
Saagar Jha »
@saagar@federated.saagarjha.com
@grunfink @DavidBlue @ish I guess it also works better in iSH-on-iOS than it does in iSH-on-Linux, since there’s a hacky patch for that too in the timed wait code that I need to get around to removing
ティージェーグレェ「teajaygrey」 »
@teajaygrey@rap.social
@saagar oh, interesting! I am that MacPorts person. I just submitted a PR to update snac to 2.29, but other patches and improvements are more than welcome!
Please be patient with me though as I'm hardly a MacPorts wizard. I don't even have commit access to the project.
Saagar Jha »
@saagar@federated.saagarjha.com
@teajaygrey @grunfink @DavidBlue @ish Figured I’d send it upstream first: https://codeberg.org/grunfink/snac2/pulls/32. Otherwise we can just move the patch into MacPorts itself. (Unrelated: why disable parallel builds?)
ティージェーグレェ「teajaygrey」 »
@teajaygrey@rap.social
@saagar Oh, nice one!
Hopefully this will be included in 2.31?
As far as the disabled parallel builds question?
If I recall correctly without it, the CI/build bots may have failed? That was a simple fix when conferring with other MacPorts contributors a while ago as far as their suggestion.
ティージェーグレェ「teajaygrey」 »
@teajaygrey@rap.social
I just tested removing the "use_parallel_build no" line from a Portfile locally.
Still seems to build for me cleanly!
I know the MacPorts' CI/build bots have changed (e.g. they now test against macOS 13) since I first submitted snac for fun.
So the next time I submit a PR, I'll see if that alteration will run?
Saagar Jha »
@saagar@federated.saagarjha.com
@teajaygrey @grunfink @DavidBlue @ish Yep I’ve built it several dozen times at this point, I don’t think there is anything that inherently blocks parallel builds here. To be honest the build process is so simple that if anything doesn’t work that should probably get fixed
The Real Grunfink »
@grunfink@comam.es
Hi: I've accepted these patches into the main tree, so they will be there for 2.31.
Thank you very much to everyone involved!
CC: @DavidBlue@mastodon.social @ish@ish.app @teajaygrey@rap.social
ティージェーグレェ「teajaygrey」 »
@teajaygrey@rap.social
Groovy!
Thank you for your diligent contributions, which reminds me, I want to donate to your Ko-Fi.
The Real Grunfink »
@grunfink@comam.es
The pleasure is mine, working with brilliant people is always amazing.
CC: @DavidBlue@mastodon.social @ish@ish.app @saagar@saagarjha.com
The Real Grunfink »
@grunfink@comam.es
I'm very glad to announce the release of version 2.27 of #snac, the simple, minimalistic #ActivityPub instance server written in ANSI C. It includes some interesting new features (that I announced some days ago):
Started Mastodon API support, so you can use Mastodon-compatible apps to access #snac accounts. What works so far: login, private and public timelines, full post information (replies and ancestors), liking and boosting posts. Things that don't work yet but eventually will: following accounts, posting and replying to messages (I still have to figure out how some things work, like posting images), notifications (needs some internal support), the instance timeline (snac does not have one, but it can be simulated with not much effort) and probably many other things. Things that will never work: bookmarks, pinning, a federated timeline, many other things that I don't remember right now. Please note that if you want to use this API in your instance, you must add some lines to your HTTP proxy configuration, see the snac(8) (administrator documentation) manual page. I'm doing my tests using the #Tusky (which sometimes crashes, surely my fault), #AndStatus, #Fedilab and #Husky Android apps. Success or failure reports will be appreciated.
Fixed some buffer overflows (contributed by Saagar Jha).
Fixed overzealous rejection of some local boosts.
Nordnick
»
@nick@norden.social
Nice to know.
I'm also working on an own #ActivityPub server (currently called #Mammuthus).
Also using #Tusky as main app to test (as it is my primary #Mastodon app).
#Tusky crashes for example, if it gets data in an unexpected format... so it seems not very tolerant in such cases... ;-)
The Real Grunfink »
@grunfink@comam.es
Yes, #Tusky it's a bit crashy at times, but given that I've tried to fed it really broken pieces of data 😆 , I can't blame it. I've found #Husky very similar (they are probably a fork of one another, don't know the history behind), but rather more stable.
Implementing the Mastodon API will (I hope) bring more people to installing #snac in their servers, because it will provide the same service with much less machine requirements. But, I feel the way Mastodon and their apps show the timelines (as a plain list of posts, sorted by date) very dull and confusing; #snac composes the conversations as threaded trees, which I feel much more confortable and readable. But when you use an app, you lose all that.
Nik »
@nikclayton@mastodon.social
Nordnick
»
@nick@norden.social
Yes.
There were a lot a longer time ago, that i can't figure out details anymore, but for this one i have created a workaround in my server-side code:
Display of an user profile: If "created_at" is set to NULL, #Tusky crashes.
Currently i try to track down a #Tusky crash on displaying local / federated timelines (but not in all cases... so it is a little bit tricky...).
Nik »
@nikclayton@mastodon.social
@nick @grunfink created_at is not allowed to be null (https://docs.joinmastodon.org/entities/Status/#created_at). A crash is suboptimal, but probably better than accepting invalid data.
Did you get any further with the timeline crash you mentioned?
Nordnick
»
@nick@norden.social
Do we agree, that #software in general should validate all incoming data? ;-)
No, unfortunately didn't find the time to get into it... yet.
The Real Grunfink »
@grunfink@comam.es
I agree that all data should be validated or, at least, don't crash if it's unexpected or non-existent X-)
The Real Grunfink »
@grunfink@comam.es
And this conversation reminds me that I'm still unable to avoid crashing the official Mastodon app, as well as #Megalodon 😢
Nordnick
»
@nick@norden.social
I'm still not getting these apps connected to an account on my server... :-(
Nordnick
»
@nick@norden.social
Okay, Update.
Tried MfA 1.2.2 on another device (instead of 1.1.3) and adding an account seems now to work. But got then a different error message, that i have to investigate.
Floppy 💾 »
@floppy@fosstodon.org
@grunfink I discovered snac a few days ago and I like it a lot! Currently I don't have a good reason for using it, unfortunately. If/when that changes I'll happily give snac a go!
The Real Grunfink »
@grunfink@comam.es
Call me crazy, but I've started implementing the #MastodonAPI into #snac, the simple, minimalistic #ActivityPub instance server written in ANSI C that everybody loves. When it's ready, you will be able to operate your snac account from a Mastodon-compatible app like #Tusky and the like.
I hope to have it working read-only in a couple of days, but who knows.
Stay tuned!
radio »
@radio@portside.social
@grunfink Hi! snac looks really good, though I'm not quite set for an install yet - how much work do you think it will be to get phpbb3 working with it?
The Real Grunfink »
@grunfink@comam.es
Hi. I don't know a word about phpbb3, but if it does implement a Mastodon API client, it will eventually work.
radio »
@radio@portside.social
@grunfink I'm counting on it, though I I'm not much of coder myself.
fantazo »
@fantazo@esperanto.masto.host
@grunfink Oh no, the Rust-crowd will soon rewrite it in Rust.
s4if »
@s4if@backyard1.saifulh.online
@grunfink whoa, can't wait to try snac again..
Chema Hernández Gil »
@chema@social.sanfranciscan.org
This is really, really cool. I was wondering if there was an #ActivityPub implementation in C (which is the only language I feel comfortable with) and voilà, landed on your repo. I will keep an eye on it! Sometimes less is a whole lot more.
Jef Poskanzer
»
@jef@mastodon.social
@grunfink ANSI C forever!!
Chema Hernández Gil »
@chema@social.sanfranciscan.org
It has *two* external dependencies (openssl and curl) and no database or cookies. This is amazing!
Jef Poskanzer
»
@jef@mastodon.social
@chema @grunfink Compiled cleanly for me, but wouldn't link because the local libcurl wants a version of libcrypto that is no longer present. I'm sure if I ever get around to updating my system it'll link.
So I guess even with only two external dependencies, someone will find a way to make them conflict.
Jef Poskanzer
»
@jef@mastodon.social
@chema @grunfink By the way I got around to test-compiling snac2 with the extra-strict compiler flags I favor: -ansi -pedantic -Wall -Wpointer-arith -Wshadow -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
This generated some warnings. Didn't see anything that looked serious.
The Real Grunfink »
@grunfink@comam.es
This large set of flags is a bit too much for me 😆 , but I've followed your advice and fixed some silly unused function arguments (and 'silenced' others) and added -Wextra as a default compilation flag.
gcc on Linux gives me 0 warnings. llvm on OpenBSD complains about a null pointer subtraction, but I think it's ok as it is.
Thanks for your help!
CC: @chema@sanfranciscan.org
ティージェーグレェ「teajaygrey」 »
@teajaygrey@rap.social
I'm at a laundromat cleaning my clothes.
Passing time with this terrible touch screen device with a cracked screen yet repology and codeberg still shows:
@grunfink has released a new version of snac!
So after I'm done here and back at a laptop unlike this touch screen device which is wack.
Updating the MacPorts' Portfile to 2.29 I shall work, though I wouldn't call an update a hack.
Perhaps I'll add a variant for the new compile time option for no Mastodon support.
Maybe that seems odd to you but it's not a retort.
ActivityPub is not just one implementation after all.
Which is why I dig snac, it's in ANSI C and compiled? It's small!
ティージェーグレェ「teajaygrey」 »
@teajaygrey@rap.social
I submitted a PR to update @grunfink's snac to 2.29 with a modified MacPorts' Portfile here:
https://github.com/macports/macports-ports/pull/18458
CI and build bot checks passed, though it's up to someone else with commit access to merge in case I hadn't already made that clear?
As alluded to, I have added a variant +nomastodon if you do not want the preliminary Mastodon API support, sorry I did not make that option available earlier (it was introduced in 2.28?), but now it's a choice for snac to be built without it.
Left by default, it will build with that sort of it.sh. ;)
#snac #MacPorts #ActivityPub #FediVerse #Mastodon #OpenSource
radio »
@radio@portside.social
@teajaygrey @grunfink
"ActivityPub is not just one implementation after all." I now see. (the typo was funnier, but this is what I meant)
The Real Grunfink »
@grunfink@comam.es
I've just released version 2.29 of #snac, the simple, minimalistic #ActivityPub instance server written in ANSI C, including the following:
New Mastodon API features: account search, relationships (so the Follow/Unfollow buttons now appear for each account), follow and unfollow accounts, an instance-level timeline (very kludgy), custom emojis for accounts and statuses, many bug fixes (sadly, the Mastodon official app still does not work).
If find #snac useful, consider buying grunfink a coffee: https://ko-fi.com/grunfink
halcy
»
@halcy@icosahedron.website
@grunfink may have said and forgotten this before but, actually really curious how much of my test suite passes against this
I don't know if I will manage to work up motivation to actually, try, but in case, is there an easy way to preload some (masto api compatible) user data like access tokens / users / passwords and the like into it for testing?
The Real Grunfink »
@grunfink@comam.es
Hello. You can't import access tokens nor users; you must create your user from scratch (or get a snac admin create one for you). Once you have a user in your snac instance, you can use apps like Tusky, Fedilab or AndStatus to connect to it and do mostly the same things you would if the account were a Mastodon one.
What can be done is to import the list of people being followed from a Mastodon export file into your snac user. This process must be done from the command line (exactly how is described in the documentation).
I hope this answers your questions.
Cheshire Chad
<|<| »
@condret@shitposter.club
@grunfink why printf and not puts? why so many?
The Real Grunfink »
@grunfink@comam.es
Oh, no real reason. Just personal preferences.
Cheshire Chad
<|<| »
@condret@shitposter.club
@grunfink ok. it's based that almost all your projects seem to be written in C
The Real Grunfink »
@grunfink@comam.es
Yes. I use C mostly for everything. I know many other programming languages but C is by far my favourite.
Elaborating on my previous answer:
Why so much function calls and not, for example, use just a big string and print it? Because if I want to temporarily disable one line, I just comment it out, and...
Why printf() and not puts()? Because if I want, for example, to add a default value for something, I just can insert a %s or whatever and, in the same line, add the value to be printed.
Cheshire Chad
<|<| »
@condret@shitposter.club
@grunfink C is the most fun language
Cheshire Chad
<|<| »
@condret@shitposter.club
@grunfink checkout this project https://github.com/radareorg/radare2 , we do it all in c
グレェ「grey」 »
@byterhymer@mastodon.social
I submitted a PR to update MacPorts' version of @grunfink' snac to 2.28 here:
https://github.com/macports/macports-ports/pull/18390
CI/build bot checks passed!
It's up to someone else to merge it.
The Real Grunfink »
@grunfink@comam.es
'Names' are words we humans give to things and actions to distinguish from one another. But, here in the Fediverse, the act of re-sending another user's post...
In the #ActivityPub protocol, it's called 'Announce'.
In the #Mastodon web interface (and here in #snac too), it's called 'boost'.
In the Mastodon API, it's called 'reblog'.
Mastodon users say, informally, 'retoot'.
In the #Pleroma web interface (AFAIK), it's called 'repeat'.
In #honk it's called 'bonk' (because, why not).
Outside there, in other crappy social networks, Facebook names the action 'share' (IIRC), Twitter users names it 'retweet'. I don't know about others, but they probably use a different verb.
Cheshire Chad
<|<| »
@condret@shitposter.club
@grunfink why not name it respam in snac?
Benjamin Kwiecień :eo: »
@ben@kwiecien.us
@grunfink bonk is my favorite
The Real Grunfink »
@grunfink@comam.es
I've just released version 2.28 of #snac, the simple, minimalistic #ActivityPub instance server written in ANSI C, including the following:
Added a new notification area to the web interface, accessible from a link at the top, that also shows the number of unseen events. This area lists all notifications in reverse chronological order and provides a button to clear all.
More work in the Mastodon API. The new supported features are: notifications, post of new and reply messages (including attached images). Some API v2 entry points had to be implemented, so you'll need to update your HTTPS proxy configuration again, see snac(8). #Tusky no longer crashes, or so I think. The official app and close relatives like #Megalodon still don't work, though.
If you are not interested in this Mastodon API crap, you can compile it out of your #snac by defining the NO_MASTODON_API preprocessor directive and forget about it.
Fixed an HTML cache bug (it was not refreshed after editing a post).
Sometimes, when I like or retoot a post, I don't understand why the TL goes to some strange place or the beginning and not following where it was. is it something you'll implement or maybe I'm doing something wrong and you can help me?. Thanks.
The Real Grunfink »
@grunfink@comam.es
Hi. When liking or boosting, the timeline position does not change. But, as there is (by design) no JavaScript, every like or boost operation implies a round trip from the server, and the conversation state may have changed with new replies and moved to the top due to activity (more active conversations are always moved to the top).
This is (also by design) different to what Mastodon does, so it may seem confusing until you get used to it.
this is minimalist to the pain. it doesnt allow for polls or audio content, IDK.
The Real Grunfink »
@grunfink@comam.es
There is no poll support, at least for now (not on my top list of interests). I've not tested any audio uploads; they may work if uploaded from the "Image" button (awfully misleading, I'm sorry). I promise to improve this side of things.
Anyway, yes, minimalism is the main goal, probably painful for many.
this seems accessible at a first test, sending a post, the edit field is not labelled, easy fix. and there are no mention suggestions, or they are hidden for a screenreader. @grunfink
The Real Grunfink »
@grunfink@comam.es
There are no mention suggestions, they must be written manually.
グレェ「grey」 »
@byterhymer@mastodon.social
I submitted a PR to update MacPorts' version of @grunfink's snac to 2.27 here:
https://github.com/macports/macports-ports/pull/18266
Required a little bit more tweaking to the Portfile and Makefile patch, but nothing too significant thankfully!
CI/build bot checks passed OK!
It's up to someone else to merge it.
The Real Grunfink »
@grunfink@comam.es
Hi. Yes, you're right, images and their description should be kept from the original post when editing.
I'll add this issue to the TODO file.
グレェ「grey」 »
@byterhymer@mastodon.social
I submitted a PR to update @grunfink's snac in MacPorts to 2.26:
https://github.com/macports/macports-ports/pull/18193
CI/build bot checks passed!
It's up to someone else to merge it.
The Real Grunfink »
@grunfink@comam.es
Hi, everyone. I've just released version 2.26 of #snac, the simple, minimalistic #ActivityPub instance server written in ANSI C. This is a low profile maintenance version that includes just the following minor changes:
The OpenSSL code has been refactored to avoid using deprecated functions.
Added more aggressive filtering on unwanted Announce (boost) messages.
julien⚒️⚒️ »
@julienxx@fedi.9til.de
Casually browsing fedi from #9front
グレェ「grey」 »
@byterhymer@mastodon.social
@julienxx Groovy!
Does @grunfink's snac (https://codeberg.org/grunfink/snac2/) build on 9front/plan9?
julien⚒️⚒️ »
@julienxx@fedi.9til.de
@byterhymer @grunfink At first glance it wouldn’t compile without some changes as openssl and curl stuff would need to be adapted. Snac looks great, haven’t heard of it before. Thanks!
radio »
@radio@portside.social
@julienxx @byterhymer @grunfink I took a brief look, and it seemed that if you had the dev libraries installed there would be no problem. I haven't tried it because I'm moving some large crawls, and doing more, so my resources are a mess right now. I did decide my priorities are search, social and news. So I hope I get to this, looks good to me.
tedu »
@tedu@honk.tedunangst.com
I am not the internet police, but I think it would be better for people who write masto api clients to not refer to them as generic activitypub clients. Did you even read the page title of the spec you implemented?
The Real Grunfink »
@grunfink@comam.es
I totally agree, I still haven't found any real ActivityPub client.
Does #honk support the C2S ActivityPub protocol?
Uriel Fanelli »
@uriel@bbs.keinpfusch.net
The Real Grunfink »
@grunfink@comam.es
I've tried AndStatus and, when you try to create a pure ActivityPub C2S account, the first and only thing that it does is to send an OAuth request to the server, which is very wrong.
I think @tedu@honk.tedunangst.com is speaking about a very similar experience.
Uriel Fanelli »
@uriel@bbs.keinpfusch.net
The Real Grunfink »
@grunfink@comam.es
I don't know. Maybe Pleroma responds to the OAuth query and AndStatus is able to go further, but that's not ActivityPub at all.
Uriel Fanelli »
@uriel@bbs.keinpfusch.net
@grunfink I was able to post some text, too, and read some timeline. The issue was with attachments, ad far I remember.
tedu »
@tedu@honk.tedunangst.com
@grunfink no, everybody wants the mythical C2S support, but nobody has thought about how basic functionality like image uploads will work.
グレェ「grey」 »
@byterhymer@mastodon.social
Not sure how I missed this days ago when it was announced yet again.
My PR to update @grunfink's snac to 2.25 in MacPorts:
https://github.com/macports/macports-ports/pull/17958
It's up to someone else to merge it, but at least it passed the CI/build bot checks.
The Real Grunfink »
@grunfink@comam.es
I'm happy to announce version 2.25 of #snac, the simple, minimalistic #ActivityPub instance server written in ANSI C. These are the changes:
Federation with other instances have been improved by collecting shared inbox information from input messages more thoroughly.
Fixed an obscure bug that caused connection rejections from some instances.
Some rules regarding incoming messages have been tightened; messages that are not related to the user are not added to the timeline. This has to be implemented because some ill-behaving ActivityPub implementations were found injecting unwanted messages to user inboxes.
Messages from MUTEd users are rejected as soon as possible with a 403 Forbidden HTTP status.
Fixed a minor bug regarding the scope of the 'Update' activity (edited posts were sent to more recipients that it should).
More aggressive input sanitization (some posts were found that included strange ASCII control codes).
Added "Open Graph" HTML meta tags for better previsualization of snac links from other social media.
Johannes Ernst »
@J12t@social.coop
@grunfink You could come to https://fediforum.org and run a session about it.
The Real Grunfink »
@grunfink@comam.es
Oh. I'm afraid I won't be available those days, but thanks for bringing this to my attention. Maybe next time.
Miah Johnson »
@miah@hachyderm.io
I for one don't think we're going to "win" a battle against discord/twitter and the like with software that requires a "mini cloud" installation to setup and manage it.
Sure you can install Mastodon / Matrix via docker, but it is simple to install, and complex to manage over time. Doubly so if the word "scale" ever comes up.
As soon as you mention "SQL Database" you're going to lose most people.
2020's era software missed the KISS memo.
グレェ「grey」 »
@byterhymer@mastodon.social
@miah I think one of the many things I dig about @grunfink 's snac is this: "No database needed" ;)
I also sincerely appreciate the "Totally JavaScript-free" aspect too!
The entire compiled implementation on macOS for version 2.24? 230737 bytes (approx 231KiB). Also has minimal dependencies, the biggest challenge with maintaining the MacPort so far has been due to my own ineptitude with MacPorts, not snac's code.
I wish more followed grunfink's excellent example on contemporary software dev.
グレェ「grey」 »
@byterhymer@mastodon.social
I submitted a PR to update @grunfink' snac to version 2.24.
It's up to someone else to merge it.
#snac #MacPorts #ActivityPub #FediVerse
The Real Grunfink »
@grunfink@comam.es
Hi, everyone. I've just released version 2.24 of #snac, the simple, minimalistic #ActivityPub instance server written in ANSI C, that includes the following features and bugfixes:
Sending non-public messages is now much easier: a checkbox to post a message to only those people mentioned in the message body has been added.
Fixed an over-optimization bug that caused some mentioned recipients to be skipped.
Added some new administrator tweaks: email notifications can be globally disabled.
https://codeberg.org/grunfink/snac2
This post has been inspired by the song Ghosts Again by Depeche Mode.
グレェ「grey」 »
@byterhymer@mastodon.social
PR to update the MacPort for @grunfink 's snac to version 2.23:
https://github.com/macports/macports-ports/pull/17799
Previous merged PR was for 2.18. Although, someone opened this Trac ticket: https://trac.macports.org/ticket/66751 which is still open, because my attempts to refactor the Portfile with the PortGroup makefile 1.0 have been unsuccessful so far.
Thankfully, another ticket was opened: https://trac.macports.org/ticket/66989 so I can justify just pushing a version bump & solve the harder problem later?
The Real Grunfink »
@grunfink@comam.es
I'm happy to announce version 2.23 of #snac, the simple, minimalistic #ActivityPub instance server written in ANSI C, including:
The user avatar can now be uploaded (instead of given as an URL).
Minor speed improvements int output messages.
Minor improvements in error logging.
Ellenor et al Bjornsdottir »
@ellenor2000@mastodon.top
@grunfink Help me to decide, help me make the most of freedom and of pleasure... sorry. data.c:1570 - why unlink right when an item starts to be run? Why not only unlink when we can be sure the item has either been successfully delivered, or successfully rejected?
Should I come back with a merge request implementing this?
The Real Grunfink »
@grunfink@comam.es
Hi! This unlink() call just after the fopen() is totally intentional and is there to avoid another thread dequeueing this same file; the file is deleted for the rest of the world, but still there for us until definitely purged by the system when we fclose() it.
The file (a JSON one) is then parsed. If it's malformed, there is nothing to be done about it; if it's OK, then it's processed. If this processing fails (e.g. it's an output message and the server at the other side is down), then the job will be requeued, but it will never be the exact same file because it has a different number of retries and a different time-based name.
So, in any case, deleting it as soon as possible is the best way of being sure that only one thread processes this queue item.
Thanks for taking a look at the #snac code! If you have more questions, please ask.
Ellenor et al Bjornsdottir »
@ellenor2000@mastodon.top
@grunfink so if I'm going to patch this to be a bit safer, I should go to having a single thread for scanning the queues and firing up separate threads or processes for running tasks (which is what qmail, from the 90s, does - it has some issues ("silly qmail syndrome") but is at least immune to another thread dequeuing the same file, since there's only one thread doing any dequeuing)?
The Real Grunfink »
@grunfink@comam.es
This is exactly how it works right now; just one thread dequeues the messages from the disk and inserts them in a memory fifo (arbitrated by a mutex and a semaphore), and that is processed by a pool of threads. You can see all that code in httpd.c.
So, the early unlink() can be considered unnecessary, just an additional measure. The file must be deleted, so... why wait?
Ellenor et al Bjornsdottir »
@ellenor2000@mastodon.top
@grunfink So... there's a race condition with dequeues but there's only one thread doing dequeues?
The Real Grunfink »
@grunfink@comam.es
Sorry, I'm afraid I didn't express myself correctly. English is not my first language.
There is no race condition in dequeueing because it's only done from one thread. Once dequeued, the message lives only in memory until a) the message is sent, or b) the message is requeued because of an error.
If #snac crashes in the brief time window from the deletion of the file and the sending confirmation, then there is a small chance of data loss, I agree.
Ellenor et al Bjornsdottir »
@ellenor2000@mastodon.top
@grunfink Got you. I'll see about implementing only removing when success or failure is guaranteed.
The Real Grunfink »
@grunfink@comam.es
I'm a bit embarrassed of announcing version 2.22 of #snac, the simple, minimalistic #ActivityPub instance server written in ANSI C, which fixes some bugs, one of them pretty nasty:
Fixed a bug with the Delete button in the web interface: sometimes, instead of the post (as the user intended), the follower was deleted instead 🤦
Fixed a bug in the command-line option follow (and probably others), that made it fail silently if there was no running server.
Fixed a crash under OpenBSD (a recent change needed a new permission to the pledge() call that was forgotten).
The Real Grunfink »
@grunfink@comam.es
I'm happy to announce version 2.21 of #snac, the simple, minimalistic #ActivityPub instance server written in ANSI C. This time there are a bunch of things:
Users can now specify an expire time for the entries in their timelines (both their own and others').
Added support for sending notifications (replies, follows, likes, etc.) via Telegram.
Followers can now be deleted (from the people page in the web interface). Yes, to stop sending in vain your valuable and acute posts to those accounts that disappeared long ago and flood the log with connection errors.
The internal way of processing connections have been rewritten to be more efficient or, as technical people say, "scalable". This way, snac is much faster in processing outgoing connections and less prone to choke on an avalanche of incoming messages. This is a big step towards the secret and real purpose of the creation of this software: being able to host the account of #StephenKing when he finally leaves that other site.
The note action from the command-line tool can also accept the post content from the standard input.
Usage tips: never reply to toxic people (apply the MUTE button to them). Enjoy a coffee. Smell the sea. Listen to Mahler. Spend a bit less time in social media and a bit more with your loved ones.
Three-alist 🌲 »
@threalist@social.fbxl.net
I think "lightweight" + easy to install is the missing feature for a lot of users who would potentially self host but can't afford infiniti storage for the server
Three-alist 🌲 »
@threalist@social.fbxl.net
What does the front end look like?
The Real Grunfink »
@grunfink@comam.es
Hi. #snac is specially suited for personal and small sites and can be ordered to be pretty aggressive towards storage usage.
You can take a look at the interface on my own public page:
https://comam.es/snac/grunfink
You can see that posts are treated as conversations. The private interface is mostly the same, but you have interactive buttons to Like, Boost, Reply, Follow, etc.
Three-alist 🌲 »
@threalist@social.fbxl.net
Woah. This has proper post threads?
👌
The Real Grunfink »
@grunfink@comam.es
Woah. This has proper post threads?Oh yes it does 😀
FourOh-LLC »
@FourOh-LLC@pkteerium.xyz
Just throwing this out there.. My favorite Fedi server is Hubzilla, I am prepping for the day when ActivityPub will go the way of the DoDo and Zot / Zap will host the remaining Civilization.
Programmers please do not put all our eggs in one basket...
The Real Grunfink »
@grunfink@comam.es
Hello. Never heard about this Zot / Zap thing before. I'm looking at the specs right now, sounds interesting!
FourOh-LLC »
@FourOh-LLC@pkteerium.xyz
Hubzilla and its native Zot has a number of interesting features. One that does not jump right out is the ability to partition the Fedi into separate Realms, and when this is put behind a DNS with a custom root (such as OpenNIC) it provides with significant resilience against censorship and shut-down attempts.
ActivityPub has plenty of programmers, and in my humble opinion Hubzilla deserves more attention and a fair representation as a Fediverse component.
FourOh-LLC »
@FourOh-LLC@pkteerium.xyz
I apologize though, I really do not want to hijack your thread about your work, but I am not a programmer and my focus is not always on target..
This could be packaged for YunoHost, which I believe already has the Docker environment. Its "Application Catalog" has only a limited Fediverse clients, this could grow there into something more significant.
The Real Grunfink »
@grunfink@comam.es
The #ActivityPub protocol is specially hostile when you're starting over, because you must implement almost everything of it before you can even test the most basic things.
Given that you plan to work in Go, you may also be interested in taking a look at honk, which is an ActivityPub implementation in that language:
daniel sieradski »
@selfagency@kibitz.cloud
@grunfink @uriel there's also go-fed https://go-fed.org/
The Real Grunfink »
@grunfink@comam.es
It seems like the certificate for that site has expired:
$ curl -I https://go-fed.org
curl: (60) SSL certificate problem: certificate has expired
daniel sieradski »
@selfagency@kibitz.cloud
@grunfink yeah i noticed that too and messaged who i thought was the admin
daniel sieradski »
@selfagency@kibitz.cloud
@grunfink looks like the developer has been m.i.a. for at least a year by the looks of his github contributions. hope he's alive and well!
The Real Grunfink »
@grunfink@comam.es
Oh. Let's hope the developer just lost interest in the project.
marius »
@mariusor@metalhead.club
@grunfink @uriel I can also recommend the **other** Go #ActivityPub library: https://github.com/go-ap
(of which I am the maintainer :D)
The Real Grunfink »
@grunfink@comam.es
The number of Fediverse implementations is dangerously approaching the number of Fediverse users 😉 😆
smallcircles (Humane Tech Now) »
@smallcircles@social.coop
See a couple more #Golang libs on https://delightful.club/delightful-activitypub-development
And find apps on https://delightful.club/delightful-fediverse-apps
I've started collecting test data and used it to write tests corresponding to the specification.
Both are still a work in progress and might change as I understand the spec / requirements better. My current guess is that, I understand like a third, know I don't understand a third, expect a third to come as a complete surprise to me.
Of course, this is not to say that the third, I understand, isn't already more than enough to run a server doing ActivityPub.
The Real Grunfink »
@grunfink@comam.es
Yes, I agree honk is a bit peculiar in the naming of things, and opinionated in the interface. Its author, @tedu@honk.tedunangst.com , is an awesome hacker, so the code is surely of immense quality.
My programming approach is very different to tedu's. Also, the codebase of #snac is probably smaller, so it may be easier to explore.
I am just hoping your code is a little more readable.I also hope so 🙂
The Real Grunfink »
@grunfink@comam.es
You're right; I just implemented what I understood as the minimum code for a having a basic "presence" in the Fediverse: basic 'Person' management (i.e. retrieving Person objects to get the keys for signing the messages, and serving your own 'Person' objects to others for them to validate your signatures), 'Follow' messages (in both directions) and then 'Note' messages (in both directions). Likes and boosts (in the protocol named 'Announces') came after that.
These things are the bare minimum. Of course, as all #ActivityPub traffic is HTTP signed, you need to get that code very finely tuned. The problem is that there is no "implementation reference" to test against, you have to communicate with real servers, and everyone of them behaves a little different. Some instances are hostile to testing code (which I understand) and may block you. If your signing code does not work well, you won't get any useful response from any implementation.
Also, I consider the ActivityPub to be a bit ambiguous in some places.
What I suggest is that you install #snac or any other simple implementation and bang your messages against.
The Real Grunfink »
@grunfink@comam.es
Hi. Sorry, I know next to nothing about the Pleroma code. Do you consider it a bug, or a good thing?
The Real Grunfink »
@grunfink@comam.es
I'm glad to announce version 2.20 of #snac, the simple, minimalistic #ActivityPub instance server written in ANSI C, including just one new feature:
Image attachments in posts can now have a description (a.k.a. "alt text").
There has been several internal changes, but nothing visible.
Michał "rysiek" Woźniak · 🇺🇦 »
@rysiek@mstdn.social
Very cool how adding an editable text label with the
logo gets the biggest centralized code hosting site — an abusive one at that, feeding all your code to train a Microsoft-owned AI — loads of free publicity around here. 🤔
Instead, I'm gonna send some love to @Codeberg and @forgejo, since they might actually *implement federation* for code hosting systems.
As in: joining fedi, instead of just paying lip service like that other code hosting site.
Michał "rysiek" Woźniak · 🇺🇦 »
@rysiek@mstdn.social
In fact you know what? Let's make this thread about cool projects not hosted on Microsoft GitHub.
Any self-hostable repo system instance counts (yes, that includes GitLab in my book) counts.
Respond with a link to a repo and a paragraph-two of a description of the project, and I will boost it (unless for whatever reason I consider the project meh; it's my thread, sorry
).
The Real Grunfink »
@grunfink@comam.es
The minimalist #ActivityPub server software I develop, #snac, is not hosted on MS Github and it's also very cool 😀
The Real Grunfink »
@grunfink@comam.es
I'm glad to announce version 2.19 of #snac, the simple, minimalistic #ActivityPub instance server written in ANSI C, including the following changes:
You can edit your own posts from now on.
Fixed the breakage of Emojis I introduced when implementing HashTags because I am a moron.
Added adaptative timeouts when sending messages to other instances.
MJ Muse »
@MJmusicinears@mastodon.world
@grunfink I wish I was a geek to understand anything of this language
The Real Grunfink »
@grunfink@comam.es
Sorry for the technobabble, I'll try my best.
I'm the developer of #snac, a piece of software that implements the same protocol as Mastodon and others, so it can be used as a part of the social network nicknamed the "Fediverse". There is a new version of it (2.19), that allows you to modify your own posts and fixes a bug I introduced in the previous version regarding the processing of Hashtags. Also, some servers out there are a bit slow in their response, so this new version tries to adapt to them by waiting a bit more when retrying after a fail.
I apologize, English is not my first language 😀
MJ Muse »
@MJmusicinears@mastodon.world
@grunfink thanks for clarifying for us non geeks, it makes me feel stupid
Andros Fenollosa »
@andros@hostux.social
@grunfink @admin Congratulations!!!!! Do you have any screenshots to see the interface or examples of use?
The Real Grunfink »
@grunfink@comam.es
Thanks! I don't have any screenshots of the interface (I know I should), but you can take a look at what the public face of a #snac account looks by peeking my own:
https://comam.es/snac/grunfink
You'll see that conversations are threaded, not just a list of not-obviously-related posts like what Mastodon and others show.
The private interface is mostly the same as the public one, only with buttons to post / like / boost / MUTE / follow etc.
iooioio »
@iooioio@fosstodon.org
@grunfink Cool! I really like the look of it (viewing on mobile).
Michael Muchmore »
@mikemuch@ioc.exchange
Is it just me or does technology just continue to get increasingly creepier and grosser?
グレェ「grey」 »
@byterhymer@mastodon.social
@mikemuch it is not just you.
Thankfully, there are exceptions.
I dig @grunfink's snac and its intentional minimalism a lot as a more recent example.
I'm also really appreciating all the effort that @stsp et al are putting into gameoftrees/got though if there were ever a group of developers that epitomized something similar to the Japanese concept of 改善(kaizen, translated as: "betterment, improvement, or continuing refinement") it definitely would come from the OpenBSD crowd consistently.
The Real Grunfink »
@grunfink@comam.es
I'm thinking about adding some new features to snac, the minimalist ActivityPub server written in C. As these features are opinionated and probably even controversial, they will be off by default. These are the ideas:
First, add an option to automatically drop all announces (boosts). Unless your affinity with the people you follow is deep, boosts are just (usually) tangentially interesting, probably flooding your timeline and just forcing you to spend more and more time inside the social media space. A variant of this would be to make this option not global, but by actor, so that you can 'boost-mute' only those adorable but annoying fellows that are particularly trigger-happy to the boost button (implementing the option this way is more work for me, but not that much).
Second, add an option to drop all messages that are not public nor mentioning you. That is, filter out those infamous 'follower-only' messages. People use to engage in these follower-only conversations, so you only receive these chat fragments without context (unless you also follow all the people involved) and they are purely noise. In my opinion, follower-only messages are a very bad idea that just pollute the space (and this is why snac doesn't implement them and never will).
Third, add an option to drop all replies to your messages from people that you are not following. This would prove useful for very popular, mostly announce-only accounts. I agree that it's a bit elitist and probably toxic, but also helps in spending less time inside the social networks and more time painting or writing or taking the dog for a walk.
What do you think?
bouncepaw 🍄 »
@bouncepaw@merveilles.town
@grunfink I like the first idea, but don't really understand the use of the other two.
Paulo Laureano »
@pls@mrnet.pt
@grunfink great ideas to have as options!
グレェ「grey」 »
@byterhymer@mastodon.social
@pls I concur, they seem sound as options.
If there's one thing I really kind of wish I had in the mastodon world, that I do not (given that it can be tweaked to be sorta similar to tweetdeck) I don't see a way to focus on any one accounts' posts.
So for example, if I am trying to drill down on others, or even my old toots: it's polluted with boosts and such too.
So, a boost-mute option seems as if it could be really useful, even if it is just a view mode rather than a default? @grunfink
Víctor Moral »
@VictorMoral@mastodon.social
@grunfink la segunda está bastante bien. Caer en medio de una conversación que no puedes leer es molesto.
Aaron is learning »
@aaron_codes@toot.community
@grunfink hi, snac looks really cool! I will definitely consider it when I get around to setting up a server.
I personally would only use the first feature with the per-account variant, since I get a lot of discovery value from many of my follows’ boosts.
The Real Grunfink »
@grunfink@comam.es
Most probably, I'll implement the first feature per-account, not globally.
Thanks to all of you for your opinions.
Wandering Thinker »
@wthinker@libranet.de
@grunfink I think that 2 and 3 looks good.
Александр »
@shuro@friends.deko.cloud
@grunfink Would be nice to have option 3 be available on post level basis. So you can "turn off comments" for specific post.
Of course some sort of attribute indicating this on protocol level would also be nice so remote servers could recognize it and reflect it preventing users from sending undeliverable replies in the first place.
Iron Bug »
@iron_bug@friendica.ironbug.org
@grunfink I looked for C AP realizations some years ago, but haven't heard of that server.
I write my own realization of AP server and client in C. but it's not minimalistic, it's rather high-load kind of server. but it's compact and uses minimal resources. and I want a console client.
GNU Chad
»
@usrib@social.gnuhacker.org
@grunfink
Nice ideas!
Please implement a import/export follow system
The Real Grunfink »
@grunfink@comam.es
It's not a proper import option, but you can feed your #snac with the content of a Mastodon following export CSV file by using the command line:
awk -F, 'NR > 1 { print $1 }' /path/to/following_accounts.csv | \
xargs -n 1 snac follow $SNAC_BASEDIR $SNAC_USER
Hope you find it useful.
auser »
@auser@social.userserviceable.com
This sounds great, thank you for your work on as snac! One thought I had was the ability to select default expanded/not expanded based on some per-follow settings.
The Real Grunfink »
@grunfink@comam.es
I'm happy to announce version 2.18 of snac, the simple, minimalistic ActivityPub instance server, including the following changes:
Added support for #HashTags (they are not internally indexed yet, only propagated to other instances).
Added support for OpenBSD enhanced security functions unveil() and pledge() (contributed by alderwick).
The purge ttl for stray global objects has been shortened.
In the HTML interface, don't show the collapse widget for non-existent children.
Added support for HTTP signature pseudo-headers (created) and (expires), that are used by some ActivityPub implementations (e.g. Lemmy).
When replying, the mentioned people inherited from the original post will be clearly labelled with a CC: prefix string instead of just being dropped out there like noise like Mastodon and others do. (I hope) this will help you realise that you are involving other people in the conversation.
Theory_of_Everything »
@theorytoe@ak.kyaruc.moe
>Easily-accessed MUTE button to silence morons
chad mute button
also looks very cool Ill have to check it out at some point!
mikael »
@mikael@merveilles.town
@grunfink Is it possible to compose posts (or whatever you call them in the snaciverse) in HTML? Thinking about basic formatting and hyperlinking.
The Real Grunfink »
@grunfink@comam.es
Hi. Here in #snac posts are named posts 😀
They can be written in a small subset of Markdown. The exact details are documented in the manual page snac(5), "File Formats Manual", section "Message Formatting".
Basically you can use bolds, italics, preformatted code and blockquoted text. URLs are automatically made "clickable". HTML is filtered out.
mikael »
@mikael@merveilles.town
@grunfink Oh, sorry. That's an excellent manual. I see you're using snac without a subdomain (but with a sub dir). I like that you're getting username@domain.tld without having to run it in the root of domain.tld. Is there any trick to that?
The Real Grunfink »
@grunfink@comam.es
Thanks regarding the quality of the manual!
There is no trick in configuring #snac in a subdirectory: when doing your new installation, use your plain domain host and give the subdirectory you wish when "URL prefix:" is prompted. You have to configure your frontend www server accordingly, of course.
グレェ「grey」 »
@byterhymer@mastodon.social
@grunfink This seems awfully minor, too minor for bug report formalities, but I couldn't help but notice:
"snac 2.18 - A simple, minimalistic ActivityPub instance
Copyright (c) 2022 grunfink - MIT license"
Yet, we are now in 2023 C.E.
The Real Grunfink »
@grunfink@comam.es
You are very right. Copyright years in my source code are always a mess, sometimes they lag for six months or more.
Daniel Stenberg, of the #curl tool and library fame, wrote not long ago an article [1] wondering if years in copyright notes are mandatory or not... His conclusion was to delete all year mentions. I'm not sure if he's right; I'm going to keep them by now (updating them, of course).
Thanks for your help.
[1] https://daniel.haxx.se/blog/2023/01/08/copyright-without-years/
Andy Alderwick »
@alderwick@merveilles.town
@grunfink Hello from the fediverse this time! 👋
Great idea about including a relayd config file for snac in the examples/ folder: I just wanted to let you know I haven't forgotten about it, just that the next few days will be very busy 😊
I also have snac working with both unveil and pledge, with a WIP commit at https://codeberg.org/alderwick/snac2/commit/a33686992747f6cbd35420d23ff22717938b6228 . I'm not happy with the extra complexity to send an email, but after asking around at https://merveilles.town/@alderwick/109548339343453576 it's unavoidable without “unveil("/bin/sh","x");”.
The Real Grunfink »
@grunfink@comam.es
Oh, this is awesome! I started playing with unveil() but soon got lost 😀
Certainly the email sending function is much more complex, but using popen() was a bit of a kludge. I think your implementation is much more appropriate.
Thank you very much for your help!
Andy Alderwick »
@alderwick@merveilles.town
@grunfink Great! I'll test it on Linux too before I raise a pull request.
I added the send_email() function next door to the process_queue() function that calls it. Does it make sense there, or would you prefer it having a different name or put in a different C file?
The Real Grunfink »
@grunfink@comam.es
Hi (happy new year).
Do you still consider your unveil() patch as a WIP, or can I integrate it into the main codebase?
Andy Alderwick »
@alderwick@merveilles.town
@grunfink And to you!
I haven't tested it on Linux yet, but if sendmail works for you after applying it, I don't see any reason why it shouldn't be integrated 😊
My testing instance worked fine over the winter break: if either the unveil or the pledge was violated I would have got an email about it, so those calls are ready to go!
The Real Grunfink »
@grunfink@comam.es
Fantastic!
I'll give it a try on Linux myself. Code seems pretty UNIX-y, so I don't expect surprises.
Thank you very much!
The Real Grunfink »
@grunfink@comam.es
I'm happy to announce version 2.17 of snac, the simple, minimalistic ActivityPub instance server. This time is mostly bugfixes:
Fixed a header bug (contributed by alderwick).
Fixed a bug in the Boost by URL option when the URL of the boosted message is not the canonical id for the message (e.g. Mastodon's host/@user/NNN vs. host/users/user/statuses/NNN).
Fixed crash on a corner case regarding failed webfinger requests.
Usage tips: Don't reply to morons, MUTE them. Try to spend less time on social networks. Go for a walk. Read a book. Watch a movie.
/usr/people/flexion
»
@flexion@oldbytes.space
Mastodon + Motif = mastif! 😎
Experimenting with Xm, Xt, X11, libcurl, libjson-c on IRIX.
グレェ「grey」 »
@byterhymer@mastodon.social
@flexion This is all kinds of extra, and hilariously awesome.
Nonetheless, now you have me wondering if https://codeberg.org/grunfink/snac2 will build on IRIX?
/usr/people/flexion
»
@flexion@oldbytes.space
@byterhymer does not compile without modifications. Missing timegm.
グレェ「grey」 »
@byterhymer@mastodon.social
@flexion Ah interesting! Thanks for giving it a whirl!
I needed to make some minor modifications to the Makefile to get it to build on macOS as well, though snac is now in MacPorts.
Looks as if what you ran into is documented here: https://www.gnu.org/software/gnulib/manual/html_node/timegm.html "This function is missing on some platforms: AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11.3, mingw, MSVC 14, Android 3.0." Maybe a little harder to fix?
I appreciate the effort! I haven't had access to IRIX since the 1990s.
CCing @grunfink
The Real Grunfink »
@grunfink@comam.es
@byterhymer@mastodon.social Hi, snac author here. The xs_parse_time() function is not currently used, so it can be deleted or commented out.
It would be awesome if it worked on IRIX. I miss my SGI O2 😞
/usr/people/flexion
»
@flexion@oldbytes.space
@grunfink @byterhymer Thanks. glibc timegm() removed, now snac2 compiles on IRIX without errors:
˗ˏˋ wakest ˎˊ˗ »
@liaizon@social.wake.st
Projects that need taggable accounts on the fediverse that align with their name:
#Friendica, #GoToSocial, #snac, #Seppo, #Fedilab and #Metatext
When someone asks about options for servers or clients I have a habit of tagging recommendations, and when there is not an account for the thing, I have to stop and search for a dev or find a website address to link to etc.
˗ˏˋ wakest ˎˊ˗ »
@liaizon@social.wake.st
@grunfink what do you think, are you ready to have a "project" account?
The Real Grunfink »
@grunfink@comam.es
Hi. I see your point, but I think snac is too niche to need a different account than mine, which I use only for snac talking and announces. If usage out there grows, I'll probably create a specific one.
Anyway, thanks for your interest.
˗ˏˋ wakest ˎˊ˗ »
@liaizon@social.wake.st
@hypolite I seem to remember there being a @friendica account at one point
Hypolite Petovan »
@hypolite@friendica.mrpetovan.com
@liaizon If you want to contact the project developers it's at @developers , we don't have a neat @friendica account anywhere.
˗ˏˋ wakest ˎˊ˗ »
@liaizon@social.wake.st
@hypolite @developers what if we made one that just had one post telling people the account was at @developers? I have seen people trying to tag projects in their posts a lot and if there isnt an account that is real people end up just tagging some spam bot or whatever instance namesquatted the @
Hypolite Petovan »
@hypolite@friendica.mrpetovan.com
@liaizon Haha, when I type @friendica in my post, it automatically links to the official Friendica blog RSS feed http://friendi.ca/feed/.
Your idea is good, I couldn't imagine a @friendica account anywhere that would be monitored. The remaining question is: On which server? mastodon.social ?
˗ˏˋ wakest ˎˊ˗ »
@liaizon@social.wake.st
@hypolite what about friendica.me, friendica.xyz or libranet.de?
Hypolite Petovan »
@hypolite@friendica.mrpetovan.com
@liaizon I don't know who operates friendica.me, so libranet.de would be my preferred choice.
@alfred would you like to do the honors of creating the first official regular Friendica account for the project on your node as described in this post: social.wake.st/@liaizon/109566… ?
Steffen K9 🐰 »
@alfred@libranet.de
@liaizon @hypolite Well, it would be an honor. ☺️ But isn't friendica@libranet.de some default system actor? That name is configured at admin > site > general > name of the system actor. I'm not sure what happens when I change that name and use 'friendica' as a regular nickname instead. 🤔
Also, maybe it would be better to set up such an account on forum.friendi.ca. What do you think?
Hypolite Petovan »
@hypolite@friendica.mrpetovan.com
@alfred Ah right, it’s a reserved keyword now 🤦♂️
Not sure it would be available on forum.friendi.ca either 🤔
The Real Grunfink »
@grunfink@comam.es
I'm proud to announce version 2.16 of snac, the simple, minimalistic ActivityPub instance server, featuring:
Some outgoing connection tweaks: the protocol is no longer forced to be HTTP/1.1 and timeouts are less restrictive. This has proven useful for some unreachable instances.
Conversations can be collapsed.
Added support for edited posts on input. These updated messages will be marked by two dates (creation and last update).
Some tweaks to the docker configuration to generate a smaller image (contributed by ogarcia).
Axel Beckert ⌨🐧🐪🚴😷 XTaran »
@xtaran@chaos.social
Just noticed that @grunfink's #SNAC (https://codeberg.org/grunfink/snac2, Social Networks Are Crap, a simple, #minimalistic #ActivityPub instance written in #C → #Fediverse) is now available in #Debian Experimental: https://tracker.debian.org/pkg/snac2
Never heard of it before, but having a Mastodon-compatible instance packaged in Debian is great. So maybe time for my own instance? 😁 Will at least toy around with it. The question is on which host. But I suspect my Raspberry Pi running Debian Unstable will do. 😎
Reiner Bühl »
@reibuehl@chaos.social
@xtaran @grunfink and then a #hackerfunk episode about it? Hint hint 😉
Axel Beckert ⌨🐧🐪🚴😷 XTaran »
@xtaran@chaos.social
@reibuehl @grunfink: Actually there are already a few #hackerfunk #podcast ideas in the pipeline. We just need to record them. 😐
But indeed, that idea isn't that bad. Noted, thanks.
Cc @Venty
Alex Schroeder »
@alex@social.alexschroeder.ch
I am running it, experimentally… 😆
Axel Beckert ⌨🐧🐪🚴😷 XTaran »
@xtaran@chaos.social
@grunfink: Ok, #SNAC is now running on my #RaspberryPi 2 running #Debian Unstable #armhf at @xtaran@c3pio.deuxchevaux.org. (BTW, who can guess the wordplay in the hostname? 😎) The host has #IPv6 and is reachable from the Internet by #IPv6only, though. For now I'm just toying around with it, checking how the #Fediverse can look like, too, so don't expect too much from following it for now.
It's reverse-proxied by an #ApacheHTTPd as I'm an old-school guy and I know how to run Apache HTTPds since around 1999. 🧔
Axel Beckert ⌨🐧🐪🚴😷 XTaran »
@xtaran@chaos.social
@grunfink: And since ever I wrote that posting, the snac httpd (version 2.11 in Debian Experimental) on my Pi continues to crash with a segfault after a few seconds. *sigh* Will try to get a coredump and write a bug report in Debian and hoping for the package being updated to 2.15 soonish as 2.12 and and 2.14 both fix some crashes according to the release notes.
The Real Grunfink »
@grunfink@comam.es
I'm sorry to read this.
Certainly there were some crash fixes since 2.11, but they were somewhat corner cases, not something that caused crashes every few seconds.
Is this still happening? Your public timeline looks fine right now.
Axel Beckert ⌨🐧🐪🚴😷 XTaran »
@xtaran@chaos.social
@grunfink: Yes, still happening. Currently (with me in both accounts being less active) maybe every half hour or so. At least the last crash was half an hour ago, 13:47:20. But before that within 2 minutes: 13:23:56 and 13:24:00. (Now is 14:11.)
I filed a bug report against #Debian's snac2 package with some debug logs and a backtrace at https://bugs.debian.org/1025873 in case you're interested.
In case it still happens once the Debian package is upgraded to 2.15, I'll of course provide new backtraces.
Axel Beckert ⌨🐧🐪🚴😷 XTaran »
@xtaran@chaos.social
@grunfink: The #Debian package of #snac has been updated to version 2.15. So far @xtaran@c3pio.deuxchevaux.org ran 3 hours without issue. But then again, the previous version hadn't crashed for a while either. Let's see if it survives this mentioning. 😉
@grunfink@comam.es
Thank you for the snac
The Real Grunfink »
@grunfink@comam.es
I've just released version 2.15 of snac, the simple, minimalistic ActivityPub instance server. This time is mostly bugfixes:
Fixed bug in message posting that may result in 400 Bad Request errors (contributed by tobyjaffey).
Fixed crash and a deletion error in the unfollow code.
Added configuration files and examples for running snac with docker (contributed by tobyjaffey).
Serve /robots.txt (contributed by kensanata).
Use the Fediverse sparingly and wisely.
Alex Schroeder »
@alex@social.alexschroeder.ch
Here's an interesting part of the img help at MDN:
lazySo, as strange as it might sound, even if the site doesn't use JavaScript, it makes a different if you have it available? Wow. And how does the browser know if JavaScript is disabled by NoScript and uBlock Origin and the like? Does the browser test itself?
Defers loading the image until it reaches a calculated distance from the viewport, as defined by the browser. The intent is to avoid the network and storage bandwidth needed to handle the image until it's reasonably certain that it will be needed. This generally improves the performance of the content in most typical use cases.
Note: Loading is only deferred when JavaScript is enabled. This is an anti-tracking measure, because if a user agent supported lazy loading when scripting is disabled, it would still be possible for a site to track a user's approximate scroll position throughout a session, by strategically placing images in a page's markup such that a server can track how many images are requested and when.
The web browser is a battleground.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img
ɗℯʃƕρʋ »
@deshipu@fosstodon.org
@alex My guess is that the browser knows if any scripts have been loaded or any triggers are registered.
Alex Schroeder »
@alex@social.alexschroeder.ch
I'm confused, I guess. My impression (from looking at https://social.alexschroeder.ch/ for example) is that the site has no JavaScript and so the browser doesn't "know" whether JavaScript is available or not unless it tests it on its own. At least no JS I know of. But now that I've opened the developer tools and switch to the Debugger, I see that there is in fact some extension contributed JS I don't recognise that runs ("resource://gre/modules/XPCOMUtils.jsm").
The Real Grunfink »
@grunfink@comam.es
@deshipu@fosstodon.org I have no idea what this XPCOM thing comes from, may be from a browser extension. You can be sure that snac uses no JavaScript.
trj »
@trj@labs.ringtailsoftware.co.uk
Test post from SNAC2 https://codeberg.org/grunfink/snac2
Tiny ActivityPub instance in C, by @grunfink@comam.es
Alex Schroeder »
@alex@social.alexschroeder.ch
Well, everything I know is in my blog post. Or you can just click through to the https://social.alexschroeder.ch/alex and see an example. Or the page of the author, https://comam.es/snac/grunfink/ … the only thing you're not seeing is the private view. Note: Like for Epicyon, the data is saved as .json files on the filesystem, not in a database.
The Real Grunfink »
@grunfink@comam.es
I'm proud to announce version 2.14 of snac, the simple, minimalistic ActivityPub instance server, that include the following new features and fixes:
Previous posts in the public and private timelines can be reached by a "More..." post at the end (contributed by kensanata).
Clicking the 'Like' and 'Boost' buttons don't move the full conversation up; after that, the page is reloaded to a more precise position. Still not perfect, but on the way.
New command-line operation, resetpwd, to reset a user's password to a new, random one.
Added a user setup option to toggle if sensitive content is shown or not by default (contributed by kensanata).
All images are loaded in lazy mode for a snappier feel (contributed by kensanata).
Fixed crash in the data storage upgrade process when debug level >= 2 (contributed by kensanata).
Log message improvements for excelence (contributed by kensanata).
The logging of "new 'Delete'..." messages has been moved to debug level 1, because I'm fed up of seeing my logs swamped with needless cruft.
Don't show the 'Boost' button for private messages.
Added (partial) support for /.well-known/nodeinfo site information. This is not mandatory at all, but if you want to serve it, remember that you need to proxy this address from your web server to the snac server.
Some internal structure improvements.