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

2 comments

  1. mono
    Link
    I've been working on a super experimental transport agnostic server "framework" for Node in Typescript using a functional programming style based on the fp-ts library. I've been really obsessing...

    I've been working on a super experimental transport agnostic server "framework" for Node in Typescript using a functional programming style based on the fp-ts library. I've been really obsessing over the abstraction to make it super generic and composable, and then I'll provide implementations of some commonly used components that users can opt to use to build a complete server. In the fp-ts ecosystem, there's a runtime type library io-ts (by the same author) which has some really interesting experimental tools for creating abstract schemas at runtime that can then be derived into different interpreters. So, one could define a single API schema in Typescript and then compositionally derive everything from implementation types, client APIs, validators, de/serializers to docs, OpenAPI specs, etc..

    Another part of that whole project is a functional stream/Observable type library, which I don't believe fp-ts provides an abstraction for. I implemented my own naive version using chains of Promises which was kinda neat and really helped me climb fp-ts's very steep learning curve, but I abandoned it for scalability reasons. Then I looked at what options there are in Haskell and found this paper. So right now, I've been working on porting that to Typescript and fp-ts. The process has really proven to me the virtues of functional programming and Category theory because the pattern itself is quite confusing (involving mutual recursion and whatnot), but the hardest part was just learning a bit of Haskell syntax and how to best represent it with fp-ts. From there, it's smooth sailing - the types check out perfectly and unit tests pass, and if I don't yet understand what something actually does, at that point, it's easy to pick apart and figure out. Really fucking satisfying, I must say.

    2 votes
  2. lonk
    Link
    I am going through the process of publishing my website https://linklonk.com as a Progressive Web App (PWA) on the Google's Play Store, following this tutorial:...

    I am going through the process of publishing my website https://linklonk.com as a Progressive Web App (PWA) on the Google's Play Store, following this tutorial: https://chromeos.dev/en/publish/pwa-in-play

    The process is straightforward except for two bits:

    • I uploaded the app bundle to the Play Store and enabled Internal Testing for it, but it the internal testing app link would not work for a few days. Quite a few people have this problem based on StackOverflow questions like this. I think there is some async process that is not reflected in the UI that caused this. Because waiting a few days fixed the issue - I can install the app through the internal testing link.
    • Once I launched the app there was a browser bar at the top - the point of a PWA is to look more like a native app, so the browser bar shouldn't be there. Apparently, I needed verify that I own both the app and the website by placing this file: https://linklonk.com/.well-known/assetlinks.json - it says that an app signed with that certificate is authorized to open all links for linklonk.com/*. The tutorial mentions this asset link in https://chromeos.dev/en/publish/pwa-in-play#digital-asset-links, but the specific steps to follow were missing. And again, after generating and uploading the assetslinks.json file it took a few re-installs and half a day for it to have an effect. This time the asset link file was probably cached somewhere - either on some servers or on my phone.

    Any Android user could already install the LinkLonk PWA directly from the browser (open linklonk.com > open browser menu > select "Add to Home Screen"). This adds the site to the home screen as any other app and it opens the site in full-screen mode - without any browser status bar.

    The Play Store listing creates exactly the same thing. So what's the point? Is it worth going through the process of creating a developer account which requires uploading a government id and paying a $25 fee?

    The above tutorial gives these reasons to list on the Play Store:

    By listing your PWA on Google Play, it becomes discoverable in the world’s largest app store. Google Play also offers app ratings and reviews, giving users insight into your PWA before installing it. Finally, when you list your app in Google Play, you also get the power of Google Play Billing, giving users a familiar payment platform to work with while supporting payments from multiple countries.

    The last point about billing is not relevant, because the site is free to use, but I'd like to see if it can help find more new users.

    The app is still in unreviewed state, so I cannot publish it yet. The holiday season is probably not helping make this process faster. If you have an Android device and would like to help test the app, send me an email at lonk at linklonk domain and I'll add you to the testing group once the app is reviewed and is ready for closed testing.

    Does anyone else have any experience publishing a PWA on Play Store?

    2 votes