18 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. [2]
    LGUG2Z
    Link
    This was mostly just for fun, but I spent some time setting up voice control for my tiling window manager this weekend!

    This was mostly just for fun, but I spent some time setting up voice control for my tiling window manager this weekend!

    7 votes
    1. atmk
      Link Parent
      That sounds interesting. Have you gotten any ergonomic use out of it? I once thought about making a voice controlled extension for Firefox that would aid skimming though webpages. You would say...

      That sounds interesting. Have you gotten any ergonomic use out of it?

      I once thought about making a voice controlled extension for Firefox that would aid skimming though webpages. You would say the question/info you were looking for and it would use a BERT-like ml model to highlight the most relevant part of the text

      1 vote
  2. [3]
    Habituallytired
    Link
    I've got some nonsense on my neocities site! I'm still looking at what I want to add to it and to make things prettier. I might make buttons next for the top part....

    I've got some nonsense on my neocities site! I'm still looking at what I want to add to it and to make things prettier. I might make buttons next for the top part.

    https://habituallytired.neocities.org/

    6 votes
    1. [2]
      dsh
      Link Parent
      I have not heard of Neocities but I am a big time fan of the Tumblr Blog "Terabyte of the Kilobyte Age" which is just screenshots of crude Geocities sites of yore. Thanks for bringing Neocities to...

      I have not heard of Neocities but I am a big time fan of the Tumblr Blog "Terabyte of the Kilobyte Age" which is just screenshots of crude Geocities sites of yore. Thanks for bringing Neocities to my attention!

      Also - you have some really fun work!

      2 votes
      1. Habituallytired
        Link Parent
        Thank you! I'm still playing around, I don't expect anyone to click around, just lucky to have places to make buttons for. <3 I've tried to learn to code many times in the past, and it's finally...

        Thank you! I'm still playing around, I don't expect anyone to click around, just lucky to have places to make buttons for. <3

        I've tried to learn to code many times in the past, and it's finally clicking. I don't remember where I heard about Neocities, but it's such a great reminder of Geocities that I couldn't pass up a chance to be part of it and use it to learn more.

        1 vote
  3. Nny
    Link
    Made a script for the game Marvel Snap that allows you to sort your collection by some things in Excel that the in game collection manager doesn’t let you sort by Which was super simple and...

    Made a script for the game Marvel Snap that allows you to sort your collection by some things in Excel that the in game collection manager doesn’t let you sort by

    Which was super simple and finished it very quickly, but it was nice because it’s been years since I’ve programmed at all on a personal project. Has made me want to expand upon it and make a website that is a full collection manager…dunno if I’ll go that far but I do want to feed the hobbyist programmer again

    https://github.com/MarvelSnapBoosters/Marvel-Snap-Booster-Count in case others play and want the functionality

    5 votes
  4. dsh
    Link
    Just got back to work so my whole world is "ECS container optimization and Datadog monitoring implementation." Honestly, I like this kind of stuff.

    Just got back to work so my whole world is "ECS container optimization and Datadog monitoring implementation." Honestly, I like this kind of stuff.

    4 votes
  5. [3]
    BHSPitMonkey
    Link
    I made a thing (source code) that lets me access articles from Pocket and Hacker News (maybe Tildes next?) on my e-reader (or any reader that supports OPDS feeds). When you select an article, the...

    I made a thing (source code) that lets me access articles from Pocket and Hacker News (maybe Tildes next?) on my e-reader (or any reader that supports OPDS feeds). When you select an article, the server generates a "reader mode" version of the page as an EPUB on the fly. Uses Node+Express, published to Docker and runs on my ARM home server.

    4 votes
    1. [2]
      tauon
      Link Parent
      Neat idea! What do you think it would take for this to break? Also, how do the EPUBs reach your e-reader typically? I’m assuming not by manual copying of anything? (;

      Neat idea!

      What do you think it would take for this to break?

      Also, how do the EPUBs reach your e-reader typically? I’m assuming not by manual copying of anything? (;

      1. BHSPitMonkey
        Link Parent
        By break, do you just mean what kinds of webpages will fail to load? The main requirements are 1) the article content needs to be part of the response body (lazy-loaded content won't work) and 2)...

        By break, do you just mean what kinds of webpages will fail to load? The main requirements are 1) the article content needs to be part of the response body (lazy-loaded content won't work) and 2) the Mozilla Readability library needs to be able to find the article content to extract (i.e. if Firefox shows the Reader Mode icon, it should work here). I find this works for the majority of links I've tried.

        The EPUB (or PDF) is downloaded by the client software straight to the device; That's the main benefit of using OPDS feeds. I run Koreader on my Libra 2 to consume it; you can see some screenshots of what this experience looks like in the description on GitHub.

        1 vote
  6. Expertbacon
    Link
    This is pretty easy but I have been fixing my aging ipod clickwheel (5.5gen) and will probably put rockbox on it. I also put games on my ti 83+(silver edition)

    This is pretty easy but I have been fixing my aging ipod clickwheel (5.5gen) and will probably put rockbox on it. I also put games on my ti 83+(silver edition)

    3 votes
  7. [3]
    infpossibilityspace
    Link
    I want to get better at programming, so I'm going to start writing a vim clone (rip Bram) in Jai (new language designed by Jon Blow, designer of Braid and The Witness). My ultimate goal is to...

    I want to get better at programming, so I'm going to start writing a vim clone (rip Bram) in Jai (new language designed by Jon Blow, designer of Braid and The Witness).

    My ultimate goal is to write a domain-specific operating system for a SIEM (even if it takes years). The company I work for has spent 6 months adding complexity to solve their SIEM issue, and it's not commercially viable (for them) to build something from the ground up.

    3 votes
    1. [2]
      skybrian
      Link Parent
      Do you have access to Jai? I thought it wasn't out yet.

      Do you have access to Jai? I thought it wasn't out yet.

      2 votes
      1. infpossibilityspace
        Link Parent
        It's currently in closed beta, I'm currently learning it (I'm not a professional developer but I work in a technical field). I'm not expecting to make anything good for a while :P

        It's currently in closed beta, I'm currently learning it (I'm not a professional developer but I work in a technical field). I'm not expecting to make anything good for a while :P

        2 votes
  8. Apos
    Link
    I took some time to work on my infinite canvas drawing application. https://github.com/Apostolique/Mitten I added a way to save positions on the canvas. Makes it so much faster and efficient to...

    I took some time to work on my infinite canvas drawing application. https://github.com/Apostolique/Mitten

    I added a way to save positions on the canvas. Makes it so much faster and efficient to navigate around the canvas.

    3 votes
  9. MaoZedongers
    (edited )
    Link
    I recently made a library for nim called cflags, which is basically a replacement for nim sets when you need binary compatibility with C, and also nim sets are just a little weird in general. It...

    I recently made a library for nim called cflags, which is basically a replacement for nim sets when you need binary compatibility with C, and also nim sets are just a little weird in general.

    It differs from nim sets in that:


    It takes two generic type arguments Flags[T: SomeInteger, E: enum] with T being the integer backing type of the flags type that determines the size and internal representation of the flags, and E being the enum of values that the Flags is meant to be a bitmask of.


    The size of a Flags is straightforward, obvious, and easy to control, unlike nim's set where
    When constructing a set with signed integer literals, the set's base type is defined to be in the range 0 .. DefaultSetElements-1 where DefaultSetElements is currently always 2^8. The maximum range length for the base type of a set is MaxSetElements which is currently always 2^16. Types with a bigger range length are coerced into the range 0 .. MaxSetElements-1.


    A Flags is just a distinct typedef of the backing type, so you can cast to and from T easily, unlike sets where you have to use a cast expression, which is a reinterpret cast and circumvents the type system.


    nim sets seem to ignore the values you choose for an enum, at least for a HoleyEnum, and does something funky instead:

    type Toppings = enum
        Cheese = 0x1,
        Pepperoni = 0x2,
        Onion = 0x4, # this is considered a holey enum since '3' is missing between Pepperoni and Onion
        Peppers = 0x8,
    
    const supreme = {Cheese, Pepperoni, Onion, Peppers} # represent a supreme pizza as a set of all toppings
    
    echo cast[int](supreme) # 139 for some reason
    
    let supreme_flags = supreme.toFlags(int) # converts a nim set[Toppings] to a Flags[int, Toppings]
    
    echo supreme_flags.int # 15, like intended, compatible with c bitflags
    

    if you remove the explicit values from the enum, you'll get 15 from the set like you'd expect, and then Flags won't work as expected since 0,1,2,3 (default enum value order) will overlap.

    But for c interop you can't just leave enums that represent bitmask values to the values that a nim set likes


    Avoiding HoleEnumConv warning spam. Anytime you iterate over an enum with holes, you get a warning saying something like Warning: conversion to enum with holes is unsafe: T(i) [HoleEnumConv] because the iterator function items() does a normal cast from an integer to a holey enum, which can be an invalid value. This mainly occurs with sets.

    Even just stringizing a set that uses a holey enum causes this warning spam, calling echo supreme above would trigger this warning.

    This general issue is solved by adding an explicit holeyItems[E: HoleyEnum](set[E]) operator which uses a reinterpret cast instead to ignore this warning, which is otherwise almost impossible to ignore short of disabling the warning for the entire project. The downside is that a reinterpret cast from an integer to an enum, for whatever reason, cannot be done at compiletime (The VM used to evaluate compiletime code doesn't support int to enum casts currently). This means that if you change let supreme_flags to const supreme_flags it will fail to compile since converting a nim set to a flags requires invoking holeyItems at compiletime, which fails.

    This pattern repeats itself, so pretty much any Flags function that takes a nim set as an argument can't be called at compiletime, although variants that accept another Flags or an array of values, or even construct a Flags from a varargs of enum values instead can be called at compiletime, so this would work fine:

    const supreme = [Cheese, Pepperoni, Onion, Peppers].toFlags(int)
    
    const supreme2 = makeFlags(int, Cheese, Pepperoni, Onion, Peppers)
    

    Flag's bitmask enum values can overlap just like in C, for things like

    type Permissions =
        Read = 0x1,
        Write = 0x2,
        RW = 0x3,
        Exec = 0x4,
        RWX = 0x7,
    
    const AllPerms = makeFlags(int, RWX)
    
    echo AllPerms # {int | Read, Write, Exec}
    

    which are sometimes done in C code. But note that when stringized, only the individual flags will be shown


    A similar but not identical subset of nim sets functionality, partially based in basic set theory

    flags.set(flag) set a flag in flags

    flags.unset(flag) unset a flag in flags

    flags1 in flags2 -> flags2.contains(flags1) returns true if flags1 is a subset or identity of flags2

    flags 1 == flags2 returns true if flags1 is an identity of flags2

    flags1.subsetOf(flags2) returns true if flags1 is a subset (and not an identity) of flags2

    flags1.supersetOf(flags2) returns true if flags1 is a superset (and not an identity) of flags2

    flags1 + flags2 union of flags1 and flags2

    flags1 - flags2 difference of flags1 and flags2

    flags1 * flags2 intersection of flags1 and flags2

    2 votes
  10. UP8
    Link
    I’ve been on a standards committee for quite a few years working on the semantics of financial messaging. I had been interested in RDF for a long time but it was like a “god of poverty” for me in...

    I’ve been on a standards committee for quite a few years working on the semantics of financial messaging. I had been interested in RDF for a long time but it was like a “god of poverty” for me in that the money never came, the paying work that I kept letting was from people who needed help with a neural net (long before transformers.)

    On that committee I met the first person I met who really knew how to model things with OWL ontologies who herself was feeling like a voice in the wilderness, we were able to figure how how to represent ISO 20022 schemas and messages with RDF and OWL and this is written up in what is going to be an ISO informative document.

    After that I figured how how to logically model most XSLT schemas and conforming documents as OWL DL ontologies and instances. Somebody had developed something similar a few years back that was not really right (the ontologies didn’t validate) but not right. At this point I have a customer and there is going to be some open source software and a report, so over the next few weeks I’m going to get to coding on it.

  11. [2]
    pyr02k1
    Link
    At work I've been doing a ton of cloud formation template work. Transferring a gigantic, near max size template, to a new account. Lots of moving parts and outside dependencies on other teams made...

    At work I've been doing a ton of cloud formation template work. Transferring a gigantic, near max size template, to a new account. Lots of moving parts and outside dependencies on other teams made it frustrating. Next up is removing Citrix from another template stack, and finally getting both of those converted to CDK.

    Personal project, I've been building out an auto install bash script for a hetzner bare metal server, namely to do ZFS on boot and root. There's a few others out there but most are only half updated right now and don't do what I want them to do. Really, I should just install it manually and be done with it, but it's something to do I guess. It will probably be my first open source project if I actually get to finishing it. Given my track history with personal projects (and that the cost of hetzner storage is a ton cheaper than the dedicated box), I may never actually finish it.

    1. zenen
      Link Parent
      I hope you finish it! bash scripts are great

      I hope you finish it! bash scripts are great

  12. Grayscail
    Link
    I'm working on putting together a homelab for myself. I'm putting together a cabinet now. Eventually I want to be able to back up all my files and music there, host my own git repository there,...

    I'm working on putting together a homelab for myself. I'm putting together a cabinet now.

    Eventually I want to be able to back up all my files and music there, host my own git repository there, maybe host a blog, have NAS, put in a Pihole, stuff like that.

    I am just getting started though and still need to do a bunch of reading to figure out how to do any of that.