Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Could it be a problem with UTF-8 and multi-byte characters? Offset could be in bytes or in characters, after all?
-
@Fast-Nop wait shit, that might be it.
Working with text in any PL is a truly terrible experience, shit. -
@ScriptCoded it works on devRant because it’s his API and he know it inside and out. The API is private and it has no explanation for many many many things. I wouldn’t know and everything is a guess when you revers-engineer this thing.
-
@OmerFlame Exactly, that time you got it right. It's not meant to be used publicly in the first place. dR has no obligation to make it work outside the scope of the official app, so perhaps "wtf dfox" isn't very fair.
-
@ScriptCoded the “wtf dfox” is a total joke lol, I just wondered to myself what he did because I just couldn’t find what the discrepancy was.
Related Rants
Who knew that NOT using results given from an API can actually help.
The private devRant APIs give you offsets in text of where links are in comments and in rants.
It’s EXTREMELY inaccurate and I don’t understand why it’s so hard to write it so it’s accurate 100% of the time.
So I said fuck it and NOT use the given offsets and just hard-find using the built-in algorithms inside Swift to create the range for me. Results? It works 100% of the time. No crashes, no out-of-range errors, no nothing.
rant
smh
wtf dfox