Hacker News new | past | comments | ask | show | jobs | submit login
Twitter x TikTok = Twiktwok (twiktwok.github.io)
378 points by 9nGQluzmnq3M 9 months ago | hide | past | favorite | 98 comments

This is truly the most advanced algorithm ever seen ;)


That's just the ouput cache of the algorithm's last run. The algorithm itself is pretty advanced and is run on the developers's biological neural net.

Love the term *biological neural net" Great way to say "still in the noggin"

Reminds me of the best no-bullshit algorithm:

  int getRandomNumber()
     return 4; // chosen by fair dice roll.
               // guaranteed to be random.

My favorite Dilbert of all time ;-)

Haha very funny, classic xkcd

So all of the content is manually uploaded to the repo?

I'd do that too but it would be cached and updated hourly. Why hit the Twitter api on each request?

You could set the app up to call the Twitter API but cache the response in memory or something like Redis so you don't need any background jobs/file management etc.

I've used memcached a lot but there's also benefits to caching a JavaScript file for an hour at a CDN and removing all load from that request.


Built by HNer galuggus, who mentioned this deep in another thread. Give him some karma:


Much appreciated. I'll be in this thread answering any questions. Bug reports and feedback very welcome. This app was made with help from Tanya of techtwox.com

When you swipe to next video, you have to unmute each time. I know that mobile browsers only allow muted videos to auto play but was wondering if you’ve thought about finding a way to make it so that you only have to unmute the first video.

I know that this is possible to do, because for example YouTube is able to do that in mobile browsers. I don’t know how they do it, but for example if you open this link in a mobile browser and unmute it and allow auto play to continue to next video after it then notice that the next video is unmuted as well.


I guess it might be that they reuse the same player element that was unmuted or something like that.

I think it would be possible to achieve something similar even with multiple player elements by doing something clever.

I removed this feature for compatibility reasons.

I think there are ways to do it but I couldn't get it to work. I believe chrome makes exception to this rule for big trusted websites like YouTube

Is there any algorithms involved, or is it just ranked the same for everyone, and ordered by most ranks?

At the moment it's just the same for everyone.

FYI- To encourage more organic “karma” , votes that are cast from people who accessed direct links aren’t counted

HN always surprises me with little measures like this one.

Reddit has (and always had) this and many more. It's all part of their extensive anti-abuse system. For example if you go to someone's profile and downvote all their comments, that probably won't work. If you link your post on chat and tell them to go upvote you, won't work either. There's many more of these, and most of them look like they work but behind the scene reddit takes it all into consideration and knows people trying to game the system.

I don't follow your meaning. Could you explain more?

It sounds like he's saying that depending on the Referer header for a loaded comments section, HN may or may not generate upvote buttons that are duds.

Looks like there's an auth parameter in the upvote GET request, so sounds entirely plausible.

Upvotes from direct links don't count. It's an anti-spam technique.

You mean on product hunt?

I think it means when coming to this page directly vs getting to it by clicking the link on the HN homepage.

This is pretty cool. Well done galuggus.

This really makes you appreciate how much higher quality TikTok videos are than Twitter! (no account/app needed-- https://www.tiktok.com/foryou )

Unfortunately that makes me download the app. Firefox for iOS

For me it’s only the banner prompt at the bottom of the page.

Unfortunately that doesn't work with web archive

I just got an endless stream of incredibly boring garbage. Gave the algorithm some feedback to tune it to my interests, but there's nothing there for me. I guess now I know what the fuss is about though.

I meant in terms of video bitrate-- regarding content, the default feed is unlikely to appeal to working professionals, but it does tune itself rather effectively when fed preference data. I have no idea if it will do personalization from the web site.

You're an intellectual

Slightly related but some Redditor "created a NSFW TikTok clone, with just portait-mode porn gifs, some with sound. (works best on mobile)":


These are neat, but in my mind, TikTok is far more about the ForYou algorithm than the fact that it's a scrolling feed of videos. The latter is fairly easy to do, as showcased by this very thread. Any decent engineer can throw together a demo like this fairly easily. TikTok's huge success though seems to be due to how good it is at predicting what people will like, which is something that even Youtube struggles to sometimes. Of course predicting 10s videos is much easier than predicting 5m videos.

The algo has been failing pretty bad; "hide videos from this user" does not work anymore, i suspect it can only deal with a limited number of ignores. Last summer I did an experiment, tapping "not interested" on any food-related video (I was on a diet) and yet i kept being shown food videos.

The former issue may be intentional. I've seen many recommendation algos not quite letting users shoot themselves in the foot. It's like how if you subscribe to 1000 channels on Youtube, it'll start only showing you the videos you actually watch instead of all the videos.

The latter is strange, but generally for me it has worked pretty well, without even needing to rely too much on "not interested". For example, in March I started playing Animal Crossing, and a week later my feed was 50% ACNH content. Then I stopped playing around May, and a few weeks later, I was quickly down to maybe 1 a day and now I'm at 1 a week maybe.

That being said, I like and share videos frequently, so that may be a good signal of what I'm currently interested in to the app.

Microsoft x TikTok = Bing Bong

Clippy clop

This is pretty cool, I like the aspect of simply watching videos. I think I made it to the end of videos though, not sure if this was intentional or if you want to continue to paginate videos forever lol. Appreciate your idea and work, keep chugging!

Thanks, your encouragement is appreciated

I don't have a tiktok nor a twitter, but somehow I sincerely enjoyed consuming this, nice work!

Thanks. I'll put it on product hunt tomorrow

Does product hunt help at all? What's the objective and audience in posting there? Genuinely curious.

mostly a circlejrk with other hunters fake reviewing a product they haven't used and half of these things will be dead in a year. everything about PH screams fake.

Half? Extremely generous

I think the audience there will like it

Neat idea! Bummed I can't use a scroll wheel; dragging with a mouse to emulate touch is not my favorite thing.

Cool overall though

Wow, it didn't even occur to me to try dragging with a mouse. I'm on a touchscreen laptop and when touching-and-dragging didn't work (only moved the videos a little bit, but not enough to go to the next one), I just assumed it was mobile-only.

Adding this feature. This is still a work in progress.

Can the sound selection persist between videos? i.e if I turn it on for one video, I'd expect it would be on for the next video.

Great stuff!

I had to remove this feature to get it to work on safari. Apple hates autoplay sound. (which as a user is overall a good thing)

As long as you do it as part of a user gesture it should work. Make sure the actual play() is called from within the context of a touch/mouse event, that should be enough.


It would still be nice if users can enable sound for all videos with one click. Currently you have to enable sound on each individual video.

Added this feature you can now use arrow keys or the mouse wheel

Doesn't seem to work at all in Firefox mobile but conceptually sounds fun, best of luck!

Firefox desktop also is completely busted. Would have loved to see it!

Sorry about that here is a video:


Will make Firefox compatibility a priority

Oh wow! Awesome!!!

Really great work! It looks and feels super polished.

How long did this take?

What was the most difficult aspect?

What do you intend to do next?

It didn't take too long once I sat down and worked on it. I had the initial idea about a year ago but didn't coding on it til recently.

The hardest part was solving compatibility issues(still a wip) and not overcomplicating things.

Next is a product hunt launch tomorrow

And starting a kindle recycling non profit rekindlereading.org (very early website)

Has it hit an API limit or something? I just get the tweet text but no video. Screenshot: https://imgur.com/a/6TZTFkJ in Safari iOS

Edit: reloaded without content blockers and it worked! :)

OP just wanted to advertise his woofer cushion :)

Note, you need to disable tracking protection for this page in Firefox.

Also, how to move to the next video? I'm on desktop.

Ahh thanks, I was wondering why I don't see anything. Not really willing to disable that.

Click and drag

This could be a real product if it sourced from specific clusters. For example, NBA Twitter.

Interesting idea

I like the path[1] when you've reached the final Destination (or the end of Twitter)

[1] https://twiktwok.github.io/test2.html

This is a simple way of showing Twitter where they missed out.

Fails in Firefox 79, works in Chrome 84. https://i.imgur.com/gLMnGrZ.jpg

Thanks for the feedback. It's still a buggy work on progress.Will add that to my to do list

weird, works fine on firefox 78 (haven't updated yet)

I don't get it .. why am I getting the same videos for the last 4 times I've viewed this thing??? Anyone else experience that?

Please bind mousewheel and arrow keys, thanks.

Thanks for the feedback. On the todo list


Read the repository on Github. I like it; keep expanding the source code, this could be the next concept one day!

I was watching this on my ipad pro and every videos was muted by default. Had to click to unmute on each of em’

Cool, please add keyboard controls. Really addictive idea but swiping on a laptop isn't fun


It would be cool if this was made into an actual app so scrolling would work properly

What device did you view it on?

Didn't Twitter acquire Vine at some point? Whatever happened with all of that.

It would be nice if the links are clickable and a randomized order of videos.

You are right. This is an early version. Thanks for the feedback. I would have liked to post it to showhn on Monday when I had cleaned it up a bit but fate took it out of my hands.

What did fate do?

Somebody posted it to hn

Amazing work!

What was the hardest part of making this?

Nothing is swipeable here.

Click and drag

Thanks, I never would have tried that...

Thanks for the feedback... Just updated the app so you can now use arrow keys or mousewheel on desktop

Now on Producthunt.com

Reminds of a similar HN mobile reader with infinite scrolling I did last week.


It tries to extract the main articles image and shows you a cat if it fails

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact