Show HN: Subth.ink – write something and see how many others wrote the same (subth.ink)
Hey HN, this is a small Haskell learning project that I wanted to share. It's just a website where you can see how many people write the exact same text as you (thought it was a fun idea).
It's built using Scotty, SQLite, Redis and Caddy. Currently it's running in a small DigitalOcean droplet (1 Gb RAM).
Using Haskell for web development (specifically with Scotty) was slightly easier than I thought, but still a relatively hard task compared to other languages. One of my main friction points was Haskell's multiple string-like types: String, Text (& lazy), ByteString (& lazy), and each library choosing to consume a different one amongst these. There is also a soft requirement to learn monad transformers (e.g. to understand what liftIO is doing) which made the initial development more difficult.
37 comments
[ 2.6 ms ] story [ 59.1 ms ] threadIf I could have it analyze my blog and then find people who have similar ideas that would be incredibly useful.
Neat!
Your thought's hash is: 06ad246627b5f973559a1dbcf2a6b96791d9b15ed2d8cb45c344f98b14d10f76 Including you, 1 person had that thought already! First time was less than a minute ago, last time was less than a minute ago.
haha, cool.
I noticed that the input is not being treated any way before hashing. I'd remove all non-letter characters, and then lowercase everything before hashing to help with some unnecessary misses.
It actually provides a simple curl command. Oh boy, this does open up a few more ideas. I feel like my wall of text -> link shortener / blog and all other comments on that wall of text being comments themselves might be implemented & this does open up to a lot of possibilities
I actually got a vps of like 8 gigs 4 cores 500 gigs ssd for 3 months prepaid and I snatched it during a recurring deal.
If you want, i can transfer it to you or share half the resources or similar to you if this project ever needs one.
One of the most interesting things is that this (unlike my idea which was just a "proof" if it was possible in a more complex environment) actually does make it simple and for normal devs to build upon
You are mentioning scotty, and I am not sure if you mention scuttlebutt the protocol or as if scotty is some haskell web framework (sorry don't know haskell)
What are your thoughts on scuttlebutt or (nanotimestamps), I have it open source under the MIT license for anyone to build on top of it with.
Your project's really polished and I admire it but I would hope that you can look more at the decentralization side of things because one of the ideas I had which never got to fruition was that adding on top of it, we can just have a social media similar to nostr but without the relay mess that nostr has in many instances (or so I have heard)
I am curious as to what are some use cases you are thinking of it as I'd love to know your opinion on it!
Have a nice day man!
"You are absolutely right!"
Well, at least we know claude didn't hit the API yet :)
curl -s https://www.cs.cmu.edu/~biglou/resources/bad-words.txt | tr -d '\r' | while read -r w; do curl -s -X POST https://subth.ink/api/thoughts -H 'Content-Type: application/json' -d "{\"contents\":\"$w\"}"; done
I typed "hello".
> Your thought's hash is: 4358f43b660389eecd435dc2a5f5cee29786245cd2cff27bd4de0b3e8fd53b79
> Including you, 267 persons had that thought already!
> First time was 4 hours, 14 minutes ago, last time was less than a minute ago.
Of course, everyone else has thought of this. But what if I "type": 4358f43b660389eecd435dc2a5f5cee29786245cd2cff27bd4de0b3e8fd53b79
> Your thought's hash is: c37d0a8c512b9ec7074d3bc77c4545d58fdfcde55bad89a70ede71ac2ac0000d
> Including you, 8 persons had that thought already!
> First time was 2 hours, 1 minute ago, last time was 1 minute ago.
That's hilarious!
And also, "typing": echo "hello world" | curl -d @- https://subth.ink
>Your thought's hash is: c5ba1c7e35345dbb8c2dc6be0972d0b6ddf6c6515143b64c057296948e2ba8cd
>Including you, 10 persons had that thought already!
>First time was 1 hour, 52 minutes ago, last time was 2 minutes ago.
Including you, 7 persons had that thought already!
"I am sad"
Including you, 9 persons had that thought already!