/episodethree/ - Episode Three

Worth the weight!

Password (for post/file deletion)

File: 150115502578.png - (1.07 MB , 900x1250, 62988616_p1.png)
/episodethree/src/150115502578.png No. 194 []
I'm going to post here, because why not.
No. 195 []
Why is my trip borked tho?
No. 196 []
Zeke, pls make an API for gochan that matches Ponychan's so I can add gochan support to Flutte
No. 197 []
Gochan's crypt() function doesn't play nicely with non-ASCII characters. I'm not sure if it's an issue with gochan's implementation or with Go. I hope it's the former, because that should be easier to fix.

it won't be at /api.php for obvious reasons. Is that a problem?
No. 198 []
File: 150119273345.png - (85.5 KB , 612x674, 365_day_195_spike_by_korikian-d3rtkjc.png)
Hooray more people posting here!

I mean there's this regex in generateTripCode with the comment "remove every ASCII character before . and after z".

That said I haven't looked at tripcodes all that much, but I thought it was initially implemented against Shift-JIS or something, and now we're all UTF-8 here.

Also, you can always at the webserver rewrite api.php to whatever.
No. 199 []
File: 150124479028.jpg - (0.31 MB , 750x1200, 1456206356272.jpg)
There aren't any non-ASCII characters, though there are punctuation. Is tripcode generation triggered only by hash marks, or also by exclamation marks, commas, etc.?

That's fine. Is GETchan gonna be on gochan at some point too?

I just came here on a whim and saw there were relatively recent posts.
No. 200 []
Originally it used a C wrapper, but I don't remember if that worked.
>I mean there's this regex in generateTripCode with the comment "remove every ASCII character before . and after z".
That's odd, I don't remember putting that there...
No. 201 []
>That's fine. Is GETchan gonna be on gochan at some point too?
No. 202 []
File: 150125716666.png - (1.01 MB , 837x1201, mtr_1500508588963.png)
>Population: 0
No. 203 []
I got really high one day and thought I was purging the posts in my VM but it turned out that I accidentally purged the posts on GETchan's Gochan.
No. 204 []
File: 15012575425.jpg - (1.27 MB , 2184x3384, error.jpg)
Also gochan started fucking up for some reason. Spike, you might wanna check error.log.
No. 205 []
Posting this image
(the original filename is 792845__safe_artist-colon-apony4u_sweetie+belle_equestria+girls_divide+by+zero_error_logic+bomb_math_robot_simple+background_smoke_solo_sweetie+bot_thi.png)
causes a 502
No. 206 []
Why won't the name field retain my tripcode? Zek pls fix
No. 207 []
I'm not sure, it used to.
No. 208 []
Well it starts at a #, and I mean my trip has special characters too, and it has worked all the time with gochan.

lol, I got really high one day with a friend, but did nothing, I was too high to do anything but sit and watch TV with him

Well it didn't make it into a log, but a thread did panic, here's the stack trace https://paste.ee/p/Y26ih#6qRW9uznNKyM2P1dEaTZcc1S530Lvfx0

That line says "postid, _ := result.LastInsertId()"

Looks like before, an err return is expected but not being actually stored, so maybe result is ending up nil, I'd have to look more.

I don't think I have problems with that.. We'll all have to test
No. 209 []
File: 150127583935.png - (0.49 MB , 3800x5051, Sweetie_Bot_Divide_by_Zero.png)

This is a test of that image with a short filename.

Whoops, I guess I do have that problem too.
No. 210 []
File: 150127623031.jpg - (12.3 KB , 220x200, Dumb_Fabric_Gray.jpg)

That filename appears to be the cause of the stack trace I posted in >>208
No. 211 []
File: 150143773122.png - (34.7 KB , 600x598, 1498492323788.png)
API when? Release candidate when?
No. 212 []
I reckon a formal API is a long ways away. As for a Release Candidate, we would probably have to fix things like your trip, crash with that enormous filename.
No. 213 []
What do you mean by "formal" API? All I need is something to generate JSON files for the board list, board catalog, board pages, and threads.
No. 214 []
By formal I mean any at all lol. If you can point me to exactly what you want I can probably get that going, it'd at least make me become familiar with the Gochan data structures and processing JSON in Go.

But I do think I've figured out why we aren't actually saving the name field.. The cookie responsible is never getting set. Whoops. I might fix that tonight, so we can have that at least.
No. 215 []
oh wait, no it's the whole cookie domain deal on the server side.. Still, I might be able to fix that
No. 216 []
File: 150157253858.png - (0.21 MB , 900x1286, helloooo_rarity____by_knight725-d418yed.png)
Testing my change
No. 217 []
File: 15015726913.png - (0.17 MB , 786x1016, malevolent_spike_by_pony_vectors-d53wf7b.png)
The change indeed did work, and I've pushed it to Github!

Now your name and trip should be remembered.
No. 218 []
Now I've fixed the new cookie code for when you are connecting with a port, because I was going to use that to test tripcode algorithm changes
No. 219 []
File: 150159353226.png - (0.41 MB , 738x913, ThisIsBookFort.png)
Testing with good old Konqueror because I can!
No. 220 []
File: 150162185352.png - (0.57 MB , 600x847, tumblr_nq3snlDcbW1r0yamfo1_1280.png)
Board list: https://a.4cdn.org/boards.json
Catalog: https://ponyville.us/pony/catalog.json
Thread: https://ponyville.us/pony/res/538866.json
This is all the JSON I need.

That's a name...I haven't heard in a long time.
No. 221 []
Okay, so my tripcode now saves, and with that I think I found what's going wrong with with generating it. Gochan seems to be replacing an apostrophe with ,\'
No. 222 []
Actually, it seems like a lot of punctuation/special characters are being replaced by what appears to be escape sequences for those characters. After inserting that ampersand from my previous post, what was originally an apostrophe is now \\'
No. 223 []
Alright I will take a look at it, and maybe we can get that going.

Yeah, there's a reason.. It's a little crusty. They're trying to bring in QtWebEngine now, and of course KHTML is still kicking around.

Alright, I was seeing an issue with the "&" character, and I'm working on that, I have that generating what I believe to be the proper result, but the cookie is still wrong. I'll prioritize the apostrophe next. I might be able to run some function that fixes all these URL escaping situations.
No. 224 []
I'm realizing that we run an HTML escape on the name and trip, I need to undo it or not apply it to a trip.
No. 225 []
Well I seem to have fixed the actual generation, so things should show up properly?

However, I still haven't fixed the cookie side so it'll remember it weird still..
No. 226 []
No. 227 []
Nope, still wrong, though I'm not seeing anything wrong getting saved now. Would exclamation marks or hyphens be triggering anything?
No. 228 []
Oh, never mind. I just had it entered wrong.
No. 229 []
Well I'm glad to see it's working correctly for you now! I'm sure there's other trips out there that still don't work correctly though.
No. 230 []
Update: the cookies are still doing the thing with apostrophes.

Any updates re: API?
No. 231 []
Yeah I figured they still were, because they were on my laptop test server. I can try to fix that tonight. I think I misplaced the fixing the escapes.

Don't hold your breath on the JSON stuff, but maybe a board one could be fairly easy to whip up.
No. 232 []
I have some great news for you! I've fixed the cookies with & and ' characters. But I've noticed that posts ending with the letter n get their n chopped off at least on my laptop, this post will end with broken, but it will appear as broke, it's quite broke
No. 233 []
Now I have fixed this issue! See Github for the explanation.
It is no longer broken
No. 252 []
File: 150345375123.png - (0.18 MB , 900x1404, gentleman_shuffler_by_m99moron-d4uwn8c.png)
check it
No. 253 []
Looks good!
No. 257 []
And can you believe it, it's the JSON for the thread!

Now the next thing is a catalog JSON.. That might not be as easy, but we'll see. These honestly haven't been too terrible to make though.
No. 258 []
File: 150390002964.png - (34.7 KB , 600x598, 1498492323788.png)
You are on fire, my dude.
No. 259 []
File: 150391681313.png - (0.17 MB , 900x909, spike_wearing_a_hat_vector_by_kenrick55-d4uyea4.png)
And here it comes, it's the catalog.json file!

However, it's not quite done. The "omitted_images" and "images" fields aren't being populated yet because I need to find a nice way of calculating that, and to add to the HTML version as well.
No. 260 []
File: 150401292580.png - (0.17 MB , 748x1067, spike_03_by_zutheskunk-d5cfpgu.png)
This is fixed now, and catalog.json should be on par with the example previously linked in this thread.

Oh another thing that was patched fairly recently (but it was a fix in the database really) is dealing with long original filenames, they can now be up to 255 characters.
No. 262 []
File: 150904072498.png - (0.34 MB , 1280x929, 113.png)
i don't know many of these programmy words.. but i'd like to post here too c:
No. 263 []
File: 150906408762.png - (0.17 MB , 900x909, spike_wearing_a_hat_vector_by_kenrick55-d4uyea4.png)
Well you are certainly welcome to post here!
No. 264 []
No. 265 []
File: 150931784512.png - (0.41 MB , 590x590, 96001.png)

hey zeke! hows it going? c:
No. 266 []
File: 150938057227.png - (46.6 KB , 816x590, eating batteries.png)
It's going decently. How's it going with you?
No. 267 []
File: 150949934969.png - (0.19 MB , 866x922, 6845315.png)
that is good. its going fine here too, just putting all my energy into school
No. 268 []
Oh really? What are you studying?
No. 269 []
File: 150955616536.png - (0.20 MB , 790x1012, 65165.png)
im just taking an intro to humanities course and a maya modeling and animation class, but it feels like the first semester ive been able to actually give school the focus i should,which is nice.
i still am totally undecided as to a major or anything though..
No. 270 []
File: 150966478479.jpg - (36.7 KB , 282x235, 6.jpg)
Oh, that sounds pretty neat! I've never used Maya before.
No. 271 []
File: 150973173032.png - (0.22 MB , 3419x1587, 890-1423-98.png)
it's pretty fun, though no way im going to be able to actually afford it one my student license wears out
No. 272 []
File: 150973383066.jpg - (63.4 KB , 1706x960, FB_IMG_1485896625996.jpg)
Well yeah, Maya isn't exactly cheap. So does Autodesk go with a dumb subscription model?
No. 273 []
File: 150974010737.png - (0.11 MB , 900x871, spike_at_the_donut_shop_vector_by_officer_rabbit-d4epfuz.png)
Yeah, these days, Autodesk does use a subscription model unfortunately..
No. 274 []
File: 150976219742.png - (0.12 MB , 1024x768, sad_fluttershy_vector_by_bird_spirit-d81m8c4.png)
yup, totally subscription-based :/
but the student license is totally free and last three years, so im going to try to make the most of it.
No. 275 []
File: 150976775657.png - (0.49 MB , 566x433, 1439479847313.png)

Edit post