Sidebar

Wolfballs Development

development
Wolfballs Development masterofballs 3 years ago 0%
Debugging wolfballs backend tutorial gitlab.com

Hello; This is how I run the wolfballs backend codebase. To make UI changes more work is needed. If someone wants I can make a tutorial on that next. Copying the contents of the readme below. # Alternate Lemmy docker and vscode instructions I like to be able to run a rust app with cargo run and not rebuild images. Even if it's quick. This alternate docker method mounts the lemmy code into a container that installs all your dependencies. To get started you need a couple things installed on your machine; 1. [Docker](https://www.docker.com) For the ui features; 2. [VSCode](https://code.visualstudio.com/) 3. [Remote Container Plugin](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) ## Instructions Clone lemmy down, `git clone https://github.com/LemmyNet/lemmy.git lemmy` `cd lemmy; # go into lemmy the directory` clone down this repo into the docker directory `git clone https://gitlab.com/wolfballs/lemmy-remote-development.git docker/debug` Build the image; builds a arch linux container with a suder user name developer `docker-compose -f docker/debug/docker-compose.yml build` Do house keeping stuff the same as other methods. `mkdir -p docker/debug/volumes/pictrs` `sudo chown -R 991:991 docker/debug/volumes/pictrs` You can go ahead and test this with the terminal if you don't want to use vscode. To do that, `docker-compose -f docker/debug/docker-compose.yml up -d` `docker-compose -f docker/debug/docker-compose.yml exec lemmy /bin/bash` Might need to update rust; `rustup update` Ok now you can just run `cargo run` And you can visit the ui at, `0.0.0.0:1236` You can stop the container with; `docker-compose -f docker/debug/docker-compose.yml down` ## Run in VSCode If you would like a whole development environment based on vscode with all plugins auto installed continue to the next section. Bring down the containers `docker-compose -f docker/debug/docker-compose.yml down` From the root directory of the lemmy code base, copy the devcontainer and vscode directories from the debug section to the root. `cp -a docker/debug/devcontainer/ ./.devcontainer` `cp -a docker/debug/vscode/ ./.vscode` Now you can open up the project from vscode. VSCode will actually be running inside a arch container. Type `F1` and select `Reopen in container` ![](https://gitlab.com/wolfballs/lemmy-remote-development/-/raw/master/assets/picture1.jpg) Now you can click run in the debugger on the left. Break points aren't yet working due to async await in the main function. I'm not yet sure how to fix that. If someonw knows of how to get that working please open a issue and let me know. However server starts and the terminal in vscode is inside of the container. You can make code changes and click the restart button and it will restart very quickly. ![](https://gitlab.com/wolfballs/lemmy-remote-development/-/raw/master/assets/picture2.jpg) Thats is! You've got rust extensions auto installed in vscode for you.

-1
0
development
Wolfballs Development masterofballs 3 years ago 0%
Rust Lifetimes Finally Explained! www.youtube.com

A really good explanation of rust lifetimes

0
0
development
Wolfballs Development squashkin 3 years ago 0%
Top Links Disappear When You Zoom / Maximize Screen (Make Them Stay?) [Lemmy]

When I zoom or maximize past a certain amount depending on the size of my screen on a computer (desktop or laptop), the top links to communities / create post / create community disappear, I was wondering if they could just minimize to icons so I could still click them or if the text could just shrink enough to still be clickable edit: I am adding voluntary [tags] for the future maybe, on things that pertain to [Lemmy] or to [Wolfballs] specifically

0
0
development
Wolfballs Development squashkin 3 years ago 0%
Regarding "Meme Thief", Could Kiwix's Backup Tools Be Used?

related to my post on kiwix: https://wolfballs.com/post/3021 they download for example whole stackexchange forums posts for offline reading - I wonder if there's a way to use the tools they use to back up stackexchange forums, for lemmy forums? https://www.kiwix.org/en/downloads/kiwix-content-packages/ > Zimit is a tool that will allow you to convert almost any website to the zim format. Try it! > If Zimit works but the website is too big and exceeds the allowed threshold of 1’000 pages, open a request on Github (it has to be freely licensed content). > You are the owner of that content or need a specific distribution method (e.g. as an offline app), get in touch!

0
0
development
Wolfballs Development squashkin 3 years ago 0%
Suggested Community ("Did You Mean...?") & Notification Pop Up Is Kind Of Invasive

**"Did You Mean..." Suggested Listings ** First idea, another one Ruqqus didn't have: let's take the new community [!homebrewcomputer](https://wolfballs.com/c/homebrewcomputer) as an example, say I remember something about homebrew so I put the URL in as https://wolfballs.com/c/homebrew - the page it gives me is "404 error: community not found". What could be helpful for users is if it shows under it: "Did you mean... [lists communities that sound like what you tried to pull up, so you can find the community you were looking for]". So if you had c/homebrew or c/homeberwcomputer (typo) it could point you in the right direction. **Notifications** Also I don't know if this is an actual problem and maybe it could be turned off in settings, I like the pop up to see a new comment that someone responded to me with, but it can get in the way and I don't see an "X" to close it out (there might be one, but maybe I can't see it because of my computer settings). Sometimes clicking on it I think would take me to that post which would take me off a page that I might have been currently focused on, as I was trying to x it out.

-1
0
development
Wolfballs Development squashkin 3 years ago 0%
Reminder That This Site Supports RSS, And Request For RSS-Like User Interface?

In [the other post](https://wolfballs.com/post/2598) I linked to an article arguing that RSS was the fastest way to "consoom" content on the internet, which I somewhat intuitively agree with - I requested Ruqqus support RSS but they never did Lemmy has RSS support, it's the little button in the top of each page that kind of looks like a sideways wifi signal or echoes. You can copy the link and paste as a new subscription in an RSS reader. The main advantage is that, on a typical page I can see maybe 3 or 4 posts depending on how much I minimize / maximize the page - with a RSS feed I can see the title of a dozen or more - you can read through the main point of posts much quicker. Problem is, RSS is just for reading - I can't comment on the post. Probably can't see comments either. Ideally then an RSS reader extension that allows me to comment on the post, or a user interface mode that looks like an RSS reader is what I have in mind as more ideal. So I don't have a clear request necessarily so much as to think of if the RSS model is useful for UI or personal "consoomption" of content across sites.

-1
0
development
Wolfballs Development masterofballs 3 years ago 0%
Made some updates to the community archiver gitlab.com

Refactored code to be more object oriented. Moved errors to separate functions so one doesn't crash the whole project. Merged code from another contribute that will download pictures from outside sources and allows you to specify the chunk size. Works pretty well now I think. I downloaded the entire meme community from lemmy.ml in about 10 minutes. Pictures, gifs, videos everything. Still no comments. That would require a bunch of css I think. I want to work on something else on the actual site next.

0
0
development
Wolfballs Development masterofballs 3 years ago 0%
I have backups working ok https://files.catbox.moe/p97ii8.mp4

https://files.catbox.moe/p97ii8.mp4 I have made some progress on backing up communities. I have a program that backs up all post and their images if they uploaded them via wolfballs. It outputs it to a html file. Still some stuff to smooth out. It takes a while to run on a community over at lemmy.ml. After I finish it up i'll post the source instructions and I'll also post it over on lemmy forums.

-1
0
development
Wolfballs Development squashkin 3 years ago 0%
Make Community Banner / Icon Default As Wolfballs Wolf Icon?

If you go to the [communities page](https://wolfballs.com/communities), like half of the communities have custom icons and banners, which prevents the listings from looking uniform (ones that don't have icons simply have no icon next to them, while ones that do have icons next to them) The wolfballs wolf icon like in the top left corner could be a default logo until user changes it if you want uniformity Pros: uniformity on communities page Cons: no banner or icon can look nice too on the actual community page

-1
0
development
Wolfballs Development masterofballs 3 years ago 0%
Working on a backup tool

I like the direction the lemmy dev's are working towards. I don't feel I need to work on features right away and i need a rust refresher. I'm gonna write a backup tool over the next week or two that will download an entire community from the wolfballs api. That way if something ever happens you can back up your community yourself. Will be open source of course.

-1
0
development
Wolfballs Development squashkin 3 years ago 0%
Possible Lemmy Bug: Number of Notifications Seems To Hang Or Fail To Update

Sometimes like if I have a notification on something someone commented towards me, I can check it, clear it, and the notification bell might continue to display a number when I go to another page on the forum even though it shouldn't have any number there any longer

0
0
development
Wolfballs Development squashkin 3 years ago 0%
Minor Request But It Might Be Useful For Top Links To Be Right-Clickable

Wolfballs / Communities / Create Post / Create Community / Settings / Etc. I can't right click them, I can only navigate within my tab Like sometimes I'm reading a post and want to check for other posts but if I click at the top it will close out the post to show the main page

-1
0
development
Wolfballs Development masterofballs 3 years ago 0%
I would like to start adding facebook like features to wolfballs

It occurred to me today that Lemmy (What wolfballs is running off of) Has most of what we would need to add all the basic social media features of facebook. We can add a timeline that would work like a automatically created community for each user. Then we add the concept of friends. So you can make post to your timeline visible to only friends. Then a timeline viewer that can view all personal post of friends and communities you are a part of. I don't know if the main lemmy devs have thought of this. Would be great if they would be on board. I can try to ask them what they think . We could really have a shot at destroying facebook for good if this is done right. And open source. Just brain storming here.

-1
0
development
Wolfballs Development masterofballs 3 years ago 0%
So I got us a compute instance up and running

Have not moved the deployment yet. Mainly because i'm a little nervous everything will crash and burn. But I have docker running and our custom images built on this thing. Will have a few hours of downtime possible when I cut over to this hosting provider. This should see improved speeds on image uploads. I'm serving this site out of 10 mbit upspeed on a raspberry pi right now. Which is amazing but also probably can't handle more than like 100 people at a time. I also talked to one of the lemmy maintainers the other day. And he said they will remove the slur filter in the main code base. so thats nice. I don't like maintaining a fork and would rather contribute back to upstream for new features. At the end of the day all this effort is to protect us all from censorship. Stuff like wolfballs tshirt/ meme wear shop to cover server cost should be seperate code bases.

-1
0
development
Wolfballs Development squashkin 3 years ago 0%
Do Image Embeds Work In Comments?

Is there a way to have a picture be a comment reaction to a post? if not - feature requested also like gifs from gyphy or whatever

0
0
development
Wolfballs Development masterofballs 3 years ago 0%
I’ve been trying to explain to discussion people that blockchains are stupid

I don’t think they get it. It’s gonna fail. It’s a bad design. I hope for them the best but using a block chain as a social network is *removed*. It only works good as a currency and maybe payment transactions.

0
0
development
Wolfballs Development squashkin 3 years ago 0%
Thoughts On Community Wikis?

A lot of the standalone wikis I find have had useful info on Reddit or other forums I don't think Lemmy has wikis set up but I was wondering if this was a feature of interest

0
0
development
Wolfballs Development masterofballs 3 years ago 0%
Thinking about using Dreamhost for hosting

https://help.dreamhost.com/hc/en-us/articles/214840947-What-is-DreamCompute Their DreamCompute looks pretty good. I could buy the biggest instance and stick everything on there at once. I tried to use their VPS but it doesn't allow root or docker so that doesn't work. If we need to scale further I can seperate the database from the rust app with another instance. Even with hundreds of picture uploads i'm only using like 150MB's for this website. These guys supposedly host a literal Nazi website so they should be pretty good about not banning us. Not that I condon Nazi'sm but Freespeech is As American as Apple Pie

0
0
development
Wolfballs Development masterofballs 3 years ago 0%
Did some learning

## Think i'll document what I learn about the code base here. Lemmy 's docs say that lemmy is built with, * Rust * Actix * Diesel * Inferno * Typescript I've written some Rust before. A little sdl game, and a couple other things. It's been a while because I got kinda burnt out with the Rust community. They are pretty woke and honestly I prefer the C++ community. But Rust is a super fast language and it's perfect for this site. I've actually been able to handle around 100 users traffic on a pi4 and SD card. I take daily db backup because sdcards are more corruptible. Anyways, I'm also pretty good with Typescript. If you know javascript you don't really need to know much about Typescript to use it. Inferno seems to be a react like library. I've used Vuejs, angularjs,1 and 2+. So it's not a huge learning curve. Honestly its probably my least faviorite javascript framework ever so far. Maybe I can get used to it and learn to like it. Compiling a web and desktop version of the flutter app also seems like it might be a good path forward. It just looks and feels so much nicer. I don't know flutter or dart at all though. Diesel and Actix are technologies I have not worked much with. Today I went through the getting started guide for Diesel here https://diesel.rs/guides/getting-started And finished that up. It feels pretty straight forward to work with. Doesn't do too much but does enough to make database work easier. I've worked extensively with postgres and used to write my own migration scripts. Diesel helps take care of some of that stuff for you. Lemmy code base is pretty big so I have a lot to read and understand before I can quickly add features. But i'm on the right track. I typically attack these sort of problems by understanding each technology by starting small projects and then trying to follow the control flow of a larger app in a debugger or just printing lines. I also write out Dockerfiles and docker-compose environments as I go so I never have to figure out how to set up an environment twice. Easy things like removing the slur filter was quick and easy. I found the spot where it was removed it and just rebuilt. Adding something like polls will take database work, rust work, ui work and so I really have to understand the whole stack to do that. Which will take a little time doing this on the weekends and while my family is asleep. I hope to have a big feature or so done in December's end. After the first 1 or two subsequent features should go faster.

0
0