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

25 comments

  1. [10]
    Grendel
    Link
    There is a fairly famous subreddit called WallStreetBets that centers around high risk high reward options trading. People frequently make posts speculating about a certain stock and recommending...

    There is a fairly famous subreddit called WallStreetBets that centers around high risk high reward options trading. People frequently make posts speculating about a certain stock and recommending positions that people should take.

    I'm creating a web site that will scrape those posts and store them in a database along with the username of the author. On the site you will be able to enter someones username and see their all of their WSB posts that contain stock positions, along with their overall accuracy. The DB is done and the scraper is done, just got to work on the actual site now.

    I'm thinking I'll use DotNet Core for the backend REST API and something like React for the front end.

    17 votes
    1. [4]
      joplin
      Link Parent
      Very neat idea! I could definitely see someone getting better (or more likely worse!) over time, and that might be an interesting thing to look at, too. Is person X really good at picking these or...

      Very neat idea! I could definitely see someone getting better (or more likely worse!) over time, and that might be an interesting thing to look at, too. Is person X really good at picking these or did they just get lucky once or twice?

      There's a podcast I listen to called The Skeptic's Guide to the Universe. Every year they collect predictions made by well-known "psychics" and then at the end of the year they fact check them. There will always be one psychic who got some out-there thing right simply by chance. They like to point out that these people were right on this one thing, but wrong on thousands of other things they predicted, but of course, it doesn't matter to the followers of a psychic. They remember the hits and forget the misses. (The hosts of the podcast also make their own science-based predictions at the beginning of the year and check themselves at the end. It's pretty amusing because they sometimes are serious about it, and sometimes aren't.)

      6 votes
      1. [3]
        Grendel
        Link Parent
        What was really interesting to me was that based on some preliminary data (still working on getting the sub's history scraped), it looks like the vast majority of users only post once, then never...

        What was really interesting to me was that based on some preliminary data (still working on getting the sub's history scraped), it looks like the vast majority of users only post once, then never again. The repeat posters only make up less than 20% of the total users that have posted.

        (Note, those numbers are subject to change, still working with the data)

        3 votes
        1. [2]
          joplin
          Link Parent
          That makes me wonder if the one-time posters are trying to affect the position of the stock they're pushing to benefit themselves?

          That makes me wonder if the one-time posters are trying to affect the position of the stock they're pushing to benefit themselves?

          3 votes
          1. Grendel
            Link Parent
            Yeah, that's called pump and dump. The only way to benefit from a pump and dump on WSB is to advocate for a really small stock (otherwise WSB doesn't have enough members to make a significant...

            Yeah, that's called pump and dump. The only way to benefit from a pump and dump on WSB is to advocate for a really small stock (otherwise WSB doesn't have enough members to make a significant difference in price). People get usually get called out for trying to pump up low volume stocks and typically the post gets removed by the mods.

            There has been an explosion of retail investing and I think a lot of these one off posts are new people who try it, then lose it all and give up.

            4 votes
    2. [4]
      intuxikated
      (edited )
      Link Parent
      I've seen that sub mentioned on multiple occasions, I have zero knowledge about how stocks or trade works. Where can I read about it? thank you :)

      I've seen that sub mentioned on multiple occasions, I have zero knowledge about how stocks or trade works. Where can I read about it? thank you :)

      3 votes
      1. [3]
        Grendel
        Link Parent
        Regular stocks are pretty straight forward. Buy stock and you own a little bit of that company. Hopefully the company increases with value over time and (in theory) the stock will as well....

        Regular stocks are pretty straight forward. Buy stock and you own a little bit of that company. Hopefully the company increases with value over time and (in theory) the stock will as well.

        WallStreetBets focuses mostly on options. Options are more complicated, both in understanding what they are and in trying to invest in them.

        It's basically you saying "Stock for (some company) will go (up or down) by (dollar amount) before (Date)". You pay money to make that "bet". If you're right you can easily make between 100% and 800% or more profit. If your wrong you lose the entire cost of that investment.

        Most people on the sub are basically trying to play the lottery. Buying options that are very unlikely to be profitable for cheap, hoping to get lucky (similar to penny stocks). The craziest gain I've seen on that sub was a guy who bought an option for $35, then sold it for $15,000 a month later (that is not typical)

        6 votes
        1. [2]
          sqew
          Link Parent
          I do wonder about the authenticity of some of the more crazy gains posted on there. I remember seeing a post where someone claimed to have made an insane amount with a stupid bet on Amazon going...

          I do wonder about the authenticity of some of the more crazy gains posted on there. I remember seeing a post where someone claimed to have made an insane amount with a stupid bet on Amazon going up or down on a given day (forget which it was), and I can't help but think that they probably just photoshopped the screenshot or something.

          2 votes
          1. Grendel
            Link Parent
            You can't prove that they actually bought that option when they said they did, but you can look at the value of the option over time and confirm that the option did or didn't gain that much value....

            You can't prove that they actually bought that option when they said they did, but you can look at the value of the option over time and confirm that the option did or didn't gain that much value. The option I was referring to specifically was for the company Shopify, which went from $350 a share on April 3 to $658 on May 6.

            An options contract is for 100 shares. so 658-350 = 308. 308 times 100 shares is $30,000 minus the initial cost of the trade.

            And that's why people play options. High risk high reward.

            4 votes
    3. evrim
      Link Parent
      I love the idea. Is there a way to be notified when this goes online? Also, if you need any help with React, feel free to get in touch.

      I love the idea. Is there a way to be notified when this goes online?

      Also, if you need any help with React, feel free to get in touch.

      2 votes
  2. [9]
    Bauke
    Link
    When I can be bothered, I'll probably make a blog and post this there, but for now it can live here on Tildes. :) I mentioned 2 weeks ago I published my first crate for Rust and that it was...
    • Exemplary

    When I can be bothered, I'll probably make a blog and post this there, but for now it can live here on Tildes. :)

    I mentioned 2 weeks ago I published my first crate for Rust and that it was because I needed the functionality for another project. Well, here I am now to talk about this other project, Fed.

    Fed is a feed reader with RSS, Atom and JSON Feed all supported, a minimal JavaScript philosophy and a focus on a decent looking UI (at least in my mind).

    Programming Details

    Fed is built entirely with Rust, largely on top of the Rocket web framework with various other libraries on top of that:

    • Tera templating (basically Jinja2 in Rust).
    • Ammonia for content sanitization (basically Bleach but in Rust).
    • Diesel as the database ORM.
    • feed-rs for feed parsing, it's really nice as it handles a bunch of formats and maps it all to one model.
    • OPML, the crate I made for easy importing and exporting of feed lists (I'm not about to manually enter 500 feeds, lemme tell you that).
    • Sass as the CSS pre-processor, specifically rsass. It's not a complete implementation but works fine for all the things I've needed so far.

    However, because Fed's still very early in development, you can only run it locally and you need a working Rust and PostgreSQL installation to do it. There is no authentication of any kind, no HTTPS, a lot of error handling is missing... So, it's extremely simple, delicate and likely nobody (except for myself) will end up running it for the foreseeable future. But that's okay, because I have pictures to show you what it looks like and it's capable of so far (If you are interested in running it yourself though, I made a little guide on how to do that).

    The Homepage

    So if you went to the homepage, you'd be greeted by this interface:

    • At the top, you'll find the place to add new feeds.
    • In the center, you'll find the 5 feeds that most recently had a new entry in them with buttons to view, edit or delete it. The yellow star after feed's title indicates the feed was updated since the last time you viewed it.
    • And at the bottom, the footer with some useful links, more on the Settings later.

    Adding a feed is pretty simple, enter the title and URL and bam, it's added.

    Clicking on the edit feed button will take you to a very similar interface, and deleting a feed looks the same as adding one.

    The Feed List

    To view all your feeds at once, there is the feed list, that has a slightly extended interface than the list on the homepage. The extra info shown is:

    • When the feed was last downloaded by Fed.
    • When the feed was last updated by the creators (usually the date of the newest feed entry).
    • And when you last viewed the feed.

    Reading A Feed

    From the homepage, clicking on the feed's title or the view button will take you to where you can see the feed's contents (if it was able to parse any, otherwise there will just be a link to the entry on the site). By default, the first entry is expanded. And here as well, there are unread markers to show you what's new since you last viewed it.

    The Settings

    And for the final part, the settings, which can be accessed from anywhere through the footer. It's intentionally barren for now, so I don't have to worry about making sure everything's working with all different kind of configurations.

    If you've known me for more than 5 seconds though, you'll know that I can't make anything without support for themes, so yep there's a Light theme too (and if you've known me for more than 10 seconds, the theme shown is one I also made myself, isn't it lovely).

    And finally, the OPML import and export form, relatively self-explanatory. You can import an OPML document and any feeds that don't exist yet will be added (and any that do will be skipped, big thanks to @pvik for helping me out with that). And exporting will just get you a neat little OPML file to use wherever else.

    Behind The Scenes

    Now that you've seen all the things that you can do through the site, there's also another component running at the same time, the automatic feed downloader.

    Every hour, on the hour, the downloader will go through each feed and try to download it again (if it had been longer than 30 minutes since the last download). This saves you from having to go through every feed manually to figure out if there's something new and gives Fed the ability to show new unread markers on feeds in the feed list, since otherwise it wouldn't be able to figure out if anything new happened.

    Alright, so that's Fed. If you've gotten this far, thanks for reading! Now I can finally stop spamming @cfabbro on Keybase whenever I add anything new to Fed. xD

    Also big shout-out to Firefox's built-in screenshotting tool, allowing me to easily take screenshots of the full page without having to do anything in GIMP.

    11 votes
    1. [4]
      ThatFanficGuy
      Link Parent
      Is there a plan in the future to make it installable, as in with an executive file or something, without having to fiddle with the nitty-gritty?

      Is there a plan in the future to make it installable, as in with an executive file or something, without having to fiddle with the nitty-gritty?

      5 votes
      1. [3]
        Bauke
        Link Parent
        That's the plan, yes. Because it currently requires a PostgreSQL installation, it'll likely end up being done with something like Docker. That might be one of the next things I do.

        That's the plan, yes. Because it currently requires a PostgreSQL installation, it'll likely end up being done with something like Docker. That might be one of the next things I do.

        5 votes
        1. [2]
          skybrian
          Link Parent
          Is the plan to be single-user or multi-user? For a single-user executable, I imagine SQLite would work well.

          Is the plan to be single-user or multi-user? For a single-user executable, I imagine SQLite would work well.

          5 votes
          1. Bauke
            Link Parent
            In the near future it will stay single-user, but when I get around to adding authentication I'll probably also add multi-user at the same time. I initially did intend to use SQLite and then have a...

            In the near future it will stay single-user, but when I get around to adding authentication I'll probably also add multi-user at the same time. I initially did intend to use SQLite and then have a simple executable, but because of one particularly annoying SQLite limitation I just decided to go with Postgres.

            4 votes
    2. [4]
      Bauke
      Link Parent
      For those interested, I have now made a blog with 2 posts, the OPML one and the Fed one. :) I'll be adding RSS/Atom/JSON feeds to it later today or tomorrow, if you're one that likes that kind of...

      When I can be bothered, I'll probably make a blog and post this there

      For those interested, I have now made a blog with 2 posts, the OPML one and the Fed one. :)

      I'll be adding RSS/Atom/JSON feeds to it later today or tomorrow, if you're one that likes that kind of thing. ;)

      2 votes
      1. [3]
        cfabbro
        Link Parent
        You should post the announcement to ~tech (or ~comp)!

        You should post the announcement to ~tech (or ~comp)!

        2 votes
        1. [2]
          Bauke
          Link Parent
          It already exists here though. :P

          It already exists here though. :P

          2 votes
          1. cfabbro
            (edited )
            Link Parent
            Sure, but IMO it's potentially worth discussing on its own, so worth its own post. It's your call though. :)

            Sure, but IMO it's potentially worth discussing on its own, so worth its own post. It's your call though. :)

            2 votes
  3. bonbon
    Link
    I recently finished a project that I've been wanting to do for a long time now called gmcts. gmcts is a Monte-Carlo Tree Search Implementation written in Golang. For those that don't know, MCTS is...

    I recently finished a project that I've been wanting to do for a long time now called gmcts. gmcts is a Monte-Carlo Tree Search Implementation written in Golang.

    For those that don't know, MCTS is a search algorithm, mostly used for games, that uses randomness to find good actions. Essentially, it plays thousands of random games to determine which action is good. This algorithm is so good at what it does that it became the backbone for many go playing programs, including AlphaGo.

    I like this algorithm because it is domain-independent, therefore, I can make use of a Game interface that the implementation uses to get information like the next game state, a list of actions to consider, and winning players in terminal states.

    There's still a lot of work I want to do on this project. Right now, the implementation is only designed for deterministic, perfect-information games, and the simulation of games is very tied down, choosing good and bad moves equally likely (you can't get AlphaGo levels of optimization with this implementation). Even so, I've released v1.0.1 for anyone to try on their game implementations!

    5 votes
  4. parsley
    Link
    Not sure if this counts, but maintaining the hairball of parsers and scripts I use to keep my hledger accounting journals. I have to parse a number of excel files (as in files you can open in...

    Not sure if this counts, but maintaining the hairball of parsers and scripts I use to keep my hledger accounting journals. I have to parse a number of excel files (as in files you can open in excel and pretend they are well formed spreadsheets), pdfs, and a custom format for notes I take on the phone.

    Most of it is automated now, but it's a mix of rust, python and a couple other tools and has way too many steps. I want to convert it all to simpler haskell scripts to use hledger as a library but I have not done real haskell stuff in many moons, so it is low priority.

    5 votes
  5. elio
    Link
    I was tired of how slow it's to create GitHub issues, even worse if you have to create multiple in different repositories, so I wrote an app to make GitHub issues faster using plain text....

    I was tired of how slow it's to create GitHub issues, even worse if you have to create multiple in different repositories, so I wrote an app to make GitHub issues faster using plain text.
    https://startfunction.com/make-github-issues-faster/

    5 votes
  6. ThatFanficGuy
    Link
    I've been working on the next version of Intergrid's engine. The goal is to make an extensible, performant basis for grid-like apps, including options for non-plaintext entries. Mostly a fun...

    I've been working on the next version of Intergrid's engine. The goal is to make an extensible, performant basis for grid-like apps, including options for non-plaintext entries. Mostly a fun project, just like the original Intergrid engine was: I'm not rushing to turn it into production any time soon. If I don't enjoy working on it, it ain't worth it.

    I'm also considering making it public, as in posting the work to GitHub, so that I could gather early reviews for mistakes and better practices.

    3 votes
  7. joplin
    Link
    I'm back to looking at my Penrose Tile generator. I have a number of features I'm trying to add that are mostly ways of decorating the tiles so that they mimic other types of tiles, like Girih...

    I'm back to looking at my Penrose Tile generator. I have a number of features I'm trying to add that are mostly ways of decorating the tiles so that they mimic other types of tiles, like Girih Tiles. It's written in Swift and uses the Pentagrid method of generating the tiles. It feels inefficient right now. I'd like to make it more efficient, but I'm not sure how at the moment. I feel like if I could understand the math a little better, I could solve some of the shortcomings it currently has.

    2 votes
  8. Apos
    Link
    I started working on a multiplayer version of a game I made 2 years ago as a gamejam project. https://apos.itch.io/projectcore Two of my friends joined (one of whom made the original one with me)....

    I started working on a multiplayer version of a game I made 2 years ago as a gamejam project. https://apos.itch.io/projectcore Two of my friends joined (one of whom made the original one with me).

    It's a tower defense game where paths and towers can be moved. This time we are making it work as a multiplayer game. I'm streaming the creation process on Twitch https://www.twitch.tv/apostolique
    We're going for a look similar to the game Mini Metro.

    We already have the multiplayer synchronization hooked up. We're building the engine from scratch with MonoGame. This time the game is played on a hexagon grid.

    2 votes