14 votes

What programming/technical projects have you been working on?

This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

14 comments

  1. [2]
    talklittle
    (edited )
    Link
    I've been spending a decent chunk of time getting the Tildes web app runnable on Docker locally. The focus is to use the Vagrant Docker provider, running the web app in a Docker container instead...

    I've been spending a decent chunk of time getting the Tildes web app runnable on Docker locally. The focus is to use the Vagrant Docker provider, running the web app in a Docker container instead of a full virtual machine.

    The web app runs! Minus some things like cronjobs. My work is close to finished now—I just need to clean up some code and Git history, and test that the VirtualBox provider wasn't broken in the process.

    There have been other attempts in the past, but I think they generally tried to create Docker-based architecture setups, instead of integrating with the existing Vagrant and Ansible setup. Meaning two parallel setups would need to be maintained; not ideal.

    Systemd in Docker would have been the hard part, except there is already a Python script that simulates systemd in Docker. Fortunately its EUPL license is compatible with Tildes' AGPL, so it should be safe to commit it directly to the repo.

    Instead the actual hard part was the tedious feedback loop of: try running the web app, see which Ansible step failed, research solutions (not always clear cut), then re-provision the Docker container (slow); and repeat.

    FYI @Deimos

    Update: The current code is at https://gitlab.com/talklittle/tildes/-/tree/vagrant-docker-provider — Has a few bugs I'm still ironing out. But basically run: $ vagrant up --provider=docker

    10 votes
    1. Deimos
      Link Parent
      That's really interesting, thanks for working on that! I'll be looking forward to seeing if it's able to fully work out.

      That's really interesting, thanks for working on that! I'll be looking forward to seeing if it's able to fully work out.

      4 votes
  2. fxgn
    Link
    I use Telegram for all of my communication, and I want my chats to be safely backed up in case something happens to Telegram or to my account. Telegram Desktop includes chat export functionality,...

    I use Telegram for all of my communication, and I want my chats to be safely backed up in case something happens to Telegram or to my account.

    Telegram Desktop includes chat export functionality, but:

    • It requires you to press a button, you can't automate it in any way
    • You need to keep your computer running with Telegram open while the chat is exporting, which can take a long time if there's a lot of media to download
    • It doesn't export chats incrementally, so if you've already exported a chat a while ago and only want to export new messages without duplication, you need to manually select date ranges

    I wanted a solution that I could schedule to run on a server and have all my chats safely backed up. So I made one.

    https://github.com/flexagoon/ream

    I also made it fully compatible with TDesktop's export JSON. From the readme:

    It is a standalone re-implementation of Telegram Desktop's export functionality. The output from ream must be fully equivalent to the output from Telgram Desktop, and any difference in the resulting json (except for filenames) is treated as a bug.

    This was a pretty fun project as it required me to dig into Telegram Desktop's messy C++ codebase to figure out how it's export works, and learning more about the weird custom MTProto protocol that telegram uses for it's API

    7 votes
  3. Gummy
    Link
    Been making a lot of progress on my game save backup tool. Ended up trashing the previous one in C# and switching the whole thing to C++ Qt. This is my first time using Qt so I've been slowly...

    Been making a lot of progress on my game save backup tool. Ended up trashing the previous one in C# and switching the whole thing to C++ Qt. This is my first time using Qt so I've been slowly learning the quirks of making a gui in it.
    Other than learning Qt, I've also managed to get a pretty convinient database setup using the SQLiteCpp library. I'm familiar with SQL already, but having to do it in c++ was daunting until I noticed somebody else already did all the legwork.

    5 votes
  4. skybrian
    (edited )
    Link
    On repeat-test, I was all set to do a release, but I wanted to explain what the API differences were in the changelog. So I wrote some code to parse the output of ‘deno doc —json’ and turn it into...

    On repeat-test, I was all set to do a release, but I wanted to explain what the API differences were in the changelog. So I wrote some code to parse the output of ‘deno doc —json’ and turn it into a short, diffable summary of an API. I used repeat-test’s Domain class to do JSON validation (sort of like Zod) and discovered places I wanted to improve the API.

    Here’s the schema. I wouldn’t expect anyone to switch from Zod, but I think it’s looking pretty nice. It’s unfortunate that TypeScript can’t infer recursive types, so many type definitions in the schema have to be written out twice. But that does make it easy to compare the two. (I should add comments about what all these types are for, though.)

    4 votes
  5. akkartik
    Link
    I made a chess clock. Basically this whole devlog is intended to show ways in which you can replace a bunch of different specialized, proprietary mobile apps of dubious provenance with a single...

    I made a chess clock. Basically this whole devlog is intended to show ways in which you can replace a bunch of different specialized, proprietary mobile apps of dubious provenance with a single general, reputable open source app (LÖVE running my carousel.love file, which is a cross-platform zip file containing all source code and live-editable on a computer).

    3 votes
  6. Raspcoffee
    Link
    Past two weeks, I've been learning a lot. C#, SQL, (minimal) APIs, OneDrive, and connecting all these things so that I can properly code for my new job - and boy is it difficult to also get...

    Past two weeks, I've been learning a lot. C#, SQL, (minimal) APIs, OneDrive, and connecting all these things so that I can properly code for my new job - and boy is it difficult to also get something new in someone else's code.

    I'm picking it up quickly though. Right now C# seems pretty nice. Easy to read, yet pretty powerful. And unlike say, Python, it's more difficult to trip over some implicit things.

    3 votes
  7. [3]
    arqalite
    Link
    I've been messing around with Flask for a work project, and I have to say, it's a neat little framework, you can spin up an API pretty quickly. I do miss the fullstack niceties that Dioxus has so...

    I've been messing around with Flask for a work project, and I have to say, it's a neat little framework, you can spin up an API pretty quickly.

    I do miss the fullstack niceties that Dioxus has so it'll remain my go-to if I need to make a full-featured web app, but if I only need a back-end for like a service or something, I'll be heavily considering Flask.

    Although I'm starting to visualize a Flask backend and a Dioxus frontend working together, so I dunno. It'll be weird to tell people I have a Python backend and a Rust frontend, but everything I make is weird so I embrace it.

    3 votes
    1. [2]
      first-must-burn
      Link Parent
      This made me smile. It reminds me of a home renovation show we watched a long time ago where the family had a quote on their wall, "Have a big, kind heart and stay weird."

      everything I make is weird so I embrace it.

      This made me smile. It reminds me of a home renovation show we watched a long time ago where the family had a quote on their wall, "Have a big, kind heart and stay weird."

      3 votes
      1. arqalite
        Link Parent
        Well, that might just be my new ethos in life, I like it a lot.

        Well, that might just be my new ethos in life, I like it a lot.

        3 votes
  8. g33kphr33k
    Link
    I have been working on a simple AV1 Conversion Script which is slowly getting more complex as time goes on. It basically just takes a stab at whole folder structures of non-AV1 videos and then...

    I have been working on a simple AV1 Conversion Script which is slowly getting more complex as time goes on.

    It basically just takes a stab at whole folder structures of non-AV1 videos and then batch converts them. Slowly but surely I've been improving audio handling, resizing, etc. It's all things for my needs, but if it's useful to someone else I'm happy for feedback. I'm currently trying to crack using ffmpeg to detect whether I should or shouldn't enable film grain on a source so if anyone can help with that, I'm all ears.

    2 votes
  9. Pavouk106
    Link
    Seems like I will be helping a friend with Suzuki V-Strom 650 motorcycle. He's swapping out some parts and needs to make adapter for speedometer - original uses hall effect sensor and puts out...

    Seems like I will be helping a friend with Suzuki V-Strom 650 motorcycle. He's swapping out some parts and needs to make adapter for speedometer - original uses hall effect sensor and puts out eight pulses per one wheel rotation.

    We will be using bicycle cyclocomputer sensor instead (as original one won't fit) and I will be reading the pulses (one per wheel rotation with cyclocomputer) and generating eight times more on the output using probably Raspberry Pi Pico and micropython. I will have to adjust the time between output pulses according to the time between the input pulses. We'll see how it goes, as my understanding of (making up) frequency in conjunction with microcontrollers is very limited. Theory seems legit though.

    1 vote
  10. jmpavlec
    Link
    Still working on https://gametje.com. I've been working on giving users the ability to add custom word packs for the Canvas Clash game. Almost done with that. Just polishing the UI. In order to...

    Still working on https://gametje.com. I've been working on giving users the ability to add custom word packs for the Canvas Clash game. Almost done with that. Just polishing the UI. In order to add and use the custom word packs, you'll need to create and log into an account. Word packs can also be made public for other players to use. This is also possible in all 9 languages.

    I've also been transitioning some of the games over so they can be hosted and played from the same device. (Right now only Canvas Clash supports that). Previously there needed to be a host screen and all players needed to see it which I found was a big barrier to entry for people trying it out. Players didn't seem to understand the purpose of the main screen. After I update all 5 games, a player will be able host + play from a single device and other players will have all the necessary context on their own screens. This opens up the ability to play at a bar or at school without the need for a main screen. Having a central host screen will still be supported for the party/screen share situation (Chromecast/Amazon Fire Stick).

    Overall making decent progress. I need to recruit a UI designer to help me with the main page though.

  11. happimess
    Link
    I've finally hit a point in my personal website where I want to identify users. This means that I had to build a backend. I went with C# in .net 8, using the dotnet new webapi starter. This is...

    I've finally hit a point in my personal website where I want to identify users. This means that I had to build a backend. I went with C# in .net 8, using the dotnet new webapi starter. This is related to the tech stack I use at work.

    I'm having trouble getting authentication with google working (Microsoft.AspNetCore.Authentication.Google, if anyone's an expert). Following the tutorial leads to a stack overflow, and let me tell you that searching the web for advice about an actual stack overflow is an exercise in futility.

    That said, even through the frustration it's fun to use the tools I use at work, but with more recent versions, better libraries, no technical debt, and myself as the project manager.