< andytoshi>
i also tend to think of passing const references as a way to be assured that the variable won't change throughout the body of the function. somehow i tend to forget that you can make normal objects be const too
< andytoshi>
i think in general it's non-idiomatic for some reason to make local variables const, and this sometimes leads to people overusing references just so they can get constness
< sipa>
a const reference actually doesn't guarantee it can't change throughout the body of the function; it only means it can't be modified through that reference/variable/pointer
< andytoshi>
i also forget this, which is a much more dangerous thing to forget
< sipa>
it also makes const way less useful then it could be
< sipa>
both for programmers and for the compiler
< sipa>
as the compiler can't assume a const reference can't change
< sipa>
but it can assume that a const variable itself won't change - that's actually UB
< andytoshi>
heh, that's a good observation .. makes it all the more strange that people tend not to const local variables
< sipa>
if you have a local variable and no reference to it is passed to another function, it doesn't matter for performance reasons really, the compiler can figure out on its own that nothing changes it
< sipa>
"it only means it can't be modified through that reference/variable/pointer" <- actually even that is wrong
< sipa>
iirc the rule is that as long as any non-const reference anywhere to an object exists, it can be modified (including by casting the constness away from a const reference to it)
< sipa>
which in practice means that only actually const objects can be assumed to not change
< Provostro>
like how do you specify the credentials for -proxy from the command line? im not smart enough to figure it out.
< sipa>
i don't think you can
< Provostro>
it seems like its in there, so kept trying and thought i was crazy
< sipa>
there is -proxyrandomize
< sipa>
which uses a new username for every stream, which tor uses for stream isolation
< Provostro>
so there's no way to still use an authenticated socks5 proxy? im not a programmer dude, but it looks like its like 99% implemented in the source?
< sipa>
yes, i think there just never was a use for it
< sipa>
i think almost all uses of the -proxy function are for tor
< Provostro>
thanks for the info, i probably would have kept trying for at least another 4 hours, saved me a lot of time
< Provostro>
do you have any steps you could point in a direction if i wanted to implement it on my own?
< Provostro>
its like it just needs to parse -proxy for username and password and pass it to something else
< Provostro>
or something
< Provostro>
(thats why im not a programmer dude)
< sipa>
yeah, pretty much
< sipa>
you can also file an issue, if you'd like someone else to work on it
< sipa>
of course, no guarantee that anyone will find it interesting/useful to spend their time on
< Provostro>
thanks for help. i think it'd be a useful feature for more than just me, but i don't for sure.