Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.tw/irclogs/ Connected with DDNet's IRC channel, Matrix room and GitHub repositories — IRC: #ddnet on Quakenet | Matrix: #ddnet-developer:matrix.org GitHub: https://github.com/ddnet
Between 2019-12-01 00:00:00Z and 2019-12-02 00:00:00Z
Avatar
ChillerDragon 2019-12-01 13:53:25Z
Uhm any suggestions on how to proceed when i need a slightly modification in curl for my tw mod :/ ?
13:53
I thought about putting whole curl in src/engine/external/curl and then mofiy it but it seems like a bloated approach
Avatar
[quakenet] Learath2 BOT 2019-12-01 13:54:29Z
Don't modify curl?
Avatar
ChillerDragon 2019-12-01 13:54:30Z
can i overwrite just a specific function
13:54
:/
Avatar
[quakenet] Learath2 BOT 2019-12-01 13:54:49Z
It's a pretty well built and flexible library, I'm sure there is a way to do what you want to do
Avatar
ChillerDragon 2019-12-01 13:54:50Z
but ...
13:55
idk how
13:55
its probably faster to edit it than understand how to flex it
Avatar
[quakenet] Learath2 BOT 2019-12-01 13:55:28Z
Just google it?
Avatar
ChillerDragon 2019-12-01 13:55:35Z
what?
Avatar
[quakenet] Learath2 BOT 2019-12-01 13:55:50Z
Or tell me what you want to do and I'll google it for you, since you seem incapable of reading documentation of any kind
Avatar
ChillerDragon 2019-12-01 13:56:02Z
A command line tool and library for transferring data with URL syntax, supporting HTTP, HTTPS, FTP, FTPS, GOPHER, TFTP, SCP, SFTP, SMB, TELNET, DICT, LDAP, LDAPS, FILE, IMAP, SMTP, POP3, RTSP and R...
13:56
i want to remove . and ~ here
13:56
so i can escape strings and use them as filenames
Avatar
[quakenet] Learath2 BOT 2019-12-01 13:56:37Z
Easy, wrap the function yourself
Avatar
ChillerDragon 2019-12-01 13:56:50Z
hm?
Avatar
[quakenet] Learath2 BOT 2019-12-01 13:58:05Z
Create a new function, chillerdragon_escape, then remove . and ~
13:58
then call curl_escape
Avatar
ChillerDragon 2019-12-01 13:58:19Z
ye
13:58
that was my first attempt
13:58
but it did not find all the curl helper methods
13:59
13:59
i guess i can only include those
13:59
and escape.c needs those
Avatar
[quakenet] Learath2 BOT 2019-12-01 13:59:57Z
wat?
Avatar
ChillerDragon 2019-12-01 14:00:28Z
uhm i want to change the curl_easy_escape method
14:00
which calls stuff like Curl_saferealloc
14:00
and idk how to include the files which hold Curl_saferealloc etc
Avatar
[quakenet] Learath2 BOT 2019-12-01 14:01:15Z
to be absolutely honest with you, I can't even begin to understand tf you are trying to do
14:01
You want a version of curl_easy_escape that doesn't escape tilde and .?
Avatar
ChillerDragon 2019-12-01 14:01:42Z
it should escape tilde and dot
14:01
default doesnt
14:02
because those are ascii and thus valid in url or something idk why they are not escaped
14:02
but i want to escape tw usernames and then use it as filenames
14:02
so . and ~ are problematic
Avatar
[quakenet] Learath2 BOT 2019-12-01 14:02:38Z
Okay, you create a new function, that either first calls curl_easy_escape, then escape the ~ and . by hand. Or you do it the other way around
Avatar
ChillerDragon 2019-12-01 14:02:52Z
i dont want to remove them
14:02
i want to escape them
14:03
and i dont want to write crazy string manipulation code that resizes a string
Avatar
[quakenet] Learath2 BOT 2019-12-01 14:03:46Z
So let me get this straight, you want to resize a string without resizing a string?
Avatar
ChillerDragon 2019-12-01 14:03:47Z
i want '.' to become "%2E" which is longer :/
14:03
nah i want curl to handle rezising
14:04
cuz i trust curl devs
14:04
but not my code
Avatar
[quakenet] Learath2 BOT 2019-12-01 14:04:18Z
It's not rocket science....
Avatar
ChillerDragon 2019-12-01 14:04:24Z
:/
14:04
it is
Avatar
[quakenet] Learath2 BOT 2019-12-01 14:04:45Z
Each character can at most become 3 characters, you allocate a string 3 times the size, do your replacing, then call curl easy escape on it
Avatar
ChillerDragon 2019-12-01 14:04:48Z
it is easier to remove those two chars from the switch case for sure
Avatar
[quakenet] Learath2 BOT 2019-12-01 14:04:59Z
You don't get to modify other libraries
Avatar
ChillerDragon 2019-12-01 14:05:03Z
:/
Avatar
[quakenet] Learath2 BOT 2019-12-01 14:05:08Z
Especially safety critical libraries...
Avatar
ChillerDragon 2019-12-01 14:05:15Z
xd
14:05
i rather edit safety critical libs than writing safety code my self
14:05
big brain
Avatar
[quakenet] Learath2 BOT 2019-12-01 14:06:45Z
Escaping a character is pretty hard to get wrong, especially the way I mentioned with generously allocating memory
Avatar
ChillerDragon 2019-12-01 14:07:07Z
i never allocated memory :/
14:07
well i did one time it was a mess xd
Avatar
[quakenet] Learath2 BOT 2019-12-01 14:07:46Z
Why are you all programming without learning to program is beyond me :P
14:08
You know it's much easier to use a language after you learn it right? :D
Avatar
ChillerDragon 2019-12-01 14:08:04Z
its not about programming
14:08
i dont like programming :/
14:08
i want fng stats 😄
14:08
i feel like a 12yo rn
14:08
xd
Avatar
why u program if u dont like to program
14:41
🤡
Avatar
ChillerDragon 2019-12-01 14:47:22Z
i want fng stats 😄
14:47
its just a tool to satisfy my tw cravings
14:48
i also get hangovers and i dont like em
Avatar
wdym fng stats
Avatar
ChillerDragon 2019-12-01 14:48:30Z
saving stats about kills etc to file
14:48
just use sqlite
Avatar
ChillerDragon 2019-12-01 14:48:48Z
i wanted to try files 🙂
14:48
sql was a mess in ddnet++
Avatar
cuz u did it a mess
Avatar
[quakenet] Learath2 BOT 2019-12-01 14:49:50Z
files and file parsing is usually much more of a mess
Avatar
ChillerDragon 2019-12-01 14:50:12Z
i just have to edit libcurl then all should be fine xd
Avatar
that sounds horrible
Avatar
[quakenet] Learath2 BOT 2019-12-01 14:51:28Z
or just write like 10 lines of code that does the very simple string manipulation you want
Avatar
ChillerDragon 2019-12-01 14:52:03Z
im tryin rn
14:52
i dont feel like its goign well
Avatar
[quakenet] Learath2 BOT 2019-12-01 14:54:47Z
If you don't feel comfortable about doing it yourself, maybe just steal someone elses str_replace?
Avatar
ChillerDragon 2019-12-01 14:55:24Z
im tryn rn
14:55
i dont feel like its goign well
Avatar
[quakenet] Learath2 BOT 2019-12-01 14:56:02Z
you are having trouble copy pasting someone elses code?
Avatar
ChillerDragon 2019-12-01 14:56:23Z
sure
14:56
u dont?
Avatar
[quakenet] Learath2 BOT 2019-12-01 14:56:59Z
You are a very interesting person
Avatar
ChillerDragon 2019-12-01 14:57:38Z
im close to add curl as a submodule xd
14:57
well my abused fork*
Avatar
don't modify curl! don't even think about it!
Avatar
ChillerDragon 2019-12-01 14:58:25Z
:/
14:58
u all rude
Avatar
[quakenet] Learath2 BOT 2019-12-01 14:58:44Z
not like you can figure out how to get cmake or bam to link it
Avatar
ChillerDragon 2019-12-01 14:59:04Z
ez
14:59
i guess
14:59
idk
Avatar
[quakenet] Learath2 BOT 2019-12-01 14:59:40Z
tbh, sometimes I feel you are just doing all this weird stuff to be quirky :D
Avatar
ChillerDragon 2019-12-01 14:59:54Z
i can understand that
15:00
but trust me, no
Avatar
[quakenet] Learath2 BOT 2019-12-01 15:00:01Z
Who thinks of modifying an external library just to avoid 10 lines of code
Avatar
ChillerDragon 2019-12-01 15:00:13Z
i person who is rly struggeling with the 10lines
Avatar
compiling and linking it will definitely be way harder 😄
Avatar
ChillerDragon 2019-12-01 15:01:18Z
:/
15:01
well probably
Avatar
[quakenet] Learath2 BOT 2019-12-01 15:03:39Z
Oh I know the chillerdragonest way to handle this
Avatar
why do you need curl for handling stats at all?
Avatar
ye it doesnt make sense
Avatar
ChillerDragon 2019-12-01 15:04:50Z
i thought its easiest :/
Avatar
[quakenet] Learath2 BOT 2019-12-01 15:04:52Z
Just do sed s/./%2E/g
Avatar
ChillerDragon 2019-12-01 15:04:57Z
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxD
15:05
this is ma boi
15:05
system();
Avatar
[quakenet] Learath2 BOT 2019-12-01 15:05:15Z
Well not that easy, you also need to pipe the output
Avatar
ChillerDragon 2019-12-01 15:05:19Z
thats why i say we should rewrite tw in bash
15:05
bash is easy af
Avatar
[quakenet] Learath2 BOT 2019-12-01 15:05:36Z
popen handles that if you don't mind POSIX
Avatar
ChillerDragon 2019-12-01 15:05:37Z
noobs like me can write whole webservers and frameworks in bash in a few days
Avatar
for what? the only stats things that might be useful is some rest api you want to use 😄 (edited)
Avatar
[quakenet] Learath2 BOT 2019-12-01 15:06:01Z
Now a rest api, I was actually working on
Avatar
ChillerDragon 2019-12-01 15:06:03Z
just pipe it to file and read file in c
15:06
i use curl to escape characters @redix
15:06
nothing else
Avatar
ChillerDragon 2019-12-01 15:06:35Z
but now i endeded up escaping them my self
15:06
cuz learath bullied me
Avatar
[quakenet] Learath2 BOT 2019-12-01 15:06:43Z
I got bored of writing my own http server, but I didn't want to link in an entire server
15:07
@redix he literally patched libcurl to escape ~ and . instead of just calling curls escape then escaping the ~ and . himself...
Avatar
great ^^
Avatar
ChillerDragon 2019-12-01 15:08:15Z
i should do a pr on libcurl
15:08
troll
15:08
there lib is obv broken
15:08
their
🇬🇧 1
Avatar
Cellegen | HU 2019-12-01 21:53:13Z
The highlighted sentences on those pictures aren't clarified as translatable variable, please fix it in the next update of copy_fix.py
21:53
21:54
at least not translatable on the Hungarian translation
Avatar
ChillerDragon 2019-12-01 22:04:27Z
For better translation update to 0.7 even game messages like join and leave are translated there
Avatar
Cellegen | HU 2019-12-01 22:21:13Z
but im not going to product translation to 0.7 vanilla troll ddnet is better
22:25
also these are the only ones that i must translate
22:25
so i could post the latest version
Avatar
ChillerDragon 2019-12-01 23:10:37Z
Christmas sucks
Avatar
u suck
Exported 147 message(s)