Lurker News

Comments (167) 28 threads

6thbit6 replies#
From YC /legal

> Except as expressly authorized by Y Combinator, you agree not to modify, copy, frame, scrape, rent, lease, loan, sell, distribute or create derivative works based on the Site or the Site Content, in whole or in part
Not to pretend this isn't widely happening behind the curtains already, but coming from a "Show HN" seems daring.

Wowfunhappy3 replies#
I can't comment on what is legal, but I very much dislike the idea that my comments are the property of Y Combinator. I assume that by writing here, I am putting information out into the world for anyone to use as they wish.
stackghost1 reply#
HN/YC cares more about community aesthetics than your right to be forgotten.

Try to have your account and its contents deleted. The best I was offered for my 2011-vintage account was to randomize the username, and the reason I was given was that browsing and old thread with a bunch of deleted comments "looks bad".

Wowfunhappy3 replies#
I agree with this policy, deleting comments isn't fair to all the other people who replied to that comment. I don't see how this goes against what I said?

Continue this thread — 3 replies

hnfong#
AFAICT, you retain the copyrights to your comments, but YC has a license to essentially do whatever they want with them.

So, you could additionally give a license to the world to use your posted comments freely. That doesn't mean HN can't add terms to say clients can't copy the site as a condition for use.

YVoyiatzis#
Your comments, yes. But the contextual thread as a while, no.
tamnd1 reply#
@keepamovin thanks, your project was a big inspiration for this.

I built my own pipeline with a slightly different setup. I use Go to download and process the data, and update it every 5 minutes using the HN API, trying to stay within fair use. It is also easy to tweak if someone wants faster or slower updates.
One part I really like is the "dynamic" README on Hugging Face. It is generated automatically by the code and keeps updating as new commits come in, so you can just open it and quickly see the current state.
The code is still a bit messy right now (I open sourced it together with around 3.6M lines across 100+ other tools, hidden in a corner of GitHub, anyone interested can play Sherlock Holmes and find it :) ), but I will clean it up, and open source as clearer new repository and write a proper blog post explaining how it works.

keepamovin3 replies#
Wow tamnd that is lovely to hear. I’m so glad you told me it was an inspiration.

Your big download plus quick refreshes is smart. Is your Background in data/AI?
Because i don’t know much about huggingface beyond its a hub for that.

Continue this thread — 3 replies

admiralrohan#
Then why does the API is available for hackernews? If nothing is allowed to be copied legally. And why this post is approved as "Show HN" if it's illegal? Don't get the reasoning here.
krapp#
This site offers a public, non rate-limted API. IANAL but I'm reasonably certain that's authorization for anyone to use the data as long as they do so through the API. It certainly isn't the case that you need explicit legal permission to use Hacker News comment data in your project.

There have been tons of alternative frontends and projects using HN data over the years, posted to Show HN without an issue. I think their primary concern is interfering with the YCombinator brand itself. "the site" and "site content" referring to YCombinator and not HN specifically.

tamnd1 reply#
[Author here] The whole pipeline runs on a single ~$10/month VPS, but it can process hundreds of TB even with just 12GB RAM and a 200GB SSD.

The main reason I built this was to have HN data that is easy to query and always up to date, without needing to run your own pipeline first. There are also some interesting ideas in the pipeline, like what I call "auto-heal". Happy to share more if anyone is interested :)
A lot of the choices are trade-offs, as usual with data pipelines. I chose Parquet because it is columnar and compressed, so tools like DuckDB or Polars can read only the columns they need. This matters a lot as the dataset grows. I went with Hugging Face mainly because it is simple and already handles distribution and versioning. I can just push data as commits and get a built-in history without managing extra infrastructure (and, more conveniently, if you read the README, you can query it directly using Python or DuckDB).
The pipeline is incremental. Instead of rebuilding everything, it appends small batches every few minutes using the API. That keeps it fresh while staying cheap to run. The data is also partitioned by time, so queries do not need to scan the entire dataset (and I use very simple tech, just a Go binary running in a "screen" session, using only a few MB of RAM for the whole pipeline).

asalahli1 reply#
Where are you getting a ~$10/month VPS with 12GB RAM from?
tamnd#
https://contabo.com/en/vps/cloud-vps-20/ - $8/month, 6 vCPU, 12 GB RAM, 200 GB SSD (or Hetzner servers, which offer good hourly pricing).

In my ongoing project, with 10 servers like this, I could index the large part internet (about 10 billion pages) using vector and full-text search.

jiggawatts1 reply#
I could have used this just yesterday!

I've been evaluating Gemini Embedding 2 using Hacker News comments and I wasted half a day making a wrapper for the HN API to collect some sample data to play with.
In case anyone is curious:
- The ability to simply truncate the provided embedding to a prefix (and then renormalize) is useful because it lets users re-use the same (paid!) embedding API response for multiple indexes at different qualities.
- Traditional enterprise software vendors are struggling to keep up with the pace of AI development. Microsoft SQL Server for example can't store a 3072 element vector with 32-bit floats (because that would be 12 KB and the page size is only 8 KB). It supports bfloat16 but... the SQL client doesn't! Or Entity Framework. Or anything else.
- Holy cow everything is so slow compared to full text search! The model is deployed in only one US region, so from Australia the turnaround time is something like 900 milliseconds. Then the vector search over just a few thousand entries with DiskANN is another 600-800 ms! I guess search-as-you-type is out of the question for... a while.
- Speaking of slow, the first thing I had to do was write an asynchronous parallel bounded queue data processor utility class in C# that supports chunking of the input and rate limit retries. This feels like it ought to be baked into the standard library or at least the AI SDKs because it's pretty much mandatory if working with anything other than "hello world" scenarios.
- Gemini Embedding 2 has the headline feature of multi-modal input, but they forgot to implement anything other than "string" for their IEmbeddingGenerator abstraction when used with Microsoft libraries. I guess the next "Preview v0.0.3-alpha" version or whatever will include it.

jiggawatts2 replies#
Unless I'm missing something, this uses a simple synchronous for loop:

    for text in texts:
        key = (text, model)
        if key not in pickle_cache:
            pickle_cache[key] = openai_client.create_embedding(text, model=model)
        embeddings.append(pickle_cache[key])
    operations.save_pickle_cache(pickle_cache, pickle_path)
    return embeddings
At the throughput rates I was seeing of one embedding per second, a million comments would take over a week to process!

I had to call the Gemini model with ten comments at a time from eight threads to reach even the paltry 3K rpm rate limit they offer to "Tier 1" customers.
Based on this experience, for real "enterprise" customers I might implement a generic wrapper for Google's Batch API that could handle continuous streaming from a database, chunking it, uploading, and then in parallel checking the status of the pending jobs and streaming the results back into a database.

pjot1 reply#
Re-reading your comment :) Yes, my demo has just a simple loop when loading the embeddings.

I was replying more towards the latency you mentioned. Because duckdb runs on device, you save yourself the additional round trip network time when comparing similarities.

Continue this thread — 1 reply

vienneraphael1 reply#
Hey, idk if that helps but I developed something similar to the wrapper you're mentioning as an open-source python library.

Just plug any async function into the provided async context manager and you get Batch APIs in two lines of code with any existing framework you currently have: https://github.com/vienneraphael/batchling
Let me know if you have any questions, looking forward to having your feedback!

Continue this thread — 1 reply

0cf8612b2e1e1 reply#
Under the Known Limitations section

  deleted and dead are integers. They are stored as 0/1 rather than booleans.
Is there a technical reason to do this? You have the type right there.
albedoa2 replies#
By "to do this" do you mean to not use booleans? It's because the value does not represent a binary true or false but rather a means by which the item is deleted or dead. So not only would it not make sense semantically, it would break if a third means were introduced.
0cf8612b2e1e1 reply#
Funny, because the HackerNews API [0] does return booleans for those fields. That is, a state, not a type of deletion or death.

[0] https://github.com/HackerNews/API

mulmen2 replies#
The API documents this but from a spot check I'm not sure when you'd get a response with deleted: false. For non-deleted items the deleted: key is simply absent (null). I suppose the data model can assume this is a not-null field with a default value of false but that doesn't feel right to me. I might handle that case in cleaning but I wouldn't do it in the extract.

Continue this thread — 2 replies

endofreach1 reply#
> It's because the value does not represent a binary true or false but rather a means by which the item is deleted or dead.

"Deleted" and "dead" are separate columns.
> So not only would it not make sense semantically, it would break if a third means were introduced.
If that was the intention, it would seem like a bad design decision to me. And actually what you assume to be the reasoning, is exactly what should be avoided. Which makes it a bad thing.
This is a limitation not because of having the bool value be represented by an int (or rather "be presented as"), but because of the t y p e , being an integer.

albedoa#
> "Deleted" and "dead" are separate columns.

Yes, we know!
> If that was the intention, it would seem like a bad design decision to me. And actually what you assume to be the reasoning, is exactly what should be avoided. Which makes it a bad thing.
That is should be avoided is what makes it a bad thing? I am probably on board with the idea that it is bad design, I just don't know what reasoning you are referring to here. How would you design it?
> This is a limitation not because of having the bool value be represented by an int (or rather "be presented as"), but because of the t y p e , being an integer.
What bool value? As designed, it is an int. I'm sure that I am just missing what you are saying.

Load more comments