Spyke

Replies

Comment on

Self-hosted GitHub alternative?

Obligatory check : are you sure you really need a forge? (that's the name we use to designate tools like Github/Gitlab/Gitea/etc). You can do a lot with git alone : you can host repositories on your server, clone them through ssh (or even http with git http-backend, although it requires a bit of setup), push, pull, create branches, create notes, etc. And the best of it : you can even have CI/CD scripts as post-receive hooks that will run your tests, deploy your app, or reject the changes if something is not right.

The only thing you have to do is to create the repos on your server with the --bare flag, as in git init --bare, this will create a repos that is basically only what you usually have in the .git directory, and will avoid having errors because you pushed to a branch that is not the currently one checked. It will also keep the repos clean, without artifacts (provided you run your build tasks elsewhere, obviously), so it will make all your sources really easy to backup.

And to discuss issues and changes, there is always email. :) There is also this, a code review tool that just pop up on HN.

And it works with Github! :) Just add a git remote to Github, and you can push to it or fetch from it. You can even setup hooks to sync with it. I publish my FOSS projects both on Github and Gitlab, and the only thing I do to propagate changes is to push to my local bare repos that I use for easy backups, they each have a post-update hook which propagates the change everywhere it needs to be (on Github, Gitlab, various machines in my local network, which then have their own post-update hooks to deploy the app/lib). The final touch to that : having this ~/git/ directory that contains all my bare repos (which are only a few hundred MB so fit perfectly in my backups) allowed me to create a git_grep_all script to do code search in all my repos at once (who needs elasticsearch anyway :D ) :

#!/usr/bin/env bash
# grep recursively bare repos

INITIAL_DIR=$(pwd)
for dir in $(find . -name HEAD -exec dirname '{}' \;); do
  pushd $dir > /dev/null
  git grep "$*" HEAD > /dev/null
  if [[ "$?" = "0" ]]; then
    pwd
    git grep "$*" HEAD
    echo
  fi

  popd > /dev/null
done

(note that it uses pushd and popd, which are bash builtins, other shells should use other ways to change directories)

The reason why you may still want a forge is if you have non tech people who should be able to work on issues/epics/documentation/etc.

Comment on

GitLab plans support for ActivityPub

Reply in thread

GitHub is a great platform, which has championed open-source for decades, now. I don't think anybody has anything to blame them for (except people not liking the idea that AI is trained on their code, like sibling mentioned), it's more about fears it may go bad. Because basically, it's where most of the code of the world is hosted, it's a single point of failure. People also have questioned the pertinence of having all open-source code hosted on a proprietary platform. And the acquisition by Microsoft also had a chilling effect on those of us who remember Internet Explorer 6's Microsoft more than VSCode's Microsoft.

For those reasons, it is desirable for those who love the idea of decentralization to look up for alternatives. But even there, it's perfectly fine to stay on GitHub, "decentralizing" doesn't require everybody to leave. :) Plus, even when using an other forge, it's still good to keep publishing mirrors on GitHub for visibility and discoverability, currently.

Comment on

I need a self-hosted image gallery that can randomize photo order and display the photos in a slideshow. Help me please!

Solving it the unix way:

ls -1 | sort -R | sxiv -f -s f -S 5 -

So it's ls -1 to list the content of current directory (presumably where your pictures are), with one file per line, so we can then pipe it to sort, with the -R option to sort randomly, then piping the result to sxiv, a lightweight image viewer available on most distro (I just checked, it's available on Debian). For its options : -f means it's fullscreen, -s f makes it scale to fit the image on screen as well as possible, -S 5 tells it to start in slideshow mode and change picture every 5 seconds, and - is to tell it to take the files list from stdin (thus from the ls and sort commands).

This won't work for videos, though, only pictures.

Comment on

Cost-cutting tips?

My favorite cost cutting tip is to avoid big webapps running on docker, and instead do with small UNIX utilities (cron instead of a calendar, text files instead of note taking app, rsync instead of a filehosting dropbox-like app, simple static webserver for file sharing, etc). This allows me to run my server on a simple Raspberry Pi, with less than 500mb of used RAM in average, and mininal energy consumption. So, total cost of the setup:

  • Raspberry Pi : 77€ x 2 = 144€ (I bought two to have a backup if the first one fails)
  • MicroSD 64gb : 13€ x 2 = 26€ (main and backup)
  • average energy consumption : 0.41€ (2kWh) per month

With that, I run all services I need on a single machine, and I have a backup plan for recovery of both hardware and software.

Getting used to a UNIX shell and to UNIX philosophy can take some time, but it's very rewarding in making everything more simple (thus more efficient).

Comment on

Harness launches Gitness, an open-source GitHub competitor

Reply in thread

That's the name we use to designate software like GitHub, GitLab and similar, which provide repositories hosting and tooling like issue trackers. It's supposed to be named like that because of SourceForge, the oldest of such tools, although I didn't hear the term "forge" before the last 5 years or so, long after SourceForge demise, so I imagine there is a bit of nostalgia in this name (not sure who is nostalgic of SourceForge, though 😂). The wikipedia page : https://en.wikipedia.org/wiki/Forge_(software)

Comment on

*Permanently Deleted*

Reply in thread

as in my experience, most regular users do not have a Matrix client installed

I understand your point, but by that logic, we should use Reddit rather than Lemmy, as most users are there. It's not only about ease of use, it's about being sure users won't be abused. Discord is still in its acquisition phase, but you can be sure enshitification will come next.

Comment on

Mastodon is useless (to me.)

I don't think it's a Mastodon problem. It's a generalist social network problem. Facebook, Twitter, Mastodon, why are we using those? For some, it's "to keep in touch" with friends and family, and they're happy seeing any activity, preferably things that makes them smile (that's more Facebook). For others, it's a mean to build street cred in their industry by publicly saying on topic things that sound smart (that was Twitter). But if you look for interesting discussions on things you like, in order to learn something, they're terrible at that. It's where specialized communities, discussing only one topic, shine. It used to be forums, then reddit, now lemmy. RSS is also a very good way to get that kick.

Comment on

I feel like all fedi software has problematic devs, Calckey

Well, the good news is that the "fediverse" is actually built on a web standard (ActivityPub), which you implement in any software you want. :) What that means is that the "the fediverse" is more comparable to "the web" than to a given social network. There are people building websites you won't agree with, same goes with fediverse software. Move on and find those that you like, or build them. The fact that it's built on web standards mean that anyone can decide to add their own software without concerting with anyone else, without asking permission from anyone else, you just build and publish. That's what made the web so strong since its beginning, and that's IMO a core advantage of ActivityPub compared to other decentralization projects.

Comment on

Fedi-fanfiction: How would a society look like in which the fediverse is established as THE social media platform?

In such a widespread usage, there would probably not be "the fediverse" anymore, but a galaxy of clusters of interconnected instances. Spam would be a serious problem, so instances would switch to whitelisting instances they want to federate with instead of just occasionally "defederating" from them. It would not only happen because of spam, by the way, but also because of political/cultural/ideological divergences. Maybe even because of laws.

There would be a boom of innovations, made possible because of the data openly accessible and the fact that we would finally have a standard on which to build upon to create third party applications (which, from a developer perspective, was the promise of the web-2.0 and its APIs, but never truly materialized). You would see alternative frontends for everything, and applications that allow to get new insights or use your data in new and smart ways.

The big businesses would still be around, by the way. They would open their own instances, publish lot of ads and add cool features found nowhere else so that most people join their instances, which would quickly become the go to instances for everyone, dwarving all other instances. We would spend a lot of time evangelizing so that people join smaller instances instead, but our folks would answer that it's less convenient, they would have less easy to use features and their account is already at BigCo anyway. Plus, to fight spam, terrorism, child pornography, nazis or whatever is the scarecrow then, they would severely limit the possibility for small instances to interop with them, adding arbitrary technical barriers that most implementers won't succeed in hoping. But we won't care that much, because we will have our own alternative networks with more content on them than ever.

Comment on

Found the best weapon in the game!

Reply in thread

Actually, for once, it's a quite good implementation of the 5e ruleset. :)

In the Player Handbook (p.147) :

Improvised Weapons

Sometimes characters don’t have their weapons and have to attack with whatever is at hand. An improvised weapon includes any object you can wield in one or two hands, such as broken glass, a table leg, a frying pan, a wagon wheel, or a dead goblin.

Often, an improvised weapon is similar to an actual weapon and can be treated as such. For example, a table leg is akin to a club. At the DM’s option, a character proficient with a weapon can use a similar object as if it were that weapon and use his or her proficiency bonus.

An object that bears no resemblance to a weapon deals 1d4 damage (the DM assigns a damage type appropriate to the object). If a character uses a ranged weapon to make a melee attack, or throws a melee weapon that does not have the thrown property, it also deals 1d4 damage. An improvised thrown weapon has a normal range of 20 feet and a long range of 60 feet.

Comment on

Cost-cutting tips?

Reply in thread

Basically, yes. You can configure most cron programs to mail task output to you (it's usually done by setting the MAILTO variable in the crontab, provided sendmail is available on your system).

I use that to do things like:

0 9 11 10 * echo 'lunch with John Doe at 12:20'

It sends me a mail, and I can see the upcoming events with crontab -l. If it's not a recurring event, I then delete the rule.

Comment on

Baldur's Gate 3 : Hot Fix #4

Reply in thread

I'm actually surprised (and happy) that discussions here are positive. In my experience, gamers (at least those discussing on the web) are the worst audience : they're always angry, always complaining, only ever temporarily satisfied (which is kind of sad, given gaming is supposed to be about leisure and entertainment). I'm a developer and I've been offered several times to join the gaming industry, I always refused : it's an underpaid, overworked job (comparatively to other industries in programming) where your audience hates you.

But indeed, it certainly won't get any better in the era of political polarization.

Comment on

Mastodon is useless (to me.)

Reply in thread

It's a feed protocol for websites. Each time you see that icon, it's a RSS feed :

You have a RSS client, a program you use to display your news. In it, you paste the url of the RSS feed of the various websites you want to follow, and just like that, you have an app in which you can go every morning to see what's new in your favorite websites, all at once.

Now, the problem of course is that not every website, by far, is offering RSS feeds, so you have to look for those who provide one. RSS is popular among techies and journalists, so press and tech blogs are where they are the most common. On top of that, there are many websites having RSS feed without even knowing it, because they use Wordpress or other engines that automatically provide RSS feeds. Those are a bit more tricky to get your hand on, because there is no link anywhere on their page, you have to look in the source code of the page (using Control + u) to find an "alternate rss" or "atom" link. It used to be automatically detected by browsers, showing an icon in the url bar when a RSS feed was detected, but it's not the case anymore. You can still install a browser extension to make them appear, like this (chrome) or this (firefox).

For the record, youtube has RSS feeds for all publishers, reddit has RSS feeds for all subs, most major news websites have RSS site, so it's quite useful, provided you can find the feed urls.

Then, to actually aggregate the news, you need a RSS client in which to paste those feed urls. There are tons of them. Name your favorite platform, there probably are a dozen RSS clients for it. Mobile, web, desktop, it's everywhere. So pick the one you like best. :) You just have to search for "RSS client for ". A couple popular exemples : The Old Reader on the web and Thunderbird (which is also a mai client) on desktop.