Interests: programming, video games, anime, music composition

I used to be on kbin as e0qdk@kbin.social before it broke down.

  • 1 Post
  • 75 Comments
Joined 1 year ago
cake
Cake day: November 27th, 2023

help-circle
rss


  • Two quick ideas on possible approaches:

    1. Static page route. You can just write some Javascript to load the image from a file input in HTML, draw it resized to a canvas (based on an input slider or other input element), then save the canvas to an image. (There might even be simpler approaches if I wasn’t stupidly tired right now…) This can be done in a single file (HTML with embedded JS – and CSS if you want to style it a little) that you toss on any web server anywhere (e.g. Apache, nginx, whatever). Should work for JPEG, PNG, and probably WebP – maybe other regular image types too. Benefit: data never needs to leave your device.

    2. Process on server route. Use Python with a simple web server library (I usually opt for tornado for stuff like this, but flask or cherrypy or similar would probably work). Set up a handler for e.g. an HTTP POST and either pass the image into a library like Pillow to resize it or shell out to ImageMagick as others have suggested. (If you want to do something clever with animated GIFs you could shell out to ffmpeg, but that’d be a fair bit trickier…) The image can be sent back as the response. Be careful about security if you take this route. Probably want some kind of login in front of it, and run it in a VM or some other secure environment – especially if you’re using AI to kludge it together…

    Best of luck and let me know if you need any help. Will probably have some time this weekend if you can’t get it on your own. Happy hacking!


  • I would be happy with a FOSS desktop app I can install in linux too

    On the command line, you can do this with ImageMagick (e.g. use the command convert once it’s installed).

    With a (desktop) GUI, there’s a bunch of programs. GIMP is probably the most well known and has a ton of capabilities but is a bit complex. I use Kolourpaint as a quick-and-dirty “MS Paint”-like program for very simple tasks where I want a GUI.

    If you want a simple web UI I’m sure there is one already, but I don’t know one specifically. It wouldn’t be too complicated to hack something up if all you need is a quick-and-dirty file input and percentage rescale or something like that. If you don’t get a better suggestion and don’t know how to make something like that yourself, let me know and I can write an example.


  • People have already covered most of the tools I typically use, but one I haven’t seen listed yet that is sometimes convenient is python3 -m http.server which runs a small web server that shares whatever is in the directory you launched it from. I’ve used that to download files onto my phone before when I didn’t have the right USB cables/adapters handy as well as for getting data out of VMs when I didn’t want to bother setting up something more complex.


  • @e0qdk@reddthat.comtoFediverse@lemmy.worldKarma in lemmy?
    link
    fedilink
    English
    1
    edit-2
    1 month ago

    I’m under the impression the reputation points are either the combined number of upvotes or that minus downvotes

    IIRC from kbin – and assuming mbin didn’t change things – boosts counted for two points while upvotes (favorites) are one point and downvotes (reduces) are one point. Boosts are basically retweets, IIRC, and wouldn’t be coming from lemmy users – just from Mastodon, mbin, and other tools that support it.

    Edit: To clarify, I mean downvotes reduce by one point.








  • As someone who watches gaming footage on PeerTube, I’ve mostly interacted with single creator instances – i.e. either the creator themselves is self-hosting it or it’s run by a fan as a non-YT backup of their Twitch/Owncast/whatever VODs. Those instances generally do not allow anyone else to upload.

    Discoverability sucks but the way I’ve found them is by using SepiaSearch and looking for specific words from game titles. I imagine the way most other people find them is that they already know the content creator from Twitch and want to find an old VOD that isn’t archived on YT (e.g. because of YT’s bullshit copyright system) – but that’s just a guess.



  • It’s surprising that there doesn’t seem to be an obvious way in the UI to just see a list of creators/channels on a local instance. So, that’s the first thing I’d change to improve discoverability.

    The way I currently find relevant content is by going to Sepia Search, putting in exact words that I think are likely to be in the title of at least one video on a channel that would likely also have a lot of other relevant content, and then going through that channel’s playlists. Those searches often lead me to single user instances with only one or two channels (e.g. a channel that has a backup of that user’s YouTube content and a channel with a backup of their Twitch or OwnCast or whatever streams). When it leads me to a generalist instance or one with a relevant subject/theme though, I’ve had little luck finding content from anyone else unless they’ve posted recently (compared to other users). Often the content that is most relevant to me is not what is newest but the archives from years ago. (New content is relevant though once I want to follow someone in particular, but it’s not what I want to see first.)

    Another issue I’ve encountered is with the behavior of downloaded videos. I greatly appreciate that PeerTube provides a URL for direct download, and I prefer to watch videos in my own player downloaded in advance (so I can watch offline; pause and resume trivially after putting my computer to sleep; etc). H264 MP4 works fine for this, but the download seems to be some sort of chunked variant of it (for HLS?) which requires the player to read in the entire file to figure out the length or seek accurately. Having to wait a minute or two to be able to seek each time I open a large video file off my HDD is an irritating papercut. I suspect there’s likely a way to fix it by including an index in the file (or in a sidecar file) but I don’t know how to do it – short of re-encoding the entire video again which I’d rather not do since it both takes a long time and can result in quality loss. (EDIT ffmpeg -i input.mp4 -vcodec copy -acodec copy -movflags faststart output.mp4 repacks the video quickly.) This usually doesn’t affect newly added videos (where the download link includes the pattern /download/web-videos and a warning is shown that it’s still being transcoded) but does when that’s done (the URL includes /download/streaming-playlists/hls/videos instead); so, this is something that happens as a result of PeerTube’s reprocessing.

    Downloads from the instances that I’ve found to be most relevant to me are also pretty unreliable (connection is slow and drops a lot), so I use wget with automatic retries (and it sometimes still needs manual retries…) rather than downloading through my browser which tends to fail and then often annoyingly start over completely if I request a retry… It would be really nice if I could check that I’ve downloaded the file correctly and completely with a sha256 hash or something.


  • I’ve had to review resumes when we were trying to find someone else to bring on the team. My boss dumped hundreds of resumes on me and asked if any of them looked promising – that’s after going through whatever HR bullshit filters were in place – on top of all the other work I was already behind on since we didn’t have enough staff. That is the state of mind you should expect someone to be in while looking at your project.

    If anyone looks at your repo, they’re going to check briefly to see if you have any clue at all what you’re doing and whether your code likes like it’s written by the kind of person they can stand working with. Don’t make any major blunders that someone would notice with a quick glance at the repository. Be prepared to talk about your project in detail and be able to explain why you made the choices you did – you might not get asked, but if you are you should be able to justify your choices. If it gets to the point of an interview and your project looks like something that could’ve been done easily in 100 lines of Python you’d better believe I’m going to ask why the hell you wrote it in C in 2025… and I say that as someone who has written a significant amount of C professionally.

    If you say you have multiple years of professional programming experience and send me a link to a repo that has .DS_Store in it… your resume is going straight into the trash.



  • Visual novels, and interactive fiction come to mind as things that are video game adjacent but aren’t necessarily games. Most of the first category I’ve encountered are either porn, horror, or… both – though they can be about anything the author wants to write about, of course, and the relative accessibility of the medium means people have pushed it in a lot of directions even though it’s kind of niche.

    Interactive fiction includes things like text adventures and choose-your-own-adventure books. Most of the computer-based ones I’ve encountered involve traversing a node-graph of locations, manipulating items, and solving puzzles – though the gaminess varies a lot depending on the specific title. They’re even more niche nowadays, but people still make and play/read them.


  • It’s really about lowering cognitive load when making edits. It’s not necessarily that someone can’t figure out how to do something more sophisticated, but that they’re more likely to get things right if the code is just kind of straightforwardly dumb.

    The last two are definitely situational – changing things like that might lower cognitive load for one kind of work but raise it significantly for another – but I can see where they’re coming from with those suggestions.