Hacker News

New stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Ask HN: Is spec-driven-development dead with the frontier models?
    —discuss
  2. AI is accelerating and amplifying threats: immediate action is necessary(aivd.nl)
    —discuss
  3. Marvel Has Been Wearing a Horror Movie Under That Spandex Since 1962(medium.com/theentertainmentbreakdown)
    —discuss
  4. Show HN: Rig – Open-source cloud desktops for AI agents(github.com/shadowwalker2014)
    —discuss
  5. Russian Cosmism(wikipedia.org)
    —discuss
  6. 'Palantir is a great company', EU defence chief tells Euronews(euronews.com)
    1comments
  7. JEV-Star: Low-Cost StarCraft II Control with Language-Model Planning(github.com/sc2musa)
    —discuss
  8. Run-assert-eval: Find the risk, fix it, prove it(commandline.microsoft.com)
    —discuss
  9. Digital Cash Payoff (2001)(technologyreview.com)
    —discuss
  10. Show HN: DrawCMS – An open-source animated diagramming tool for AI Agents(github.com/drawcms)
    —discuss
  11. Logs you, your AI and cron jobs write to that you can prove weren't altered(freshjots.com)
    —discuss
  12. Show HN: bananabread AI – Find what customers love and want from your products(bb-product-api-docs.web.app)
    —discuss
  13. GoDaddy receives takeover offer from maker of Norton antivirus software(ft.com)
    —discuss
  14. If you don't have the factories, you lose the expertise(lemire.me)
    —discuss
  15. Show HN: Headwire – WireGuard with NAT traversal via Tailscale's magicsock(github.com/brofranks)
    —discuss
  16. Namernut – domain name generator that scores how crowded a name is(namernut.com)
    —discuss
  17. Show HN: MEF LLM Studio(mef-llm-studio.com)
    —discuss
  18. Fragments: September 24(martinfowler.com)
    —discuss
  19. Double-entry bookkeeping and paper and tokens(pokorny.ca)
    —discuss
  20. Pummelvision Back(pummelvision.ai)
    —discuss
  21. Legal and General to Cut 10% of Jobs by Middle of 2027(wsj.com)
    —discuss
  22. Beware Overreliance on Metaphor(evnm.substack.com)
    —discuss
  23. AI Workers' Inquiry 2026(techworkersinquiry.org)
    —discuss
  24. .si domain registrations outpace .ai after Trump's 'Super Intelligence' rename(netcraft.com)
    —discuss
  25. Unmasking "zombie cells" in aging tissue with an AI-powered barcode(news.mit.edu)
    —discuss
  26. Weapons of Mass Decentralization Magazine(worksinprogress.co)
    —discuss
  27. Why Washington Governs by Fiscal Cliff(medium.com/freedomofthought)
    —discuss
  28. Forging 1024-bit RSA signatures in nearly SNFS time(iacr.org)
    —discuss
  29. The Chosen People(medium.com/freedomofthought)
    —discuss
  30. Show HN: OpenArcade – open-source software from the VR arcade I ran for 4 years(github.com/aprabh96)
    1comments

QR codes that route to the appropriate app store

17 pointsby 2h agomatthuggins.com
9 comments
1h agoHN ↗

Is this a whole blog post for a simple backend that just routes based on the User-Agent?

1h agoHN ↗

I thought it was something clever, but it shows as URL in QR Scanner, not an APP, which opens browser after activating it, then user would have to confirm redirect to App Store on empty page

TL;DR: it is HTTP redirect based on User-Agent header

1h agoHN ↗

it's just a server side redirect based on the user agent headers

1h agoHN ↗

Err wut... redirecting based on user agents?

1h agoHN ↗

I hate QR codes. I don't trust them.

1h agoHN ↗

For our apps Slyp and SlypBusiness, we had the same QR code for each app open Playstore/Appstore page of the app depending on the phone. Hopefully, we will start rolling out Slyp next week.

Just have a branded link (like https://slyp.app/Slyp or https://slyp.app/SlypBusiness) to the official web page and have the js in that page auto-redirect and open the original Playstore/Appstore page.

And yes, we used userAgent for identifying the platform.

If anyone is interested, here is the code. May not cover all edge cases but works for our usecase. The code was wrung together in a hurry a year ago.

    window.addEventListener('DOMContentLoaded', (event) => {
        let app = 'Slyp'

        var userAgent = navigator.userAgent.toLowerCase();
        if (userAgent.indexOf('android') > -1) {
          window.location.href = `https://play.google.com/store/apps/details?id=com.ndcurve.${app}`;
        } else if (userAgent.indexOf('iphone') > -1 || userAgent.indexOf('ipod') > -1 || userAgent.indexOf('ipad') > -1 || userAgent.indexOf('mac') > -1) {
              if (app === "Slyp")
                window.location.href = 'https://apps.apple.com/app/<app_id>';
              else if (app === "SlypBusiness")
                window.location.href = 'https://apps.apple.com/app/<app_id>';
              else
                window.location.href = 'https://slyp.app';
        } else {
          window.location.href = `https://play.google.com/store/apps/details?id=com.ndcurve.${app}`;
        }
    });
58m agoHN ↗

I agree with the other commenters that this is a pretty simple engineering problem, but I still enjoyed reading about edge cases the author worked to address (they could have taken the easy road with this but tried not to). I forgot that Safari on iPad doesn't specify iPad in user agent headers