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?

21 comments

  1. unknown user
    Link
    Almost ready to publish the mobile version of password, which includes a different mode of play more suited to touch-based devices. To fascilitate that, I've created InteractionHandler: a simple...

    Almost ready to publish the mobile version of password, which includes a different mode of play more suited to touch-based devices.

    To fascilitate that, I've created InteractionHandler: a simple standalone JS library that executes functions on events with conditions, in a downstream fashion (if you add multiple listeners to the same event, each of them gets executed, earliest to latest, if their conditions are met). It was supposed to help me get around the fact that there is no native support for swipe or tap events, which are important for the mobile version. With InteractionHandler and a library that detects and emits said events, I can bind parallel events (e.g. both click and tap) to the same handler.

    In retrospect, it wasn't as much use to me to develop InteractionHandler as I expected – I still needed another library to figure out what touch events are involved – but it did make my developing the game a little bit easier.

    7 votes
  2. [10]
    Phi11ipus
    Link
    I've started working on a programming language! I've always wanted to learn more about compilers and programming language design, so I figured that making my own would be a cool way to do it. It's...

    I've started working on a programming language! I've always wanted to learn more about compilers and programming language design, so I figured that making my own would be a cool way to do it. It's designed off of the "gimmick" of not requiring the shift key at all, since I find it slightly RSI inducing to use.

    The general design is to be a prefix-notation centric functional language. For example the following code defines a function which will double a given integer:

    def double a int end int
        add a a
    end
    

    Since the language uses prefix notation, you can define a function which quadruples an input in a couple of ways:

    def quadruple a int end int
        add add a a add a a
    end
    
    def quadruple2 a int end int
        add double a double a
    end
    
    def quadruple3 a int end int
        add add a a double a
    end
    

    Those examples above really only scratch the surface of what I'm hoping to implement (there are ideas for "namespacing" functions and defining types in terms of generic functions, for example), but I don't really want to flood the comments with a massive piece about my pet project. Part of me wants to start a blog to write about the progress I'm making, but a lot of the response I've gotten from friends has been negative so I'm worried that people won't really care (this is the same reason why I'm hesitant to put the compiler in a public Git repository). Anyways, that's been my big project.

    7 votes
    1. [3]
      Gyrfalcon
      Link Parent
      That's neat! I definitely feel concerns about RSI creeping into my life as I work from home and relax using the same desk/monitor/keyboard/mouse setup. None of it is bad on its own but just so...

      That's neat! I definitely feel concerns about RSI creeping into my life as I work from home and relax using the same desk/monitor/keyboard/mouse setup. None of it is bad on its own but just so many hours of the same gets to be a problem. I would definitely be interested in checking out a repo for your project if you ever decide to post it!

      3 votes
      1. [2]
        Phi11ipus
        Link Parent
        Here's the repo where I'm working on the compiler: https://gitlab.com/benjaminrsherman/ballet. It's clearly in the very early stages, but this is where updates will be happening.

        Here's the repo where I'm working on the compiler: https://gitlab.com/benjaminrsherman/ballet. It's clearly in the very early stages, but this is where updates will be happening.

        2 votes
        1. Gyrfalcon
          Link Parent
          Awesome! I'll be sure to take a look

          Awesome! I'll be sure to take a look

          1 vote
    2. [5]
      Apos
      Link Parent
      That's an awesome project! Making a language teaches you so much about programming. I really like your gimmick. I once designed a spoken language where the gimmick was that every words needed to...

      That's an awesome project! Making a language teaches you so much about programming. I really like your gimmick. I once designed a spoken language where the gimmick was that every words needed to be at most one syllable. I could say something like gah tar ah loh? (I forgot the exact spelling but that's how it sounded.) And you'd respond tar oh goh lee noh. In English that would mean What time is it? and the response would be Time to buy a watch.

      If you make a git repo, I'll watch it. Here is mine for the Vyne programming language: https://github.com/Apostolique/Vyne-Language

      3 votes
      1. amplitude
        Link Parent
        That spoken language sounds interesting! My first instinct was that a one-syllable-limit might be crippling to the scope of the vocabulary, but then again I remembered German words that are a tad...

        That spoken language sounds interesting! My first instinct was that a one-syllable-limit might be crippling to the scope of the vocabulary, but then again I remembered German words that are a tad longer than your examples of "gah, tar" etc., are still one syllable, but sound very similar: "Schweiß" [ʃvaɪ̯s] (sweat) and "Schweiz" [ʃvaɪ̯t͡s] (Switzerland) or "schrumpf" [ˈʃʁʊmp͡f] (shrink) and "Strumpf" [ʃtʁʊmp͡f] (sock).

        4 votes
      2. [3]
        Phi11ipus
        Link Parent
        Here's the repo where I'm working on the compiler: https://gitlab.com/benjaminrsherman/ballet. It's clearly in the very early stages, but this is where updates will be happening!

        Here's the repo where I'm working on the compiler: https://gitlab.com/benjaminrsherman/ballet. It's clearly in the very early stages, but this is where updates will be happening!

        2 votes
        1. [2]
          Apos
          Link Parent
          I don't know if you use Discord, but here is a really active community for programming language design: https://discord.gg/yqWzmkV The people there are really constructive, it's really motivating.

          I don't know if you use Discord, but here is a really active community for programming language design: https://discord.gg/yqWzmkV

          The people there are really constructive, it's really motivating.

          1 vote
    3. Moonchild
      (edited )
      Link Parent
      Neat project! If you're having trouble with rsi, I recommend looking into ergonomic keyboards. I use a kinesis advantage, and I have the shift keys remapped to the thumbs, which all but eliminates...

      Neat project!

      If you're having trouble with rsi, I recommend looking into ergonomic keyboards. I use a kinesis advantage, and I have the shift keys remapped to the thumbs, which all but eliminates strain.

      2 votes
  3. [3]
    Apos
    Link
    I've been creating my site with something called Saber. It's a static site generator for Vue.js. They have a plugin to post code blocks but it didn't support starting the code block from a...

    I've been creating my site with something called Saber. It's a static site generator for Vue.js. They have a plugin to post code blocks but it didn't support starting the code block from a different initial line number. I coded the feature myself and it got merged in just now. https://github.com/saberland/saber/pull/627 That was pretty awesome.

    This weekend I also took the time to work on my input library for MonoGame. https://github.com/Apostolique/Apos.Input I'm finally on version 1.0.0.

    I can use it like this:

    //Create a condition to toggle fullscreen.
    //It should work on either Alt keys with Enter.
    var toggleFullScreen = new AllCondition(
        new AnyCondition(
            new KeyboardCondition(Keys.LeftAlt),
            new KeyboardCondition(Keys.RightAlt)
        ),
        new KeyboardCondition(Keys.Enter)
    );
    
    //To check if toggleFullscreen is triggered:
    if (toggleFullscreen.Pressed()) {
        //Do the fullscreen change.
    }
    
    5 votes
    1. [2]
      unknown user
      Link Parent
      I've been checking Saber today. Seems like a neat thing! How's the experience working with it to make a site?

      I've been checking Saber today. Seems like a neat thing! How's the experience working with it to make a site?

      3 votes
      1. Apos
        Link Parent
        I work with vue quite a lot. Saber captures the experience quite well. Something that I really like is that I can do a blog post in markdown and pepper vue components directly in the markdown....

        I work with vue quite a lot. Saber captures the experience quite well. Something that I really like is that I can do a blog post in markdown and pepper vue components directly in the markdown. Feels like I'm getting the best of all worlds.

        A big selling point for me is that the creator is really responsive. All my questions get answered.

        Saber was quite easy to setup. I feel like I have total control over my website, how it looks and how it's structured. I did the whole theme from scratch and the learning curve was quite low.


        Another project that I'm keeping an eye on is Vite and VitePress. VitePress will be a future competitor to Saber.

        2 votes
  4. [4]
    Staross
    (edited )
    Link
    I've been thinking of implementing some kind of spectral morphing for sound, meaning smoothly transforming one sound into another (e.g. a guitar into a voice). There's some plug-ins that do that...

    I've been thinking of implementing some kind of spectral morphing for sound, meaning smoothly transforming one sound into another (e.g. a guitar into a voice). There's some plug-ins that do that but they don't sound all that good.

    Basically you have the power spectrum of both sounds :

    ----1122567332211----------
    -----------123456321--------

    And you need to find a function that maps on into the other, if that case the sound goes up in pitch but the spectrum also contracts. I think it's related to the idea of optical flow in image interpolation.

    2 votes
    1. [3]
      joplin
      Link Parent
      Interesting! I read an article by Bob Moog in Keyboard Magazine (or Electronic Musician?) back in the late 80s or early 90s about this topic. It sounded fascinating, but I never found a tool for...

      Interesting! I read an article by Bob Moog in Keyboard Magazine (or Electronic Musician?) back in the late 80s or early 90s about this topic. It sounded fascinating, but I never found a tool for doing it. I'd love to hear what you find when it's ready!

      In addition to morphing the frequency spectrum, you also need to deal with differing envelopes for each harmonic. It's a pretty good problem to work on!

      1 vote
      1. [2]
        Staross
        Link Parent
        I managed to write the problem such that I can auto-differentiate it and use gradient descent for the fit. It gets stuck in local minima but it's super fast so I can just run it many times. Still...

        I managed to write the problem such that I can auto-differentiate it and use gradient descent for the fit. It gets stuck in local minima but it's super fast so I can just run it many times.

        Still need some work but I like how it looks, it's nicely non-linear. I need to add something to create extra-harmonics though (although running the procedure in both directions and mixing the result might be enough).

        https://i.imgur.com/O0v5kkT.png

        1 vote
        1. joplin
          Link Parent
          Very cool! I'd love to hear the results when you get something you like with it!

          Very cool! I'd love to hear the results when you get something you like with it!

          1 vote
  5. [2]
    LukasDrsman
    Link
    I'm currently working on my little python todolist cli app. It's not really that interesting. It just loads todolist from a file to an array (or list?), manipulates it and saves it. You can find...

    I'm currently working on my little python todolist cli app. It's not really that interesting. It just loads todolist from a file to an array (or list?), manipulates it and saves it. You can find it here.

    2 votes
    1. Phi11ipus
      Link Parent
      This actually seems like something I could make a lot of use of - previously I've used todo apps like Todoist or Google Tasks, but most of the time I just need to track stuff on my computer and...

      This actually seems like something I could make a lot of use of - previously I've used todo apps like Todoist or Google Tasks, but most of the time I just need to track stuff on my computer and opening up a web browser is a lot of hassle for something which should be as simple as just looking at a file, so your app might be exactly what I was looking for.

      3 votes
  6. knocklessmonster
    (edited )
    Link
    I made a dice roller that rolls a standard 7-die set for any number of rolls. I'm going to implement arrays for transparency, and want to figure out if I can bridge it into working with the data...

    I made a dice roller that rolls a standard 7-die set for any number of rolls. I'm going to implement arrays for transparency, and want to figure out if I can bridge it into working with the data outputs. It's an exercise in learning PyQt5, in an effort to take my knowledge from last semesters OOP in C# and apply it to a fully open language and toolkit that can make native applications. Planned expansions are showing roll arrays, and statistical analysis of some sort, so I can work on getting truly random rolls, instead of having to throw a bodge on Python's pseudo-random generators.

    I sort of put the ideological cart before the horse, because I always wanted to write software using these tools, but couldn't really self-teach beyond procedural programming basics. I also have the time because my job is closed.

    2 votes