« first day (2371 days earlier)      last day (2591 days later) » 

9:01 AM
well, shit
 
:P
 
so, TIL: having domain object, where status NULL and status 0 has different semantic meanings is a really terrible idea
 
:D
 
basically, it causes a shitfest, when data from DB starts coming in and you have to cast it
... and this, children, is why we write unit tests
(and also why we use class constants to alias the status values)
the sad part is: this is like the 4th time I have had to re-learn it
.. sometimes I suspect I am a bit dense
 
Wes
ah @pmmaga there's also this 3v4l.org/CU0t2 which will be indirectly fixed by that rfc, i suppose
 
MGE
9:12 AM
hey
I have a problem with this:
 
beer should help
 
MGE
$cleanDatabases = array('organizers','events','users','tickets','ticketstock');
foreach ($cleanDatabases as $key => $value) {
	$statement = $this->_db->prepare("TRUNCATE TABLE :tablename");
	$statement->bindParam(':tablename',$value,PDO::PARAM_STR);
	$statement->execute();
	echo '<pre>TRUCATE TABLE '.$value.'</pre>';
}
 
you cant use parameters for table names
 
MGE
Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''organizers'' at line 1'
wow
thanks
 
9:18 AM
@Wes i think it probably will yeah. :)
 
@MGE the prepared statements essentially get "compiled" on the RDBMS's side
 
Wes
@pmmaga thank you a lot if you intend working on that, really. i'll do anything else i can actually do, like updating the documentation if needed, or the tests (manual/phpt)
 
ad to check for the correctness, it requires the table a column names to be in the statement, instead of being dynamic
 
MGE
solved, thank you very much
 
Is there an easy way to get file name calling function which is delivered in extension in C?
 
9:23 AM
@Wes i would still prefer to help you do it (give a man a fish...) :P
 
Or do I need to study debug_backtrace() implementation?
 
I don't understand the question
 
function aa(){$caller_filename=debug_backtrace(0)['file'];} how to achieve this in C
 
@Wes but to be clear, you mean yours that went on voting now or the other one we discussed a couple of weeks ago? (i don't properly remember what it was exactly TBH)
 
@JoeWatkins I mean similar but get caller filename
 
9:26 AM
!!lxr _zend_execute_data.prev_execute_data
 
@JoeWatkins Nothing went wrong but I couldn't find a suitable definition
 
Wes
@pmmaga wiki.php.net/rfc/allow-abstract-function-override this one. i can read code, but i keep getting lost reading what stuff is. how do you do that? like, i find myself navigating hundreds of poorly named infinitely nested macros, objects and stuff up to the point i don't even remember what i was doing in the first place
 
previous frame in internal function will be calling frame
 
ok, thx
 
9:27 AM
Remote socket URI with unique persistence identifier broken – #74429
 
@Wes i know i sound like a broken record but a debugger goes a long way in showing you exactly what's going on at that point of the execution
 
No idea what that does. 1 sec let me load random JS snippets from random people in my browser
Nothing happened :P
 
now?
 
anti climax++
 
9:29 AM
on another note, make is not detecting my changes in .re and i do have re2c installed. any ideas?
 
oooooh
fancy
ooooooooh 2
 
Crucially it checks they are <140chr
 
it even does lenght checks
yeah
noice
 
@pmmaga try deleting generated file (*.c)
 
9:31 AM
@krakjoe they help to make your life miserable so they *are* helpers
 
I could live with it submitting automagically btw @DaveRandom
For the extra laziness touch
 
@JoeWatkins yeah, deleting it and getting it back seems to have done the trick. but it's weird, in my setup at home it goes fine without needing to do this
 
Wes
you don't sound like a broken record and you are right, but i bet setting up that requires ages too. i couldn't even run phpdbg :B or compile php on windows for years :B
 
depends what you're editing, most of the makefile rules will be something like some.c: generator-rule so that if the c exists the generator rule won't be entered
 
@PeeHaa If you want, I didn't do that because you might hit it instead of starring a post
Hard to undo accidental tweeting
 
9:36 AM
@DaveRandom It's easy to do
Just not implemented in the bot yet :P
Pretty sure the lib supports it
Or do you mean hardish to get the actual id of the new tweet?
I like how you hotlink to a random image site btw :D
 
Well it's easy for me and you to do it, but a lot of people can tweet
@PeeHaa hosting is for losers
 
:P
 
screenshot for anyone who cares
 
oh that looks nice indeed
 
actually @PeeHaa if I move it to the other end of the starred message it would be less of an issue anyway
 
9:39 AM
Doesn't unicode support brand logos yet? :P
 
what voodoo is this ?
 
userscript
 
sirscript*
 
gist above
 
and what voodoo is that ?
 
9:40 AM
satanism for browsers
 
And then this mail was in my mailbox: medium.com/fuzz/php-a0d0b1d365d8
 
@JoeWatkins is this really a security issue bugs.php.net/bug.php?id=72091 ?
 
Could you fix it so I can see it please? <3
 
@PeeHaa gist updated. If you don't like the confirm() just remove it
 
9:52 AM
ty
.
 
Why don't the icons show up for me?
@DaveRandom Yo know what that means right?
!!blame
 
@PeeHaa printf() failed, check your format string and arguments
 
:P
 
@PeeHaa It works on DOM mutations, so they don't show up until something happens in the starred list. If you run it in tampermonkey it will be fine because the script will be executed before the starred list is loaded, but if you just execute it in the console it won't do anything until someone stars or unstars something or the list is reloaded for some reason
 
@krakjoe I have no idea how that code works either. it's wordpress. the only line I understand is sort :)
 
lol so many pings for poor joe
I like how it implies @JoeWatkins is doing wordpress
 
yeah, you people need to shut up
 
tnx btw @JoeWatkins
 
!!annoy PeeHaa
 
9:58 AM
@PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa hi
 
@PeeHaa yw
@PeeHaa btw
 
lol
 
@PeeHaa sorry it took me more than 15 seconds
@PeeHaa end communication
 
so, does anyone have any theories why it's not particularly common for libraries/frameworks to distribute as .phar archives?
 
@Stephen we have composer so distribution is easy as it is I guess
 
10:01 AM
apart from composer not supporting it, and all the cool kids using composer
 
foreach infinite loop – #74431
 
Based on my experiences with java apps distributed as jars, I'm not anxious to repeat the experience in PHP
I have never had one that I didn't have to modify in some way
 
@Jeeves wut
Does that really happen?
 
I can't repro on 7.1.2
 
It says opcache, so it could
That sounds like a very opcache problem ^^
 
10:04 AM
oh opcache
 
oh
yeah all hope is lost
 
@DaveRandom are you really downloading dependencies via composer, and then editing those dependencies locally?
doesn't that defeat the purpose?
 
So annoying that not all info is on the main bugs pages
nvm it is :P
Just not readin it right
 
@Stephen no it's just that people always package config files in jar archives. It's more user error (on the part of the distributor) than anything else, but people will end up doing the same thing.
 
can't repro with opcache either
 
10:07 AM
I can't on 7.1.3
oh it says 7.1.2 and .4
 
do people currently package config files in composer?
 
Isn't opcache also influenced by the earth's magnetic waves?
I alsways assumed it does
 
10:19 AM
> Your posts are like the things a drunk shouts on a bus when he gets shaken awake by a pothole.
 
tell me someone sent that to Y. ... please say it's so ?
 
Anonymous
!!wotd
 
hypozeuxis: the use of a series of parallel clauses, each of which has a subject and predicate, as in “I came, I saw, I conquered.”
 
@JoeWatkins Do you guys make use of mutation testing?
 
want too, made everyone read about it, then discovered it was abandoned, but now it looks back on ...
 
10:32 AM
cc @Wes you used it yet?
 
Wes
nope. i don't remember who but someone in here did
 
!!remind reply to that guy telling him I am not afraid to revert crap in 6 hours
 
Usage: !!reminder [ examples | list | <text> [ at <time> | in <delay> ] | unset <id> ] Try !!reminder examples
 
Fuck you
 
Wes
apart joe i mean
 
10:33 AM
Reminder 36615730 is set.
 
marco
I just told you to look into it for us :P
 
@JoeWatkins Does that mean you hate yourself?
 
a little, but if I take on more work, I'll break or die ...
 
@PeeHaa just use !!in ffs :P
 
Wes
@PeeHaa my tests are already wonderful
#iswear
 
10:35 AM
@Ekin :P
 
I think @kelunik was experimenting with it
 
user2976478
10:46 AM
hey
 
user2976478
I have encountered one problem..
 
user2976478
$dates = Post::where('created_at', '>=', $one_week_ago)
               ->groupBy('date')
               ->orderBy('date', 'ASC')
               ->get(array(
                   	DB::raw('Date(created_at) as date'),
                   	DB::raw('COUNT(*) as "count"')
                ));
 
Ah I see the problem
Laravel's querybuilder is stupid
 
user2976478
haha
 
:P
Actually s/Laravel's//
 
user2976478
10:48 AM
and i am returning the variables $dates and $count to the view..
 
user2976478
So in the view it is:
 
user2976478
@foreach ($dates as $date => $count)
  <p> {{ $date . ' - ' . $count }}</p>
@endforeach
 
user2976478
I am getting the output as:
 
user2976478
0 - {"date":"2017-04-07","count":7}

1 - {"date":"2017-04-08","count":2}

2 - {"date":"2017-04-12","count":4}

3 - {"date":"2017-04-13","count":1}
 
user2976478
the output is correct.
 
user2976478
10:49 AM
but some dates like 2017-04-09, 2017-04-10, 2017-04-11 are missing
 
user2976478
as on that day no posts where added to database.
 
user2976478
But i need their output to be "0"
 
user2976478
Can anyone help me with this please :)
 
Either start with a range of dates or process the recordset and add the missing data afterwards
 
"add the missing data afterwards" - do that. You could also solve it by generating a temp table that holds all of the dates you want, and doing a left outer join of your results to that temp table......but just filling in the holes with PHP code is way easier.
 
10:53 AM
@Saurabh I doubt you will get any help here regarding Laravel. Nobody really uses that crap here.
 
user2976478
@tereško i couldnt find anyone in laravel room :p
 
@Saurabh It's fine as long as it's a generic question
 
user2976478
@Danack "but just filling in the holes with PHP code is way easier" how??
 
user2976478
Thanks @tereško
 
10:58 AM
@JoeWatkins, the issue was that i didn't re-run configure after installing re2c. it is now properly detected. :)
 
@Saurabh i) write some php code using DateTime and DateTimeInterval to go through the dates ii) For each date, look in the results of the query to see if there is data set. If there is, put entry's value into a new array. If there isn't put 'count' => 0 instead. iii) Render from that new array instead of from the results from the DB directly.
 
Hii
 
user2976478
okay @Danack
 
Can anybody help me
Why this site is not opening
 
11:03 AM
look at the error logs
I am not going to open some random site
 
It's showng Fatal error: Call to undefined function session_start() in /home/public/qa-include/app/users.php on line 146
Or the site owner can only solve this
 
@Koolman did you compile PHP yourself?
 
you have not installed php-session extension
 
@tereško I don't know how to do tis
I am just an user
 
Wes
you have the session ext disabled
 
11:05 AM
then you dont
 
Wes
@Danack explain yourself "Just buy a Mac."
 
you need an admin level permission to fix it
 
Oh that reminds me
 
So I cannot do anything
 
yup
 
11:06 AM
@Danack how much effort is involved in formatting a Mac?
 
ohk
Thanks for helping
 
@DaveRandom no idea - never done it.
 
There's a guy at work whose machine is running like crap and I'm pretty sure it's just because the OS is full of junk and a fresh format will be a huge improvement, but I have never touched OSX in such a kinky way
 
@Wes I bought a 'powerful' Windows desktop. It's piece of fucking shit.
 
got bootable installation media ?
 
11:08 AM
I assume that won't be too hard to obtain but that's probably wrong as well because Apple
 
it's got a graphical installer as you would expect
 
@DaveRandom you should probably take it to the fake bar with those who pretend to be geniuses
 
@DaveRandom apparently just reinstall from the app store - support.apple.com/en-gb/HT204904
 
@tereško that is precisely what I am trying to avoid
 
and next time - buy a PC
 
11:09 AM
I said that already
that was the first thing I said
 
Obviously you've checked the fans aren't just knackered and the CPU isn't overheating?
 
I mean fuck, if he really wants a mickey mouse OS he can run ubuntu
 
:D
 
I run ubuntu
 
my condolences
 
11:11 AM
@Danack no, actually, good point. I don't touch them, I just had a conversation about it
@Danack thanks
I also said that a fresh SSD probably wouldn't be a bad idea, dunno what's in it right now but it could be swap overload as well
regardless, the OS is full of shit
 
if you take a mac apart, Thor appears and fucks you with his hammer ... I think ...
2
 
for the record - my 2011 MBP has never had the OS reinstalled, and it hasn't shown the performance drop off that is typical with Windows machines. Unless they've installed some crap that is running in the background, I'd be moderately surprised that reinstalling the OS made that big a difference.
(unless that is a 'feature' of new versions of macOS)
 
@JoeWatkins seeing the length to which Apple has gone to prevent 3rd parties from fixing their hardware, you are closer to the truth then you would expect
 
@Danack my gfs mbp got so slow that it became unusable and she had to buy a new one. reinstalling the OS didn't help, I guess Mac doesn't really care about people using old hardware with their new fancy OS
 
11:27 AM
Wrong reflection on the Normalizer methods – #74433
mysqli_connect adding ":3306" to $host if $port parameter not given – #74432
 
11:39 AM
lol
 
https://regex101.com/r/LdYmzz/5
Why is it not grouping the `Stack trace` separately for the first two rows?
It does group, if I remove the last `?`
 
@KamranAhmed Because it matches the message greedily
 
@NikiC any suggestion how can I make the stack trace optional?
If I make it non-greedy, it doesn't even the message https://regex101.com/r/LdYmzz/6
 
do we have an array_init that would allow me to set the dtor?
 
@KamranAhmed If you really want to, something like this would work: regex101.com/r/LdYmzz/7
Personally I'd just extract the whole error and then further split it up in stack trace, file, line etc in a separate step
 
11:48 AM
@NikiC nice
 
Good idea. Thanks NikiC :)
 
How to run tests using make test in php-ext when this ext uses hash and spl ?
 
@brzuchal as usual?
 
REPORT_EXIT_STATUS=1 TEST_PHP_ARGS="-q --show-diff --keep-all --no-clean" make test this runs tests with loaded extension but under the hood php is executed with -n and then all compiled extensions are not loaded
 
You can specify an ini with -c php.ini
You poor person with dynamically linked extensions...
 
11:52 AM
yes I can bundle --INI-- in phpt but I need to know then extension_dir
:/
 
you don't need --INI--
just explicitly specify your php.ini file
 
running make test runs php with -c ext-dir/tmp.ini
and with -d "extension_dir=ext-dir/modules"
extension_dir can be set twice?
 
eek
 
once to load extensions from distribution and then to load compiled one?
 
Try php run-tests.php -P -c system-php.ini -dextension=pwd/modules/ext.so tests
I'm not familiar with make test magic
 
11:55 AM
Thx @NikiC I'll try that
 
https://groups.google.com/forum/m/#!topic/phantomjs/9aI5d-LDuNE #PhantomJS https://t.co/bcK2Z2kOis
 
@tereško Can you tell what could be the reason for that
 
@Danack deeeead
 
12:10 PM
I've got another problem, when build ext and runing script test everything is fine until I add -d "memory_limit=1G" or watever size then I got using gdb Inferior 1 (process 12206) exited with code 0377, no segfaulting
@Danack I send you an email, could you respond please :)
 
Anonymous
@PeeHaa you sure :P ?
 
no
maybe you broke the build
:P
 
Anonymous
wouldn't surprise me
 
@brzuchal yes, was out drinking last night - and today am failing to be able to brain.
 
@JayIsTooCommon Just wait a bit more :P
 
Anonymous
12:16 PM
@PeeHaa not good enough
 
:D
 
@Wes apparently headless browsers are the way to go:
> What is the utility of headless browsers?
> A great example would be PDF generation for things like invoices. Rather than generating a pdf with something like PHP or Java. Render a regular html page with all the css you want (super easy compared to drawing a PDF using PHP) and then proceed to use a pdf printer on that page.
 
Wes
iirc firefox has something command line
maybe also chrome. that would be an idea too, yeah
 
i second @PeeHaa suggestion of wkhtmltopdf.org , had some success with it in the past
 
Wes
12:22 PM
noice
 
Thumbnailing web pages also benefit on headless mode
 
lol @JayIsTooCommon you are weird
 
Anonymous
rude.
 
I got a mail from jamesb
I was wondering who the fuck james brown is
 
Anonymous
there's only one james b
 
12:30 PM
True
Sorry
Speaking of which. Does your name have a trailing e or not?
 
Anonymous
second name?
 
Wes
Jay T. Common
 
I assume it's not jamese no :P
 
Anonymous
Was gonna say :P Second name does yeah
 
Anonymous
it's Irish I think
 
12:36 PM
ah yes your twitter handle also told me
ha! Irish
You drunk yet?
 
Anonymous
my twitter handle is conveniently pronounced 'burn PHP'
 
:D
 
12:58 PM
@Danack perceptual diff
containerised screenshot grabbers and the like
 
1:09 PM
Yes, I was telling Wes how to solve his problem, not asking...
24 hours ago, by Danack
Unrelated, fuck eloquent.
 
Wes
1:27 PM
is there any reason to use pdo and other drivers' multiple rowsets functionality
compared to running separate queries?
 
Anonymous
!!remind @PeeHaa stop lying to Jay in 5 hours
 
Reminder 36618545 is set.
 
?
I would never lie to you in a way you want find out
 
Wes
i read that as "stop laying with jay"
you pervs
 
@Wes He would never ask for such a thing
 
Wes
1:32 PM
please stop breaking @PeeHaa's heart @JayIsTooCommon
is there a way match a pattern but capture something else with regex? like, if pattern is abc, capture zyz
actually what i want to do is, if string matches abc, capture empty string. perhaps that's possible?
 
1:50 PM
@LeviMorrison Joe said something like first alpha for June … so not too soon.
 
PHP 7.2 right now looks like a very boring release
 
@Trowski I encountered that one in Aerys test failures and I agree… after all new sock\Socket(yield socket\connect()) is not very hard to write and more explicitly indicating that it's actually a Socket instance
 
@NikiC Lol! I agree! That's why we need the retry keyword to pass! :)
 
I estimate the chances of retry passing at about 0.01%
 
@NikiC I wanted to put property types forward…
 
1:53 PM
morning, all
 
I like boring releases though :)
 
So you're saying there's a chance! Nice. :)
 
lol ^ :-)
 
@SammyK I have no idea why we need sugar for do { for ($i = 0; $i < $n; $i++) { try { /* doThings™ */ break 2; } catch(Ex $e) {} } /* handle $e */ } while(0);
 
Gotta love that optimism
 
1:55 PM
@NikiC Hows the libsodium-php branch looking?
 
Wes
@PeeHaa we can't have nice things because of you
hey sammy \o
 
@NikiC agree
 
@bwoebi It just removes boilerplate and makes the syntax more readable. Also your example doesn't allow you to execute arbitrary code before retrying without adding more boilerplate. Something you'd get out-of-the-box with retry. ;)
\o Wes!
 
@SammyK you can put that code inside the catch block
 
1:59 PM
@bwoebi Was thinking of not having the interface implement promise by default anyway, leave that for special cases like Message.
It doesn't really make sense to wait for all the data on a socket instance (at least not typically).
 

« first day (2371 days earlier)      last day (2591 days later) »