Show HN: Subth.ink – write something and see how many others wrote the same
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.
NitpickLawyer|1 month ago
"You are absolutely right!"
Well, at least we know claude didn't hit the API yet :)
lumirth|1 month ago
Neat!
NewJazz|1 month ago
unknown|1 month ago
[deleted]
away0g|1 month ago
susam|1 month ago
Y_Y|1 month ago
castalian|1 month ago
the nword
donbale|1 month ago
sonnig|1 month ago
Apreche|1 month ago
If I could have it analyze my blog and then find people who have similar ideas that would be incredibly useful.
Imustaskforhelp|1 month ago
Bao allows us to have a common hash for the first n contents of the term and then they can still have common hash so you can just loop it over each continuous word to see how much commonly (long?) their hash is and the length becomes the amount similar
Some issue might come where if the word changes in the start and the rest is similar but I feel like bao could/does support that as well. My information on bao is pretty rusty (get the pun? It's written in rust) but I am sure that this idea is technically possible & I hope someone experienced in the field could tell more about it
https://github.com/oconnor663/bao, Oconnor's bao's video or documentaries on youtube are so good, worth a watch & worth a star (though they do mention that its a little less formally cryptographically solved iirc but its still pretty robust imo)
sonnig|1 month ago
Edit: any other "quick hacks" to increase the number of collisions are welcome :)
nathan_compton|1 month ago
stogot|1 month ago
tetris11|1 month ago
pvdebbe|1 month ago
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.
wellpast|1 month ago
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
abnry|1 month ago
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.
throwaway89201|1 month ago
This makes little sense. Recovering a random preimage of an MD5 hash is marginally easier [1] than a (128-bit truncated) SHA256 hash, but this won't recover any sensible message.
Recovering a sensible (short) message is equally hard for both hashes.
[1] https://link.springer.com/chapter/10.1007/978-3-642-01001-9_...
nullchan|1 month ago
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.
patapong|1 month ago
unknown|1 month ago
[deleted]
throwawoy|1 month ago
- #5 6f18270a4ed02a134851520202a104a33721423c35b7f5421e0081ec732793b1 - sex
- #6 8ababd402810b2a412142dcc71ea3083ccbab886c48a48948d286eee161c72ad - hash of fedb9943d8c4c51392815a187ce4ba732c539038fd28b4bda8543e4616d767c1
- #7 4ef69019c65909ffbb470597e3c5afe05ea8a866a0d3b9f950f0bcf057924b52 - hello world
- #10 dad6326d44d6f94c5668be9e5a5b762415fc2a3097d47742a7cf62d37e5e8287 - hash of 8ababd402810b2a412142dcc71ea3083ccbab886c48a48948d286eee161c72ad
The first one is probably brute force by a single person since it is at a round 10,000.
Dilettante_|1 month ago
g105b|1 month ago
jjpones|1 month ago
vlfig|1 month ago
Paracompact|1 month ago
Including you, 7 persons had that thought already!
"I am sad"
Including you, 9 persons had that thought already!
SwiftyBug|1 month ago
purrcat259|1 month ago
JoshTriplett|1 month ago
Imustaskforhelp|1 month ago
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!
moontear|1 month ago
joeframbach|1 month ago
sonnig|1 month ago
unknown|1 month ago
[deleted]
internet_points|1 month ago
Rygian|1 month ago
flufluflufluffy|1 month ago
eigenblake|1 month ago
IamDaedalus|1 month ago
silcoon|1 month ago
ta988|1 month ago
metatronzero|1 month ago
lol
unknown|1 month ago
[deleted]
MuddyTortoise|1 month ago
[deleted]
Imustaskforhelp|1 month ago
[deleted]
poly2it|1 month ago
Clark3232|1 month ago
[deleted]
Jana3|1 month ago
[deleted]