A "Prime" View of HN

(dosaygo-studio.github.io)

25 points | by keepamovin 1 hour ago

7 comments

  • keepamovin 1 hour ago
    Thanks for the front page! This "web art" project views HN through primes, not time or score.

    Tech: BigQuery dataset -> Node.js ETL -> 2.7M prime items packed into sharded SQLite (~500MB) -> queried client-side via sqlite3.wasm. No server.

    Fun discoveries while building this:

    - Only 7 Mersenne primes and 5 Fermat primes exist in HN's entire range

    - Exactly 781 palindromic prime (but only ~760 in HN because some of those primes must not have items, unknown why), largest being ID 9,989,899. Why so few? Even-digit palindromes are always divisible by 11, so palindromic primes can only have odd digit counts (1,3,5,7 digits). We've captured ALL palindromic prime HN items that will ever exist until HN IDs hit 100M+!

    The ζ logo = Riemann Zeta function, deeply tied to prime distribution.

    "Live Mode": The last page fetches from the live HN API and mines primes client-side, bridging the static past to the live present.

    Source: https://github.com/DOSAYGO-STUDIO/prime-news

    CloudFlare Static mirror: https://falling-king-6f50.cris7fe.workers.dev

    Why? I wanted to create a mirror of Hacker News that ignores time and popularity, and organizes the history of the tech industry purely by mathematical property. A way to explore the ancient and long history of HN through a filter that might surface interesting things. Hope you enjoy the beige!

    • omoikane 39 minutes ago
      Does it fetch the whole database and filter the results on client side? Because it seems like it would download 54 sqlite shards to show the few entries available for Mersenne and Fermat primes. It costs 40+ seconds of time and ~172MB of bandwidth. A cheaper option might be to generate the prime numbers first and then just fetch the shards it needs.

      Other than that, I thought it was an interesting way of sampling the news as the time delta grow further apart between each item.

      • keepamovin 34 minutes ago
        Yes, I agree there's probably a better way for the Mersenne and Fermat. And even the Germain we probably don't need to scan every shard for just the first page of them. Good points! And good idea to invert the lookup.

        Thank you for the comment on interestingness. I thought so to, but I didn't realize it in same way you did in your observation that it gets more selective over time - I like that, in a sense that's kind of natural as the environment is more competitive over time. Thank you for the interesting idea!

        edit: Your ideas are implemented!

    • delichon 58 minutes ago
      Why?
  • smlacy 1 hour ago
    I don't get it. What am I looking at?
    • ramon156 1 hour ago
      > The idea was to deconstruct Hacker News and view it through a different lens -- not time or score, but the fundamental, dynamic of prime numbers.

      Even after this comment I did not get it until I checked the repo[0]. It seems like it's only posts with a prime number ID

      Also, the "Why?" does not explain why. It's a what/how.

      [0]: https://github.com/DOSAYGO-STUDIO/prime-news

      • ggggffggggg 1 hour ago
        > It's "useless", perhaps, but I find it fun!

        Reason enough I’d say.

    • jtanderson 1 hour ago
      The documentation is here: https://github.com/DOSAYGO-STUDIO/prime-news

      Basically only HN items with prime IDs and with filters on different classes of primes.

    • d-lisp 1 hour ago
      Post investigation, I can say that it shows in an ordered manner hackernews posts whose IDs are prime.

      No ?

  • thih9 41 minutes ago
    Last page with most recent content is, at the moment: https://dosaygo-studio.github.io/prime-news/index.html?p=931...
  • hk__2 1 hour ago
  • lapcat 50 minutes ago
    Shouldn't this be a Show HN post?

    And how many of these self-promoting fake HN mockups do we need from the same person? https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...

  • metabagel 55 minutes ago
    What is a “prime” ID?
    • beardyw 42 minutes ago
      Every post and submission has a unique numeric id. Check the URL. Prime refers to prime numbers
  • varispeed 1 hour ago
    Finally a website with prime content.