« first day (2107 days earlier)      last day (2824 days later) » 

12:01 AM
@bwoebi phpunit startup time is super annoying under valgrind
maybe there's a flag to disable it?
I mean, so it doesn't try to collect everything upfront
 
@NikiC it really wants to know how many tests to run for the progress info… See also: github.com/sebastianbergmann/phpunit/issues/2034
Feel free to add something there …
 
@bwoebi eh... you know me
I'm only here to complain
 
@NikiC You aren't lazier than I am...
 
@bwoebi Is that a challenge? :P
 
@NikiC Well… uh… I hope not. :-D
 
12:55 AM
ooohh boys
anyone still here?
 
nope
we're all gone
 
@Sherif I'm not named gone...
 
heh
 
@codinghorror Hello I am seriously considering shuttering the company. I am Gordon. Do you mind if I just call you "seriously"?
 
LOL
 
Wes
1:14 AM
so we got smartphones, we got drones, we got hoverboards
 
@Wes but no autonomous cars :-(
 
Wes
printers however, for three decades now
 
printers are even more complex than autonomous cars…
need to wait for these first.
 
Wes
and this fucking icon is fucking offensive. it's not printing at all. zero. nada.
 
In a digital world, who needs printers?
 
Wes
1:17 AM
bureaucrats
 
@Sherif bureaucrats.
@Wes lol… like 2 sec slower than you
 
Fair point. Bureaucracy requires outmoded technology.
 
exactly
 
Wes
why printers don't work? i don't think it's harder to make a printer than other things we make and work perfectly
WHY?
> Check all connections and make sure all devices are on. If the power was turned off during printing, cancel the print job. If the error does not clear, see your printer documentation.
 
@Wes Now you understand why this is epic
 
Wes
1:35 AM
still couldn't print. every single time
 
Wes
2:08 AM
 
2:45 AM
@Wes major API changes incoming.
 
Wes
which ones? :P
@rtheunissen when you are available i have those suggestions...
hey Levi \o are you around?
 
3:05 AM
@Wes I am
 
Wes
does make sense in your opinion to have abstractions for stuff like infinite and infinite uncountable sets and sequences? eg
$start = new BigDecimal('0.7191');
$end = new BigDecimal('1891.9310');
$set = new BigDecimalSet($start, $end);
$set->contains(new BigDecimal('218.33')); // true
$set->contains(new BigDecimal('4569.82')); // false
that Set would have no count() as it's not finite, and no iterator because it's not even countable
 
Wes
$start = new BigInt('500');
$set = new IntRangeSet($start, null /* null indicates up to infinity */);
$set->contains(new BigInt('1000')); // true
$set->contains(new BigInt('10000000000000000000000000')); // true
$set->contains(new BigInt('50')); // false
 
In PHP I have found no advantage to having infinite sets.
Infinite streams, yes. Not infinite sets.
 
Wes
use cases for infinite streams that iterators can't fulfill?
 
3:14 AM
It's just an iterator api over the stream, usually.
 
I'm familiar with infinite lazy lists, but not necessarily Scala's.
 
Wes
so that's not what i thought it was :P
i can't read scala, sorry
@rtheunissen news?
 
3:48 AM
@Wes as in, what changes?
 
Wes
did you push the changes already?
how updates are the php polyfills anyway?
 
4:06 AM
Polyfill is updated.
Haven't pushed changes.
Will create an issues outlying the changes first, will mention you.
 
Wes
i have a bunch more... :B
do you know how i make scrutinizer run tests on php 7?
 
4:31 AM
Tell me now or forever hold you silence.
Or create issues. :p
I think you just need a phpunit.xml?
Not sure, I always use Travis for tests.
 
Wes
@rtheunissen it's two days that i'm waiting for you to be available... :P
 
Do I have to be available?
 
Wes
and ping me, i don't stare at the chat all the time
 
Right, of course.
 
Wes
@rtheunissen get your ass in the other room :P
 
4:39 AM
I'm doing 10 things at the same time, but I'm there.
 
5:11 AM
posted on July 23, 2016

New Cyanide and Happiness Comic

 
 
1 hour later…
6:20 AM
Hey good morning all

In php

var_dump($args['startdate']);
var_dump((int)$args['startdate']);die();

Output

string(13) "1468821556126" int(2147483647)

Why and how to resolve it...
 
6:46 AM
solved used floatval
 
Gon
6:59 AM
Moin, all
 
7:14 AM
mornin
 
Gon
... o/
 
has anyone here used Webpack with DefinePlugin?
for some reason I can't pass configuration variables to the build script
I think I will just import the deployment-specific variable for now and try to fix it late
 
morning tereško
 
@bwoebi new segfaults since beta one? github.com/krakjoe/apcu/issues/188#issuecomment-234703743
 
7:36 AM
good morning peeps
 
Ekn
mornin
 
i need help for i kind of silly task i guess
i have a foreach of events which i can register outside my class, within that foreach i dispatch the individual event
if i add a new event of the same type im currently dispatching i need to add it to the event array and also iterate over the newly added ones
therefore i have do dynamically add new events to a foreach, which is not that hard normally. But i only can get the whole array of events when i add a new one
so the task would be to merge those to arrays constantly within the foreach, right?
 
can you do a code sample? you usually dont add new items to the array under foreach
 
yep, 3v4l?
 
3v4l, pastebin… whatever :)
if you dont need it to execute just use pastebin
 
7:54 AM
the addedInIterationEvent class adds a new event within a running notify foreach
but i need to add it to the foreach at the moment i register it
the dispatch returns neccesary value by default, so i cant return an array of event, what you have there is just a stripped down class of mine
 
@StefanHövelmanns foreach creates a copy of the array
 
yeah thats my problem
for ?
 
you can do foreach ($this->eventList as &$event) {
 
cant :/ i have a member function to get the events
i'll quickly try out foreach
*for
 
you may leverage of \ArrayAccess, \IteratorAggregate
\Iterrable
 
8:07 AM
@StefanHövelmanns for should work, too
for ($i = 0; $i < count($this->eventList); $i++) {
    $this->eventList[$i]->setEvents($this);
    $this->eventList[$i]->dispatch();
}
 
yw
 
hi all
 
need help for this, please ake a look: stackoverflow.com/questions/38539667/…
 
8:19 AM
can someone shut up my neighbour... he's sawing shit for almost 2 hours now... weeeeeehhhh weeeehhhhhh....
how is an individual supposed to code with that bg noise..
 
Wes
mornings
 
8:35 AM
oy @wes
 
8:57 AM
@Gordon this is harder than expected xD
 
xD
i have a multidimensional array an i can add an event where ever i want within that, but the dispatchloop is only withing one sub array
therefore i have to iterate over everything again, so i have to save the already dispatched events to a temp variable..
ugh
 
Anonymous
Mornins
 
Wes
yo jay
does someone know how to set scrotusinizer-ci to use php7? Problem 1
- This package requires php >=7.0 but your PHP version (5.4.41) does not satisfy that requirement.
 
Wes
9:20 AM
the first time that i get so close to 100% of code coverage :B
 
@Wes 100%? you got too much time
@StefanHövelmanns is it noise cancelling?
 
dj quality
so yes
aint hearing nothing :)
 
Wes
@Gordon never happened before :B
 
@Wes I consider 100% a waste of time
just cover the business crucial stuff
80/20 ftw
 
Wes
9:30 AM
same
i'm however still spotting bugs...
that is quite scary, since i usually test 20% at most
 
If I get an array of objects back in JSON from my DB. (a list of tasks with an ID). I always have to "search" the array for the correct task if I want to select a task with a certain ID. Is there a better way to reorganize my JSON data or even in the PHP stage before returning the JSON string of data?
 
Anonymous
@tereško How good is the spec? If it costs 100+ it is still doable, but I'll have to wait one more month at least to buy it.
 
what you'r coding @wes?
 
it's this
the GPU should be revisited when you are actually buying it (because there will be new RX480 cards coming out ins a week or so)
I can lover the price significantly if I pick previous generation CPU
 
@tereško I am rewriting the method chaining example. I cannot tolerate it anymore
 
9:36 AM
gooooood
 
Wes
@StefanHövelmanns a hammer
 
@Gordon I was about to nuke it as a whole
(since I think that method chaining usually is a code smell)
 
yeah, it was still there this morning and I didnt want to puke my breakfast over my keyboard, so I started rewriting it
 
@wes you'r trying to crush a nerd girl with it?
 
Anonymous
@tereško First thanks. Second this is in Euro so, you are off by $200 more than my budget. I don't know much about all parts except the for the Intel Core i5-6600K. Why not i7?
 
Anonymous
9:39 AM
Everything looks good, but the case leaves much to be desired.
 
@samayo because i7 is waste of money, unless you are rendering videos professionally
@samayo youtube.com/watch?v=aVTuZYJ1wZo .. here is a case review
anyway, if the price needs to be lower, then 5th generation it is
 
Anonymous
Is the shipping free in EU for the unmarked parts?
 
Anonymous
The case looks much better in the review :)
 
Wes
PHP is just a hammer. ~ Rasmus Lerdorf
 
Anonymous
ah fk library is closing i'm out
 
9:45 AM
@samayo itr is only a shipping list. I would strongly recommend against buying directly from that site - you will be able to find better deals, if you search local online shops
 
Wes
anyway, even if i have full coverage it doesn't mean i have tested everything. code coverage is just about showing off :B
 
Gon
o/
 
dropped about €170
 
10:11 AM
@StefanHövelmanns this may help youtube.com/watch?v=WIKqgE4BwAY
 
@Danack what did i just watch xD
 
morgen
 
Gon
hoi @PeeHaa
 
your new avatar is pretty interesting.. Danack
 
o/
 
10:13 AM
moin PeeHaa
 
Wes
@Danack finally i could remember what your avatar reminded me 66.media.tumblr.com/18efff6524b3ce696740eb56556ab1d6/… :B
 
Gon
I search for ':B' in the chat, and all of the results are your message @Wes...
 
Wes
i'm the only allowed to use that :B
 
Gon
...
 
Anonymous
10:52 AM
!!wotd
 
connubial: of marriage or wedlock; matrimonial; conjugal.
 
Wes
@Gordon did you know of the zipf mystery?
 
@Wes no
 
Wes
@Gordon youtube.com/watch?v=fCn8zs912OE the 80/20 principle :P
 
Anonymous
11:00 AM
@Gordon what's annoying is that the original poster will be awarded for every up vote that gets now, 10x better though
 
@JayIsTooCommon wait, that means I need to edit all the topics, right?
because the net upvotes will be higher than the downvotes
 
Anonymous
:P Yesterday a guy tried to get his name on the editors by adding 'In PHP' to the title
 
remove his all answer and then edit
 
11:24 AM
next up… spending all my votes to dismiss topics
 
@Gordon I'm going for the... spending no votes because I refuse to acknowledge its existence :)
 
@JonClements out of curiosity: is SO happy with the outcome at the moment?
 
I haven't been paying attention or even spoken about it... think the doc chat room probably gives the best indication of how everyone is taking it...
 
11:32 AM
@JonClements fair enough
 
Anonymous
Can't believe that was approved
 
Anonymous
Actually, yes I can
 
php is in trouble HELP
 
@JayIsTooCommon that entire page is crap
 
Well... my extent of talking about it was just checking it was okay if I completely ignored it for now... the answer was "yes", so that's what I'm doing...
 
11:33 AM
@JonClements you happy person
 
@Gordon yup: ignoratio est felicitas
 
indeed
 
@Gordon sorry, was AFK
 
12:13 PM
@staabm why do you ping me with this? :-D
 
moin
 
morgen sir
 
Anonymous
12:29 PM
Mornin
 
12:44 PM
@bwoebi Who else could one blame? :P
 
@NikiC obviously… Dmitry? :-D
 
@bwoebi true ^^
@bwoebi You still haven't fixed that invoke issue btw :P
 
@NikiC not immediately sure which one you mean?
 
@bwoebi closure::fromcallable with closure::__invoke
 
because it's not fixable with how trampolines work currently
 
12:49 PM
meh
And the GeneratorClosedException thingy?
 
I haven't investigated yet … forgotten about it
 
I'd like to enable clean shutdown for uncaught exceptions, and that's one of the blocking issues
(though there are a couple more :/)
@bwoebi It would also be nice to revisit your patch for clean shutdown on exit/die
 
@NikiC That one AFAIK was throwing a fake uncatchable exception
but it has the downside of triggering finally…
 
@bwoebi iirc your patch explicitly skipped finally
 
oh, then my patch was smarter than I thought :-D
or something like set_exception_handler ?
 
12:55 PM
@NikiC and @bwoebi, while I see you're both here. This may have been discussed before but I would like to ask anyway. Re: unpacking. Is there any way to internally have access to the iterable being unpacked, before it is unpacked? Or does that happen before it even reaches where you parse parameters?
 
the latter…
 
@bwoebi also I'm wondering if leak detection for resources is a lost cause
I'm pretty sure our resource refcount management is totally broken in many places
But many resources seem to also leak by-design, so ... :/
 
@NikiC in case it is, that explains my problems with ext/uv too…
because somehow the shutdown sequence while freeing the resources is broken
 
@bwoebi I mean not really a fundamental problem, just that many extensions mismanage
@rtheunissen Only thing you can do is define a user opcode handler for SEND_UNPACK and intercept there. Though probably gonna be lots of ugly.
 
@NikiC Well… you could enforce it… ext devs will have to upgrade if they don't want spam in debug mode…
 
12:58 PM
@rtheunissen So I'd recommend adding an extra method. Like add and addAll or wahtevs
 
@NikiC or keep it how it is, and accept the performance implications.
 
@rtheunissen meh
I don't like accepting performance implications :P
 
But it's good to know that accessing pre-unpack is not possible.
I don't like the idea of having two methods that both "add".
Maybe just remove variadics and force a loop, but that's even slower than unpacking so.. :S
 
I've written so much code in phpdbg, I find myself writing sometimes nano sapi/zend_generators.c or similar…
 
1:17 PM
i've been utilizing classic mvp logic & trying to make it closer to model2mvc. from what i understand, the controller presenter can't be auto-injected w/ a view & sending the output of models to the views if i want it to be a true controller. but how should the view be requesting data from the model?
 
It's called IoC (Inversion of Control).
The same thing your framework does to your application code.
 
@NikiC This is the expected output for the test?
Generator 0
int(1)
Caught exception!
Exception in /Users/Bob/php-src-7.0x/Zend/tests/generators/mutli_yield_from_with_exception.php:4
Stack trace:
#0 /Users/Bob/php-src-7.0x/Zend/tests/generators/mutli_yield_from_with_exception.php(9): from()
#1 [internal function]: gen(Object(Generator))
#2 /Users/Bob/php-src-7.0x/Zend/tests/generators/mutli_yield_from_with_exception.php(25): Generator->next()
#3 {main}
Generator 1
Caught exception!
ClosedGeneratorException: Generator yielded from aborted, no return value available in /Users/Bob/php-src-7.0x/Zend/tests/generators/mutli_yield_from_with_exce
 
Hello
 
@Sherif i've read about this briefly & don't quite understand. there are many resources online, do you have a particularly good one?
 
@Jeremy When you write a controller in a typical MVC PHP framework, does your controller code call on the framework code, or does the framework code call your controller code? The concept is pretty simple. I call you and let you define behavior, but I hold on to the reins of control flow.
That's IoC in a nutshell.
 
1:27 PM
which one is the inversion? the controller calling on the framework code?
 
can you explain to me why I get error in symfony: "Catchable Fatal Error: Argument 1 passed to AppBundle\Service\GroupUserService::__construct() must be an instance of AppBundle\Repository\GroupRepository, instance of Doctrine\ORM\EntityRepository given"

here are my GroupUserService and services.yml: http://pastebin.com/T4LDQ06B http://pastebin.com/tSvNBK02
 
The inversion of control happens at the application code. Your application inverts control.
i.e. the control flow of your application code has become inverted.
 
okay, so how does this help me understand how the view will be getting data from the model?
 
Hi
 
Because it's the same concept.
You invert the flow of control between the view and the model, who will be calling whom?
 
1:31 PM
the view will be accessing objects in the model
 
The idea of inversion of control is fundamentally simple. How you go about implementing it can vary, but it still works the same way. For example, in higher order functions a callback exhibits inversion of control function foo(Callable $func) { return $func(); } now who is in control of whom?
Middleware is another example of IoC in PHP.
 
foo has control of the callback
 
Look at the Middleware implementations of popular PHP frameworks like Symfony or Laravel as an example.
@Jeremy But who is calling foo in the first place?
Defining function only defines behavior. It does not define any flow of control in the program.
 
@NikiC does this bug have a bug report id?
 
That's what IoC is all about. Allowing one thing to define the behavior but invert the flow of control back to something else lower in the stack.
If you were to look at views and models the same way, in your example, a model would basically be a callable that registers itself with the view. The view is then free to define the behavior, while the program continues to define the flow of control (how we inject the model into the view in the first place and call on that view).
 
1:38 PM
@bwoebi I don't know, but if you catch the last exception it at least shouldn't crash
I'm not totally sure on the semantics it should have
 
@NikiC I'm currently triggering a resume of the generator there
this means that current() has additional side effects… but it anyway has via the initial priming…
 
just as a sanity check, should this exception really be thrown into the generator?
 
It is in every case except if you do current(), currently.
i.e. if you do next(), it's thrown… it just was hanging in the middle because the generator was not resumed
 
@bwoebi more generally: semantics of current() with yield from
might it not be reasonable that current() should be stable?
 
@NikiC also, why shouldn't it be thrown into the generator? it's inside the generator…
 
1:42 PM
I.e. if you call $g->current() followed by $g->current() it should return the same value
 
@NikiC which it does, except if you advance the generator which it's yielding from in between
 
@bwoebi Yes, I'm talking about that "except" right now
should it not (maybe) return the value that was actually yielded via that generator?
 
well… that's other semantics then
 
@Sherif thanks for helping
 
it would make more sense to me semantically, but the implementation would be more complicated
 
1:45 PM
currently current() returns the most up-to-date value of the generators yielded from
 
lhi people
 
@NikiC not very complicated, it'd mean copying the current key/value into the executed generator (i.e. not the one at the root)
 
@bwoebi how do you recommend running the aerys server? take into account that jenkins must be able to restart it if the code changes. thanks in advance
 
@bwoebi but the whole chain probably?
 
@NikiC but we shouldn't change this in 7.0 anyway as it's a major semantics break then
 
1:48 PM
@bwoebi Is it? Aren't there exactly 0 people who rely on generators shared between yield froms?
It sounds more like a theoretical BC break
 
inb4 @Ocramius yelling all his code is broken now
 
@NikiC TBH, I've already had one instance of that Exception to fix… so…not 0.
@NikiC uhm, well, there lies the problem… you think it should update the whole chain and at the same time you say yielding from advancing should be idempotent for other Generator's current()/key()
@Victor not sure how Jenkins is related?
 
@bwoebi true
hm...
 
@bwoebi well, what I'm saying is that I need to be able to restart it without looking it up via ps aux | grep or something like that, to be something like service aerys-server restart
 
@NikiC Also, it quite violates expectations to have current() say 1 and then next() says 3, even if there is 2 in between
 
1:52 PM
@bwoebi Okay ... go for that resume then
We shoulda forbidden operations on generators that are being used in yield from...
 
@Victor Ah, there's CommandClient class
 
@bwoebi You really thought of everything
thank you
 

« first day (2107 days earlier)      last day (2824 days later) »