BinaryByter
not really
BinaryByter
array semantics are beautiful/interesting/fascinating
BinaryByter
std::cout << 1["ABC"];
BinaryByter
little example I just found that illustrates my point quite welll
BinaryByter
BinaryByter
Correct
BinaryByter
Do you know why?
BinaryByter
...
BinaryByter
but "1" is not a string
BinaryByter
its an int
BinaryByter
but here we have it like this:
BinaryByter
1["ABCD"]
BinaryByter
yes
BinaryByter
but why?
BinaryByter
😉
BinaryByter
Basically its because
a[b] is evaluated to *(a + b)
BinaryByter
and through commutativity
*(1 + "ABCD") can be changed to *("ABCD" + 1)
BinaryByter
which is equivalent to str[1]
Liam
Liam
yes
BinaryByter
first of all, MAXI is not a string
Mat
BinaryByter
not defined here
Liam
lol, the modification.
Daniel
Daniel
does compiler automatically unchanged variables makes const?
BinaryByter
BinaryByter
BinaryByter
this has got to be one of the more awkward uses of operator« xDDD
Dima
BinaryByter
🤔
BinaryByter
Dima
BinaryByter
BinaryByter
just in 3 hours of work
Dima
if you'll show me working csrf protection in your webcpp form I'll like it
BinaryByter
csrf?
Dima
yes
Dima
but what about....
Dima
If I need to edit the view so I'll need to recompile my code everytime?
BinaryByter
slight downside to webcpp
BinaryByter
btw: csrf security is planned on
BinaryByter
(not yet implemented)
Dima
I wonder how that will work
I implemented basics of csrf into my framework but I lost it when I was thinking about how to implement that on a client side
BinaryByter
well basically you store a secret key in the cookies
BinaryByter
and you alter that often enough
BinaryByter
and you store that secret key in your db
BinaryByter
and if the keys dont match, the cookies are forged
Dima
wait... why I didnt use cookies lol
Dima
oh I didnt have them implemented at that moment xD
BinaryByter
maybe because your shit didnt support cookies?
Dima
it does now
BinaryByter
Dima
lol I don't even feel sorry
Dima
Ok wait
BinaryByter
xDD
BinaryByter
Lol jk
Dima
*hires bunch of indians to write that in 5 mins*
BinaryByter
you are showing me a disgrace by doing that
Dima
yeah, so that literally will be shit.
BinaryByter
exactly
Dima
exactly
https://github.com/luckyycode/neko-webframework/blob/master/Nova/Cookie.h
BinaryByter
its like... you are telling me that webcpp is bad but give me indian code xD
Dima
Dima
xD
BinaryByter
BinaryByter
webcpp is another marvel of brilliant engineering
Bruce
Bruce
I am not getting k value,
Bruce
There is no error
Bruce
Why?
BinaryByter
Bruce
App
Bruce
After giving input the programme just terminates
Bruce
Not giving k value
Dima
lol what the.. that font
Bruce