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

10 comments

  1. [2]
    Comment deleted by author
    Link
    1. anothersimulacrum
      Link Parent
      Neat website, I'll have to remember this if I ever find myself needing some tarot cards :).

      Neat website, I'll have to remember this if I ever find myself needing some tarot cards :).

      3 votes
  2. joplin
    Link
    So I haven't been doing many programming projects because I've jumped back into making music in my spare time. However, someone just answered a Math Overflow question I asked like a year or two...

    So I haven't been doing many programming projects because I've jumped back into making music in my spare time. However, someone just answered a Math Overflow question I asked like a year or two ago that has to do with the Penrose tiling I was working on then. So I went back and fixed up my program with the info they gave me, and it works great! I was able to eliminate a whole section of code that aligned the tiles. Now I can just generate them in their correct positions.

    4 votes
  3. DMBuce
    Link
    The other day I wrote a script to help me rebalance my investment portfolio. It takes the balances of my various accounts along with the percentage of each asset class, plus my target allocation...

    The other day I wrote a script to help me rebalance my investment portfolio. It takes the balances of my various accounts along with the percentage of each asset class, plus my target allocation and reallocation bands, and spits out my current allocation and the min and max amount I should have in each asset class based on my bands and target allocation. If my bands are breached, it also shows the amount of money I need to move into or out of an asset class in order to get within my bands, and the amount to move to reach my target allocation.

    4 votes
  4. [4]
    admicos
    Link
    Installed NextCloud on my server. It turned out to be lighter than I expected, so that's nice. Honestly I really like it. Installed a bunch of "apps" (Calendar, Tasks, RSS, Contacts) and replaced...

    Installed NextCloud on my server. It turned out to be lighter than I expected, so that's nice.

    Honestly I really like it. Installed a bunch of "apps" (Calendar, Tasks, RSS, Contacts) and replaced the standalone stuff I was using. Bit slow, but what can you expect from a 5$/mo server running something probably intended for scaling up and enterprise use.

    The share via link feature came in handy just now, so that's nice

    4 votes
    1. [3]
      Omnicrola
      Link Parent
      Very interesting, didn't know about NextCloud. Several years ago I went looking for a way to get something similar to gsuite but as a self hosted FOSS, but couldn't find anything. What where your...

      Very interesting, didn't know about NextCloud. Several years ago I went looking for a way to get something similar to gsuite but as a self hosted FOSS, but couldn't find anything.

      What where your standalone tools you replaced? Where are you hosting your insurance?

      1. [2]
        admicos
        Link Parent
        I replaced Baikal (for Calendar/Tasks/Contacts sync through Cal/CardDAV) and Miniflux (RSS reader) I assume you mean "backups" by "insurance", in which case... Nowhere. I probably should get some...

        What where your standalone tools you replaced?

        I replaced Baikal (for Calendar/Tasks/Contacts sync through Cal/CardDAV) and Miniflux (RSS reader)

        Where are you hosting your insurance?

        I assume you mean "backups" by "insurance", in which case... Nowhere. I probably should get some soon, but I have no idea how I might do them just yet, and I don't want to spend much on a single server. I am currently hosting the server through Linode, and they seem to be doing a good job on not killing all the data on it just yet.

        1 vote
        1. Omnicrola
          Link Parent
          Oops, I meant "instance", but you answered anyway 😋

          Oops, I meant "instance", but you answered anyway 😋

  5. [2]
    dedime
    Link
    I've made a tiny program in Go to help move a file to the right location. It's a intended to be a helper program for using Tiddlywiki. When using Tiddlywiki on Windows 10 Chrome, the default save...

    I've made a tiny program in Go to help move a file to the right location. It's a intended to be a helper program for using Tiddlywiki.

    When using Tiddlywiki on Windows 10 Chrome, the default save location is %USERPROFILE%/Downloads/<wiki-name>.html. This makes sense, because you're downloading an HTML page and the default save location is in a user's download folder. However, I save my Tiddlywiki in %USERPROFILE%/Tiddlywiki. It is then synced from there to my other devices so I can access it anywhere. With my syncing program, I can't select individual files from a folder to sync - I have to sync the whole folder. This is where this program comes in: It runs in the background, waiting for the watched file path to be present, e.g. %USERPROFILE%/Downloads/<wiki-name>.html. When it see writes to this file, it waits a user-configurable amount of time for the writes to finish (e.g. 2 seconds), then it moves the file to the desired location, e.g. %USERPROFILE%/Tiddlywiki/<wiki-name>.html

    I've even included a notification icon so you can quit the app when desired, and it won't take up an active window. It will just run in the background.

    It's being developed on Windows, but it should technically be cross-platform - all of the libraries I've used are cross platform AFAIK. The hardest part I've had to deal with is detecting when the file is done being written to - using fsnotify, you'll see the html file being written 2-4 times before it actually stops. I set a timer in the background that resets with each write, and after the timer expires it moves the file. It works well now, but I had some serious troubles getting the one timer to be shared (required 2 goroutines + chans, which are newish territory for me)

    3 votes
    1. streblo
      Link Parent
      Likely each tcp packet being written as they arrive. You could probably just try and parse the <html> and </html> tags to know when you have a complete file and move it at that point.

      The hardest part I've had to deal with is detecting when the file is done being written to - using fsnotify, you'll see the html file being written 2-4 times before it actually stops.

      Likely each tcp packet being written as they arrive. You could probably just try and parse the <html> and </html> tags to know when you have a complete file and move it at that point.

      3 votes
  6. Apos
    Link
    Since my last post, I released a spatial partition library. I'm using it in my game already. I finally relearned trigonometry so I could add a 3D part to my 2D camera library. It's so nice to...

    Since my last post, I released a spatial partition library. I'm using it in my game already.


    I finally relearned trigonometry so I could add a 3D part to my 2D camera library. It's so nice to understand what field of view means, focal length, near or far planes, etc.

    The way the 2D parallax works, I return a different orthographic matrix to draw sprites closer or further away from the camera with different scaling values applied. This allows me to do a 2D game without any 3D math that still looks 3D: example with parallax zooming and example where I mix 2D and 3D (ignore the bad sorting, it's intended). snip

    With this new math, I can mix 2D and 3D. Or do culling checks with a single bounding frustum.


    I participated in the Ludum Dare 48. Made a game called One Missed Message with two other people from across the world. It's the first time I do voice acting for a game. Finally learned glsl and how to use an ECS (programming paradigm that's becoming more and more common in games). We got some pretty good feedback so far. We used my friend's custom game engine built on Veldrid.

    2 votes