« first day (2317 days earlier)      last day (2625 days later) » 
00:00 - 22:0023:00 - 00:00

12:09 AM
What do you think happens when you run this code in PHP?
function addfloats(float $a, float $b):float{
return $a+$b;
}

echo addFloats("2","4");
That is a correct answer in the sense that you don't want to hear the horrible truth.
It runs fine and it outputs 6
 
@TomasZubiri declare(strict_types = 1)
horrible truth is nobody bothers to rtfm
 
The horrible documented truth.
Thanks for pointing that out though.
"The only exception to this rule is that an integer may be given to a function expecting a float. "
Is this exception because integers are already promoted to floats on overflow?
Or did they decide to document a bug?
 
@TomasZubiri please stop trolling.
 
@Danack I don't think he's (intentionally) trolling.
 
It's because people thought it was the right thing to do. For the vast majority of ints, they can be converted to floats without any problem.
10 mins ago, by Tomas Zubiri
That is a correct answer in the sense that you don't want to hear the horrible truth.
yes he is.
 
12:21 AM
@TomasZubiri it's intentional, if you want to know more about it all read the rfc wiki.php.net/rfc/scalar_type_hints_v5
 
I'm not trying to troll I am just using php and I find some parts I don't like and I like to discuss them.
 
ints can be converted to floats without loss up to 2^53. there are really very few PHP applications that deal with ints in the range 2^53 to 2^63 where this causes problem. As opposed to lots of PHP applications that pass ints to into functions that expect floats
 
.. or you could stick to Microsoft side of fence :P
 
And being able to convert automatically is 'easier'.
 
@TomasZubiri works as intended: 3v4l.org/5tIdU
 
12:32 AM
That reminds me....
 
I think the bigger issue concerns type safety rather than precision loss.
In a concrete example, I had a function that takes a float and checks if it is zero. I had a bug where I was passing int(0). And the function was failing. Strict mode won't help me here since it will happily take int(0).
 
@kelunik It is weird that it's not possible to return a unix microtime as a 64bit int. Instead both microtime and your hrtime proposal return them as floats. What do you think of making functions that return int values for time, that only exist on 64bit platforms?
 
@TomasZubiri can you show me an example of that? I don't think I understand your example, as float(0) should equal int(0).
 
Oh, in that case I still don't understand the bug.
 
12:36 AM
what bug?
 
function floatEquals(float $a, float $b):bool{
...
else if ($a===0.0 || $b ===0.0){
...
}
 
@TomasZubiri 3v4l.org/nvWef ?
 
Oh, that's right. The function works golden. I was incorrectly relying on the passed argument being a float.

$number = 0;
floatEquals($number, $number2);
if($number !== 0.0){
$ratio = $x/$number;
}
So takehome message is I shoudn't rely on a variable being of a type just because it was passed to a function that expected that type.
But wouldn't that be safe for any type other than floats?
 
12:52 AM
@TomasZubiri what the fuck are you talking about: 3v4l.org/sT6ld
ehh .. who even cares .. of to the ignore list with this fucking troll
 
user image
11
 
I think he does not understand how functions work
or he is a troll ... so it's better to err on the side of caution
 
@TomasZubiri You do realize that you are not using the result of that function?
 
I get how it works, and I understand that it is supposed to work like that, I am just questioning the design decision to convert ints to floats on strict mode. I am trying to do it in a constructive manner.
 
12:57 AM
lol
 
 
3 hours later…
Wes
3:30 AM
Tendril perversion, often referred to in context as simply perversion, is a geometric phenomenon found in helical structures such as plant tendrils, in which a helical structure forms that is divided into two sections of opposite chirality, with a transition between the two in the middle. A similar phenomenon can often be observed in kinked helical cables such as telephone handset cords. The phenomenon was known to Charles Darwin, who wrote in 1865, The term "tendril perversion" was coined by Goriely and Tabor in 1998 based on the word perversion found in the 19th Century science literature . ...
 
3:49 AM
moining
o/
 
4:42 AM
morning
@pmmaga lol :P
 
 
1 hour later…
6:05 AM
very good morning to all
hope you all are doing well
o/
 
@Machavity covered by session
 
yo joe
 
moin
 
moin Joe, Paul
 
6:13 AM
\o
 
Wes
mornin
 
posted on February 18, 2017

New Cyanide and Happiness Comic

 
6:43 AM
so the fix for bugs.php.net/bug.php?id=54382 just changed the signature for getAttributeNodeNS since it can now return DOMNameSpaceNode instead of DOMAttr
ah, just noticed that was covered in the pr
 
7:31 AM
@DaveRandom I see. I wonder, whether in Java this statement is valid as well or due to VM - not.
@tereško any chance on hearing what in short you didn't like?
Mornin'
 
8:09 AM
Hello
i have one problem in uploading images in wordpress which has a Hindi filename.
 
8:23 AM
!!lxr-jeeves ChatClient
 
mornin
 
o/
 
8:48 AM
~~So quite today~~
 
logic problem : i am having a case where one user share file with another one other person get email with url and temp password to view file .And when user clicks on url in it redirects him/her to page where he has to enter temp passwword given in email after submiting password i get json response and render that data accordingly and hide password form? Is there any good way to do this?
now what happening is when i refresh page it ask for password again..
 
Can't you take a session variable password_entered set variable if password is correct. then on page load if variable exist then show data @linus
 
i have no php only jquery jquery ...
however i am using localstorage to set password if exist show data
 
Then what's the issue!
 
but when new mail arrives it still takes old mail password and shows data of old email
 
8:56 AM
@DaveRandom You're not supposed to agree with Virgin, now I look like the asshat I am
 
new mail is having new temp password and different data.
 
You do store password in localstorage variable? @linus
 
no it's just temp password...
 
Can't you check if temp password is same then let user see if it defers then reset localstorage variable and set it up again with newer one?
 
let me try ... :P my thinking process come to end
 
9:09 AM
:D
 
@Jimbo sorry, I spend half my working life explaining to people that WiFi != magic, it's a reflex
 
9:32 AM
Fake design patterns. SAD! https://twitter.com/asgrim/status/832697947699568641
5
 
lol
It's crazy how type-hints consistently ruin the simplest of changes. 😓
just in case you missed it
 
can i get a nearby place base on latitude and longitude
 
@kelunik that's giving Laravel too much credit
 
Taylor will be president of PHP due to electoral college
 
9:49 AM
@AdilIlhan Make sure to read the example in the comments - lets you know just how much Taylor has nfc about programming
Frankly I'm amazed he managed to put together a framework with that level of thinking
 
i already the example
a comment from his code:

`Doesn't work becuase type-hints are a waste of time and lead to poorly coded, brittle systems... :)`
brittle systems because of type-hinting?
something is not right there
 
10:11 AM
“Why Every Single Element of SOLID is Wrong”, slides from my 5-minute @PubConf talk: https://speakerdeck.com/tastapod/why-every-element-of-solid-is-wrong /cc @TotherAlistair
RT'ed by Taylor and responded to with:
@tastapod thanks for having the guts to say what many are scared to say
Reminds me of all the right wing populist rhetoric. "The silent masses" staying silent because someone (actually no one) prevents them from saying their opinion. Utter bullshit.
 
there is nothing wrong with populism
 
@Gordon #bravery #struggle
 
@tereško I didnt say populism. I said right wing populist rhetoric.
Also, check the example why Taylor thinks Type Hints are bad: gist.github.com/taylorotwell/ee2f782aec59aa53863fd09c8e47f304
He just didn't understand the Decorator pattern… which I guess makes sense, given that he also doesn't know what a Facade is
 
fuck Taylor and all of his sycophants
what would you call "an orderd list of identities" ?
 
@tereško OrderedIdentitySet or just OrderedIdentities ro IdentiesByFoo
 
10:26 AM
I was looking for a single word :(
 
Oh, then… uuuh… Jabberwocky?
by what are they ordered? and what do they identify?
 
they identify users
 
in what order?
 
and they are ordered by to expiration
 
Expirees?
DropOuts?
 
10:29 AM
with the furthest from expiration being at the top
 
from what do they expire?
 
heart failure
 
^^
 
from time running out
 
in what sense?
I'd go with an [adjective]User combo. Something like liveUsers? activeUsers?
 
10:35 AM
I will probably just call it "keychain"
:D
 
> There are two hard problems in computer science: Naming things, cache invalidation and off-by-one errors.
 
@tereško if that makes sense in you domain, go for it
 
@Sherif that, exactly
 
ok, I will resist the urge to reply to Taylor and just go play Shadowrun… not gonna waste my free day refuting bullshit
 
10:39 AM
Wha? Someone on the Internet doesn't want to argue with someone else?
What's happening to the world?!
 
it comes with age. the older I get the higher I value my time
now you could argue that refuting bullshit might do the developer community a favor and playing some computer game doesn't. And it's probably true. But I cannot be bothered.
 
You know what might do the developer community a favor? Staying the fuck off twitter!
 
@Gordon the people who will see your 140 characters of wisdom will probably miss the entire fucking point
 
@tereško maybe. hence Shadowrun
 
People trying to make objectively valid and intuitive statements in 140 characters does not a conversation make. Just stop using twitter as a medium conducive to effective communication.
 
10:45 AM
I am so happy my windows machine doesnt work
the square enix sale would ruin me
 
naah
I have everything that's interesting from that sale
well .. except the 5 "Legacy of Kain" games, but those should be bought in GOG anyway
 
I am checking Life is Strange right now
 
it's a "telltale game"
 
Overwhelmingly positive
Hmm, and only 10 bucks for the Company of Heroes 2: Master Collection
 
you could by "Just Cause 3" instead
 
10:57 AM
windows only
 
oh\
 
and it doesnt look like it would work with my intel hd 5000 anyways
 
11:27 AM
@Danack So things just break on 32bit platforms?
 
11:45 AM
Hi guys
am stuck with storing password with salt
 
@NikiC iirc you mentioned, that you use PhpStorm. The question is about it syntax understanding and where from it gets it. Is it correct gist.github.com/jeserkin/9cd5fc782435511206fd2fe403a0c3f3 or those values always depend on system at hand?
 
I didn't actually understand the idea of adding salt with the password when using the codeigniter
 
What's the mystery?
 
anyone know how to implement this in codeigniter
 
Ou. That.
 
11:48 AM
I tried to hash with phpass but it shows some argument missing error in the first place
@Eugene
 
Yeah. Haven't used php in a while myself + not realy CI fan.
 
am just starting to think my understanding regarding the adding salt to password is somewhat wrong
OO
May be I would say that's good
Am tired with this codeigniter
 
salt for password adds somewhat complexity cause usually it is a static value stored in file.
So you have password hash in database
And salt in file
Those if someone gets dump of your DB you might be saved thanks to salt
Cause it will be static in your file.
Not in database.
This is at least as I've understood it when I've worked with PHP.
@astrosixer clear?
 
Let me read
yes you are somewhat right if what I understand is right
What Am tried is to make that salt dynamic with each password
So whenever an user is created a closely related salt is generated from the password he or she is choosing
@Eugene
 
@kelunik So the function isn't there on 32bit platforms, so those people still need to use the hacky float versions.
6 mins ago, by Eugene
salt for password adds somewhat complexity cause usually it is a static value stored in file.
wat.jpg
 
11:59 AM
@Danack wrong?
 
For brcrypt:
> For example, the shadow password record $2a$10$N9qo8uLOickgx2ZMRZoMyeIjZAgcfl7p92ldGxad68LJZdL17lhWy specifies a cost parameter of 10, indicating 210 key expansion rounds. The salt is N9qo8uLOickgx2ZMRZoMye and the resulting hash is IjZAgcfl7p92ldGxad68LJZdL17lhWy. Per standard practice, the user's password itself is not stored.
 
@danack plz dont tell me am wrong ?
 
i.e. the salt is stored in the result - so only one thing to save as the hash.
 
Yes that 's exactly what is required
Store that salt along with the password in the databse
 
@Danack "those people need to use" === "apps using the 64bit-only function will break there"
 
12:02 PM
@Danack huh. What do you know. I understood it wrong way than.
 
Anyone got any ideas? Could use a hand...
I left my suitcase on the train, it's gone towards Glasgow Central. Lost Property isn't open on a weekend
And I fly tomorrow
Literally called Virgin 50 times and everyone is blocking me through process saying I have to wait until Monday
 
@astrosixer dont use codeigniter to salt passwords
 
Not one human being will help by grabbing it off the train for me
 
I thought of it more of an anchor to physical files, so that if database with passwords is stolen, then due to some value, that is located physicaly elsewhere it would be harder to decypt.
 
@Jimbo you've got your passport on you right?
 
12:04 PM
@tereško why?
 
@astrosixer because it is pointless
 
it's not possible to do it with codeigniter
 
PHP has a function which does that for you
 
phpass?
 
12:06 PM
@Jimbo suitcase without an owner. someone will call the police. they'll decide it might be a bomb. they'll send a bomb squad. bomb squad will "defuse" your suitcase through controlled explosion.
 
is this hash to a different value for same string on a second time?
 
probably easier to call the police than virgin instead
 
@tereško
I mean can I add salt?
if I hash with this function
 
@astrosixer because it generates a random salt.
why would you want to add a fixed salt?
 
@Danack Yep, thank god
 
12:08 PM
@astrosixer if you need to check, if password matches the hash, you use this function: php.net/manual/en/function.password-verify.php
 
@Gordon :D
 
.. seriously, is CodeIgniter somehow making people more ignorant?!
 
@Jimbo the phone number for glasgow central lost property appears to be 01415309863 Maybe phone them directly.
They probably have a better clue of what to do, than someone one works on a switchboard.
 
@Danack They're all closed on a weekend :(
 
In my case Am checking for salt also
 
12:10 PM
@astrosixer why?
 
@Jimbo I am not joking. There was at least two incidents of "ownerless suitcase" at our central station. both ended with the police sending a bomb squad.
 
please go and read about have password_hash()works, @astrosixer
because you seem to be having no clue
 
user can login only if the username , password and the salt that generated from the pwd is same
 
@Jimbo Phone that number. I just spoke to the guy and they are open till 11pm.
 
@astrosixer so, you dont even understand how to verify a login
 
12:13 PM
If you think so may be am@tereško
 
read about how password_hash() works
please
for fuck sake
 
@Danack do you use phpstorm by any chance as well?
 
@Eugene Not by chance, it is a deliberate decision.
 
Okay. I can work with that as well :D
 
@Jimbo I'm guessing you got off the train at Manchester at 11:15. fyi That train arrives in Glasgow at 2:30pm
 
12:16 PM
Question is about it syntax understanding and where from it gets it. Is it correct gist.github.com/jeserkin/9cd5fc782435511206fd2fe403a0c3f3 or those values always depend on system at hand?
 
It depends, iirc.
 
@Eugene why are you defining those values yourself? They are built into PHP.
 
@teresko so I dont want to generate the salt right?
 
@Danack no no. This is a copy of what phpstorm uses.
 
@astrosixer salt should be random
 
12:19 PM
I do not define them.
 
@Eugene those values are correct for 64bit systems, but not for 32bit systems.
 
So they depend on architecture. Darn. Okay. Thank you.
 
so dont need to store it also?
 
@astrosixer and to answer the "but how then I know what the salt was": that's why the outoup from password_hash() contains information about the hashing algorithm, it's iterations, salt and the produced hash
you store the entire thing
and then use password_verify() to compare the password with the stored string
 
What I think is only that string to be stored in the db?
got it @tereško
Thank you
 
12:22 PM
@astrosixer yes
 
You just enlighten my thoughts
 
it also lets you "upgrade" your hashing algorithm later by checking with password_needs_rehash()
 
@kelunik meh, I'm used to writing applications that target particular systems, and can't be run on potatoes.
 
well.. my whole idea about this was pretty wrong
 
@Trowski Symfony uses the following for PID and exit code for processes, but if we do that, too, what do we do with the PID not being instantly available?
{ (%s) <&3 3<&- 3>/dev/null & } 3<&0; pid=$!; echo $pid >&3; wait $pid; RC=$?; echo $RC >&3; exit $RC
 
12:25 PM
@teresko wait a minute
 
?
 
when user login how should verify it?
 
you select the hash-string from the database based on email or other unique identifier
and you do the password checking on the php side
 
Ohh thats' it
okay I got it now
 
12:46 PM
Mornings
 
@PeeHaa good day :)
 
1:01 PM
!!uptime
 
╔═══════════════════════════════════════════════════════════╗
║ [22 hours, 10 minutes and 17 seconds] without an accident ║
║                since [2017-02-17 14:51:02]                ║
╚═══════════════════════════════════════════════════════════╝
 
!!version
 
@DaveRandom could you deploy latest @Jeeves pretty please?
@Gordon lol
 
1:26 PM
@PeeHaa not really, I'm in a ferry terminal with no computer
 
@DaveRandom no worries.
Where ya heading?
 
1:51 PM
@PeeHaa Dublin
Will be mostly out of contact now until tomorrow eve, probably
 
can someone help me, why my simple php-ext patch doesnt compile?
https://github.com/laruence/taint/pull/50
I dont know what the compile error is trying to tell me
https://travis-ci.org/laruence/taint/builds/202928675
 
PHP_FUNCTION(taint_str_ireplace);
probably
/ninjad
 
Ok, I finally managed to get a first successful page load of web-bugs with PHP 7.
But nothing works...
 
@NikiC thx
 
@NikiC what is this taint for?
 
2:37 PM
cross domain image using php
how to upload the image from one server to another using php
how to upload the image from one server to another using php
 
@Eugene see the projects description: "Taint is a PHP extension, used for detecting XSS codes "
 
Wes
afternoons
 
Yo wesley
 
Wes
yo Pieter Phaan
 
3:12 PM
@NikiC while playing with taint yesterday, the extension segfaulted when calling taint() [1] on a string which was initally coming from a super global (therefore was tainted by the runtime). the string went thru preg_replace() lost its taint flag and calling taint() on the result finally segfaulted.

my small repro of the same constellation doesnt segfault [2]. do you have an idea why this might be the case?

[1] https://github.com/laruence/taint/blob/master/taint.c#L1725
[2] https://github.com/laruence/taint/pull/51/files
 
 
2 hours later…
4:48 PM
@bwoebi You know some magic for a macro lookup table?
I want to make sure that table[N] for constant N gets inlined
 
@NikiC is const static not enough?
 
evening room
 
@NikiC you mean like a macro my_lookup_macro(3) ?
 
!!dad
 
Why couldn't the bicycle stand up by itself? It was two tired
 
5:02 PM
@bwoebi yes
@bwoebi is it?
 
@NikiC I thought.
 
5:50 PM
lol :P
 
 
2 hours later…
8:03 PM
@JoeWatkins for how long are you staying at phpserbia?
Also cc @Jimbo but I don't really like that james guy tbh
 
 
1 hour later…
9:12 PM
well.. fuck. now that each of my entities are nicely encapsulated behing private properties and public getter, how to I serve them from an api as json?
 
@Gordon I got it back :-)
Someone was kind enough to put it on a train back
 
@FélixGagnon-Grenier have a method, that returns array or implement some JsonInterface with toJson method
 
hmmm yeah, sounds about right
now let's overengineer a way to not have to write such method for every entity
except extending a common entity class...
 
@PeeHaa Yeah he's a bit of a tosspot tbh. I haven't decided yet, I don't know if it's a nice place or there's bombs going off etc
May make it 4 days or something
 
9:19 PM
@PeeHaa yeah... maybe it's ok to define the function and choose what each entity returns anyway
I was thinking about messing with the __toString method
but... considering the timeframe, yeah, getAsArray wins the day
 
9:33 PM
@FélixGagnon-Grenier to string is kinda annoying because well it's a string. Probably useful to have some sort of a datastructure
 
Wes
evenings
 
Wesminster
 
Wes
the man in the high castle is nice tho
 
yeah... don't tell teresko, but I wrote a getAsArray method and make the entities I need as json extend it. it sucks because now the properties need to be protected as well...
 
moin
 
9:35 PM
o/
 
\o
 
o/
 
\o
 
Wes
can people even use google maps on their phone? i got lost today, and the fucking map kept rotating
i need to get a tom tom
 
Been using the app almost every day these last few days
 
9:38 PM
@Wes I thought you were less than 85 years old
 
Sometimes it gives the looong stupid route but mostly it works just fine on my end
 
Wes
i don't like inaccessible technology @FélixGagnon-Grenier the stupid thing kept rotating the map every few km and i had to stop every time just to reset it
 
@Wes maybe use another app ?
 
Wes
fucking piece of shit. not to speak that every time i need it the app changed completely so i have no idea how to use it
took me 20 minutes just to set it up
and yes, i'm old
i hate smartphones
i want my hardware keyboard back
and my paper maps
 
^
not ^
 
Wes
9:42 PM
and my fucking VHS
 
and your 13" CRT?
And HTML1?
Dialup?
 
Netscape Navigator
 
Wes
those were the days...
 
@MadaraUchiha I watched an anime. An event rare enough to be noted :D
 
@Trucy Which one?
 
9:43 PM
I binged 25 episodes in 2 days. (Danganronpa 3)
 
@Wes I second you there
 
@Trucy Gotta say I've never heard of it.
 
Wes
@Trucy you got infected... on purpose?
 
@MadaraUchiha Do you like Phoenix Wright?
 
@Wes was just thinking the same
 
9:46 PM
@Wes Yeah, and I liked it :D
I'm very selective about what I watch and what I play
 
@Trucy Haven't seen it, it's on my list somewhere
 
@MadaraUchiha I was talking about the games :D
 
Oh, got mixed up with something else
Yeah, haven't played them either :D
 
Danganronpa is a game series. The 1 and 2 are on Steam iirc, but also on Vita and PS4
 
Wes
@Trucy got chlamydia too? :B
 
9:47 PM
And it's FUCKAWESOME
@Wes Is that a type of pasta?
 
Wes
no :B
 
00:00 - 22:0023:00 - 00:00

« first day (2317 days earlier)      last day (2625 days later) »