I made a site Sup Forums

I made a site Sup Forums
4stats.io/

I posted a thread one month ago and ended up with some useful feedback and hints, which I tried to implement over time.
Normally posting in /wdg/, but since that general isn't really that active it's hard to get practical replies.

Still interested in anything you may have to say, whether it's about features, ui or other things.
Might do server-side-rendering in the future, but it would lack the continuous board updates.

Mods, hope this thread is ok.
Rules aren't exactly very clear, but I don't personally drop links to it outside of /wdg/ otherwise.

Other urls found in this thread:

github.com/Nocory/4stats-api/blob/master/README.md
4stats.moe/
github.com/Nocory/4stats-gatherer
github.com/Nocory/4stats-api
github.com/Nocory/4stats-client
a.4cdn.org/g/catalog.json
a.4cdn.org/g/thread/64397230.json
github.com/Sup
developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals
boards.4chancode.org/g/thread/64397230
twitter.com/NSFWRedditImage

bad time to make a thread I guess

/vip/ fukken dead LMAO

>Sup Forums is now more popular than Sup Forums and Sup Forums

Holy fuck. That legitimately surprises me.

nice. thanks

Hi OP, one feature I would really like to see if a breakdown by general of post/min

Because Sup Forums is objectively slower than /r9k/, I was kind of confused why it has a greater post per min

the reason is because some generals have crazy posting speeds

Could you make some metric which says how evenly spread that post speed is across threads? (possibly average number of posts per thread or something? Would that work, maybe not...)

Or maybe even just give the "general" post per min breakdown

>Sup Forums is now the most popular board

Thought about tracking generals, but don't know how you would do it reliably over time.
You can't just go by "/abc/" in the title, and from time to time some OP may create it differently or mess up.
>Because Sup Forums is objectively slower than /r9k/, I was kind of confused why it has a greater post per min
Slower when you ignore the generals? Maybe. The history just tracks the amount of posts of the whole board.

>Could you make some metric which says how evenly spread that post speed is across threads?
Actually attempted to do that like 2 days ago. I wanted to replace the image % stats with something like "post spread", which would indicate if posts are evenly spread across all the threads or mainly contained in some fewer larger threads.
But I was absolutely certain, that people would just be confused by it; and you can only put in so much of a description into the tooltip of the column.

Last time I linked the page there were regular posts asking what "activity" measured and how to enable/disable boards.

Actually OP, I know the perfect stat for what I am asking, and I don't even think it would be too hard to calculate:

can you provide the average time from thread creation to archival and the average time from last reply to archival?

For example, on /r9k/, the average time from last reply to archival is a little over an hour, while it is about three hours on Sup Forums because the posts are concentrated into the generals

looking at your site now, I think threads/hour may measure something similar, as you can see /r9k/ has more threads made per hour than Sup Forums, but the two I am recommending would also take post spread into account to some extent - boards with a more even post spread should have lower times until archival even if the threads/hour are the same

I am not keeping stats of individual threads right now.
>can you provide the average time from thread creation to archival
that would just be "hoursTillArchive = totalThreadCount / threadsPerHour"
>and the average time from last reply to archival?
That would also be the same for all threads, except those that reach bump limit.
And even in that case, generals often get a new thread way before they get moved to the archive.

Pic related is the very first version I had of the site, that listed the avg. age and some others, but also not exactly a good indicator.

Maybe just take the top 10th percentile of threads and see how their postsPerMinute compare to the average of the board.
Or maybe the other way around, see how many threads you need from the board at minimum to reach 50% of its postPerMinute.

forgot pic

>/x/ is more popular than /lgbt/
>spoopy more popular than poopy

Kek

In the previous thread someone asked if there was an API, though at that point all data was transferred via sockets.
Now updates are still streamed via a socket connection, but there are also API endpoints for boardstats, threads and history as well.

github.com/Nocory/4stats-api/blob/master/README.md

Just in case someone has ideas how else to utilize the data.
Probably not final though, since I am not sure how to best lay it out.

>Sup Forumsddit most popular board
This explains a lot

What does "activity now" mean, metrics wise?

That's sad.

nvm, didn't see the hovertext.

Sup Forums's most active thread is a lolicon thread lol

Sup Forums is the new Sup Forums, every newfags first board because of all the media exposure

Specifically the current post-rate relative to a boards 90th percentile of posts/minute over the last 4 weeks.
Even the occasional happening-spike shouldn't affect it much.

It's neat to check the activity of boards against each other to see at which time they are usually most active.
Sometimes it's because of countries, like /k/ being later due to americans, but with Sup Forums it's just people posting more at night I guess.

Is there a way to plot the board's all time activity since its insertion?

It needs an anime mascot and a .moe domain for extra Sup Forums points, otherwise good work. Are you planning to release code?

>Sup Forums and /biz/ that high
>Sup Forums not even in top 5
What has gone wrong?

4stats.moe/

Code is on github, but little to no documentation and comments, apart from the API repo.
github.com/Nocory/4stats-gatherer
github.com/Nocory/4stats-api
github.com/Nocory/4stats-client
no bully pls, I am no pro, but doing my best

previously the gatherer and API were one entity.
Split it up into two, so even if something happens to the API, the gatherer will keep on going.

Only started saving stats last year at the end of july.
And most the more NSFW-ish boards I only started to record end of october.

You could in theory go through various archives and check the post IDs of the past and from that reconstruct a history.
Don't know if I might do that or if it's even worth it.

I would understand your confusion if we were in 2014 or so. Sup Forums has had a massive population for a long time. I'm not so surprised /biz/ is huge now either thanks to the cryptoshit.

Not sure about code quality, but site works and that's what matters most.

>but site works and that's what matters most.
eh, I tried to keep everything fast and lean. Have no way of testing Safari though. If someone uses it you can let me know whether the thread thumbnails are working properly.

And unlike last time there seems to be no one from the JS-disabler crowd posting about how nothing loads.

Great site and very, very useful, but is it possible you can make it so it tracks the amount of unique IP addresses on the board at any given hour or day, and even further to the thread level to see how many of those IP addresses are shared between threads?

I have a suggestion, stupid, but I have one: use title="board_name" for the board list elements so that somebody can hover the cursor on them and read the full name of the board. just a refining thing

There is no way to get that info to my knowledge.
The only thing you can see is how many unique IPs have posted in an individual thread.

But that info isn't exposed on the catalog.
a.4cdn.org/g/catalog.json
You would need to query all the individual threads, which takes a lot longer, than just fetching a single catalog.
a.4cdn.org/g/thread/64397230.json (see unique_ips on the first entry)
Sup Forums API docs specify to only make 1 request per second. So lets say you only check the first 3 pages of each board, that would be 72 boards * 3 pages * ~15 threads = 3240 requests or 54 minutes.
Right now it's doing one full cycle in 5 minutes with one catalog every 4.17 seconds

Earlier when there were fewer boards I went through some threads and checked unique IP count, but even for so few boards it took ~15minutes.

see pic related or

Aw man, that sucks. That would been the most fascinating point for me.

Are the times displayed adjusted according to user timezone or is it set to Sup Forums time?

The time in the timeline should be your local timezone I think.
Check if the last hour entry is most recent xx:30 - 30 minutes.
So if it's 09:13, the last hour entry should be 08:00 for example.

reload the page
something like that?

you can see everything that's available here
github.com/Sup Forums/4chan-API
fairly nice, that there is even something in the first place
yeah /biz/ got insanely popular during the last 3 months even.
Sup Forums on the other hand is on a slight downward trend. Got a small push recently from the meltdown/spectre topic

...

>And unlike last time there seems to be no one from the JS-disabler crowd posting about how nothing loads.
that's cause if js is disabled it just says "muh javascript"

>he actually purchased the domain
great website m8
what do you think is going to happen when captcha dies

>I made a site Sup Forums

This isn't a website. It's a javascript application that runs in a browser.

You don't even have apostrophes escaped properly...

>Holy fuck. That legitimately surprises me.

It must be slower tonight, last time I checked it Sup Forums was twice as big as the 2nd biggest board, and Sup Forums was actually way down the list. Something like 5th or 6th or so. I'm surprised that right now it is the 2nd largest, considering that it was fragmented to /s4s/, Sup Forums, Sup Forums, /bant/, and /trash/.

speaking of which: /trash/, the furry board, is 8 times as popular as /aco/, the western cartoon porn board, and /aco/ is 2.5x as popular as /h/. /d/ sits beween /aco/ and /h/ oddly enough.

nice, have a bump

purchased both domains at the same time.
Before that I used chanstats.info for some duration.
>what do you think is going to happen when captcha dies
It's not affecting the stats-site if that's what you mean.
On Sup Forums itself, I don't know. Is there some info on what percent of people use the legacy captcha?

>tfw your screenshots spoiled a little SnK for me
thanks op, who would have thought i'd get spoilers in Sup Forums

developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals

>This isn't a website. It's a javascript application that runs in a browser.
fair point
I can try and come up with a server-rendered version, but a lot of functionality depends on JS, like the streaming in of updates and requesting active threads.
Wouln't be great to refresh the site for everything.
Like the other user said, there is nothing to escape. That syntax highlighter is incorrect.

I've suspected this for a while, I'm glad I have proof now

Why not use PHP with JS async?

Nice work user.

SnK is shit so it doesn't matter.

>pol top board
beautiful

nice, all the unsuspecting normies come in and get a massive dose of red pill

...

...

My PHP knowledge is minimal and I personally didn't like using it that much, when I tried it.
I already have a complete webpack build-setup for the page. Making it work with server side rendering or something like Nuxt.js instead would take too much time right now.

I am going to make a basic js-less version, that just renders the live stats list and nothing else.
When someone with JS disables loads the page it forwards them to noscript.4stats.io and shows them that.
Should at least be better than not showing anything useful at all.

could this be used to acquire some digits bruh

experimented with it, but think it's not a good idea and would ultimately only serve as a shitpost generator.

>Sup Forums on the other hand is on a slight downward trend
That's probably a good thing. Hopefully it increases and some of the Sup Forumstards and shills leave.

holy shit, never imagined the day Sup Forums falls down from top spot

Probably because /h/ is mostly useless. Hardly anyone faps to static hentai pictures and anyone who knows how to use ehentai's search doesn't need /h/ to spoonfeed them.

> shitpost generator
what? isn't that Sup Forums's purpose?

...

Hey user, you should make an API or an embed of some type that lets other Anons put certain board stats on their startpage

Trying to fake stats on /pol. Nice try Hilary.

see There is an API. Not sure if I should enable CORS for all hosts or not.
Currently allowed are ["localhost:3000", "4stats.io", "4stats.moe","null"]

"null" should allow it for requests from local files.

Your site is amazing! It's cool to see what boards are the most popular. How about a dark theme that looks like those ‘Stock ticker’ stock photos?

oh, it's ES2015.
Add a compatibility layer then so it works on older browsers.

No, Sup Forums is a place for intelligent discussions, and shitposting has been a bannable offense since 2012. Get with the times grandpa. And I'm not even being sarcastic here, this is actually the state of Sup Forums. Moot wanted this to be Facebook Anonymous. Of course, forcing discussions on a place that was built up from inane ramblings, means that you can have discussions, they are just not intelligent.

Also we should wordfilter shitposting to funposting, but that would require administration that actually gives a shit about Sup Forums.

add a column that shows how many posts get deleted/min

>expecting intelligent discussion here
too late already, the most popular board has 100 post per minute holy shit, basically Sup Forums is a streaming where the comment flies fast and nobody can see what is exactly happening

Want to add a light/dark mode toggle at some point.
Babel is set to target the last 2 versions of Firefox, Chrome, Safari, iOS and Edge.
Are you using an ESR?
How would you even check that reliably?

why's there only 4 active threads per board?

The number of active threads shown adjusts to the height of the board list. 4min 8max
Are you only getting 4 threads, even when all boards are enabled?

I has the best traps and blacked threads.

No I've disabled all but 7 boards. Figured it may be related, don't understand why though.

Can I just some JS in the dev tools console?

Sup Forums in 2013 was getting over 100 ppm most of the time.

source?

I've had a script somewhere that peels off posts with links and gives them to me.

Essentially for /biz/ I'd get a feed of information instead of shills and shitposts.

looks kinda retarded.
Could go fullwidth with 2 columns of threads maybe. Something to put in the options in the future.

quick solution.
localStorage.setItem("forceActiveThreadCount",8)
and reload the page

>too late already,

No, you misunderstand. I don't expect intelligent discussion here, I expect to find discussion that is completely devoid of any rules set by society or taste; the discussion you make when you know there are no repercussions as your posts disappear after hours; id unleashed with no barriers whatsoever. However, moot decided that he wants to be the next facebook, so he made this type of posting explicitly bannable and changed the thread limits so the boards are much slower.

You know how Sup Forums required a "generals" board? Nearly every damn board is a generals board today, threads can last weeks.

>where the comment flies fast and nobody can see what is exactly happening
Every single board was like that in the mid 00s, it was glorious. You didn't stay posting because you were addicted, but because you could genuinely miss something interesting if you didn't check all pages every ten minutes.

>Babel is set to target the last 2 versions of Firefox, Chrome, Safari, iOS and Edge.
>last 2 versions
>when browsers get a new version bi-weekly

So basically you don't support anything older than 1 month? I understand that you have to cut off support for deprecated old browsers, but this would make you a joke in even semi-professional web developer circles.

thanks

>a joke in even semi-professional web
so a joke of a joke then?

This reminds me.

Have anyone set up an alt site, that allows you to browse all of Sup Forums exactly as it is, but from a different domain? Like, set up "readchan.org" or something like that, and it would use the api to load all posts from Sup Forums in real time, as if you were browsing Sup Forums. Posting would obviously not work (or would it?).

Basically like a Sup Forums app, but hosted on a website.

>/trash/ is more popular than Sup Forums
KEK

>so a joke of a joke then?

A joke in the sense that if you submitted a website with this bad compatibility, then you wouldn't get paid by any client, and if you are not a freelancer web dev then you'd get fired from your job. I understand that this holds no sway over neets that post on Sup Forums all day, but consider that in the real world, people don't update browsers every week.

FF 56 came out September 28th
Chrome 62 on October 17th
All browsers are now generally auto-updating, I don't see the problem.
This isn't some online shop, where I would care about the share of IE11 users.
It's free and targets modern browsers, so take it or leave it.
I know of this site for example, that some user made.
boards.4chancode.org/g/thread/64397230

just make one locally

>my home board is slower than the horsefuckers

Shit

Nice job OP, from a technical point of view what's the architecture of your app? Like what did you use for server-side, how does the JS app get the update (ajax? Websocket?)?

Thank you in advance if you have the time to answer!

Sure, there are 3 parts. The Gatherer, the API and the Client.

The Gatherer is a Node server, that continuously fetches board catalogs from the public-Sup Forums-api.
It keeps a history of recent update-cycles, from which it takes the last hour to calculate most of the live board stats.
At set times it also calculates a new hour and day history-entry from those cycles, which are used for the timeline, avg.posts/day and activity %.
Everything is kept in memory, but for persistency all updates are written to a levelDB instance.
(I know it's key-value, but you can query and stream sorted key-ranges, which fit's really well, since all keys are made up of identifiers and unix timestamps. A key looks like [board,"hour",entryTime]. The only time the DB is actually read form is on server-startup.)

The API connects to the Gatherer via socket and gets streamed all new board-, thread- and history-updates.
In turn it also accepts socket connections from Clients, to which it forwards any board-stats updates right away.
It also has API endpoints for board-, thread- and history-stats.

The client is using Vue.js to render the view.
Board-stats updates are streamed in, but thread- and history-data is requested via ajax, either when a client clicks on a board in the list, or when the currently selected board receives an update via the socket, which indicates to the client, that an update to the threads should also be available. (no point streaming in threads and history, the client might never view)
The client knows how long threads and timeline data is valid, so switching between boards should make no unnecessary requests to the API.

I made the first version in order to learn React, but switched to Vue, which I am more familiar with, after working on it for a while
(was React)

The Gatherer and API were combined in one application previously, but separating the client-facing part seemed like a good idea.

>All browsers are now generally auto-updating, I don't see the problem.
Then you never ever had to fix anyone elses computer.

>It's free and targets modern browsers, so take it or leave it.
You'll never get anywhere in web development with that mind set.

/trash/ gets extra posts from whole threads being moved there by the mods

/mlp/ usually gets 8-10 PPM but it's slower now because of the hiatus.