« first day (2326 days earlier)      last day (2608 days later) » 

12:27 AM
Current status, reaching for the rum: https://t.co/YH4RZfn6Ih
 
I'm experiencing a weird problem right now, and I hope someone can help me
 
@Wes I've used a mac for ages. The fonts are so easy on the eyes, that anything even not quite as good, hurts.
@Unknown you want to share some of my rum?
 
Sure
 
pours rum into computer
 
is it your good rum, or well?
 
12:29 AM
If I include class1 and class2, and class2 also includes class1 in it, my script crashes magically.
 
Wes
@Danack windows fonts' rendering isn't very different from mac's imho
again it depends on clear type
 
Is the double-inclusion the problem, or could it be something else?
 
@PaulCrovella It's sailor jerry's. It's not bad, possibly some people might think it has a 'boring' formulaic taste.
@Unknown Are you using auto-loading?
 
@Danack sounds perfect for mixing. I'll have some with coke.
 
in fact, forget the rum.
 
12:31 AM
@Danack If this is not enabled by default - no...
 
@Unknown wait actually, can you provide a simple example, or can you explain exactly what you mean by "includes"?
 
includes file1 = "include 'file1.php'" - and forget about class1 and class2, I'm talking about files
 
even better, how 'bout a proper error message? see stackoverflow.com/questions/845021/… if you're not getting one at the moment
 
@Danack I like meself some sailor jerry
 
@Paul Thank you very very much
 
12:38 AM
@Unknown At the risk of short-circuiting the process, and you missing an important lesson on how to describe problems you're seeing to other people clearly; try using include_once instead of ìnclude`.
 
Having error messages is going to solve most of my problems I guess.
 
> ì
^^ what?
 
indeed
 
I didn't know there's a way to see the error in PHP
That's why I hated PHP
Now I still hate it, but I can use it
 
wait until you figure out how to use a debugger
 
Wes
12:39 AM
expression; // trailing comments

or

// previous line comments: (refers to following line)
expression;

or

expression;
// ^ next line comments (refers to previous line)
 
:DD
Do I have to replace both "include"s by "include-once" or just one of them?
 
then you'll hate it, be able to use and debug it
 
kk
To this moment, I always had to comment every single line out, until I found the one that caused the error :D
 
@Wes 1 or 2, depending. never 3.
 
@Unknown if it's your own project, start using an autoloader, such as the one that comes with composer: getcomposer.org/doc/01-basic-usage.md#autoloading If it's not your project, probably use include_once everywhere, and ask the person in charge why the project isn't already using autoloading.
 
12:42 AM
Okay :D
It's my project, I'll try to use the autoloader tomorrow
If it wasn't my project, I wouldn't have to deal with PHP :(
 
someone link to that "using a debugger" video
 
there we go
 
!!issue please make youtube.com/watch?v=LUTolQw8K9A be a command like !!debugger, or similar.
 
12:45 AM
ta
 
Command '!!debugger' aliased to '!!say youtube.com/watch?v=LUTolQw8K9A';
 
!!debugger
 
\o/
 
12:49 AM
that's neat
 
Wes
1:36 AM
@Ocramius @Danack youtrack.jetbrains.com/issue/WI-35206 opinions?
 
hi guys i have a question
 
I have an answer
I don't know if it's the right answer but it's an answer
 
I got a rock.
 
i have got this quiz
<style>
body {
background: #333;
}
</style>

<?php

$numbers = [10, 20, -20, -30, 0, 0, 0];
echo "<ul>";

foreach ($numbers as $number) {
if ($number > 0) {
echo "<li style='color: #080;'>Positive Number : {$number}</li><br />";
} elseif ($number < 0) {
echo "<li style='color: #F00;'>Negative Number : {$number}</li><br />";
} else {
echo "<li style='color: #FF0;'>Zero Number : {$number}</li><br />";
}
}
echo "</ul>";
my question is : how can i count how many positive or negative or zero number is there
In this example there is 2 positive numbers how can i print that with php
 
Wes
sorry, we won't make your assignments. just study. in few hours you'll be able to figure out how to do that
 
1:50 AM
@Wes Thanks for your useless answer
 
I'm with Wes here but I would suggest you look into loops and conditionals
 
Wes
@WaelAssaf there is a reason it's your assignment and not ours
 
looks like php. fuck that.
 
Wes
2:06 AM
wun wun died irl too :( rip Neil Fingleton
 
2:26 AM
shiite... is there a php5 equivalent / trick for getReturn?
 
@FélixGagnon-Grenier yield "return" => "what a shitty workaround";
 
hmmm... right, I can do with that. what a shitty workaround indeed :)
ta!
@PaulCrovella didn't want to hurt your feels, it's also somewhat smart ;)
 
3:17 AM
GoT please come out already
 
@Fabor I'd tell you a UDP joke, but you might not get it.
5
 
:X
 
3:41 AM
mornin
 
 
2 hours later…
5:16 AM
Hey guys , i have a question ! i am designing a site for sell products online .. my question is should i design the page of the selected product before i start developing ?
 
5:42 AM
morning
 
Wes
god. slept barely 3 hours, woke up like i was in a hurry, but i'm not -__-
 
morning
 
5:58 AM
Any ideas why `openssl_encrypt` would return `false` in the following context?
```<?php
error_reporting(-1);
$data='s:40:"UPrqrAM3CiLD6jkvuSwRXSNeXaWFJ52WeKhOzHTQ"';
$method='AES-128-CBC';
$password='9xaco67hsmrHBiSveCq5jwaeu7XoXJgX';
$options=0;
$iv=base64_decode('zCBxE0HtYgXEEr+EMq9Agg==');
$value = openssl_encrypt($data,$method,$password,$options,$iv);
if($value === false)
{
echo 'Encryption failed ';
while ($msg = openssl_error_string())echo $msg . "<br />\n";
}else{
echo $value;
}
?>```
through my vagrant oracle virtualbox setup on windows, but not my (identical?) oracle virtualbox set
I have tried running: vagrant@dev:~/core$ php -m | grep openssl
and it returns: openssl indicating the extension is enabled
no errors in my simulation, and nothing outputted by openssl_error_string
the same code works fine in phpfiddle
 
Mornings
 
hmmm, think it's a bug: virtualbox.org/ticket/16369
 
6:19 AM
posted on February 27, 2017

New Cyanide and Happiness Comic

5
 
Wes
6:40 AM
i've killed code coverage :\ i.imgur.com/527p4OS.png
any clue on what could cause that? no errors.. it just reports everything empty
 
how did you run it?
 
Wes
the usual way, using phpdbg
i did not change nor updated anything
wtf. the tests all run correctly
agh, i really don't want to compile xdebug again :B
 
Wes
7:12 AM
how do i print the phpdbg code coverage thingy? iirc there was one
 
@Wes you mean like phpdbg -qrr vendor/phpunit/phpunit/phpunit --coverage-text ?
 
Wes
nope, i remember bwoebi posting a screenshot of a code coverage report within the cli
that btw does the same of the html report... i get a nearly empty file
lemme check out some old commit...
 
interesting, as that gave me a code coverage report within the cli
 
Wes
i didn't even notice... but what bwoebi posted was with colors and everything... must be another thing
Code Coverage Report:
2017-02-27 07:25:38

Summary:
Classes: 1.59% (1/63)
Methods: 5.19% (11/212)
Lines: 13.66% (124/908)
wtf
lol code is called, i can see its output during the test, but it doesn't get covered
dogdamnit
 
7:30 AM
what's your phpunit config?
 
Wes
phpdbg.exe -qrr "./vendor/phpunit/phpunit/phpunit" -c ".\phpunit.xml"
i haven't changed these in ages
a commit from few hours ago works, but i don't see why it would be different
damnit
 
Wes
no closures around. i'm aware of that
it's definitely the file
something kills it
 
what editor is the best one in linux? vi ?
 
!!xkcd real programmers
 
7:42 AM
 
'null' == null //false
?
@Wes same result
 
Wes
@CheckMeOut don't use ==, use only ===
you should only compare equal types
 
@CheckMeOut working as intended.
 
Wes
@PaulCrovella holy shit, it was that, use function whatever;
but i've never noticed it causing that
 
but it should cast to boolean if there is string?
is_null('null');//false
 
7:46 AM
huh?
 
Wes
imho, trying to remember how magic coercion works is pointless effort @CheckMeOut
if you have a string, compare it to a string
 
@Wes At least they must define data type for each function and cast what ever to that type..
 
Wes
eh?
you don't want stuff to be converted automatically, ever
 
@CheckMeOut could you rephrase what your concern is? it's difficult to tell what you're on about
 
mornin'
 
Wes
7:52 AM
\o
 
:35851918 either is_null('null') or is_null(null) must return true..

           function is_null(<boolean>val : any = false): boolean {
               return val === null;
           }
 
Wes
function my_is_null($val){ return $val === null || $val === "null"; }
 
is_null(null) is true, and I don't know why you think it takes just bool as an argument
 
@Wes that's ok but I was thinking of manual...
 
Morning
 
7:56 AM
is_null ( mixed $var )
 
Wes
still not understanding
 
is_null('null')
So in string it returns false ?
 
a string that says "null" is not the same thing as null
 
yes , that's true
 
if you cast null to a string you get an empty string
 
7:59 AM
moin'
 
'nin
 
morgen
errr o/
:P
 
moin
 
8:04 AM
I am having problem here instead of this $('#container1').highcharts
I am using
 
@metalhead101 umm... there is a js room... you should probably ask there
 
@metalhead101 You might have a better chance of being answered on the Javascript room. This is a PHP room.
 
ok thanks
 
Dunno why people keep posting JS questions here
 
8:06 AM
yes
Ask JavaScript questions here. That's what the JavaScript Room is for.
Look at this
 
"I'm feeling sick, I should go to the mechanic"
 
@Trucy makes total sense when you are a cyborg
 
@Gordon or... Genji
 
or cyborg genji
 
Genji is a cyborg.
 
8:09 AM
^
 
OR maybe he is Doraemon
 
Also, most of them don't get help with jQuery in the JavaScript room, so they assume the guys in the PHP room knows jQuery more
 
:P
 
Which let's be fair, if you're using PHP it's likely that you're outdated enough to use jQuery 😃
 
Yes they do know more I guess :D
 
8:10 AM
they should try the C++ room then
 
@MadaraUchiha I got a flag message response stating you explicitly mentioned not to ping mods in chat. That's hilarious.
 
@Gordon Wat?
Screenshot?
 
@MadaraUchiha What JS library does COBOL users use?
 
jCOBOL
 
8:13 AM
@Trucy MooTools.
 
holy crap, i forgot about mootools
 
We need a rule 34 for js libraries
"If it exists, there's a js library about it"
 
@Gordon lol
 
gosh, @gordo, when are you gonna learn how to interact with mods properly
 
8:16 AM
@MadaraUchiha on a side note: I am not convinced the commentor I mentioned isn't involved. sth I learned from being a mod.
@PaulCrovella nevah
 
@PeeHaa I was working on a compiler I mentioned in saturday, and got some inital results with translating PHP source class skeleton info C and results looks like that i.imgur.com/ApkhmOE.png
 
Wes
@PaulCrovella thanks for helping me with the code coverage bug. i've saved a bottle of rum
at least i can continue now :B
 
you're welcome. enjoy.
 
@PaulCrovella Got it? Now it's a TCP joke.
 
@MadaraUchiha Yes, I acknowledge that I got your TCP joke.
 
8:28 AM
How do I search data having multiple categories?
Like filtering the data to be shown depending on the category that ive chosen.
 
I'm teaching someone html. He is not improving.
 
Anonymous
moin
 
@SalOrozco teach him something else
 
Like?
 
checkers?
 
8:31 AM
hahaha
Html is easy right.
When I, learned it was easy.
 
It's still easy, innit?
 
Yes
 
I taught HTML to a bunch of middle-schoolers
They got it
 
lol
Maybe I'm a bad teacher.
 
Maybe he's a bad student :D
 
8:33 AM
haha
 
Or maybe you don't have a good approach with him
 
why_not_both.jpg
 
I'm starting to think that too.
 
@SalOrozco why would you need to teach someone html. html5 doesn't even have a DTD or Schema. Basically anything in <> is valid even when invalid.
 
can you guys open bg2.php.net ?
 
8:34 AM
negative
 
non
 
ThW
Morning
 
its been down for 1 week now, i wonder if it got shutted down for some reason
 
@gordon he wants to learn php already
 
hey @ThW - I don't suppose you've implemented an xquery processor... or even just parser.. have you perchance?
 
8:39 AM
9
Q: Execute a XQuery with PHP

abernierHow to execute a XQuery in PHP? Can you give me an example? Thank you.

 
I've seen it, zorba seems dead
at the moment I'm kicking things out to saxon and playing with basex, but that shit's annoying
 
the zorba one and the sourceforge one are the only ones I know for php
both dead probably
 
zorba sounds like zombo or zalgo, maybe they're your answers
 
o/
 
@brzuchal cool
 
8:51 AM
That was the easiest part IMO
Building extension skeleton and dumping class with method signatures
But looks promising
 
moin
 
@JayIsTooCommon You back on your island again?
 
Oi @Naruto you slacker :D
 
ah, I gotta love when this site reminds me why I never should leave comments for DV's :D
 
Anonymous
8:59 AM
@PeeHaa yep, while I was away our web services got 'attacked' from a Netherlands IP. Considering I just resigned, guess who they suspected..
 
:D
 
@brzuchal also recki-ct?
 
o/
 
@Epodax hmm... wonder what the over/under is on two of those being from dude, and the other two being from the sockpuppet that upvoted his question
 
9:00 AM
@Gordon Thanks, I'll give it a look
 
Anonymous
@PeeHaa it was actually just a vulnerability checker bot .. their solution? Turn off public facing websites for the weekend.
 
just enough for each to stay under the voting correction script radar
 
hehehehe
How was the trip. All awesome because we are awesome?
 
Wes
@brzuchal noice
 
I know there are lot of things I need to consider, for eg. AST tree traversing to explode information about dependant extensions
And possibly plenty of things I don't know right now
 
9:02 AM
please don't generate extensions from php code, unless it's just for fun ...
 
@PaulCrovella Hah, the chances are properly high, although I figure the reversal script will catch it during the night, he (/she) hasn't really been that smart about it.
 
Anonymous
@PeeHaa Yes, turns out it's not the third world. Your country along with it's peeps is/are awesome. I assume you must be an anomaly :D
 
:P
 
@JoeWatkins why not?
 
ThW
@PaulCrovella nope :-)
 
9:04 AM
@Epodax well bookmark stackoverflow.com/questions/42481338/… to hand to a moderator for context if the reversal script doesn't pick it up
 
@Gordon jimthunderbird's is quite legacy, full of regexps and loops, but I'll try to find something usefull from this
 
it's not a solution to anything, most of the people who might use it to generate extensions don't know how to debug C, and those people that can are able to just write better extensions than you can generate
 
Anonymous
!!wotd
 
bumbershoot: an umbrella.
 
"bumbershoot" sounds like something you should not do with an umbrella
 
9:05 AM
@PaulCrovella Thanks and done.
 
Anonymous
!!cancer
 
> ♋ Cancer | June 21 to July 22
It may be years before your coworkers treat you with respect again, but it will have been worth it for the brief time spent inside the panda suit.
http://www.theonion.com/features/horoscope
 
@JoeWatkins Well, I suppose yes, but I wanted to create something what can generate C extension from PHP code so I can maintain only PHP code and won't need to maintain C and polyfill in PHP
Also this would help me to better understand internals
 
but you won't need to maintain PHP code, you'll also need to maintain the platform you use to generate, and it will have bugs, so then you are debugging the platform, and the extension, and possibly the php code ... you are just making your life more difficult, yours, and anyone who decides they will use it ...
 
For extensions which are adding some functionalities based on libs etc. this won't be any usefull thing, but for those who just want to compile their code and get compiled extension which is not a PHP code
 
9:10 AM
not going to argue the toss about it, imo there is no value in it whatever ...
 
I wanted to hide my PHP code, and for now I don't have any tools for that
 
if you want to hide your code, don't distribute it
 
:P
 
I'm not joking
 
Yes you are
 
9:12 AM
no, he's not
 
Wes
what is this obsession of hiding the code that everybody has :B
mornings \o
 
Most of other languages have possibility to deliver some precompiled artifacts and PHP hasn't got, how to deal with that?
There is no way to deal with that in PHP
 
it doesn't need a way to deal with that
 
There may be situations when licensing is not enought
 
@brzuchal and most other languages have a way to decompile the artifact
 
9:16 AM
there is no language that cannot be reverse engineered
@brzuchal software as a service, or managed service ... you host the software, you provide a service ...
 
@brzuchal code in malbolge then. Nobody will want to read your code
 
@Gordon @JoeWatkins yes, but AFAIK this is not the same source code
 
even C can be reverse engineered, you can't get the original code back, but you don't need it, you can get the assembly and from there generate whatever language you like ...
 
@Trucy this is not a solution
 
it doesn't need to be the original source code to leak your secrets ...
 
9:18 AM
@JoeWatkins That require some work to be done. IMO there is no way some Junior or Middle PHP developer will handle that
 
these are not the people that try to steal your secrets ...
 
this is the one time this year we have to have this conversation, right? quota's been met?
 
@PaulCrovella Last year was that conversation
 
Wes
also code is crap. some said that if you manage to steal actually profitable code, likely you'd need the person who written it in the first place for it to work / be maintained
 
All that voices are telling me to abandon the idea :/
 
9:21 AM
that's not true, reverse engineering happens all the time in the real world, they don't just deploy your code, they are looking for your ideas, for inspiration, and the law protects them, they are allowed to do that
 
Wes
which is the reason, i suppose, acquisition of code never go well. you buy the people who write and maintain it, not the huge pile of crap that code is
 
LOL
 
Wes
@brzuchal actually, i would use it for performance reasons
 
moin 11
 
9:23 AM
o/
 
Wes
\o
 
@Wes there is no remarkable difference between C code calling an internal function, and the vm executing it ... the only way there is going to be a performance difference if you compile down to something lower than Zend level code, which is not what is being discussed ... and even that is not a good idea, because you don't know how to debug assembly, or dynasm, or libjit IR or the code it generates ...
this can't work for the good of anyone ...
 
I was trying to find a field to provide some usefull thing for the PHP community :/
 
ask a different question ... "is it useful for PHP programmers to be able to write extensions?"
maybe ... maybe it's useful for php to have rinit/rshutdown, module globals, ini entries, access to lower level zend functions ...
 
good memory profiling would be useful. make that happen.
 
9:26 AM
The question would be, what can I involve which will bring some usefull features/things for community?
 
profilers are hard
 
I thought it could be usefull
 
The PM is deleting our closed off issues, whyyyyyy.
 
Anonymous
@Sean kick off. Throw some chairs about or something
 
@JoeWatkins I am much faster writing php code than I am writing C code. for me it would be useful to be able to write code in php and have that autoported to C and then only do some polishing.
 
9:27 AM
@JayIsTooCommon I'll say you let me do it
 
@Sean Maybe OCD. Maybe ask him?
 
Should I learn C?
 
@Gordon that's a temporary limitation ... the kind of code you can generate is not going to be the same kind of quality as the code you write, it isn't going to be able to deploy the kind of tricks you can deploy as a C programmer: using more appropriate data structures for the task at hand and so on
 
morninininings
 
9:30 AM
\o
 
Wes
@JoeWatkins how about call overhead?
 
@SalOrozco you cannot learn C. Best you can do is trying to learn C but it will always be just hackery and trial and error until it no longer segfaults.
 
hold up, at some point it no longer segfaults?
 
Wes
the difference between a function returning true and accessing a field containing true is massive
 
@Wes there's call overhead in the vm, and internally, only nobody is optimizing the overhead for internals, there is no point ... take a look at the number of branches in zend_call_function, and look at the simplicity of it's sister opcode ... you are better off writing PHP
 
9:31 AM
> the kind of code you can generate is not going to be the same kind of quality as the code you write
you havent seen my code
 
@Gordon temporary
 
@JoeWatkins But I suppose there are developers who don't need such optimisation at C language level
 
I am seriously afraid of that moment when my C code becomes "good". It means I must have slipped into insanity.
5
 
@Gordon I get what you are saying. Why C and not C++
 
dramatic, I don't think you really think like that ...
 
9:36 AM
maybe tongue in cheek but with a grain of truth. all the people I know that can write at least half decent C code are weird. and yes, that includes you :)
 
Shame I lost my college C projects…
 
or maybe weird is the wrong word. but certainly different.
 
I dunno why you are saying these things
I look up to Nikita and Bob, probably they are the best programmers I come into contact with, they are not strange or different, being correct 99.999999% of the time is not strange, it's the aim of the game ... I don't know why you wouldn't want to be like that, I aspire to be like that ... they are like that because they understand C and the levels below it to such a high degree ...
 
Anonymous
@JoeWatkins I think @bwoebi's a complete weirdo personally
 
Wes
super slow internet today. gods
 
9:44 AM
@JayIsTooCommon didn't need to ping bob, he finds me talking like this awkward and wanted to spare him ...
 
Anonymous
@JoeWatkins sorry, I wanted him to see my insult :( <3 @bwoebi
 
@JoeWatkins you are a decent C dev. Of course they don't seem different to you :)
 
maybe we are different in the sense that we understand code at a level below, or in some cases several levels below your understanding ... but there seems to be a negative slant on the word different, or strange, and I don't understand that ... why wouldn't you want that for yourself, why would you dread the day that you have the same kind of understanding ?
you can't be serious, I think
 
Wes
Why it takes so long http://www.commitstrip.com/2017/02/24/why-it-takes-so-long/ https://t.co/XQXePAq3vp
 
Best security precautions for PHP Api's
???
Like Tokens
 
9:54 AM
lol
 
what else must be considered ?
 
yohaa
 
yojoe
 
I am new to PHP lol
anyone ?
 
I'm going to do actual work ... while @Gordon changes his mind about his aspirations ... be back in a few hours, I expect maximum change ;)
 
9:58 AM
@JoeWatkins it's not negative. And I already said it's tongue in cheek. my experience so far with C was a PITA, so I guess it takes some brains to wield it properly. if it helps, it's kinda acknowledging your smartness.
but everyone knows it's a thin line between insanity and genius
 

« first day (2326 days earlier)      last day (2608 days later) »