Live data from Hacker News

I Made a Self-Quoting Tweet

oisinmoran.com

21–30 of 145 posts

Re: I Made a Self-Quoting Tweet

#21
post #5

> And for anyone at Twitter who was depending on the network of tweets being a Directed Acyclic Graph, I'm so terribly sorry. I love the idea that there's someone out there with code that resolves retweet chains recursively, who's about to be in for a great head scratcher of a bug.

Recursion isn't the problem. Not keeping track of seen tweets is the problem. Recursion can be used to detect cycles and traverse a cyclic graph in a way that doesn't blow up.

But you wouldn’t do that if your assumption is that the graph doesn’t cycle.

Edit: child comments are correct and I regret my oversight

Re: I Made a Self-Quoting Tweet

#22
post #17

To save people some time, here’s the tweet: https://twitter.com/quinetweet/status/1309951041321013248 In essence, the approach was: * Find out what the tweet id is of a recent tweet * Find out what a tweet is shortly after * Estimate the rate of new tweets appearing * Publish a tweet with a reference to a tweet with a now+guess id The write up is well done and interesting but a little long winded.

I'm seeing this:

> This is not available to you

Re: I Made a Self-Quoting Tweet

#23

Earlier quoted context omitted.

Recursion isn't the problem. Not keeping track of seen tweets is the problem. Recursion can be used to detect cycles and traverse a cyclic graph in a way that doesn't blow up.

But you wouldn’t do that if your assumption is that the graph doesn’t cycle. Edit: child comments are correct and I regret my oversight

For traversing a DAG you probably still would to avoid exploring an exponential number of paths (consider a chain of diamonds [1]).

1: https://www.researchgate.net/figure/A-diamond-shaped-DAG_fig...

Re: I Made a Self-Quoting Tweet

#24
post #17

To save people some time, here’s the tweet: https://twitter.com/quinetweet/status/1309951041321013248 In essence, the approach was: * Find out what the tweet id is of a recent tweet * Find out what a tweet is shortly after * Estimate the rate of new tweets appearing * Publish a tweet with a reference to a tweet with a now+guess id The write up is well done and interesting but a little long winded.

I'm seeing this: > This is not available to you

That's a common Twitter bug, just try again a few times.

Re: I Made a Self-Quoting Tweet

#26
post #23

Earlier quoted context omitted.

But you wouldn’t do that if your assumption is that the graph doesn’t cycle. Edit: child comments are correct and I regret my oversight

For traversing a DAG you probably still would to avoid exploring an exponential number of paths (consider a chain of diamonds [1]). 1: https://www.researchgate.net/figure/A-diamond-shaped-DAG_fig...

It’s a lot easier to just have a depth limit on such non-cyclic graphs than keep an in-memory list of previously seen nodes. its interesting for sure! but a much rarer edge-case imo

Re: I Made a Self-Quoting Tweet

#28
post #23

Earlier quoted context omitted.

But you wouldn’t do that if your assumption is that the graph doesn’t cycle. Edit: child comments are correct and I regret my oversight

For traversing a DAG you probably still would to avoid exploring an exponential number of paths (consider a chain of diamonds [1]). 1: https://www.researchgate.net/figure/A-diamond-shaped-DAG_fig...

But a diamond cannot occur in a Twitter-reply graph, right? It would require a Tweet to be able to reply to more than one tweet.
Post reply on HN