I Made a Self-Quoting Tweet
oisinmoran.com
oisinmoran.com
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.
I find this bug more interesting:
> Also, it seems like Twitter doesn't actually care about the username and just resolves URLs based on the tweet ID. I'm sure lots of people already knew that but it's new to me.
They’re not validating the parent directory matches the actual tweet. I wonder if that’s an actual bug or intentional to allow for handle renaming to not break existing links.
Yeah, it's what they created Snowflake for.
https://blog.twitter.com/engineering/en_us/a/2010/announcing...
Commenter
>what's really amazing is that twitter programmers thought about this edge case and made sure the tweet would not display itself
Twitter Engineer
>We didn't think of this edge case. Someone did this about 7 years ago and the recursive hydration would make a tweet service crash by simply loading the tweet in a browser. It took a principal engineer an entire day of wading through heap dumps to figure out what was happening.
Anyone here actually do this? I read about it in Release It and it sounds by far like the closest thing there is to a super power when it comes to solving production incidents. I've never actually seen anyone do it though.
Recently saw a video on this technique from Dotnet Conf. Piqued my curiosity again, and now this. I've really gotta learn this.
I noticed EC2 now has an API to get memory dumps. Theoretically you could automate collecting memory dumps when an unhealthy instance is pulled out of a load balancer. Then some automated analysis could happen, and allow further manual analysis.
The call chain went through GTKWebkit, Wayland and all the way to Pango and Cairo. Getting that part untangled took a long afternoon. Figuring out the root cause was another two full days.
The topmost parts of the stack above could be dealt with breakpoints, but even with pango/cairo libs from a debug build it was painful. The failing function could only be single-stepped, trying to place breakpoints inside it would not work. In the end it was an unhandled divide-by-zero deep inside the rendering library.
ß: story for another time.
Actually, it exactly is! Now I'm not sure if you were /s or not.
For the code that implements basic state and invariant checks (ie ships with asserts compiled in), crashes are usually exceedingly rare and limited to one of these checks failing. Debugging them requires a stack trace and, optionally, some context related to the check itself. If the program dumps this info on crash, the fix can typically be made in less time it takes to retrieve/receive the coredump and start looking at it. If it can't be fixed this way, then it's to the coredump we go.
On the other hand if the code is prone to segfaulting on a whim, requiring dissecting its state to trace the cause down, then, yeah, it's a coredump case too. But a code like that shouldn't be running in production to begin with.
So that's, roughly, what the F is.
https://channel9.msdn.com/Events/dotnetConf/2020/Analyzing-M...
I found another one where more detail is gone into on how to script WinDbg to have breakpoints that run code to do stuff. Sounds pretty powerful.
i.e. The FriendsList service hydrates each friend object with a list of friends you have in common
Edit: child comments are correct and I regret my oversight
1: https://www.researchgate.net/figure/A-diamond-shaped-DAG_fig...
Edit: is this an example? https://stackoverflow.com/a/1757915
Turns out that a bunch of news reading software didn't like this and crashed when it tried to load that newsgroup.
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.
That said, it can often be hard to fully pinpoint the actual inception of an idea and just thinking about this one yesterday I realised that the idea likely came up while traversing a long chain of quote tweets. I really appreciate the feedback though—it's especially useful as I'm only starting to publish regularly now so have lots to learn—so thanks again.
I'm in the former camp, and enjoyed your writeup quite a bit.
The latter camp will reliably show up when writing is any more long-winded than it absolutely must be, and will a) summarize (good) and b) complain (annoying).
It is what it is. Congrats on your whimsical creation!
> Fundamentally the challenge is just correctly guessing what ID a given tweet is going to get, then appending that onto the URL for our profile and tweeting it.
And of course, the strong conclusion at the bottom is the Tweet itself.
The ultimate solution that will probably happen at some point is a kind of collapsable/expandable explanation that takes your knowledge into account and can omit the bits you are overly familiar with. One of the difficulties with this would be adoption from the creators so it needs to not have too much overhead—writing is already difficult enough.
HN, 1950s edition: "Look, Mr Tolkien, what I want to know is does the ring go in the mountain? Why do I have to read about this journey?"
The only reason I posted the tweet was because the lede was well and truly buried at the end of the article, and you may have lost some readers’ interest by the time they get there.
You could have started with something like “This is how I managed to post a self referential tweet [link]” which would both bring it up front and centre, as a means to entice readers to find out more.
Sort of like how some TV episodes begin with “[record scratch] You may wonder how I ended up here...” – deadpool is a movie that begins in that way, for example.
For really long posts you might want to have a kind of table of contents that sets up the structure which you can link to parts.
Anyway, don’t take my abbreviated summary as negative; I enjoyed it.
> This is not available to you
> This Tweet is unavailable.
But perhaps they are just talking about the actual tweet.
Anyone at Twitter here that can give an indication of where this is on the roadmap?
"This is not available to you." is something different from "This Tweet is unavailable."
The parent and grandparent are speculating because it works for them but not for others here.
https://twitter.com/mauritscorneIis/status/12668346972560875...
Do you think a 3-cycle is doable?
3-cycle is definitely doable, it may take a week posting 100 tweets per hour or something like that. The biggest problem is twitter blocking the account (even when you stay under the API rate limit).
Code is here if you are interested, I ran it using GitHub Actions: https://github.com/pomber/conway
I implemented a .NET port of Snowflake where I work--being able to work with data without ever having to worry about an identity column is extremely freeing.
[0] https://github.com/twitter-archive/snowflake/blob/snowflake-...
[1] https://github.com/twitter-archive/snowflake/commit/ba2e67ea...
Seems like there's a cycle-3 game of life creature called a pulsar that would be perfect for this: https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life#/media...
Previously (2009): https://twitter.com/selfrefer/status/3128391843 https://twitter.com/spoonhenge/status/2878871344 https://news.ycombinator.com/item?id=743144
(last 2 were self-referential at the time, but then twitter changed the rules for linking; I recalled seeing these at the time)
Thanks for these omoikane and bazzargh (and the others both here and on Twitter), I'll have to add an addendum to the blog post with links to all the other fun related examples.
I don't know of a better way to do this other than some analysis of the IDs + clever bruteforce. If I remember correctly, I used just over 500 tweets to do it.
Would be interesting to do something with actuarial tables here.
I did consult actuarial tables mainly to decide how many of each age to include. With that few candidates, it wasn't wise to focus on people in their 20s and 30s obviously because it's very likely all of them would have survived.
A few more details here: http://jere.in/i-predicted-23-celebrity-deaths-in-2017-then-...
We also determined ID assignment was determined by three servers in a round robin load balancer and load was distributed based on modding of a 32 bit integer, so two servers were getting more load than the other since you can’t evenly divide a 32 bit integer by 3. They fixed that bug after a couple months of observation. I forget if we let Twitter know or not.
I love stuff like this.
Reminds me of that program for referring to a future git commit, which operates on the same principle: iterate through guesses of the future commit’s hash prefix until you have a (long enough prefix-)collision.
[1] https://en.wikipedia.org/wiki/Kleene%27s_recursion_theorem
I agree.
Another cool theorem related to the halting problem is the Rice theorem, because it's a really powerful thing to say that every semantic property on programs is either 1. always true 2. always false, or 3. undecidable.
It's an absolutely uncompromising theorem.
Very cool that you were able to achieve this. I'd thought it was impossible while using the original method given how many more tweets there are now then in 2009.
The hardcoded ID in your code was added after it was generated just before deleting everything else, right? Otherwise I'm stumped.
Although the self-drawing hands are probably more apt for this even more Escher themed one that I've since been made aware of from the author in the comments here: https://twitter.com/mauritscorneIis/status/12668346972560875...
Only one of the two shows, as expected it only shows if the ID of the quoted tweet is smaller than that of the tweet itself.
This also means that in general, you can't quote a non-existing future tweet hoping it'll be something cool in the future. Well you can but the preview won't work.
[0] I had to first check that you were referring to the main tweet and not this post because I actually posted this on HN yesterday to crickets so was happily surprised to find it re-upped today and so undeservedly close to the AlphaFold news.
Just makes your tweet look even more "1337".
/s
https://twitter.com/quinetweet/status/1309684114073808896
https://twitter.com/gzhdigital/status/1309684114073808896
https://twitter.com/donkeytron200000/status/1309684114073808...