8 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?

20 comments

  1. [5]
    lily
    (edited )
    Link
    I've been working on a reimplementation of the RPG Maker 2000/2003 editors. There were quite a few interesting freeware games made with these engines in the 2000s / early 2010s, and surprisingly...

    I've been working on a reimplementation of the RPG Maker 2000/2003 editors. There were quite a few interesting freeware games made with these engines in the 2000s / early 2010s, and surprisingly there's still a decently-sized community using it today. Unfortunately, the engines are Windows-only, and have some compatibility issues on modern machines. The EasyRPG project has done a great job reimplementing the runtime, but while they have an editor project of their own, it's existed for years without much progress. The original editor, which was written in Delphi, still works, but it's a little awkward to use (I particularly dislike the heavy use of modals completely blocking interaction with the windows underneath), and is also Windows-only, with somewhat iffy Wine compatibility.

    I figured I'd give writing a new editor a shot myself, since it sounded like a fun project. I wrote a custom parser for RPG Maker's proprietary binary format, which actually didn't take too long - EasyRPG's implementation, liblcf, is a bit of a mess involving a Ruby script generating template-heavy C++ files, but I wrote my parser in Jai, which has powerful metaprogramming and reflection that made it a lot easier to get things up and running. I'm now slowly chipping away at the editor application itself, with SDL and Dear ImGui. Hopefully it'll be functional before too long.

    11 votes
    1. [4]
      devalexwhite
      Link Parent
      That's super cool, sounds like a big project! I had never heard of Jai.

      That's super cool, sounds like a big project! I had never heard of Jai.

      2 votes
      1. [3]
        lily
        (edited )
        Link Parent
        It's an interesting systems programming language that's still in closed beta (though I don't think it's all that hard to get in these days). C-like, with a few safety improvements (eg. bounds...

        It's an interesting systems programming language that's still in closed beta (though I don't think it's all that hard to get in these days). C-like, with a few safety improvements (eg. bounds checks, array views, defer), though nowhere near what Rust does in that respect. Its "big idea" is incredibly powerful metaprogramming - almost anything you can think of can be done at compile time (similar to Zig's comptime), including generating new code, and extensive type info can be retrieved at both compile time and runtime.

        What this means for my parser is that I can define all my data types as regular structs, with annotations to indicate specific attributes (in this case, the chunk indices in the binary format, and whether the fields should still be serialized even at their default values; I have some other annotations, too, though they're not in this example), which looks something like:

        Troop :: struct {
            name           : string;                     @1
            members        : Sparse_Array(Troop_Member); @2 @persist
            auto_alignment : bool;                       @3
            terrain_set    : [..] u8;                    @5 @persist
            appear_randomly: bool;                       @6
            pages          : Sparse_Array(Troop_Page);   @11 @persist
        }
        

        Then, I automatically generate parsing and serialization code for those structs at compile time. The result is a dramatically smaller amount of code, and (in my opinion, at least) a much more workable and understandable codebase.

        4 votes
        1. [2]
          devalexwhite
          Link Parent
          Very cool, thanks for sharing the example. The closed beta explains why I didn't see much on a simple Kagi search. The annotations are interesting.

          Very cool, thanks for sharing the example. The closed beta explains why I didn't see much on a simple Kagi search. The annotations are interesting.

          1 vote
          1. lily
            Link Parent
            If you want more information, https://github.com/Jai-Community/Jai-Community-Library/wiki is the most comprehensive public documentation I know of. The beta distribution comes with quite extensive...

            If you want more information, https://github.com/Jai-Community/Jai-Community-Library/wiki is the most comprehensive public documentation I know of. The beta distribution comes with quite extensive documentation of its own, but it's not available anywhere online to my knowledge.

            The annotations are nice, though I wouldn't mind them being typed in some way - as of now they're just raw strings you have to handle yourself. They're certainly not the most unique part of the language, though. I'm pretty sure other languages have similar features.

            1 vote
  2. [2]
    Grayscail
    Link
    I have been trying to write a Particle-In-Cell simulation to experiment with plasma physics. I want to test out a concept I have been thinking about for enhancing magnetic confinement with...

    I have been trying to write a Particle-In-Cell simulation to experiment with plasma physics. I want to test out a concept I have been thinking about for enhancing magnetic confinement with targeted laser/rf emitters. But building an actual physical device would be really expensive so I want to try simulating the effect instead.

    I have some basic graphics set up to show the plasma, and aive derived the equations I need to implement, so now I need to put something together to efficiently run those calculations at high volume.

    Unfortunately I have been stymied for a while due to unknowable issues with trying to set up OpenCL. Ive gotten my code to a point where I can build and run an executable using the library but when I actually run the program OpenCL fails its initialization with some imprecise error code. I suspect the problem is something regarding the drivers I have on my laptop not being up to date or compatible, but I have no idea how to figure out what specifically I need to change.

    5 votes
    1. okiyama
      Link Parent
      If you toss me the code I'd be happy to run on my machine and let ya know! I've been wanting to get into simulations for years, they produce such beautiful and unique visuals. My pet idea is a low...

      If you toss me the code I'd be happy to run on my machine and let ya know!

      I've been wanting to get into simulations for years, they produce such beautiful and unique visuals. My pet idea is a low background lead generator. Separate the isotopes how you do plutonium.

      2 votes
  3. [5]
    Pavouk106
    (edited )
    Link
    I'm working on PC stand/open case made on 3D printer. It is a few parts job so it can be printed easily and then screwed together. I actually have it printed already but I'm waiting for filament...

    I'm working on PC stand/open case made on 3D printer. It is a few parts job so it can be printed easily and then screwed together.

    I actually have it printed already but I'm waiting for filament to be delivered so I can reprint a few parts - some because of the changes I made, some because I ran out of filament and printed them in PLA (heat and PLA don't work well together).

    You screw the parts together and you basically get inclined motherboard stand (currently mITX holes, I will add mATX and ATX options) woth integrated PSU holder and 2,5" drive holder. You then screw the motherboard in, connect everything together amd there you are - bare electronics on a 3D printed stand.

    I also have PCI brackets so that GPU sits firmly without flapping around and also disc drive option (I use the PC for ripping my DVD and Blu ray movie discs).

    I have photos but I don't want to show them yet. I will publish it together with models in around two weeks (still a lot to do, even though I already have it made and working for my own system).

    EDIT: Don't expect something great looking. It is simplistic and functional design.

    EDIT2: Well, I may as well show it...

    5 votes
    1. [2]
      polle
      Link Parent
      Does this not have issues with dust buildup and lack of airflow over the components?

      Does this not have issues with dust buildup and lack of airflow over the components?

      2 votes
      1. Pavouk106
        Link Parent
        In my case everything is running cool. RAM sticks probably haven't been cooler when I had it all in case. I have some 10 years old motherboard that doesn't even have any cooling on CPU mosfets and...

        In my case everything is running cool. RAM sticks probably haven't been cooler when I had it all in case. I have some 10 years old motherboard that doesn't even have any cooling on CPU mosfets and even those are not hot on touch.

        I presume when it's that open, it can cool enough by itself. I have i5-4690 being cooled by Noctua 12cm fan being backwards (sucking air through heatsink) running at 500rpm and I get 65 on CPU under full load.

        The dust situation... I had this all in HTPC case that didn't have any filters and wouldnneed cleaning a few times a year. I believe this will be much better. At least I can see the dust build up, then pick it up all up easily,n o need to disassemble anything, just unplug wires, take it oustide and blow the dust off.

        3 votes
    2. [2]
      first-must-burn
      Link Parent
      I really like it! In especially like the way the drive bay acts as a base. I haven't built a pc in ~20 years (laptops are pretty dang powerful these days), but this makes me want to. I think I...

      I really like it! In especially like the way the drive bay acts as a base.

      I haven't built a pc in ~20 years (laptops are pretty dang powerful these days), but this makes me want to. I think I would add an cube frame around it to really define the space it takes up.

      1 vote
      1. Pavouk106
        Link Parent
        I was thinking where to put the disc drive and this was one space that was available and it is also kinda hidden under the board so I consider it win-win. The cube frame would be great but...

        I was thinking where to put the disc drive and this was one space that was available and it is also kinda hidden under the board so I consider it win-win.

        The cube frame would be great but couldn't be printed in one piece, not even each stick, as they would have to be pretty long.

  4. benpocalypse
    Link
    I'm finally building a big, moveable rack to make my solar panel installation more permanent. I never wanted to put them on the roof, so I making a rack that has 10" casters on it, I'm trenching...

    I'm finally building a big, moveable rack to make my solar panel installation more permanent. I never wanted to put them on the roof, so I making a rack that has 10" casters on it, I'm trenching the conduit to it, and this way I can turn and pivot the panels to take maximum advantage of the angle of the sun.

    I also plan on adding a wind turbine to my system later this year, because we live on a hill and get lots and lots of wind.

    4 votes
  5. [4]
    Eji1700
    Link
    I am close to having my local server fully configured. Currently knee deep in the joys of mdns and firewall routing.

    I am close to having my local server fully configured. Currently knee deep in the joys of mdns and firewall routing.

    3 votes
    1. [3]
      Pavouk106
      Link Parent
      I wish I found the courage to setup my router! I want to do VLANs and firewall rules but my lack of knowledge and dedication keeps stopping me.

      I wish I found the courage to setup my router! I want to do VLANs and firewall rules but my lack of knowledge and dedication keeps stopping me.

      2 votes
      1. [2]
        Eji1700
        Link Parent
        I was able to plan this out over a year ahead of time in a full rework, so I have a nice UDM Pro setup, and the Ubiquiti software is, for the most part, quite smooth and good at conveying what's...

        I was able to plan this out over a year ahead of time in a full rework, so I have a nice UDM Pro setup, and the Ubiquiti software is, for the most part, quite smooth and good at conveying what's going on.

        Thankfully there's also really good videos/discord on it though because I'm sure I would've blown my foot off a few times without, and there are still "wait wtf does that mean?" moments where it's hard to tell if Ubiquiti should convey information better or if we should just burn down how we do networking and start over.

        Not sure what equipment you're running but at the very least VLANs and firewall isn't too tricky, even if you're using less expensive/fancy equipment. It does help to have something you can test with though. So a computer and a laptop and you can just move the laptop to different VLANS and see what it can and can't hit.

        2 votes
        1. Pavouk106
          Link Parent
          I'm running Mikrotik CRS-326 (24 Gbit ports + 2 SFP+ switch) in router mode as my internet speed is atrocious and it can handle it well. Currently I have dedicated port for each wired machine and...

          I'm running Mikrotik CRS-326 (24 Gbit ports + 2 SFP+ switch) in router mode as my internet speed is atrocious and it can handle it well. Currently I have dedicated port for each wired machine and I have a few Unifi APs and I self-host their controller on x86 linux server.

          I was thinking about getting Unifi Cloud Gateway (Ultra) or Dream Router. I suppose those would save me from doing everything the hard way, be it Mikrotik or having x86 linux PC as a router, as I also suppose you could probably set VLANs and firewall rules in some GUI fashion.

          And seeing how Network controller (or whatever)/software is polished, I really like Ubiquiti's way.

          I also have spare Routerboards (15-20 years old) that I could use as testing subjects for setting up VLANs sonthat I don't F up my current setup (which I would describe as basic at best).

          2 votes
  6. devalexwhite
    Link
    I've been working on a CMS for static HTML websites. Built out of a desire to enable my small business clients to make updates to their websites, without turning to some heavy/expensive CMS...

    I've been working on a CMS for static HTML websites. Built out of a desire to enable my small business clients to make updates to their websites, without turning to some heavy/expensive CMS platform. It also has a built-in, privacy focused analytics platform and simple CRM for managing form responses. I wrote about the why and tech stack on my website!

    3 votes
  7. ShroudedScribe
    Link
    I recently set up Joplin for my note-taking solution, and am pretty happy with it. I spun up a self-hosted Joplin Sync Server and it's working well. I decided that it would be nice to display a...

    I recently set up Joplin for my note-taking solution, and am pretty happy with it. I spun up a self-hosted Joplin Sync Server and it's working well.

    I decided that it would be nice to display a note constantly on my personal desktop, just to keep certain things that need attention visible. Microsoft has a Sticky Notes application for Windows that has been updated a few times. Before, the notes were just stored in a userdata folder or something. Now it apparently has integration with OneNote. Regardless, this wasn't what I was looking for.

    I discovered WinWidgets, which basically allows you to run a local HTML file with CSS and JS in a desktop widget. It can even do the "always on top" display while being smart enough to hide if you're running a full screen application. It seemed easy enough from here, just make a page that polls the Joplin server API and displays the note data.

    Of course, it wasn't that simple. Accessing any HTTPS resource from a local HTML file is never going to work out well. I tried playing around with request and response header override rules in Cloudflare, but never got it working quite right. So instead, I used webhookd to create an intermediate script that could poll the Joplin server API in the way I needed it to. That includes logging in and saving the session id. Now, my local file, which is displayed in a widget, can just send an insecure http GET request to get the contents of the file.

    Joplin stores files in markdown, so I had to pull in a JS library to convert the markdown to HTML. And now it works!

    There's still a couple things I want to do.

    I want to be able to write back to Joplin from this note as well. I started to play with this and am using a different JS library to convert the HTML back to markdown. This library is somewhat opinionated about how it returns markdown, but allows for custom rules and replacements.

    I also want to continue to play with the formatting, and refresh the note periodically. This is theoretically easy, but I'll need to effectively interrupt this regular refresh if I'm making changes to the note that have not yet been saved.

    Ideally, it would be nice to have a link to open the note in Joplin. Unfortunately, the WinWidget application does not support custom protocol URL navigation, but I'm hopeful it will be addressed as discussed in the relevant issue on GitHub.

    2 votes
  8. xk3
    (edited )
    Link
    I encountered some weirdly encoded torrent files so I switched from an "easy to use" python library to libtorrent to be able to parse them. It was a lot easier to switch than I anticipated. The...

    I encountered some weirdly encoded torrent files so I switched from an "easy to use" python library to libtorrent to be able to parse them.

    It was a lot easier to switch than I anticipated. The whole thing only took about 30mins. If I had started with libtorrent when I first wrote the script I doubt that I'd figure out how to parse certain fields. Essentially you need to do something like this to get extra metadata:

    torrent = lt.torrent_info(str(path), limits)
    extra_metadata = lt.bdecode(torrent.metadata())
    

    It's super obvious once you know it--like getting a pile of LEGOs without instructions