[ home ] [ pony / townhall / rp / canterlot / rules ] [ arch ]

/canterlot/ - Canterlot

Site related staff board
Password (For file deletion.)

[Return][Go to bottom]


File: 1541554886065.gif (451.96 KB, 325x164, 325:164, giphy.gif) ImgOps Google





File: 1541596161011.gif (61.22 KB, 720x720, 1:1, pinkamena_clap.gif) ImgOps Google

Jesus...  each thread is its own json?  That's horrific.

Back in 2009, I decided to start making my own forum system from scratch.  The very first version I created used separate .sav (essentially json) files for each thread, forum, etc.  Within a few months of experimentation, I scrapped the entire system and replaced it with a consolidated SQL database.  ...  This imageboard has the same structure as that shitty first-pass attempt using .sav files.  This structure is completely incompatible with many of the optimizations I was hoping to make.  so...  int(1) it is!

but thankfully the image management isn't anywhere near as bad as you made it out to be when first describing it.


>Jesus...  each thread is its own json?  That's horrific.
Not just that. If Ponyville's code is anything like Ponychan's (since they both use Tinyboard as a base), each board is stored in a separate table. I don't know why, it doesn't make sense.
SQL is a horrible ugly beast, but it's everywhere.


>>2541  I told Thorax, consolidating the boards into a single table was one of my first goals, but it's impossible since the board structure is determined in part by the folders & jsons.  It's TERRIBLY designed.  SQL on its own would be fantastic.  This hybrid frankenstein's monster is complete BS.


I meant SQL itself is a horrible ugly beast, not TinyBoard's design.
>the board structure is determined in part by the folders & jsons.
Ponychan has /api.php which provides dynamic JSON for all of the boards, catalogs, and threads based on GET variables. It might not be too difficult to modify the individual JSON file generation code to something like that.


>>2543  I find SQL to be quite elegant.  You can make it do some amazing things.
As far as I'm concerned, the jsons shouldn't even exist.  100% of the json information should be contained within the sql database and nowhere else.


Oh wait, I guess I misunderstood. The JSON API is (or should be) solely for client usage, not for anything server-side.
SQL in some ways is nice but doing more advanced things like making functions/routines and stuff like that is about as much fun as pulling teeth.


>>2545  oh?  that wasn't the impression I got, but I'm new to js.  what role do they have client-side?
If the database itself were setup in a more meaningful way, it wouldn't be so bad.  There is a distinct lack of useful keys and cross referencing.


On Ponychan it can be used for things like apps (like Flutter). My bot also uses it for fetching posts and thread info.


>>2547  :dash7:  Generating metadata on a thread-by-thread basis seems like a very inefficient way of doing things.



>>2549  See, that actually makes sense.


File: 1541613328125.png (519.42 KB, 720x539, 720:539, WHAT HAS SCIENCE DONE.png) ImgOps Google

That's a lot of JSON files.


>>2551  I know! ....son  :d


File: 1541613781314.png (156.34 KB, 334x374, 167:187, 1403442130490.png) ImgOps Google

By the way, I didn't know you're a programmer. That's pretty cool.


>>2553  it's been a hobby of mine since middle school, though I did end up applying it to some school-related work that ultimately went nowhere.  haven't done very much lately, though, since I decided to cut costs and shut down my home servers.  last thing I did was a Paradox Interactive programming challenge, which (despite my A* system being quite functional) failed to give the proper answer to their test case.  :fluf6:


Ah, the dreaded "works on my machine" situation.


>>2557  yep!


File: 1541615519432.jpg (2.04 MB, 1668x2880, 139:240, 20181107_102750.jpg) ImgOps Exif Google

> since I decided to cut costs and shut down my home servers
I actually have my own home server, though it isn't anything fancy like a blade server or a rack server. It's a generic desktop computer that was considered economy-class when it was first put out...in 2005.


>>2559  woo!  this is similar to the few I had running back in like...  2012.  The last two I had running were C2Ds.  Basically as I refurbished machines, I'd pull the best ones and use them myself.
but I wasn't doing anything with them, no one was using them, they were heating my living room and running up my cooling costs, so I shut them down.
I do have a rack, but I ended up scrapping the blades that I got with it, so I just use it as a rolling desktop and projector cart.


Did they not have decent fans/heat sinks?


>>2561  the C2Ds?  they cooled fine, but that heat has to go somewhere, and that somewhere was my living room.


Ah, right. Well depending on where you live and the time of year, you could always use them as space heaters :P


>>2563  I've thought of that.  I might fire them back up if it cools down.  Currently it's still 79F in my apartment.  This summer, it was typically capping out around 82F in my apartment.  Back when I was running the C2Ds 24/7, it would cap out around 85F.


File: 1541712279652.png (53.7 KB, 300x100, 3:1, nl1.png) ImgOps Google

holy shit, dutch banners are still being pushed with every pageload


File: 1541712360119.png (40.98 KB, 300x100, 3:1, nl4.png) ImgOps Google

another one


Has anyone figured where these are coming from?  Last time they healed up magically on their own.

Could it be a dns issue?  Is there a dutch ponyville page or what.


File: 1541715969913.gif (949.43 KB, 350x350, 1:1, pinkamena_flagarble.gif) ImgOps Google

>>2597  They're from the April Fool's Day site gag.  I'm guessing it was never fully removed from the site code.  but I haven't figured out where/why yet.  I was just randomly looking at what-used-to-be-called-Firebug to see page element load times, and noticed it was grabbing unused images for no reason.

edit:  oh....  it's from the Nederlands theme....  and it's being loaded with every single pageload regardless of which theme you're using....
that shit's gotta go.  :twi7:


File: 1541718315751.png (29.73 KB, 256x144, 16:9, glimglamtriggered.png) ImgOps Google

it's not happening on my android with chrome or my work pc, win10 with edge.

tee hee have you tried plugging it in I mean clearing your cache.  when it's time to buy ponies I always clear my cash.

steal my avatar will you, two can play at that game.


File: 1541726188410.gif (63.86 KB, 900x644, 225:161, pinkie_no_u.gif) ImgOps Google

>>2599  I mean...  are you checking the loaded resources?  It doesn't show up on the page itself.



It's by design. Is it good design? I assume not. But what I did was load both banner sets and have the theme you select hide one or the other.

You're invited to fix it if you know a better way. I'm sure a lot of the things I've done are terrible design, but I never claimed to know what I'm doing.


>>2602  Simply put, the Nederlands theme needs to be brought into line with the other themes, with the extra resources purged.
e.g. showing the regular banner, etc.
The special images should be a regular background, and thereby not take any extra resources.


Yeah, I'm not really so sure I can imagine what you are describing. I think you overestimate how much I understand any of this front end technology.

Lol, I'm sure this isn't even close to the biggest crime I've committed against this codebase. I'm eager to hear what else there is that's a mess.


File: 1541739788048.png (1.06 MB, 1280x1280, 1:1, silly_starlight_glimmer_by….png) ImgOps Google

>>2604  Simply put, it should be structured like the Steven Universe one (at least, assuming it doesn't do the same thing, which I don't think it does).  I honestly shouldn't be looking at it until I can devote lots of uninterrupted time to work on it, but my curiosity gets the best of me.  I haven't started making changes yet, but I did download the code so I can edit files more easily, and I've glanced through the structure of it a bit.

I'd also like to point out how annoying it is that when you right click on a web page and go to View Page Source, it's on a single line.  Seriously, what the fuck...


I can see how the banners can come in with the theme as a background, but I'm not sure how you intend to handle randomly rotating them, unless you just want Javascript to come in and sort that out for you after the fact.

Yeah, pretty annoying!


>>2606  the simplest solution is to scrap the rotation; it's unnecessary.  we already have a banner.


I mean, we can scrap the whole site and solve a lot of problems that way too! But I mean, at this point it's probably fine since I doubt anyone even uses Netherlands theme anymore. And if so, they don't need special banners.

Still, I made those silly nl banners and they'll be missed. Stroopwafel.


File: 1541805980524.jpg (66.64 KB, 960x1077, 320:359, 1530910901704.jpg) ImgOps Exif Google


So you put us in dutch for a laff.

Such betrayal, sentence you to wear wooden clogs.


Oh, this is a the code thread?  I'd like to make a small request: On the
thread pages, add a
metadata link to the full thread.

[Return] [Go to top]
[ home ] [ pony / townhall / rp / canterlot / rules ] [ arch ]